Skip to content
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

MultiSend and SimulateTxAcessor verification fails #313

Open
David-Kneel opened this issue May 13, 2021 · 14 comments
Open

MultiSend and SimulateTxAcessor verification fails #313

David-Kneel opened this issue May 13, 2021 · 14 comments

Comments

@David-Kneel
Copy link

Prerequisites

Description

The command yarn deploy-all rinkeby results in two verification failures:

❯ yarn deploy-all rinkeby
yarn run v1.22.10
$ hardhat deploy-contracts --network rinkeby
Nothing to compile
reusing "SimulateTxAccessor" at 0x59AD6735bCd8152B84860Cb256dD9e96b85F69Da
reusing "GnosisSafeProxyFactory" at 0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2
reusing "DefaultCallbackHandler" at 0x1AC114C2099aFAf5261731655Dc6c306bFcd4Dbd
reusing "CompatibilityFallbackHandler" at 0xf48f2B2d2a534e402487b3ee7C18c33Aec0Fe5e4
reusing "CreateCall" at 0x7cbB62EaA69F79e6873cD1ecB2392971036cFAa4
reusing "MultiSend" at 0xA238CBeb142c10Ef7Ad8442C6D1f9E89e07e7761
reusing "MultiSendCallOnly" at 0x40A2aCCbd92BCA938b02010E17A5b8929b49130D
reusing "GnosisSafeL2" at 0x3E5c63644E683549055b9Be8653de26E0B4CD36E
reusing "GnosisSafe" at 0xd9Db270c1B5E3Bd161E8c8503c55cEABeE709552
Verification status for SimulateTxAccessor: FAILURE
Verification status for GnosisSafeProxyFactory: SUCCESS
Verification status for DefaultCallbackHandler: SUCCESS
Verification status for CompatibilityFallbackHandler: SUCCESS
Verification status for CreateCall: SUCCESS
Verification status for MultiSend: FAILURE
Verification status for MultiSendCallOnly: SUCCESS
Verification status for GnosisSafeL2: SUCCESS
Verification status for GnosisSafe: SUCCESS
already verified: SimulateTxAccessor (0x59AD6735bCd8152B84860Cb256dD9e96b85F69Da), skipping.
already verified: GnosisSafeProxyFactory (0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2), skipping.
already verified: DefaultCallbackHandler (0x1AC114C2099aFAf5261731655Dc6c306bFcd4Dbd), skipping.
already verified: CompatibilityFallbackHandler (0xf48f2B2d2a534e402487b3ee7C18c33Aec0Fe5e4), skipping.
already verified: CreateCall (0x7cbB62EaA69F79e6873cD1ecB2392971036cFAa4), skipping.
already verified: MultiSend (0xA238CBeb142c10Ef7Ad8442C6D1f9E89e07e7761), skipping.
already verified: MultiSendCallOnly (0x40A2aCCbd92BCA938b02010E17A5b8929b49130D), skipping.
already verified: GnosisSafeL2 (0x3E5c63644E683549055b9Be8653de26E0B4CD36E), skipping.
already verified: GnosisSafe (0xd9Db270c1B5E3Bd161E8c8503c55cEABeE709552), skipping.
Done in 54.54s.

Additionally the command yarn deploy-all custom not only fails to verify MultiSend and SimulateTxAcessor but also shows a chainId error as follows:

❯ yarn deploy-all custom
yarn run v1.22.10
$ hardhat deploy-contracts --network custom
Nothing to compile
sending eth to create2 contract deployer address (0x3fab184622dc19b6109349b94811493bf2a45362) (tx: 0xc7d8be87a9817649f74f5b3b14dee77916d139d45a67f6a716be8d82212631ed)...
deploying create2 deployer contract (at 0x4e59b44847b379578588920ca78fbf26c0b4956c) using deterministic deployment (https://github.com/Arachnid/deterministic-deployment-proxy) (tx: 0xeddf9e61fb9d8f5111840daef55e5fde0041f5702856532cdbb5a02998033d26)...
deploying "SimulateTxAccessor" (tx: 0x8e1b3a125be17da98df71dabb9e869155dadc6e6e878dcd98c4f52c6b9f0b4d7)...: deployed at 0x59AD6735bCd8152B84860Cb256dD9e96b85F69Da with 237871 gas
deploying "GnosisSafeProxyFactory" (tx: 0x1862073a33913cfc066fbe9e49e45b4db4db53f1911556ca6d70fcd4bc38935a)...: deployed at 0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2 with 867594 gas
deploying "DefaultCallbackHandler" (tx: 0x208866d625dcfc4ccee63ee4ec21043a1f13d910fd160642220fbeeb6439b8a1)...: deployed at 0x1AC114C2099aFAf5261731655Dc6c306bFcd4Dbd with 542473 gas
deploying "CompatibilityFallbackHandler" (tx: 0xcad1f5025e248e9f7babf981ea90aefbd3c37525d7b45272ca170242d7c4166e)...: deployed at 0xf48f2B2d2a534e402487b3ee7C18c33Aec0Fe5e4 with 1238095 gas
deploying "CreateCall" (tx: 0xd113d38e20cc28a0be0a529a400f54a96af080861128566eea662718780d52c4)...: deployed at 0x7cbB62EaA69F79e6873cD1ecB2392971036cFAa4 with 294718 gas
deploying "MultiSend" (tx: 0x5a1f7531421c24808776a0b209ecb8083eacd6a477840a34bddef331b511e844)...: deployed at 0xA238CBeb142c10Ef7Ad8442C6D1f9E89e07e7761 with 190004 gas
deploying "MultiSendCallOnly" (tx: 0x37417a4022e4c785a215104bfdee74e48ed3c782e9a16234f72531c8b9658274)...: deployed at 0x40A2aCCbd92BCA938b02010E17A5b8929b49130D with 142122 gas
deploying "GnosisSafeL2" (tx: 0xc617bd8d53303a43651b299c968bd36a580e6ea00d512d4c7158697c1d126e46)...: deployed at 0x3E5c63644E683549055b9Be8653de26E0B4CD36E with 5198141 gas
deploying "GnosisSafe" (tx: 0x7facb9d3aad5b5e75302bbf7511e808ede19aff7ed5ee4391abfe9e5200eb508)...: deployed at 0xd9Db270c1B5E3Bd161E8c8503c55cEABeE709552 with 5015733 gas
Verification status for CompatibilityFallbackHandler: SUCCESS
Verification status for CreateCall: SUCCESS
Verification status for DefaultCallbackHandler: SUCCESS
Verification status for GnosisSafe: SUCCESS
Verification status for GnosisSafeL2: SUCCESS
Verification status for GnosisSafeProxyFactory: SUCCESS
Verification status for MultiSend: FAILURE
Verification status for MultiSendCallOnly: SUCCESS
Verification status for SimulateTxAccessor: FAILURE
Network with chainId: 1337 not supported
Done in 39.25s.

Environment

  • Compiler version: 0.6.12
  • Compiler options (if applicable, e.g. optimizer enabled):
  • Framework/IDE (e.g. Truffle or Remix): hardhat
  • EVM execution environment / backend / blockchain client:
  • Operating system: Microsoft Windows NT 10.0.21376.0 - WSL 2 - Debian 10

Steps to reproduce

  • configure .env file with:
    • NODE_URL="http://127.0.0.1:8545"
    • configure ETHERSCAN_API_KEY
    • configure MNEMONIC
    • configure INFURA_KEY
  • run:
    • yarn deploy-all rinkeby
    • yarn deploy-all custom

Additional context

hardhat.config.ts.zip

@rmeissner
Copy link
Member

Yes this is currently expected. The reason is that these contracts use immutables, which are not fully supported by the used script. Sourcify actually faces a similar issue, therefore I don't think there is an easy solution.

@rmeissner
Copy link
Member

rmeissner commented May 25, 2021

To make sure that everything went as expected to can check that the address that the contract was deployed to corresponds to the address in the safe-deployments repo: https://github.com/gnosis/safe-deployments/tree/main/src/assets/v1.3.0

Edit: As we use counterfactual deployment via create2 the generated address depends on the bytecode. If the bytecode is different you would get a different address, therefore checking the address is a guarantee that the bytecode is the same.

@David-Kneel
Copy link
Author

What I want to achieve is to deploy the gnosis safe contracts to Polygon network. I am not sure how to achieve that with these many hurdles though. Any ideas on this?

@rmeissner
Copy link
Member

rmeissner commented May 26, 2021

According to your log they are deployed. This is just an additional step, it doesn't have an impact on the deployment itself.

Edit: the chain id error just says that etherscan doesn't support that chain and therefore you cannot verify the contracts there.

As mentioned in the readme, the deploy-all command also tries to verify the source code using different means. This is not required and the contracts will be deployed even if verification fails.

@David-Kneel
Copy link
Author

David-Kneel commented May 26, 2021

I just deployed the smart contracts to Polygon
Here are the addresses:

Nothing to compile
reusing "SimulateTxAccessor" at 0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
deploying "GnosisSafeProxyFactory" (tx: 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)...: deployed at 0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA with 867582 gas
reusing "DefaultCallbackHandler" at 0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
deploying "CompatibilityFallbackHandler" (tx: 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)...: deployed at 0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA with 1238095 gas
reusing "CreateCall" at 0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
reusing "MultiSend" at 0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
reusing "MultiSendCallOnly" at 0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
deploying "GnosisSafeL2" (tx: 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)...: deployed at 0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA with 5279377 gas
deploying "GnosisSafe" (tx: 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)...: deployed at 0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA with 5096984 gas
Verification status for SimulateTxAccessor: FAILURE
Verification status for GnosisSafeProxyFactory: SUCCESS
Verification status for DefaultCallbackHandler: SUCCESS
Verification status for CompatibilityFallbackHandler: SUCCESS
Verification status for CreateCall: SUCCESS
Verification status for MultiSend: FAILURE
Verification status for MultiSendCallOnly: SUCCESS
Verification status for GnosisSafeL2: SUCCESS
Verification status for GnosisSafe: SUCCESS
Network with chainId: 137 not supported

Which are the next steps, should I follow to include this deployment to Safe-Deployments? I didnt't see yet instructions on how to prepare the PR for adding a new network to Safe-Deployments.

@rmeissner
Copy link
Member

rmeissner commented May 26, 2021

These are not the addresses we would expect. Which commitndidnyou deploy? It is important to use the version tagged with 1.3.0?

@David-Kneel
Copy link
Author

These are bot the addresses we would expect. Which commitndidnyou deploy? It is important to use the version tagged with 1.3.0?

I deployed the latest commit: ce5cbd2

@rmeissner
Copy link
Member

rmeissner commented May 26, 2021

As mentioned in the readme it is important to use a tagged commit else you will get different addresses and small unaudited changed. The tag would be https://github.com/gnosis/safe-contracts/tree/v1.3.0

@David-Kneel
Copy link
Author

As mentioned in the readme it is important to use a tagged commit else you will get unaudited changed. The tag would be https://github.com/gnosis/safe-contracts/tree/v1.3.0

Taged version 1.3.0 deploy:

❯ yarn deploy-all polygon
yarn run v1.22.10
$ hardhat deploy-contracts --network polygon
Compiling 12 files with 0.7.6
contracts/GnosisSafe.sol:340:5: Warning: Function state mutability can be restricted to pure
    function getChainId() public view returns (uint256) {
    ^ (Relevant source part starts here and spans across multiple lines).

Compilation finished successfully
reusing "SimulateTxAccessor" at 0x59AD6735bCd8152B84860Cb256dD9e96b85F69Da
reusing "GnosisSafeProxyFactory" at 0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2
reusing "DefaultCallbackHandler" at 0x1AC114C2099aFAf5261731655Dc6c306bFcd4Dbd
reusing "CompatibilityFallbackHandler" at 0xf48f2B2d2a534e402487b3ee7C18c33Aec0Fe5e4
reusing "CreateCall" at 0x7cbB62EaA69F79e6873cD1ecB2392971036cFAa4
reusing "MultiSend" at 0xA238CBeb142c10Ef7Ad8442C6D1f9E89e07e7761
reusing "MultiSendCallOnly" at 0x40A2aCCbd92BCA938b02010E17A5b8929b49130D
reusing "GnosisSafeL2" at 0x3E5c63644E683549055b9Be8653de26E0B4CD36E
reusing "GnosisSafe" at 0xd9Db270c1B5E3Bd161E8c8503c55cEABeE709552
Verification status for CompatibilityFallbackHandler: SUCCESS
Verification status for CreateCall: SUCCESS
Verification status for DefaultCallbackHandler: SUCCESS
Verification status for GnosisSafe: SUCCESS
Verification status for GnosisSafeL2: SUCCESS
Verification status for GnosisSafeProxyFactory: SUCCESS
Verification status for MultiSend: FAILURE
Verification status for MultiSendCallOnly: SUCCESS
Verification status for SimulateTxAccessor: FAILURE
Network with chainId: 137 not supported
Done in 31.25s.

@rmeissner
Copy link
Member

Cool this looks good :) next step would be a pr to https://github.com/gnosis/safe-deployments, or I can add it to safe-global/safe-deployments#3

@David-Kneel
Copy link
Author

Cool this looks good :) next step would be a pr to https://github.com/gnosis/safe-deployments, or I can add it to gnosis/safe-deployments#3

I can create the PR, I just need to know the structure of the folder how it should actually be. Right now I get all the files in version 1.3.0 are at mainnet Ethereum network. So we probably need to separate in 2 different folders, ethereum_mainnet and polygon_mainnet. What do you thing @rmeissner ?

@rmeissner
Copy link
Member

rmeissner commented May 26, 2021

It would be an entry in the networkAddress object (see https://github.com/gnosis/safe-deployments/pull/3/files#diff-38e12284165b2c1a170347d1a57375feac2e84d9d60d7e015f918563de406751R11)

Normally all networks with full evm support should have the same address as the default address, but there are some expections (e.g. optimism)

@rmeissner
Copy link
Member

I will try to improve the documentation to make this more clear. (See safe-global/safe-deployments#4) thanks for walking through this.

@David-Kneel
Copy link
Author

Here is the PR: safe-global/safe-deployments#5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants