The Fe standard library should provide an implementation of the Ethereum Contract ABI and this implementation should be used in Fe v2 to replace the existing dispatcher codegen.
Note: we should probably be using io::{Read, Write} traits, but limitations in the current trait implementation make this difficult. In v2 we can refactor this.
ABI traits
AbiEncode, AbiDecode
ABI impls
all primitive types
Array types (u8 array as bytes)
tuple types up to a given length
String
Contract ABI support in Fe v2
On the Fe v2 branch, we need to add Contract ABI support using the __call__ function and the std::abi implementation.
The compiler will be responsible for generating the following functional components of the Contract ABI:
std::abi
The Fe standard library should provide an implementation of the Ethereum Contract ABI and this implementation should be used in Fe v2 to replace the existing dispatcher codegen.
Here is a rough outline of what's being worked on in https://github.com/ethereum/fe/pull/856:
IO types
MemoryBuffer
,MemoryBufferWriter
,MemoryBufferReader
CalldataReader
Note: we should probably be using
io::{Read, Write}
traits, but limitations in the current trait implementation make this difficult. In v2 we can refactor this.ABI traits
AbiEncode
,AbiDecode
ABI impls
Array
types (u8
array asbytes
)String
Contract ABI support in Fe v2
On the Fe v2 branch, we need to add Contract ABI support using the
__call__
function and thestd::abi
implementation.The compiler will be responsible for generating the following functional components of the Contract ABI: