@solsdk/tokenflow_sdk
Version:
A simple SDK for interacting with tokenflow
3,791 lines (3,789 loc) • 49.9 kB
JavaScript
var address = "2wcKsovYJcjjRo21DNrY3ZNjvxEWssR2qQQVhE4EXZeA";
var metadata = {
name: "happy_pump_program",
version: "0.1.0",
spec: "0.1.0",
description: "HappyPump"
};
var instructions = [
{
name: "buy",
docs: [
"Buys tokens from a bonding curve."
],
discriminator: [
102,
6,
61,
18,
1,
218,
235,
234
],
accounts: [
{
name: "user",
writable: true,
signer: true
},
{
name: "trade_authority",
writable: true,
signer: true,
optional: true
},
{
name: "global",
pda: {
seeds: [
{
kind: "const",
value: [
103,
108,
111,
98,
97,
108
]
}
]
}
},
{
name: "fee_recipient",
writable: true
},
{
name: "creator_fee_recipient",
writable: true
},
{
name: "mint",
writable: true
},
{
name: "bonding_curve",
writable: true,
pda: {
seeds: [
{
kind: "const",
value: [
98,
111,
110,
100,
105,
110,
103,
45,
99,
117,
114,
118,
101
]
},
{
kind: "account",
path: "mint"
}
]
}
},
{
name: "bonding_curve_token_account",
writable: true,
pda: {
seeds: [
{
kind: "account",
path: "bonding_curve"
},
{
kind: "const",
value: [
6,
221,
246,
225,
215,
101,
161,
147,
217,
203,
225,
70,
206,
235,
121,
172,
28,
180,
133,
237,
95,
91,
55,
145,
58,
140,
245,
133,
126,
255,
0,
169
]
},
{
kind: "account",
path: "mint"
}
],
program: {
kind: "const",
value: [
140,
151,
37,
143,
78,
36,
137,
241,
187,
61,
16,
41,
20,
142,
13,
131,
11,
90,
19,
153,
218,
255,
16,
132,
4,
142,
123,
216,
219,
233,
248,
89
]
}
}
},
{
name: "user_token_account",
writable: true,
pda: {
seeds: [
{
kind: "account",
path: "user"
},
{
kind: "const",
value: [
6,
221,
246,
225,
215,
101,
161,
147,
217,
203,
225,
70,
206,
235,
121,
172,
28,
180,
133,
237,
95,
91,
55,
145,
58,
140,
245,
133,
126,
255,
0,
169
]
},
{
kind: "account",
path: "mint"
}
],
program: {
kind: "const",
value: [
140,
151,
37,
143,
78,
36,
137,
241,
187,
61,
16,
41,
20,
142,
13,
131,
11,
90,
19,
153,
218,
255,
16,
132,
4,
142,
123,
216,
219,
233,
248,
89
]
}
}
},
{
name: "system_program",
address: "11111111111111111111111111111111"
},
{
name: "token_program",
address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
},
{
name: "event_authority",
pda: {
seeds: [
{
kind: "const",
value: [
95,
95,
101,
118,
101,
110,
116,
95,
97,
117,
116,
104,
111,
114,
105,
116,
121
]
}
]
}
},
{
name: "program"
}
],
args: [
{
name: "params",
type: {
defined: {
name: "BuyParams"
}
}
}
]
},
{
name: "create",
docs: [
"Creates a new coin and bonding curve."
],
discriminator: [
24,
30,
200,
40,
5,
28,
7,
119
],
accounts: [
{
name: "mint",
writable: true,
signer: true
},
{
name: "creator",
writable: true,
signer: true
},
{
name: "mint_authority",
pda: {
seeds: [
{
kind: "const",
value: [
109,
105,
110,
116,
45,
97,
117,
116,
104,
111,
114,
105,
116,
121
]
}
]
}
},
{
name: "bonding_curve",
writable: true,
pda: {
seeds: [
{
kind: "const",
value: [
98,
111,
110,
100,
105,
110,
103,
45,
99,
117,
114,
118,
101
]
},
{
kind: "account",
path: "mint"
}
]
}
},
{
name: "bonding_curve_token_account",
writable: true,
pda: {
seeds: [
{
kind: "account",
path: "bonding_curve"
},
{
kind: "const",
value: [
6,
221,
246,
225,
215,
101,
161,
147,
217,
203,
225,
70,
206,
235,
121,
172,
28,
180,
133,
237,
95,
91,
55,
145,
58,
140,
245,
133,
126,
255,
0,
169
]
},
{
kind: "account",
path: "mint"
}
],
program: {
kind: "const",
value: [
140,
151,
37,
143,
78,
36,
137,
241,
187,
61,
16,
41,
20,
142,
13,
131,
11,
90,
19,
153,
218,
255,
16,
132,
4,
142,
123,
216,
219,
233,
248,
89
]
}
}
},
{
name: "global",
pda: {
seeds: [
{
kind: "const",
value: [
103,
108,
111,
98,
97,
108
]
}
]
}
},
{
name: "metadata",
writable: true,
pda: {
seeds: [
{
kind: "const",
value: [
109,
101,
116,
97,
100,
97,
116,
97
]
},
{
kind: "account",
path: "token_metadata_program"
},
{
kind: "account",
path: "mint"
}
],
program: {
kind: "account",
path: "token_metadata_program"
}
}
},
{
name: "system_program",
address: "11111111111111111111111111111111"
},
{
name: "token_program",
address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
},
{
name: "token_metadata_program",
address: "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"
},
{
name: "associated_token_program",
address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
},
{
name: "rent",
address: "SysvarRent111111111111111111111111111111111"
},
{
name: "fee_recipient",
writable: true
},
{
name: "event_authority",
pda: {
seeds: [
{
kind: "const",
value: [
95,
95,
101,
118,
101,
110,
116,
95,
97,
117,
116,
104,
111,
114,
105,
116,
121
]
}
]
}
},
{
name: "program"
}
],
args: [
{
name: "params",
type: {
defined: {
name: "CreateParams"
}
}
}
]
},
{
name: "initialize",
docs: [
"Creates the global state."
],
discriminator: [
175,
175,
109,
31,
13,
152,
155,
237
],
accounts: [
{
name: "authority",
writable: true,
signer: true
},
{
name: "global",
writable: true,
pda: {
seeds: [
{
kind: "const",
value: [
103,
108,
111,
98,
97,
108
]
}
]
}
},
{
name: "system_program",
address: "11111111111111111111111111111111"
}
],
args: [
]
},
{
name: "migrate_to_raydium",
docs: [
"Migrate bonding curve to raydium cpmm"
],
discriminator: [
116,
139,
75,
192,
86,
63,
121,
169
],
accounts: [
{
name: "cp_swap_program",
address: "CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C"
},
{
name: "payer",
writable: true,
signer: true
},
{
name: "creator_lp_token",
writable: true
},
{
name: "global",
pda: {
seeds: [
{
kind: "const",
value: [
103,
108,
111,
98,
97,
108
]
}
]
}
},
{
name: "mint"
},
{
name: "wsol_mint",
writable: true
},
{
name: "observation_state",
writable: true,
pda: {
seeds: [
{
kind: "const",
value: [
111,
98,
115,
101,
114,
118,
97,
116,
105,
111,
110
]
},
{
kind: "account",
path: "pool_state"
}
],
program: {
kind: "account",
path: "cp_swap_program"
}
}
},
{
name: "bonding_curve",
writable: true,
pda: {
seeds: [
{
kind: "const",
value: [
98,
111,
110,
100,
105,
110,
103,
45,
99,
117,
114,
118,
101
]
},
{
kind: "account",
path: "mint"
}
]
}
},
{
name: "bonding_curve_token_account",
writable: true,
pda: {
seeds: [
{
kind: "account",
path: "bonding_curve"
},
{
kind: "const",
value: [
6,
221,
246,
225,
215,
101,
161,
147,
217,
203,
225,
70,
206,
235,
121,
172,
28,
180,
133,
237,
95,
91,
55,
145,
58,
140,
245,
133,
126,
255,
0,
169
]
},
{
kind: "account",
path: "mint"
}
],
program: {
kind: "const",
value: [
140,
151,
37,
143,
78,
36,
137,
241,
187,
61,
16,
41,
20,
142,
13,
131,
11,
90,
19,
153,
218,
255,
16,
132,
4,
142,
123,
216,
219,
233,
248,
89
]
}
}
},
{
name: "bonding_curve_wsol_account",
writable: true,
pda: {
seeds: [
{
kind: "account",
path: "bonding_curve"
},
{
kind: "const",
value: [
6,
221,
246,
225,
215,
101,
161,
147,
217,
203,
225,
70,
206,
235,
121,
172,
28,
180,
133,
237,
95,
91,
55,
145,
58,
140,
245,
133,
126,
255,
0,
169
]
},
{
kind: "account",
path: "wsol_mint"
}
],
program: {
kind: "const",
value: [
140,
151,
37,
143,
78,
36,
137,
241,
187,
61,
16,
41,
20,
142,
13,
131,
11,
90,
19,
153,
218,
255,
16,
132,
4,
142,
123,
216,
219,
233,
248,
89
]
}
}
},
{
name: "creator_wsol_account",
writable: true,
pda: {
seeds: [
{
kind: "account",
path: "payer"
},
{
kind: "const",
value: [
6,
221,
246,
225,
215,
101,
161,
147,
217,
203,
225,
70,
206,
235,
121,
172,
28,
180,
133,
237,
95,
91,
55,
145,
58,
140,
245,
133,
126,
255,
0,
169
]
},
{
kind: "account",
path: "wsol_mint"
}
],
program: {
kind: "const",
value: [
140,
151,
37,
143,
78,
36,
137,
241,
187,
61,
16,
41,
20,
142,
13,
131,
11,
90,
19,
153,
218,
255,
16,
132,
4,
142,
123,
216,
219,
233,
248,
89
]
}
}
},
{
name: "creator_token_account",
writable: true,
pda: {
seeds: [
{
kind: "account",
path: "payer"
},
{
kind: "const",
value: [
6,
221,
246,
225,
215,
101,
161,
147,
217,
203,
225,
70,
206,
235,
121,
172,
28,
180,
133,
237,
95,
91,
55,
145,
58,
140,
245,
133,
126,
255,
0,
169
]
},
{
kind: "account",
path: "mint"
}
],
program: {
kind: "const",
value: [
140,
151,
37,
143,
78,
36,
137,
241,
187,
61,
16,
41,
20,
142,
13,
131,
11,
90,
19,
153,
218,
255,
16,
132,
4,
142,
123,
216,
219,
233,
248,
89
]
}
}
},
{
name: "pool_wsol_vault",
writable: true,
pda: {
seeds: [
{
kind: "const",
value: [
112,
111,
111,
108,
95,
118,
97,
117,
108,
116
]
},
{
kind: "account",
path: "pool_state"
},
{
kind: "account",
path: "wsol_mint"
}
],
program: {
kind: "account",
path: "cp_swap_program"
}
}
},
{
name: "pool_token_vault",
writable: true,
pda: {
seeds: [
{
kind: "const",
value: [
112,
111,
111,
108,
95,
118,
97,
117,
108,
116
]
},
{
kind: "account",
path: "pool_state"
},
{
kind: "account",
path: "mint"
}
],
program: {
kind: "account",
path: "cp_swap_program"
}
}
},
{
name: "create_pool_fee",
docs: [
"create pool fee account"
],
writable: true,
address: "DNXgeM9EiiaAbaWvwjHj9fQQLAX5ZsfHyvmYUNRAdNC8"
},
{
name: "amm_config",
docs: [
"Which config the pool belongs to."
],
writable: true,
pda: {
seeds: [
{
kind: "const",
value: [
97,
109,
109,
95,
99,
111,
110,
102,
105,
103
]
},
{
kind: "const",
value: [
0,
0
]
}
],
program: {
kind: "account",
path: "cp_swap_program"
}
}
},
{
name: "pool_state",
writable: true
},
{
name: "lp_mint",
writable: true,
pda: {
seeds: [
{
kind: "const",
value: [
112,
111,
111,
108,
95,
108,
112,
95,
109,
105,
110,
116
]
},
{
kind: "account",
path: "pool_state"
}
],
program: {
kind: "account",
path: "cp_swap_program"
}
}
},
{
name: "cp_authority",
writable: true,
pda: {
seeds: [
{
kind: "const",
value: [
118,
97,
117,
108,
116,
95,
97,
110,
100,
95,
108,
112,
95,
109,
105,
110,
116,
95,
97,
117,
116,
104,
95,
115,
101,
101,
100
]
}
],
program: {
kind: "account",
path: "cp_swap_program"
}
}
},
{
name: "associated_token_program",
address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
},
{
name: "system_program",
address: "11111111111111111111111111111111"
},
{
name: "token_program",
address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
},
{
name: "rent",
address: "SysvarRent111111111111111111111111111111111"
},
{
name: "event_authority",
pda: {
seeds: [
{
kind: "const",
value: [
95,
95,
101,
118,
101,
110,
116,
95,
97,
117,
116,
104,
111,
114,
105,
116,
121
]
}
]
}
},
{
name: "program"
}
],
args: [
]
},
{
name: "sell",
docs: [
"Sells tokens into a bonding curve."
],
discriminator: [
51,
230,
133,
164,
1,
127,
131,
173
],
accounts: [
{
name: "user",
writable: true,
signer: true
},
{
name: "global",
pda: {
seeds: [
{
kind: "const",
value: [
103,
108,
111,
98,
97,
108
]
}
]
}
},
{
name: "fee_recipient",
writable: true
},
{
name: "creator_fee_recipient",
writable: true
},
{
name: "mint"
},
{
name: "bonding_curve",
writable: true,
pda: {
seeds: [
{
kind: "const",
value: [
98,
111,
110,
100,
105,
110,
103,
45,
99,
117,
114,
118,
101
]
},
{
kind: "account",
path: "mint"
}
]
}
},
{
name: "bonding_curve_token_account",
writable: true,
pda: {
seeds: [
{
kind: "account",
path: "bonding_curve"
},
{
kind: "const",
value: [
6,
221,
246,
225,
215,
101,
161,
147,
217,
203,
225,
70,
206,
235,
121,
172,
28,
180,
133,
237,
95,
91,
55,
145,
58,
140,
245,
133,
126,
255,
0,
169
]
},
{
kind: "account",
path: "mint"
}
],
program: {
kind: "const",
value: [
140,
151,
37,
143,
78,
36,
137,
241,
187,
61,
16,
41,
20,
142,
13,
131,
11,
90,
19,
153,
218,
255,
16,
132,
4,
142,
123,
216,
219,
233,
248,
89
]
}
}
},
{
name: "user_token_account",
writable: true,
pda: {
seeds: [
{
kind: "account",
path: "user"
},
{
kind: "const",
value: [
6,
221,
246,
225,
215,
101,
161,
147,
217,
203,
225,
70,
206,
235,
121,
172,
28,
180,
133,
237,
95,
91,
55,
145,
58,
140,
245,
133,
126,
255,
0,
169
]
},
{
kind: "account",
path: "mint"
}
],
program: {
kind: "const",
value: [
140,
151,
37,
143,
78,
36,
137,
241,
187,
61,
16,
41,
20,
142,
13,
131,
11,
90,
19,
153,
218,
255,
16,
132,
4,
142,
123,
216,
219,
233,
248,
89
]
}
}
},
{
name: "system_program",
address: "11111111111111111111111111111111"
},
{
name: "token_program",
address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
},
{
name: "event_authority",
pda: {
seeds: [
{
kind: "const",
value: [
95,
95,
101,
118,
101,
110,
116,
95,
97,
117,
116,
104,
111,
114,
105,
116,
121
]
}
]
}
},
{
name: "program"
}
],
args: [
{
name: "params",
type: {
defined: {
name: "SellParams"
}
}
}
]
},
{
name: "set_active",
docs: [
"Sets the active status of a bonding curve."
],
discriminator: [
29,
16,
225,
132,
38,
216,
206,
33
],
accounts: [
{
name: "mint",
writable: true
},
{
name: "payer",
writable: true,
signer: true
},
{
name: "bonding_curve",
writable: true,
pda: {
seeds: [
{
kind: "const",
value: [
98,
111,
110,
100,
105,
110,
103,
45,
99,
117,
114,
118,
101
]
},
{
kind: "account",
path: "mint"
}
]
}
},
{
name: "global",
writable: true,
pda: {
seeds: [
{
kind: "const",
value: [
103,
108,
111,
98,
97,
108
]
}
]
}
},
{
name: "system_program",
address: "11111111111111111111111111111111"
}
],
args: [
{
name: "params",
type: {
defined: {
name: "ActiveParams"
}
}
}
]
},
{
name: "set_bonding_curve_cfg",
docs: [
"Sets the bonding curve configuration."
],
discriminator: [
39,
67,
54,
69,
211,
32,
183,
157
],
accounts: [
{
name: "user",
writable: true,
signer: true
},
{
name: "global",
writable: true,
pda: {
seeds: [
{
kind: "const",
value: [
103,
108,
111,
98,
97,
108
]
}
]
}
},
{
name: "mint",
writable: true
},
{
name: "bonding_curve",
writable: true,
pda: {
seeds: [
{
kind: "const",
value: [
98,
111,
110,
100,
105,
110,
103,
45,
99,
117,
114,
118,
101
]
},
{
kind: "account",
path: "mint"
}
]
}
},
{
name: "system_program",
address: "11111111111111111111111111111111"
},
{
name: "token_program",
address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
}
],
args: [
{
name: "params",
type: {
defined: {
name: "SetBondingCurveParams"
}
}
}
]
},
{
name: "set_global_cfg",
docs: [
"Sets the global state parameters."
],
discriminator: [
214,
7,
116,
206,
113,
214,
141,
76
],
accounts: [
{
name: "global",
writable: true,
pda: {
seeds: [
{
kind: "const",
value: [
103,
108,
111,
98,
97,
108
]
}
]
}
},
{
name: "user",
writable: true,
signer: true
},
{
name: "system_program",
address: "11111111111111111111111111111111"
},
{
name: "event_authority",
pda: {
seeds: [
{
kind: "const",
value: [
95,
95,
101,
118,
101,
110,
116,
95,
97,
117,
116,
104,
111,
114,
105,
116,
121
]
}
]
}
},
{
name: "program"
}
],
args: [
{
name: "params",
type: {
defined: {
name: "SetGlobalCfgParams"
}
}
}
]
},
{
name: "withdraw",
docs: [
"Allows the admin to withdraw liquidity for a migration once the bonding curve completes"
],
discriminator: [
183,
18,
70,
156,
148,
109,
161,
34
],
accounts: [
{
name: "user",
writable: true,
signer: true
},
{
name: "global",
pda: {
seeds: [
{
kind: "const",
value: [
103,
108,
111,
98,
97,
108
]
}
]
}
},
{
name: "mint"
},
{
name: "last_withdraw",
writable: true,
pda: {
seeds: [
{
kind: "const",
value: [
108,
97,
115,
116,
45,
119,
105,
116,
104,
100,
114,
97,
119
]
}
]
}
},
{
name: "bonding_curve",
writable: true,
pda: {
seeds: [
{
kind: "const",
value: [
98,
111,
110,
100,
105,
110,
103,
45,
99,
117,
114,
118,
101
]
},
{
kind: "account",
path: "mint"
}
]
}
},
{
name: "bonding_curve_token_account",
writable: true,
pda: {
seeds: [
{
kind: "account",
path: "bonding_curve"
},
{
kind: "const",
value: [
6,
221,
246,
225,
215,
101,
161,
147,
217,
203,
225,
70,
206,
235,
121,
172,
28,
180,
133,
237,
95,
91,
55,
145,
58,
140,
245,
133,
126,
255,
0,
169
]
},
{
kind: "account",
path: "mint"
}
],
program: {
kind: "const",
value: [
140,
151,
37,
143,
78,
36,
137,
241,
187,
61,
16,
41,
20,
142,
13,
131,
11,
90,
19,
153,
218,
255,
16,
132,
4,
142,
123,
216,
219,
233,
248,
89
]
}
}
},
{
name: "user_token_account",
writable: true,
pda: {
seeds: [
{
kind: "account",
path: "user"
},
{
kind: "const",
value: [
6,
221,
246,
225,
215,
101,
161,
147,
217,
203,
225,
70,
206,
235,
121,
172,
28,
180,
133,
237,
95,
91,
55,
145,
58,
140,
245,
133,
126,
255,
0,
169
]
},
{
kind: "account",
path: "mint"
}
],
program: {
kind: "const",
value: [
140,
151,
37,
143,
78,
36,
137,
241,
187,
61,
16,
41,
20,
142,
13,
131,
11,
90,
19,
153,
218,
255,
16,
132,
4,
142,
123,
216,
219,
233,
248,
89
]
}
}
},
{
name: "associated_token_program",
address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
},
{
name: "system_program",
address: "11111111111111111111111111111111"
},
{
name: "token_program",
address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
},
{
name: "event_authority",
pda: {
seeds: [
{
kind: "const",
value: [
95,
95,
101,
118,
101,
110,
116,
95,
97,
117,
116,
104,
111,
114,
105,
116,
121
]
}
]
}
},
{
name: "program"
}
],
args: [
]
},
{
name: "wrap_sol_send",
docs: [
"Migrate bonding curve to raydium cpmm by admin"
],
discriminator: [
211,
142,
17,
183,
200,
108,
214,
0
],
accounts: [
{
name: "payer",
writable: true,
signer: true
},
{
name: "global",
pda: {
seeds: [
{
kind: "const",
value: [
103,
108,
111,
98,
97,
108
]
}
]
}
},
{
name: "mint"
},
{
name: "wsol_mint",
writable: true
},
{
name: "bonding_curve",
writable: true,
pda: {
seeds: [
{
kind: "const",
value: [
98,
111,
110,
100,
105,
110,
103,
45,
99,
117,
114,
118,
101
]
},
{
kind: "account",
path: "mint"
}
]
}
},
{
name: "bonding_curve_token_account",
writable: true,
pda: {
seeds: [
{
kind: "account",
path: "bonding_curve"
},
{
kind: "const",
value: [
6,
221,
246,
225,
215,
101,
161,
147,
217,
203,
225,
70,
206,
235,
121,
172,
28,
180,
133,
237,
95,
91,
55,
145,
58,
140,
245,
133,
126,
255,
0,
169
]
},
{
kind: "account",
path: "mint"
}
],
program: {
kind: "const",
value: [
140,
151,
37,
143,
78,
36,
137,
241,
187,
61,
16,
41,
20,
142,
13,
131,
11,
90,
19,
153,
218,
255,
16,
132,
4,
142,
123,
216,
219,
233,
248,
89
]
}
}
},
{
name: "bonding_curve_wsol_account",
writable: true,
pda: {
seeds: [
{
kind: "account",
path: "bonding_curve"
},
{
kind: "const",
value: [
6,
221,
246,
225,
215,
101,
161,
147,
217,
203,
225,
70,
206,
235,
121,
172,
28,
180,
133,
237,
95,
91,
55,
145,
58,
140,
245,
133,
126,
255,
0,
169
]
},
{
kind: "account",
path: "wsol_mint"
}
],
program: {
kind: "const",
value: [
140,
151,
37,
143,
78,
36,
137,
241,
187,
61,
16,
41,
20,
142,
13,
131,
11,
90,
19,
153,
218,
255,
16,
132,
4,
142,
123,
216,
219,
233,
248,
89
]
}
}
},
{
name: "associated_token_program",
address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
},
{
name: "system_program",
address: "11111111111111111111111111111111"
},
{
name: "token_program",
address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
},
{
name: "rent",
address: "SysvarRent111111111111111111111111111111111"
},
{
name: "event_authority",
pda: {
seeds: [
{
kind: "const",
value: [
95,
95,
101,
118,
101,
110,
116,
95,
97,
117,
116,
104,
111,
114,
105,
116,
121
]
}
]
}
},
{
name: "program"
}
],
args: [
]
},
{
name: "wrap_sol_sync",
discriminator: [
123,
246,
143,
62,
12,
216,
36,
177
],
accounts: [
{
name: "payer",
writable: true,
signer: true
},
{
name: "global",
pda: {
seeds: [
{
kind: "const",
value: [
103,
108,
111,
98,
97,
108
]
}
]
}
},
{
name: "mint"
},
{
name: "wsol_mint",
writable: true
},
{
name: "bonding_curve",
writable: true,
pda: {
seeds: [
{
kind: "const",
value: [
98,
111,
110,
100,
105,
110,
103,
45,
99,
117,
114,
118,
101
]
},
{
kind: "account",
path: "mint"
}
]
}
},
{
name: "bonding_curve_token_account",
writable: true,
pda: {
seeds: [
{
kind: "account",
path: "bonding_curve"
},
{
kind: "const",
value: [
6,
221,
246,
225,
215,
101,
161,
147,
217,
203,
225,
70,
206,
235,
121,
172,
28,
180,
133,
237,
95,
91,
55,
145,
58,
140,
245,
133,
126,
255,
0,
169
]
},
{
kind: "account",
path: "mint"
}
],
program: {
kind: "const",
value: [
140,
151,
37,
143,
78,
36,
137,
241,
187,
61,
16,
41,
20,
142,
13,
131,
11,
90,
19,
153,
218,
255,
16,
132,
4,
142,
123,
216,
219,
233,
248,
89
]
}
}
},
{
name: "bonding_curve_wsol_account",
writable: true,
pda: {
seeds: [
{
kind: "account",
path: "bonding_curve"
},
{
kind: "const",
value: [
6,
221,
246,
225,
215,
101,
161,
147,
217,
203,
225,
70,
206,
235,
121,
172,
28,
180,
133,
237,
95,
91,
55,
145,
58,
140,
245,
133,
126,
255,
0,
169
]
},
{
kind: "account",
path: "wsol_mint"
}
],
program: {
kind: "const",
value: [
140,
151,
37,
143,
78,
36,
137,
241,
187,
61,
16,
41,
20,
142,
13,
131,
11,
90,
19,
153,
218,
255,
16,
132,
4,
142,
123,
216,
219,
233,
248,
89
]
}
}
},
{
name: "associated_token_program",
address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
},
{
name: "system_program",
address: "11111111111111111111111111111111"
},
{
name: "token_program",
address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
},
{
name: "rent",
address: "SysvarRent111111111111111111111111111111111"
},
{
name: "event_authority",
pda: {
seeds: [
{
kind: "const",
value: [
95,
95,
101,
118,
101,
110,
116,
95,
97,
117,
116,
104,
111,
114,
105,
116,
121
]
}
]
}
},
{
name: "program"
}
],
args: [
]
}
];
var accounts = [
{
name: "AmmConfig",
discriminator: [
218,
244,
33,
104,
203,
203,
43,
111
]
},
{
name: "BondingCurve",
discriminator: [
23,
183,
248,
55,
96,
216,
172,
96
]
},
{
name: "Global",
discriminator: [
167,
232,
232,
177,
200,
108,
114,
127
]
},
{
name: "LastWithdraw",
discriminator: [
203,
18,
220,
103,
120,
145,
187,
2
]
}
];
var events = [
{
name: "CompleteEvent",
discriminator: [
95,
114,
97,
156,
212,
46,
152,
8
]
},
{
name: "CompleteMigrationEvent",
discriminator: [
128,
85,
109,
166,
81,
4,
177,
161
]
},
{
name: "CreateEvent",
discriminator: [
27,
114,
169,
77,
222,
235,
99,
118
]
},
{
name: "SetGlobalCfgEvent",
discriminator: [
104,
98,
139,
215,
7,
31,
153,
58
]
},
{
name: "TradeEvent",
discriminator: [
189,
219,
127,
211,
78,
230,
97,
238
]
},
{
name: "WithdrawEvent",
discriminator: [
22,
9,
133,
26,
160,
44,
71,
192
]
}
];
var errors = [
{
code: 6000,
name: "NotInitialized",
msg: "The program is not initialized."
},
{
code: 6001,
name: "AlreadyInitialized",
msg: "The program is already initialized."
},
{
code: 6002,
name: "BondingCurveNotActive",
msg: "Bonding curve is not active."
},
{
code: 6003,
name: "BondingCurveComplete",
msg: "The bonding curve has completed."
},
{
code: 6004,
name: "BondingCurveNotComplete",
msg: "The bonding curve has not completed."
},
{
code: 6005,
name: "InvalidFee",
msg: "Invalid fee."
},
{
code: 6006,
name: "InvalidFeeRecipient",
msg: "Invalid fee recipient."
},
{
code: 6007,
name: "InsufficientSOL",
msg: "Insufficient SOL."
},
{
code: 6008,
name: "InsufficientTokens",
msg: "Insufficient tokens."
},
{
code: 6009,
name: "MaxSOLCostExceeded",
msg: "Max SOL Cost Exceeded."
},
{
code: 6010,
name: "MinBuy",
msg: "Min buy is 1 Token."
},
{
code: 6011,
name: "MinSell",
msg: "Min sell is 1 Token."
},
{
code: 6012,
name: "MinSOLOutputExceeded",
msg: "Min SOL Output Exceeded."
},
{
code: 6013,
name: "InvalidAuthority",
msg: "Invalid authority."
},
{
code: 6014,
name: "InvalidTradeAuthority",
msg: "Invalid trade authority."
},
{
code: 6015,
name: "InvalidWithdrawAuthority",
msg: "Invalid withdraw authority."
},
{
code: 6016,
name: "ArithmeticError",
msg: "Arithmetic error."
}
];
var types = [
{
name: "ActiveParams",
type: {
kind: "struct",
fields: [
{
name: "active",
type: "bool"
}
]
}
},
{
name: "AmmConfig",
docs: [
"Holds the current owner of the factory"
],
type: {
kind: "struct",
fields: [
{
name: "bump",
docs: [
"Bump to identify PDA"
],
type: "u8"
},
{
name: "disable_create_pool",
docs: [
"Status to control if new pool can be create"
],
type: "bool"
},
{
name: "index",
docs: [
"Config index"
],
type: "u16"
},
{
name: "trade_fee_rate",
docs: [
"The trade fee, denominated in hundredths of a bip (10^-6)"
],
type: "u64"
},
{
name: "protocol_fee_rate",
docs: [
"The protocol fee"
],
type: "u64"
},
{
name: "fund_fee_rate",
docs: [
"The fund fee, denominated in hundredths of a bip (10^-6)"
],
type: "u64"
},
{
name: "create_pool_fee",
docs: [
"Fee for create a new pool"
],
type: "u64"
},
{
name: "protocol_owner",
docs: [
"Address of the protocol fee owner"
],
type: "pubkey"
},
{
name: "fund_owner",
docs: [
"Address of the fund fee owner"
],
type: "pubkey"
},
{
name: "padding",
docs: [
"padding"
],
type: {
array: [
"u64",
16
]
}
}
]
}
},
{
name: "BondingCurve",
type: {
kind: "struct",
fields: [
{
name: "virtual_sol_reserves",
type: "u64"
},
{
name: "virtual_token_reserves",
type: "u64"
},
{
name: "real_sol_reserves",
type: "u64"
},
{
name: "real_token_reserves",
type: "u64"
},
{
name: "token_total_supply",
type: "u64"
},
{
name: "active",
type: "bool"
},
{
name: "creator",
type: "pubkey"
},
{
name: "trade_authority",
type: {
option: "pubkey"
}
},
{
name: "complete",
type: "bool"
}
]
}
},
{
name: "BuyParams",
type: {
kind: "struct",
fields: [
{
name: "token_amount",
type: "u64"
},
{
name: "max_sol_cost",
type: "u64"
}
]
}
},
{
name: "CompleteEvent",
type: {
kind: "struct",
fields: [
{
name: "user",
type: "pubkey"
},
{
name: "mint",
type: "pubkey"
},
{
name: "bonding_curve",
type: "pubkey"
},
{
name: "timestamp",
type: "i64"
}
]
}
},
{
name: "CompleteMigrationEvent",
type: {
kind: "struct",
fields: [
{
name: "dex",
type: "string"
},
{
name: "withdraw_authority",
type: "pubkey"
},
{
name: "mint",
type: "pubkey"
},
{
name: "creator",
type: "pubkey"
},
{
name: "mint_amount",
type: "u64"
},
{
name: "sol_amount",
type: "u64"
},
{
name: "pool_migration_fee",
type: "u64"
},
{
name: "bonding_curve",
type: "pubkey"
},
{
name: "pool",
type: "pubkey"
},
{
name: "timestamp",
type: "i64"
}
]
}
},
{
name: "CreateEvent",
type: {
kind: "struct",
fields: [
{
name: "mint",
type: "pubkey"
},
{
name: "bonding_curve",
type: "pubkey"
},
{
name: "user",
type: "pubkey"
},
{
name: "creator",
type: "pubkey"
},
{
name: "trade_authority",
type: {
option: "pubkey"
}
},
{
name: "name",
type: "string"
},
{
name: "symbol",
type: "string"
},
{
name: "uri",
type: "string"
},
{
name: "decimals",
type: "u8"
},
{
name: "timestamp",
type: "i64"
},
{
name: "virtual_token_reserves",
type: "u64"
},
{
name: "virtual_sol_reserves",
type: "u64"
},
{
name: "real_token_reserves",
type: "u64"
},
{
name: "real_sol_reserves",
type: "u64"
}
]
}
},
{
name: "CreateParams",
type: {
kind: "struct",
fields: [
{
name: "name",
type: "string"
},
{
name: "symbol",
type: "string"
},
{
name: "uri",
type: "string"
},
{
name: "trade_authority",
type: {
option: "pubkey"
}
},
{
name: "creator",
type: {
option: "pubkey"
}
}
]
}
},
{
name: "Global",
type: {
kind: "struct",
fields: [
{
name: "authority",
type: "pubkey"
},
{
name: "initialized",
type: "bool"
},
{
name: "fee_recipient",
type: "pubkey"
},
{
name: "mint_fee",
type: "u64"
},
{
name: "pool_migration_fee",
type: "u64"
},
{
name: "creator_fee_basis_points",
type: "u64"
},
{
name: "system_fee_basis_points",
type: "u64"
},
{
name: "initial_virtual_token_reserves",
type: "u64"
},
{
name: "initial_virtual_sol_reserves",
type: "u64"
},
{
name: "initial_real_token_reserves",
type: "u64"
},
{
name: "initial_real_sol_reserves",
type: "u64"
},
{
name: "initial_token_supply",
type: "u64"
},
{
name: "withdraw_authority",
type: "pubkey"
},
{
name: "padding",
type: {
array: [
"u64",
16
]
}
}
]
}
},
{
name: "LastWithdraw",
type: {
kind: "struct",
fields: [
{
name: "last_withdraw_timestamp",
type: "i64"
}
]
}
},
{
name: "SellParams",
type: {
kind: "struct",
fields: [
{
name: "token_amount",
type: "u64"
},
{
name: "min_sol_output",
type: "u64"
}
]
}
},
{
name: "SetBondingCurveParams",
type: {
kind: "struct",
fields: [
{
name: "trade_authority",
type: {
option: "pubkey"
}
}
]
}
},
{
name: "SetGlobalCfgEvent",
type: {
kind: "struct",
fields: [
{
name: "fee_recipient",
type: "pubkey"
},
{
name: "mint_fee",
type: "u64"
},
{
name: "pool_migration_fee",
type: "u64"
},
{
name: "creator_fee_basis_points",
type: "u64"
},
{
name: "system_fee_basis_points",
type: "u64"
},
{
name: "initial_virtual_token_reserves",
type: "u64"
},
{
name: "initial_virtual_sol_reserves",
type: "u64"
},
{
name: "initial_real_token_reserves",
type: "u64"
},
{
name: "initial_real_sol_reserves",
type: "u64"
},
{
name: "initial_token_supply",
type: "u64"
},
{
name: "withdraw_authority",
type: "pubkey"
},
{
name: "timestamp",
type: "i64"
}
]
}
},
{
name: "SetGlobalCfgParams",
type: {
kind: "struct",
fields: [
{
name: "creator_fee_basis_points",
type: {
option: "u64"
}
},
{
name: "system_fee_basis_points",
type: {
option: "u64"
}
},
{
name: "mint_fee",
type: {
option: "u64"
}
},
{
name: "pool_migration_fee",
type: {
option: "u64"
}
},
{
name: "fee_recipient",
type: {
option: "pubkey"
}
},
{
name: "initial_token_supply",
type: {
option: "u64"
}
},
{
name: "initial_virtual_token_reserves",
type: {
option: "u64"
}
},
{
name: "initial_virtual_sol_reserves",
type: {
option: "u64"
}
},
{
name: "initial_real_token_reserves",
type: {
option: "u64"
}
},
{
name: "withdraw_authority",
type: {
option: "pubkey"
}
}
]
}
},
{
name: "TradeEvent",
type: {
kind: "struct",
fields: [
{
name: "mint",
type: "pubkey"
},
{
name: "sol_amount",
type: "u64"
},
{
name: "token_amount",
type: "u64"
},
{
name: "is_buy",
type: "bool"
},
{
name: "user",
type: "pubkey"
},
{
name: "virtual_sol_reserves",
type: "u64"
},
{
name: "virtual_token_reserves",
type: "u64"
},
{
name: "real_sol_reserves",
type: "u64"
},
{
name: "real_token_reserves",
type: "u64"
},
{
name: "timestamp",
type: "i64"
}
]
}
},
{
name: "WithdrawEvent",
type: {
kind: "struct",
fields: [
{
name: "withdraw_authority",
type: "pubkey"
},
{
name: "mint",
type: "pubkey"
},
{
name: "total_sol_amount",
type: "u64"
},
{
name: "total_token_amount",
type: "u64"
},
{
name: "withdraw_time",
type: "i64"
}
]
}
}
];
var IDL = {
address: address,
metadata: metadata,
instructions: instructions,
accounts: accounts,
events: events,
errors: errors,
types: types
};
export { accounts, address, IDL as default, errors, events, instructions, metadata, types };
//# sourceMappingURL=happy_pump_program.json.mjs.map