Skip to content

Commit

Permalink
fix: cairo 1 variable with _len in name
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippeR26 committed Sep 18, 2023
1 parent 4f0793d commit 551adfa
Show file tree
Hide file tree
Showing 7 changed files with 529 additions and 193 deletions.
25 changes: 9 additions & 16 deletions __mocks__/cairo/cairo210/cairo210.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,25 @@

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

#[starknet::contract]
mod MyTestFelt {


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

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

fn test_len(self: @ContractState, p1: felt252, string_len: felt252,) -> felt252 {
string_len
}
}
}
Loading

0 comments on commit 551adfa

Please sign in to comment.