From 74539dc653fcd30645fc505e6988d6479d3daee6 Mon Sep 17 00:00:00 2001 From: ennucore Date: Wed, 18 Jan 2023 13:29:05 +0100 Subject: [PATCH] Wrote deployment and stuff --- build/cli.js | 32 ++ build/jetton-wallet.deploy.ts | 28 +- build/main.deploy.ts | 31 -- build/minter.deploy.ts | 38 +-- contracts/main.fc | 104 ------- contracts/main.tlb | 16 - contracts/main.ts | 100 +++++- contracts/minter.fc | 2 +- contracts/utils.ts | 31 ++ package-lock.json | 562 ++++++++++++++++++---------------- package.json | 16 +- test/helpers.ts | 30 +- 12 files changed, 486 insertions(+), 504 deletions(-) create mode 100644 build/cli.js delete mode 100644 build/main.deploy.ts delete mode 100644 contracts/main.fc delete mode 100644 contracts/main.tlb create mode 100644 contracts/utils.ts diff --git a/build/cli.js b/build/cli.js new file mode 100644 index 0000000..d066014 --- /dev/null +++ b/build/cli.js @@ -0,0 +1,32 @@ +const main = require('../contracts/main'); +const subcommand = require('subcommand'); +const {Address, SendMode, InternalMessage, CommonMessageInfo, StateInit, CellMessage} = require("ton"); +const {getWallet} = require("../contracts/main"); +const {sendInternalMessageWithWallet} = require("../contracts/utils"); + + +const argv = process.argv.slice(2); +let commands = [ + { + name: 'deposit', + options: [ + { + name: 'minter', + help: 'The jetton address' + }, + { + name: 'amount', + } + ], + command: async function deposit(args) { + let [walletContract, walletKey] = await getWallet(); + await sendInternalMessageWithWallet({ + walletContract, secretKey: walletKey.secretKey, value: (parseFloat(args._[1]) + 0.2) * main.TON(), to: Address.parse(args._[0]), + body: main.depositMsg((parseFloat(args._[1]) * main.TON())) + }) + } + } +] + +let match = subcommand(commands); +let opts = match(argv); \ No newline at end of file diff --git a/build/jetton-wallet.deploy.ts b/build/jetton-wallet.deploy.ts index e097b7c..14e6a45 100644 --- a/build/jetton-wallet.deploy.ts +++ b/build/jetton-wallet.deploy.ts @@ -1,31 +1,27 @@ import * as main from "../contracts/main"; -import { Address, toNano, TupleSlice, WalletContract } from "ton"; +import {Address, Cell, toNano, TupleSlice, WalletContract} from "ton"; +import { hex as jettonWalletCodeCell } from "../build/jetton-wallet.compiled.json"; +import { hex as minterCode } from "../build/minter.compiled.json"; import { sendInternalMessageWithWallet } from "../test/helpers"; +import {minterParams} from "./minter.deploy"; // return the init Cell of the contract storage (according to load_data() contract method) export function initData() { - return main.data({ - ownerAddress: Address.parseFriendly("EQCD39VS5jcptHL8vMjEXrzGaRcCVYto7HUn4bpAOg8xqB2N").address, - counter: 10, + let ownerAddress = Address.parse("EQD7zbEMaWC2yMgSJXmIF7HbLr1yuBo2GnZF_CJNkUiGSe32"); + let minterAddress = main.getMinterAddress(minterParams(), Cell.fromBoc(minterCode)[0]); + return main.walletData({ + balance: 0, + ownerAddress, + jettonMasterAddress: minterAddress, + jettonWalletCode: Cell.fromBoc(jettonWalletCodeCell)[0], }); } -// return the op that should be sent to the contract on deployment, can be "null" to send an empty message export function initMessage() { - return main.increment(); + return null; } // optional end-to-end sanity test for the actual on-chain contract to see it is actually working on-chain export async function postDeployTest(walletContract: WalletContract, secretKey: Buffer, contractAddress: Address) { - const call = await walletContract.client.callGetMethod(contractAddress, "counter"); - const counter = new TupleSlice(call.stack).readBigNumber(); - console.log(` # Getter 'counter' = ${counter.toString()}`); - const message = main.increment(); - await sendInternalMessageWithWallet({ walletContract, secretKey, to: contractAddress, value: toNano(0.02), body: message }); - console.log(` # Sent 'increment' op message`); - - const call2 = await walletContract.client.callGetMethod(contractAddress, "counter"); - const counter2 = new TupleSlice(call2.stack).readBigNumber(); - console.log(` # Getter 'counter' = ${counter2.toString()}`); } diff --git a/build/main.deploy.ts b/build/main.deploy.ts deleted file mode 100644 index e097b7c..0000000 --- a/build/main.deploy.ts +++ /dev/null @@ -1,31 +0,0 @@ -import * as main from "../contracts/main"; -import { Address, toNano, TupleSlice, WalletContract } from "ton"; -import { sendInternalMessageWithWallet } from "../test/helpers"; - -// return the init Cell of the contract storage (according to load_data() contract method) -export function initData() { - return main.data({ - ownerAddress: Address.parseFriendly("EQCD39VS5jcptHL8vMjEXrzGaRcCVYto7HUn4bpAOg8xqB2N").address, - counter: 10, - }); -} - -// return the op that should be sent to the contract on deployment, can be "null" to send an empty message -export function initMessage() { - return main.increment(); -} - -// optional end-to-end sanity test for the actual on-chain contract to see it is actually working on-chain -export async function postDeployTest(walletContract: WalletContract, secretKey: Buffer, contractAddress: Address) { - const call = await walletContract.client.callGetMethod(contractAddress, "counter"); - const counter = new TupleSlice(call.stack).readBigNumber(); - console.log(` # Getter 'counter' = ${counter.toString()}`); - - const message = main.increment(); - await sendInternalMessageWithWallet({ walletContract, secretKey, to: contractAddress, value: toNano(0.02), body: message }); - console.log(` # Sent 'increment' op message`); - - const call2 = await walletContract.client.callGetMethod(contractAddress, "counter"); - const counter2 = new TupleSlice(call2.stack).readBigNumber(); - console.log(` # Getter 'counter' = ${counter2.toString()}`); -} diff --git a/build/minter.deploy.ts b/build/minter.deploy.ts index e097b7c..a7789aa 100644 --- a/build/minter.deploy.ts +++ b/build/minter.deploy.ts @@ -1,31 +1,23 @@ import * as main from "../contracts/main"; -import { Address, toNano, TupleSlice, WalletContract } from "ton"; +import {Address, beginCell, Cell, toNano, TupleSlice, WalletContract} from "ton"; import { sendInternalMessageWithWallet } from "../test/helpers"; +import { hex as walletCode } from "../build/jetton-wallet.compiled.json"; +import {encodeOffChainContent} from "../contracts/main"; -// return the init Cell of the contract storage (according to load_data() contract method) -export function initData() { - return main.data({ - ownerAddress: Address.parseFriendly("EQCD39VS5jcptHL8vMjEXrzGaRcCVYto7HUn4bpAOg8xqB2N").address, - counter: 10, - }); +export function minterParams() { + return { + adminAddress: Address.parse("EQD7zbEMaWC2yMgSJXmIF7HbLr1yuBo2GnZF_CJNkUiGSe32"), + supply: 0, + content: encodeOffChainContent(""), + wallet_code: Cell.fromBoc(walletCode)[0], + }; } -// return the op that should be sent to the contract on deployment, can be "null" to send an empty message export function initMessage() { - return main.increment(); + return null; } -// optional end-to-end sanity test for the actual on-chain contract to see it is actually working on-chain -export async function postDeployTest(walletContract: WalletContract, secretKey: Buffer, contractAddress: Address) { - const call = await walletContract.client.callGetMethod(contractAddress, "counter"); - const counter = new TupleSlice(call.stack).readBigNumber(); - console.log(` # Getter 'counter' = ${counter.toString()}`); - - const message = main.increment(); - await sendInternalMessageWithWallet({ walletContract, secretKey, to: contractAddress, value: toNano(0.02), body: message }); - console.log(` # Sent 'increment' op message`); - - const call2 = await walletContract.client.callGetMethod(contractAddress, "counter"); - const counter2 = new TupleSlice(call2.stack).readBigNumber(); - console.log(` # Getter 'counter' = ${counter2.toString()}`); -} +// return the init Cell of the contract storage (according to load_data() contract method) +export function initData() { + return main.minterData(minterParams()); +} \ No newline at end of file diff --git a/contracts/main.fc b/contracts/main.fc deleted file mode 100644 index 65dc3dd..0000000 --- a/contracts/main.fc +++ /dev/null @@ -1,104 +0,0 @@ -#pragma version >=0.2.0; - -#include "imports/stdlib.fc"; -#include "imports/constants.fc"; -#include "imports/utils.fc"; - -;; =============== storage ============================= - -;; storage binary format is defined as TL-B in companion .tlb file - -(slice, int) load_data() inline { - var ds = get_data().begin_parse(); - return ( - ds~load_msg_addr(), ;; owner_address - ds~load_uint(64) ;; counter - ); -} - -() save_data(slice owner_address, int counter) impure inline { - set_data(begin_cell() - .store_slice(owner_address) - .store_uint(counter, 64) - .end_cell()); -} - -;; =============== messages ============================= - -;; message binary format is defined as TL-B in companion .tlb file - -() op_withdraw(int withdraw_amount, slice owner_address) impure; - -() recv_internal(int msg_value, cell in_msg, slice in_msg_body) impure { - ;; parse incoming internal message - slice cs = in_msg.begin_parse(); - int flags = cs~load_uint(4); ;; int_msg_info$0 ihr_disabled:Bool bounce:Bool bounced:Bool - slice sender_address = cs~load_msg_addr(); - - ;; handle bounced messages - if (flags & 1) { - return (); ;; ignore - } - - ;; load from contract storage - var (owner_address, counter) = load_data(); - - ;; handle operations - int op = in_msg_body~load_uint(32); - int query_id = in_msg_body~load_uint(64); - - if (op == op::increment) { - save_data(owner_address, counter + 1); - return (); - } - - if (op == op::deposit) { - ;; empty since ton received (msg_value) is added automatically to contract balance - ;; ~dump msg_value; ;; an example of debug output, requires running contract in debug mode - return (); - } - - if (op == op::withdraw) { - throw_unless(error::access_denied, equal_slices(sender_address, owner_address)); - int withdraw_amount = in_msg_body~load_coins(); - op_withdraw(withdraw_amount, owner_address); - return (); - } - - if (op == op::transfer_ownership) { - throw_unless(error::access_denied, equal_slices(sender_address, owner_address)); - slice new_owner_address = in_msg_body~load_msg_addr(); - save_data(new_owner_address, counter); - return (); - } - - throw(error::unknown_op); -} - -() op_withdraw(int withdraw_amount, slice owner_address) impure { - var [balance, _] = get_balance(); - throw_unless(error::insufficient_balance, balance >= withdraw_amount); - int return_value = min(withdraw_amount, balance - const::min_tons_for_storage); - send_grams(owner_address, return_value); -} - -;; =============== getters ============================= - -int meaning_of_life() method_id { - return 42; -} - -slice owner_address() method_id { - var (owner_address, _) = load_data(); - return owner_address; -} - -int counter() method_id { - var (_, counter) = load_data(); - return counter; -} - -int balance() method_id { - var [balance, _] = get_balance(); - return balance; -} diff --git a/contracts/main.tlb b/contracts/main.tlb deleted file mode 100644 index 12c10be..0000000 --- a/contracts/main.tlb +++ /dev/null @@ -1,16 +0,0 @@ -// https://ton.org/docs/#/overviews/TL-B -// base types defined in https://github.com/ton-blockchain/ton/blob/master/crypto/block/block.tlb - -// storage (according to save_data() contract method) - -storage#_ owner_address:MsgAddress counter:uint64 = Storage - -// ops - -increment query_id:uint64 = InternalMsgBody - -deposit query_id:uint64 = InternalMsgBody - -withdraw query_id:uint64 withdraw_amount:Grams = InternalMsgBody - -transfer_ownership query_id:uint64 new_owner_address:MsgAddress = InternalMsgBody diff --git a/contracts/main.ts b/contracts/main.ts index c1eac59..c3c2fcc 100644 --- a/contracts/main.ts +++ b/contracts/main.ts @@ -1,25 +1,101 @@ import BN from "bn.js"; -import { Cell, beginCell, Address } from "ton"; +import {Address, beginCell, Cell, contractAddress, TonClient, WalletContract, WalletV3R2Source} from "ton"; +import {mnemonicToWalletKey} from "ton-crypto"; // encode contract storage according to save_data() contract method -export function data(params: { ownerAddress: Address; counter: number }): Cell { - return beginCell().storeAddress(params.ownerAddress).storeUint(params.counter, 64).endCell(); +// storage#_ total_supply:Coins admin_address:MsgAddress next_admin_address:MsgAddress content:^Cell jetton_wallet_code:^Cell = Storage; +export function minterData(params: { adminAddress: Address; supply: number, nextAdminAddress?: Address, content: Cell, wallet_code: Cell }): Cell { + if (!params.nextAdminAddress) params.nextAdminAddress = params.adminAddress; + return beginCell() + .storeCoins(params.supply) + .storeAddress(params.adminAddress) + .storeAddress(params.nextAdminAddress) + .storeRef(params.content) + .storeRef(params.wallet_code) + .endCell(); } -// message encoders for all ops (see contracts/imports/constants.fc for consts) +function bufferToChunks(buff: Buffer, chunkSize: number) { + let chunks: Buffer[] = [] + while (buff.byteLength > 0) { + chunks.push(buff.slice(0, chunkSize)) + buff = buff.slice(chunkSize) + } + return chunks +} + +export function makeSnakeCell(data: Buffer) { + let chunks = bufferToChunks(data, 127) + let rootCell = new Cell() + let curCell = rootCell + + for (let i = 0; i < chunks.length; i++) { + let chunk = chunks[i] + + curCell.bits.writeBuffer(chunk) + + if (chunks[i + 1]) { + let nextCell = new Cell() + curCell.refs.push(nextCell) + curCell = nextCell + } + } + + return rootCell +} + +export function getMinterAddress(params: { adminAddress: Address; supply: number, nextAdminAddress?: Address, content: Cell, wallet_code: Cell }, initCodeCell: Cell): Address { + return contractAddress({workchain: 0, initialData: minterData(params), initialCode: initCodeCell}); +} + +const OFF_CHAIN_CONTENT_PREFIX = 0x01 -export function increment(): Cell { - return beginCell().storeUint(0x37491f2f, 32).storeUint(0, 64).endCell(); +export function encodeOffChainContent(content: string) { + let data = Buffer.from(content) + let offChainPrefix = Buffer.from([OFF_CHAIN_CONTENT_PREFIX]) + data = Buffer.concat([offChainPrefix, data]) + return makeSnakeCell(data) } -export function deposit(): Cell { - return beginCell().storeUint(0x47d54391, 32).storeUint(0, 64).endCell(); +// storage#_ balance:(VarUInteger 16) owner_address:MsgAddressInt jetton_master_address:MsgAddressInt jetton_wallet_code:^Cell = Storage; +export function walletData(params: { balance: number, ownerAddress: Address, jettonMasterAddress: Address, jettonWalletCode: Cell }): Cell { + return beginCell() + .storeUint(params.balance, 15) + .storeAddress(params.ownerAddress) + .storeAddress(params.jettonMasterAddress) + .storeRef(params.jettonWalletCode) + .endCell(); } -export function withdraw(params: { withdrawAmount: BN }): Cell { - return beginCell().storeUint(0x41836980, 32).storeUint(0, 64).storeCoins(params.withdrawAmount).endCell(); + +export function TON(): number { + return 1000000000; } -export function transferOwnership(params: { newOwnerAddress: Address }): Cell { - return beginCell().storeUint(0x2da38aaf, 32).storeUint(0, 64).storeAddress(params.newOwnerAddress).endCell(); +// message encoders for all ops (see contracts/imports/constants.fc for consts) + +export function depositMsg(amount: number): Cell { + return beginCell().storeUint(0x77a33521, 32) + .storeUint(0, 64).storeCoins(amount).endCell(); } + +export function withdrawMsg(params: { withdrawAmount: BN }): Cell { + return beginCell().storeUint(0x47d1895f, 32).storeUint(0, 64).storeCoins(params.withdrawAmount).endCell(); +} + +export async function getWallet(isTestnet: boolean = true) { + const client = new TonClient({ + endpoint: `https://${isTestnet ? "testnet." : ""}toncenter.com/api/v2/jsonRPC`, + apiKey: isTestnet ? 'bed2b4589201ff3c575be653593f912a337c08eed416b60b02345763b9ee9c36' : 'a1e8a1055a387515158589dc7e9bad3035e7db2b9f9ea5cdad6b727f71e328db' + }); + let deployerMnemonic = process.env.DEPLOYER_MNEMONIC; + if (!deployerMnemonic) throw new Error("DEPLOYER_MNEMONIC env var is not set"); + + // open the wallet and make sure it has enough TON + const walletKey = await mnemonicToWalletKey(deployerMnemonic.split(" ")); + let workchain = 0; + return [WalletContract.create(client, WalletV3R2Source.create({ + publicKey: walletKey.publicKey, + workchain + })), walletKey]; +} \ No newline at end of file diff --git a/contracts/minter.fc b/contracts/minter.fc index d8c3448..1949c6c 100644 --- a/contracts/minter.fc +++ b/contracts/minter.fc @@ -170,7 +170,7 @@ int deposit_gas_consumption() asm "35000000 PUSHINT"; ;; 0.035 TON } if (op == op::provide_wallet_address) { - throw_unless(75, msg_value > fwd_fee + const::provide_address_gas_consumption); + throw_unless(75, msg_value > fwd_fee + gas_consumption()); slice owner_address = in_msg_body~load_msg_addr(); int include_address? = in_msg_body~load_uint(1); diff --git a/contracts/utils.ts b/contracts/utils.ts new file mode 100644 index 0000000..8524718 --- /dev/null +++ b/contracts/utils.ts @@ -0,0 +1,31 @@ +import { Address, Cell, CellMessage, InternalMessage, CommonMessageInfo, WalletContract, SendMode, Wallet } from "ton"; +import BN from "bn.js"; + +// helper for end-to-end on-chain tests (normally post deploy) to allow sending InternalMessages to contracts using a wallet +export async function sendInternalMessageWithWallet(params: { walletContract: WalletContract; secretKey: Buffer; to: Address; value: BN; bounce?: boolean; body?: Cell }) { + const message = params.body ? new CellMessage(params.body) : undefined; + const seqno = await params.walletContract.getSeqNo(); + const transfer = params.walletContract.createTransfer({ + secretKey: params.secretKey, + seqno: seqno, + sendMode: SendMode.PAY_GAS_SEPARATLY + SendMode.IGNORE_ERRORS, + order: new InternalMessage({ + to: params.to, + value: params.value, + bounce: params.bounce ?? false, + body: new CommonMessageInfo({ + body: message, + }), + }), + }); + await params.walletContract.client.sendExternalMessage(params.walletContract, transfer); + for (let attempt = 0; attempt < 10; attempt++) { + await sleep(2000); + const seqnoAfter = await params.walletContract.getSeqNo(); + if (seqnoAfter > seqno) return; + } +} + +function sleep(ms: number) { + return new Promise((resolve) => setTimeout(resolve, ms)); +} diff --git a/package-lock.json b/package-lock.json index 9d3ba71..c330866 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,19 +1,22 @@ { - "name": "tonstarter-contracts", + "name": "bton", "version": "0.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { - "name": "tonstarter-contracts", + "name": "bton", "version": "0.0.0", "hasInstallScript": true, "license": "MIT", "dependencies": { - "semver": "^7.3.7" + "@tonconnect/protocol": "^2.0.1", + "semver": "^7.3.7", + "subcommand": "^2.1.1", + "ton-compiler": "^2.0.0" }, "devDependencies": { - "@swc/core": "^1.2.177", + "@swc/core": "^1.3.25", "@types/bn.js": "^5.1.0", "@types/chai": "^4.3.0", "@types/mocha": "^9.0.0", @@ -26,37 +29,53 @@ "mocha": "^9.1.3", "prando": "^6.0.1", "prettier": "^2.6.2", - "ton": "^12.1.3", + "ton": "^12.3.3", "ton-contract-executor": "^0.4.8", "ton-crypto": "^3.1.0", - "ts-node": "^10.4.0", + "ts-node": "^10.9.1", "typescript": "^4.5.4" }, "engines": { "node": ">=16.15.0" } }, - "node_modules/@cspotcode/source-map-consumer": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-consumer/-/source-map-consumer-0.8.0.tgz", - "integrity": "sha512-41qniHzTU8yAGbCp04ohlmSrZf8bkf/iJsl3V0dRGsQN/5GFfx+LbCSsCpp2gqrqjTVg/K6O8ycoV35JIwAzAg==", - "dev": true, - "engines": { - "node": ">= 12" - } - }, "node_modules/@cspotcode/source-map-support": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.7.0.tgz", - "integrity": "sha512-X4xqRHqN8ACt2aHVe51OxeA2HjbcL4MqFqXkrmQszJ1NOUuUu5u6Vqx/0lZSVNku7velL5FC/s5uEAj1lsBMhA==", + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", "dev": true, "dependencies": { - "@cspotcode/source-map-consumer": "0.8.0" + "@jridgewell/trace-mapping": "0.3.9" }, "engines": { "node": ">=12" } }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", + "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", + "dev": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -100,13 +119,11 @@ "hasInstallScript": true }, "node_modules/@swc/core": { - "version": "1.2.177", - "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.2.177.tgz", - "integrity": "sha512-fgLovM0xbqem4EIXXemvehEvvuFwQhYyOiOgUKtinPGGMdLr207O6sZBCiKfrr1+YI4ir83EFOUtzbiExpSh3g==", + "version": "1.3.27", + "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.3.27.tgz", + "integrity": "sha512-praRNgpeYGvwDIm/Cl6JU+yHMvwVraL0U6ejMgGyzvpcm1FVsZd1/EYXGqzbBJ0ALv7Gx4eK56h4GnwV6d4L0w==", "dev": true, - "bin": { - "swcx": "run_swcx.js" - }, + "hasInstallScript": true, "engines": { "node": ">=10" }, @@ -115,57 +132,22 @@ "url": "https://opencollective.com/swc" }, "optionalDependencies": { - "@swc/core-android-arm-eabi": "1.2.177", - "@swc/core-android-arm64": "1.2.177", - "@swc/core-darwin-arm64": "1.2.177", - "@swc/core-darwin-x64": "1.2.177", - "@swc/core-freebsd-x64": "1.2.177", - "@swc/core-linux-arm-gnueabihf": "1.2.177", - "@swc/core-linux-arm64-gnu": "1.2.177", - "@swc/core-linux-arm64-musl": "1.2.177", - "@swc/core-linux-x64-gnu": "1.2.177", - "@swc/core-linux-x64-musl": "1.2.177", - "@swc/core-win32-arm64-msvc": "1.2.177", - "@swc/core-win32-ia32-msvc": "1.2.177", - "@swc/core-win32-x64-msvc": "1.2.177" - } - }, - "node_modules/@swc/core-android-arm-eabi": { - "version": "1.2.177", - "resolved": "https://registry.npmjs.org/@swc/core-android-arm-eabi/-/core-android-arm-eabi-1.2.177.tgz", - "integrity": "sha512-jfdBSpDrrDLnI+bpwOUsl7UTjB7ZDQC5tIiNGErWgKSFOHxP31PSBe7S0HxfDKsGZF1THeWpsLG6oE8frbxDtA==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-android-arm64": { - "version": "1.2.177", - "resolved": "https://registry.npmjs.org/@swc/core-android-arm64/-/core-android-arm64-1.2.177.tgz", - "integrity": "sha512-Fm4kI6OsL/NeXOQ09ao1RqJ0cgMRj8BqDV6odw4AmTgyzVi7/XlbxhDOsdyILNwNJTnFRW3FAWl71jqc4o0+ZA==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=10" + "@swc/core-darwin-arm64": "1.3.27", + "@swc/core-darwin-x64": "1.3.27", + "@swc/core-linux-arm-gnueabihf": "1.3.27", + "@swc/core-linux-arm64-gnu": "1.3.27", + "@swc/core-linux-arm64-musl": "1.3.27", + "@swc/core-linux-x64-gnu": "1.3.27", + "@swc/core-linux-x64-musl": "1.3.27", + "@swc/core-win32-arm64-msvc": "1.3.27", + "@swc/core-win32-ia32-msvc": "1.3.27", + "@swc/core-win32-x64-msvc": "1.3.27" } }, "node_modules/@swc/core-darwin-arm64": { - "version": "1.2.177", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.2.177.tgz", - "integrity": "sha512-deCWJoR9/wZ9uFBesbOmloBOMI+ZmiEK9Xk1U89v9Zi7tjQL8xpTARx5HhREQGTy0kSZ2ZX0soWBDpIENfYJRA==", + "version": "1.3.27", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.3.27.tgz", + "integrity": "sha512-IKlxkhEy99CnP9nduaf5IJWIFcr6D5cZCjYmCs7nWkjMV+aAieyDO9AX4LT8AcHy6CF7ByOX7SKoqk+gVMAaKw==", "cpu": [ "arm64" ], @@ -179,9 +161,9 @@ } }, "node_modules/@swc/core-darwin-x64": { - "version": "1.2.177", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.2.177.tgz", - "integrity": "sha512-WnRapP45QVzuQsjOtVnWi7R0t7vL5CCBPGPDKYUjhcgMHUjaMrZqkhFGUdFap6T5/iCzNta8nyo1LkPr/N4Z7Q==", + "version": "1.3.27", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.3.27.tgz", + "integrity": "sha512-MtabZIhFf/dL3vs6UMbd+vJsjIkm2NaFqulGV0Jofy2bfVZPTj/b5pXeOlUsTWy7JcH1uixjdx4RvJRyvqJxQA==", "cpu": [ "x64" ], @@ -194,26 +176,10 @@ "node": ">=10" } }, - "node_modules/@swc/core-freebsd-x64": { - "version": "1.2.177", - "resolved": "https://registry.npmjs.org/@swc/core-freebsd-x64/-/core-freebsd-x64-1.2.177.tgz", - "integrity": "sha512-77qdVKNRfo0z+IyQopOIWjTvYiRogcDEg6WLz2CiSMLpzH0gK+/xnT6vpB314+v1CxaLz5zx/gVrTa9sbZai6g==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=10" - } - }, "node_modules/@swc/core-linux-arm-gnueabihf": { - "version": "1.2.177", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.2.177.tgz", - "integrity": "sha512-COEPGMwR7tRTt/VhIY0t6h3P8keaAGUVw4lfQQq9acW0X9pZTiHwNi/HkdfeIJkhxuWS7e9uski1mCKYEaDtPw==", + "version": "1.3.27", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.3.27.tgz", + "integrity": "sha512-XELMoGcUTAkk+G4buwIIhu6AIr1U418Odt22HUW8+ZvV+Wty2ICgR/myOIhM3xMb6U2L8ay+evMqoVNMQ0RRTg==", "cpu": [ "arm" ], @@ -227,9 +193,9 @@ } }, "node_modules/@swc/core-linux-arm64-gnu": { - "version": "1.2.177", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.2.177.tgz", - "integrity": "sha512-VsMQbCqWXtp7NpZityOujJGBbU5wMEn/viX3DNyp/wKIvbKWgCFwV+v8VN4T5zgX0R9ZE5SKBOHxyA1nvGIhig==", + "version": "1.3.27", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.3.27.tgz", + "integrity": "sha512-O6vtT6bnrVR9PzEIuA5U7tIfYo7bv97H9K9Vqy2oyHNeGN0H36DKwS4UqPreHtziXNF5+7ubdUYUkrG/j8UnUQ==", "cpu": [ "arm64" ], @@ -243,9 +209,9 @@ } }, "node_modules/@swc/core-linux-arm64-musl": { - "version": "1.2.177", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.2.177.tgz", - "integrity": "sha512-RolytMUsaekieimltreoldf6yYOKjIZ6/O37OtPAdepEmg9b7R69EVjXRS9GEfqHTNtty9riskc5+N9bOu2NXQ==", + "version": "1.3.27", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.3.27.tgz", + "integrity": "sha512-Oa0E1i7dOTWpaEZumKoNbTE/Ap+da6nlhqKVUdYrFDrOBi25tz76SdxZIyvAszzmgY89b5yd1naourKmkPXpww==", "cpu": [ "arm64" ], @@ -259,9 +225,9 @@ } }, "node_modules/@swc/core-linux-x64-gnu": { - "version": "1.2.177", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.2.177.tgz", - "integrity": "sha512-kBj91kNio+7jTC2C9T71O7oYuZyllOTc/Bk6kbwIR5g5cmhi3uRCkdatQlyAcxoY1NGClocW6v49Fmm7EB7sQg==", + "version": "1.3.27", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.3.27.tgz", + "integrity": "sha512-S3v9H8oL2a8Ur6AjQyhkC6HfBVPOxKMdBhcZmdNuVgEUHbHdbf/Lka85F9IOYXEarMn0FtQw3ywowS22O9L5Uw==", "cpu": [ "x64" ], @@ -275,9 +241,9 @@ } }, "node_modules/@swc/core-linux-x64-musl": { - "version": "1.2.177", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.2.177.tgz", - "integrity": "sha512-yO3PqvctMqypIz9GrxHUlbPegrRKOyaVaPQZ/L/u9b1Bo7lUzE83covV7xfGgIy6KGCescVKmv39eO1G5AaLjA==", + "version": "1.3.27", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.3.27.tgz", + "integrity": "sha512-6DDkdXlOADpwICFZTRphCR+cIeS8aEYh4NlyzBito0mOWwIIdfCgALzhkTQOzTOkcD42bP97CIoZ97hqV/puOg==", "cpu": [ "x64" ], @@ -291,9 +257,9 @@ } }, "node_modules/@swc/core-win32-arm64-msvc": { - "version": "1.2.177", - "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.2.177.tgz", - "integrity": "sha512-JjIOlPaMje/WMkY1PpYZccF9jWeBzyaZ0/BlWMhQtSYD9h5ZHkYDyQdAZOkDPrru0ZRsDMc/+ue7um2FQwXs/A==", + "version": "1.3.27", + "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.3.27.tgz", + "integrity": "sha512-baxfH4AbEcaTNo08wxV0W6hiMXwVCxPS4qc0amHpXPti92unvSqeDR1W3C9GjHqzXlWtmCRsq8Ww1pal6ZVLrw==", "cpu": [ "arm64" ], @@ -307,9 +273,9 @@ } }, "node_modules/@swc/core-win32-ia32-msvc": { - "version": "1.2.177", - "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.2.177.tgz", - "integrity": "sha512-G+QvvNSrvIwQ6CO4TPc9q060V2RUYhj1Y1FVdoiyXfRDwY4cIv6XAlK7qp1+alX4VFpxIl8EYKoKjdZWBPcHww==", + "version": "1.3.27", + "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.3.27.tgz", + "integrity": "sha512-7iLJnH71k5qCwxv9NcM/P7nIEzTsC7r1sIiQW6bu+CpC8qZvwl0PS+XvQRlLly2gCZM+Le98tksYG14MEh+Hrw==", "cpu": [ "ia32" ], @@ -323,9 +289,9 @@ } }, "node_modules/@swc/core-win32-x64-msvc": { - "version": "1.2.177", - "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.2.177.tgz", - "integrity": "sha512-88RpWLPSJmqUZCmIfyiybfJa+GpVp5CyBd/InK+wiYw7IpcUndSX21KeU7IeGSZvPp0T4GKvRdwK5O+Xd6fFsg==", + "version": "1.3.27", + "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.3.27.tgz", + "integrity": "sha512-mFM907PDw/jrQ44+TRjIVGEOy2Mu06mMMz0HPMFuRsBzl5t0Kajp3vmn8FkkpS9wH5982VPi6hPYVTb7QJo5Qg==", "cpu": [ "x64" ], @@ -346,6 +312,14 @@ "optional": true, "peer": true }, + "node_modules/@tonconnect/protocol": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@tonconnect/protocol/-/protocol-2.0.1.tgz", + "integrity": "sha512-jkSj6EKjIlHnJxrtxdlO7KqVJe41yrIgqamGZiqziKH6iwx0m9YyKvuIREd6CmWY2jbsev3BvBWqPp9KH6HrRw==", + "dependencies": { + "tweetnacl-util": "^0.15.1" + } + }, "node_modules/@tsconfig/node10": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.8.tgz", @@ -532,8 +506,7 @@ "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, "node_modules/binary-extensions": { "version": "2.2.0", @@ -554,7 +527,6 @@ "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -682,6 +654,11 @@ "fsevents": "~2.3.2" } }, + "node_modules/cliclopts": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/cliclopts/-/cliclopts-1.1.1.tgz", + "integrity": "sha512-dJk8y+TJmOy9Kqha0aWN0rwM5E5EQCVjhl2GTz1CrkqzxkQZ26/hyrNmy7lwePdZc4iNcdHL1tTdcIBeNQhmww==" + }, "node_modules/cliui": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", @@ -714,8 +691,7 @@ "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, "node_modules/create-require": { "version": "1.1.1", @@ -733,7 +709,6 @@ "version": "4.3.3", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", - "dev": true, "dependencies": { "ms": "2.1.2" }, @@ -749,8 +724,7 @@ "node_modules/debug/node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "node_modules/decamelize": { "version": "4.0.0", @@ -932,8 +906,7 @@ "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, "node_modules/fsevents": { "version": "2.3.2", @@ -971,7 +944,6 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", - "dev": true, "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -1003,7 +975,6 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, "dependencies": { "brace-expansion": "^1.1.7" }, @@ -1042,7 +1013,6 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, "dependencies": { "once": "^1.3.0", "wrappy": "1" @@ -1051,8 +1021,7 @@ "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "node_modules/io-ts": { "version": "2.2.16", @@ -1276,6 +1245,14 @@ "node": ">=10" } }, + "node_modules/minimist": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz", + "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/mocha": { "version": "9.2.2", "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.2.2.tgz", @@ -1370,7 +1347,6 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, "dependencies": { "wrappy": "1" } @@ -1418,7 +1394,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -1535,7 +1510,6 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, "dependencies": { "glob": "^7.1.3" }, @@ -1663,6 +1637,16 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/subcommand": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/subcommand/-/subcommand-2.1.1.tgz", + "integrity": "sha512-cm7TQq9I8dA5LKUr+r8W7RzQlLsmTdCr6wXmjYueOoh/bQu55ODEw7GFhT42pUyoaLtO2rgmx1+8cSIjY9lR9g==", + "dependencies": { + "cliclopts": "^1.1.0", + "debug": "^4.1.1", + "minimist": "^1.2.0" + } + }, "node_modules/supports-color": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", @@ -1694,7 +1678,6 @@ "version": "0.2.1", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", "integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==", - "dev": true, "dependencies": { "rimraf": "^3.0.0" }, @@ -1715,9 +1698,9 @@ } }, "node_modules/ton": { - "version": "12.1.3", - "resolved": "https://registry.npmjs.org/ton/-/ton-12.1.3.tgz", - "integrity": "sha512-ZkXyr2UkYEQfCX5QKY9xQfzLyM4MDZE+Lz7RICr74wS3fwk5lkJ1/KrQZqb2/DwtoBonEaiNjm6x+r86Q8peFA==", + "version": "12.3.3", + "resolved": "https://registry.npmjs.org/ton/-/ton-12.3.3.tgz", + "integrity": "sha512-5vwy7bwuUgOY7Injqi5Ei+Opsr9AjcS4qHzzdiUdt51O2W9oz4LE/GREXuv7Uvxsxev4cWXx0sic0ohfR8Yu4g==", "dev": true, "dependencies": { "axios": "^0.25.0", @@ -1734,25 +1717,21 @@ } }, "node_modules/ton-compiler": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/ton-compiler/-/ton-compiler-0.9.0.tgz", - "integrity": "sha512-7ZyjmSSmI8s/hd+H3c8qCzvUxDWLml4T8Lhr3DNAucadWhAXiVniTgPHHQNt5nbfZMvHKGevGw18pRkf5cFBZA==", - "dev": true, + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ton-compiler/-/ton-compiler-2.1.1.tgz", + "integrity": "sha512-IE4oqSw3P6O/U1w09oKWSI2uDbm6uR2PgWSRtgtKBMI2qmdR0Icrx4TSt7lq3WlZ5vUHKN/DEO0KolpCOY0+OA==", "dependencies": { "arg": "^5.0.1", "tmp": "^0.2.1" }, "bin": { - "fift": "bin/fift", - "func": "bin/func", "ton-compiler": "bin/ton-compiler" } }, "node_modules/ton-compiler/node_modules/arg": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.1.tgz", - "integrity": "sha512-e0hDa9H2Z9AwFkk2qDlwhoMYE4eToKarchkQHovNdLTCYMHZHeRjI71crOh+dio4K6u1IcwubQqo79Ga4CyAQA==", - "dev": true + "integrity": "sha512-e0hDa9H2Z9AwFkk2qDlwhoMYE4eToKarchkQHovNdLTCYMHZHeRjI71crOh+dio4K6u1IcwubQqo79Ga4CyAQA==" }, "node_modules/ton-contract-executor": { "version": "0.4.8", @@ -1765,6 +1744,12 @@ "ton-compiler": "^0.9.0" } }, + "node_modules/ton-contract-executor/node_modules/arg": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", + "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==", + "dev": true + }, "node_modules/ton-contract-executor/node_modules/ton": { "version": "9.9.0", "resolved": "https://registry.npmjs.org/ton/-/ton-9.9.0.tgz", @@ -1784,6 +1769,21 @@ "tweetnacl": "1.0.3" } }, + "node_modules/ton-contract-executor/node_modules/ton-compiler": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/ton-compiler/-/ton-compiler-0.9.0.tgz", + "integrity": "sha512-7ZyjmSSmI8s/hd+H3c8qCzvUxDWLml4T8Lhr3DNAucadWhAXiVniTgPHHQNt5nbfZMvHKGevGw18pRkf5cFBZA==", + "dev": true, + "dependencies": { + "arg": "^5.0.1", + "tmp": "^0.2.1" + }, + "bin": { + "fift": "bin/fift", + "func": "bin/func", + "ton-compiler": "bin/ton-compiler" + } + }, "node_modules/ton-contract-executor/node_modules/ton-crypto": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/ton-crypto/-/ton-crypto-2.1.0.tgz", @@ -1827,12 +1827,12 @@ } }, "node_modules/ts-node": { - "version": "10.7.0", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.7.0.tgz", - "integrity": "sha512-TbIGS4xgJoX2i3do417KSaep1uRAW/Lu+WAL2doDHC0D6ummjirVOXU5/7aiZotbQ5p1Zp9tP7U6cYhA0O7M8A==", + "version": "10.9.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", + "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", "dev": true, "dependencies": { - "@cspotcode/source-map-support": "0.7.0", + "@cspotcode/source-map-support": "^0.8.0", "@tsconfig/node10": "^1.0.7", "@tsconfig/node12": "^1.0.7", "@tsconfig/node14": "^1.0.0", @@ -1843,7 +1843,7 @@ "create-require": "^1.1.0", "diff": "^4.0.1", "make-error": "^1.1.1", - "v8-compile-cache-lib": "^3.0.0", + "v8-compile-cache-lib": "^3.0.1", "yn": "3.1.1" }, "bin": { @@ -1884,6 +1884,11 @@ "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==", "dev": true }, + "node_modules/tweetnacl-util": { + "version": "0.15.1", + "resolved": "https://registry.npmjs.org/tweetnacl-util/-/tweetnacl-util-0.15.1.tgz", + "integrity": "sha512-RKJBIj8lySrShN4w6i/BonWp2Z/uxwC3h4y7xsRrpP59ZboCd0GpEVsOnMDYLMmKBpYhb5TgHzZXy7wTfYFBRw==" + }, "node_modules/type-detect": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", @@ -1953,8 +1958,7 @@ "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, "node_modules/y18n": { "version": "5.0.8", @@ -2035,19 +2039,35 @@ } }, "dependencies": { - "@cspotcode/source-map-consumer": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-consumer/-/source-map-consumer-0.8.0.tgz", - "integrity": "sha512-41qniHzTU8yAGbCp04ohlmSrZf8bkf/iJsl3V0dRGsQN/5GFfx+LbCSsCpp2gqrqjTVg/K6O8ycoV35JIwAzAg==", + "@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "requires": { + "@jridgewell/trace-mapping": "0.3.9" + } + }, + "@jridgewell/resolve-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", + "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", "dev": true }, - "@cspotcode/source-map-support": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.7.0.tgz", - "integrity": "sha512-X4xqRHqN8ACt2aHVe51OxeA2HjbcL4MqFqXkrmQszJ1NOUuUu5u6Vqx/0lZSVNku7velL5FC/s5uEAj1lsBMhA==", + "@jridgewell/sourcemap-codec": { + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", + "dev": true + }, + "@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", "dev": true, "requires": { - "@cspotcode/source-map-consumer": "0.8.0" + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" } }, "@nodelib/fs.scandir": { @@ -2083,114 +2103,90 @@ "dev": true }, "@swc/core": { - "version": "1.2.177", - "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.2.177.tgz", - "integrity": "sha512-fgLovM0xbqem4EIXXemvehEvvuFwQhYyOiOgUKtinPGGMdLr207O6sZBCiKfrr1+YI4ir83EFOUtzbiExpSh3g==", - "dev": true, - "requires": { - "@swc/core-android-arm-eabi": "1.2.177", - "@swc/core-android-arm64": "1.2.177", - "@swc/core-darwin-arm64": "1.2.177", - "@swc/core-darwin-x64": "1.2.177", - "@swc/core-freebsd-x64": "1.2.177", - "@swc/core-linux-arm-gnueabihf": "1.2.177", - "@swc/core-linux-arm64-gnu": "1.2.177", - "@swc/core-linux-arm64-musl": "1.2.177", - "@swc/core-linux-x64-gnu": "1.2.177", - "@swc/core-linux-x64-musl": "1.2.177", - "@swc/core-win32-arm64-msvc": "1.2.177", - "@swc/core-win32-ia32-msvc": "1.2.177", - "@swc/core-win32-x64-msvc": "1.2.177" - } - }, - "@swc/core-android-arm-eabi": { - "version": "1.2.177", - "resolved": "https://registry.npmjs.org/@swc/core-android-arm-eabi/-/core-android-arm-eabi-1.2.177.tgz", - "integrity": "sha512-jfdBSpDrrDLnI+bpwOUsl7UTjB7ZDQC5tIiNGErWgKSFOHxP31PSBe7S0HxfDKsGZF1THeWpsLG6oE8frbxDtA==", - "dev": true, - "optional": true - }, - "@swc/core-android-arm64": { - "version": "1.2.177", - "resolved": "https://registry.npmjs.org/@swc/core-android-arm64/-/core-android-arm64-1.2.177.tgz", - "integrity": "sha512-Fm4kI6OsL/NeXOQ09ao1RqJ0cgMRj8BqDV6odw4AmTgyzVi7/XlbxhDOsdyILNwNJTnFRW3FAWl71jqc4o0+ZA==", + "version": "1.3.27", + "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.3.27.tgz", + "integrity": "sha512-praRNgpeYGvwDIm/Cl6JU+yHMvwVraL0U6ejMgGyzvpcm1FVsZd1/EYXGqzbBJ0ALv7Gx4eK56h4GnwV6d4L0w==", "dev": true, - "optional": true + "requires": { + "@swc/core-darwin-arm64": "1.3.27", + "@swc/core-darwin-x64": "1.3.27", + "@swc/core-linux-arm-gnueabihf": "1.3.27", + "@swc/core-linux-arm64-gnu": "1.3.27", + "@swc/core-linux-arm64-musl": "1.3.27", + "@swc/core-linux-x64-gnu": "1.3.27", + "@swc/core-linux-x64-musl": "1.3.27", + "@swc/core-win32-arm64-msvc": "1.3.27", + "@swc/core-win32-ia32-msvc": "1.3.27", + "@swc/core-win32-x64-msvc": "1.3.27" + } }, "@swc/core-darwin-arm64": { - "version": "1.2.177", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.2.177.tgz", - "integrity": "sha512-deCWJoR9/wZ9uFBesbOmloBOMI+ZmiEK9Xk1U89v9Zi7tjQL8xpTARx5HhREQGTy0kSZ2ZX0soWBDpIENfYJRA==", + "version": "1.3.27", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.3.27.tgz", + "integrity": "sha512-IKlxkhEy99CnP9nduaf5IJWIFcr6D5cZCjYmCs7nWkjMV+aAieyDO9AX4LT8AcHy6CF7ByOX7SKoqk+gVMAaKw==", "dev": true, "optional": true }, "@swc/core-darwin-x64": { - "version": "1.2.177", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.2.177.tgz", - "integrity": "sha512-WnRapP45QVzuQsjOtVnWi7R0t7vL5CCBPGPDKYUjhcgMHUjaMrZqkhFGUdFap6T5/iCzNta8nyo1LkPr/N4Z7Q==", - "dev": true, - "optional": true - }, - "@swc/core-freebsd-x64": { - "version": "1.2.177", - "resolved": "https://registry.npmjs.org/@swc/core-freebsd-x64/-/core-freebsd-x64-1.2.177.tgz", - "integrity": "sha512-77qdVKNRfo0z+IyQopOIWjTvYiRogcDEg6WLz2CiSMLpzH0gK+/xnT6vpB314+v1CxaLz5zx/gVrTa9sbZai6g==", + "version": "1.3.27", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.3.27.tgz", + "integrity": "sha512-MtabZIhFf/dL3vs6UMbd+vJsjIkm2NaFqulGV0Jofy2bfVZPTj/b5pXeOlUsTWy7JcH1uixjdx4RvJRyvqJxQA==", "dev": true, "optional": true }, "@swc/core-linux-arm-gnueabihf": { - "version": "1.2.177", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.2.177.tgz", - "integrity": "sha512-COEPGMwR7tRTt/VhIY0t6h3P8keaAGUVw4lfQQq9acW0X9pZTiHwNi/HkdfeIJkhxuWS7e9uski1mCKYEaDtPw==", + "version": "1.3.27", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.3.27.tgz", + "integrity": "sha512-XELMoGcUTAkk+G4buwIIhu6AIr1U418Odt22HUW8+ZvV+Wty2ICgR/myOIhM3xMb6U2L8ay+evMqoVNMQ0RRTg==", "dev": true, "optional": true }, "@swc/core-linux-arm64-gnu": { - "version": "1.2.177", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.2.177.tgz", - "integrity": "sha512-VsMQbCqWXtp7NpZityOujJGBbU5wMEn/viX3DNyp/wKIvbKWgCFwV+v8VN4T5zgX0R9ZE5SKBOHxyA1nvGIhig==", + "version": "1.3.27", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.3.27.tgz", + "integrity": "sha512-O6vtT6bnrVR9PzEIuA5U7tIfYo7bv97H9K9Vqy2oyHNeGN0H36DKwS4UqPreHtziXNF5+7ubdUYUkrG/j8UnUQ==", "dev": true, "optional": true }, "@swc/core-linux-arm64-musl": { - "version": "1.2.177", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.2.177.tgz", - "integrity": "sha512-RolytMUsaekieimltreoldf6yYOKjIZ6/O37OtPAdepEmg9b7R69EVjXRS9GEfqHTNtty9riskc5+N9bOu2NXQ==", + "version": "1.3.27", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.3.27.tgz", + "integrity": "sha512-Oa0E1i7dOTWpaEZumKoNbTE/Ap+da6nlhqKVUdYrFDrOBi25tz76SdxZIyvAszzmgY89b5yd1naourKmkPXpww==", "dev": true, "optional": true }, "@swc/core-linux-x64-gnu": { - "version": "1.2.177", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.2.177.tgz", - "integrity": "sha512-kBj91kNio+7jTC2C9T71O7oYuZyllOTc/Bk6kbwIR5g5cmhi3uRCkdatQlyAcxoY1NGClocW6v49Fmm7EB7sQg==", + "version": "1.3.27", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.3.27.tgz", + "integrity": "sha512-S3v9H8oL2a8Ur6AjQyhkC6HfBVPOxKMdBhcZmdNuVgEUHbHdbf/Lka85F9IOYXEarMn0FtQw3ywowS22O9L5Uw==", "dev": true, "optional": true }, "@swc/core-linux-x64-musl": { - "version": "1.2.177", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.2.177.tgz", - "integrity": "sha512-yO3PqvctMqypIz9GrxHUlbPegrRKOyaVaPQZ/L/u9b1Bo7lUzE83covV7xfGgIy6KGCescVKmv39eO1G5AaLjA==", + "version": "1.3.27", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.3.27.tgz", + "integrity": "sha512-6DDkdXlOADpwICFZTRphCR+cIeS8aEYh4NlyzBito0mOWwIIdfCgALzhkTQOzTOkcD42bP97CIoZ97hqV/puOg==", "dev": true, "optional": true }, "@swc/core-win32-arm64-msvc": { - "version": "1.2.177", - "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.2.177.tgz", - "integrity": "sha512-JjIOlPaMje/WMkY1PpYZccF9jWeBzyaZ0/BlWMhQtSYD9h5ZHkYDyQdAZOkDPrru0ZRsDMc/+ue7um2FQwXs/A==", + "version": "1.3.27", + "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.3.27.tgz", + "integrity": "sha512-baxfH4AbEcaTNo08wxV0W6hiMXwVCxPS4qc0amHpXPti92unvSqeDR1W3C9GjHqzXlWtmCRsq8Ww1pal6ZVLrw==", "dev": true, "optional": true }, "@swc/core-win32-ia32-msvc": { - "version": "1.2.177", - "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.2.177.tgz", - "integrity": "sha512-G+QvvNSrvIwQ6CO4TPc9q060V2RUYhj1Y1FVdoiyXfRDwY4cIv6XAlK7qp1+alX4VFpxIl8EYKoKjdZWBPcHww==", + "version": "1.3.27", + "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.3.27.tgz", + "integrity": "sha512-7iLJnH71k5qCwxv9NcM/P7nIEzTsC7r1sIiQW6bu+CpC8qZvwl0PS+XvQRlLly2gCZM+Le98tksYG14MEh+Hrw==", "dev": true, "optional": true }, "@swc/core-win32-x64-msvc": { - "version": "1.2.177", - "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.2.177.tgz", - "integrity": "sha512-88RpWLPSJmqUZCmIfyiybfJa+GpVp5CyBd/InK+wiYw7IpcUndSX21KeU7IeGSZvPp0T4GKvRdwK5O+Xd6fFsg==", + "version": "1.3.27", + "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.3.27.tgz", + "integrity": "sha512-mFM907PDw/jrQ44+TRjIVGEOy2Mu06mMMz0HPMFuRsBzl5t0Kajp3vmn8FkkpS9wH5982VPi6hPYVTb7QJo5Qg==", "dev": true, "optional": true }, @@ -2202,6 +2198,14 @@ "optional": true, "peer": true }, + "@tonconnect/protocol": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@tonconnect/protocol/-/protocol-2.0.1.tgz", + "integrity": "sha512-jkSj6EKjIlHnJxrtxdlO7KqVJe41yrIgqamGZiqziKH6iwx0m9YyKvuIREd6CmWY2jbsev3BvBWqPp9KH6HrRw==", + "requires": { + "tweetnacl-util": "^0.15.1" + } + }, "@tsconfig/node10": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.8.tgz", @@ -2357,8 +2361,7 @@ "balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, "binary-extensions": { "version": "2.2.0", @@ -2376,7 +2379,6 @@ "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -2468,6 +2470,11 @@ "readdirp": "~3.6.0" } }, + "cliclopts": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/cliclopts/-/cliclopts-1.1.1.tgz", + "integrity": "sha512-dJk8y+TJmOy9Kqha0aWN0rwM5E5EQCVjhl2GTz1CrkqzxkQZ26/hyrNmy7lwePdZc4iNcdHL1tTdcIBeNQhmww==" + }, "cliui": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", @@ -2497,8 +2504,7 @@ "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, "create-require": { "version": "1.1.1", @@ -2516,7 +2522,6 @@ "version": "4.3.3", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", - "dev": true, "requires": { "ms": "2.1.2" }, @@ -2524,8 +2529,7 @@ "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" } } }, @@ -2654,8 +2658,7 @@ "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, "fsevents": { "version": "2.3.2", @@ -2680,7 +2683,6 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", - "dev": true, "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -2694,7 +2696,6 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, "requires": { "brace-expansion": "^1.1.7" } @@ -2732,7 +2733,6 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, "requires": { "once": "^1.3.0", "wrappy": "1" @@ -2741,8 +2741,7 @@ "inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "io-ts": { "version": "2.2.16", @@ -2902,6 +2901,11 @@ "brace-expansion": "^1.1.7" } }, + "minimist": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz", + "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==" + }, "mocha": { "version": "9.2.2", "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.2.2.tgz", @@ -2974,7 +2978,6 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, "requires": { "wrappy": "1" } @@ -3006,8 +3009,7 @@ "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" }, "pathval": { "version": "1.1.1", @@ -3079,7 +3081,6 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, "requires": { "glob": "^7.1.3" } @@ -3151,6 +3152,16 @@ "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true }, + "subcommand": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/subcommand/-/subcommand-2.1.1.tgz", + "integrity": "sha512-cm7TQq9I8dA5LKUr+r8W7RzQlLsmTdCr6wXmjYueOoh/bQu55ODEw7GFhT42pUyoaLtO2rgmx1+8cSIjY9lR9g==", + "requires": { + "cliclopts": "^1.1.0", + "debug": "^4.1.1", + "minimist": "^1.2.0" + } + }, "supports-color": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", @@ -3176,7 +3187,6 @@ "version": "0.2.1", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", "integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==", - "dev": true, "requires": { "rimraf": "^3.0.0" } @@ -3191,9 +3201,9 @@ } }, "ton": { - "version": "12.1.3", - "resolved": "https://registry.npmjs.org/ton/-/ton-12.1.3.tgz", - "integrity": "sha512-ZkXyr2UkYEQfCX5QKY9xQfzLyM4MDZE+Lz7RICr74wS3fwk5lkJ1/KrQZqb2/DwtoBonEaiNjm6x+r86Q8peFA==", + "version": "12.3.3", + "resolved": "https://registry.npmjs.org/ton/-/ton-12.3.3.tgz", + "integrity": "sha512-5vwy7bwuUgOY7Injqi5Ei+Opsr9AjcS4qHzzdiUdt51O2W9oz4LE/GREXuv7Uvxsxev4cWXx0sic0ohfR8Yu4g==", "dev": true, "requires": { "axios": "^0.25.0", @@ -3223,10 +3233,9 @@ } }, "ton-compiler": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/ton-compiler/-/ton-compiler-0.9.0.tgz", - "integrity": "sha512-7ZyjmSSmI8s/hd+H3c8qCzvUxDWLml4T8Lhr3DNAucadWhAXiVniTgPHHQNt5nbfZMvHKGevGw18pRkf5cFBZA==", - "dev": true, + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ton-compiler/-/ton-compiler-2.1.1.tgz", + "integrity": "sha512-IE4oqSw3P6O/U1w09oKWSI2uDbm6uR2PgWSRtgtKBMI2qmdR0Icrx4TSt7lq3WlZ5vUHKN/DEO0KolpCOY0+OA==", "requires": { "arg": "^5.0.1", "tmp": "^0.2.1" @@ -3235,8 +3244,7 @@ "arg": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.1.tgz", - "integrity": "sha512-e0hDa9H2Z9AwFkk2qDlwhoMYE4eToKarchkQHovNdLTCYMHZHeRjI71crOh+dio4K6u1IcwubQqo79Ga4CyAQA==", - "dev": true + "integrity": "sha512-e0hDa9H2Z9AwFkk2qDlwhoMYE4eToKarchkQHovNdLTCYMHZHeRjI71crOh+dio4K6u1IcwubQqo79Ga4CyAQA==" } } }, @@ -3251,6 +3259,12 @@ "ton-compiler": "^0.9.0" }, "dependencies": { + "arg": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", + "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==", + "dev": true + }, "ton": { "version": "9.9.0", "resolved": "https://registry.npmjs.org/ton/-/ton-9.9.0.tgz", @@ -3270,6 +3284,16 @@ "tweetnacl": "1.0.3" } }, + "ton-compiler": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/ton-compiler/-/ton-compiler-0.9.0.tgz", + "integrity": "sha512-7ZyjmSSmI8s/hd+H3c8qCzvUxDWLml4T8Lhr3DNAucadWhAXiVniTgPHHQNt5nbfZMvHKGevGw18pRkf5cFBZA==", + "dev": true, + "requires": { + "arg": "^5.0.1", + "tmp": "^0.2.1" + } + }, "ton-crypto": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/ton-crypto/-/ton-crypto-2.1.0.tgz", @@ -3304,12 +3328,12 @@ } }, "ts-node": { - "version": "10.7.0", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.7.0.tgz", - "integrity": "sha512-TbIGS4xgJoX2i3do417KSaep1uRAW/Lu+WAL2doDHC0D6ummjirVOXU5/7aiZotbQ5p1Zp9tP7U6cYhA0O7M8A==", + "version": "10.9.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", + "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", "dev": true, "requires": { - "@cspotcode/source-map-support": "0.7.0", + "@cspotcode/source-map-support": "^0.8.0", "@tsconfig/node10": "^1.0.7", "@tsconfig/node12": "^1.0.7", "@tsconfig/node14": "^1.0.0", @@ -3320,7 +3344,7 @@ "create-require": "^1.1.0", "diff": "^4.0.1", "make-error": "^1.1.1", - "v8-compile-cache-lib": "^3.0.0", + "v8-compile-cache-lib": "^3.0.1", "yn": "3.1.1" }, "dependencies": { @@ -3338,6 +3362,11 @@ "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==", "dev": true }, + "tweetnacl-util": { + "version": "0.15.1", + "resolved": "https://registry.npmjs.org/tweetnacl-util/-/tweetnacl-util-0.15.1.tgz", + "integrity": "sha512-RKJBIj8lySrShN4w6i/BonWp2Z/uxwC3h4y7xsRrpP59ZboCd0GpEVsOnMDYLMmKBpYhb5TgHzZXy7wTfYFBRw==" + }, "type-detect": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", @@ -3385,8 +3414,7 @@ "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, "y18n": { "version": "5.0.8", diff --git a/package.json b/package.json index 5367229..a481623 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "tonb", + "name": "bton", "description": "", "version": "0.0.0", "license": "MIT", @@ -10,10 +10,11 @@ "build": "ts-node ./build/_build.ts", "deploy": "ts-node ./build/_deploy.ts", "deploy:testnet": "ts-node ./build/_deploy.ts", - "postinstall": "ts-node ./build/_setup.ts" + "postinstall": "ts-node ./build/_setup.ts", + "cli": "node --no-warnings --loader ts-node/esm build/cli.js " }, "devDependencies": { - "@swc/core": "^1.2.177", + "@swc/core": "^1.3.25", "@types/bn.js": "^5.1.0", "@types/chai": "^4.3.0", "@types/mocha": "^9.0.0", @@ -26,10 +27,10 @@ "mocha": "^9.1.3", "prando": "^6.0.1", "prettier": "^2.6.2", - "ton": "^12.1.3", + "ton": "^12.3.3", "ton-contract-executor": "^0.4.8", "ton-crypto": "^3.1.0", - "ts-node": "^10.4.0", + "ts-node": "^10.9.1", "typescript": "^4.5.4" }, "prettier": { @@ -46,6 +47,9 @@ "node": ">=16.15.0" }, "dependencies": { - "semver": "^7.3.7" + "@tonconnect/protocol": "^2.0.1", + "semver": "^7.3.7", + "subcommand": "^2.1.1", + "ton-compiler": "^2.0.0" } } diff --git a/test/helpers.ts b/test/helpers.ts index 7874944..5cca3f8 100644 --- a/test/helpers.ts +++ b/test/helpers.ts @@ -2,6 +2,7 @@ import BN from "bn.js"; import { Address, Cell, CellMessage, InternalMessage, CommonMessageInfo, WalletContract, SendMode, Wallet } from "ton"; import { SmartContract } from "ton-contract-executor"; import Prando from "prando"; +import { sendInternalMessageWithWallet} from "../contracts/utils"; export const zeroAddress = new Address(0, Buffer.alloc(32, 0)); @@ -33,31 +34,4 @@ export function setBalance(contract: SmartContract, balance: BN) { }); } -// helper for end-to-end on-chain tests (normally post deploy) to allow sending InternalMessages to contracts using a wallet -export async function sendInternalMessageWithWallet(params: { walletContract: WalletContract; secretKey: Buffer; to: Address; value: BN; bounce?: boolean; body?: Cell }) { - const message = params.body ? new CellMessage(params.body) : undefined; - const seqno = await params.walletContract.getSeqNo(); - const transfer = params.walletContract.createTransfer({ - secretKey: params.secretKey, - seqno: seqno, - sendMode: SendMode.PAY_GAS_SEPARATLY + SendMode.IGNORE_ERRORS, - order: new InternalMessage({ - to: params.to, - value: params.value, - bounce: params.bounce ?? false, - body: new CommonMessageInfo({ - body: message, - }), - }), - }); - await params.walletContract.client.sendExternalMessage(params.walletContract, transfer); - for (let attempt = 0; attempt < 10; attempt++) { - await sleep(2000); - const seqnoAfter = await params.walletContract.getSeqNo(); - if (seqnoAfter > seqno) return; - } -} - -function sleep(ms: number) { - return new Promise((resolve) => setTimeout(resolve, ms)); -} +export { sendInternalMessageWithWallet };