-
Notifications
You must be signed in to change notification settings - Fork 242
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PROTO-OPS] GDA verification of SuperfluidPool instances #1737
Comments
@d10r is it still broken? |
to my surprise there finally are verified beacon proxies, see https://celoscan.io/address/0x882703DC8239e2Ba167e06CE1FcF654E17A0bd06#code Will check next networks and close if confirmed. |
I assume it is fixed. |
This was a red herring, bcs the pattern and terminology keeps confusing me. What was verified was the Beacon, not the Proxy. snowtrace adds to the confusion because it's behaviour with proxies is different from etherscan-instances. This is what a (verified) BeaconProxy looks like on an etherscan-ish explorer: https://basescan.org/address/0x76e2ca149945Bb8c6130619Ad4ddFa30EcF9bE06#code A solution for this issue is in #1942 |
The solution above solves the problem going forward. First, check out the code version deployed when the Pool contract was created, and compile it.
Now look up the address of the created contract by pasting the tx hash in an explorer and looking at the log events.
(ctorArgs needs to be WITHOUT leading 0x) If it fails, you can debug by looking up the input data of the deployment tx in Tenderly and compare with what was computed. Example: https://dashboard.tenderly.co/tx/base/0x4545ef55cc4b2b50ed3f3cb092292794a3db17df41a255dca23bad1bb115b5e5/debugger?trace=0.0.0.1.0.1.0 |
Problem
For SuperfluidPool instances, the beacon proxy pattern is used.
How instances are deployed: https://github.com/superfluid-finance/protocol-monorepo/blob/gda/packages/ethereum-contracts/contracts/agreements/gdav1/SuperfluidPoolDeployerLibrary.sol#L23
Example deployment tx: https://testnet.snowtrace.io/tx/0xb81b312ace4f70d22f8c24ac0e8eeb07dd2e1f5a95452be06a2e8cf7a4cb87a6
truffle-plugin-verify can't auto-determine constructor params if deployed like this (from contract), but can be manually told what the params are thx to this PR.
How I abi encoded the params in a truffle console:
for the first param (beacon), it's just padding to 32 bytes.
Resulting cmdline:
not yet sure if this is the correct way to provide multiple args.
Acceptance criteria
A sufficiently automated solution for getting new SuperfluidPool instances verified - that is, shouldn't be more complicated than invoking a script and providing the address of the pool contract to be verified.
The solution space isn't limited to truffle-plugin-verify. On the contrary, due to truffle deprecation it may be better to use other tooling for this.
The text was updated successfully, but these errors were encountered: