onflow / flow-go

A fast, secure, and developer-friendly blockchain built to support the next generation of games, apps, and the digital assets that power them.
GNU Affero General Public License v3.0
531 stars 170 forks source link

[Flow EVM] Add support for ABI encoding/decoding of Solidity `bytes` -related types #5365

Open m-Peter opened 4 months ago

m-Peter commented 4 months ago

Right now, Cadence arrays (fixed & variable sized) are ABI encoded/decoded to Solidity array equivalents. That means we cannot map a Cadence [UInt8; 4] type to Solidity bytes4. To overcome this, we can define a new composite type on the EVM contract (just like we do for EVM.EVMAddress) and use it to signify in what bytes type we want to encode a Cadence byte array. We should support at minimum bytes / bytes4 / bytes32 and arrays of these 3.

github-actions[bot] commented 2 weeks ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

m-Peter commented 2 weeks ago

This is still relevant, though maybe not for the first release of Flow EVM