forgex-cli 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +479 -0
- package/dist/bin/forgex.d.ts +12 -0
- package/dist/bin/forgex.d.ts.map +1 -0
- package/dist/bin/forgex.js +23 -0
- package/dist/bin/forgex.js.map +1 -0
- package/dist/src/adapters/codex-adapter.d.ts +238 -0
- package/dist/src/adapters/codex-adapter.d.ts.map +1 -0
- package/dist/src/adapters/codex-adapter.js +524 -0
- package/dist/src/adapters/codex-adapter.js.map +1 -0
- package/dist/src/adapters/connection.d.ts +20 -0
- package/dist/src/adapters/connection.d.ts.map +1 -0
- package/dist/src/adapters/connection.js +43 -0
- package/dist/src/adapters/connection.js.map +1 -0
- package/dist/src/adapters/ipfs.d.ts +17 -0
- package/dist/src/adapters/ipfs.d.ts.map +1 -0
- package/dist/src/adapters/ipfs.js +30 -0
- package/dist/src/adapters/ipfs.js.map +1 -0
- package/dist/src/adapters/jito-adapter.d.ts +194 -0
- package/dist/src/adapters/jito-adapter.d.ts.map +1 -0
- package/dist/src/adapters/jito-adapter.js +474 -0
- package/dist/src/adapters/jito-adapter.js.map +1 -0
- package/dist/src/adapters/rpc-adapter.d.ts +148 -0
- package/dist/src/adapters/rpc-adapter.d.ts.map +1 -0
- package/dist/src/adapters/rpc-adapter.js +410 -0
- package/dist/src/adapters/rpc-adapter.js.map +1 -0
- package/dist/src/adapters/sdk-adapter.d.ts +148 -0
- package/dist/src/adapters/sdk-adapter.d.ts.map +1 -0
- package/dist/src/adapters/sdk-adapter.js +554 -0
- package/dist/src/adapters/sdk-adapter.js.map +1 -0
- package/dist/src/commands/config/index.d.ts +8 -0
- package/dist/src/commands/config/index.d.ts.map +1 -0
- package/dist/src/commands/config/index.js +91 -0
- package/dist/src/commands/config/index.js.map +1 -0
- package/dist/src/commands/query/index.d.ts +10 -0
- package/dist/src/commands/query/index.d.ts.map +1 -0
- package/dist/src/commands/query/index.js +376 -0
- package/dist/src/commands/query/index.js.map +1 -0
- package/dist/src/commands/sniper/index.d.ts +16 -0
- package/dist/src/commands/sniper/index.d.ts.map +1 -0
- package/dist/src/commands/sniper/index.js +292 -0
- package/dist/src/commands/sniper/index.js.map +1 -0
- package/dist/src/commands/token/index.d.ts +16 -0
- package/dist/src/commands/token/index.d.ts.map +1 -0
- package/dist/src/commands/token/index.js +295 -0
- package/dist/src/commands/token/index.js.map +1 -0
- package/dist/src/commands/tools/index.d.ts +17 -0
- package/dist/src/commands/tools/index.d.ts.map +1 -0
- package/dist/src/commands/tools/index.js +626 -0
- package/dist/src/commands/tools/index.js.map +1 -0
- package/dist/src/commands/trade/index.d.ts +8 -0
- package/dist/src/commands/trade/index.d.ts.map +1 -0
- package/dist/src/commands/trade/index.js +531 -0
- package/dist/src/commands/trade/index.js.map +1 -0
- package/dist/src/commands/transfer/index.d.ts +16 -0
- package/dist/src/commands/transfer/index.d.ts.map +1 -0
- package/dist/src/commands/transfer/index.js +509 -0
- package/dist/src/commands/transfer/index.js.map +1 -0
- package/dist/src/commands/wallet/index.d.ts +10 -0
- package/dist/src/commands/wallet/index.d.ts.map +1 -0
- package/dist/src/commands/wallet/index.js +828 -0
- package/dist/src/commands/wallet/index.js.map +1 -0
- package/dist/src/config.d.ts +74 -0
- package/dist/src/config.d.ts.map +1 -0
- package/dist/src/config.js +190 -0
- package/dist/src/config.js.map +1 -0
- package/dist/src/const/IDL/index.d.ts +4 -0
- package/dist/src/const/IDL/index.d.ts.map +1 -0
- package/dist/src/const/IDL/index.js +2 -0
- package/dist/src/const/IDL/index.js.map +1 -0
- package/dist/src/const/IDL/meteora-DLMM.d.ts +10249 -0
- package/dist/src/const/IDL/meteora-DLMM.d.ts.map +1 -0
- package/dist/src/const/IDL/meteora-DLMM.js +4177 -0
- package/dist/src/const/IDL/meteora-DLMM.js.map +1 -0
- package/dist/src/const/IDL/pump-fun.d.ts +4811 -0
- package/dist/src/const/IDL/pump-fun.d.ts.map +1 -0
- package/dist/src/const/IDL/pump-fun.js +2954 -0
- package/dist/src/const/IDL/pump-fun.js.map +1 -0
- package/dist/src/const/IDL/pump-swap-IDL.d.ts +3119 -0
- package/dist/src/const/IDL/pump-swap-IDL.d.ts.map +1 -0
- package/dist/src/const/IDL/pump-swap-IDL.js +2095 -0
- package/dist/src/const/IDL/pump-swap-IDL.js.map +1 -0
- package/dist/src/const/IDL/raydium-launchlab-IDL.d.ts +4031 -0
- package/dist/src/const/IDL/raydium-launchlab-IDL.d.ts.map +1 -0
- package/dist/src/const/IDL/raydium-launchlab-IDL.js +2110 -0
- package/dist/src/const/IDL/raydium-launchlab-IDL.js.map +1 -0
- package/dist/src/const/index.d.ts +40 -0
- package/dist/src/const/index.d.ts.map +1 -0
- package/dist/src/const/index.js +57 -0
- package/dist/src/const/index.js.map +1 -0
- package/dist/src/data-source.d.ts +270 -0
- package/dist/src/data-source.d.ts.map +1 -0
- package/dist/src/data-source.js +628 -0
- package/dist/src/data-source.js.map +1 -0
- package/dist/src/data-store/index.d.ts +87 -0
- package/dist/src/data-store/index.d.ts.map +1 -0
- package/dist/src/data-store/index.js +561 -0
- package/dist/src/data-store/index.js.map +1 -0
- package/dist/src/data-store/types.d.ts +91 -0
- package/dist/src/data-store/types.d.ts.map +1 -0
- package/dist/src/data-store/types.js +8 -0
- package/dist/src/data-store/types.js.map +1 -0
- package/dist/src/index.d.ts +8 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +36 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/output.d.ts +52 -0
- package/dist/src/output.d.ts.map +1 -0
- package/dist/src/output.js +218 -0
- package/dist/src/output.js.map +1 -0
- package/dist/src/shims/store.d.ts +58 -0
- package/dist/src/shims/store.d.ts.map +1 -0
- package/dist/src/shims/store.js +55 -0
- package/dist/src/shims/store.js.map +1 -0
- package/dist/src/sol-sdk/account/index.d.ts +13 -0
- package/dist/src/sol-sdk/account/index.d.ts.map +1 -0
- package/dist/src/sol-sdk/account/index.js +174 -0
- package/dist/src/sol-sdk/account/index.js.map +1 -0
- package/dist/src/sol-sdk/account/lookupTable.d.ts +24 -0
- package/dist/src/sol-sdk/account/lookupTable.d.ts.map +1 -0
- package/dist/src/sol-sdk/account/lookupTable.js +103 -0
- package/dist/src/sol-sdk/account/lookupTable.js.map +1 -0
- package/dist/src/sol-sdk/batch/create.d.ts +23 -0
- package/dist/src/sol-sdk/batch/create.d.ts.map +1 -0
- package/dist/src/sol-sdk/batch/create.js +580 -0
- package/dist/src/sol-sdk/batch/create.js.map +1 -0
- package/dist/src/sol-sdk/batch/external-sniper.d.ts +31 -0
- package/dist/src/sol-sdk/batch/external-sniper.d.ts.map +1 -0
- package/dist/src/sol-sdk/batch/external-sniper.js +163 -0
- package/dist/src/sol-sdk/batch/external-sniper.js.map +1 -0
- package/dist/src/sol-sdk/batch/index.d.ts +144 -0
- package/dist/src/sol-sdk/batch/index.d.ts.map +1 -0
- package/dist/src/sol-sdk/batch/index.js +1573 -0
- package/dist/src/sol-sdk/batch/index.js.map +1 -0
- package/dist/src/sol-sdk/calc.d.ts +277 -0
- package/dist/src/sol-sdk/calc.d.ts.map +1 -0
- package/dist/src/sol-sdk/calc.js +590 -0
- package/dist/src/sol-sdk/calc.js.map +1 -0
- package/dist/src/sol-sdk/index.d.ts +1 -0
- package/dist/src/sol-sdk/index.d.ts.map +1 -0
- package/dist/src/sol-sdk/index.js +1 -0
- package/dist/src/sol-sdk/index.js.map +1 -0
- package/dist/src/sol-sdk/jito/index.d.ts +50 -0
- package/dist/src/sol-sdk/jito/index.d.ts.map +1 -0
- package/dist/src/sol-sdk/jito/index.js +225 -0
- package/dist/src/sol-sdk/jito/index.js.map +1 -0
- package/dist/src/sol-sdk/launchlab/index.d.ts +32 -0
- package/dist/src/sol-sdk/launchlab/index.d.ts.map +1 -0
- package/dist/src/sol-sdk/launchlab/index.js +78 -0
- package/dist/src/sol-sdk/launchlab/index.js.map +1 -0
- package/dist/src/sol-sdk/launchlab/instructions/buy.d.ts +27 -0
- package/dist/src/sol-sdk/launchlab/instructions/buy.d.ts.map +1 -0
- package/dist/src/sol-sdk/launchlab/instructions/buy.js +124 -0
- package/dist/src/sol-sdk/launchlab/instructions/buy.js.map +1 -0
- package/dist/src/sol-sdk/launchlab/instructions/create.d.ts +27 -0
- package/dist/src/sol-sdk/launchlab/instructions/create.d.ts.map +1 -0
- package/dist/src/sol-sdk/launchlab/instructions/create.js +125 -0
- package/dist/src/sol-sdk/launchlab/instructions/create.js.map +1 -0
- package/dist/src/sol-sdk/launchlab/instructions/sell.d.ts +15 -0
- package/dist/src/sol-sdk/launchlab/instructions/sell.d.ts.map +1 -0
- package/dist/src/sol-sdk/launchlab/instructions/sell.js +65 -0
- package/dist/src/sol-sdk/launchlab/instructions/sell.js.map +1 -0
- package/dist/src/sol-sdk/meteora/index.d.ts +32 -0
- package/dist/src/sol-sdk/meteora/index.d.ts.map +1 -0
- package/dist/src/sol-sdk/meteora/index.js +72 -0
- package/dist/src/sol-sdk/meteora/index.js.map +1 -0
- package/dist/src/sol-sdk/meteora/instructions/buy.d.ts +46 -0
- package/dist/src/sol-sdk/meteora/instructions/buy.d.ts.map +1 -0
- package/dist/src/sol-sdk/meteora/instructions/buy.js +153 -0
- package/dist/src/sol-sdk/meteora/instructions/buy.js.map +1 -0
- package/dist/src/sol-sdk/meteora/instructions/sell.d.ts +24 -0
- package/dist/src/sol-sdk/meteora/instructions/sell.d.ts.map +1 -0
- package/dist/src/sol-sdk/meteora/instructions/sell.js +98 -0
- package/dist/src/sol-sdk/meteora/instructions/sell.js.map +1 -0
- package/dist/src/sol-sdk/pump/index.d.ts +22 -0
- package/dist/src/sol-sdk/pump/index.d.ts.map +1 -0
- package/dist/src/sol-sdk/pump/index.js +101 -0
- package/dist/src/sol-sdk/pump/index.js.map +1 -0
- package/dist/src/sol-sdk/pump/instructions/buy.d.ts +29 -0
- package/dist/src/sol-sdk/pump/instructions/buy.d.ts.map +1 -0
- package/dist/src/sol-sdk/pump/instructions/buy.js +131 -0
- package/dist/src/sol-sdk/pump/instructions/buy.js.map +1 -0
- package/dist/src/sol-sdk/pump/instructions/createAndBuy.d.ts +36 -0
- package/dist/src/sol-sdk/pump/instructions/createAndBuy.d.ts.map +1 -0
- package/dist/src/sol-sdk/pump/instructions/createAndBuy.js +77 -0
- package/dist/src/sol-sdk/pump/instructions/createAndBuy.js.map +1 -0
- package/dist/src/sol-sdk/pump/instructions/sell.d.ts +7 -0
- package/dist/src/sol-sdk/pump/instructions/sell.d.ts.map +1 -0
- package/dist/src/sol-sdk/pump/instructions/sell.js +38 -0
- package/dist/src/sol-sdk/pump/instructions/sell.js.map +1 -0
- package/dist/src/sol-sdk/pumpswap/index.d.ts +9 -0
- package/dist/src/sol-sdk/pumpswap/index.d.ts.map +1 -0
- package/dist/src/sol-sdk/pumpswap/index.js +27 -0
- package/dist/src/sol-sdk/pumpswap/index.js.map +1 -0
- package/dist/src/sol-sdk/pumpswap/instructions/buy.d.ts +61 -0
- package/dist/src/sol-sdk/pumpswap/instructions/buy.d.ts.map +1 -0
- package/dist/src/sol-sdk/pumpswap/instructions/buy.js +215 -0
- package/dist/src/sol-sdk/pumpswap/instructions/buy.js.map +1 -0
- package/dist/src/sol-sdk/pumpswap/instructions/migrate.d.ts +3 -0
- package/dist/src/sol-sdk/pumpswap/instructions/migrate.d.ts.map +1 -0
- package/dist/src/sol-sdk/pumpswap/instructions/migrate.js +33 -0
- package/dist/src/sol-sdk/pumpswap/instructions/migrate.js.map +1 -0
- package/dist/src/sol-sdk/pumpswap/instructions/sell.d.ts +20 -0
- package/dist/src/sol-sdk/pumpswap/instructions/sell.d.ts.map +1 -0
- package/dist/src/sol-sdk/pumpswap/instructions/sell.js +107 -0
- package/dist/src/sol-sdk/pumpswap/instructions/sell.js.map +1 -0
- package/dist/src/sol-sdk/pumpswap/rpc/index.d.ts +28 -0
- package/dist/src/sol-sdk/pumpswap/rpc/index.d.ts.map +1 -0
- package/dist/src/sol-sdk/pumpswap/rpc/index.js +63 -0
- package/dist/src/sol-sdk/pumpswap/rpc/index.js.map +1 -0
- package/dist/src/sol-sdk/raydium/index.d.ts +16 -0
- package/dist/src/sol-sdk/raydium/index.d.ts.map +1 -0
- package/dist/src/sol-sdk/raydium/index.js +47 -0
- package/dist/src/sol-sdk/raydium/index.js.map +1 -0
- package/dist/src/sol-sdk/raydium/instructions/buy.d.ts +29 -0
- package/dist/src/sol-sdk/raydium/instructions/buy.d.ts.map +1 -0
- package/dist/src/sol-sdk/raydium/instructions/buy.js +106 -0
- package/dist/src/sol-sdk/raydium/instructions/buy.js.map +1 -0
- package/dist/src/sol-sdk/raydium/instructions/cpmmBuy.d.ts +29 -0
- package/dist/src/sol-sdk/raydium/instructions/cpmmBuy.d.ts.map +1 -0
- package/dist/src/sol-sdk/raydium/instructions/cpmmBuy.js +80 -0
- package/dist/src/sol-sdk/raydium/instructions/cpmmBuy.js.map +1 -0
- package/dist/src/sol-sdk/raydium/instructions/cpmmSell.d.ts +17 -0
- package/dist/src/sol-sdk/raydium/instructions/cpmmSell.d.ts.map +1 -0
- package/dist/src/sol-sdk/raydium/instructions/cpmmSell.js +56 -0
- package/dist/src/sol-sdk/raydium/instructions/cpmmSell.js.map +1 -0
- package/dist/src/sol-sdk/raydium/instructions/sell.d.ts +8558 -0
- package/dist/src/sol-sdk/raydium/instructions/sell.d.ts.map +1 -0
- package/dist/src/sol-sdk/raydium/instructions/sell.js +70 -0
- package/dist/src/sol-sdk/raydium/instructions/sell.js.map +1 -0
- package/dist/src/sol-sdk/raydium/rpc/index.d.ts +39 -0
- package/dist/src/sol-sdk/raydium/rpc/index.d.ts.map +1 -0
- package/dist/src/sol-sdk/raydium/rpc/index.js +82 -0
- package/dist/src/sol-sdk/raydium/rpc/index.js.map +1 -0
- package/dist/src/sol-sdk/raydium/rpc/raydium.d.ts +5 -0
- package/dist/src/sol-sdk/raydium/rpc/raydium.d.ts.map +1 -0
- package/dist/src/sol-sdk/raydium/rpc/raydium.js +18 -0
- package/dist/src/sol-sdk/raydium/rpc/raydium.js.map +1 -0
- package/dist/src/sol-sdk/rpc/index.d.ts +33 -0
- package/dist/src/sol-sdk/rpc/index.d.ts.map +1 -0
- package/dist/src/sol-sdk/rpc/index.js +128 -0
- package/dist/src/sol-sdk/rpc/index.js.map +1 -0
- package/dist/src/sol-sdk/transfer/index.d.ts +24 -0
- package/dist/src/sol-sdk/transfer/index.d.ts.map +1 -0
- package/dist/src/sol-sdk/transfer/index.js +65 -0
- package/dist/src/sol-sdk/transfer/index.js.map +1 -0
- package/dist/src/sol-sdk/turnover/index.d.ts +84 -0
- package/dist/src/sol-sdk/turnover/index.d.ts.map +1 -0
- package/dist/src/sol-sdk/turnover/index.js +569 -0
- package/dist/src/sol-sdk/turnover/index.js.map +1 -0
- package/dist/src/tx-tracker/detail-adapter.d.ts +100 -0
- package/dist/src/tx-tracker/detail-adapter.d.ts.map +1 -0
- package/dist/src/tx-tracker/detail-adapter.js +215 -0
- package/dist/src/tx-tracker/detail-adapter.js.map +1 -0
- package/dist/src/tx-tracker/index.d.ts +142 -0
- package/dist/src/tx-tracker/index.d.ts.map +1 -0
- package/dist/src/tx-tracker/index.js +447 -0
- package/dist/src/tx-tracker/index.js.map +1 -0
- package/dist/src/types/index.d.ts +76 -0
- package/dist/src/types/index.d.ts.map +1 -0
- package/dist/src/types/index.js +69 -0
- package/dist/src/types/index.js.map +1 -0
- package/dist/src/types/websocket.d.ts +15 -0
- package/dist/src/types/websocket.d.ts.map +1 -0
- package/dist/src/types/websocket.js +18 -0
- package/dist/src/types/websocket.js.map +1 -0
- package/dist/src/utils/index.d.ts +13 -0
- package/dist/src/utils/index.d.ts.map +1 -0
- package/dist/src/utils/index.js +174 -0
- package/dist/src/utils/index.js.map +1 -0
- package/dist/src/wallet-store.d.ts +124 -0
- package/dist/src/wallet-store.d.ts.map +1 -0
- package/dist/src/wallet-store.js +524 -0
- package/dist/src/wallet-store.js.map +1 -0
- package/package.json +86 -0
- package/scripts/postinstall.js +88 -0
|
@@ -0,0 +1,4031 @@
|
|
|
1
|
+
export type RaydiumLaunchlabIDL = {
|
|
2
|
+
address: 'LanMV9sAd7wArD4vJFi2qDdfnVhFxYSUg6eADduJ3uj';
|
|
3
|
+
metadata: {
|
|
4
|
+
name: 'raydium_launchpad';
|
|
5
|
+
version: '0.1.0';
|
|
6
|
+
spec: '0.1.0';
|
|
7
|
+
description: 'Created with Anchor';
|
|
8
|
+
};
|
|
9
|
+
instructions: [
|
|
10
|
+
{
|
|
11
|
+
name: 'buyExactIn';
|
|
12
|
+
docs: [
|
|
13
|
+
'Use the given amount of quote tokens to purchase base tokens.',
|
|
14
|
+
'# Arguments',
|
|
15
|
+
'',
|
|
16
|
+
'* `ctx` - The context of accounts',
|
|
17
|
+
'* `amount_in` - Amount of quote token to purchase',
|
|
18
|
+
'* `minimum_amount_out` - Minimum amount of base token to receive (slippage protection)',
|
|
19
|
+
'* `share_fee_rate` - Fee rate for the share',
|
|
20
|
+
''
|
|
21
|
+
];
|
|
22
|
+
discriminator: [250, 234, 13, 123, 213, 156, 19, 236];
|
|
23
|
+
accounts: [
|
|
24
|
+
{
|
|
25
|
+
name: 'payer';
|
|
26
|
+
docs: [
|
|
27
|
+
'The user performing the swap operation',
|
|
28
|
+
'Must sign the transaction and pay for fees'
|
|
29
|
+
];
|
|
30
|
+
signer: true;
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
name: 'authority';
|
|
34
|
+
docs: [
|
|
35
|
+
'PDA that acts as the authority for pool vault operations',
|
|
36
|
+
'Generated using AUTH_SEED'
|
|
37
|
+
];
|
|
38
|
+
pda: {
|
|
39
|
+
seeds: [
|
|
40
|
+
{
|
|
41
|
+
kind: 'const';
|
|
42
|
+
value: [118, 97, 117, 108, 116, 95, 97, 117, 116, 104, 95, 115, 101, 101, 100];
|
|
43
|
+
}
|
|
44
|
+
];
|
|
45
|
+
};
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: 'global_config';
|
|
49
|
+
docs: [
|
|
50
|
+
'Global configuration account containing protocol-wide settings',
|
|
51
|
+
'Used to read protocol fee rates and curve type'
|
|
52
|
+
];
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: 'platform_config';
|
|
56
|
+
docs: [
|
|
57
|
+
'Platform configuration account containing platform-wide settings',
|
|
58
|
+
'Used to read platform fee rate'
|
|
59
|
+
];
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: 'pool_state';
|
|
63
|
+
docs: [
|
|
64
|
+
'The pool state account where the swap will be performed',
|
|
65
|
+
'Contains current pool parameters and balances'
|
|
66
|
+
];
|
|
67
|
+
writable: true;
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: 'user_base_token';
|
|
71
|
+
docs: [
|
|
72
|
+
"The user's token account for base tokens (tokens being bought)",
|
|
73
|
+
'Will receive the output tokens after the swap'
|
|
74
|
+
];
|
|
75
|
+
writable: true;
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name: 'user_quote_token';
|
|
79
|
+
docs: [
|
|
80
|
+
"The user's token account for quote tokens (tokens being sold)",
|
|
81
|
+
'Will be debited for the input amount'
|
|
82
|
+
];
|
|
83
|
+
writable: true;
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
name: 'base_vault';
|
|
87
|
+
docs: ["The pool's vault for base tokens", 'Will be debited to send tokens to the user'];
|
|
88
|
+
writable: true;
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
name: 'quote_vault';
|
|
92
|
+
docs: [
|
|
93
|
+
"The pool's vault for quote tokens",
|
|
94
|
+
'Will receive the input tokens from the user'
|
|
95
|
+
];
|
|
96
|
+
writable: true;
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
name: 'base_token_mint';
|
|
100
|
+
docs: ['The mint of the base token', 'Used for transfer fee calculations if applicable'];
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
name: 'quote_token_mint';
|
|
104
|
+
docs: ['The mint of the quote token'];
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
name: 'base_token_program';
|
|
108
|
+
docs: ['SPL Token program for base token transfers'];
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
name: 'quote_token_program';
|
|
112
|
+
docs: ['SPL Token program for quote token transfers'];
|
|
113
|
+
address: 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA';
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
name: 'event_authority';
|
|
117
|
+
pda: {
|
|
118
|
+
seeds: [
|
|
119
|
+
{
|
|
120
|
+
kind: 'const';
|
|
121
|
+
value: [
|
|
122
|
+
95,
|
|
123
|
+
95,
|
|
124
|
+
101,
|
|
125
|
+
118,
|
|
126
|
+
101,
|
|
127
|
+
110,
|
|
128
|
+
116,
|
|
129
|
+
95,
|
|
130
|
+
97,
|
|
131
|
+
117,
|
|
132
|
+
116,
|
|
133
|
+
104,
|
|
134
|
+
111,
|
|
135
|
+
114,
|
|
136
|
+
105,
|
|
137
|
+
116,
|
|
138
|
+
121
|
|
139
|
+
];
|
|
140
|
+
}
|
|
141
|
+
];
|
|
142
|
+
};
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
name: 'program';
|
|
146
|
+
}
|
|
147
|
+
];
|
|
148
|
+
args: [
|
|
149
|
+
{
|
|
150
|
+
name: 'amount_in';
|
|
151
|
+
type: 'u64';
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
name: 'minimum_amount_out';
|
|
155
|
+
type: 'u64';
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
name: 'share_fee_rate';
|
|
159
|
+
type: 'u64';
|
|
160
|
+
}
|
|
161
|
+
];
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
name: 'buyExactOut';
|
|
165
|
+
docs: [
|
|
166
|
+
'Use quote tokens to purchase the given amount of base tokens.',
|
|
167
|
+
'# Arguments',
|
|
168
|
+
'',
|
|
169
|
+
'* `ctx` - The context of accounts',
|
|
170
|
+
'* `amount_out` - Amount of base token to receive',
|
|
171
|
+
'* `maximum_amount_in` - Maximum amount of quote token to purchase (slippage protection)',
|
|
172
|
+
'* `share_fee_rate` - Fee rate for the share'
|
|
173
|
+
];
|
|
174
|
+
discriminator: [24, 211, 116, 40, 105, 3, 153, 56];
|
|
175
|
+
accounts: [
|
|
176
|
+
{
|
|
177
|
+
name: 'payer';
|
|
178
|
+
docs: [
|
|
179
|
+
'The user performing the swap operation',
|
|
180
|
+
'Must sign the transaction and pay for fees'
|
|
181
|
+
];
|
|
182
|
+
signer: true;
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
name: 'authority';
|
|
186
|
+
docs: [
|
|
187
|
+
'PDA that acts as the authority for pool vault operations',
|
|
188
|
+
'Generated using AUTH_SEED'
|
|
189
|
+
];
|
|
190
|
+
pda: {
|
|
191
|
+
seeds: [
|
|
192
|
+
{
|
|
193
|
+
kind: 'const';
|
|
194
|
+
value: [118, 97, 117, 108, 116, 95, 97, 117, 116, 104, 95, 115, 101, 101, 100];
|
|
195
|
+
}
|
|
196
|
+
];
|
|
197
|
+
};
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
name: 'global_config';
|
|
201
|
+
docs: [
|
|
202
|
+
'Global configuration account containing protocol-wide settings',
|
|
203
|
+
'Used to read protocol fee rates and curve type'
|
|
204
|
+
];
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
name: 'platform_config';
|
|
208
|
+
docs: [
|
|
209
|
+
'Platform configuration account containing platform-wide settings',
|
|
210
|
+
'Used to read platform fee rate'
|
|
211
|
+
];
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
name: 'pool_state';
|
|
215
|
+
docs: [
|
|
216
|
+
'The pool state account where the swap will be performed',
|
|
217
|
+
'Contains current pool parameters and balances'
|
|
218
|
+
];
|
|
219
|
+
writable: true;
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
name: 'user_base_token';
|
|
223
|
+
docs: [
|
|
224
|
+
"The user's token account for base tokens (tokens being bought)",
|
|
225
|
+
'Will receive the output tokens after the swap'
|
|
226
|
+
];
|
|
227
|
+
writable: true;
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
name: 'user_quote_token';
|
|
231
|
+
docs: [
|
|
232
|
+
"The user's token account for quote tokens (tokens being sold)",
|
|
233
|
+
'Will be debited for the input amount'
|
|
234
|
+
];
|
|
235
|
+
writable: true;
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
name: 'base_vault';
|
|
239
|
+
docs: ["The pool's vault for base tokens", 'Will be debited to send tokens to the user'];
|
|
240
|
+
writable: true;
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
name: 'quote_vault';
|
|
244
|
+
docs: [
|
|
245
|
+
"The pool's vault for quote tokens",
|
|
246
|
+
'Will receive the input tokens from the user'
|
|
247
|
+
];
|
|
248
|
+
writable: true;
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
name: 'base_token_mint';
|
|
252
|
+
docs: ['The mint of the base token', 'Used for transfer fee calculations if applicable'];
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
name: 'quote_token_mint';
|
|
256
|
+
docs: ['The mint of the quote token'];
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
name: 'base_token_program';
|
|
260
|
+
docs: ['SPL Token program for base token transfers'];
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
name: 'quote_token_program';
|
|
264
|
+
docs: ['SPL Token program for quote token transfers'];
|
|
265
|
+
address: 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA';
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
name: 'event_authority';
|
|
269
|
+
pda: {
|
|
270
|
+
seeds: [
|
|
271
|
+
{
|
|
272
|
+
kind: 'const';
|
|
273
|
+
value: [
|
|
274
|
+
95,
|
|
275
|
+
95,
|
|
276
|
+
101,
|
|
277
|
+
118,
|
|
278
|
+
101,
|
|
279
|
+
110,
|
|
280
|
+
116,
|
|
281
|
+
95,
|
|
282
|
+
97,
|
|
283
|
+
117,
|
|
284
|
+
116,
|
|
285
|
+
104,
|
|
286
|
+
111,
|
|
287
|
+
114,
|
|
288
|
+
105,
|
|
289
|
+
116,
|
|
290
|
+
121
|
|
291
|
+
];
|
|
292
|
+
}
|
|
293
|
+
];
|
|
294
|
+
};
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
name: 'program';
|
|
298
|
+
}
|
|
299
|
+
];
|
|
300
|
+
args: [
|
|
301
|
+
{
|
|
302
|
+
name: 'amount_out';
|
|
303
|
+
type: 'u64';
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
name: 'maximum_amount_in';
|
|
307
|
+
type: 'u64';
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
name: 'share_fee_rate';
|
|
311
|
+
type: 'u64';
|
|
312
|
+
}
|
|
313
|
+
];
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
name: 'claim_platform_fee';
|
|
317
|
+
docs: ['Claim platform fee', '# Arguments', '', '* `ctx` - The context of accounts', ''];
|
|
318
|
+
discriminator: [156, 39, 208, 135, 76, 237, 61, 72];
|
|
319
|
+
accounts: [
|
|
320
|
+
{
|
|
321
|
+
name: 'platform_fee_wallet';
|
|
322
|
+
docs: ['Only the wallet stored in platform_config can collect platform fees'];
|
|
323
|
+
writable: true;
|
|
324
|
+
signer: true;
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
name: 'authority';
|
|
328
|
+
docs: [
|
|
329
|
+
'PDA that acts as the authority for pool vault and mint operations',
|
|
330
|
+
'Generated using AUTH_SEED'
|
|
331
|
+
];
|
|
332
|
+
pda: {
|
|
333
|
+
seeds: [
|
|
334
|
+
{
|
|
335
|
+
kind: 'const';
|
|
336
|
+
value: [118, 97, 117, 108, 116, 95, 97, 117, 116, 104, 95, 115, 101, 101, 100];
|
|
337
|
+
}
|
|
338
|
+
];
|
|
339
|
+
};
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
name: 'pool_state';
|
|
343
|
+
docs: [
|
|
344
|
+
"Account that stores the pool's state and parameters",
|
|
345
|
+
'PDA generated using POOL_SEED and both token mints'
|
|
346
|
+
];
|
|
347
|
+
writable: true;
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
name: 'platform_config';
|
|
351
|
+
docs: ['The platform config account'];
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
name: 'quote_vault';
|
|
355
|
+
writable: true;
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
name: 'recipient_token_account';
|
|
359
|
+
docs: ['The address that receives the collected quote token fees'];
|
|
360
|
+
writable: true;
|
|
361
|
+
pda: {
|
|
362
|
+
seeds: [
|
|
363
|
+
{
|
|
364
|
+
kind: 'account';
|
|
365
|
+
path: 'platform_fee_wallet';
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
kind: 'const';
|
|
369
|
+
value: [
|
|
370
|
+
6,
|
|
371
|
+
221,
|
|
372
|
+
246,
|
|
373
|
+
225,
|
|
374
|
+
215,
|
|
375
|
+
101,
|
|
376
|
+
161,
|
|
377
|
+
147,
|
|
378
|
+
217,
|
|
379
|
+
203,
|
|
380
|
+
225,
|
|
381
|
+
70,
|
|
382
|
+
206,
|
|
383
|
+
235,
|
|
384
|
+
121,
|
|
385
|
+
172,
|
|
386
|
+
28,
|
|
387
|
+
180,
|
|
388
|
+
133,
|
|
389
|
+
237,
|
|
390
|
+
95,
|
|
391
|
+
91,
|
|
392
|
+
55,
|
|
393
|
+
145,
|
|
394
|
+
58,
|
|
395
|
+
140,
|
|
396
|
+
245,
|
|
397
|
+
133,
|
|
398
|
+
126,
|
|
399
|
+
255,
|
|
400
|
+
0,
|
|
401
|
+
169
|
|
402
|
+
];
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
kind: 'account';
|
|
406
|
+
path: 'quote_mint';
|
|
407
|
+
}
|
|
408
|
+
];
|
|
409
|
+
program: {
|
|
410
|
+
kind: 'const';
|
|
411
|
+
value: [
|
|
412
|
+
140,
|
|
413
|
+
151,
|
|
414
|
+
37,
|
|
415
|
+
143,
|
|
416
|
+
78,
|
|
417
|
+
36,
|
|
418
|
+
137,
|
|
419
|
+
241,
|
|
420
|
+
187,
|
|
421
|
+
61,
|
|
422
|
+
16,
|
|
423
|
+
41,
|
|
424
|
+
20,
|
|
425
|
+
142,
|
|
426
|
+
13,
|
|
427
|
+
131,
|
|
428
|
+
11,
|
|
429
|
+
90,
|
|
430
|
+
19,
|
|
431
|
+
153,
|
|
432
|
+
218,
|
|
433
|
+
255,
|
|
434
|
+
16,
|
|
435
|
+
132,
|
|
436
|
+
4,
|
|
437
|
+
142,
|
|
438
|
+
123,
|
|
439
|
+
216,
|
|
440
|
+
219,
|
|
441
|
+
233,
|
|
442
|
+
248,
|
|
443
|
+
89
|
|
444
|
+
];
|
|
445
|
+
};
|
|
446
|
+
};
|
|
447
|
+
},
|
|
448
|
+
{
|
|
449
|
+
name: 'quote_mint';
|
|
450
|
+
docs: ['The mint of quote token vault'];
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
name: 'token_program';
|
|
454
|
+
docs: ['SPL program for input token transfers'];
|
|
455
|
+
address: 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA';
|
|
456
|
+
},
|
|
457
|
+
{
|
|
458
|
+
name: 'system_program';
|
|
459
|
+
docs: ['Required for account creation'];
|
|
460
|
+
address: '11111111111111111111111111111111';
|
|
461
|
+
},
|
|
462
|
+
{
|
|
463
|
+
name: 'associated_token_program';
|
|
464
|
+
docs: ['Required for associated token program'];
|
|
465
|
+
address: 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL';
|
|
466
|
+
}
|
|
467
|
+
];
|
|
468
|
+
args: [];
|
|
469
|
+
},
|
|
470
|
+
{
|
|
471
|
+
name: 'claim_vested_token';
|
|
472
|
+
docs: ['Claim vested token', '# Arguments'];
|
|
473
|
+
discriminator: [49, 33, 104, 30, 189, 157, 79, 35];
|
|
474
|
+
accounts: [
|
|
475
|
+
{
|
|
476
|
+
name: 'beneficiary';
|
|
477
|
+
docs: ['The beneficiary of the vesting account'];
|
|
478
|
+
writable: true;
|
|
479
|
+
signer: true;
|
|
480
|
+
},
|
|
481
|
+
{
|
|
482
|
+
name: 'authority';
|
|
483
|
+
docs: [
|
|
484
|
+
'PDA that acts as the authority for pool vault and mint operations',
|
|
485
|
+
'Generated using AUTH_SEED'
|
|
486
|
+
];
|
|
487
|
+
pda: {
|
|
488
|
+
seeds: [
|
|
489
|
+
{
|
|
490
|
+
kind: 'const';
|
|
491
|
+
value: [118, 97, 117, 108, 116, 95, 97, 117, 116, 104, 95, 115, 101, 101, 100];
|
|
492
|
+
}
|
|
493
|
+
];
|
|
494
|
+
};
|
|
495
|
+
},
|
|
496
|
+
{
|
|
497
|
+
name: 'pool_state';
|
|
498
|
+
docs: [
|
|
499
|
+
"Account that stores the pool's state and parameters",
|
|
500
|
+
'PDA generated using POOL_SEED and both token mints'
|
|
501
|
+
];
|
|
502
|
+
writable: true;
|
|
503
|
+
},
|
|
504
|
+
{
|
|
505
|
+
name: 'vesting_record';
|
|
506
|
+
docs: ['The vesting record account'];
|
|
507
|
+
writable: true;
|
|
508
|
+
pda: {
|
|
509
|
+
seeds: [
|
|
510
|
+
{
|
|
511
|
+
kind: 'const';
|
|
512
|
+
value: [112, 111, 111, 108, 95, 118, 101, 115, 116, 105, 110, 103];
|
|
513
|
+
},
|
|
514
|
+
{
|
|
515
|
+
kind: 'account';
|
|
516
|
+
path: 'pool_state';
|
|
517
|
+
},
|
|
518
|
+
{
|
|
519
|
+
kind: 'account';
|
|
520
|
+
path: 'beneficiary';
|
|
521
|
+
}
|
|
522
|
+
];
|
|
523
|
+
};
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
name: 'base_vault';
|
|
527
|
+
docs: ["The pool's vault for base tokens", 'Will be debited to send tokens to the user'];
|
|
528
|
+
writable: true;
|
|
529
|
+
},
|
|
530
|
+
{
|
|
531
|
+
name: 'user_base_token';
|
|
532
|
+
writable: true;
|
|
533
|
+
signer: true;
|
|
534
|
+
},
|
|
535
|
+
{
|
|
536
|
+
name: 'base_token_mint';
|
|
537
|
+
docs: [
|
|
538
|
+
'The mint for the base token (token being sold)',
|
|
539
|
+
'Created in this instruction with specified decimals'
|
|
540
|
+
];
|
|
541
|
+
},
|
|
542
|
+
{
|
|
543
|
+
name: 'base_token_program';
|
|
544
|
+
docs: ['SPL Token program for the base token', 'Must be the standard Token program'];
|
|
545
|
+
address: 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA';
|
|
546
|
+
},
|
|
547
|
+
{
|
|
548
|
+
name: 'system_program';
|
|
549
|
+
docs: ['Required for account creation'];
|
|
550
|
+
address: '11111111111111111111111111111111';
|
|
551
|
+
},
|
|
552
|
+
{
|
|
553
|
+
name: 'associated_token_program';
|
|
554
|
+
docs: ['Required for associated token program'];
|
|
555
|
+
address: 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL';
|
|
556
|
+
}
|
|
557
|
+
];
|
|
558
|
+
args: [];
|
|
559
|
+
},
|
|
560
|
+
{
|
|
561
|
+
name: 'collect_fee';
|
|
562
|
+
docs: [
|
|
563
|
+
'Collects accumulated fees from the pool',
|
|
564
|
+
'# Arguments',
|
|
565
|
+
'',
|
|
566
|
+
'* `ctx` - The context of accounts',
|
|
567
|
+
''
|
|
568
|
+
];
|
|
569
|
+
discriminator: [60, 173, 247, 103, 4, 93, 130, 48];
|
|
570
|
+
accounts: [
|
|
571
|
+
{
|
|
572
|
+
name: 'owner';
|
|
573
|
+
docs: ['Only protocol_fee_owner saved in global_config can collect protocol fee now'];
|
|
574
|
+
signer: true;
|
|
575
|
+
},
|
|
576
|
+
{
|
|
577
|
+
name: 'authority';
|
|
578
|
+
pda: {
|
|
579
|
+
seeds: [
|
|
580
|
+
{
|
|
581
|
+
kind: 'const';
|
|
582
|
+
value: [118, 97, 117, 108, 116, 95, 97, 117, 116, 104, 95, 115, 101, 101, 100];
|
|
583
|
+
}
|
|
584
|
+
];
|
|
585
|
+
};
|
|
586
|
+
},
|
|
587
|
+
{
|
|
588
|
+
name: 'pool_state';
|
|
589
|
+
docs: ['Pool state stores accumulated protocol fee amount'];
|
|
590
|
+
writable: true;
|
|
591
|
+
},
|
|
592
|
+
{
|
|
593
|
+
name: 'global_config';
|
|
594
|
+
docs: ['Global config account stores owner'];
|
|
595
|
+
},
|
|
596
|
+
{
|
|
597
|
+
name: 'quote_vault';
|
|
598
|
+
docs: ['The address that holds pool tokens for quote token'];
|
|
599
|
+
writable: true;
|
|
600
|
+
},
|
|
601
|
+
{
|
|
602
|
+
name: 'quote_mint';
|
|
603
|
+
docs: ['The mint of quote token vault'];
|
|
604
|
+
},
|
|
605
|
+
{
|
|
606
|
+
name: 'recipient_token_account';
|
|
607
|
+
docs: ['The address that receives the collected quote token fees'];
|
|
608
|
+
writable: true;
|
|
609
|
+
},
|
|
610
|
+
{
|
|
611
|
+
name: 'token_program';
|
|
612
|
+
docs: ['SPL program for input token transfers'];
|
|
613
|
+
address: 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA';
|
|
614
|
+
}
|
|
615
|
+
];
|
|
616
|
+
args: [];
|
|
617
|
+
},
|
|
618
|
+
{
|
|
619
|
+
name: 'collect_migrate_fee';
|
|
620
|
+
docs: [
|
|
621
|
+
'Collects migrate fees from the pool',
|
|
622
|
+
'# Arguments',
|
|
623
|
+
'',
|
|
624
|
+
'* `ctx` - The context of accounts',
|
|
625
|
+
''
|
|
626
|
+
];
|
|
627
|
+
discriminator: [255, 186, 150, 223, 235, 118, 201, 186];
|
|
628
|
+
accounts: [
|
|
629
|
+
{
|
|
630
|
+
name: 'owner';
|
|
631
|
+
docs: ['Only migrate_fee_owner saved in global_config can collect migrate fee now'];
|
|
632
|
+
signer: true;
|
|
633
|
+
},
|
|
634
|
+
{
|
|
635
|
+
name: 'authority';
|
|
636
|
+
pda: {
|
|
637
|
+
seeds: [
|
|
638
|
+
{
|
|
639
|
+
kind: 'const';
|
|
640
|
+
value: [118, 97, 117, 108, 116, 95, 97, 117, 116, 104, 95, 115, 101, 101, 100];
|
|
641
|
+
}
|
|
642
|
+
];
|
|
643
|
+
};
|
|
644
|
+
},
|
|
645
|
+
{
|
|
646
|
+
name: 'pool_state';
|
|
647
|
+
docs: ['Pool state stores accumulated protocol fee amount'];
|
|
648
|
+
writable: true;
|
|
649
|
+
},
|
|
650
|
+
{
|
|
651
|
+
name: 'global_config';
|
|
652
|
+
docs: ['Global config account stores owner'];
|
|
653
|
+
},
|
|
654
|
+
{
|
|
655
|
+
name: 'quote_vault';
|
|
656
|
+
docs: ['The address that holds pool tokens for quote token'];
|
|
657
|
+
writable: true;
|
|
658
|
+
},
|
|
659
|
+
{
|
|
660
|
+
name: 'quote_mint';
|
|
661
|
+
docs: ['The mint of quote token vault'];
|
|
662
|
+
},
|
|
663
|
+
{
|
|
664
|
+
name: 'recipient_token_account';
|
|
665
|
+
docs: ['The address that receives the collected quote token fees'];
|
|
666
|
+
writable: true;
|
|
667
|
+
},
|
|
668
|
+
{
|
|
669
|
+
name: 'token_program';
|
|
670
|
+
docs: ['SPL program for input token transfers'];
|
|
671
|
+
address: 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA';
|
|
672
|
+
}
|
|
673
|
+
];
|
|
674
|
+
args: [];
|
|
675
|
+
},
|
|
676
|
+
{
|
|
677
|
+
name: 'create_config';
|
|
678
|
+
docs: [
|
|
679
|
+
'Creates a new configuration',
|
|
680
|
+
'# Arguments',
|
|
681
|
+
'',
|
|
682
|
+
'* `ctx` - The accounts needed by instruction',
|
|
683
|
+
'* `curve_type` - The type of bonding curve (0: ConstantProduct)',
|
|
684
|
+
'* `index` - The index of config, there may be multiple config with the same curve type.',
|
|
685
|
+
'* `trade_fee_rate` - Trade fee rate, must be less than RATE_DENOMINATOR_VALUE',
|
|
686
|
+
''
|
|
687
|
+
];
|
|
688
|
+
discriminator: [201, 207, 243, 114, 75, 111, 47, 189];
|
|
689
|
+
accounts: [
|
|
690
|
+
{
|
|
691
|
+
name: 'owner';
|
|
692
|
+
docs: [
|
|
693
|
+
'The protocol owner/admin account',
|
|
694
|
+
'Must match the predefined admin address',
|
|
695
|
+
'Has authority to create and modify protocol configurations'
|
|
696
|
+
];
|
|
697
|
+
writable: true;
|
|
698
|
+
signer: true;
|
|
699
|
+
address: 'GThUX1Atko4tqhN2NaiTazWSeFWMuiUvfFnyJyUghFMJ';
|
|
700
|
+
},
|
|
701
|
+
{
|
|
702
|
+
name: 'global_config';
|
|
703
|
+
docs: [
|
|
704
|
+
'Global configuration account that stores protocol-wide settings',
|
|
705
|
+
'PDA generated using GLOBAL_CONFIG_SEED, quote token mint, and curve type',
|
|
706
|
+
'Stores fee rates and protocol parameters'
|
|
707
|
+
];
|
|
708
|
+
writable: true;
|
|
709
|
+
pda: {
|
|
710
|
+
seeds: [
|
|
711
|
+
{
|
|
712
|
+
kind: 'const';
|
|
713
|
+
value: [103, 108, 111, 98, 97, 108, 95, 99, 111, 110, 102, 105, 103];
|
|
714
|
+
},
|
|
715
|
+
{
|
|
716
|
+
kind: 'account';
|
|
717
|
+
path: 'quote_token_mint';
|
|
718
|
+
},
|
|
719
|
+
{
|
|
720
|
+
kind: 'arg';
|
|
721
|
+
path: 'curve_type';
|
|
722
|
+
},
|
|
723
|
+
{
|
|
724
|
+
kind: 'arg';
|
|
725
|
+
path: 'index';
|
|
726
|
+
}
|
|
727
|
+
];
|
|
728
|
+
};
|
|
729
|
+
},
|
|
730
|
+
{
|
|
731
|
+
name: 'quote_token_mint';
|
|
732
|
+
docs: [
|
|
733
|
+
'The mint address of the quote token (token used for buying)',
|
|
734
|
+
'This will be the standard token used for all pools with this config'
|
|
735
|
+
];
|
|
736
|
+
},
|
|
737
|
+
{
|
|
738
|
+
name: 'protocol_fee_owner';
|
|
739
|
+
docs: ['Account that will receive protocol fees'];
|
|
740
|
+
},
|
|
741
|
+
{
|
|
742
|
+
name: 'migrate_fee_owner';
|
|
743
|
+
docs: ['Account that will receive migrate fees'];
|
|
744
|
+
},
|
|
745
|
+
{
|
|
746
|
+
name: 'migrate_to_amm_wallet';
|
|
747
|
+
docs: ['The control wallet address for migrating to amm'];
|
|
748
|
+
},
|
|
749
|
+
{
|
|
750
|
+
name: 'migrate_to_cpswap_wallet';
|
|
751
|
+
docs: ['The control wallet address for migrating to cpswap'];
|
|
752
|
+
},
|
|
753
|
+
{
|
|
754
|
+
name: 'system_program';
|
|
755
|
+
docs: ['Required for account creation'];
|
|
756
|
+
address: '11111111111111111111111111111111';
|
|
757
|
+
}
|
|
758
|
+
];
|
|
759
|
+
args: [
|
|
760
|
+
{
|
|
761
|
+
name: 'curve_type';
|
|
762
|
+
type: 'u8';
|
|
763
|
+
},
|
|
764
|
+
{
|
|
765
|
+
name: 'index';
|
|
766
|
+
type: 'u16';
|
|
767
|
+
},
|
|
768
|
+
{
|
|
769
|
+
name: 'migrate_fee';
|
|
770
|
+
type: 'u64';
|
|
771
|
+
},
|
|
772
|
+
{
|
|
773
|
+
name: 'trade_fee_rate';
|
|
774
|
+
type: 'u64';
|
|
775
|
+
}
|
|
776
|
+
];
|
|
777
|
+
},
|
|
778
|
+
{
|
|
779
|
+
name: 'create_platform_config';
|
|
780
|
+
docs: [
|
|
781
|
+
'Create platform config account',
|
|
782
|
+
'# Arguments',
|
|
783
|
+
'',
|
|
784
|
+
'* `ctx` - The context of accounts',
|
|
785
|
+
'# Fields',
|
|
786
|
+
'* `fee_rate` - Fee rate of the platform',
|
|
787
|
+
'* `name` - Name of the platform',
|
|
788
|
+
'* `web` - Website of the platform',
|
|
789
|
+
'* `img` - Image link of the platform',
|
|
790
|
+
''
|
|
791
|
+
];
|
|
792
|
+
discriminator: [176, 90, 196, 175, 253, 113, 220, 20];
|
|
793
|
+
accounts: [
|
|
794
|
+
{
|
|
795
|
+
name: 'platform_admin';
|
|
796
|
+
docs: ['The account paying for the initialization costs'];
|
|
797
|
+
writable: true;
|
|
798
|
+
signer: true;
|
|
799
|
+
},
|
|
800
|
+
{
|
|
801
|
+
name: 'platform_fee_wallet';
|
|
802
|
+
},
|
|
803
|
+
{
|
|
804
|
+
name: 'platform_nft_wallet';
|
|
805
|
+
},
|
|
806
|
+
{
|
|
807
|
+
name: 'platform_config';
|
|
808
|
+
docs: ['The platform config account'];
|
|
809
|
+
writable: true;
|
|
810
|
+
pda: {
|
|
811
|
+
seeds: [
|
|
812
|
+
{
|
|
813
|
+
kind: 'const';
|
|
814
|
+
value: [112, 108, 97, 116, 102, 111, 114, 109, 95, 99, 111, 110, 102, 105, 103];
|
|
815
|
+
},
|
|
816
|
+
{
|
|
817
|
+
kind: 'account';
|
|
818
|
+
path: 'platform_admin';
|
|
819
|
+
}
|
|
820
|
+
];
|
|
821
|
+
};
|
|
822
|
+
},
|
|
823
|
+
{
|
|
824
|
+
name: 'system_program';
|
|
825
|
+
docs: ['Required for account creation'];
|
|
826
|
+
address: '11111111111111111111111111111111';
|
|
827
|
+
}
|
|
828
|
+
];
|
|
829
|
+
args: [{
|
|
830
|
+
name: 'platform_params';
|
|
831
|
+
type: {
|
|
832
|
+
defined: {
|
|
833
|
+
name: 'PlatformParams';
|
|
834
|
+
};
|
|
835
|
+
};
|
|
836
|
+
}];
|
|
837
|
+
},
|
|
838
|
+
{
|
|
839
|
+
name: 'create_vesting_account';
|
|
840
|
+
docs: [
|
|
841
|
+
'Create vesting account',
|
|
842
|
+
'# Arguments',
|
|
843
|
+
'',
|
|
844
|
+
'* `ctx` - The context of accounts',
|
|
845
|
+
'* `share` - The share amount of base token to be vested',
|
|
846
|
+
''
|
|
847
|
+
];
|
|
848
|
+
discriminator: [129, 178, 2, 13, 217, 172, 230, 218];
|
|
849
|
+
accounts: [
|
|
850
|
+
{
|
|
851
|
+
name: 'creator';
|
|
852
|
+
docs: [
|
|
853
|
+
'The account paying for the initialization costs',
|
|
854
|
+
'This can be any account with sufficient SOL to cover the transaction'
|
|
855
|
+
];
|
|
856
|
+
writable: true;
|
|
857
|
+
signer: true;
|
|
858
|
+
},
|
|
859
|
+
{
|
|
860
|
+
name: 'beneficiary';
|
|
861
|
+
writable: true;
|
|
862
|
+
},
|
|
863
|
+
{
|
|
864
|
+
name: 'pool_state';
|
|
865
|
+
docs: ['The pool state account'];
|
|
866
|
+
writable: true;
|
|
867
|
+
},
|
|
868
|
+
{
|
|
869
|
+
name: 'vesting_record';
|
|
870
|
+
docs: ['The vesting record account'];
|
|
871
|
+
writable: true;
|
|
872
|
+
pda: {
|
|
873
|
+
seeds: [
|
|
874
|
+
{
|
|
875
|
+
kind: 'const';
|
|
876
|
+
value: [112, 111, 111, 108, 95, 118, 101, 115, 116, 105, 110, 103];
|
|
877
|
+
},
|
|
878
|
+
{
|
|
879
|
+
kind: 'account';
|
|
880
|
+
path: 'pool_state';
|
|
881
|
+
},
|
|
882
|
+
{
|
|
883
|
+
kind: 'account';
|
|
884
|
+
path: 'beneficiary';
|
|
885
|
+
}
|
|
886
|
+
];
|
|
887
|
+
};
|
|
888
|
+
},
|
|
889
|
+
{
|
|
890
|
+
name: 'system_program';
|
|
891
|
+
docs: ['Required for account creation'];
|
|
892
|
+
address: '11111111111111111111111111111111';
|
|
893
|
+
}
|
|
894
|
+
];
|
|
895
|
+
args: [{
|
|
896
|
+
name: 'share_amount';
|
|
897
|
+
type: 'u64';
|
|
898
|
+
}];
|
|
899
|
+
},
|
|
900
|
+
{
|
|
901
|
+
name: 'initialize';
|
|
902
|
+
docs: [
|
|
903
|
+
'Initializes a new trading pool',
|
|
904
|
+
'# Arguments',
|
|
905
|
+
'',
|
|
906
|
+
'* `ctx` - The context of accounts containing pool and token information',
|
|
907
|
+
''
|
|
908
|
+
];
|
|
909
|
+
discriminator: [175, 175, 109, 31, 13, 152, 155, 237];
|
|
910
|
+
accounts: [
|
|
911
|
+
{
|
|
912
|
+
name: 'payer';
|
|
913
|
+
docs: [
|
|
914
|
+
'The account paying for the initialization costs',
|
|
915
|
+
'This can be any account with sufficient SOL to cover the transaction'
|
|
916
|
+
];
|
|
917
|
+
writable: true;
|
|
918
|
+
signer: true;
|
|
919
|
+
},
|
|
920
|
+
{
|
|
921
|
+
name: 'creator';
|
|
922
|
+
},
|
|
923
|
+
{
|
|
924
|
+
name: 'global_config';
|
|
925
|
+
docs: [
|
|
926
|
+
'Global configuration account containing protocol-wide settings',
|
|
927
|
+
'Includes settings like quote token mint and fee parameters'
|
|
928
|
+
];
|
|
929
|
+
},
|
|
930
|
+
{
|
|
931
|
+
name: 'platform_config';
|
|
932
|
+
docs: [
|
|
933
|
+
'Platform configuration account containing platform info',
|
|
934
|
+
'Includes settings like the fee_rate, name, web, img of the platform'
|
|
935
|
+
];
|
|
936
|
+
},
|
|
937
|
+
{
|
|
938
|
+
name: 'authority';
|
|
939
|
+
docs: [
|
|
940
|
+
'PDA that acts as the authority for pool vault and mint operations',
|
|
941
|
+
'Generated using AUTH_SEED'
|
|
942
|
+
];
|
|
943
|
+
pda: {
|
|
944
|
+
seeds: [
|
|
945
|
+
{
|
|
946
|
+
kind: 'const';
|
|
947
|
+
value: [118, 97, 117, 108, 116, 95, 97, 117, 116, 104, 95, 115, 101, 101, 100];
|
|
948
|
+
}
|
|
949
|
+
];
|
|
950
|
+
};
|
|
951
|
+
},
|
|
952
|
+
{
|
|
953
|
+
name: 'pool_state';
|
|
954
|
+
docs: [
|
|
955
|
+
"Account that stores the pool's state and parameters",
|
|
956
|
+
'PDA generated using POOL_SEED and both token mints'
|
|
957
|
+
];
|
|
958
|
+
writable: true;
|
|
959
|
+
pda: {
|
|
960
|
+
seeds: [
|
|
961
|
+
{
|
|
962
|
+
kind: 'const';
|
|
963
|
+
value: [112, 111, 111, 108];
|
|
964
|
+
},
|
|
965
|
+
{
|
|
966
|
+
kind: 'account';
|
|
967
|
+
path: 'base_mint';
|
|
968
|
+
},
|
|
969
|
+
{
|
|
970
|
+
kind: 'account';
|
|
971
|
+
path: 'quote_mint';
|
|
972
|
+
}
|
|
973
|
+
];
|
|
974
|
+
};
|
|
975
|
+
},
|
|
976
|
+
{
|
|
977
|
+
name: 'base_mint';
|
|
978
|
+
docs: [
|
|
979
|
+
'The mint for the base token (token being sold)',
|
|
980
|
+
'Created in this instruction with specified decimals'
|
|
981
|
+
];
|
|
982
|
+
writable: true;
|
|
983
|
+
signer: true;
|
|
984
|
+
},
|
|
985
|
+
{
|
|
986
|
+
name: 'quote_mint';
|
|
987
|
+
docs: [
|
|
988
|
+
'The mint for the quote token (token used to buy)',
|
|
989
|
+
'Must match the quote_mint specified in global config'
|
|
990
|
+
];
|
|
991
|
+
},
|
|
992
|
+
{
|
|
993
|
+
name: 'base_vault';
|
|
994
|
+
docs: [
|
|
995
|
+
"Token account that holds the pool's base tokens",
|
|
996
|
+
'PDA generated using POOL_VAULT_SEED'
|
|
997
|
+
];
|
|
998
|
+
writable: true;
|
|
999
|
+
pda: {
|
|
1000
|
+
seeds: [
|
|
1001
|
+
{
|
|
1002
|
+
kind: 'const';
|
|
1003
|
+
value: [112, 111, 111, 108, 95, 118, 97, 117, 108, 116];
|
|
1004
|
+
},
|
|
1005
|
+
{
|
|
1006
|
+
kind: 'account';
|
|
1007
|
+
path: 'pool_state';
|
|
1008
|
+
},
|
|
1009
|
+
{
|
|
1010
|
+
kind: 'account';
|
|
1011
|
+
path: 'base_mint';
|
|
1012
|
+
}
|
|
1013
|
+
];
|
|
1014
|
+
};
|
|
1015
|
+
},
|
|
1016
|
+
{
|
|
1017
|
+
name: 'quote_vault';
|
|
1018
|
+
docs: [
|
|
1019
|
+
"Token account that holds the pool's quote tokens",
|
|
1020
|
+
'PDA generated using POOL_VAULT_SEED'
|
|
1021
|
+
];
|
|
1022
|
+
writable: true;
|
|
1023
|
+
pda: {
|
|
1024
|
+
seeds: [
|
|
1025
|
+
{
|
|
1026
|
+
kind: 'const';
|
|
1027
|
+
value: [112, 111, 111, 108, 95, 118, 97, 117, 108, 116];
|
|
1028
|
+
},
|
|
1029
|
+
{
|
|
1030
|
+
kind: 'account';
|
|
1031
|
+
path: 'pool_state';
|
|
1032
|
+
},
|
|
1033
|
+
{
|
|
1034
|
+
kind: 'account';
|
|
1035
|
+
path: 'quote_mint';
|
|
1036
|
+
}
|
|
1037
|
+
];
|
|
1038
|
+
};
|
|
1039
|
+
},
|
|
1040
|
+
{
|
|
1041
|
+
name: 'metadata_account';
|
|
1042
|
+
docs: [
|
|
1043
|
+
"Account to store the base token's metadata",
|
|
1044
|
+
'Created using Metaplex metadata program'
|
|
1045
|
+
];
|
|
1046
|
+
writable: true;
|
|
1047
|
+
},
|
|
1048
|
+
{
|
|
1049
|
+
name: 'base_token_program';
|
|
1050
|
+
docs: ['SPL Token program for the base token', 'Must be the standard Token program'];
|
|
1051
|
+
address: 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA';
|
|
1052
|
+
},
|
|
1053
|
+
{
|
|
1054
|
+
name: 'quote_token_program';
|
|
1055
|
+
docs: ['SPL Token program for the quote token'];
|
|
1056
|
+
address: 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA';
|
|
1057
|
+
},
|
|
1058
|
+
{
|
|
1059
|
+
name: 'metadata_program';
|
|
1060
|
+
docs: ['Metaplex Token Metadata program', 'Used to create metadata for the base token'];
|
|
1061
|
+
address: 'metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s';
|
|
1062
|
+
},
|
|
1063
|
+
{
|
|
1064
|
+
name: 'system_program';
|
|
1065
|
+
docs: ['Required for account creation'];
|
|
1066
|
+
address: '11111111111111111111111111111111';
|
|
1067
|
+
},
|
|
1068
|
+
{
|
|
1069
|
+
name: 'rent_program';
|
|
1070
|
+
docs: ['Required for rent exempt calculations'];
|
|
1071
|
+
address: 'SysvarRent111111111111111111111111111111111';
|
|
1072
|
+
},
|
|
1073
|
+
{
|
|
1074
|
+
name: 'event_authority';
|
|
1075
|
+
pda: {
|
|
1076
|
+
seeds: [
|
|
1077
|
+
{
|
|
1078
|
+
kind: 'const';
|
|
1079
|
+
value: [
|
|
1080
|
+
95,
|
|
1081
|
+
95,
|
|
1082
|
+
101,
|
|
1083
|
+
118,
|
|
1084
|
+
101,
|
|
1085
|
+
110,
|
|
1086
|
+
116,
|
|
1087
|
+
95,
|
|
1088
|
+
97,
|
|
1089
|
+
117,
|
|
1090
|
+
116,
|
|
1091
|
+
104,
|
|
1092
|
+
111,
|
|
1093
|
+
114,
|
|
1094
|
+
105,
|
|
1095
|
+
116,
|
|
1096
|
+
121
|
|
1097
|
+
];
|
|
1098
|
+
}
|
|
1099
|
+
];
|
|
1100
|
+
};
|
|
1101
|
+
},
|
|
1102
|
+
{
|
|
1103
|
+
name: 'program';
|
|
1104
|
+
}
|
|
1105
|
+
];
|
|
1106
|
+
args: [
|
|
1107
|
+
{
|
|
1108
|
+
name: 'base_mint_param';
|
|
1109
|
+
type: {
|
|
1110
|
+
defined: {
|
|
1111
|
+
name: 'MintParams';
|
|
1112
|
+
};
|
|
1113
|
+
};
|
|
1114
|
+
},
|
|
1115
|
+
{
|
|
1116
|
+
name: 'curve_param';
|
|
1117
|
+
type: {
|
|
1118
|
+
defined: {
|
|
1119
|
+
name: 'CurveParams';
|
|
1120
|
+
};
|
|
1121
|
+
};
|
|
1122
|
+
},
|
|
1123
|
+
{
|
|
1124
|
+
name: 'vesting_param';
|
|
1125
|
+
type: {
|
|
1126
|
+
defined: {
|
|
1127
|
+
name: 'VestingParams';
|
|
1128
|
+
};
|
|
1129
|
+
};
|
|
1130
|
+
}
|
|
1131
|
+
];
|
|
1132
|
+
},
|
|
1133
|
+
{
|
|
1134
|
+
name: 'migrate_to_amm';
|
|
1135
|
+
docs: ['# Arguments', '', '* `ctx` - The context of accounts', ''];
|
|
1136
|
+
discriminator: [207, 82, 192, 145, 254, 207, 145, 223];
|
|
1137
|
+
accounts: [
|
|
1138
|
+
{
|
|
1139
|
+
name: 'payer';
|
|
1140
|
+
docs: [
|
|
1141
|
+
'Only migrate_to_amm_wallet can migrate to cpswap pool',
|
|
1142
|
+
'This signer must match the migrate_to_amm_wallet saved in global_config'
|
|
1143
|
+
];
|
|
1144
|
+
writable: true;
|
|
1145
|
+
signer: true;
|
|
1146
|
+
},
|
|
1147
|
+
{
|
|
1148
|
+
name: 'base_mint';
|
|
1149
|
+
docs: ['The mint for the base token (token being sold)'];
|
|
1150
|
+
},
|
|
1151
|
+
{
|
|
1152
|
+
name: 'quote_mint';
|
|
1153
|
+
docs: ['The mint for the quote token (token used to buy)'];
|
|
1154
|
+
},
|
|
1155
|
+
{
|
|
1156
|
+
name: 'openbook_program';
|
|
1157
|
+
address: 'srmqPvymJeFKQ4zGQed1GFppgkRHL9kaELCbyksJtPX';
|
|
1158
|
+
},
|
|
1159
|
+
{
|
|
1160
|
+
name: 'market';
|
|
1161
|
+
docs: ['Account created and asigned to openbook_program but not been initialized'];
|
|
1162
|
+
writable: true;
|
|
1163
|
+
},
|
|
1164
|
+
{
|
|
1165
|
+
name: 'request_queue';
|
|
1166
|
+
docs: ['Account created and asigned to openbook_program but not been initialized'];
|
|
1167
|
+
writable: true;
|
|
1168
|
+
},
|
|
1169
|
+
{
|
|
1170
|
+
name: 'event_queue';
|
|
1171
|
+
docs: ['Account created and asigned to openbook_program but not been initialized'];
|
|
1172
|
+
writable: true;
|
|
1173
|
+
},
|
|
1174
|
+
{
|
|
1175
|
+
name: 'bids';
|
|
1176
|
+
docs: ['Account created and asigned to openbook_program but not been initialized'];
|
|
1177
|
+
writable: true;
|
|
1178
|
+
},
|
|
1179
|
+
{
|
|
1180
|
+
name: 'asks';
|
|
1181
|
+
docs: ['Account created and asigned to openbook_program but not been initialized'];
|
|
1182
|
+
writable: true;
|
|
1183
|
+
},
|
|
1184
|
+
{
|
|
1185
|
+
name: 'market_vault_signer';
|
|
1186
|
+
},
|
|
1187
|
+
{
|
|
1188
|
+
name: 'market_base_vault';
|
|
1189
|
+
docs: ["Token account that holds the market's base tokens"];
|
|
1190
|
+
writable: true;
|
|
1191
|
+
},
|
|
1192
|
+
{
|
|
1193
|
+
name: 'market_quote_vault';
|
|
1194
|
+
docs: ["Token account that holds the market's quote tokens"];
|
|
1195
|
+
writable: true;
|
|
1196
|
+
},
|
|
1197
|
+
{
|
|
1198
|
+
name: 'amm_program';
|
|
1199
|
+
address: '675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8';
|
|
1200
|
+
},
|
|
1201
|
+
{
|
|
1202
|
+
name: 'amm_pool';
|
|
1203
|
+
writable: true;
|
|
1204
|
+
pda: {
|
|
1205
|
+
seeds: [
|
|
1206
|
+
{
|
|
1207
|
+
kind: 'account';
|
|
1208
|
+
path: 'amm_program';
|
|
1209
|
+
},
|
|
1210
|
+
{
|
|
1211
|
+
kind: 'account';
|
|
1212
|
+
path: 'market';
|
|
1213
|
+
},
|
|
1214
|
+
{
|
|
1215
|
+
kind: 'const';
|
|
1216
|
+
value: [
|
|
1217
|
+
97,
|
|
1218
|
+
109,
|
|
1219
|
+
109,
|
|
1220
|
+
95,
|
|
1221
|
+
97,
|
|
1222
|
+
115,
|
|
1223
|
+
115,
|
|
1224
|
+
111,
|
|
1225
|
+
99,
|
|
1226
|
+
105,
|
|
1227
|
+
97,
|
|
1228
|
+
116,
|
|
1229
|
+
101,
|
|
1230
|
+
100,
|
|
1231
|
+
95,
|
|
1232
|
+
115,
|
|
1233
|
+
101,
|
|
1234
|
+
101,
|
|
1235
|
+
100
|
|
1236
|
+
];
|
|
1237
|
+
}
|
|
1238
|
+
];
|
|
1239
|
+
program: {
|
|
1240
|
+
kind: 'account';
|
|
1241
|
+
path: 'amm_program';
|
|
1242
|
+
};
|
|
1243
|
+
};
|
|
1244
|
+
},
|
|
1245
|
+
{
|
|
1246
|
+
name: 'amm_authority';
|
|
1247
|
+
pda: {
|
|
1248
|
+
seeds: [
|
|
1249
|
+
{
|
|
1250
|
+
kind: 'const';
|
|
1251
|
+
value: [97, 109, 109, 32, 97, 117, 116, 104, 111, 114, 105, 116, 121];
|
|
1252
|
+
}
|
|
1253
|
+
];
|
|
1254
|
+
program: {
|
|
1255
|
+
kind: 'account';
|
|
1256
|
+
path: 'amm_program';
|
|
1257
|
+
};
|
|
1258
|
+
};
|
|
1259
|
+
},
|
|
1260
|
+
{
|
|
1261
|
+
name: 'amm_open_orders';
|
|
1262
|
+
writable: true;
|
|
1263
|
+
pda: {
|
|
1264
|
+
seeds: [
|
|
1265
|
+
{
|
|
1266
|
+
kind: 'account';
|
|
1267
|
+
path: 'amm_program';
|
|
1268
|
+
},
|
|
1269
|
+
{
|
|
1270
|
+
kind: 'account';
|
|
1271
|
+
path: 'market';
|
|
1272
|
+
},
|
|
1273
|
+
{
|
|
1274
|
+
kind: 'const';
|
|
1275
|
+
value: [
|
|
1276
|
+
111,
|
|
1277
|
+
112,
|
|
1278
|
+
101,
|
|
1279
|
+
110,
|
|
1280
|
+
95,
|
|
1281
|
+
111,
|
|
1282
|
+
114,
|
|
1283
|
+
100,
|
|
1284
|
+
101,
|
|
1285
|
+
114,
|
|
1286
|
+
95,
|
|
1287
|
+
97,
|
|
1288
|
+
115,
|
|
1289
|
+
115,
|
|
1290
|
+
111,
|
|
1291
|
+
99,
|
|
1292
|
+
105,
|
|
1293
|
+
97,
|
|
1294
|
+
116,
|
|
1295
|
+
101,
|
|
1296
|
+
100,
|
|
1297
|
+
95,
|
|
1298
|
+
115,
|
|
1299
|
+
101,
|
|
1300
|
+
101,
|
|
1301
|
+
100
|
|
1302
|
+
];
|
|
1303
|
+
}
|
|
1304
|
+
];
|
|
1305
|
+
program: {
|
|
1306
|
+
kind: 'account';
|
|
1307
|
+
path: 'amm_program';
|
|
1308
|
+
};
|
|
1309
|
+
};
|
|
1310
|
+
},
|
|
1311
|
+
{
|
|
1312
|
+
name: 'amm_lp_mint';
|
|
1313
|
+
writable: true;
|
|
1314
|
+
pda: {
|
|
1315
|
+
seeds: [
|
|
1316
|
+
{
|
|
1317
|
+
kind: 'account';
|
|
1318
|
+
path: 'amm_program';
|
|
1319
|
+
},
|
|
1320
|
+
{
|
|
1321
|
+
kind: 'account';
|
|
1322
|
+
path: 'market';
|
|
1323
|
+
},
|
|
1324
|
+
{
|
|
1325
|
+
kind: 'const';
|
|
1326
|
+
value: [
|
|
1327
|
+
108,
|
|
1328
|
+
112,
|
|
1329
|
+
95,
|
|
1330
|
+
109,
|
|
1331
|
+
105,
|
|
1332
|
+
110,
|
|
1333
|
+
116,
|
|
1334
|
+
95,
|
|
1335
|
+
97,
|
|
1336
|
+
115,
|
|
1337
|
+
115,
|
|
1338
|
+
111,
|
|
1339
|
+
99,
|
|
1340
|
+
105,
|
|
1341
|
+
97,
|
|
1342
|
+
116,
|
|
1343
|
+
101,
|
|
1344
|
+
100,
|
|
1345
|
+
95,
|
|
1346
|
+
115,
|
|
1347
|
+
101,
|
|
1348
|
+
101,
|
|
1349
|
+
100
|
|
1350
|
+
];
|
|
1351
|
+
}
|
|
1352
|
+
];
|
|
1353
|
+
program: {
|
|
1354
|
+
kind: 'account';
|
|
1355
|
+
path: 'amm_program';
|
|
1356
|
+
};
|
|
1357
|
+
};
|
|
1358
|
+
},
|
|
1359
|
+
{
|
|
1360
|
+
name: 'amm_base_vault';
|
|
1361
|
+
writable: true;
|
|
1362
|
+
pda: {
|
|
1363
|
+
seeds: [
|
|
1364
|
+
{
|
|
1365
|
+
kind: 'account';
|
|
1366
|
+
path: 'amm_program';
|
|
1367
|
+
},
|
|
1368
|
+
{
|
|
1369
|
+
kind: 'account';
|
|
1370
|
+
path: 'market';
|
|
1371
|
+
},
|
|
1372
|
+
{
|
|
1373
|
+
kind: 'const';
|
|
1374
|
+
value: [
|
|
1375
|
+
99,
|
|
1376
|
+
111,
|
|
1377
|
+
105,
|
|
1378
|
+
110,
|
|
1379
|
+
95,
|
|
1380
|
+
118,
|
|
1381
|
+
97,
|
|
1382
|
+
117,
|
|
1383
|
+
108,
|
|
1384
|
+
116,
|
|
1385
|
+
95,
|
|
1386
|
+
97,
|
|
1387
|
+
115,
|
|
1388
|
+
115,
|
|
1389
|
+
111,
|
|
1390
|
+
99,
|
|
1391
|
+
105,
|
|
1392
|
+
97,
|
|
1393
|
+
116,
|
|
1394
|
+
101,
|
|
1395
|
+
100,
|
|
1396
|
+
95,
|
|
1397
|
+
115,
|
|
1398
|
+
101,
|
|
1399
|
+
101,
|
|
1400
|
+
100
|
|
1401
|
+
];
|
|
1402
|
+
}
|
|
1403
|
+
];
|
|
1404
|
+
program: {
|
|
1405
|
+
kind: 'account';
|
|
1406
|
+
path: 'amm_program';
|
|
1407
|
+
};
|
|
1408
|
+
};
|
|
1409
|
+
},
|
|
1410
|
+
{
|
|
1411
|
+
name: 'amm_quote_vault';
|
|
1412
|
+
writable: true;
|
|
1413
|
+
pda: {
|
|
1414
|
+
seeds: [
|
|
1415
|
+
{
|
|
1416
|
+
kind: 'account';
|
|
1417
|
+
path: 'amm_program';
|
|
1418
|
+
},
|
|
1419
|
+
{
|
|
1420
|
+
kind: 'account';
|
|
1421
|
+
path: 'market';
|
|
1422
|
+
},
|
|
1423
|
+
{
|
|
1424
|
+
kind: 'const';
|
|
1425
|
+
value: [
|
|
1426
|
+
112,
|
|
1427
|
+
99,
|
|
1428
|
+
95,
|
|
1429
|
+
118,
|
|
1430
|
+
97,
|
|
1431
|
+
117,
|
|
1432
|
+
108,
|
|
1433
|
+
116,
|
|
1434
|
+
95,
|
|
1435
|
+
97,
|
|
1436
|
+
115,
|
|
1437
|
+
115,
|
|
1438
|
+
111,
|
|
1439
|
+
99,
|
|
1440
|
+
105,
|
|
1441
|
+
97,
|
|
1442
|
+
116,
|
|
1443
|
+
101,
|
|
1444
|
+
100,
|
|
1445
|
+
95,
|
|
1446
|
+
115,
|
|
1447
|
+
101,
|
|
1448
|
+
101,
|
|
1449
|
+
100
|
|
1450
|
+
];
|
|
1451
|
+
}
|
|
1452
|
+
];
|
|
1453
|
+
program: {
|
|
1454
|
+
kind: 'account';
|
|
1455
|
+
path: 'amm_program';
|
|
1456
|
+
};
|
|
1457
|
+
};
|
|
1458
|
+
},
|
|
1459
|
+
{
|
|
1460
|
+
name: 'amm_target_orders';
|
|
1461
|
+
writable: true;
|
|
1462
|
+
pda: {
|
|
1463
|
+
seeds: [
|
|
1464
|
+
{
|
|
1465
|
+
kind: 'account';
|
|
1466
|
+
path: 'amm_program';
|
|
1467
|
+
},
|
|
1468
|
+
{
|
|
1469
|
+
kind: 'account';
|
|
1470
|
+
path: 'market';
|
|
1471
|
+
},
|
|
1472
|
+
{
|
|
1473
|
+
kind: 'const';
|
|
1474
|
+
value: [
|
|
1475
|
+
116,
|
|
1476
|
+
97,
|
|
1477
|
+
114,
|
|
1478
|
+
103,
|
|
1479
|
+
101,
|
|
1480
|
+
116,
|
|
1481
|
+
95,
|
|
1482
|
+
97,
|
|
1483
|
+
115,
|
|
1484
|
+
115,
|
|
1485
|
+
111,
|
|
1486
|
+
99,
|
|
1487
|
+
105,
|
|
1488
|
+
97,
|
|
1489
|
+
116,
|
|
1490
|
+
101,
|
|
1491
|
+
100,
|
|
1492
|
+
95,
|
|
1493
|
+
115,
|
|
1494
|
+
101,
|
|
1495
|
+
101,
|
|
1496
|
+
100
|
|
1497
|
+
];
|
|
1498
|
+
}
|
|
1499
|
+
];
|
|
1500
|
+
program: {
|
|
1501
|
+
kind: 'account';
|
|
1502
|
+
path: 'amm_program';
|
|
1503
|
+
};
|
|
1504
|
+
};
|
|
1505
|
+
},
|
|
1506
|
+
{
|
|
1507
|
+
name: 'amm_config';
|
|
1508
|
+
pda: {
|
|
1509
|
+
seeds: [
|
|
1510
|
+
{
|
|
1511
|
+
kind: 'const';
|
|
1512
|
+
value: [
|
|
1513
|
+
97,
|
|
1514
|
+
109,
|
|
1515
|
+
109,
|
|
1516
|
+
95,
|
|
1517
|
+
99,
|
|
1518
|
+
111,
|
|
1519
|
+
110,
|
|
1520
|
+
102,
|
|
1521
|
+
105,
|
|
1522
|
+
103,
|
|
1523
|
+
95,
|
|
1524
|
+
97,
|
|
1525
|
+
99,
|
|
1526
|
+
99,
|
|
1527
|
+
111,
|
|
1528
|
+
117,
|
|
1529
|
+
110,
|
|
1530
|
+
116,
|
|
1531
|
+
95,
|
|
1532
|
+
115,
|
|
1533
|
+
101,
|
|
1534
|
+
101,
|
|
1535
|
+
100
|
|
1536
|
+
];
|
|
1537
|
+
}
|
|
1538
|
+
];
|
|
1539
|
+
program: {
|
|
1540
|
+
kind: 'account';
|
|
1541
|
+
path: 'amm_program';
|
|
1542
|
+
};
|
|
1543
|
+
};
|
|
1544
|
+
},
|
|
1545
|
+
{
|
|
1546
|
+
name: 'amm_create_fee_destination';
|
|
1547
|
+
writable: true;
|
|
1548
|
+
},
|
|
1549
|
+
{
|
|
1550
|
+
name: 'authority';
|
|
1551
|
+
docs: [
|
|
1552
|
+
'PDA that acts as the authority for pool vault operations',
|
|
1553
|
+
'Generated using AUTH_SEED'
|
|
1554
|
+
];
|
|
1555
|
+
writable: true;
|
|
1556
|
+
pda: {
|
|
1557
|
+
seeds: [
|
|
1558
|
+
{
|
|
1559
|
+
kind: 'const';
|
|
1560
|
+
value: [118, 97, 117, 108, 116, 95, 97, 117, 116, 104, 95, 115, 101, 101, 100];
|
|
1561
|
+
}
|
|
1562
|
+
];
|
|
1563
|
+
};
|
|
1564
|
+
},
|
|
1565
|
+
{
|
|
1566
|
+
name: 'pool_state';
|
|
1567
|
+
docs: [
|
|
1568
|
+
"Account that stores the pool's state and parameters",
|
|
1569
|
+
'PDA generated using POOL_SEED and both token mints'
|
|
1570
|
+
];
|
|
1571
|
+
writable: true;
|
|
1572
|
+
pda: {
|
|
1573
|
+
seeds: [
|
|
1574
|
+
{
|
|
1575
|
+
kind: 'const';
|
|
1576
|
+
value: [112, 111, 111, 108];
|
|
1577
|
+
},
|
|
1578
|
+
{
|
|
1579
|
+
kind: 'account';
|
|
1580
|
+
path: 'base_mint';
|
|
1581
|
+
},
|
|
1582
|
+
{
|
|
1583
|
+
kind: 'account';
|
|
1584
|
+
path: 'quote_mint';
|
|
1585
|
+
}
|
|
1586
|
+
];
|
|
1587
|
+
};
|
|
1588
|
+
},
|
|
1589
|
+
{
|
|
1590
|
+
name: 'global_config';
|
|
1591
|
+
docs: ['Global config account stores owner'];
|
|
1592
|
+
},
|
|
1593
|
+
{
|
|
1594
|
+
name: 'base_vault';
|
|
1595
|
+
docs: ["The pool's vault for base tokens", 'Will be fully drained during migration'];
|
|
1596
|
+
writable: true;
|
|
1597
|
+
},
|
|
1598
|
+
{
|
|
1599
|
+
name: 'quote_vault';
|
|
1600
|
+
docs: ["The pool's vault for quote tokens", 'Will be fully drained during migration'];
|
|
1601
|
+
writable: true;
|
|
1602
|
+
},
|
|
1603
|
+
{
|
|
1604
|
+
name: 'pool_lp_token';
|
|
1605
|
+
writable: true;
|
|
1606
|
+
},
|
|
1607
|
+
{
|
|
1608
|
+
name: 'spl_token_program';
|
|
1609
|
+
docs: ['SPL Token program for the base token', 'Must be the standard Token program'];
|
|
1610
|
+
address: 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA';
|
|
1611
|
+
},
|
|
1612
|
+
{
|
|
1613
|
+
name: 'associated_token_program';
|
|
1614
|
+
docs: ['Program to create an ATA for receiving fee NFT'];
|
|
1615
|
+
address: 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL';
|
|
1616
|
+
},
|
|
1617
|
+
{
|
|
1618
|
+
name: 'system_program';
|
|
1619
|
+
docs: ['Required for account creation'];
|
|
1620
|
+
address: '11111111111111111111111111111111';
|
|
1621
|
+
},
|
|
1622
|
+
{
|
|
1623
|
+
name: 'rent_program';
|
|
1624
|
+
docs: ['Required for rent exempt calculations'];
|
|
1625
|
+
address: 'SysvarRent111111111111111111111111111111111';
|
|
1626
|
+
}
|
|
1627
|
+
];
|
|
1628
|
+
args: [
|
|
1629
|
+
{
|
|
1630
|
+
name: 'base_lot_size';
|
|
1631
|
+
type: 'u64';
|
|
1632
|
+
},
|
|
1633
|
+
{
|
|
1634
|
+
name: 'quote_lot_size';
|
|
1635
|
+
type: 'u64';
|
|
1636
|
+
},
|
|
1637
|
+
{
|
|
1638
|
+
name: 'market_vault_signer_nonce';
|
|
1639
|
+
type: 'u8';
|
|
1640
|
+
}
|
|
1641
|
+
];
|
|
1642
|
+
},
|
|
1643
|
+
{
|
|
1644
|
+
name: 'migrate_to_cpswap';
|
|
1645
|
+
docs: ['# Arguments', '', '* `ctx` - The context of accounts', ''];
|
|
1646
|
+
discriminator: [136, 92, 200, 103, 28, 218, 144, 140];
|
|
1647
|
+
accounts: [
|
|
1648
|
+
{
|
|
1649
|
+
name: 'payer';
|
|
1650
|
+
docs: [
|
|
1651
|
+
'Only migrate_to_cpswap_wallet can migrate to cpswap pool',
|
|
1652
|
+
'This signer must match the migrate_to_cpswap_wallet saved in global_config'
|
|
1653
|
+
];
|
|
1654
|
+
writable: true;
|
|
1655
|
+
signer: true;
|
|
1656
|
+
},
|
|
1657
|
+
{
|
|
1658
|
+
name: 'base_mint';
|
|
1659
|
+
docs: ['The mint for the base token (token being sold)'];
|
|
1660
|
+
},
|
|
1661
|
+
{
|
|
1662
|
+
name: 'quote_mint';
|
|
1663
|
+
docs: ['The mint for the quote token (token used to buy)'];
|
|
1664
|
+
},
|
|
1665
|
+
{
|
|
1666
|
+
name: 'platform_config';
|
|
1667
|
+
docs: [
|
|
1668
|
+
'Platform configuration account containing platform-wide settings',
|
|
1669
|
+
'Used to read platform fee rate'
|
|
1670
|
+
];
|
|
1671
|
+
},
|
|
1672
|
+
{
|
|
1673
|
+
name: 'cpswap_program';
|
|
1674
|
+
address: 'CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C';
|
|
1675
|
+
},
|
|
1676
|
+
{
|
|
1677
|
+
name: 'cpswap_pool';
|
|
1678
|
+
docs: [
|
|
1679
|
+
'PDA account:',
|
|
1680
|
+
'seeds = [',
|
|
1681
|
+
'b"pool",',
|
|
1682
|
+
'cpswap_config.key().as_ref(),',
|
|
1683
|
+
'token_0_mint.key().as_ref(),',
|
|
1684
|
+
'token_1_mint.key().as_ref(),',
|
|
1685
|
+
'],',
|
|
1686
|
+
'seeds::program = cpswap_program,',
|
|
1687
|
+
'',
|
|
1688
|
+
'Or random account: must be signed by cli'
|
|
1689
|
+
];
|
|
1690
|
+
writable: true;
|
|
1691
|
+
},
|
|
1692
|
+
{
|
|
1693
|
+
name: 'cpswap_authority';
|
|
1694
|
+
pda: {
|
|
1695
|
+
seeds: [
|
|
1696
|
+
{
|
|
1697
|
+
kind: 'const';
|
|
1698
|
+
value: [
|
|
1699
|
+
118,
|
|
1700
|
+
97,
|
|
1701
|
+
117,
|
|
1702
|
+
108,
|
|
1703
|
+
116,
|
|
1704
|
+
95,
|
|
1705
|
+
97,
|
|
1706
|
+
110,
|
|
1707
|
+
100,
|
|
1708
|
+
95,
|
|
1709
|
+
108,
|
|
1710
|
+
112,
|
|
1711
|
+
95,
|
|
1712
|
+
109,
|
|
1713
|
+
105,
|
|
1714
|
+
110,
|
|
1715
|
+
116,
|
|
1716
|
+
95,
|
|
1717
|
+
97,
|
|
1718
|
+
117,
|
|
1719
|
+
116,
|
|
1720
|
+
104,
|
|
1721
|
+
95,
|
|
1722
|
+
115,
|
|
1723
|
+
101,
|
|
1724
|
+
101,
|
|
1725
|
+
100
|
|
1726
|
+
];
|
|
1727
|
+
}
|
|
1728
|
+
];
|
|
1729
|
+
program: {
|
|
1730
|
+
kind: 'account';
|
|
1731
|
+
path: 'cpswap_program';
|
|
1732
|
+
};
|
|
1733
|
+
};
|
|
1734
|
+
},
|
|
1735
|
+
{
|
|
1736
|
+
name: 'cpswap_lp_mint';
|
|
1737
|
+
writable: true;
|
|
1738
|
+
pda: {
|
|
1739
|
+
seeds: [
|
|
1740
|
+
{
|
|
1741
|
+
kind: 'const';
|
|
1742
|
+
value: [112, 111, 111, 108, 95, 108, 112, 95, 109, 105, 110, 116];
|
|
1743
|
+
},
|
|
1744
|
+
{
|
|
1745
|
+
kind: 'account';
|
|
1746
|
+
path: 'cpswap_pool';
|
|
1747
|
+
}
|
|
1748
|
+
];
|
|
1749
|
+
program: {
|
|
1750
|
+
kind: 'account';
|
|
1751
|
+
path: 'cpswap_program';
|
|
1752
|
+
};
|
|
1753
|
+
};
|
|
1754
|
+
},
|
|
1755
|
+
{
|
|
1756
|
+
name: 'cpswap_base_vault';
|
|
1757
|
+
writable: true;
|
|
1758
|
+
pda: {
|
|
1759
|
+
seeds: [
|
|
1760
|
+
{
|
|
1761
|
+
kind: 'const';
|
|
1762
|
+
value: [112, 111, 111, 108, 95, 118, 97, 117, 108, 116];
|
|
1763
|
+
},
|
|
1764
|
+
{
|
|
1765
|
+
kind: 'account';
|
|
1766
|
+
path: 'cpswap_pool';
|
|
1767
|
+
},
|
|
1768
|
+
{
|
|
1769
|
+
kind: 'account';
|
|
1770
|
+
path: 'base_mint';
|
|
1771
|
+
}
|
|
1772
|
+
];
|
|
1773
|
+
program: {
|
|
1774
|
+
kind: 'account';
|
|
1775
|
+
path: 'cpswap_program';
|
|
1776
|
+
};
|
|
1777
|
+
};
|
|
1778
|
+
},
|
|
1779
|
+
{
|
|
1780
|
+
name: 'cpswap_quote_vault';
|
|
1781
|
+
writable: true;
|
|
1782
|
+
pda: {
|
|
1783
|
+
seeds: [
|
|
1784
|
+
{
|
|
1785
|
+
kind: 'const';
|
|
1786
|
+
value: [112, 111, 111, 108, 95, 118, 97, 117, 108, 116];
|
|
1787
|
+
},
|
|
1788
|
+
{
|
|
1789
|
+
kind: 'account';
|
|
1790
|
+
path: 'cpswap_pool';
|
|
1791
|
+
},
|
|
1792
|
+
{
|
|
1793
|
+
kind: 'account';
|
|
1794
|
+
path: 'quote_mint';
|
|
1795
|
+
}
|
|
1796
|
+
];
|
|
1797
|
+
program: {
|
|
1798
|
+
kind: 'account';
|
|
1799
|
+
path: 'cpswap_program';
|
|
1800
|
+
};
|
|
1801
|
+
};
|
|
1802
|
+
},
|
|
1803
|
+
{
|
|
1804
|
+
name: 'cpswap_config';
|
|
1805
|
+
},
|
|
1806
|
+
{
|
|
1807
|
+
name: 'cpswap_create_pool_fee';
|
|
1808
|
+
writable: true;
|
|
1809
|
+
},
|
|
1810
|
+
{
|
|
1811
|
+
name: 'cpswap_observation';
|
|
1812
|
+
writable: true;
|
|
1813
|
+
pda: {
|
|
1814
|
+
seeds: [
|
|
1815
|
+
{
|
|
1816
|
+
kind: 'const';
|
|
1817
|
+
value: [111, 98, 115, 101, 114, 118, 97, 116, 105, 111, 110];
|
|
1818
|
+
},
|
|
1819
|
+
{
|
|
1820
|
+
kind: 'account';
|
|
1821
|
+
path: 'cpswap_pool';
|
|
1822
|
+
}
|
|
1823
|
+
];
|
|
1824
|
+
program: {
|
|
1825
|
+
kind: 'account';
|
|
1826
|
+
path: 'cpswap_program';
|
|
1827
|
+
};
|
|
1828
|
+
};
|
|
1829
|
+
},
|
|
1830
|
+
{
|
|
1831
|
+
name: 'lock_program';
|
|
1832
|
+
address: 'LockrWmn6K5twhz3y9w1dQERbmgSaRkfnTeTKbpofwE';
|
|
1833
|
+
},
|
|
1834
|
+
{
|
|
1835
|
+
name: 'lock_authority';
|
|
1836
|
+
pda: {
|
|
1837
|
+
seeds: [
|
|
1838
|
+
{
|
|
1839
|
+
kind: 'const';
|
|
1840
|
+
value: [
|
|
1841
|
+
108,
|
|
1842
|
+
111,
|
|
1843
|
+
99,
|
|
1844
|
+
107,
|
|
1845
|
+
95,
|
|
1846
|
+
99,
|
|
1847
|
+
112,
|
|
1848
|
+
95,
|
|
1849
|
+
97,
|
|
1850
|
+
117,
|
|
1851
|
+
116,
|
|
1852
|
+
104,
|
|
1853
|
+
111,
|
|
1854
|
+
114,
|
|
1855
|
+
105,
|
|
1856
|
+
116,
|
|
1857
|
+
121,
|
|
1858
|
+
95,
|
|
1859
|
+
115,
|
|
1860
|
+
101,
|
|
1861
|
+
101,
|
|
1862
|
+
100
|
|
1863
|
+
];
|
|
1864
|
+
}
|
|
1865
|
+
];
|
|
1866
|
+
program: {
|
|
1867
|
+
kind: 'account';
|
|
1868
|
+
path: 'lock_program';
|
|
1869
|
+
};
|
|
1870
|
+
};
|
|
1871
|
+
},
|
|
1872
|
+
{
|
|
1873
|
+
name: 'lock_lp_vault';
|
|
1874
|
+
writable: true;
|
|
1875
|
+
},
|
|
1876
|
+
{
|
|
1877
|
+
name: 'authority';
|
|
1878
|
+
docs: [
|
|
1879
|
+
'PDA that acts as the authority for pool vault operations',
|
|
1880
|
+
'Generated using AUTH_SEED'
|
|
1881
|
+
];
|
|
1882
|
+
writable: true;
|
|
1883
|
+
pda: {
|
|
1884
|
+
seeds: [
|
|
1885
|
+
{
|
|
1886
|
+
kind: 'const';
|
|
1887
|
+
value: [118, 97, 117, 108, 116, 95, 97, 117, 116, 104, 95, 115, 101, 101, 100];
|
|
1888
|
+
}
|
|
1889
|
+
];
|
|
1890
|
+
};
|
|
1891
|
+
},
|
|
1892
|
+
{
|
|
1893
|
+
name: 'pool_state';
|
|
1894
|
+
docs: [
|
|
1895
|
+
"Account that stores the pool's state and parameters",
|
|
1896
|
+
'PDA generated using POOL_SEED and both token mints'
|
|
1897
|
+
];
|
|
1898
|
+
writable: true;
|
|
1899
|
+
pda: {
|
|
1900
|
+
seeds: [
|
|
1901
|
+
{
|
|
1902
|
+
kind: 'const';
|
|
1903
|
+
value: [112, 111, 111, 108];
|
|
1904
|
+
},
|
|
1905
|
+
{
|
|
1906
|
+
kind: 'account';
|
|
1907
|
+
path: 'base_mint';
|
|
1908
|
+
},
|
|
1909
|
+
{
|
|
1910
|
+
kind: 'account';
|
|
1911
|
+
path: 'quote_mint';
|
|
1912
|
+
}
|
|
1913
|
+
];
|
|
1914
|
+
};
|
|
1915
|
+
},
|
|
1916
|
+
{
|
|
1917
|
+
name: 'global_config';
|
|
1918
|
+
docs: ['Global config account stores owner'];
|
|
1919
|
+
},
|
|
1920
|
+
{
|
|
1921
|
+
name: 'base_vault';
|
|
1922
|
+
docs: ["The pool's vault for base tokens", 'Will be fully drained during migration'];
|
|
1923
|
+
writable: true;
|
|
1924
|
+
},
|
|
1925
|
+
{
|
|
1926
|
+
name: 'quote_vault';
|
|
1927
|
+
docs: ["The pool's vault for quote tokens", 'Will be fully drained during migration'];
|
|
1928
|
+
writable: true;
|
|
1929
|
+
},
|
|
1930
|
+
{
|
|
1931
|
+
name: 'pool_lp_token';
|
|
1932
|
+
writable: true;
|
|
1933
|
+
},
|
|
1934
|
+
{
|
|
1935
|
+
name: 'base_token_program';
|
|
1936
|
+
docs: ['SPL Token program for the base token', 'Must be the standard Token program'];
|
|
1937
|
+
address: 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA';
|
|
1938
|
+
},
|
|
1939
|
+
{
|
|
1940
|
+
name: 'quote_token_program';
|
|
1941
|
+
docs: ['SPL Token program for the quote token'];
|
|
1942
|
+
address: 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA';
|
|
1943
|
+
},
|
|
1944
|
+
{
|
|
1945
|
+
name: 'associated_token_program';
|
|
1946
|
+
docs: ['Program to create an ATA for receiving fee NFT'];
|
|
1947
|
+
address: 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL';
|
|
1948
|
+
},
|
|
1949
|
+
{
|
|
1950
|
+
name: 'system_program';
|
|
1951
|
+
docs: ['Required for account creation'];
|
|
1952
|
+
address: '11111111111111111111111111111111';
|
|
1953
|
+
},
|
|
1954
|
+
{
|
|
1955
|
+
name: 'rent_program';
|
|
1956
|
+
docs: ['Required for rent exempt calculations'];
|
|
1957
|
+
address: 'SysvarRent111111111111111111111111111111111';
|
|
1958
|
+
},
|
|
1959
|
+
{
|
|
1960
|
+
name: 'metadata_program';
|
|
1961
|
+
docs: ['Program to create NFT metadata accunt'];
|
|
1962
|
+
address: 'metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s';
|
|
1963
|
+
}
|
|
1964
|
+
];
|
|
1965
|
+
args: [];
|
|
1966
|
+
},
|
|
1967
|
+
{
|
|
1968
|
+
name: 'sellExactIn';
|
|
1969
|
+
docs: [
|
|
1970
|
+
'Use the given amount of base tokens to sell for quote tokens.',
|
|
1971
|
+
'# Arguments',
|
|
1972
|
+
'',
|
|
1973
|
+
'* `ctx` - The context of accounts',
|
|
1974
|
+
'* `amount_in` - Amount of base token to sell',
|
|
1975
|
+
'* `minimum_amount_out` - Minimum amount of quote token to receive (slippage protection)',
|
|
1976
|
+
'* `share_fee_rate` - Fee rate for the share',
|
|
1977
|
+
''
|
|
1978
|
+
];
|
|
1979
|
+
discriminator: [149, 39, 222, 155, 211, 124, 152, 26];
|
|
1980
|
+
accounts: [
|
|
1981
|
+
{
|
|
1982
|
+
name: 'payer';
|
|
1983
|
+
docs: [
|
|
1984
|
+
'The user performing the swap operation',
|
|
1985
|
+
'Must sign the transaction and pay for fees'
|
|
1986
|
+
];
|
|
1987
|
+
signer: true;
|
|
1988
|
+
},
|
|
1989
|
+
{
|
|
1990
|
+
name: 'authority';
|
|
1991
|
+
docs: [
|
|
1992
|
+
'PDA that acts as the authority for pool vault operations',
|
|
1993
|
+
'Generated using AUTH_SEED'
|
|
1994
|
+
];
|
|
1995
|
+
pda: {
|
|
1996
|
+
seeds: [
|
|
1997
|
+
{
|
|
1998
|
+
kind: 'const';
|
|
1999
|
+
value: [118, 97, 117, 108, 116, 95, 97, 117, 116, 104, 95, 115, 101, 101, 100];
|
|
2000
|
+
}
|
|
2001
|
+
];
|
|
2002
|
+
};
|
|
2003
|
+
},
|
|
2004
|
+
{
|
|
2005
|
+
name: 'global_config';
|
|
2006
|
+
docs: [
|
|
2007
|
+
'Global configuration account containing protocol-wide settings',
|
|
2008
|
+
'Used to read protocol fee rates and curve type'
|
|
2009
|
+
];
|
|
2010
|
+
},
|
|
2011
|
+
{
|
|
2012
|
+
name: 'platform_config';
|
|
2013
|
+
docs: [
|
|
2014
|
+
'Platform configuration account containing platform-wide settings',
|
|
2015
|
+
'Used to read platform fee rate'
|
|
2016
|
+
];
|
|
2017
|
+
},
|
|
2018
|
+
{
|
|
2019
|
+
name: 'pool_state';
|
|
2020
|
+
docs: [
|
|
2021
|
+
'The pool state account where the swap will be performed',
|
|
2022
|
+
'Contains current pool parameters and balances'
|
|
2023
|
+
];
|
|
2024
|
+
writable: true;
|
|
2025
|
+
},
|
|
2026
|
+
{
|
|
2027
|
+
name: 'user_base_token';
|
|
2028
|
+
docs: [
|
|
2029
|
+
"The user's token account for base tokens (tokens being bought)",
|
|
2030
|
+
'Will receive the output tokens after the swap'
|
|
2031
|
+
];
|
|
2032
|
+
writable: true;
|
|
2033
|
+
},
|
|
2034
|
+
{
|
|
2035
|
+
name: 'user_quote_token';
|
|
2036
|
+
docs: [
|
|
2037
|
+
"The user's token account for quote tokens (tokens being sold)",
|
|
2038
|
+
'Will be debited for the input amount'
|
|
2039
|
+
];
|
|
2040
|
+
writable: true;
|
|
2041
|
+
},
|
|
2042
|
+
{
|
|
2043
|
+
name: 'base_vault';
|
|
2044
|
+
docs: ["The pool's vault for base tokens", 'Will be debited to send tokens to the user'];
|
|
2045
|
+
writable: true;
|
|
2046
|
+
},
|
|
2047
|
+
{
|
|
2048
|
+
name: 'quote_vault';
|
|
2049
|
+
docs: [
|
|
2050
|
+
"The pool's vault for quote tokens",
|
|
2051
|
+
'Will receive the input tokens from the user'
|
|
2052
|
+
];
|
|
2053
|
+
writable: true;
|
|
2054
|
+
},
|
|
2055
|
+
{
|
|
2056
|
+
name: 'base_token_mint';
|
|
2057
|
+
docs: ['The mint of the base token', 'Used for transfer fee calculations if applicable'];
|
|
2058
|
+
},
|
|
2059
|
+
{
|
|
2060
|
+
name: 'quote_token_mint';
|
|
2061
|
+
docs: ['The mint of the quote token'];
|
|
2062
|
+
},
|
|
2063
|
+
{
|
|
2064
|
+
name: 'base_token_program';
|
|
2065
|
+
docs: ['SPL Token program for base token transfers'];
|
|
2066
|
+
},
|
|
2067
|
+
{
|
|
2068
|
+
name: 'quote_token_program';
|
|
2069
|
+
docs: ['SPL Token program for quote token transfers'];
|
|
2070
|
+
address: 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA';
|
|
2071
|
+
},
|
|
2072
|
+
{
|
|
2073
|
+
name: 'event_authority';
|
|
2074
|
+
pda: {
|
|
2075
|
+
seeds: [
|
|
2076
|
+
{
|
|
2077
|
+
kind: 'const';
|
|
2078
|
+
value: [
|
|
2079
|
+
95,
|
|
2080
|
+
95,
|
|
2081
|
+
101,
|
|
2082
|
+
118,
|
|
2083
|
+
101,
|
|
2084
|
+
110,
|
|
2085
|
+
116,
|
|
2086
|
+
95,
|
|
2087
|
+
97,
|
|
2088
|
+
117,
|
|
2089
|
+
116,
|
|
2090
|
+
104,
|
|
2091
|
+
111,
|
|
2092
|
+
114,
|
|
2093
|
+
105,
|
|
2094
|
+
116,
|
|
2095
|
+
121
|
|
2096
|
+
];
|
|
2097
|
+
}
|
|
2098
|
+
];
|
|
2099
|
+
};
|
|
2100
|
+
},
|
|
2101
|
+
{
|
|
2102
|
+
name: 'program';
|
|
2103
|
+
}
|
|
2104
|
+
];
|
|
2105
|
+
args: [
|
|
2106
|
+
{
|
|
2107
|
+
name: 'amount_in';
|
|
2108
|
+
type: 'u64';
|
|
2109
|
+
},
|
|
2110
|
+
{
|
|
2111
|
+
name: 'minimum_amount_out';
|
|
2112
|
+
type: 'u64';
|
|
2113
|
+
},
|
|
2114
|
+
{
|
|
2115
|
+
name: 'share_fee_rate';
|
|
2116
|
+
type: 'u64';
|
|
2117
|
+
}
|
|
2118
|
+
];
|
|
2119
|
+
},
|
|
2120
|
+
{
|
|
2121
|
+
name: 'sell_exact_out';
|
|
2122
|
+
docs: [
|
|
2123
|
+
'Sell base tokens for the given amount of quote tokens.',
|
|
2124
|
+
'# Arguments',
|
|
2125
|
+
'',
|
|
2126
|
+
'* `ctx` - The context of accounts',
|
|
2127
|
+
'* `amount_out` - Amount of quote token to receive',
|
|
2128
|
+
'* `maximum_amount_in` - Maximum amount of base token to purchase (slippage protection)',
|
|
2129
|
+
'* `share_fee_rate` - Fee rate for the share',
|
|
2130
|
+
''
|
|
2131
|
+
];
|
|
2132
|
+
discriminator: [95, 200, 71, 34, 8, 9, 11, 166];
|
|
2133
|
+
accounts: [
|
|
2134
|
+
{
|
|
2135
|
+
name: 'payer';
|
|
2136
|
+
docs: [
|
|
2137
|
+
'The user performing the swap operation',
|
|
2138
|
+
'Must sign the transaction and pay for fees'
|
|
2139
|
+
];
|
|
2140
|
+
signer: true;
|
|
2141
|
+
},
|
|
2142
|
+
{
|
|
2143
|
+
name: 'authority';
|
|
2144
|
+
docs: [
|
|
2145
|
+
'PDA that acts as the authority for pool vault operations',
|
|
2146
|
+
'Generated using AUTH_SEED'
|
|
2147
|
+
];
|
|
2148
|
+
pda: {
|
|
2149
|
+
seeds: [
|
|
2150
|
+
{
|
|
2151
|
+
kind: 'const';
|
|
2152
|
+
value: [118, 97, 117, 108, 116, 95, 97, 117, 116, 104, 95, 115, 101, 101, 100];
|
|
2153
|
+
}
|
|
2154
|
+
];
|
|
2155
|
+
};
|
|
2156
|
+
},
|
|
2157
|
+
{
|
|
2158
|
+
name: 'global_config';
|
|
2159
|
+
docs: [
|
|
2160
|
+
'Global configuration account containing protocol-wide settings',
|
|
2161
|
+
'Used to read protocol fee rates and curve type'
|
|
2162
|
+
];
|
|
2163
|
+
},
|
|
2164
|
+
{
|
|
2165
|
+
name: 'platform_config';
|
|
2166
|
+
docs: [
|
|
2167
|
+
'Platform configuration account containing platform-wide settings',
|
|
2168
|
+
'Used to read platform fee rate'
|
|
2169
|
+
];
|
|
2170
|
+
},
|
|
2171
|
+
{
|
|
2172
|
+
name: 'pool_state';
|
|
2173
|
+
docs: [
|
|
2174
|
+
'The pool state account where the swap will be performed',
|
|
2175
|
+
'Contains current pool parameters and balances'
|
|
2176
|
+
];
|
|
2177
|
+
writable: true;
|
|
2178
|
+
},
|
|
2179
|
+
{
|
|
2180
|
+
name: 'user_base_token';
|
|
2181
|
+
docs: [
|
|
2182
|
+
"The user's token account for base tokens (tokens being bought)",
|
|
2183
|
+
'Will receive the output tokens after the swap'
|
|
2184
|
+
];
|
|
2185
|
+
writable: true;
|
|
2186
|
+
},
|
|
2187
|
+
{
|
|
2188
|
+
name: 'user_quote_token';
|
|
2189
|
+
docs: [
|
|
2190
|
+
"The user's token account for quote tokens (tokens being sold)",
|
|
2191
|
+
'Will be debited for the input amount'
|
|
2192
|
+
];
|
|
2193
|
+
writable: true;
|
|
2194
|
+
},
|
|
2195
|
+
{
|
|
2196
|
+
name: 'base_vault';
|
|
2197
|
+
docs: ["The pool's vault for base tokens", 'Will be debited to send tokens to the user'];
|
|
2198
|
+
writable: true;
|
|
2199
|
+
},
|
|
2200
|
+
{
|
|
2201
|
+
name: 'quote_vault';
|
|
2202
|
+
docs: [
|
|
2203
|
+
"The pool's vault for quote tokens",
|
|
2204
|
+
'Will receive the input tokens from the user'
|
|
2205
|
+
];
|
|
2206
|
+
writable: true;
|
|
2207
|
+
},
|
|
2208
|
+
{
|
|
2209
|
+
name: 'base_token_mint';
|
|
2210
|
+
docs: ['The mint of the base token', 'Used for transfer fee calculations if applicable'];
|
|
2211
|
+
},
|
|
2212
|
+
{
|
|
2213
|
+
name: 'quote_token_mint';
|
|
2214
|
+
docs: ['The mint of the quote token'];
|
|
2215
|
+
},
|
|
2216
|
+
{
|
|
2217
|
+
name: 'base_token_program';
|
|
2218
|
+
docs: ['SPL Token program for base token transfers'];
|
|
2219
|
+
},
|
|
2220
|
+
{
|
|
2221
|
+
name: 'quote_token_program';
|
|
2222
|
+
docs: ['SPL Token program for quote token transfers'];
|
|
2223
|
+
address: 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA';
|
|
2224
|
+
},
|
|
2225
|
+
{
|
|
2226
|
+
name: 'event_authority';
|
|
2227
|
+
pda: {
|
|
2228
|
+
seeds: [
|
|
2229
|
+
{
|
|
2230
|
+
kind: 'const';
|
|
2231
|
+
value: [
|
|
2232
|
+
95,
|
|
2233
|
+
95,
|
|
2234
|
+
101,
|
|
2235
|
+
118,
|
|
2236
|
+
101,
|
|
2237
|
+
110,
|
|
2238
|
+
116,
|
|
2239
|
+
95,
|
|
2240
|
+
97,
|
|
2241
|
+
117,
|
|
2242
|
+
116,
|
|
2243
|
+
104,
|
|
2244
|
+
111,
|
|
2245
|
+
114,
|
|
2246
|
+
105,
|
|
2247
|
+
116,
|
|
2248
|
+
121
|
|
2249
|
+
];
|
|
2250
|
+
}
|
|
2251
|
+
];
|
|
2252
|
+
};
|
|
2253
|
+
},
|
|
2254
|
+
{
|
|
2255
|
+
name: 'program';
|
|
2256
|
+
}
|
|
2257
|
+
];
|
|
2258
|
+
args: [
|
|
2259
|
+
{
|
|
2260
|
+
name: 'amount_out';
|
|
2261
|
+
type: 'u64';
|
|
2262
|
+
},
|
|
2263
|
+
{
|
|
2264
|
+
name: 'maximum_amount_in';
|
|
2265
|
+
type: 'u64';
|
|
2266
|
+
},
|
|
2267
|
+
{
|
|
2268
|
+
name: 'share_fee_rate';
|
|
2269
|
+
type: 'u64';
|
|
2270
|
+
}
|
|
2271
|
+
];
|
|
2272
|
+
},
|
|
2273
|
+
{
|
|
2274
|
+
name: 'update_config';
|
|
2275
|
+
docs: [
|
|
2276
|
+
'Updates configuration parameters',
|
|
2277
|
+
'# Arguments',
|
|
2278
|
+
'',
|
|
2279
|
+
'* `ctx` - The context of accounts',
|
|
2280
|
+
'* `param` - Parameter to update:',
|
|
2281
|
+
'- 0: Update trade_fee_rate',
|
|
2282
|
+
'- 1: Update fee owner',
|
|
2283
|
+
'* `value` - New value for the selected parameter',
|
|
2284
|
+
''
|
|
2285
|
+
];
|
|
2286
|
+
discriminator: [29, 158, 252, 191, 10, 83, 219, 99];
|
|
2287
|
+
accounts: [
|
|
2288
|
+
{
|
|
2289
|
+
name: 'owner';
|
|
2290
|
+
docs: ['The global config owner or admin'];
|
|
2291
|
+
signer: true;
|
|
2292
|
+
address: 'GThUX1Atko4tqhN2NaiTazWSeFWMuiUvfFnyJyUghFMJ';
|
|
2293
|
+
},
|
|
2294
|
+
{
|
|
2295
|
+
name: 'global_config';
|
|
2296
|
+
docs: ['Global config account to be changed'];
|
|
2297
|
+
writable: true;
|
|
2298
|
+
}
|
|
2299
|
+
];
|
|
2300
|
+
args: [{
|
|
2301
|
+
name: 'param';
|
|
2302
|
+
type: 'u8';
|
|
2303
|
+
}, {
|
|
2304
|
+
name: 'value';
|
|
2305
|
+
type: 'u64';
|
|
2306
|
+
}];
|
|
2307
|
+
},
|
|
2308
|
+
{
|
|
2309
|
+
name: 'update_platform_config';
|
|
2310
|
+
docs: [
|
|
2311
|
+
'Update platform config',
|
|
2312
|
+
'# Arguments',
|
|
2313
|
+
'',
|
|
2314
|
+
'* `ctx` - The context of accounts',
|
|
2315
|
+
'* `param` - Parameter to update',
|
|
2316
|
+
''
|
|
2317
|
+
];
|
|
2318
|
+
discriminator: [195, 60, 76, 129, 146, 45, 67, 143];
|
|
2319
|
+
accounts: [
|
|
2320
|
+
{
|
|
2321
|
+
name: 'platform_admin';
|
|
2322
|
+
docs: ['The account paying for the initialization costs'];
|
|
2323
|
+
signer: true;
|
|
2324
|
+
},
|
|
2325
|
+
{
|
|
2326
|
+
name: 'platform_config';
|
|
2327
|
+
docs: ['Platform config account to be changed'];
|
|
2328
|
+
writable: true;
|
|
2329
|
+
pda: {
|
|
2330
|
+
seeds: [
|
|
2331
|
+
{
|
|
2332
|
+
kind: 'const';
|
|
2333
|
+
value: [112, 108, 97, 116, 102, 111, 114, 109, 95, 99, 111, 110, 102, 105, 103];
|
|
2334
|
+
},
|
|
2335
|
+
{
|
|
2336
|
+
kind: 'account';
|
|
2337
|
+
path: 'platform_admin';
|
|
2338
|
+
}
|
|
2339
|
+
];
|
|
2340
|
+
};
|
|
2341
|
+
}
|
|
2342
|
+
];
|
|
2343
|
+
args: [{
|
|
2344
|
+
name: 'param';
|
|
2345
|
+
type: {
|
|
2346
|
+
defined: {
|
|
2347
|
+
name: 'PlatformConfigParam';
|
|
2348
|
+
};
|
|
2349
|
+
};
|
|
2350
|
+
}];
|
|
2351
|
+
}
|
|
2352
|
+
];
|
|
2353
|
+
accounts: [
|
|
2354
|
+
{
|
|
2355
|
+
name: 'GlobalConfig';
|
|
2356
|
+
discriminator: [149, 8, 156, 202, 160, 252, 176, 217];
|
|
2357
|
+
},
|
|
2358
|
+
{
|
|
2359
|
+
name: 'PlatformConfig';
|
|
2360
|
+
discriminator: [160, 78, 128, 0, 248, 83, 230, 160];
|
|
2361
|
+
},
|
|
2362
|
+
{
|
|
2363
|
+
name: 'PoolState';
|
|
2364
|
+
discriminator: [247, 237, 227, 245, 215, 195, 222, 70];
|
|
2365
|
+
},
|
|
2366
|
+
{
|
|
2367
|
+
name: 'VestingRecord';
|
|
2368
|
+
discriminator: [106, 243, 221, 205, 230, 126, 85, 83];
|
|
2369
|
+
}
|
|
2370
|
+
];
|
|
2371
|
+
events: [
|
|
2372
|
+
{
|
|
2373
|
+
name: 'ClaimVestedEvent';
|
|
2374
|
+
discriminator: [21, 194, 114, 87, 120, 211, 226, 32];
|
|
2375
|
+
},
|
|
2376
|
+
{
|
|
2377
|
+
name: 'CreateVestingEvent';
|
|
2378
|
+
discriminator: [150, 152, 11, 179, 52, 210, 191, 125];
|
|
2379
|
+
},
|
|
2380
|
+
{
|
|
2381
|
+
name: 'PoolCreateEvent';
|
|
2382
|
+
discriminator: [151, 215, 226, 9, 118, 161, 115, 174];
|
|
2383
|
+
},
|
|
2384
|
+
{
|
|
2385
|
+
name: 'TradeEvent';
|
|
2386
|
+
discriminator: [189, 219, 127, 211, 78, 230, 97, 238];
|
|
2387
|
+
}
|
|
2388
|
+
];
|
|
2389
|
+
errors: [
|
|
2390
|
+
{
|
|
2391
|
+
code: 6000;
|
|
2392
|
+
name: 'NotApproved';
|
|
2393
|
+
msg: 'Not approved';
|
|
2394
|
+
},
|
|
2395
|
+
{
|
|
2396
|
+
code: 6001;
|
|
2397
|
+
name: 'InvalidOwner';
|
|
2398
|
+
msg: 'Input account owner is not the program address';
|
|
2399
|
+
},
|
|
2400
|
+
{
|
|
2401
|
+
code: 6002;
|
|
2402
|
+
name: 'InvalidInput';
|
|
2403
|
+
msg: 'InvalidInput';
|
|
2404
|
+
},
|
|
2405
|
+
{
|
|
2406
|
+
code: 6003;
|
|
2407
|
+
name: 'InputNotMatchCurveConfig';
|
|
2408
|
+
msg: 'The input params are not match with curve type in config';
|
|
2409
|
+
},
|
|
2410
|
+
{
|
|
2411
|
+
code: 6004;
|
|
2412
|
+
name: 'ExceededSlippage';
|
|
2413
|
+
msg: 'Exceeds desired slippage limit';
|
|
2414
|
+
},
|
|
2415
|
+
{
|
|
2416
|
+
code: 6005;
|
|
2417
|
+
name: 'PoolFunding';
|
|
2418
|
+
msg: 'Pool funding';
|
|
2419
|
+
},
|
|
2420
|
+
{
|
|
2421
|
+
code: 6006;
|
|
2422
|
+
name: 'PoolMigrated';
|
|
2423
|
+
msg: 'Pool migrated';
|
|
2424
|
+
},
|
|
2425
|
+
{
|
|
2426
|
+
code: 6007;
|
|
2427
|
+
name: 'MigrateTypeNotMatch';
|
|
2428
|
+
msg: 'Migrate type not match';
|
|
2429
|
+
},
|
|
2430
|
+
{
|
|
2431
|
+
code: 6008;
|
|
2432
|
+
name: 'MathOverflow';
|
|
2433
|
+
msg: 'Math overflow';
|
|
2434
|
+
},
|
|
2435
|
+
{
|
|
2436
|
+
code: 6009;
|
|
2437
|
+
name: 'NoAssetsToCollect';
|
|
2438
|
+
msg: 'No assets to collect';
|
|
2439
|
+
},
|
|
2440
|
+
{
|
|
2441
|
+
code: 6010;
|
|
2442
|
+
name: 'VestingRatioTooHigh';
|
|
2443
|
+
msg: 'Vesting ratio too high';
|
|
2444
|
+
},
|
|
2445
|
+
{
|
|
2446
|
+
code: 6011;
|
|
2447
|
+
name: 'VestingSettingEnded';
|
|
2448
|
+
msg: 'Vesting setting ended';
|
|
2449
|
+
},
|
|
2450
|
+
{
|
|
2451
|
+
code: 6012;
|
|
2452
|
+
name: 'VestingNotStarted';
|
|
2453
|
+
msg: 'Vesting not started';
|
|
2454
|
+
},
|
|
2455
|
+
{
|
|
2456
|
+
code: 6013;
|
|
2457
|
+
name: 'NoVestingSchedule';
|
|
2458
|
+
msg: 'No vesting schedule';
|
|
2459
|
+
},
|
|
2460
|
+
{
|
|
2461
|
+
code: 6014;
|
|
2462
|
+
name: 'InvalidPlatformInfo';
|
|
2463
|
+
msg: 'The platform info input is invalid';
|
|
2464
|
+
},
|
|
2465
|
+
{
|
|
2466
|
+
code: 6015;
|
|
2467
|
+
name: 'PoolNotMigrated';
|
|
2468
|
+
msg: 'Pool not migrated';
|
|
2469
|
+
}
|
|
2470
|
+
];
|
|
2471
|
+
types: [
|
|
2472
|
+
{
|
|
2473
|
+
name: 'ClaimVestedEvent';
|
|
2474
|
+
docs: ['Emitted when vesting token claimed by beneficiary'];
|
|
2475
|
+
type: {
|
|
2476
|
+
kind: 'struct';
|
|
2477
|
+
fields: [
|
|
2478
|
+
{
|
|
2479
|
+
name: 'pool_state';
|
|
2480
|
+
type: 'pubkey';
|
|
2481
|
+
},
|
|
2482
|
+
{
|
|
2483
|
+
name: 'beneficiary';
|
|
2484
|
+
type: 'pubkey';
|
|
2485
|
+
},
|
|
2486
|
+
{
|
|
2487
|
+
name: 'claim_amount';
|
|
2488
|
+
type: 'u64';
|
|
2489
|
+
}
|
|
2490
|
+
];
|
|
2491
|
+
};
|
|
2492
|
+
},
|
|
2493
|
+
{
|
|
2494
|
+
name: 'ConstantCurve';
|
|
2495
|
+
type: {
|
|
2496
|
+
kind: 'struct';
|
|
2497
|
+
fields: [
|
|
2498
|
+
{
|
|
2499
|
+
name: 'supply';
|
|
2500
|
+
type: 'u64';
|
|
2501
|
+
},
|
|
2502
|
+
{
|
|
2503
|
+
name: 'total_base_sell';
|
|
2504
|
+
type: 'u64';
|
|
2505
|
+
},
|
|
2506
|
+
{
|
|
2507
|
+
name: 'total_quote_fund_raising';
|
|
2508
|
+
type: 'u64';
|
|
2509
|
+
},
|
|
2510
|
+
{
|
|
2511
|
+
name: 'migrate_type';
|
|
2512
|
+
type: 'u8';
|
|
2513
|
+
}
|
|
2514
|
+
];
|
|
2515
|
+
};
|
|
2516
|
+
},
|
|
2517
|
+
{
|
|
2518
|
+
name: 'CreateVestingEvent';
|
|
2519
|
+
docs: ['Emitted when vest_account created'];
|
|
2520
|
+
type: {
|
|
2521
|
+
kind: 'struct';
|
|
2522
|
+
fields: [
|
|
2523
|
+
{
|
|
2524
|
+
name: 'pool_state';
|
|
2525
|
+
type: 'pubkey';
|
|
2526
|
+
},
|
|
2527
|
+
{
|
|
2528
|
+
name: 'beneficiary';
|
|
2529
|
+
type: 'pubkey';
|
|
2530
|
+
},
|
|
2531
|
+
{
|
|
2532
|
+
name: 'share_amount';
|
|
2533
|
+
type: 'u64';
|
|
2534
|
+
}
|
|
2535
|
+
];
|
|
2536
|
+
};
|
|
2537
|
+
},
|
|
2538
|
+
{
|
|
2539
|
+
name: 'CurveParams';
|
|
2540
|
+
type: {
|
|
2541
|
+
kind: 'enum';
|
|
2542
|
+
variants: [
|
|
2543
|
+
{
|
|
2544
|
+
name: 'Constant';
|
|
2545
|
+
fields: [{
|
|
2546
|
+
name: 'data';
|
|
2547
|
+
type: {
|
|
2548
|
+
defined: {
|
|
2549
|
+
name: 'ConstantCurve';
|
|
2550
|
+
};
|
|
2551
|
+
};
|
|
2552
|
+
}];
|
|
2553
|
+
},
|
|
2554
|
+
{
|
|
2555
|
+
name: 'Fixed';
|
|
2556
|
+
fields: [{
|
|
2557
|
+
name: 'data';
|
|
2558
|
+
type: {
|
|
2559
|
+
defined: {
|
|
2560
|
+
name: 'FixedCurve';
|
|
2561
|
+
};
|
|
2562
|
+
};
|
|
2563
|
+
}];
|
|
2564
|
+
},
|
|
2565
|
+
{
|
|
2566
|
+
name: 'Linear';
|
|
2567
|
+
fields: [{
|
|
2568
|
+
name: 'data';
|
|
2569
|
+
type: {
|
|
2570
|
+
defined: {
|
|
2571
|
+
name: 'LinearCurve';
|
|
2572
|
+
};
|
|
2573
|
+
};
|
|
2574
|
+
}];
|
|
2575
|
+
}
|
|
2576
|
+
];
|
|
2577
|
+
};
|
|
2578
|
+
},
|
|
2579
|
+
{
|
|
2580
|
+
name: 'FixedCurve';
|
|
2581
|
+
type: {
|
|
2582
|
+
kind: 'struct';
|
|
2583
|
+
fields: [
|
|
2584
|
+
{
|
|
2585
|
+
name: 'supply';
|
|
2586
|
+
type: 'u64';
|
|
2587
|
+
},
|
|
2588
|
+
{
|
|
2589
|
+
name: 'total_quote_fund_raising';
|
|
2590
|
+
type: 'u64';
|
|
2591
|
+
},
|
|
2592
|
+
{
|
|
2593
|
+
name: 'migrate_type';
|
|
2594
|
+
type: 'u8';
|
|
2595
|
+
}
|
|
2596
|
+
];
|
|
2597
|
+
};
|
|
2598
|
+
},
|
|
2599
|
+
{
|
|
2600
|
+
name: 'GlobalConfig';
|
|
2601
|
+
docs: ['Holds the current owner of the factory'];
|
|
2602
|
+
type: {
|
|
2603
|
+
kind: 'struct';
|
|
2604
|
+
fields: [
|
|
2605
|
+
{
|
|
2606
|
+
name: 'epoch';
|
|
2607
|
+
docs: ['Account update epoch'];
|
|
2608
|
+
type: 'u64';
|
|
2609
|
+
},
|
|
2610
|
+
{
|
|
2611
|
+
name: 'curve_type';
|
|
2612
|
+
docs: ['0: Constant Product Curve', '1: Fixed Price Curve', '2: Linear Price Curve'];
|
|
2613
|
+
type: 'u8';
|
|
2614
|
+
},
|
|
2615
|
+
{
|
|
2616
|
+
name: 'index';
|
|
2617
|
+
docs: ['Config index'];
|
|
2618
|
+
type: 'u16';
|
|
2619
|
+
},
|
|
2620
|
+
{
|
|
2621
|
+
name: 'migrate_fee';
|
|
2622
|
+
docs: ['The fee of migrate to amm'];
|
|
2623
|
+
type: 'u64';
|
|
2624
|
+
},
|
|
2625
|
+
{
|
|
2626
|
+
name: 'trade_fee_rate';
|
|
2627
|
+
docs: ['The trade fee rate, denominated in hundredths of a bip (10^-6)'];
|
|
2628
|
+
type: 'u64';
|
|
2629
|
+
},
|
|
2630
|
+
{
|
|
2631
|
+
name: 'max_share_fee_rate';
|
|
2632
|
+
docs: ['The maximum share fee rate, denominated in hundredths of a bip (10^-6)'];
|
|
2633
|
+
type: 'u64';
|
|
2634
|
+
},
|
|
2635
|
+
{
|
|
2636
|
+
name: 'min_base_supply';
|
|
2637
|
+
docs: ['The minimum base supply, the value without decimals'];
|
|
2638
|
+
type: 'u64';
|
|
2639
|
+
},
|
|
2640
|
+
{
|
|
2641
|
+
name: 'max_lock_rate';
|
|
2642
|
+
docs: ['The maximum lock rate, denominated in hundredths of a bip (10^-6)'];
|
|
2643
|
+
type: 'u64';
|
|
2644
|
+
},
|
|
2645
|
+
{
|
|
2646
|
+
name: 'min_base_sell_rate';
|
|
2647
|
+
docs: ['The minimum base sell rate, denominated in hundredths of a bip (10^-6)'];
|
|
2648
|
+
type: 'u64';
|
|
2649
|
+
},
|
|
2650
|
+
{
|
|
2651
|
+
name: 'min_base_migrate_rate';
|
|
2652
|
+
docs: ['The minimum base migrate rate, denominated in hundredths of a bip (10^-6)'];
|
|
2653
|
+
type: 'u64';
|
|
2654
|
+
},
|
|
2655
|
+
{
|
|
2656
|
+
name: 'min_quote_fund_raising';
|
|
2657
|
+
docs: ['The minimum quote fund raising, the value with decimals'];
|
|
2658
|
+
type: 'u64';
|
|
2659
|
+
},
|
|
2660
|
+
{
|
|
2661
|
+
name: 'quote_mint';
|
|
2662
|
+
docs: ['Mint information for quote token'];
|
|
2663
|
+
type: 'pubkey';
|
|
2664
|
+
},
|
|
2665
|
+
{
|
|
2666
|
+
name: 'protocol_fee_owner';
|
|
2667
|
+
docs: ['Protocol Fee owner'];
|
|
2668
|
+
type: 'pubkey';
|
|
2669
|
+
},
|
|
2670
|
+
{
|
|
2671
|
+
name: 'migrate_fee_owner';
|
|
2672
|
+
docs: ['Migrate Fee owner'];
|
|
2673
|
+
type: 'pubkey';
|
|
2674
|
+
},
|
|
2675
|
+
{
|
|
2676
|
+
name: 'migrate_to_amm_wallet';
|
|
2677
|
+
docs: ['Migrate to amm control wallet'];
|
|
2678
|
+
type: 'pubkey';
|
|
2679
|
+
},
|
|
2680
|
+
{
|
|
2681
|
+
name: 'migrate_to_cpswap_wallet';
|
|
2682
|
+
docs: ['Migrate to cpswap wallet'];
|
|
2683
|
+
type: 'pubkey';
|
|
2684
|
+
},
|
|
2685
|
+
{
|
|
2686
|
+
name: 'padding';
|
|
2687
|
+
docs: ['padding for future updates'];
|
|
2688
|
+
type: {
|
|
2689
|
+
array: ['u64', 16];
|
|
2690
|
+
};
|
|
2691
|
+
}
|
|
2692
|
+
];
|
|
2693
|
+
};
|
|
2694
|
+
},
|
|
2695
|
+
{
|
|
2696
|
+
name: 'LinearCurve';
|
|
2697
|
+
type: {
|
|
2698
|
+
kind: 'struct';
|
|
2699
|
+
fields: [
|
|
2700
|
+
{
|
|
2701
|
+
name: 'supply';
|
|
2702
|
+
type: 'u64';
|
|
2703
|
+
},
|
|
2704
|
+
{
|
|
2705
|
+
name: 'total_quote_fund_raising';
|
|
2706
|
+
type: 'u64';
|
|
2707
|
+
},
|
|
2708
|
+
{
|
|
2709
|
+
name: 'migrate_type';
|
|
2710
|
+
type: 'u8';
|
|
2711
|
+
}
|
|
2712
|
+
];
|
|
2713
|
+
};
|
|
2714
|
+
},
|
|
2715
|
+
{
|
|
2716
|
+
name: 'MigrateNftInfo';
|
|
2717
|
+
docs: [
|
|
2718
|
+
'Represents the parameters for initializing a platform config account(Only support MigrateType::CPSWAP)',
|
|
2719
|
+
'# Fields',
|
|
2720
|
+
'* `platform_scale` - Scale of the platform liquidity quantity rights will be converted into NFT',
|
|
2721
|
+
'* `creator_scale` - Scale of the token creator liquidity quantity rights will be converted into NFT',
|
|
2722
|
+
'* `burn_scale` - Scale of liquidity directly to burn',
|
|
2723
|
+
'',
|
|
2724
|
+
'* platform_scale + creator_scale + burn_scale = RATE_DENOMINATOR_VALUE'
|
|
2725
|
+
];
|
|
2726
|
+
type: {
|
|
2727
|
+
kind: 'struct';
|
|
2728
|
+
fields: [
|
|
2729
|
+
{
|
|
2730
|
+
name: 'platform_scale';
|
|
2731
|
+
type: 'u64';
|
|
2732
|
+
},
|
|
2733
|
+
{
|
|
2734
|
+
name: 'creator_scale';
|
|
2735
|
+
type: 'u64';
|
|
2736
|
+
},
|
|
2737
|
+
{
|
|
2738
|
+
name: 'burn_scale';
|
|
2739
|
+
type: 'u64';
|
|
2740
|
+
}
|
|
2741
|
+
];
|
|
2742
|
+
};
|
|
2743
|
+
},
|
|
2744
|
+
{
|
|
2745
|
+
name: 'MintParams';
|
|
2746
|
+
docs: [
|
|
2747
|
+
'Represents the parameters for initializing a new token mint',
|
|
2748
|
+
'# Fields',
|
|
2749
|
+
'* `decimals` - Number of decimal places for the token',
|
|
2750
|
+
'* `name` - Name of the token',
|
|
2751
|
+
'* `symbol` - Symbol/ticker of the token',
|
|
2752
|
+
'* `uri` - URI pointing to token metadata'
|
|
2753
|
+
];
|
|
2754
|
+
type: {
|
|
2755
|
+
kind: 'struct';
|
|
2756
|
+
fields: [
|
|
2757
|
+
{
|
|
2758
|
+
name: 'decimals';
|
|
2759
|
+
type: 'u8';
|
|
2760
|
+
},
|
|
2761
|
+
{
|
|
2762
|
+
name: 'name';
|
|
2763
|
+
type: 'string';
|
|
2764
|
+
},
|
|
2765
|
+
{
|
|
2766
|
+
name: 'symbol';
|
|
2767
|
+
type: 'string';
|
|
2768
|
+
},
|
|
2769
|
+
{
|
|
2770
|
+
name: 'uri';
|
|
2771
|
+
type: 'string';
|
|
2772
|
+
}
|
|
2773
|
+
];
|
|
2774
|
+
};
|
|
2775
|
+
},
|
|
2776
|
+
{
|
|
2777
|
+
name: 'PlatformConfig';
|
|
2778
|
+
type: {
|
|
2779
|
+
kind: 'struct';
|
|
2780
|
+
fields: [
|
|
2781
|
+
{
|
|
2782
|
+
name: 'epoch';
|
|
2783
|
+
docs: ['The epoch for update interval'];
|
|
2784
|
+
type: 'u64';
|
|
2785
|
+
},
|
|
2786
|
+
{
|
|
2787
|
+
name: 'platform_fee_wallet';
|
|
2788
|
+
docs: ['The platform fee wallet'];
|
|
2789
|
+
type: 'pubkey';
|
|
2790
|
+
},
|
|
2791
|
+
{
|
|
2792
|
+
name: 'platform_nft_wallet';
|
|
2793
|
+
docs: [
|
|
2794
|
+
'The platform nft wallet to receive the platform NFT after migration if platform_scale is not 0(Only support MigrateType::CPSWAP)'
|
|
2795
|
+
];
|
|
2796
|
+
type: 'pubkey';
|
|
2797
|
+
},
|
|
2798
|
+
{
|
|
2799
|
+
name: 'platform_scale';
|
|
2800
|
+
docs: [
|
|
2801
|
+
'Scale of the platform liquidity quantity rights will be converted into NFT(Only support MigrateType::CPSWAP)'
|
|
2802
|
+
];
|
|
2803
|
+
type: 'u64';
|
|
2804
|
+
},
|
|
2805
|
+
{
|
|
2806
|
+
name: 'creator_scale';
|
|
2807
|
+
docs: [
|
|
2808
|
+
'Scale of the token creator liquidity quantity rights will be converted into NFT(Only support MigrateType::CPSWAP)'
|
|
2809
|
+
];
|
|
2810
|
+
type: 'u64';
|
|
2811
|
+
},
|
|
2812
|
+
{
|
|
2813
|
+
name: 'burn_scale';
|
|
2814
|
+
docs: ['Scale of liquidity directly to burn'];
|
|
2815
|
+
type: 'u64';
|
|
2816
|
+
},
|
|
2817
|
+
{
|
|
2818
|
+
name: 'fee_rate';
|
|
2819
|
+
docs: ['The platform fee rate'];
|
|
2820
|
+
type: 'u64';
|
|
2821
|
+
},
|
|
2822
|
+
{
|
|
2823
|
+
name: 'name';
|
|
2824
|
+
docs: ['The platform name'];
|
|
2825
|
+
type: {
|
|
2826
|
+
array: ['u8', 64];
|
|
2827
|
+
};
|
|
2828
|
+
},
|
|
2829
|
+
{
|
|
2830
|
+
name: 'web';
|
|
2831
|
+
docs: ['The platform website'];
|
|
2832
|
+
type: {
|
|
2833
|
+
array: ['u8', 256];
|
|
2834
|
+
};
|
|
2835
|
+
},
|
|
2836
|
+
{
|
|
2837
|
+
name: 'img';
|
|
2838
|
+
docs: ['The platform img link'];
|
|
2839
|
+
type: {
|
|
2840
|
+
array: ['u8', 256];
|
|
2841
|
+
};
|
|
2842
|
+
},
|
|
2843
|
+
{
|
|
2844
|
+
name: 'padding';
|
|
2845
|
+
docs: ['padding for future updates'];
|
|
2846
|
+
type: {
|
|
2847
|
+
array: ['u8', 256];
|
|
2848
|
+
};
|
|
2849
|
+
}
|
|
2850
|
+
];
|
|
2851
|
+
};
|
|
2852
|
+
},
|
|
2853
|
+
{
|
|
2854
|
+
name: 'PlatformConfigParam';
|
|
2855
|
+
type: {
|
|
2856
|
+
kind: 'enum';
|
|
2857
|
+
variants: [
|
|
2858
|
+
{
|
|
2859
|
+
name: 'FeeWallet';
|
|
2860
|
+
fields: ['pubkey'];
|
|
2861
|
+
},
|
|
2862
|
+
{
|
|
2863
|
+
name: 'NFTWallet';
|
|
2864
|
+
fields: ['pubkey'];
|
|
2865
|
+
},
|
|
2866
|
+
{
|
|
2867
|
+
name: 'MigrateNftInfo';
|
|
2868
|
+
fields: [{
|
|
2869
|
+
defined: {
|
|
2870
|
+
name: 'MigrateNftInfo';
|
|
2871
|
+
};
|
|
2872
|
+
}];
|
|
2873
|
+
},
|
|
2874
|
+
{
|
|
2875
|
+
name: 'FeeRate';
|
|
2876
|
+
fields: ['u64'];
|
|
2877
|
+
},
|
|
2878
|
+
{
|
|
2879
|
+
name: 'Name';
|
|
2880
|
+
fields: ['string'];
|
|
2881
|
+
},
|
|
2882
|
+
{
|
|
2883
|
+
name: 'Web';
|
|
2884
|
+
fields: ['string'];
|
|
2885
|
+
},
|
|
2886
|
+
{
|
|
2887
|
+
name: 'Img';
|
|
2888
|
+
fields: ['string'];
|
|
2889
|
+
}
|
|
2890
|
+
];
|
|
2891
|
+
};
|
|
2892
|
+
},
|
|
2893
|
+
{
|
|
2894
|
+
name: 'PlatformParams';
|
|
2895
|
+
docs: [
|
|
2896
|
+
'Represents the parameters for initializing a platform config account',
|
|
2897
|
+
'# Fields',
|
|
2898
|
+
'* `migrate_nft_info` - The platform configures liquidity info during migration(Only support MigrateType::CPSWAP)',
|
|
2899
|
+
'* `fee_rate` - Fee rate of the platform',
|
|
2900
|
+
'* `name` - Name of the platform',
|
|
2901
|
+
'* `web` - Website of the platform',
|
|
2902
|
+
'* `img` - Image link of the platform'
|
|
2903
|
+
];
|
|
2904
|
+
type: {
|
|
2905
|
+
kind: 'struct';
|
|
2906
|
+
fields: [
|
|
2907
|
+
{
|
|
2908
|
+
name: 'migrate_nft_info';
|
|
2909
|
+
type: {
|
|
2910
|
+
defined: {
|
|
2911
|
+
name: 'MigrateNftInfo';
|
|
2912
|
+
};
|
|
2913
|
+
};
|
|
2914
|
+
},
|
|
2915
|
+
{
|
|
2916
|
+
name: 'fee_rate';
|
|
2917
|
+
type: 'u64';
|
|
2918
|
+
},
|
|
2919
|
+
{
|
|
2920
|
+
name: 'name';
|
|
2921
|
+
type: 'string';
|
|
2922
|
+
},
|
|
2923
|
+
{
|
|
2924
|
+
name: 'web';
|
|
2925
|
+
type: 'string';
|
|
2926
|
+
},
|
|
2927
|
+
{
|
|
2928
|
+
name: 'img';
|
|
2929
|
+
type: 'string';
|
|
2930
|
+
}
|
|
2931
|
+
];
|
|
2932
|
+
};
|
|
2933
|
+
},
|
|
2934
|
+
{
|
|
2935
|
+
name: 'PoolCreateEvent';
|
|
2936
|
+
docs: ['Emitted when pool created'];
|
|
2937
|
+
type: {
|
|
2938
|
+
kind: 'struct';
|
|
2939
|
+
fields: [
|
|
2940
|
+
{
|
|
2941
|
+
name: 'pool_state';
|
|
2942
|
+
type: 'pubkey';
|
|
2943
|
+
},
|
|
2944
|
+
{
|
|
2945
|
+
name: 'creator';
|
|
2946
|
+
type: 'pubkey';
|
|
2947
|
+
},
|
|
2948
|
+
{
|
|
2949
|
+
name: 'config';
|
|
2950
|
+
type: 'pubkey';
|
|
2951
|
+
},
|
|
2952
|
+
{
|
|
2953
|
+
name: 'base_mint_param';
|
|
2954
|
+
type: {
|
|
2955
|
+
defined: {
|
|
2956
|
+
name: 'MintParams';
|
|
2957
|
+
};
|
|
2958
|
+
};
|
|
2959
|
+
},
|
|
2960
|
+
{
|
|
2961
|
+
name: 'curve_param';
|
|
2962
|
+
type: {
|
|
2963
|
+
defined: {
|
|
2964
|
+
name: 'CurveParams';
|
|
2965
|
+
};
|
|
2966
|
+
};
|
|
2967
|
+
},
|
|
2968
|
+
{
|
|
2969
|
+
name: 'vesting_param';
|
|
2970
|
+
type: {
|
|
2971
|
+
defined: {
|
|
2972
|
+
name: 'VestingParams';
|
|
2973
|
+
};
|
|
2974
|
+
};
|
|
2975
|
+
}
|
|
2976
|
+
];
|
|
2977
|
+
};
|
|
2978
|
+
},
|
|
2979
|
+
{
|
|
2980
|
+
name: 'PoolState';
|
|
2981
|
+
docs: [
|
|
2982
|
+
'Represents the state of a trading pool in the protocol',
|
|
2983
|
+
'Stores all essential information about pool balances, fees, and configuration'
|
|
2984
|
+
];
|
|
2985
|
+
type: {
|
|
2986
|
+
kind: 'struct';
|
|
2987
|
+
fields: [
|
|
2988
|
+
{
|
|
2989
|
+
name: 'epoch';
|
|
2990
|
+
docs: ['Account update epoch'];
|
|
2991
|
+
type: 'u64';
|
|
2992
|
+
},
|
|
2993
|
+
{
|
|
2994
|
+
name: 'auth_bump';
|
|
2995
|
+
docs: ['Bump seed used for PDA address derivation'];
|
|
2996
|
+
type: 'u8';
|
|
2997
|
+
},
|
|
2998
|
+
{
|
|
2999
|
+
name: 'status';
|
|
3000
|
+
docs: [
|
|
3001
|
+
'Current status of the pool',
|
|
3002
|
+
'* 0: Pool is funding',
|
|
3003
|
+
'* 1: Pool funding is end, waiting for migration',
|
|
3004
|
+
'* 2: Pool migration is done'
|
|
3005
|
+
];
|
|
3006
|
+
type: 'u8';
|
|
3007
|
+
},
|
|
3008
|
+
{
|
|
3009
|
+
name: 'base_decimals';
|
|
3010
|
+
docs: ['Decimals of the pool base token'];
|
|
3011
|
+
type: 'u8';
|
|
3012
|
+
},
|
|
3013
|
+
{
|
|
3014
|
+
name: 'quote_decimals';
|
|
3015
|
+
docs: ['Decimals of the pool quote token'];
|
|
3016
|
+
type: 'u8';
|
|
3017
|
+
},
|
|
3018
|
+
{
|
|
3019
|
+
name: 'migrate_type';
|
|
3020
|
+
docs: ['Migrate to AMM or CpSwap'];
|
|
3021
|
+
type: 'u8';
|
|
3022
|
+
},
|
|
3023
|
+
{
|
|
3024
|
+
name: 'supply';
|
|
3025
|
+
docs: ['Supply of the pool base token'];
|
|
3026
|
+
type: 'u64';
|
|
3027
|
+
},
|
|
3028
|
+
{
|
|
3029
|
+
name: 'total_base_sell';
|
|
3030
|
+
docs: ['Total sell amount of the base token'];
|
|
3031
|
+
type: 'u64';
|
|
3032
|
+
},
|
|
3033
|
+
{
|
|
3034
|
+
name: 'virtual_base';
|
|
3035
|
+
docs: [
|
|
3036
|
+
'For different curves, virtual_base and virtual_quote have different meanings',
|
|
3037
|
+
'For constant product curve, virtual_base and virtual_quote are virtual liquidity, virtual_quote/virtual_base is the initial price',
|
|
3038
|
+
'For linear price curve, virtual_base is the price slope parameter a, virtual_quote has no effect',
|
|
3039
|
+
'For fixed price curve, virtual_quote/virtual_base is the initial price'
|
|
3040
|
+
];
|
|
3041
|
+
type: 'u64';
|
|
3042
|
+
},
|
|
3043
|
+
{
|
|
3044
|
+
name: 'virtual_quote';
|
|
3045
|
+
type: 'u64';
|
|
3046
|
+
},
|
|
3047
|
+
{
|
|
3048
|
+
name: 'real_base';
|
|
3049
|
+
docs: [
|
|
3050
|
+
'Actual base token amount in the pool',
|
|
3051
|
+
'Represents the real tokens available for trading'
|
|
3052
|
+
];
|
|
3053
|
+
type: 'u64';
|
|
3054
|
+
},
|
|
3055
|
+
{
|
|
3056
|
+
name: 'real_quote';
|
|
3057
|
+
docs: [
|
|
3058
|
+
'Actual quote token amount in the pool',
|
|
3059
|
+
'Represents the real tokens available for trading'
|
|
3060
|
+
];
|
|
3061
|
+
type: 'u64';
|
|
3062
|
+
},
|
|
3063
|
+
{
|
|
3064
|
+
name: 'total_quote_fund_raising';
|
|
3065
|
+
docs: ['The total quote fund raising of the pool'];
|
|
3066
|
+
type: 'u64';
|
|
3067
|
+
},
|
|
3068
|
+
{
|
|
3069
|
+
name: 'quote_protocol_fee';
|
|
3070
|
+
docs: [
|
|
3071
|
+
'Accumulated trading fees in quote tokens',
|
|
3072
|
+
'Can be collected by the protocol fee owner'
|
|
3073
|
+
];
|
|
3074
|
+
type: 'u64';
|
|
3075
|
+
},
|
|
3076
|
+
{
|
|
3077
|
+
name: 'platform_fee';
|
|
3078
|
+
docs: [
|
|
3079
|
+
'Accumulated platform fees in quote tokens',
|
|
3080
|
+
'Can be collected by the platform wallet stored in platform config'
|
|
3081
|
+
];
|
|
3082
|
+
type: 'u64';
|
|
3083
|
+
},
|
|
3084
|
+
{
|
|
3085
|
+
name: 'migrate_fee';
|
|
3086
|
+
docs: ['The fee of migrate to amm'];
|
|
3087
|
+
type: 'u64';
|
|
3088
|
+
},
|
|
3089
|
+
{
|
|
3090
|
+
name: 'vesting_schedule';
|
|
3091
|
+
docs: ['Vesting schedule for the base token'];
|
|
3092
|
+
type: {
|
|
3093
|
+
defined: {
|
|
3094
|
+
name: 'VestingSchedule';
|
|
3095
|
+
};
|
|
3096
|
+
};
|
|
3097
|
+
},
|
|
3098
|
+
{
|
|
3099
|
+
name: 'global_config';
|
|
3100
|
+
docs: [
|
|
3101
|
+
'Public key of the global configuration account',
|
|
3102
|
+
'Contains protocol-wide settings this pool adheres to'
|
|
3103
|
+
];
|
|
3104
|
+
type: 'pubkey';
|
|
3105
|
+
},
|
|
3106
|
+
{
|
|
3107
|
+
name: 'platform_config';
|
|
3108
|
+
docs: [
|
|
3109
|
+
'Public key of the platform configuration account',
|
|
3110
|
+
'Contains platform-wide settings this pool adheres to'
|
|
3111
|
+
];
|
|
3112
|
+
type: 'pubkey';
|
|
3113
|
+
},
|
|
3114
|
+
{
|
|
3115
|
+
name: 'base_mint';
|
|
3116
|
+
docs: ['Public key of the base mint address'];
|
|
3117
|
+
type: 'pubkey';
|
|
3118
|
+
},
|
|
3119
|
+
{
|
|
3120
|
+
name: 'quote_mint';
|
|
3121
|
+
docs: ['Public key of the quote mint address'];
|
|
3122
|
+
type: 'pubkey';
|
|
3123
|
+
},
|
|
3124
|
+
{
|
|
3125
|
+
name: 'base_vault';
|
|
3126
|
+
docs: [
|
|
3127
|
+
'Public key of the base token vault',
|
|
3128
|
+
'Holds the actual base tokens owned by the pool'
|
|
3129
|
+
];
|
|
3130
|
+
type: 'pubkey';
|
|
3131
|
+
},
|
|
3132
|
+
{
|
|
3133
|
+
name: 'quote_vault';
|
|
3134
|
+
docs: [
|
|
3135
|
+
'Public key of the quote token vault',
|
|
3136
|
+
'Holds the actual quote tokens owned by the pool'
|
|
3137
|
+
];
|
|
3138
|
+
type: 'pubkey';
|
|
3139
|
+
},
|
|
3140
|
+
{
|
|
3141
|
+
name: 'creator';
|
|
3142
|
+
docs: ['The creator of base token'];
|
|
3143
|
+
type: 'pubkey';
|
|
3144
|
+
},
|
|
3145
|
+
{
|
|
3146
|
+
name: 'padding';
|
|
3147
|
+
docs: ['padding for future updates'];
|
|
3148
|
+
type: {
|
|
3149
|
+
array: ['u64', 8];
|
|
3150
|
+
};
|
|
3151
|
+
}
|
|
3152
|
+
];
|
|
3153
|
+
};
|
|
3154
|
+
},
|
|
3155
|
+
{
|
|
3156
|
+
name: 'PoolStatus';
|
|
3157
|
+
docs: [
|
|
3158
|
+
'Represents the different states a pool can be in',
|
|
3159
|
+
'* Fund - Initial state where pool is accepting funds',
|
|
3160
|
+
'* Migrate - Pool funding has ended and waiting for migration',
|
|
3161
|
+
'* Trade - Pool migration is complete and amm trading is enabled'
|
|
3162
|
+
];
|
|
3163
|
+
type: {
|
|
3164
|
+
kind: 'enum';
|
|
3165
|
+
variants: [{
|
|
3166
|
+
name: 'Fund';
|
|
3167
|
+
}, {
|
|
3168
|
+
name: 'Migrate';
|
|
3169
|
+
}, {
|
|
3170
|
+
name: 'Trade';
|
|
3171
|
+
}];
|
|
3172
|
+
};
|
|
3173
|
+
},
|
|
3174
|
+
{
|
|
3175
|
+
name: 'TradeDirection';
|
|
3176
|
+
docs: [
|
|
3177
|
+
'Specifies the direction of a trade in the bonding curve',
|
|
3178
|
+
'This is important because curves can treat tokens differently through weights or offsets'
|
|
3179
|
+
];
|
|
3180
|
+
type: {
|
|
3181
|
+
kind: 'enum';
|
|
3182
|
+
variants: [{
|
|
3183
|
+
name: 'Buy';
|
|
3184
|
+
}, {
|
|
3185
|
+
name: 'Sell';
|
|
3186
|
+
}];
|
|
3187
|
+
};
|
|
3188
|
+
},
|
|
3189
|
+
{
|
|
3190
|
+
name: 'TradeEvent';
|
|
3191
|
+
docs: ['Emitted when trade process'];
|
|
3192
|
+
type: {
|
|
3193
|
+
kind: 'struct';
|
|
3194
|
+
fields: [
|
|
3195
|
+
{
|
|
3196
|
+
name: 'pool_state';
|
|
3197
|
+
type: 'pubkey';
|
|
3198
|
+
},
|
|
3199
|
+
{
|
|
3200
|
+
name: 'total_base_sell';
|
|
3201
|
+
type: 'u64';
|
|
3202
|
+
},
|
|
3203
|
+
{
|
|
3204
|
+
name: 'virtual_base';
|
|
3205
|
+
type: 'u64';
|
|
3206
|
+
},
|
|
3207
|
+
{
|
|
3208
|
+
name: 'virtual_quote';
|
|
3209
|
+
type: 'u64';
|
|
3210
|
+
},
|
|
3211
|
+
{
|
|
3212
|
+
name: 'real_base_before';
|
|
3213
|
+
type: 'u64';
|
|
3214
|
+
},
|
|
3215
|
+
{
|
|
3216
|
+
name: 'real_quote_before';
|
|
3217
|
+
type: 'u64';
|
|
3218
|
+
},
|
|
3219
|
+
{
|
|
3220
|
+
name: 'real_base_after';
|
|
3221
|
+
type: 'u64';
|
|
3222
|
+
},
|
|
3223
|
+
{
|
|
3224
|
+
name: 'real_quote_after';
|
|
3225
|
+
type: 'u64';
|
|
3226
|
+
},
|
|
3227
|
+
{
|
|
3228
|
+
name: 'amount_in';
|
|
3229
|
+
type: 'u64';
|
|
3230
|
+
},
|
|
3231
|
+
{
|
|
3232
|
+
name: 'amount_out';
|
|
3233
|
+
type: 'u64';
|
|
3234
|
+
},
|
|
3235
|
+
{
|
|
3236
|
+
name: 'protocol_fee';
|
|
3237
|
+
type: 'u64';
|
|
3238
|
+
},
|
|
3239
|
+
{
|
|
3240
|
+
name: 'platform_fee';
|
|
3241
|
+
type: 'u64';
|
|
3242
|
+
},
|
|
3243
|
+
{
|
|
3244
|
+
name: 'share_fee';
|
|
3245
|
+
type: 'u64';
|
|
3246
|
+
},
|
|
3247
|
+
{
|
|
3248
|
+
name: 'trade_direction';
|
|
3249
|
+
type: {
|
|
3250
|
+
defined: {
|
|
3251
|
+
name: 'TradeDirection';
|
|
3252
|
+
};
|
|
3253
|
+
};
|
|
3254
|
+
},
|
|
3255
|
+
{
|
|
3256
|
+
name: 'pool_status';
|
|
3257
|
+
type: {
|
|
3258
|
+
defined: {
|
|
3259
|
+
name: 'PoolStatus';
|
|
3260
|
+
};
|
|
3261
|
+
};
|
|
3262
|
+
}
|
|
3263
|
+
];
|
|
3264
|
+
};
|
|
3265
|
+
},
|
|
3266
|
+
{
|
|
3267
|
+
name: 'VestingParams';
|
|
3268
|
+
type: {
|
|
3269
|
+
kind: 'struct';
|
|
3270
|
+
fields: [
|
|
3271
|
+
{
|
|
3272
|
+
name: 'total_locked_amount';
|
|
3273
|
+
type: 'u64';
|
|
3274
|
+
},
|
|
3275
|
+
{
|
|
3276
|
+
name: 'cliff_period';
|
|
3277
|
+
type: 'u64';
|
|
3278
|
+
},
|
|
3279
|
+
{
|
|
3280
|
+
name: 'unlock_period';
|
|
3281
|
+
type: 'u64';
|
|
3282
|
+
}
|
|
3283
|
+
];
|
|
3284
|
+
};
|
|
3285
|
+
},
|
|
3286
|
+
{
|
|
3287
|
+
name: 'VestingRecord';
|
|
3288
|
+
type: {
|
|
3289
|
+
kind: 'struct';
|
|
3290
|
+
fields: [
|
|
3291
|
+
{
|
|
3292
|
+
name: 'epoch';
|
|
3293
|
+
docs: ['Account update epoch'];
|
|
3294
|
+
type: 'u64';
|
|
3295
|
+
},
|
|
3296
|
+
{
|
|
3297
|
+
name: 'pool';
|
|
3298
|
+
docs: ['The pool state account'];
|
|
3299
|
+
type: 'pubkey';
|
|
3300
|
+
},
|
|
3301
|
+
{
|
|
3302
|
+
name: 'beneficiary';
|
|
3303
|
+
docs: ['The beneficiary of the vesting account'];
|
|
3304
|
+
type: 'pubkey';
|
|
3305
|
+
},
|
|
3306
|
+
{
|
|
3307
|
+
name: 'claimed_amount';
|
|
3308
|
+
docs: ['The amount of tokens claimed'];
|
|
3309
|
+
type: 'u64';
|
|
3310
|
+
},
|
|
3311
|
+
{
|
|
3312
|
+
name: 'token_share_amount';
|
|
3313
|
+
docs: ['The share amount of the token to be vested'];
|
|
3314
|
+
type: 'u64';
|
|
3315
|
+
},
|
|
3316
|
+
{
|
|
3317
|
+
name: 'padding';
|
|
3318
|
+
docs: ['padding for future updates'];
|
|
3319
|
+
type: {
|
|
3320
|
+
array: ['u64', 8];
|
|
3321
|
+
};
|
|
3322
|
+
}
|
|
3323
|
+
];
|
|
3324
|
+
};
|
|
3325
|
+
},
|
|
3326
|
+
{
|
|
3327
|
+
name: 'VestingSchedule';
|
|
3328
|
+
type: {
|
|
3329
|
+
kind: 'struct';
|
|
3330
|
+
fields: [
|
|
3331
|
+
{
|
|
3332
|
+
name: 'total_locked_amount';
|
|
3333
|
+
type: 'u64';
|
|
3334
|
+
},
|
|
3335
|
+
{
|
|
3336
|
+
name: 'cliff_period';
|
|
3337
|
+
type: 'u64';
|
|
3338
|
+
},
|
|
3339
|
+
{
|
|
3340
|
+
name: 'unlock_period';
|
|
3341
|
+
type: 'u64';
|
|
3342
|
+
},
|
|
3343
|
+
{
|
|
3344
|
+
name: 'start_time';
|
|
3345
|
+
type: 'u64';
|
|
3346
|
+
},
|
|
3347
|
+
{
|
|
3348
|
+
name: 'allocated_share_amount';
|
|
3349
|
+
docs: [
|
|
3350
|
+
'Total allocated share amount of the base token, not greater than total_locked_amount'
|
|
3351
|
+
];
|
|
3352
|
+
type: 'u64';
|
|
3353
|
+
}
|
|
3354
|
+
];
|
|
3355
|
+
};
|
|
3356
|
+
}
|
|
3357
|
+
];
|
|
3358
|
+
};
|
|
3359
|
+
export declare const IDL: {
|
|
3360
|
+
address: string;
|
|
3361
|
+
metadata: {
|
|
3362
|
+
name: string;
|
|
3363
|
+
version: string;
|
|
3364
|
+
spec: string;
|
|
3365
|
+
description: string;
|
|
3366
|
+
};
|
|
3367
|
+
instructions: ({
|
|
3368
|
+
name: string;
|
|
3369
|
+
docs: string[];
|
|
3370
|
+
discriminator: number[];
|
|
3371
|
+
accounts: ({
|
|
3372
|
+
name: string;
|
|
3373
|
+
docs: string[];
|
|
3374
|
+
signer: boolean;
|
|
3375
|
+
pda?: undefined;
|
|
3376
|
+
writable?: undefined;
|
|
3377
|
+
address?: undefined;
|
|
3378
|
+
} | {
|
|
3379
|
+
name: string;
|
|
3380
|
+
docs: string[];
|
|
3381
|
+
pda: {
|
|
3382
|
+
seeds: {
|
|
3383
|
+
kind: string;
|
|
3384
|
+
value: number[];
|
|
3385
|
+
}[];
|
|
3386
|
+
};
|
|
3387
|
+
signer?: undefined;
|
|
3388
|
+
writable?: undefined;
|
|
3389
|
+
address?: undefined;
|
|
3390
|
+
} | {
|
|
3391
|
+
name: string;
|
|
3392
|
+
docs: string[];
|
|
3393
|
+
signer?: undefined;
|
|
3394
|
+
pda?: undefined;
|
|
3395
|
+
writable?: undefined;
|
|
3396
|
+
address?: undefined;
|
|
3397
|
+
} | {
|
|
3398
|
+
name: string;
|
|
3399
|
+
docs: string[];
|
|
3400
|
+
writable: boolean;
|
|
3401
|
+
signer?: undefined;
|
|
3402
|
+
pda?: undefined;
|
|
3403
|
+
address?: undefined;
|
|
3404
|
+
} | {
|
|
3405
|
+
name: string;
|
|
3406
|
+
docs: string[];
|
|
3407
|
+
address: string;
|
|
3408
|
+
signer?: undefined;
|
|
3409
|
+
pda?: undefined;
|
|
3410
|
+
writable?: undefined;
|
|
3411
|
+
} | {
|
|
3412
|
+
name: string;
|
|
3413
|
+
pda: {
|
|
3414
|
+
seeds: {
|
|
3415
|
+
kind: string;
|
|
3416
|
+
value: number[];
|
|
3417
|
+
}[];
|
|
3418
|
+
};
|
|
3419
|
+
docs?: undefined;
|
|
3420
|
+
signer?: undefined;
|
|
3421
|
+
writable?: undefined;
|
|
3422
|
+
address?: undefined;
|
|
3423
|
+
} | {
|
|
3424
|
+
name: string;
|
|
3425
|
+
docs?: undefined;
|
|
3426
|
+
signer?: undefined;
|
|
3427
|
+
pda?: undefined;
|
|
3428
|
+
writable?: undefined;
|
|
3429
|
+
address?: undefined;
|
|
3430
|
+
})[];
|
|
3431
|
+
args: {
|
|
3432
|
+
name: string;
|
|
3433
|
+
type: string;
|
|
3434
|
+
}[];
|
|
3435
|
+
} | {
|
|
3436
|
+
name: string;
|
|
3437
|
+
docs: string[];
|
|
3438
|
+
discriminator: number[];
|
|
3439
|
+
accounts: ({
|
|
3440
|
+
name: string;
|
|
3441
|
+
docs: string[];
|
|
3442
|
+
writable: boolean;
|
|
3443
|
+
signer: boolean;
|
|
3444
|
+
pda?: undefined;
|
|
3445
|
+
address?: undefined;
|
|
3446
|
+
} | {
|
|
3447
|
+
name: string;
|
|
3448
|
+
docs: string[];
|
|
3449
|
+
pda: {
|
|
3450
|
+
seeds: {
|
|
3451
|
+
kind: string;
|
|
3452
|
+
value: number[];
|
|
3453
|
+
}[];
|
|
3454
|
+
program?: undefined;
|
|
3455
|
+
};
|
|
3456
|
+
writable?: undefined;
|
|
3457
|
+
signer?: undefined;
|
|
3458
|
+
address?: undefined;
|
|
3459
|
+
} | {
|
|
3460
|
+
name: string;
|
|
3461
|
+
docs: string[];
|
|
3462
|
+
writable: boolean;
|
|
3463
|
+
signer?: undefined;
|
|
3464
|
+
pda?: undefined;
|
|
3465
|
+
address?: undefined;
|
|
3466
|
+
} | {
|
|
3467
|
+
name: string;
|
|
3468
|
+
docs: string[];
|
|
3469
|
+
writable?: undefined;
|
|
3470
|
+
signer?: undefined;
|
|
3471
|
+
pda?: undefined;
|
|
3472
|
+
address?: undefined;
|
|
3473
|
+
} | {
|
|
3474
|
+
name: string;
|
|
3475
|
+
writable: boolean;
|
|
3476
|
+
docs?: undefined;
|
|
3477
|
+
signer?: undefined;
|
|
3478
|
+
pda?: undefined;
|
|
3479
|
+
address?: undefined;
|
|
3480
|
+
} | {
|
|
3481
|
+
name: string;
|
|
3482
|
+
docs: string[];
|
|
3483
|
+
writable: boolean;
|
|
3484
|
+
pda: {
|
|
3485
|
+
seeds: ({
|
|
3486
|
+
kind: string;
|
|
3487
|
+
path: string;
|
|
3488
|
+
value?: undefined;
|
|
3489
|
+
} | {
|
|
3490
|
+
kind: string;
|
|
3491
|
+
value: number[];
|
|
3492
|
+
path?: undefined;
|
|
3493
|
+
})[];
|
|
3494
|
+
program: {
|
|
3495
|
+
kind: string;
|
|
3496
|
+
value: number[];
|
|
3497
|
+
};
|
|
3498
|
+
};
|
|
3499
|
+
signer?: undefined;
|
|
3500
|
+
address?: undefined;
|
|
3501
|
+
} | {
|
|
3502
|
+
name: string;
|
|
3503
|
+
docs: string[];
|
|
3504
|
+
address: string;
|
|
3505
|
+
writable?: undefined;
|
|
3506
|
+
signer?: undefined;
|
|
3507
|
+
pda?: undefined;
|
|
3508
|
+
})[];
|
|
3509
|
+
args: any[];
|
|
3510
|
+
} | {
|
|
3511
|
+
name: string;
|
|
3512
|
+
docs: string[];
|
|
3513
|
+
discriminator: number[];
|
|
3514
|
+
accounts: ({
|
|
3515
|
+
name: string;
|
|
3516
|
+
docs: string[];
|
|
3517
|
+
writable: boolean;
|
|
3518
|
+
signer: boolean;
|
|
3519
|
+
pda?: undefined;
|
|
3520
|
+
address?: undefined;
|
|
3521
|
+
} | {
|
|
3522
|
+
name: string;
|
|
3523
|
+
docs: string[];
|
|
3524
|
+
pda: {
|
|
3525
|
+
seeds: {
|
|
3526
|
+
kind: string;
|
|
3527
|
+
value: number[];
|
|
3528
|
+
}[];
|
|
3529
|
+
};
|
|
3530
|
+
writable?: undefined;
|
|
3531
|
+
signer?: undefined;
|
|
3532
|
+
address?: undefined;
|
|
3533
|
+
} | {
|
|
3534
|
+
name: string;
|
|
3535
|
+
docs: string[];
|
|
3536
|
+
writable: boolean;
|
|
3537
|
+
signer?: undefined;
|
|
3538
|
+
pda?: undefined;
|
|
3539
|
+
address?: undefined;
|
|
3540
|
+
} | {
|
|
3541
|
+
name: string;
|
|
3542
|
+
docs: string[];
|
|
3543
|
+
writable: boolean;
|
|
3544
|
+
pda: {
|
|
3545
|
+
seeds: ({
|
|
3546
|
+
kind: string;
|
|
3547
|
+
value: number[];
|
|
3548
|
+
path?: undefined;
|
|
3549
|
+
} | {
|
|
3550
|
+
kind: string;
|
|
3551
|
+
path: string;
|
|
3552
|
+
value?: undefined;
|
|
3553
|
+
})[];
|
|
3554
|
+
};
|
|
3555
|
+
signer?: undefined;
|
|
3556
|
+
address?: undefined;
|
|
3557
|
+
} | {
|
|
3558
|
+
name: string;
|
|
3559
|
+
writable: boolean;
|
|
3560
|
+
signer: boolean;
|
|
3561
|
+
docs?: undefined;
|
|
3562
|
+
pda?: undefined;
|
|
3563
|
+
address?: undefined;
|
|
3564
|
+
} | {
|
|
3565
|
+
name: string;
|
|
3566
|
+
docs: string[];
|
|
3567
|
+
writable?: undefined;
|
|
3568
|
+
signer?: undefined;
|
|
3569
|
+
pda?: undefined;
|
|
3570
|
+
address?: undefined;
|
|
3571
|
+
} | {
|
|
3572
|
+
name: string;
|
|
3573
|
+
docs: string[];
|
|
3574
|
+
address: string;
|
|
3575
|
+
writable?: undefined;
|
|
3576
|
+
signer?: undefined;
|
|
3577
|
+
pda?: undefined;
|
|
3578
|
+
})[];
|
|
3579
|
+
args: any[];
|
|
3580
|
+
} | {
|
|
3581
|
+
name: string;
|
|
3582
|
+
docs: string[];
|
|
3583
|
+
discriminator: number[];
|
|
3584
|
+
accounts: ({
|
|
3585
|
+
name: string;
|
|
3586
|
+
docs: string[];
|
|
3587
|
+
writable: boolean;
|
|
3588
|
+
signer: boolean;
|
|
3589
|
+
address: string;
|
|
3590
|
+
pda?: undefined;
|
|
3591
|
+
} | {
|
|
3592
|
+
name: string;
|
|
3593
|
+
docs: string[];
|
|
3594
|
+
writable: boolean;
|
|
3595
|
+
pda: {
|
|
3596
|
+
seeds: ({
|
|
3597
|
+
kind: string;
|
|
3598
|
+
value: number[];
|
|
3599
|
+
path?: undefined;
|
|
3600
|
+
} | {
|
|
3601
|
+
kind: string;
|
|
3602
|
+
path: string;
|
|
3603
|
+
value?: undefined;
|
|
3604
|
+
})[];
|
|
3605
|
+
};
|
|
3606
|
+
signer?: undefined;
|
|
3607
|
+
address?: undefined;
|
|
3608
|
+
} | {
|
|
3609
|
+
name: string;
|
|
3610
|
+
docs: string[];
|
|
3611
|
+
writable?: undefined;
|
|
3612
|
+
signer?: undefined;
|
|
3613
|
+
address?: undefined;
|
|
3614
|
+
pda?: undefined;
|
|
3615
|
+
} | {
|
|
3616
|
+
name: string;
|
|
3617
|
+
docs: string[];
|
|
3618
|
+
address: string;
|
|
3619
|
+
writable?: undefined;
|
|
3620
|
+
signer?: undefined;
|
|
3621
|
+
pda?: undefined;
|
|
3622
|
+
})[];
|
|
3623
|
+
args: {
|
|
3624
|
+
name: string;
|
|
3625
|
+
type: string;
|
|
3626
|
+
}[];
|
|
3627
|
+
} | {
|
|
3628
|
+
name: string;
|
|
3629
|
+
docs: string[];
|
|
3630
|
+
discriminator: number[];
|
|
3631
|
+
accounts: ({
|
|
3632
|
+
name: string;
|
|
3633
|
+
docs: string[];
|
|
3634
|
+
writable: boolean;
|
|
3635
|
+
signer: boolean;
|
|
3636
|
+
pda?: undefined;
|
|
3637
|
+
address?: undefined;
|
|
3638
|
+
} | {
|
|
3639
|
+
name: string;
|
|
3640
|
+
docs?: undefined;
|
|
3641
|
+
writable?: undefined;
|
|
3642
|
+
signer?: undefined;
|
|
3643
|
+
pda?: undefined;
|
|
3644
|
+
address?: undefined;
|
|
3645
|
+
} | {
|
|
3646
|
+
name: string;
|
|
3647
|
+
docs: string[];
|
|
3648
|
+
writable?: undefined;
|
|
3649
|
+
signer?: undefined;
|
|
3650
|
+
pda?: undefined;
|
|
3651
|
+
address?: undefined;
|
|
3652
|
+
} | {
|
|
3653
|
+
name: string;
|
|
3654
|
+
docs: string[];
|
|
3655
|
+
pda: {
|
|
3656
|
+
seeds: {
|
|
3657
|
+
kind: string;
|
|
3658
|
+
value: number[];
|
|
3659
|
+
}[];
|
|
3660
|
+
};
|
|
3661
|
+
writable?: undefined;
|
|
3662
|
+
signer?: undefined;
|
|
3663
|
+
address?: undefined;
|
|
3664
|
+
} | {
|
|
3665
|
+
name: string;
|
|
3666
|
+
docs: string[];
|
|
3667
|
+
writable: boolean;
|
|
3668
|
+
pda: {
|
|
3669
|
+
seeds: ({
|
|
3670
|
+
kind: string;
|
|
3671
|
+
value: number[];
|
|
3672
|
+
path?: undefined;
|
|
3673
|
+
} | {
|
|
3674
|
+
kind: string;
|
|
3675
|
+
path: string;
|
|
3676
|
+
value?: undefined;
|
|
3677
|
+
})[];
|
|
3678
|
+
};
|
|
3679
|
+
signer?: undefined;
|
|
3680
|
+
address?: undefined;
|
|
3681
|
+
} | {
|
|
3682
|
+
name: string;
|
|
3683
|
+
docs: string[];
|
|
3684
|
+
writable: boolean;
|
|
3685
|
+
signer?: undefined;
|
|
3686
|
+
pda?: undefined;
|
|
3687
|
+
address?: undefined;
|
|
3688
|
+
} | {
|
|
3689
|
+
name: string;
|
|
3690
|
+
docs: string[];
|
|
3691
|
+
address: string;
|
|
3692
|
+
writable?: undefined;
|
|
3693
|
+
signer?: undefined;
|
|
3694
|
+
pda?: undefined;
|
|
3695
|
+
} | {
|
|
3696
|
+
name: string;
|
|
3697
|
+
pda: {
|
|
3698
|
+
seeds: {
|
|
3699
|
+
kind: string;
|
|
3700
|
+
value: number[];
|
|
3701
|
+
}[];
|
|
3702
|
+
};
|
|
3703
|
+
docs?: undefined;
|
|
3704
|
+
writable?: undefined;
|
|
3705
|
+
signer?: undefined;
|
|
3706
|
+
address?: undefined;
|
|
3707
|
+
})[];
|
|
3708
|
+
args: {
|
|
3709
|
+
name: string;
|
|
3710
|
+
type: {
|
|
3711
|
+
defined: {
|
|
3712
|
+
name: string;
|
|
3713
|
+
};
|
|
3714
|
+
};
|
|
3715
|
+
}[];
|
|
3716
|
+
} | {
|
|
3717
|
+
name: string;
|
|
3718
|
+
docs: string[];
|
|
3719
|
+
discriminator: number[];
|
|
3720
|
+
accounts: ({
|
|
3721
|
+
name: string;
|
|
3722
|
+
docs: string[];
|
|
3723
|
+
writable: boolean;
|
|
3724
|
+
signer: boolean;
|
|
3725
|
+
address?: undefined;
|
|
3726
|
+
pda?: undefined;
|
|
3727
|
+
} | {
|
|
3728
|
+
name: string;
|
|
3729
|
+
docs: string[];
|
|
3730
|
+
writable?: undefined;
|
|
3731
|
+
signer?: undefined;
|
|
3732
|
+
address?: undefined;
|
|
3733
|
+
pda?: undefined;
|
|
3734
|
+
} | {
|
|
3735
|
+
name: string;
|
|
3736
|
+
address: string;
|
|
3737
|
+
docs?: undefined;
|
|
3738
|
+
writable?: undefined;
|
|
3739
|
+
signer?: undefined;
|
|
3740
|
+
pda?: undefined;
|
|
3741
|
+
} | {
|
|
3742
|
+
name: string;
|
|
3743
|
+
docs: string[];
|
|
3744
|
+
writable: boolean;
|
|
3745
|
+
signer?: undefined;
|
|
3746
|
+
address?: undefined;
|
|
3747
|
+
pda?: undefined;
|
|
3748
|
+
} | {
|
|
3749
|
+
name: string;
|
|
3750
|
+
docs?: undefined;
|
|
3751
|
+
writable?: undefined;
|
|
3752
|
+
signer?: undefined;
|
|
3753
|
+
address?: undefined;
|
|
3754
|
+
pda?: undefined;
|
|
3755
|
+
} | {
|
|
3756
|
+
name: string;
|
|
3757
|
+
writable: boolean;
|
|
3758
|
+
pda: {
|
|
3759
|
+
seeds: ({
|
|
3760
|
+
kind: string;
|
|
3761
|
+
path: string;
|
|
3762
|
+
value?: undefined;
|
|
3763
|
+
} | {
|
|
3764
|
+
kind: string;
|
|
3765
|
+
value: number[];
|
|
3766
|
+
path?: undefined;
|
|
3767
|
+
})[];
|
|
3768
|
+
program: {
|
|
3769
|
+
kind: string;
|
|
3770
|
+
path: string;
|
|
3771
|
+
};
|
|
3772
|
+
};
|
|
3773
|
+
docs?: undefined;
|
|
3774
|
+
signer?: undefined;
|
|
3775
|
+
address?: undefined;
|
|
3776
|
+
} | {
|
|
3777
|
+
name: string;
|
|
3778
|
+
pda: {
|
|
3779
|
+
seeds: {
|
|
3780
|
+
kind: string;
|
|
3781
|
+
value: number[];
|
|
3782
|
+
}[];
|
|
3783
|
+
program: {
|
|
3784
|
+
kind: string;
|
|
3785
|
+
path: string;
|
|
3786
|
+
};
|
|
3787
|
+
};
|
|
3788
|
+
docs?: undefined;
|
|
3789
|
+
writable?: undefined;
|
|
3790
|
+
signer?: undefined;
|
|
3791
|
+
address?: undefined;
|
|
3792
|
+
} | {
|
|
3793
|
+
name: string;
|
|
3794
|
+
writable: boolean;
|
|
3795
|
+
docs?: undefined;
|
|
3796
|
+
signer?: undefined;
|
|
3797
|
+
address?: undefined;
|
|
3798
|
+
pda?: undefined;
|
|
3799
|
+
} | {
|
|
3800
|
+
name: string;
|
|
3801
|
+
docs: string[];
|
|
3802
|
+
writable: boolean;
|
|
3803
|
+
pda: {
|
|
3804
|
+
seeds: ({
|
|
3805
|
+
kind: string;
|
|
3806
|
+
value: number[];
|
|
3807
|
+
path?: undefined;
|
|
3808
|
+
} | {
|
|
3809
|
+
kind: string;
|
|
3810
|
+
path: string;
|
|
3811
|
+
value?: undefined;
|
|
3812
|
+
})[];
|
|
3813
|
+
program?: undefined;
|
|
3814
|
+
};
|
|
3815
|
+
signer?: undefined;
|
|
3816
|
+
address?: undefined;
|
|
3817
|
+
} | {
|
|
3818
|
+
name: string;
|
|
3819
|
+
docs: string[];
|
|
3820
|
+
address: string;
|
|
3821
|
+
writable?: undefined;
|
|
3822
|
+
signer?: undefined;
|
|
3823
|
+
pda?: undefined;
|
|
3824
|
+
})[];
|
|
3825
|
+
args: {
|
|
3826
|
+
name: string;
|
|
3827
|
+
type: string;
|
|
3828
|
+
}[];
|
|
3829
|
+
} | {
|
|
3830
|
+
name: string;
|
|
3831
|
+
docs: string[];
|
|
3832
|
+
discriminator: number[];
|
|
3833
|
+
accounts: ({
|
|
3834
|
+
name: string;
|
|
3835
|
+
docs: string[];
|
|
3836
|
+
signer: boolean;
|
|
3837
|
+
address: string;
|
|
3838
|
+
writable?: undefined;
|
|
3839
|
+
} | {
|
|
3840
|
+
name: string;
|
|
3841
|
+
docs: string[];
|
|
3842
|
+
writable: boolean;
|
|
3843
|
+
signer?: undefined;
|
|
3844
|
+
address?: undefined;
|
|
3845
|
+
})[];
|
|
3846
|
+
args: {
|
|
3847
|
+
name: string;
|
|
3848
|
+
type: string;
|
|
3849
|
+
}[];
|
|
3850
|
+
} | {
|
|
3851
|
+
name: string;
|
|
3852
|
+
docs: string[];
|
|
3853
|
+
discriminator: number[];
|
|
3854
|
+
accounts: ({
|
|
3855
|
+
name: string;
|
|
3856
|
+
docs: string[];
|
|
3857
|
+
signer: boolean;
|
|
3858
|
+
writable?: undefined;
|
|
3859
|
+
pda?: undefined;
|
|
3860
|
+
} | {
|
|
3861
|
+
name: string;
|
|
3862
|
+
docs: string[];
|
|
3863
|
+
writable: boolean;
|
|
3864
|
+
pda: {
|
|
3865
|
+
seeds: ({
|
|
3866
|
+
kind: string;
|
|
3867
|
+
value: number[];
|
|
3868
|
+
path?: undefined;
|
|
3869
|
+
} | {
|
|
3870
|
+
kind: string;
|
|
3871
|
+
path: string;
|
|
3872
|
+
value?: undefined;
|
|
3873
|
+
})[];
|
|
3874
|
+
};
|
|
3875
|
+
signer?: undefined;
|
|
3876
|
+
})[];
|
|
3877
|
+
args: {
|
|
3878
|
+
name: string;
|
|
3879
|
+
type: {
|
|
3880
|
+
defined: {
|
|
3881
|
+
name: string;
|
|
3882
|
+
};
|
|
3883
|
+
};
|
|
3884
|
+
}[];
|
|
3885
|
+
})[];
|
|
3886
|
+
accounts: {
|
|
3887
|
+
name: string;
|
|
3888
|
+
discriminator: number[];
|
|
3889
|
+
}[];
|
|
3890
|
+
events: {
|
|
3891
|
+
name: string;
|
|
3892
|
+
discriminator: number[];
|
|
3893
|
+
}[];
|
|
3894
|
+
errors: {
|
|
3895
|
+
code: number;
|
|
3896
|
+
name: string;
|
|
3897
|
+
msg: string;
|
|
3898
|
+
}[];
|
|
3899
|
+
types: ({
|
|
3900
|
+
name: string;
|
|
3901
|
+
type: {
|
|
3902
|
+
kind: string;
|
|
3903
|
+
variants: {
|
|
3904
|
+
name: string;
|
|
3905
|
+
fields: {
|
|
3906
|
+
name: string;
|
|
3907
|
+
type: {
|
|
3908
|
+
defined: {
|
|
3909
|
+
name: string;
|
|
3910
|
+
};
|
|
3911
|
+
};
|
|
3912
|
+
}[];
|
|
3913
|
+
}[];
|
|
3914
|
+
fields?: undefined;
|
|
3915
|
+
};
|
|
3916
|
+
docs?: undefined;
|
|
3917
|
+
} | {
|
|
3918
|
+
name: string;
|
|
3919
|
+
type: {
|
|
3920
|
+
kind: string;
|
|
3921
|
+
fields: ({
|
|
3922
|
+
name: string;
|
|
3923
|
+
docs: string[];
|
|
3924
|
+
type: string;
|
|
3925
|
+
} | {
|
|
3926
|
+
name: string;
|
|
3927
|
+
docs: string[];
|
|
3928
|
+
type: {
|
|
3929
|
+
array: (string | number)[];
|
|
3930
|
+
};
|
|
3931
|
+
})[];
|
|
3932
|
+
variants?: undefined;
|
|
3933
|
+
};
|
|
3934
|
+
docs?: undefined;
|
|
3935
|
+
} | {
|
|
3936
|
+
name: string;
|
|
3937
|
+
type: {
|
|
3938
|
+
kind: string;
|
|
3939
|
+
variants: ({
|
|
3940
|
+
name: string;
|
|
3941
|
+
fields: string[];
|
|
3942
|
+
} | {
|
|
3943
|
+
name: string;
|
|
3944
|
+
fields: {
|
|
3945
|
+
defined: {
|
|
3946
|
+
name: string;
|
|
3947
|
+
};
|
|
3948
|
+
}[];
|
|
3949
|
+
})[];
|
|
3950
|
+
fields?: undefined;
|
|
3951
|
+
};
|
|
3952
|
+
docs?: undefined;
|
|
3953
|
+
} | {
|
|
3954
|
+
name: string;
|
|
3955
|
+
docs: string[];
|
|
3956
|
+
type: {
|
|
3957
|
+
kind: string;
|
|
3958
|
+
fields: ({
|
|
3959
|
+
name: string;
|
|
3960
|
+
type: {
|
|
3961
|
+
defined: {
|
|
3962
|
+
name: string;
|
|
3963
|
+
};
|
|
3964
|
+
};
|
|
3965
|
+
} | {
|
|
3966
|
+
name: string;
|
|
3967
|
+
type: string;
|
|
3968
|
+
})[];
|
|
3969
|
+
variants?: undefined;
|
|
3970
|
+
};
|
|
3971
|
+
} | {
|
|
3972
|
+
name: string;
|
|
3973
|
+
docs: string[];
|
|
3974
|
+
type: {
|
|
3975
|
+
kind: string;
|
|
3976
|
+
fields: ({
|
|
3977
|
+
name: string;
|
|
3978
|
+
docs: string[];
|
|
3979
|
+
type: string;
|
|
3980
|
+
} | {
|
|
3981
|
+
name: string;
|
|
3982
|
+
type: string;
|
|
3983
|
+
docs?: undefined;
|
|
3984
|
+
} | {
|
|
3985
|
+
name: string;
|
|
3986
|
+
docs: string[];
|
|
3987
|
+
type: {
|
|
3988
|
+
defined: {
|
|
3989
|
+
name: string;
|
|
3990
|
+
};
|
|
3991
|
+
array?: undefined;
|
|
3992
|
+
};
|
|
3993
|
+
} | {
|
|
3994
|
+
name: string;
|
|
3995
|
+
docs: string[];
|
|
3996
|
+
type: {
|
|
3997
|
+
array: (string | number)[];
|
|
3998
|
+
defined?: undefined;
|
|
3999
|
+
};
|
|
4000
|
+
})[];
|
|
4001
|
+
variants?: undefined;
|
|
4002
|
+
};
|
|
4003
|
+
} | {
|
|
4004
|
+
name: string;
|
|
4005
|
+
docs: string[];
|
|
4006
|
+
type: {
|
|
4007
|
+
kind: string;
|
|
4008
|
+
variants: {
|
|
4009
|
+
name: string;
|
|
4010
|
+
}[];
|
|
4011
|
+
fields?: undefined;
|
|
4012
|
+
};
|
|
4013
|
+
} | {
|
|
4014
|
+
name: string;
|
|
4015
|
+
type: {
|
|
4016
|
+
kind: string;
|
|
4017
|
+
fields: ({
|
|
4018
|
+
name: string;
|
|
4019
|
+
type: string;
|
|
4020
|
+
docs?: undefined;
|
|
4021
|
+
} | {
|
|
4022
|
+
name: string;
|
|
4023
|
+
docs: string[];
|
|
4024
|
+
type: string;
|
|
4025
|
+
})[];
|
|
4026
|
+
variants?: undefined;
|
|
4027
|
+
};
|
|
4028
|
+
docs?: undefined;
|
|
4029
|
+
})[];
|
|
4030
|
+
};
|
|
4031
|
+
//# sourceMappingURL=raydium-launchlab-IDL.d.ts.map
|