Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

expect condition hit when building ContractCall in abigen-generated file #612

Closed
EricBolten opened this issue Nov 23, 2021 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@EricBolten
Copy link

Version

│   │   ├── ethers v0.5.4
│   │   │   ├── ethers-contract v0.5.4
│   │   │   │   ├── ethers-contract-abigen v0.5.4
│   │   │   │   │   ├── ethers-core v0.5.5
│   │   │   │   ├── ethers-contract-derive v0.5.4 (proc-macro)
│   │   │   │   │   ├── ethers-contract-abigen v0.5.4 (*)
│   │   │   │   │   ├── ethers-core v0.5.5 (*)
│   │   │   │   ├── ethers-core v0.5.5 (*)
│   │   │   │   ├── ethers-providers v0.5.5
│   │   │   │   │   ├── ethers-core v0.5.5 (*)
│   │   │   ├── ethers-core v0.5.5 (*)
│   │   │   ├── ethers-middleware v0.5.4
│   │   │   │   ├── ethers-contract v0.5.4 (*)
│   │   │   │   ├── ethers-core v0.5.5 (*)
│   │   │   │   ├── ethers-providers v0.5.5 (*)
│   │   │   │   ├── ethers-signers v0.5.4
│   │   │   │   │   ├── ethers-core v0.5.5 (*)
│   │   │   ├── ethers-providers v0.5.5 (*)
│   │   │   └── ethers-signers v0.5.4 (*)
│   │   │   ├── ethers v0.5.4 (*)
│   │   │   ├── ethers v0.5.4 (*)
│   ├── ethers v0.5.4 (*)
├── ethers v0.5.4 (*)
│   ├── ethers v0.5.4 (*)
│   │   ├── ethers v0.5.4 (*)
├── ethers v0.5.4 (*)

Platform
Linux

Description

I am hitting an expect condition when building a ContractCall from abigen-generated code.

Building the ContractCall:
https://github.com/PeggyJV/gravity-bridge/blob/69d40539a0d8f68ee2a82857462d9558d5cdfa9b/orchestrator/ethereum_gravity/src/valset_update.rs#L132-L146

The error:

The application panicked (crashed).
Message:  method not found (this should never happen): DecodingError(InvalidData)
Location: /app/gravity_abi/src/gravity.rs:278

  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
                                ⋮ 7 frames hidden ⋮
   8: ethereum_gravity::valset_update::build_valset_update_contract_call::h1d2f43639d214ce9

https://github.com/PeggyJV/gravity-bridge/blob/69d40539a0d8f68ee2a82857462d9558d5cdfa9b/orchestrator/gravity_abi/src/gravity.rs#L278

The JSON used to generate the function:
https://github.com/PeggyJV/gravity-bridge/blob/69d40539a0d8f68ee2a82857462d9558d5cdfa9b/orchestrator/gravity_abi/Gravity.json#L616-L668

The code used to generate the file:
https://github.com/PeggyJV/gravity-bridge/blob/69d40539a0d8f68ee2a82857462d9558d5cdfa9b/orchestrator/abi_build/src/main.rs#L7-L30

@EricBolten EricBolten added the bug Something isn't working label Nov 23, 2021
@gakonst
Copy link
Owner

gakonst commented Nov 23, 2021

@mattsse this seems to be an abigen edgecase, although it seems weird given that the function signature is "simple"

@gakonst
Copy link
Owner

gakonst commented Nov 24, 2021

Should be fixed in #613

@gakonst gakonst closed this as completed Nov 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants