Skip to content

Commit

Permalink
fifting
Browse files Browse the repository at this point in the history
  • Loading branch information
Skydev0h committed Dec 23, 2023
1 parent 395e226 commit e797be1
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 9 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
node_modules
temp
build
.idea
.idea
fift-lib
14 changes: 13 additions & 1 deletion contracts/task1.fc
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,16 @@ int get_seqno() method_id {

int get_execution_time() method_id {
return get_data().begin_parse().skip_bits(256).preload_uint(32);
}
}

() __deep_fifting__() impure asm
"@atend @ 1 { execute"
" current@ context@ current!"
" words {"
" }END>c B{0D4572726F723A204F48204E4F2C207468652066696674696E6720697320746F6F206465657021204168682121} B>$ abort "
" } : }END>c"
" current@ context! current!"
"} does @atend !"
;

() __do_deep_fifting__() { __deep_fifting__(); }
14 changes: 7 additions & 7 deletions contracts/task2.fc
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,12 @@ int equal_slices?(slice a, slice b) asm "SDEQ";
}

builder base = begin_cell()
.store_uint(0x18, 6)
.store_slice(jetton_address)
.store_coins(20000000) ;;
.store_uint(0, 1 + 4 + 4 + 64 + 32 + 1 + 1)
.store_uint(0x0f8a7ea5, 32)
.store_uint(query_id, 64); ;; query_id:uint64
.store_uint(0x18, 6)
.store_slice(jetton_address)
.store_coins(20000000) ;;
.store_uint(0, 1 + 4 + 4 + 64 + 32 + 1 + 1)
.store_uint(0x0f8a7ea5, 32)
.store_uint(0, 64); ;; query_id:uint64

do {

Expand All @@ -160,7 +160,7 @@ int equal_slices?(slice a, slice b) asm "SDEQ";
.store_coins(1) ;; forward_ton_amount:(VarUInteger 16)
.store_dict(null()) ;; forward_payload:(Either Cell ^Cell)
.end_cell(),
1);
0);

}
until(stk.null?());
Expand Down

0 comments on commit e797be1

Please sign in to comment.