-
Notifications
You must be signed in to change notification settings - Fork 179
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
[EVM] Add support for abi.encode() and abi.decode() to Cadence #4937
Comments
nit: I think place for this is in flow-go [0] [1] [0] https://github.com/onflow/flow-go/blob/643b532c77eacc4d8b34232afaa8c7416a1cd912/fvm/evm/stdlib/contract.cdc |
Yes, this should be implemented in the |
I don't think this request is a Flow-EVM related request. It's a request similar to what we did for RLP. |
Thought we might decide to do it inside the EVM contract, its implementation is not dependent on the Flow-EVM work in my view. |
Issue to be solved
The Axelar cross-chain integration work needs the Ethereum ABI.encode() and ABI.decode() functionality made available, ideally as a native Cadence language function owing to the difficulty of implementing the same logic directly in Cadence code due to the byte level handling. This need will doubtless also arise for other aspects of EVM integration in future since ABIs are very common.
The reference example in https://github.com/ethereum/go-ethereum/blob/master/accounts/abi/abi.go could in theory be copy-pasted along with tests and then surface language native methods to invoke that logic.
Suggested Solution
This task is to confirm the feasibility of this, and confirm the naming and spec for the Cadence native functions that would allow Cadence code to run the ABI.encode() and ABI.decode() through them.
** Definition of done **
The text was updated successfully, but these errors were encountered: