Open re1ro opened 1 year ago
Here is a sample of how abi encoding/decoding may be used: function call, spec
And here are existing rust crates that could be potentially used for the implementation:
@re1ro When embedding the eth abi did you do something like what this example does? https://github.com/stellar/soroban-examples/tree/6c27ca6211ae04d5393cf16590e7da84f1d1f3f5/eth_abi
If you'd like to propose a change to the protocol, which adding a host function would be, could you start a stellar-protocol discussion at https://github.com/stellar/stellar-protocol/discussions?
Could you share more details about the size / cost with numbers and example contracts in that discussion?
What problem does your feature solve?
This feature would add ability to write interchain dapps and support any kind of communication between Soroban and EVM smart contracts.
What would you like to see?
Natively exposed functions for abi encoding and decoding with a reasonable gas cost. Maybe this could use the existing rust implementation of ethabi underneath
What alternatives are there?
Importing
ethabi
into the contract itself, but it becomes expensive in terms of gas usage and deployment. Alternatively some custom packing unpacking could be implemented (for predefined data structure) but that would not allow flexibility and dynamic data types.