|
|
|
@ -50,8 +50,8 @@ let commands = [
|
|
|
|
|
name: 'transfer', |
|
|
|
|
options: [ |
|
|
|
|
{ |
|
|
|
|
name: 'minter', |
|
|
|
|
help: 'The jetton address' |
|
|
|
|
name: 'my_wallet', |
|
|
|
|
help: 'The jetton wallet address' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
name: "amount" |
|
|
|
@ -62,12 +62,37 @@ let commands = [
|
|
|
|
|
], |
|
|
|
|
command: async function transfer(args) { |
|
|
|
|
let [walletContract, walletKey] = await getWallet(); |
|
|
|
|
let address = main.getJettonAddress(walletContract.address, Address.parse(args._[0]), Cell.fromBoc(hex)[0]); |
|
|
|
|
await sendInternalMessageWithWallet({ |
|
|
|
|
walletContract, secretKey: walletKey.secretKey, value: 0.15 * main.TON(), to: address, |
|
|
|
|
walletContract, secretKey: walletKey.secretKey, value: 0.15 * main.TON(), to: Address.parse(args._[0]), |
|
|
|
|
body: main.transferMsg((parseFloat(args._[1]) * main.TON()), Address.parse(args._[2])) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
name: "deploy", |
|
|
|
|
options: [ |
|
|
|
|
{ |
|
|
|
|
name: "minter", |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
name: "account" |
|
|
|
|
} |
|
|
|
|
], |
|
|
|
|
command: async function deploy(args) { |
|
|
|
|
let [walletContract, walletKey] = await getWallet(); |
|
|
|
|
let address = main.getJettonAddress(Address.parse(args._[1]), Address.parse(args._[0]), Cell.fromBoc(hex)[0]); |
|
|
|
|
await sendInternalMessageWithWallet({ |
|
|
|
|
walletContract, secretKey: walletKey.secretKey, value: 0.15 * main.TON(), to: address, |
|
|
|
|
body: new CommonMessageInfo({ |
|
|
|
|
body: null, |
|
|
|
|
stateInit: new StateInit({ code: Cell.fromBoc(hex)[0], data: main.walletData({ |
|
|
|
|
balance: 0, ownerAddress: Address.parse(args._[1]), |
|
|
|
|
jettonWalletCode: Cell.fromBoc(hex)[0], |
|
|
|
|
jettonMasterAddress: Address.parse(args._[0]) |
|
|
|
|
}) }), |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|
|
|
|
|
|