How is '(slice -> int) cast_to_S2I(cont c) asm "NOP";' works?
from Howard
hi all, I am trying to read more example in FunC:
since the template for payment channel here has these two lines I can't figure out
- how it works
- why we need it here
(slice -> int) cast_to_S2I(cont c) asm "NOP";
;; (slice, int) load_coins(slice s) asm( -> 1 0) "LDVARUINT16";
;; builder store_coins(builder b, int x) asm "STVARINT16";
forall X, Y, Z -> tuple t_triple(X x, Y y, Z z) asm "TRIPLE";
https://github.com/ton-blockchain/payment-channels/blob/e605580c3fb1feb22d80be9a0cddfcd05671c347/func/async-channel.func#L30
Can anyone answer this? and explaind those 2 for?
š Answer on TON Overflow
Mar 28, 2023, 2:48 AM