Skip to content

Commit

Permalink
Merge pull request #590 from 0xs34n/feat/0.11.0/fix-uint256
Browse files Browse the repository at this point in the history
Feat/0.11.0/fix uint256
  • Loading branch information
tabaktoni authored Apr 21, 2023
2 parents 60c2ca7 + 346cd51 commit e2b03b2
Show file tree
Hide file tree
Showing 10 changed files with 23,325 additions and 9,881 deletions.
26 changes: 26 additions & 0 deletions __mocks__/cairo/helloSierra/hello.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,32 @@ mod HelloStarknet {
balance_u8::read()
}

#[view]
fn test_u16(p1: u16) -> u16 {
p1 + 1_u16
}

#[view]
fn test_u32(p1: u32) -> u32 {
p1 + 1_u32
}

#[view]
fn test_u64(p1: u64) -> u64 {
p1 + 1_u64
}

#[view]
fn test_u128(p1: u128) -> u128 {
p1 + 1_u128
}

#[view]
fn test_u256(p1: u256) -> u256 {
let to_add = u256 { low: 1_u128, high: 0_u128 };
p1 + to_add
}

// echo Array
#[view]
fn echo_array(data: Array<u8>) -> Array<u8> {
Expand Down
Loading

0 comments on commit e2b03b2

Please sign in to comment.