Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed parameter name. #268

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/contract/token/ft/JettonMinter.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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
Expand Down
8 changes: 4 additions & 4 deletions src/contract/token/ft/JettonWallet.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
}
Expand Down