Skip to content

Commit

Permalink
Merge pull request #719 from PhilippeR26/testCairo210-2
Browse files Browse the repository at this point in the history
test: add cairo 2.1.0 simple contract
  • Loading branch information
tabaktoni authored Aug 10, 2023
2 parents e9ed99e + 14d3cca commit 047bd98
Show file tree
Hide file tree
Showing 6 changed files with 1,268 additions and 9 deletions.
33 changes: 33 additions & 0 deletions __mocks__/cairo/cairo210/cairo210.cairo
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
//Cairo 2.1.0

#[starknet::interface]
trait ITestC210<TContractState> {
fn test_felt(
self: @TContractState,
p1: felt252,
p2: u128,
p3: u8
) -> u128;
}

#[starknet::contract]
mod MyTestFelt {


#[storage]
struct Storage {
counter: u128,
}

#[external(v0)]
impl TestFelt of super::ITestC210<ContractState> {
fn test_felt(
self: @ContractState,
p1: felt252,
p2: u128,
p3: u8
) -> u128 {
p2+1
}
}
}
Loading

0 comments on commit 047bd98

Please sign in to comment.