-
Notifications
You must be signed in to change notification settings - Fork 409
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
Add Oasis Sapphire Mainnet chain #884
Conversation
I would appreciate, if someone could bump upstream chains.json (looking for this addition ethereum-lists/chains#2064). @kuzdogan ? |
The immutable smart contracts will be tricky in Sapphire, because any function call data (including the one that is passed to the contract constructor) are confidential. In this case the Sapphire endpoint will return all zeros in place of the constructor parameters in |
Bumped chains.json, you can merge from or rebase onto staging. To make things clear: if you ask for the |
No, When running the test, this error is reported
I added some debugging output here:
And noticed the following:
If you carefully compare the two, you can notice the constructor argument 0x7b (123) is missing in the latter output. So I assumed the issue happened somewhere before, where it tried to fetch constructor arguments by decoding the creation transaction and that failed, thus leaving constructor arguments all zero. |
This issue only persists for immutable contracts. Perhaps we could have a flag in sourcify-chains.ts, if the chain supports immutable contracts verification or not. And when the user would want to verify an immutable contract on a chain that doesn't support those, he should get an error (which is correct). |
I don't know if I understood it correctly, but I think there are no problem about implementing this feature. Also, I think to make things more clear you could give us an example of |
I've only been able look at this now. To summarize:
It is expected the part in onchain deployed bytecode ( As a workaround we try comparing the creation bytecodes. We compare the recompiled creation bytecode against the We recently introduced another verification method with "bytecode simulation" #864 that executes the compiled creation bytecode. It should be possible to verify the given contract with this method. However this is currently not integrated in the tests. We should include this as a separate verification. About having a variable in |
FYI the new Sapphire 0.4.0 also supports non-confidential contract calls. Creating a confidential contract with a non-confidential transaction should now enable Sourcify to fully verify the contract. I'll make a fix shortly. |
I used unencrypted contract create transaction now and seems to work fine with sourcify CI. Requesting re-review. |
* stringify the compiler errors before throwing * fix #926 drop SOLC_REPO_TMP variable. Always save compiler into the SOLC_REPO folder. * make solc repo writable * Add Oasis Sapphire Mainnet chain (#884) * sourcify-chains: Add Oasis Sapphire Mainnet * chain-tests: Add Oasis Sapphire Mainnet * Update chains.json --------- Co-authored-by: Marco Castignoli <[email protected]> Co-authored-by: Matevž Jekovec <[email protected]>
Adds the confidential Oasis Sapphire Mainnet chain 23294.
Merge after the Sapphire Mainnet endpoint is officially announced.
View in Huly HI-753