blockscout / frontend

Front-end application for Blockscout
https://blockscout.com
GNU General Public License v3.0
164 stars 449 forks source link

New quick-action buttons and improvements on read/write tabs #2251

Open k1rill-fedoseev opened 1 month ago

k1rill-fedoseev commented 1 month ago

Similar to the existing buttons for quick integer input:

Image

it's suggested to also add the following:

  1. "SELF" (or "ME", or "WALLET", etc..) button for fields of type address, which inputs the address of the collected wallet, if any.
  2. "MAX" button for fields of type int, uint, which inputs the max allowed value for the given type (e.g. 2256 - 1 for uint256, 231 - 1 for int32)
  3. "NOW+1h" button for fields of type int, uint, whose field name match the following regex: /.*timestamp|deadline|expiration|expiry.*/i. "MAX" button should be hidden for such fields.
  4. There should be a button to copy the constructed calldata to the clipboard, near write/read/simulate buttons. Button should only appear/activate when all the fields are filled and validated.
  5. Input fields should have the data-1p-ignore attribute specified to disable 1password widget. Currently it's incorrectly displayed on fields of type address
tgladilina commented 2 weeks ago

Done . Mockup

Image

tom2drum commented 1 week ago

Examples of contract methods with time-related arguments

https://eth.blockscout.com/address/0x891a93698d083a5fd220D8Cbac6d6fb1E6ffc88f?tab=write_contract#f3995c67

https://eth-sepolia.k8s-dev.blockscout.com/address/0x0bFca4919378394344533130e84914c00f9E7Aa1?tab=write_contract#414bf389