ChainSecurity / deployment_validation

Deployment Validation Files aim to simplify Deployment Validation of Smart Contracts
GNU Affero General Public License v3.0
22 stars 1 forks source link

Decode variable values #30

Open stiefn opened 2 months ago

stiefn commented 2 months ago

When the validation fails, it would be useful to get the decoded values of the variables that changed. This is especially helpful when the variable name is unknown.

In this example, a variable changed. I used an online tool to decode from hex to decimal, then it was immediately clear that the variable was the totalSupply of the Tether USDC. However, it would be quicker to have the decimal and ascii decoded value directly in the tool.

Validation failed. Deployment invalid: Different value for unknown (slot 0x1, offset 0).
Old value: 0x000000000000000000000000000000000000000000000000000000174876e800
New value: 0x0000000000000000000000000000000000000000000000000091b065e009c5c9