Skip to content
This repository has been archived by the owner on Sep 5, 2023. It is now read-only.

Abi memory #1066

Draft
wants to merge 88 commits into
base: cairo-1.0
Choose a base branch
from
Draft

Abi memory #1066

wants to merge 88 commits into from

Conversation

rjnrohit
Copy link
Contributor

@rjnrohit rjnrohit commented May 22, 2023

The embed cairo0 code has been transformed in abiEncode.ts and abiDecode.ts file to correspoding cairo1 version as well adopting the latest memory layout proposed for WARP.

Modals traits such as ByteAccessorTrait and DynamicArrayUtilTrait has been added for bytes_access.cairo and dynamic_array_utils.cairo files. Some of the existing methods of the traits is still yet to be implemented though.

trait DynamicArrayUtilTrait {
    // WARP Memory Dynamic Arrays Utils
    fn dynamic_array_copy_felt(ref self: WarpMemory, to_loc: felt252, to_index: felt252, to_final_index: felt252, from_loc: felt252, from_index: felt252);
....
}
trait ByteAccessorTrait {
    fn byte256_at_index(base: u256, index: felt252) -> felt252;
   ....
}

After these traits methods implementation would be done then we remaining ts files inside cairoUtilFuncGen/abi folder needs to be transformed adopting the implemented trait and newer cairo1 changes.

will go in after #1045

rodrigo-pino and others added 25 commits May 15, 2023 08:21
@rjnrohit rjnrohit changed the base branch from develop to cairo-1.0 May 22, 2023 12:40
@piwonskp piwonskp mentioned this pull request Jun 2, 2023
16 tasks
@rjnrohit
Copy link
Contributor Author

The embed cairo0 code has been transformed in abiEncode.ts and abiDecode.ts file to correspoding cairo1 version as well adopting the latest memory layout proposed for WARP.

Modals traits such as ByteAccessorTrait and DynamicArrayUtilTrait has been added for bytes_access.cairo and dynamic_array_utils.cairo files. Some of the existing methods of the traits is still yet to be implemented though.

trait DynamicArrayUtilTrait {
// WARP Memory Dynamic Arrays Utils
fn dynamic_array_copy_felt(ref self: WarpMemory, to_loc: felt252, to_index: felt252, to_final_index: felt252, from_loc: felt252, from_index: felt252);
....
}
trait ByteAccessorTrait {
fn byte256_at_index(base: u256, index: felt252) -> felt252;
....
}
After these traits methods implementation would be done then we remaining ts files inside cairoUtilFuncGen/abi folder needs to be transformed adopting the implemented trait and newer cairo1 changes.

will go in after #1045

@rjnrohit rjnrohit closed this Jun 22, 2023
@piwonskp piwonskp reopened this Jun 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants