Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/github_actions/peaceiris/actions-…
Browse files Browse the repository at this point in the history
…gh-pages-4
  • Loading branch information
lana-shanghai authored Apr 17, 2024
2 parents eba4bd9 + da119ae commit 64fb88b
Show file tree
Hide file tree
Showing 33 changed files with 27,530 additions and 62 deletions.
20 changes: 20 additions & 0 deletions cairo_programs/print_features/print_array.cairo
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
%builtins range_check

from starkware.cairo.common.alloc import alloc

func main{range_check_ptr: felt}() {
let name = 0x4b4b5254;
let (arr: felt*) = alloc();
assert arr[0] = 1;
assert arr[1] = 2;
assert arr[2] = 3;
assert arr[3] = 4;
assert arr[4] = 5;
let arr_len = 5;
%{
print(bytes.fromhex(f"{ids.name:062x}").decode().replace('\x00',''))
arr = [memory[ids.arr + i] for i in range(ids.arr_len)]
print(arr)
%}
return();
}
Loading

0 comments on commit 64fb88b

Please sign in to comment.