forked from bilix-software/pump-fun-token-launcher
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.ts
More file actions
34 lines (27 loc) · 1.12 KB
/
Copy pathexample.ts
File metadata and controls
34 lines (27 loc) · 1.12 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
import { launchToken } from './src/launch';
class Example {
private deployerPrivatekey: string;
private tokenUri: string;
private tokenSymbol: string;
private tokenName: string;
constructor(deployerPrivatekey: string, tokenUri: string, tokenSymbol: string, tokenName: string) {
this.deployerPrivatekey = deployerPrivatekey;
this.tokenUri = tokenUri;
this.tokenSymbol = tokenSymbol;
this.tokenName = tokenName;
}
async main() {
try {
await launchToken(this.deployerPrivatekey, this.tokenName, this.tokenSymbol, this.tokenUri)
} catch (error) {
console.error('Error in main function:', error);
}
}
}
// Usage
const deployerPrivatekey = 'your_private_key_here'; // Replace with your actual private key
const tokenUri = 'your_token_uri_here'; //Replace with actual token uri
const tokenSymbol = 'your_token_symbol_here'; //Replace with actual token symbol
const tokenName = 'your_token_name_here'; //Replace with actual token name
const example = new Example(deployerPrivatekey,tokenUri, tokenSymbol, tokenName);
example.main();