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

Re29066 #289

Open
wants to merge 33 commits into
base: update_contracts
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
253cb5c
add ton storage support in ton dns
Dec 29, 2022
00a08af
Change LICENSE to MIT
EmelyanenkoK Jan 14, 2023
9761af5
test-lockup
Jan 19, 2023
71065b1
0.0.60 - allow up to 4 transfers at once; transfer.seqno check - it m…
Feb 16, 2023
b550969
0.0.60 - allow up to 4 transfers at once; transfer.seqno check - it m…
Feb 16, 2023
52bef80
Improve jetton text comment example
EmelyanenkoK Mar 31, 2023
003ec1c
fix readme
rise1507 Jul 8, 2023
5aadf97
add vesting wallet
rise1507 Jul 21, 2023
8bb6c97
add vesting wallet
rise1507 Jul 22, 2023
7091e14
fix loadInt
rise1507 Jul 24, 2023
107168e
fix comment
rise1507 Jul 26, 2023
6c1b8cb
add transfer.getBody() method
rise1507 Jul 28, 2023
448ac6f
writeInt, writeUint checks
rise1507 Jul 31, 2023
171a6aa
0.0.62 - update vesting wallet code and vesting checks
rise1507 Aug 7, 2023
87f0334
Merge remote-tracking branch 'origin/master'
rise1507 Aug 9, 2023
944455d
fix Address.isUrlSafe
rise1507 Aug 17, 2023
48fac91
fix Cell.getMaxDepth recursion
rise1507 Feb 18, 2024
9b4817d
getBlockTransactions paging
rise1507 Feb 18, 2024
b0083f8
0.0.63 - build
rise1507 Feb 18, 2024
b6663d3
getBlockTransactions - improve naming and comments
rise1507 Feb 20, 2024
bc5b2f5
0.0.64 - cell forward_payload in jetton-wallet and nft-item
rise1507 Mar 1, 2024
c16d49e
types
rise1507 Mar 1, 2024
c2ba773
0.0.64
rise1507 Mar 1, 2024
424edad
HighloadQueryId.js
rise1507 Mar 28, 2024
ac411e4
highload-wallet
rise1507 Mar 28, 2024
31ce05c
0.0.65 build
rise1507 Mar 28, 2024
76dfd07
0.0.66 build
rise1507 Mar 28, 2024
e7e44df
Create label.yml
Re2906 Nov 21, 2024
13b2a54
Create webpack.yml
Re2906 Nov 23, 2024
975495d
Create wallet.js
Re2906 Nov 23, 2024
262b5e1
38dcab8530a88622f35f2224fbb52c110569896d
Re2906 Nov 27, 2024
95ac5a3
Create devcontainer.json
Re2906 Nov 27, 2024
715b398
Update devcontainer.json
Re2906 Nov 29, 2024
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
2 changes: 1 addition & 1 deletion dist/tonweb.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion 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": "tonweb",
"version": "0.0.63",
"version": "0.0.64",
"description": "TonWeb - JavaScript API for TON blockchain",
"main": "src/index.js",
"types": "dist/types/index.d.ts",
Expand Down
14 changes: 11 additions & 3 deletions src/contract/token/ft/JettonWallet.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class JettonWallet extends Contract {
}

/**
* @param params {{queryId?: number, jettonAmount: BN, toAddress: Address, responseAddress: Address, forwardAmount: BN, forwardPayload: Uint8Array}}
* @param params {{queryId?: number, jettonAmount: BN, toAddress: Address, responseAddress: Address, forwardAmount?: BN, forwardPayload?: Uint8Array | Cell}}
Re2906 marked this conversation as resolved.
Show resolved Hide resolved
*/
async createTransferBody(params) {
const cell = new Cell();
Expand All @@ -28,9 +28,17 @@ class JettonWallet extends Contract {
cell.bits.writeAddress(params.responseAddress);
cell.bits.writeBit(false); // null custom_payload
cell.bits.writeCoins(params.forwardAmount || new BN(0));
cell.bits.writeBit(false); // forward_payload in this slice, not separate cell
if (params.forwardPayload) {
cell.bits.writeBytes(params.forwardPayload);
if (params.forwardPayload.refs) { // is Cell
cell.bits.writeBit(true); // true Either - write forward_payload in separate cell
cell.refs.push(params.forwardPayload);
} else { // Uint8Array
cell.bits.writeBit(false); // false Either - write forward_payload in current slice
cell.bits.writeBytes(params.forwardPayload);
// todo: support write snake bytes
}
} else {
cell.bits.writeBit(false); // false Either for empty payload
}
return cell;
}
Expand Down
15 changes: 11 additions & 4 deletions src/contract/token/nft/NftItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class NftItem extends Contract {
}

/**
* @param params {{queryId?: number, newOwnerAddress: Address, forwardAmount?: BN, forwardPayload?: Uint8Array, responseAddress: Address}}
* @param params {{queryId?: number, newOwnerAddress: Address, forwardAmount?: BN, forwardPayload?: Uint8Array | Cell, responseAddress: Address}}
*/
async createTransferBody(params) {
const cell = new Cell();
Expand All @@ -70,10 +70,17 @@ class NftItem extends Contract {
cell.bits.writeAddress(params.responseAddress);
cell.bits.writeBit(false); // null custom_payload
cell.bits.writeCoins(params.forwardAmount || new BN(0));
cell.bits.writeBit(false); // forward_payload in this slice, not separate cell

if (params.forwardPayload) {
cell.bits.writeBytes(params.forwardPayload);
if (params.forwardPayload.refs) { // is Cell
cell.bits.writeBit(true); // true Either - write forward_payload in separate cell
cell.refs.push(params.forwardPayload);
} else { // Uint8Array
cell.bits.writeBit(false); // false Either - write forward_payload in current slice
cell.bits.writeBytes(params.forwardPayload);
// todo: support write snake bytes
}
} else {
cell.bits.writeBit(false); // false Either for empty payload
}
return cell;
}
Expand Down