Skip to content

Commit

Permalink
restore cairo programs
Browse files Browse the repository at this point in the history
  • Loading branch information
Pedro Fontana authored and Pedro Fontana committed Feb 9, 2024
1 parent ac35900 commit d3c9836
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion cairo_programs/cairo-1-programs/array_append.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ fn main() -> Array<u32> {
let mut numbers = ArrayTrait::new();
numbers.append(4_u32);
numbers.append(2_u32);
let _x = numbers.pop_front();
numbers.pop_front();
numbers
}
6 changes: 3 additions & 3 deletions cairo_programs/cairo-1-programs/dictionaries.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ use dict::Felt252DictTrait;
fn main() -> felt252 {
let mut dict_u8 = felt252_dict_new::<u8>();
let mut dict_felt = felt252_dict_new::<felt252>();
let _dict_felt2 = felt252_dict_new::<felt252>();
let mut dict_felt2 = felt252_dict_new::<felt252>();

dict_u8.insert(10, 110);
dict_u8.insert(10, 110);

let _val10 = dict_u8[10]; // 110
let _val11 = dict_felt[11]; // 0
let val10 = dict_u8[10]; // 110
let val11 = dict_felt[11]; // 0
dict_felt.insert(11, 1024);
dict_felt[11] // 1024
}
6 changes: 3 additions & 3 deletions cairo_programs/cairo-1-programs/enum_flow.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ fn main() -> felt252 {
match_long(el1);
let el2 = MyEnumLong::c(22);
match_long(el2);
let _eg1: MyEnumGeneric<(), felt252> = MyEnumGeneric::<(), felt252>::a(30);
let _eg2: MyEnumGeneric<(), felt252> = MyEnumGeneric::<(), felt252>::b(());
let _eg3: MyEnumGeneric<(), felt252> = MyEnumGeneric::<(), felt252>::c(32);
let eg1: MyEnumGeneric<(), felt252> = MyEnumGeneric::<(), felt252>::a(30);
let eg2: MyEnumGeneric<(), felt252> = MyEnumGeneric::<(), felt252>::b(());
let eg3: MyEnumGeneric<(), felt252> = MyEnumGeneric::<(), felt252>::c(32);
300
}

Expand Down
2 changes: 1 addition & 1 deletion cairo_programs/cairo-2-contracts/uint256_div_mod.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ mod TestUint256DivMod {
#[storage]
struct Storage {}

#[abi(embed_v0)]
#[external(v0)]
impl TestUint256DivMod of super::ITestUint256DivMod<ContractState> {
fn test_uint256_div_mod_max(ref self: ContractState) {
let a = BoundedInt::max();
Expand Down

0 comments on commit d3c9836

Please sign in to comment.