@evaafi/sdk 0.3.2 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,125 +1,160 @@
1
- import { Address, Contract, ContractProvider, Dictionary } from '@ton/core';
2
- import { UserData, UserLiteData } from '../types/User';
3
- import { parseUserData, parseUserLiteData } from '../api/parser';
4
- import { AssetConfig, ExtendedAssetData } from '../types/Master';
5
- import { LiquidationBaseData } from './MasterContract';
6
- import { ASSET_ID } from '../constants';
7
-
8
- /**
9
- * User contract wrapper
10
- */
11
- export class EvaaUser implements Contract {
12
- readonly address: Address;
13
- private lastSync = 0;
14
- private _liteData?: UserLiteData;
15
- private _data?: UserData;
16
-
17
- /**
18
- * Create user contract wrapper from address
19
- * @param address user contract address
20
- */
21
- static createFromAddress(address: Address) {
22
- return new EvaaUser(address);
23
- }
24
-
25
- private constructor(address: Address) {
26
- this.address = address;
27
- }
28
-
29
- async getSyncLite(
30
- provider: ContractProvider,
31
- assetsData: Dictionary<bigint, ExtendedAssetData>,
32
- assetsConfig: Dictionary<bigint, AssetConfig>,
33
- ) {
34
- const state = (await provider.getState()).state;
35
- if (state.type === 'active') {
36
- this._liteData = parseUserLiteData(state.data!.toString('base64url'), assetsData, assetsConfig);
37
- this.lastSync = Math.floor(Date.now() / 1000);
38
- } else {
39
- this._liteData = undefined;
40
- this._data = { type: 'inactive' };
41
- }
42
- }
43
-
44
- /**
45
- * Calculate full user data from lite data and prices
46
- * @param assetsData assets data
47
- * @param assetsConfig assets config
48
- * @param prices prices
49
- * @returns true if user data was calculated
50
- */
51
- calculateUserData(
52
- assetsData: Dictionary<bigint, ExtendedAssetData>,
53
- assetsConfig: Dictionary<bigint, AssetConfig>,
54
- prices: Dictionary<bigint, bigint>,
55
- ): boolean {
56
- if (this._liteData) {
57
- this._data = parseUserData(this._liteData, assetsData, assetsConfig, prices);
58
- return true;
59
- }
60
- return false;
61
- }
62
-
63
- async getSync(
64
- provider: ContractProvider,
65
- assetsData: Dictionary<bigint, ExtendedAssetData>,
66
- assetsConfig: Dictionary<bigint, AssetConfig>,
67
- prices: Dictionary<bigint, bigint>,
68
- ) {
69
- const state = (await provider.getState()).state;
70
- if (state.type === 'active') {
71
- this._liteData = parseUserLiteData(state.data!.toString('base64url'), assetsData, assetsConfig);
72
- this._data = parseUserData(this._liteData, assetsData, assetsConfig, prices);
73
- this.lastSync = Math.floor(Date.now() / 1000);
74
- } else {
75
- this._data = { type: 'inactive' };
76
- }
77
- }
78
-
79
- /**
80
- * Get user contract lite data
81
- * @returns user lite data if available, otherwise undefined
82
- */
83
- get liteData(): UserLiteData | undefined {
84
- return this._liteData;
85
- }
86
-
87
- /**
88
- * Get user contract full data
89
- * @returns user data if available , otherwise undefined
90
- */
91
- get data(): UserData | undefined {
92
- return this._data;
93
- }
94
-
95
- /**
96
- * Get if user is liquidable
97
- * @returns true if user is liquidable
98
- */
99
- get isLiquidable(): boolean {
100
- if (!this._data || this._data.type === 'inactive') {
101
- return false;
102
- }
103
-
104
- return this._data.liquidationData.liquidable;
105
- }
106
-
107
- /**
108
- * Get liquidation parameters for passing to liquidation message
109
- * @returns liquidation parameters if user is liquidable, otherwise undefined
110
- */
111
- get liquidationParameters(): LiquidationBaseData | undefined {
112
- if (!this._data || this._data.type === 'inactive' || !this._data.liquidationData.liquidable) {
113
- return undefined;
114
- }
115
-
116
- return {
117
- borrowerAddress: this._data.ownerAddress,
118
- loanAsset: this._data.liquidationData.greatestLoanAsset,
119
- collateralAsset: this._data.liquidationData.greatestCollateralAsset,
120
- minCollateralAmount: this._data.liquidationData.minCollateralAmount,
121
- liquidationAmount: this._data.liquidationData.liquidationAmount,
122
- tonLiquidation: this._data.liquidationData.greatestLoanAsset === ASSET_ID.TON,
123
- };
124
- }
125
- }
1
+ import { Address, beginCell, Cell, Contract, ContractProvider, Dictionary, Sender, SendMode } from '@ton/core';
2
+ import { UserData, UserLiteData } from '../types/User';
3
+ import { parseUserData, parseUserLiteData } from '../api/parser';
4
+ import { AssetConfig, ExtendedAssetData } from '../types/Master';
5
+ import { LiquidationBaseData } from './MasterContract';
6
+ import { MAINNET_ASSETS_ID, OPCODES } from '../constants';
7
+
8
+ /**
9
+ * User contract wrapper
10
+ */
11
+ export class EvaaUser implements Contract {
12
+ readonly address: Address;
13
+ readonly testnet: boolean = false;
14
+ private lastSync = 0;
15
+ private _liteData?: UserLiteData;
16
+ private _data?: UserData;
17
+
18
+ /**
19
+ * Create user contract wrapper from address
20
+ * @param address user contract address
21
+ * @param testnet testnet flag
22
+ */
23
+ static createFromAddress(address: Address, testnet: boolean = false) {
24
+ return new EvaaUser(address, testnet);
25
+ }
26
+
27
+ private constructor(address: Address, testnet: boolean = false) {
28
+ this.address = address;
29
+ this.testnet = testnet;
30
+ }
31
+
32
+ async getSyncLite(
33
+ provider: ContractProvider,
34
+ assetsData: Dictionary<bigint, ExtendedAssetData>,
35
+ assetsConfig: Dictionary<bigint, AssetConfig>,
36
+ ) {
37
+ const state = (await provider.getState()).state;
38
+ if (state.type === 'active') {
39
+ this._liteData = parseUserLiteData(
40
+ state.data!.toString('base64url'),
41
+ assetsData,
42
+ assetsConfig,
43
+ this.testnet,
44
+ );
45
+ this.lastSync = Math.floor(Date.now() / 1000);
46
+ } else {
47
+ this._liteData = undefined;
48
+ this._data = { type: 'inactive' };
49
+ }
50
+ }
51
+
52
+ /**
53
+ * Calculate full user data from lite data and prices
54
+ * @param assetsData assets data
55
+ * @param assetsConfig assets config
56
+ * @param prices prices
57
+ * @returns true if user data was calculated
58
+ */
59
+ calculateUserData(
60
+ assetsData: Dictionary<bigint, ExtendedAssetData>,
61
+ assetsConfig: Dictionary<bigint, AssetConfig>,
62
+ prices: Dictionary<bigint, bigint>,
63
+ ): boolean {
64
+ if (this._liteData) {
65
+ this._data = parseUserData(this._liteData, assetsData, assetsConfig, prices, this.testnet);
66
+ return true;
67
+ }
68
+ return false;
69
+ }
70
+
71
+ /**
72
+ * Open user contract wrapper
73
+ * @param forwardPayload - payload that will be forwarded to the address which requested the data
74
+ */
75
+ async sendOnchainGetter(
76
+ provider: ContractProvider,
77
+ via: Sender,
78
+ value: bigint,
79
+ queryID: bigint,
80
+ forwardPayload: Cell,
81
+ ) {
82
+ await provider.internal(via, {
83
+ value,
84
+ sendMode: SendMode.PAY_GAS_SEPARATELY + SendMode.IGNORE_ERRORS,
85
+ body: beginCell()
86
+ .storeCoins(BigInt(OPCODES.ONCHAIN_GETTER))
87
+ .storeUint(queryID, 64)
88
+ .storeRef(forwardPayload)
89
+ .endCell(),
90
+ });
91
+ }
92
+
93
+ async getSync(
94
+ provider: ContractProvider,
95
+ assetsData: Dictionary<bigint, ExtendedAssetData>,
96
+ assetsConfig: Dictionary<bigint, AssetConfig>,
97
+ prices: Dictionary<bigint, bigint>,
98
+ ) {
99
+ const state = (await provider.getState()).state;
100
+ if (state.type === 'active') {
101
+ this._liteData = parseUserLiteData(
102
+ state.data!.toString('base64url'),
103
+ assetsData,
104
+ assetsConfig,
105
+ this.testnet,
106
+ );
107
+ this._data = parseUserData(this._liteData, assetsData, assetsConfig, prices, this.testnet);
108
+ this.lastSync = Math.floor(Date.now() / 1000);
109
+ } else {
110
+ this._data = { type: 'inactive' };
111
+ }
112
+ }
113
+
114
+ /**
115
+ * Get user contract lite data
116
+ * @returns user lite data if available, otherwise undefined
117
+ */
118
+ get liteData(): UserLiteData | undefined {
119
+ return this._liteData;
120
+ }
121
+
122
+ /**
123
+ * Get user contract full data
124
+ * @returns user data if available , otherwise undefined
125
+ */
126
+ get data(): UserData | undefined {
127
+ return this._data;
128
+ }
129
+
130
+ /**
131
+ * Get if user is liquidable
132
+ * @returns true if user is liquidable
133
+ */
134
+ get isLiquidable(): boolean {
135
+ if (!this._data || this._data.type === 'inactive') {
136
+ return false;
137
+ }
138
+
139
+ return this._data.liquidationData.liquidable;
140
+ }
141
+
142
+ /**
143
+ * Get liquidation parameters for passing to liquidation message
144
+ * @returns liquidation parameters if user is liquidable, otherwise undefined
145
+ */
146
+ get liquidationParameters(): LiquidationBaseData | undefined {
147
+ if (!this._data || this._data.type === 'inactive' || !this._data.liquidationData.liquidable) {
148
+ return undefined;
149
+ }
150
+
151
+ return {
152
+ borrowerAddress: this._data.ownerAddress,
153
+ loanAsset: this._data.liquidationData.greatestLoanAsset,
154
+ collateralAsset: this._data.liquidationData.greatestCollateralAsset,
155
+ minCollateralAmount: this._data.liquidationData.minCollateralAmount,
156
+ liquidationAmount: this._data.liquidationData.liquidationAmount,
157
+ tonLiquidation: this._data.liquidationData.greatestLoanAsset === MAINNET_ASSETS_ID.TON,
158
+ };
159
+ }
160
+ }
package/src/index.ts CHANGED
@@ -1,78 +1,76 @@
1
- // Math
2
- export {
3
- mulFactor,
4
- mulDiv,
5
- bigIntMin,
6
- bigIntMax,
7
- calculatePresentValue,
8
- calculateCurrentRates,
9
- calculateAssetData,
10
- calculateAssetInterest,
11
- getAvailableToBorrow,
12
- presentValue,
13
- calculateLiquidationData,
14
- } from './api/math';
15
-
16
- // Parser
17
- export { createAssetData, createAssetConfig, parseMasterData, parseUserData } from './api/parser';
18
-
19
- // Prices
20
- export { getPrices } from './api/prices';
21
-
22
- // Contracts' wrappers
23
- export { JettonWallet } from './contracts/JettonWallet';
24
- export {
25
- EvaaParameters,
26
- JettonMessageParameters,
27
- TonSupplyParameters,
28
- JettonSupplyParameters,
29
- WithdrawParameters,
30
- LiquidationBaseData,
31
- TonLiquidationParameters,
32
- JettonLiquidationParameters,
33
- Evaa,
34
- } from './contracts/MasterContract';
35
- export { EvaaUser } from './contracts/UserContract';
36
-
37
- // Types
38
- export { PriceData } from './types/Common';
39
- export {
40
- UpgradeConfig,
41
- AssetConfig,
42
- MasterConfig,
43
- AssetData,
44
- AssetInterest,
45
- AssetApy,
46
- ExtendedAssetData,
47
- MasterData,
48
- } from './types/Master';
49
- export {
50
- BalanceType,
51
- UserBalance,
52
- UserLiqudationData,
53
- LiquidableData,
54
- NonLiquidableData,
55
- LiquidationData,
56
- UserDataInactive,
57
- UserDataActive,
58
- UserData,
59
- } from './types/User';
60
-
61
- // Constants
62
- export {
63
- EVAA_MASTER_MAINNET,
64
- MAINNET_VERSION,
65
- EVAA_MASTER_TESTNET,
66
- TESTNET_VERSION,
67
- ASSET_ID,
68
- JETTON_MASTER_ADDRESSES,
69
- MASTER_CONSTANTS,
70
- LENDING_CODE,
71
- JETTON_WALLET_CODE,
72
- OPCODES,
73
- FEES,
74
- } from './constants';
75
-
76
- // Utils
77
- export { getLastSentBoc, getTonConnectSender } from './utils/tonConnectSender';
78
- export { getUserJettonWallet } from './utils/userJettonWallet';
1
+ // Math
2
+ export {
3
+ mulFactor,
4
+ mulDiv,
5
+ bigIntMin,
6
+ bigIntMax,
7
+ calculatePresentValue,
8
+ calculateCurrentRates,
9
+ calculateAssetData,
10
+ calculateAssetInterest,
11
+ getAvailableToBorrow,
12
+ presentValue,
13
+ calculateLiquidationData,
14
+ } from './api/math';
15
+
16
+ // Parser
17
+ export { createAssetData, createAssetConfig, parseMasterData, parseUserData, parseUserLiteData } from './api/parser';
18
+
19
+ // Prices
20
+ export { getPrices } from './api/prices';
21
+
22
+ // Contracts' wrappers
23
+ export { JettonWallet } from './contracts/JettonWallet';
24
+ export {
25
+ EvaaParameters,
26
+ JettonMessageParameters,
27
+ TonSupplyParameters,
28
+ JettonSupplyParameters,
29
+ WithdrawParameters,
30
+ LiquidationBaseData,
31
+ TonLiquidationParameters,
32
+ JettonLiquidationParameters,
33
+ Evaa,
34
+ } from './contracts/MasterContract';
35
+ export { EvaaUser } from './contracts/UserContract';
36
+
37
+ // Types
38
+ export { PriceData } from './types/Common';
39
+ export {
40
+ UpgradeConfig,
41
+ AssetConfig,
42
+ MasterConfig,
43
+ AssetData,
44
+ AssetInterest,
45
+ AssetApy,
46
+ ExtendedAssetData,
47
+ MasterData,
48
+ } from './types/Master';
49
+ export {
50
+ BalanceType,
51
+ UserBalance,
52
+ UserLiqudationData,
53
+ LiquidableData,
54
+ NonLiquidableData,
55
+ LiquidationData,
56
+ UserDataInactive,
57
+ UserDataActive,
58
+ UserData,
59
+ } from './types/User';
60
+
61
+ // Constants
62
+ export {
63
+ EVAA_MASTER_MAINNET,
64
+ MAINNET_VERSION,
65
+ EVAA_MASTER_TESTNET,
66
+ TESTNET_VERSION,
67
+ JETTON_MASTER_ADDRESSES,
68
+ MASTER_CONSTANTS,
69
+ LENDING_CODE,
70
+ OPCODES,
71
+ FEES,
72
+ } from './constants';
73
+
74
+ // Utils
75
+ export { getLastSentBoc, getTonConnectSender } from './utils/tonConnectSender';
76
+ export { getUserJettonWallet } from './utils/userJettonWallet';
@@ -1,71 +1,72 @@
1
- import { Address, Cell, Dictionary } from '@ton/core';
2
-
3
- export type UpgradeConfig = {
4
- masterCodeVersion: number;
5
- userCodeVersion: number;
6
- timeout: number;
7
- updateTime: number;
8
- freezeTime: number;
9
- userCode: Cell;
10
- blankCode: Cell;
11
- newMasterCode: Cell | null;
12
- newUserCode: Cell | null;
13
- };
14
-
15
- export type AssetConfig = {
16
- oracle: bigint;
17
- decimals: bigint;
18
- collateralFactor: bigint;
19
- liquidationThreshold: bigint;
20
- liquidationBonus: bigint;
21
- baseBorrowRate: bigint;
22
- borrowRateSlopeLow: bigint;
23
- borrowRateSlopeHigh: bigint;
24
- supplyRateSlopeLow: bigint;
25
- supplyRateSlopeHigh: bigint;
26
- targetUtilization: bigint;
27
- originationFee: bigint;
28
- dust: bigint;
29
- };
30
-
31
- export type MasterConfig = {
32
- ifActive: number;
33
- admin: Address;
34
- adminPK: bigint;
35
- tokenKeys: Cell | null;
36
- walletToMaster: Cell | null;
37
- };
38
-
39
- export type AssetData = {
40
- sRate: bigint;
41
- bRate: bigint;
42
- totalSupply: bigint;
43
- totalBorrow: bigint;
44
- lastAccural: bigint;
45
- balance: bigint;
46
- };
47
-
48
- export type AssetInterest = {
49
- supplyInterest: bigint;
50
- borrowInterest: bigint;
51
- };
52
-
53
- export type AssetApy = {
54
- supplyApy: number;
55
- borrowApy: number;
56
- };
57
-
58
- export type ExtendedAssetData = AssetData & AssetInterest & AssetApy;
59
-
60
- export type MasterData = {
61
- meta: string;
62
- upgradeConfig: UpgradeConfig;
63
- masterConfig: MasterConfig;
64
- assetsConfig: Dictionary<bigint, AssetConfig>;
65
- assetsData: Dictionary<bigint, ExtendedAssetData>;
66
- assetsReserves: Dictionary<bigint, bigint>;
67
- apy: {
68
- supply: Dictionary<bigint, number>;
69
- borrow: Dictionary<bigint, number>;
70
- };
71
- };
1
+ import { Address, Cell, Dictionary } from '@ton/core';
2
+
3
+ export type UpgradeConfig = {
4
+ masterCodeVersion: number;
5
+ userCodeVersion: number;
6
+ timeout: number;
7
+ updateTime: number;
8
+ freezeTime: number;
9
+ userCode: Cell;
10
+ blankCode: Cell;
11
+ newMasterCode: Cell | null;
12
+ newUserCode: Cell | null;
13
+ };
14
+
15
+ export type AssetConfig = {
16
+ oracle: bigint;
17
+ decimals: bigint;
18
+ collateralFactor: bigint;
19
+ liquidationThreshold: bigint;
20
+ liquidationBonus: bigint;
21
+ baseBorrowRate: bigint;
22
+ borrowRateSlopeLow: bigint;
23
+ borrowRateSlopeHigh: bigint;
24
+ supplyRateSlopeLow: bigint;
25
+ supplyRateSlopeHigh: bigint;
26
+ targetUtilization: bigint;
27
+ originationFee: bigint;
28
+ dust: bigint;
29
+ maxTotalSupply: bigint;
30
+ };
31
+
32
+ export type MasterConfig = {
33
+ ifActive: number;
34
+ admin: Address;
35
+ adminPK: bigint;
36
+ tokenKeys: Cell | null;
37
+ walletToMaster: Cell | null;
38
+ };
39
+
40
+ export type AssetData = {
41
+ sRate: bigint;
42
+ bRate: bigint;
43
+ totalSupply: bigint;
44
+ totalBorrow: bigint;
45
+ lastAccural: bigint;
46
+ balance: bigint;
47
+ };
48
+
49
+ export type AssetInterest = {
50
+ supplyInterest: bigint;
51
+ borrowInterest: bigint;
52
+ };
53
+
54
+ export type AssetApy = {
55
+ supplyApy: number;
56
+ borrowApy: number;
57
+ };
58
+
59
+ export type ExtendedAssetData = AssetData & AssetInterest & AssetApy;
60
+
61
+ export type MasterData = {
62
+ meta: string;
63
+ upgradeConfig: UpgradeConfig;
64
+ masterConfig: MasterConfig;
65
+ assetsConfig: Dictionary<bigint, AssetConfig>;
66
+ assetsData: Dictionary<bigint, ExtendedAssetData>;
67
+ assetsReserves: Dictionary<bigint, bigint>;
68
+ apy: {
69
+ supply: Dictionary<bigint, number>;
70
+ borrow: Dictionary<bigint, number>;
71
+ };
72
+ };
@@ -1,52 +1,65 @@
1
- import { Address, beginCell, storeStateInit } from '@ton/core';
2
- import { ASSET_ID, JETTON_MASTER_ADDRESSES, JETTON_WALLET_CODE } from '../constants';
1
+ import { Address, beginCell, Cell, storeStateInit } from '@ton/core';
2
+ import { JETTON_MASTER_ADDRESSES, JETTON_WALLETS_CODE, MAINNET_ASSETS_ID } from '../constants';
3
3
 
4
4
  export function getUserJettonWallet(ownerAddress: Address, assetID: bigint, network: 'mainnet' | 'testnet'): Address {
5
5
  const builder = beginCell().storeCoins(0).storeAddress(ownerAddress);
6
+ let jettonWalletCode: Cell;
6
7
  switch (assetID) {
7
- case ASSET_ID.jUSDT:
8
+ case MAINNET_ASSETS_ID.jUSDT:
8
9
  if (network === 'mainnet') {
9
10
  builder.storeAddress(JETTON_MASTER_ADDRESSES.jUSDT_MAINNET);
11
+ jettonWalletCode = JETTON_WALLETS_CODE.jUSDT_MAINNET;
10
12
  } else {
11
13
  builder.storeAddress(JETTON_MASTER_ADDRESSES.jUSDT_TESTNET);
14
+ jettonWalletCode = JETTON_WALLETS_CODE.jUSDT_TESTNET;
12
15
  }
13
16
  break;
14
- case ASSET_ID.jUSDC:
17
+ case MAINNET_ASSETS_ID.jUSDC:
15
18
  if (network === 'mainnet') {
16
19
  builder.storeAddress(JETTON_MASTER_ADDRESSES.jUSDC_MAINNET);
20
+ jettonWalletCode = JETTON_WALLETS_CODE.jUSDC_MAINNET;
17
21
  } else {
18
22
  builder.storeAddress(JETTON_MASTER_ADDRESSES.jUSDC_TESTNET);
23
+ jettonWalletCode = JETTON_WALLETS_CODE.jUSDC_TESTNET;
19
24
  }
20
25
  break;
21
- case ASSET_ID.stTON:
26
+ case MAINNET_ASSETS_ID.stTON:
22
27
  if (network === 'mainnet') {
23
28
  builder.storeAddress(JETTON_MASTER_ADDRESSES.stTON_MAINNET);
29
+ jettonWalletCode = JETTON_WALLETS_CODE.stTON_MAINNET;
24
30
  } else {
25
31
  builder.storeAddress(JETTON_MASTER_ADDRESSES.stTON_TESTNET);
32
+ jettonWalletCode = JETTON_WALLETS_CODE.stTON_TESTNET;
26
33
  }
27
34
  break;
28
- case ASSET_ID.tsTON:
35
+ case MAINNET_ASSETS_ID.tsTON:
29
36
  if (network === 'mainnet') {
30
37
  builder.storeAddress(JETTON_MASTER_ADDRESSES.tsTON_MAINNET);
38
+ jettonWalletCode = JETTON_WALLETS_CODE.tsTON_MAINNET;
31
39
  } else {
32
- builder.storeAddress(JETTON_MASTER_ADDRESSES.tsTON_TESTNET);
40
+ // builder.storeAddress(JETTON_MASTER_ADDRESSES.tsTON_TESTNET);
41
+ // jettonWalletCode = JETTON_WALLETS_CODE.tsTON_TESTNET;
42
+ throw new Error('tsTON is not supported on testnet');
33
43
  }
34
44
  break;
35
- case ASSET_ID.USDT:
45
+ case MAINNET_ASSETS_ID.USDT:
36
46
  if (network === 'mainnet') {
37
47
  builder.storeAddress(JETTON_MASTER_ADDRESSES.USDT_MAINNET);
48
+ jettonWalletCode = JETTON_WALLETS_CODE.USDT_MAINNET;
38
49
  } else {
39
- builder.storeAddress(JETTON_MASTER_ADDRESSES.USDT_TESTNET);
50
+ // builder.storeAddress(JETTON_MASTER_ADDRESSES.USDT_TESTNET);
51
+ // jettonWalletCode = JETTON_WALLETS_CODE.USDT_TESTNET;
52
+ throw new Error('USDT is not supported on testnet');
40
53
  }
41
54
  break;
42
55
  default:
43
56
  throw new Error('Unsupported asset');
44
57
  }
45
- const data = builder.storeRef(JETTON_WALLET_CODE).endCell();
58
+ const data = builder.storeRef(jettonWalletCode).endCell();
46
59
  const stateInit = beginCell()
47
60
  .store(
48
61
  storeStateInit({
49
- code: JETTON_WALLET_CODE,
62
+ code: jettonWalletCode,
50
63
  data: data,
51
64
  }),
52
65
  )