33 Connection ,
44 PublicKey ,
55} from '@solana/web3.js' ;
6- import { migrate , global , createBondingCurve , setClusterConfig } from './script' ;
6+ import { migrate , global , createBondingCurve , setClusterConfig , addWl } from './script' ;
77
88program . version ( '0.0.1' ) ;
99
@@ -12,52 +12,45 @@ programCommand('migrate')
1212 . action ( async ( directory , cmd ) => {
1313 const { env, keypair, rpc } = cmd . opts ( ) ;
1414
15- // console.log('Solana Cluster:', env);
16- // console.log('Keypair Path:', keypair);
17- // console.log('RPC URL:', rpc);
18-
1915 await setClusterConfig ( env , keypair , rpc )
20-
21- const txId = await migrate ( ) ;
22- console . log ( "Transaction ID: " , txId ) ;
16+ const migrateTxId = await migrate ( ) ;
17+ console . log ( "Transaction ID: " , migrateTxId ) ;
2318 } ) ;
2419
2520programCommand ( 'global' )
2621 // eslint-disable-next-line @typescript-eslint/no-unused-vars
2722 . action ( async ( directory , cmd ) => {
2823 const { env, keypair, rpc } = cmd . opts ( ) ;
2924
30- // console.log('Solana Cluster:', env);
31- // console.log('Keypair Path:', keypair);
32- // console.log('RPC URL:', rpc);
33-
3425 await setClusterConfig ( env , keypair , rpc )
3526
3627 const txId = await global ( ) ;
3728 console . log ( "Transaction ID: " , txId ) ;
3829 } ) ;
3930
4031programCommand ( 'createCurve' )
41- // eslint-disable-next-line @typescript-eslint/no-unused-vars
4232 . action ( async ( directory , cmd ) => {
4333 const { env, keypair, rpc } = cmd . opts ( ) ;
34+
35+ await setClusterConfig ( env , keypair , rpc )
36+ await createBondingCurve ( ) ;
37+ } ) ;
4438
45- // console.log('Solana Cluster:', env);
46- // console.log('Keypair Path:', keypair);
47- // console.log('RPC URL:', rpc);
39+ programCommand ( 'addWl' )
40+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
41+ . action ( async ( directory , cmd ) => {
42+ const { env, keypair, rpc } = cmd . opts ( ) ;
4843
4944 await setClusterConfig ( env , keypair , rpc )
5045
51- const txId = await createBondingCurve ( ) ;
52- console . log ( "Transaction ID: " , txId ) ;
46+ await addWl ( ) ;
5347 } ) ;
54-
5548function programCommand ( name : string ) {
5649 return program
5750 . command ( name )
5851 . option ( '-e, --env <string>' , 'Solana cluster env name' , 'devnet' )
59- . option ( '-r, --rpc <string>' , 'Solana cluster RPC name' , 'https://api. devnet.solana .com' )
60- . option ( '-k, --keypair <string>' , 'Solana wallet Keypair Path' , '/home/ubuntu/pump-fun-contract/ pump-science-contract/pump_key .json' )
52+ . option ( '-r, --rpc <string>' , 'Solana cluster RPC name' , 'https://devnet.helius-rpc .com/?api-key=926da061-472b-438a-bbb1-f289333c4126 ' )
53+ . option ( '-k, --keypair <string>' , 'Solana wallet Keypair Path' , '/home/king/contract_test/pump_science/ pump-science-contract//pump_fun .json' )
6154}
6255
6356program . parse ( process . argv ) ;
0 commit comments