File tree 1 file changed +20
-0
lines changed
src/pages/developers/chains
1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,13 @@ The `evm_recipient` specifies the address on ZetaChain that will receive the
22
22
deposited TON. This can be either an externally-owned account (EOA) or a
23
23
universal app address.
24
24
25
+ Here's an example of how to construct the deposit message in TypeScript:
26
+
27
+ ``` typescript
28
+ const opDeposit = 101 ;
29
+ const body = beginCell ().storeUint (opDeposit , 32 ).storeUint (0 , 64 ).storeUint (zevmRecipient , 160 ).endCell ();
30
+ ```
31
+
25
32
After the deposit is processed, the receiver receives the [ ZRC-20
26
33
version] ( /developers/tokens/zrc20 ) of the deposited TON.
27
34
@@ -44,5 +51,18 @@ The `evm_recipient` must be the address of a universal app contract.
44
51
The ` call_data ` cell contains the payload that will be passed to the ` onCall `
45
52
function of the universal app contract.
46
53
54
+ Here's an example of how to construct the deposit-and-call message in
55
+ TypeScript:
56
+
57
+ ``` typescript
58
+ const opDepositAndCall = 102 ;
59
+ const body = beginCell ()
60
+ .storeUint (opDepositAndCall , 32 )
61
+ .storeUint (0 , 64 )
62
+ .storeUint (zevmRecipient , 160 )
63
+ .storeRef (callDataCell ) // callDataCell should be a cell containing the payload
64
+ .endCell ();
65
+ ```
66
+
47
67
After the cross-chain transaction is processed, the ` onCall ` function of the
48
68
universal app contract is executed.
You can’t perform that action at this time.
0 commit comments