warp icon indicating copy to clipboard operation
warp copied to clipboard

Update calldata handling

Open rodrigo-pino opened this issue 2 years ago • 0 comments

In Warp 2 to handle calldata we created abstractions.

  1. solidity dynamic arrays where converted into custom structs with a pointer and length
  2. solidity static arrays where converted into an n size tuple.
  3. solidity structs where adapted to calldata version.

(1) is actually incompatible with Warp 3. We no longer require a struct to mimic the same behaviour as a solidity array. We should erase any use of such a struct and replace with logic with Cairo 1 arrays: Array<T>

The handler of this issue should take a look into:

  1. src/cairoUtil/funcGen/calldata/*
  2. src/passes/externalArgMothifier/dynamicArrayModifier.ts
  3. src/passes/references/externalReturnReciever.ts

Probably others places as well, but this are a good start to grasp the issue.

rodrigo-pino avatar May 22 '23 03:05 rodrigo-pino