Skip to content

Commit

Permalink
fix jettonAmount
Browse files Browse the repository at this point in the history
  • Loading branch information
ndatg committed Nov 1, 2024
1 parent 890b80a commit e2b5914
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ await contract.sendTransfer({
body: contract.createTokenTransferBody({
toAddress: "EQA3wBIL7tklY8yBlNkErY2HDI9OKP5TbxoLVomYSLX1JlDe", // destination
responseAddress: "EQA3wBIL7tklY8yBlNkErY2HDI9OKP5TbxoLVomYSLX1JlDe", // sender address
jettonAmount: "1", // amount
jettonAmount: "1000000000", // 1 token amount (amount with 9 decimals)
forwardPayload: "test token transfer"
})
}),
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ton-highload-wallet-contract",
"version": "1.1.1",
"version": "1.1.2",
"description": "TON Highload Wallet Contract",
"main": "dist/index.js",
"files": [
Expand Down
2 changes: 1 addition & 1 deletion src/HighloadWallet.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ describe("HighloadWallet", () => {
// body: contract.createTokenTransferBody({
// toAddress: "EQA3wBIL7tklY8yBlNkErY2HDI9OKP5TbxoLVomYSLX1JlDe", // destination
// responseAddress: "EQA3wBIL7tklY8yBlNkErY2HDI9OKP5TbxoLVomYSLX1JlDe", // sender address
// jettonAmount: "1", // amount
// jettonAmount: "1000000000", // 1 token amount (amount with 9 decimals)
// forwardPayload: "test token transfer"
// })
// }),
Expand Down
2 changes: 1 addition & 1 deletion src/HighloadWallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export class HighloadWalletContract implements Contract {
const data = beginCell()
.storeUint(0xf8a7ea5, 32)
.storeUint(0, 64)
.storeCoins(toNano(args.jettonAmount))
.storeCoins(BigInt(args.jettonAmount))
.storeAddress(Address.parse(args.toAddress))
.storeAddress(Address.parse(args.responseAddress))
.storeBit(false)
Expand Down
2 changes: 1 addition & 1 deletion src/HighloadWalletV2.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ describe("HighloadWalletV2", () => {
// body: contract.createTokenTransferBody({
// toAddress: "EQA3wBIL7tklY8yBlNkErY2HDI9OKP5TbxoLVomYSLX1JlDe", // destination
// responseAddress: "EQA3wBIL7tklY8yBlNkErY2HDI9OKP5TbxoLVomYSLX1JlDe", // sender address
// jettonAmount: "1", // amount
// jettonAmount: "1000000000", // 1 token amount (amount with 9 decimals)
// forwardPayload: "test token transfer"
// })
// }),
Expand Down
2 changes: 1 addition & 1 deletion src/HighloadWalletV2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export class HighloadWalletContractV2 implements Contract {
const data = beginCell()
.storeUint(0xf8a7ea5, 32)
.storeUint(0, 64)
.storeCoins(toNano(args.jettonAmount))
.storeCoins(BigInt(args.jettonAmount))
.storeAddress(Address.parse(args.toAddress))
.storeAddress(Address.parse(args.responseAddress))
.storeBit(false)
Expand Down

0 comments on commit e2b5914

Please sign in to comment.