-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdappBatchSbtEditableDeploy.ts
More file actions
36 lines (31 loc) · 1.16 KB
/
dappBatchSbtEditableDeploy.ts
File metadata and controls
36 lines (31 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import { BlockchainProgram } from '../wrappers/BlockchainProgram';
import { NetworkProvider } from '@ton-community/blueprint';
import { Address, toNano } from 'ton-core';
export async function run(provider: NetworkProvider, args: string[]) {
const ui = provider.ui();
const address = Address.parse(args.length > 0 ? args[0] : await ui.input('Dapp address'));
const blockchainProgram = provider.open(BlockchainProgram.createFromAddress(address));
await blockchainProgram.sendBatchSbtDeployMsg(provider.sender(), {
sbts: [
{
passAmount: toNano('0.05'),
index: 0,
ownerAddress: address,
editorAddress: address,
authorityAddress: address,
content: '1'
},
{
passAmount: toNano('0.05'),
index: 1,
ownerAddress: address,
editorAddress: address,
authorityAddress: address,
content: '2'
},
],
queryId: Date.now(),
collectionId: 0,
});
ui.write("Successfully deployed batch of editable sbts!");
}