From 7b7d7e2863f6f642b47fa6787447215ac1ad99f5 Mon Sep 17 00:00:00 2001 From: MoonSeoHyeong <49308460+ddis1004@users.noreply.github.com> Date: Mon, 23 Sep 2024 16:53:03 +0900 Subject: [PATCH 1/2] Fixed JettonWallet.js Fixed parameter name. --- src/contract/token/ft/JettonWallet.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/contract/token/ft/JettonWallet.js b/src/contract/token/ft/JettonWallet.js index a20b7e5..bebf06b 100644 --- a/src/contract/token/ft/JettonWallet.js +++ b/src/contract/token/ft/JettonWallet.js @@ -17,13 +17,13 @@ class JettonWallet extends Contract { } /** - * @param params {{queryId?: number, jettonAmount: BN, toAddress: Address, responseAddress: Address, forwardAmount?: BN, forwardPayload?: Uint8Array | Cell}} + * @param params {{queryId?: number, tokenAmount: BN, toAddress: Address, responseAddress: Address, forwardAmount?: BN, forwardPayload?: Uint8Array | Cell}} */ async createTransferBody(params) { const cell = new Cell(); cell.bits.writeUint(0xf8a7ea5, 32); // request_transfer op cell.bits.writeUint(params.queryId || 0, 64); - cell.bits.writeCoins(params.jettonAmount); + cell.bits.writeCoins(params.tokenAmount); cell.bits.writeAddress(params.toAddress); cell.bits.writeAddress(params.responseAddress); cell.bits.writeBit(false); // null custom_payload From 774af46557fa3ea2d0c2e261867b18fe7319736b Mon Sep 17 00:00:00 2001 From: MoonSeoHyeong Date: Mon, 23 Sep 2024 18:44:00 +0900 Subject: [PATCH 2/2] Fixed JettonMinter.js --- src/contract/token/ft/JettonMinter.js | 4 ++-- src/contract/token/ft/JettonWallet.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/contract/token/ft/JettonMinter.js b/src/contract/token/ft/JettonMinter.js index 405f74f..220039d 100644 --- a/src/contract/token/ft/JettonMinter.js +++ b/src/contract/token/ft/JettonMinter.js @@ -30,7 +30,7 @@ class JettonMinter extends Contract { } /** - * params {{jettonAmount: BN, destination: Address, amount: BN, queryId?: number}} + * params {{tokenAmount: BN, destination: Address, amount: BN, queryId?: number}} * @return {Cell} */ createMintBody(params) { @@ -43,7 +43,7 @@ class JettonMinter extends Contract { const transferBody = new Cell(); // internal transfer transferBody.bits.writeUint(0x178d4519, 32); // internal_transfer op transferBody.bits.writeUint(params.queryId || 0, 64); - transferBody.bits.writeCoins(params.jettonAmount); + transferBody.bits.writeCoins(params.tokenAmount); transferBody.bits.writeAddress(null); // from_address transferBody.bits.writeAddress(null); // response_address transferBody.bits.writeCoins(new BN(0)); // forward_amount diff --git a/src/contract/token/ft/JettonWallet.js b/src/contract/token/ft/JettonWallet.js index bebf06b..0383512 100644 --- a/src/contract/token/ft/JettonWallet.js +++ b/src/contract/token/ft/JettonWallet.js @@ -44,13 +44,13 @@ class JettonWallet extends Contract { } /** - * @param params {{queryId?: number, jettonAmount: BN, responseAddress: Address}} + * @param params {{queryId?: number, tokenAmount: BN, responseAddress: Address}} */ async createBurnBody(params) { const cell = new Cell(); cell.bits.writeUint(0x595f07bc, 32); // burn op cell.bits.writeUint(params.queryId || 0, 64); - cell.bits.writeCoins(params.jettonAmount); + cell.bits.writeCoins(params.tokenAmount); cell.bits.writeAddress(params.responseAddress); return cell; }