Closed rodrigo-pino closed 1 year ago
This PR accomplish the following tasks:
warp
Example of an annotated cairo contract:
#[contract] mod ContractUsesImplicit { use warplib::memory::WarpMemory; use warplib::memory::WarpMemoryTrait; use warplib::memory::WarpMemoryImpl; #[implicit(warp_memory: WarpMemory)] fn call_to_insert(value: felt252) { insert_to_warp_memory(value); } #[implicit(warp_memory: WarpMemory)] fn insert_to_warp_memory(value: felt252) { warp_memory.append(value); } }
Result after expanding the implict attribute:
implict
#[contract] mod ContractUsesImplicit { use warplib::memory::WarpMemory; use warplib::memory::WarpMemoryTrait; use warplib::memory::WarpMemoryImpl; fn call_to_insert(ref warp_memory: WarpMemory, value: felt252) { insert_to_warp_memory(ref warp_memory, value); } fn insert_to_warp_memory(ref warp_memory: WarpMemory, value: felt252) { warp_memory.append(value); } }
This PR accomplish the following tasks:
warp
binary. A an "enhanced" version of Scarb which features the parsing of custom implicits.warp
is based on Scarb, warplib and the way files were transpiled were adapted to work the same way as Scarbwarp
uses Alpha7 release so this PR serves as an update from Alpha6 as well.Example of an annotated cairo contract:
Result after expanding the
implict
attribute: