Skip to content

Commit 0769f24

Browse files
Merge pull request #1 from husreo/test_branch
Test branch
2 parents f7c9cee + ad49913 commit 0769f24

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+1731
-1565
lines changed

Anchor.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ skip-lint = false
66

77

88

9-
[programs.localnet]
10-
pump_science = "46EymXtUWmsPZ9xZH5VtK5uVWR45P7j4UCdYyDdVbYof"
9+
[programs.devnet]
10+
pump_science = "Fmktp2VXcDorWkAyzZAEG5X859mxKMV8XCcayKgZVwBo"
1111

1212
[registry]
1313
url = "https://api.apr.dev"
1414

1515
[provider]
16-
cluster = "Localnet"
17-
wallet = "./pump_key.json"
16+
cluster = "Devnet"
17+
wallet = "./pump_fun.json"
1818

1919
[scripts]
2020
test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts"

cli/command.ts

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {
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

88
program.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

2520
programCommand('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

4031
programCommand('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-
5548
function 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

6356
program.parse(process.argv);

cli/constants.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
} from "@solana/web3.js";
55
import { BN } from "bn.js";
66

7-
export const PUMPSCIENCE = new PublicKey("46EymXtUWmsPZ9xZH5VtK5uVWR45P7j4UCdYyDdVbYof");
7+
export const PUMPSCIENCE = new PublicKey("Fmktp2VXcDorWkAyzZAEG5X859mxKMV8XCcayKgZVwBo");
88
export const PROGRAM_ID = 'Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB';
99
export const VAULT_SEED = "vault-authority";
1010
export const GLOBAL_VAULT_SEED = "fee-vault";
@@ -20,21 +20,19 @@ export const SEEDS = Object.freeze({
2020
export enum ProgramStatus { Running, SwapOnly, SwapOnlyNoLaunch, Paused };
2121
export const TOKEN_DECIMALS = 9;
2222
export const INIT_DEFAULTS = {
23-
feeRecipient: null,
2423
initialVirtualTokenReserves: new BN(1073000000000000),
2524
initialVirtualSolReserves: new BN(30 * LAMPORTS_PER_SOL),
2625
initialRealTokenReserves: new BN(793100000000000),
2726
tokenTotalSupply: new BN(1000100000000000),
28-
feeBps: new BN(100),
2927
mintDecimals: TOKEN_DECIMALS,
30-
feeRecipients: null,
3128
feeReceiver: MIGRATION_VAULT,
3229
status: null,
33-
migrateFeeAmount: new BN(500)
30+
migrateFeeAmount: new BN(500),
31+
whitelistEnabled: true,
32+
meteoraConfig: new PublicKey("21PjsfQVgrn56jSypUT5qXwwSjwKWvuoBCKbVZrgTLz4")
3433
}
35-
3634
export const SIMPLE_DEFAULT_BONDING_CURVE_PRESET = {
37-
name: "simpleBondingCurve",
35+
name: "simpleBondingCurve" + Math.floor(Math.random()* 100).toString(),
3836
symbol: "SBC",
3937
uri: "https://www.simpleBondingCurve.com",
4038
startTime: null,

0 commit comments

Comments
 (0)