-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathmint-jetton.ts
38 lines (29 loc) · 1 KB
/
mint-jetton.ts
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
37
38
import {toNano} from "@ton/core";
import {AssetsSDK, createApi, createSender, importKey, PinataStorageParams} from "../src";
async function main() {
const NETWORK = 'testnet';
const api = await createApi(NETWORK);
const keyPair = await importKey(process.env.MNEMONIC!);
const sender = await createSender('highload-v2', keyPair, api);
const storage: PinataStorageParams = {
pinataApiKey: process.env.PINATA_API_KEY!,
pinataSecretKey: process.env.PINATA_SECRET!,
}
const sdk = AssetsSDK.create({
api: api,
storage: storage,
sender: sender,
});
console.log('Using wallet', sdk.sender?.address);
const jetton = await sdk.deployJetton({
name: 'Test jetton 4',
decimals: 9,
description: 'Test jetton',
symbol: 'TEST',
}, {
adminAddress: sdk.sender?.address!,
premintAmount: toNano('100'),
});
console.log('Created jetton with address', jetton.address);
}
main().catch(console.error);