zink icon indicating copy to clipboard operation
zink copied to clipboard

Load fixed arrays from calldata

Open clearloop opened this issue 1 year ago • 0 comments
trafficstars

Describe the feature

#[zink::external]
fn foo(array: [U256, 2]) {
  // ...
}

Solution

  1. register the array types to ABI
  2. pass ABI to the compiler
  3. in the code generator, detect the length of the arrays from function signature ( which is passed from 2. )
  4. process the fixed length to bytecode for operating this type

clearloop avatar Oct 30 '24 19:10 clearloop