gnosischain / issues

Issue Tracker for Gnosis Chain
2 stars 0 forks source link

Failing prediction of address for Chiado #20

Open JacqueGM opened 1 year ago

JacqueGM commented 1 year ago

While using this package to work with the testnet chiado, we faced an issue regarding the prediction of the address.. After debuging locally we realise that the eth_estimateGas calls fails for Chiado while the same call for Gnosis works.

curl https://rpc.chiadochain.net \        
  -X POST \     
  -H "Content-Type: application/json" \
  --data '{"method":"eth_estimateGas","params":[  {"to": "0x66c0FE88C2Aef9DE75CB725E8bCCE61891DF4393","value": "1"}],"id":1,"jsonrpc":"2.0"}'
 curl https://rpc.gnosischain.com/ \       
  -X POST \     
  -H "Content-Type: application/json" \
  --data '{"method":"eth_estimateGas","params":[  {"to": "0x450Fc3eAc8b847a759Cb05790cE7A1f465ac0cE8","value": "1"}],"id":1,"jsonrpc":"2.0"}'

If we change the value from 1 to 0 then it retunds and address. This values come directly from the line below.

https://github.com/safe-global/safe-eth-py/blob/2fcf1eca51f25a16924521f23bb17bce6125b5f3/gnosis/safe/safe_create2_tx.py#L251

Can you help us to understand the different behaivour for both chains towards the same call? and wether is possible to hardcode that value to 0. From what we tried this doesnt seem to affect the address prediction for gnosis.