Enable arbitrary contract calls on /construction/metadata#218
Conversation
|
Hi @gqln . Thanks for creating this PR! I left some comments inline and have some more general points below.
|
c40a4eb to
218b838
Compare
Thanks for the review @palango! I've resolved these first two items and your comments.
Yes, we need both encoding options for our use case. The other EVM-compatible rosetta implementations we're using (Inphi/optimism-rosetta#103, https://github.com/maticnetwork/polygon-rosetta/pull/46, flare-foundation/flare-rosetta#16, ava-labs/avalanche-rosetta#223), as well as rosetta-geth-sdk also support both argument encoding formats.
We don't require any changes beyond this PR for our use case, so there's no additional work planned for now. |
Do you require a release from our side or do you build it yourself? |
@palango Yes, that would be perfect! Could you make a new release? |
|
@gqln Released a new beta here: https://github.com/celo-org/rosetta/releases/tag/v2.1.0-beta |
In order to support transaction construction for arbitrary contract calls, we're making the following changes:
The /construction/metadata endpoint will now, given the following arguments...
...return the corresponding valid TxMetadata object.
This behavior aligns with other EVM-compatible rosetta implementations (Inphi/optimism-rosetta#103, https://github.com/maticnetwork/polygon-rosetta/pull/46), as well as rosetta-geth-sdk, which all support both argument encoding formats.
To support this functionality while reducing internal changes, CeloMethod now additionally supports 'unregistered' methods, which are identified by method signature.