@whetstone-research/doppler-sdk 1.0.16 → 1.0.18
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/dist/{chunk-TVBSIQIX.js → chunk-6TOPYGOG.js} +4 -3
- package/dist/chunk-6TOPYGOG.js.map +1 -0
- package/dist/{chunk-3BW6IVP3.cjs → chunk-AKLS6T3R.cjs} +4 -3
- package/dist/chunk-AKLS6T3R.cjs.map +1 -0
- package/dist/{chunk-NMTYI3TB.js → chunk-C2D7CIXP.js} +6 -4
- package/dist/{chunk-NMTYI3TB.js.map → chunk-C2D7CIXP.js.map} +1 -1
- package/dist/{chunk-W5TMS4RD.cjs → chunk-GUGN3EYX.cjs} +39 -37
- package/dist/{chunk-W5TMS4RD.cjs.map → chunk-GUGN3EYX.cjs.map} +1 -1
- package/dist/evm/index.cjs +10 -0
- package/dist/evm/index.cjs.map +1 -1
- package/dist/evm/index.d.cts +14 -1
- package/dist/evm/index.d.ts +14 -1
- package/dist/evm/index.js +10 -1
- package/dist/evm/index.js.map +1 -1
- package/dist/{oracle-DN8BrGPh.d.ts → oracle-7PmpwwPx.d.cts} +2 -0
- package/dist/{oracle-DN8BrGPh.d.cts → oracle-7PmpwwPx.d.ts} +2 -0
- package/dist/{pda-5D3GD5S6.js → pda-N6ULJYLG.js} +3 -3
- package/dist/pda-N6ULJYLG.js.map +1 -0
- package/dist/{pda-GNZYNRUH.cjs → pda-PZRHQJMK.cjs} +16 -16
- package/dist/pda-PZRHQJMK.cjs.map +1 -0
- package/dist/solana/index.cjs +866 -185
- package/dist/solana/index.cjs.map +1 -1
- package/dist/solana/index.d.cts +383 -24
- package/dist/solana/index.d.ts +383 -24
- package/dist/solana/index.js +707 -26
- package/dist/solana/index.js.map +1 -1
- package/dist/solana/react/index.cjs +47 -47
- package/dist/solana/react/index.d.cts +1 -1
- package/dist/solana/react/index.d.ts +1 -1
- package/dist/solana/react/index.js +3 -3
- package/package.json +1 -1
- package/dist/chunk-3BW6IVP3.cjs.map +0 -1
- package/dist/chunk-TVBSIQIX.js.map +0 -1
- package/dist/pda-5D3GD5S6.js.map +0 -1
- package/dist/pda-GNZYNRUH.cjs.map +0 -1
package/dist/solana/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkGUGN3EYX_cjs = require('../chunk-GUGN3EYX.cjs');
|
|
4
|
+
var chunkAKLS6T3R_cjs = require('../chunk-AKLS6T3R.cjs');
|
|
5
5
|
var chunkQ7SFCCGT_cjs = require('../chunk-Q7SFCCGT.cjs');
|
|
6
6
|
var kit = require('@solana/kit');
|
|
7
7
|
var programClientCore = require('@solana/program-client-core');
|
|
@@ -11,69 +11,69 @@ var addressLookupTable = require('@solana-program/address-lookup-table');
|
|
|
11
11
|
// src/solana/cpmm/index.ts
|
|
12
12
|
var cpmm_exports = {};
|
|
13
13
|
chunkQ7SFCCGT_cjs.__export(cpmm_exports, {
|
|
14
|
-
ACCOUNT_DISCRIMINATORS: () =>
|
|
15
|
-
ACCOUNT_VERSION: () =>
|
|
14
|
+
ACCOUNT_DISCRIMINATORS: () => chunkAKLS6T3R_cjs.ACCOUNT_DISCRIMINATORS,
|
|
15
|
+
ACCOUNT_VERSION: () => chunkAKLS6T3R_cjs.ACCOUNT_VERSION,
|
|
16
16
|
ADD_LIQUIDITY_DISCRIMINATOR: () => ADD_LIQUIDITY_DISCRIMINATOR,
|
|
17
|
-
BPS_DENOM: () =>
|
|
17
|
+
BPS_DENOM: () => chunkAKLS6T3R_cjs.BPS_DENOM,
|
|
18
18
|
CLOSE_POSITION_DISCRIMINATOR: () => CLOSE_POSITION_DISCRIMINATOR,
|
|
19
19
|
COLLECT_FEES_DISCRIMINATOR: () => COLLECT_FEES_DISCRIMINATOR,
|
|
20
20
|
COLLECT_PROTOCOL_FEES_DISCRIMINATOR: () => COLLECT_PROTOCOL_FEES_DISCRIMINATOR,
|
|
21
21
|
CPMM_ERROR_MESSAGES: () => CPMM_ERROR_MESSAGES,
|
|
22
|
-
CPMM_PROGRAM_ID: () =>
|
|
22
|
+
CPMM_PROGRAM_ID: () => chunkAKLS6T3R_cjs.CPMM_PROGRAM_ID,
|
|
23
23
|
CREATE_POSITION_DISCRIMINATOR: () => CREATE_POSITION_DISCRIMINATOR,
|
|
24
24
|
CpmmError: () => CpmmError,
|
|
25
25
|
CpmmErrorCode: () => CpmmErrorCode,
|
|
26
|
-
HF_AFTER_ADD_LIQ: () =>
|
|
27
|
-
HF_AFTER_REMOVE_LIQ: () =>
|
|
28
|
-
HF_AFTER_SWAP: () =>
|
|
29
|
-
HF_BEFORE_ADD_LIQ: () =>
|
|
30
|
-
HF_BEFORE_REMOVE_LIQ: () =>
|
|
31
|
-
HF_BEFORE_SWAP: () =>
|
|
32
|
-
HF_FORWARD_READONLY_SIGNERS: () =>
|
|
33
|
-
HF_REQUIRE_ORACLE: () =>
|
|
34
|
-
HOOK_NO_CHANGE: () =>
|
|
26
|
+
HF_AFTER_ADD_LIQ: () => chunkAKLS6T3R_cjs.HF_AFTER_ADD_LIQ,
|
|
27
|
+
HF_AFTER_REMOVE_LIQ: () => chunkAKLS6T3R_cjs.HF_AFTER_REMOVE_LIQ,
|
|
28
|
+
HF_AFTER_SWAP: () => chunkAKLS6T3R_cjs.HF_AFTER_SWAP,
|
|
29
|
+
HF_BEFORE_ADD_LIQ: () => chunkAKLS6T3R_cjs.HF_BEFORE_ADD_LIQ,
|
|
30
|
+
HF_BEFORE_REMOVE_LIQ: () => chunkAKLS6T3R_cjs.HF_BEFORE_REMOVE_LIQ,
|
|
31
|
+
HF_BEFORE_SWAP: () => chunkAKLS6T3R_cjs.HF_BEFORE_SWAP,
|
|
32
|
+
HF_FORWARD_READONLY_SIGNERS: () => chunkAKLS6T3R_cjs.HF_FORWARD_READONLY_SIGNERS,
|
|
33
|
+
HF_REQUIRE_ORACLE: () => chunkAKLS6T3R_cjs.HF_REQUIRE_ORACLE,
|
|
34
|
+
HOOK_NO_CHANGE: () => chunkAKLS6T3R_cjs.HOOK_NO_CHANGE,
|
|
35
35
|
INITIALIZE_CONFIG_DISCRIMINATOR: () => INITIALIZE_CONFIG_DISCRIMINATOR,
|
|
36
36
|
INITIALIZE_ORACLE_DISCRIMINATOR: () => INITIALIZE_ORACLE_DISCRIMINATOR,
|
|
37
37
|
INITIALIZE_POOL_DISCRIMINATOR: () => INITIALIZE_POOL_DISCRIMINATOR,
|
|
38
|
-
INSTRUCTION_DISCRIMINATORS: () =>
|
|
38
|
+
INSTRUCTION_DISCRIMINATORS: () => chunkAKLS6T3R_cjs.INSTRUCTION_DISCRIMINATORS,
|
|
39
39
|
MAX_FEE_AMOUNT: () => MAX_FEE_AMOUNT,
|
|
40
|
-
MAX_HOOK_ALLOWLIST: () =>
|
|
41
|
-
MAX_ORACLE_OBSERVATIONS: () =>
|
|
40
|
+
MAX_HOOK_ALLOWLIST: () => chunkAKLS6T3R_cjs.MAX_HOOK_ALLOWLIST,
|
|
41
|
+
MAX_ORACLE_OBSERVATIONS: () => chunkAKLS6T3R_cjs.MAX_ORACLE_OBSERVATIONS,
|
|
42
42
|
ORACLE_CONSULT_DISCRIMINATOR: () => ORACLE_CONSULT_DISCRIMINATOR,
|
|
43
43
|
ORACLE_UPDATE_DISCRIMINATOR: () => ORACLE_UPDATE_DISCRIMINATOR,
|
|
44
44
|
PAUSE_DISCRIMINATOR: () => PAUSE_DISCRIMINATOR,
|
|
45
45
|
PREVIEW_SWAP_EXACT_IN_DISCRIMINATOR: () => PREVIEW_SWAP_EXACT_IN_DISCRIMINATOR,
|
|
46
|
-
Q64_ONE: () =>
|
|
46
|
+
Q64_ONE: () => chunkAKLS6T3R_cjs.Q64_ONE,
|
|
47
47
|
QUOTE_TO_NUMERAIRE_DISCRIMINATOR: () => QUOTE_TO_NUMERAIRE_DISCRIMINATOR,
|
|
48
48
|
REMOVE_LIQUIDITY_DISCRIMINATOR: () => REMOVE_LIQUIDITY_DISCRIMINATOR,
|
|
49
|
-
SEED_AUTHORITY: () =>
|
|
50
|
-
SEED_CONFIG: () =>
|
|
51
|
-
SEED_ORACLE: () =>
|
|
52
|
-
SEED_POOL: () =>
|
|
53
|
-
SEED_POSITION: () =>
|
|
54
|
-
SEED_PROTOCOL_FEE_POSITION: () =>
|
|
49
|
+
SEED_AUTHORITY: () => chunkAKLS6T3R_cjs.SEED_AUTHORITY,
|
|
50
|
+
SEED_CONFIG: () => chunkAKLS6T3R_cjs.SEED_CONFIG,
|
|
51
|
+
SEED_ORACLE: () => chunkAKLS6T3R_cjs.SEED_ORACLE,
|
|
52
|
+
SEED_POOL: () => chunkAKLS6T3R_cjs.SEED_POOL,
|
|
53
|
+
SEED_POSITION: () => chunkAKLS6T3R_cjs.SEED_POSITION,
|
|
54
|
+
SEED_PROTOCOL_FEE_POSITION: () => chunkAKLS6T3R_cjs.SEED_PROTOCOL_FEE_POSITION,
|
|
55
55
|
SET_FEES_DISCRIMINATOR: () => SET_FEES_DISCRIMINATOR,
|
|
56
56
|
SET_HOOK_DISCRIMINATOR: () => SET_HOOK_DISCRIMINATOR,
|
|
57
57
|
SET_ROUTE_DISCRIMINATOR: () => SET_ROUTE_DISCRIMINATOR,
|
|
58
58
|
SWAP_EXACT_IN_DISCRIMINATOR: () => SWAP_EXACT_IN_DISCRIMINATOR,
|
|
59
|
-
TOKEN_METADATA_PROGRAM_ID: () =>
|
|
59
|
+
TOKEN_METADATA_PROGRAM_ID: () => chunkAKLS6T3R_cjs.TOKEN_METADATA_PROGRAM_ID,
|
|
60
60
|
TRANSFER_ADMIN_DISCRIMINATOR: () => TRANSFER_ADMIN_DISCRIMINATOR,
|
|
61
61
|
UNPAUSE_DISCRIMINATOR: () => UNPAUSE_DISCRIMINATOR,
|
|
62
62
|
UPDATE_CONFIG_DISCRIMINATOR: () => UPDATE_CONFIG_DISCRIMINATOR,
|
|
63
63
|
WITHDRAW_VAULT_EXCESS_DISCRIMINATOR: () => WITHDRAW_VAULT_EXCESS_DISCRIMINATOR,
|
|
64
|
-
addLiquidityArgsCodec: () =>
|
|
65
|
-
ammConfigDataCodec: () =>
|
|
66
|
-
areMintsOrdered: () =>
|
|
67
|
-
calculateAccruedFees: () =>
|
|
68
|
-
calculateTwap: () =>
|
|
69
|
-
calculateTwapNumber: () =>
|
|
70
|
-
ceilDiv: () =>
|
|
71
|
-
collectFeesArgsCodec: () =>
|
|
72
|
-
collectProtocolFeesArgsCodec: () =>
|
|
73
|
-
comparePoolAndOraclePrices: () =>
|
|
74
|
-
computePrice0Q64: () =>
|
|
75
|
-
computePrice1Q64: () =>
|
|
76
|
-
consultTwap: () =>
|
|
64
|
+
addLiquidityArgsCodec: () => chunkGUGN3EYX_cjs.addLiquidityArgsCodec,
|
|
65
|
+
ammConfigDataCodec: () => chunkGUGN3EYX_cjs.ammConfigDataCodec,
|
|
66
|
+
areMintsOrdered: () => chunkAKLS6T3R_cjs.areMintsOrdered,
|
|
67
|
+
calculateAccruedFees: () => chunkGUGN3EYX_cjs.calculateAccruedFees,
|
|
68
|
+
calculateTwap: () => chunkGUGN3EYX_cjs.calculateTwap,
|
|
69
|
+
calculateTwapNumber: () => chunkGUGN3EYX_cjs.calculateTwapNumber,
|
|
70
|
+
ceilDiv: () => chunkGUGN3EYX_cjs.ceilDiv,
|
|
71
|
+
collectFeesArgsCodec: () => chunkGUGN3EYX_cjs.collectFeesArgsCodec,
|
|
72
|
+
collectProtocolFeesArgsCodec: () => chunkGUGN3EYX_cjs.collectProtocolFeesArgsCodec,
|
|
73
|
+
comparePoolAndOraclePrices: () => chunkGUGN3EYX_cjs.comparePoolAndOraclePrices,
|
|
74
|
+
computePrice0Q64: () => chunkGUGN3EYX_cjs.computePrice0Q64,
|
|
75
|
+
computePrice1Q64: () => chunkGUGN3EYX_cjs.computePrice1Q64,
|
|
76
|
+
consultTwap: () => chunkGUGN3EYX_cjs.consultTwap,
|
|
77
77
|
createAddLiquidityInstruction: () => getAddLiquidityInstruction,
|
|
78
78
|
createClosePositionInstruction: () => getClosePositionInstruction,
|
|
79
79
|
createCollectFeesInstruction: () => getCollectFeesInstruction,
|
|
@@ -85,7 +85,7 @@ chunkQ7SFCCGT_cjs.__export(cpmm_exports, {
|
|
|
85
85
|
createOracleConsultInstruction: () => getOracleConsultInstruction,
|
|
86
86
|
createOracleUpdateInstruction: () => getOracleUpdateInstruction,
|
|
87
87
|
createPauseInstruction: () => getPauseInstruction,
|
|
88
|
-
createPositionArgsCodec: () =>
|
|
88
|
+
createPositionArgsCodec: () => chunkGUGN3EYX_cjs.createPositionArgsCodec,
|
|
89
89
|
createQuoteToNumeraireInstruction: () => getQuoteToNumeraireInstruction,
|
|
90
90
|
createRemoveLiquidityInstruction: () => getRemoveLiquidityInstruction,
|
|
91
91
|
createSetFeesInstruction: () => getSetFeesInstruction,
|
|
@@ -97,47 +97,47 @@ chunkQ7SFCCGT_cjs.__export(cpmm_exports, {
|
|
|
97
97
|
createUnpauseInstruction: () => getUnpauseInstruction,
|
|
98
98
|
createWithdrawVaultExcessInstruction: () => getWithdrawVaultExcessInstruction,
|
|
99
99
|
curveParamsToMarketCap: () => curveParamsToMarketCap,
|
|
100
|
-
decodeAmmConfig: () =>
|
|
101
|
-
decodeOracleState: () =>
|
|
102
|
-
decodePool: () =>
|
|
103
|
-
decodePosition: () =>
|
|
104
|
-
encodeAddLiquidityArgs: () =>
|
|
105
|
-
encodeCollectFeesArgs: () =>
|
|
106
|
-
encodeCollectProtocolFeesArgs: () =>
|
|
107
|
-
encodeCreatePositionArgs: () =>
|
|
108
|
-
encodeInitializeConfigArgs: () =>
|
|
109
|
-
encodeInitializeOracleArgs: () =>
|
|
110
|
-
encodeInitializePoolArgs: () =>
|
|
111
|
-
encodeInstructionData: () =>
|
|
112
|
-
encodeOracleConsultArgs: () =>
|
|
113
|
-
encodeQuoteToNumeraireArgs: () =>
|
|
114
|
-
encodeRemoveLiquidityArgs: () =>
|
|
115
|
-
encodeSetFeesArgs: () =>
|
|
116
|
-
encodeSetHookArgs: () =>
|
|
117
|
-
encodeSetRouteArgs: () =>
|
|
118
|
-
encodeSwapExactInArgs: () =>
|
|
119
|
-
encodeTransferAdminArgs: () =>
|
|
120
|
-
fetchAllPools: () =>
|
|
100
|
+
decodeAmmConfig: () => chunkGUGN3EYX_cjs.decodeAmmConfig,
|
|
101
|
+
decodeOracleState: () => chunkGUGN3EYX_cjs.decodeOracleState,
|
|
102
|
+
decodePool: () => chunkGUGN3EYX_cjs.decodePool,
|
|
103
|
+
decodePosition: () => chunkGUGN3EYX_cjs.decodePosition,
|
|
104
|
+
encodeAddLiquidityArgs: () => chunkGUGN3EYX_cjs.encodeAddLiquidityArgs,
|
|
105
|
+
encodeCollectFeesArgs: () => chunkGUGN3EYX_cjs.encodeCollectFeesArgs,
|
|
106
|
+
encodeCollectProtocolFeesArgs: () => chunkGUGN3EYX_cjs.encodeCollectProtocolFeesArgs,
|
|
107
|
+
encodeCreatePositionArgs: () => chunkGUGN3EYX_cjs.encodeCreatePositionArgs,
|
|
108
|
+
encodeInitializeConfigArgs: () => chunkGUGN3EYX_cjs.encodeInitializeConfigArgs,
|
|
109
|
+
encodeInitializeOracleArgs: () => chunkGUGN3EYX_cjs.encodeInitializeOracleArgs,
|
|
110
|
+
encodeInitializePoolArgs: () => chunkGUGN3EYX_cjs.encodeInitializePoolArgs,
|
|
111
|
+
encodeInstructionData: () => chunkGUGN3EYX_cjs.encodeInstructionData,
|
|
112
|
+
encodeOracleConsultArgs: () => chunkGUGN3EYX_cjs.encodeOracleConsultArgs,
|
|
113
|
+
encodeQuoteToNumeraireArgs: () => chunkGUGN3EYX_cjs.encodeQuoteToNumeraireArgs,
|
|
114
|
+
encodeRemoveLiquidityArgs: () => chunkGUGN3EYX_cjs.encodeRemoveLiquidityArgs,
|
|
115
|
+
encodeSetFeesArgs: () => chunkGUGN3EYX_cjs.encodeSetFeesArgs,
|
|
116
|
+
encodeSetHookArgs: () => chunkGUGN3EYX_cjs.encodeSetHookArgs,
|
|
117
|
+
encodeSetRouteArgs: () => chunkGUGN3EYX_cjs.encodeSetRouteArgs,
|
|
118
|
+
encodeSwapExactInArgs: () => chunkGUGN3EYX_cjs.encodeSwapExactInArgs,
|
|
119
|
+
encodeTransferAdminArgs: () => chunkGUGN3EYX_cjs.encodeTransferAdminArgs,
|
|
120
|
+
fetchAllPools: () => chunkGUGN3EYX_cjs.fetchAllPools,
|
|
121
121
|
fetchConfig: () => fetchConfig,
|
|
122
122
|
fetchConfigWithAddress: () => fetchConfigWithAddress,
|
|
123
|
-
fetchOracle: () =>
|
|
124
|
-
fetchOraclesBatch: () =>
|
|
125
|
-
fetchPool: () =>
|
|
126
|
-
fetchPoolPositions: () =>
|
|
127
|
-
fetchPoolsBatch: () =>
|
|
128
|
-
fetchPosition: () =>
|
|
129
|
-
fetchPositionByParams: () =>
|
|
130
|
-
fetchPositionsBatch: () =>
|
|
131
|
-
fetchUserPositions: () =>
|
|
132
|
-
filterActivePositions: () =>
|
|
133
|
-
filterPoolsByMint: () =>
|
|
123
|
+
fetchOracle: () => chunkGUGN3EYX_cjs.fetchOracle,
|
|
124
|
+
fetchOraclesBatch: () => chunkGUGN3EYX_cjs.fetchOraclesBatch,
|
|
125
|
+
fetchPool: () => chunkGUGN3EYX_cjs.fetchPool,
|
|
126
|
+
fetchPoolPositions: () => chunkGUGN3EYX_cjs.fetchPoolPositions,
|
|
127
|
+
fetchPoolsBatch: () => chunkGUGN3EYX_cjs.fetchPoolsBatch,
|
|
128
|
+
fetchPosition: () => chunkGUGN3EYX_cjs.fetchPosition,
|
|
129
|
+
fetchPositionByParams: () => chunkGUGN3EYX_cjs.fetchPositionByParams,
|
|
130
|
+
fetchPositionsBatch: () => chunkGUGN3EYX_cjs.fetchPositionsBatch,
|
|
131
|
+
fetchUserPositions: () => chunkGUGN3EYX_cjs.fetchUserPositions,
|
|
132
|
+
filterActivePositions: () => chunkGUGN3EYX_cjs.filterActivePositions,
|
|
133
|
+
filterPoolsByMint: () => chunkGUGN3EYX_cjs.filterPoolsByMint,
|
|
134
134
|
getAddLiquidityDiscriminatorBytes: () => getAddLiquidityDiscriminatorBytes,
|
|
135
135
|
getAddLiquidityInstruction: () => getAddLiquidityInstruction,
|
|
136
136
|
getAddLiquidityInstructionAsync: () => getAddLiquidityInstructionAsync,
|
|
137
137
|
getAddLiquidityInstructionDataCodec: () => getAddLiquidityInstructionDataCodec,
|
|
138
138
|
getAddLiquidityInstructionDataDecoder: () => getAddLiquidityInstructionDataDecoder,
|
|
139
139
|
getAddLiquidityInstructionDataEncoder: () => getAddLiquidityInstructionDataEncoder,
|
|
140
|
-
getAddLiquidityQuote: () =>
|
|
140
|
+
getAddLiquidityQuote: () => chunkGUGN3EYX_cjs.getAddLiquidityQuote,
|
|
141
141
|
getClosePositionDiscriminatorBytes: () => getClosePositionDiscriminatorBytes,
|
|
142
142
|
getClosePositionInstruction: () => getClosePositionInstruction,
|
|
143
143
|
getClosePositionInstructionDataCodec: () => getClosePositionInstructionDataCodec,
|
|
@@ -155,7 +155,7 @@ chunkQ7SFCCGT_cjs.__export(cpmm_exports, {
|
|
|
155
155
|
getCollectProtocolFeesInstructionDataCodec: () => getCollectProtocolFeesInstructionDataCodec,
|
|
156
156
|
getCollectProtocolFeesInstructionDataDecoder: () => getCollectProtocolFeesInstructionDataDecoder,
|
|
157
157
|
getCollectProtocolFeesInstructionDataEncoder: () => getCollectProtocolFeesInstructionDataEncoder,
|
|
158
|
-
getConfigAddress: () =>
|
|
158
|
+
getConfigAddress: () => chunkAKLS6T3R_cjs.getConfigAddress,
|
|
159
159
|
getCreatePositionDiscriminatorBytes: () => getCreatePositionDiscriminatorBytes,
|
|
160
160
|
getCreatePositionInstruction: () => getCreatePositionInstruction,
|
|
161
161
|
getCreatePositionInstructionAsync: () => getCreatePositionInstructionAsync,
|
|
@@ -181,22 +181,22 @@ chunkQ7SFCCGT_cjs.__export(cpmm_exports, {
|
|
|
181
181
|
getInitializePoolInstructionDataCodec: () => getInitializePoolInstructionDataCodec,
|
|
182
182
|
getInitializePoolInstructionDataDecoder: () => getInitializePoolInstructionDataDecoder,
|
|
183
183
|
getInitializePoolInstructionDataEncoder: () => getInitializePoolInstructionDataEncoder,
|
|
184
|
-
getK: () =>
|
|
185
|
-
getLiquidityAddresses: () =>
|
|
184
|
+
getK: () => chunkGUGN3EYX_cjs.getK,
|
|
185
|
+
getLiquidityAddresses: () => chunkAKLS6T3R_cjs.getLiquidityAddresses,
|
|
186
186
|
getMetadataAddress: () => getMetadataAddress,
|
|
187
|
-
getOracleAddress: () =>
|
|
188
|
-
getOracleAddressFromPool: () =>
|
|
189
|
-
getOracleAge: () =>
|
|
190
|
-
getOracleBufferStats: () =>
|
|
187
|
+
getOracleAddress: () => chunkAKLS6T3R_cjs.getOracleAddress,
|
|
188
|
+
getOracleAddressFromPool: () => chunkGUGN3EYX_cjs.getOracleAddressFromPool,
|
|
189
|
+
getOracleAge: () => chunkGUGN3EYX_cjs.getOracleAge,
|
|
190
|
+
getOracleBufferStats: () => chunkGUGN3EYX_cjs.getOracleBufferStats,
|
|
191
191
|
getOracleConsultDiscriminatorBytes: () => getOracleConsultDiscriminatorBytes,
|
|
192
192
|
getOracleConsultInstruction: () => getOracleConsultInstruction,
|
|
193
193
|
getOracleConsultInstructionAsync: () => getOracleConsultInstructionAsync,
|
|
194
194
|
getOracleConsultInstructionDataCodec: () => getOracleConsultInstructionDataCodec,
|
|
195
195
|
getOracleConsultInstructionDataDecoder: () => getOracleConsultInstructionDataDecoder,
|
|
196
196
|
getOracleConsultInstructionDataEncoder: () => getOracleConsultInstructionDataEncoder,
|
|
197
|
-
getOracleDeviation: () =>
|
|
198
|
-
getOracleForPool: () =>
|
|
199
|
-
getOracleSpotPrices: () =>
|
|
197
|
+
getOracleDeviation: () => chunkGUGN3EYX_cjs.getOracleDeviation,
|
|
198
|
+
getOracleForPool: () => chunkGUGN3EYX_cjs.getOracleForPool,
|
|
199
|
+
getOracleSpotPrices: () => chunkGUGN3EYX_cjs.getOracleSpotPrices,
|
|
200
200
|
getOracleUpdateDiscriminatorBytes: () => getOracleUpdateDiscriminatorBytes,
|
|
201
201
|
getOracleUpdateInstruction: () => getOracleUpdateInstruction,
|
|
202
202
|
getOracleUpdateInstructionAsync: () => getOracleUpdateInstructionAsync,
|
|
@@ -208,23 +208,23 @@ chunkQ7SFCCGT_cjs.__export(cpmm_exports, {
|
|
|
208
208
|
getPauseInstructionDataCodec: () => getPauseInstructionDataCodec,
|
|
209
209
|
getPauseInstructionDataDecoder: () => getPauseInstructionDataDecoder,
|
|
210
210
|
getPauseInstructionDataEncoder: () => getPauseInstructionDataEncoder,
|
|
211
|
-
getPendingFees: () =>
|
|
212
|
-
getPoolAddress: () =>
|
|
213
|
-
getPoolAddressFromMints: () =>
|
|
214
|
-
getPoolAuthorityAddress: () =>
|
|
215
|
-
getPoolByMints: () =>
|
|
216
|
-
getPoolInitAddresses: () =>
|
|
217
|
-
getPoolVault0Address: () =>
|
|
218
|
-
getPoolVault1Address: () =>
|
|
219
|
-
getPositionAddress: () =>
|
|
220
|
-
getPositionAddressFromParams: () =>
|
|
221
|
-
getPositionValue: () =>
|
|
211
|
+
getPendingFees: () => chunkGUGN3EYX_cjs.getPendingFees,
|
|
212
|
+
getPoolAddress: () => chunkAKLS6T3R_cjs.getPoolAddress,
|
|
213
|
+
getPoolAddressFromMints: () => chunkGUGN3EYX_cjs.getPoolAddressFromMints,
|
|
214
|
+
getPoolAuthorityAddress: () => chunkAKLS6T3R_cjs.getPoolAuthorityAddress,
|
|
215
|
+
getPoolByMints: () => chunkGUGN3EYX_cjs.getPoolByMints,
|
|
216
|
+
getPoolInitAddresses: () => chunkAKLS6T3R_cjs.getPoolInitAddresses,
|
|
217
|
+
getPoolVault0Address: () => chunkAKLS6T3R_cjs.getPoolVault0Address,
|
|
218
|
+
getPoolVault1Address: () => chunkAKLS6T3R_cjs.getPoolVault1Address,
|
|
219
|
+
getPositionAddress: () => chunkAKLS6T3R_cjs.getPositionAddress,
|
|
220
|
+
getPositionAddressFromParams: () => chunkGUGN3EYX_cjs.getPositionAddressFromParams,
|
|
221
|
+
getPositionValue: () => chunkGUGN3EYX_cjs.getPositionValue,
|
|
222
222
|
getPreviewSwapExactInDiscriminatorBytes: () => getPreviewSwapExactInDiscriminatorBytes,
|
|
223
223
|
getPreviewSwapExactInInstruction: () => getPreviewSwapExactInInstruction,
|
|
224
224
|
getPreviewSwapExactInInstructionDataCodec: () => getPreviewSwapExactInInstructionDataCodec,
|
|
225
225
|
getPreviewSwapExactInInstructionDataDecoder: () => getPreviewSwapExactInInstructionDataDecoder,
|
|
226
226
|
getPreviewSwapExactInInstructionDataEncoder: () => getPreviewSwapExactInInstructionDataEncoder,
|
|
227
|
-
getProtocolFeePositionAddress: () =>
|
|
227
|
+
getProtocolFeePositionAddress: () => chunkAKLS6T3R_cjs.getProtocolFeePositionAddress,
|
|
228
228
|
getQuoteToNumeraireDiscriminatorBytes: () => getQuoteToNumeraireDiscriminatorBytes,
|
|
229
229
|
getQuoteToNumeraireInstruction: () => getQuoteToNumeraireInstruction,
|
|
230
230
|
getQuoteToNumeraireInstructionDataCodec: () => getQuoteToNumeraireInstructionDataCodec,
|
|
@@ -236,7 +236,7 @@ chunkQ7SFCCGT_cjs.__export(cpmm_exports, {
|
|
|
236
236
|
getRemoveLiquidityInstructionDataCodec: () => getRemoveLiquidityInstructionDataCodec,
|
|
237
237
|
getRemoveLiquidityInstructionDataDecoder: () => getRemoveLiquidityInstructionDataDecoder,
|
|
238
238
|
getRemoveLiquidityInstructionDataEncoder: () => getRemoveLiquidityInstructionDataEncoder,
|
|
239
|
-
getRemoveLiquidityQuote: () =>
|
|
239
|
+
getRemoveLiquidityQuote: () => chunkGUGN3EYX_cjs.getRemoveLiquidityQuote,
|
|
240
240
|
getSetFeesDiscriminatorBytes: () => getSetFeesDiscriminatorBytes,
|
|
241
241
|
getSetFeesInstruction: () => getSetFeesInstruction,
|
|
242
242
|
getSetFeesInstructionDataCodec: () => getSetFeesInstructionDataCodec,
|
|
@@ -252,23 +252,23 @@ chunkQ7SFCCGT_cjs.__export(cpmm_exports, {
|
|
|
252
252
|
getSetRouteInstructionDataCodec: () => getSetRouteInstructionDataCodec,
|
|
253
253
|
getSetRouteInstructionDataDecoder: () => getSetRouteInstructionDataDecoder,
|
|
254
254
|
getSetRouteInstructionDataEncoder: () => getSetRouteInstructionDataEncoder,
|
|
255
|
-
getSpotPrice0: () =>
|
|
256
|
-
getSpotPrice1: () =>
|
|
257
|
-
getSwapAddresses: () =>
|
|
255
|
+
getSpotPrice0: () => chunkGUGN3EYX_cjs.getSpotPrice0,
|
|
256
|
+
getSpotPrice1: () => chunkGUGN3EYX_cjs.getSpotPrice1,
|
|
257
|
+
getSwapAddresses: () => chunkAKLS6T3R_cjs.getSwapAddresses,
|
|
258
258
|
getSwapExactInDiscriminatorBytes: () => getSwapExactInDiscriminatorBytes,
|
|
259
259
|
getSwapExactInInstruction: () => getSwapExactInInstruction,
|
|
260
260
|
getSwapExactInInstructionAsync: () => getSwapExactInInstructionAsync,
|
|
261
261
|
getSwapExactInInstructionDataCodec: () => getSwapExactInInstructionDataCodec,
|
|
262
262
|
getSwapExactInInstructionDataDecoder: () => getSwapExactInInstructionDataDecoder,
|
|
263
263
|
getSwapExactInInstructionDataEncoder: () => getSwapExactInInstructionDataEncoder,
|
|
264
|
-
getSwapQuote: () =>
|
|
265
|
-
getSwapQuoteExactOut: () =>
|
|
264
|
+
getSwapQuote: () => chunkGUGN3EYX_cjs.getSwapQuote,
|
|
265
|
+
getSwapQuoteExactOut: () => chunkGUGN3EYX_cjs.getSwapQuoteExactOut,
|
|
266
266
|
getTransferAdminDiscriminatorBytes: () => getTransferAdminDiscriminatorBytes,
|
|
267
267
|
getTransferAdminInstruction: () => getTransferAdminInstruction,
|
|
268
268
|
getTransferAdminInstructionDataCodec: () => getTransferAdminInstructionDataCodec,
|
|
269
269
|
getTransferAdminInstructionDataDecoder: () => getTransferAdminInstructionDataDecoder,
|
|
270
270
|
getTransferAdminInstructionDataEncoder: () => getTransferAdminInstructionDataEncoder,
|
|
271
|
-
getTvl: () =>
|
|
271
|
+
getTvl: () => chunkGUGN3EYX_cjs.getTvl,
|
|
272
272
|
getUnpauseDiscriminatorBytes: () => getUnpauseDiscriminatorBytes,
|
|
273
273
|
getUnpauseInstruction: () => getUnpauseInstruction,
|
|
274
274
|
getUnpauseInstructionDataCodec: () => getUnpauseInstructionDataCodec,
|
|
@@ -285,21 +285,21 @@ chunkQ7SFCCGT_cjs.__export(cpmm_exports, {
|
|
|
285
285
|
getWithdrawVaultExcessInstructionDataCodec: () => getWithdrawVaultExcessInstructionDataCodec,
|
|
286
286
|
getWithdrawVaultExcessInstructionDataDecoder: () => getWithdrawVaultExcessInstructionDataDecoder,
|
|
287
287
|
getWithdrawVaultExcessInstructionDataEncoder: () => getWithdrawVaultExcessInstructionDataEncoder,
|
|
288
|
-
initializeConfigArgsCodec: () =>
|
|
289
|
-
initializeOracleArgsCodec: () =>
|
|
290
|
-
initializePoolArgsCodec: () =>
|
|
288
|
+
initializeConfigArgsCodec: () => chunkGUGN3EYX_cjs.initializeConfigArgsCodec,
|
|
289
|
+
initializeOracleArgsCodec: () => chunkGUGN3EYX_cjs.initializeOracleArgsCodec,
|
|
290
|
+
initializePoolArgsCodec: () => chunkGUGN3EYX_cjs.initializePoolArgsCodec,
|
|
291
291
|
isCpmmError: () => isCpmmError,
|
|
292
|
-
isOracleStale: () =>
|
|
293
|
-
isqrt: () =>
|
|
292
|
+
isOracleStale: () => chunkGUGN3EYX_cjs.isOracleStale,
|
|
293
|
+
isqrt: () => chunkGUGN3EYX_cjs.isqrt,
|
|
294
294
|
marketCapToCurveParams: () => marketCapToCurveParams,
|
|
295
295
|
marketCapToSingleCurveParams: () => marketCapToSingleCurveParams,
|
|
296
296
|
marketCapToTokenPrice: () => marketCapToTokenPrice,
|
|
297
|
-
maxBigInt: () =>
|
|
298
|
-
minBigInt: () =>
|
|
299
|
-
numberToQ64: () =>
|
|
300
|
-
observationCodec: () =>
|
|
301
|
-
oracleConsultArgsCodec: () =>
|
|
302
|
-
oracleStateDataCodec: () =>
|
|
297
|
+
maxBigInt: () => chunkGUGN3EYX_cjs.maxBigInt,
|
|
298
|
+
minBigInt: () => chunkGUGN3EYX_cjs.minBigInt,
|
|
299
|
+
numberToQ64: () => chunkGUGN3EYX_cjs.numberToQ64,
|
|
300
|
+
observationCodec: () => chunkGUGN3EYX_cjs.observationCodec,
|
|
301
|
+
oracleConsultArgsCodec: () => chunkGUGN3EYX_cjs.oracleConsultArgsCodec,
|
|
302
|
+
oracleStateDataCodec: () => chunkGUGN3EYX_cjs.oracleStateDataCodec,
|
|
303
303
|
parseAddLiquidityInstruction: () => parseAddLiquidityInstruction,
|
|
304
304
|
parseClosePositionInstruction: () => parseClosePositionInstruction,
|
|
305
305
|
parseCollectFeesInstruction: () => parseCollectFeesInstruction,
|
|
@@ -323,33 +323,33 @@ chunkQ7SFCCGT_cjs.__export(cpmm_exports, {
|
|
|
323
323
|
parseUnpauseInstruction: () => parseUnpauseInstruction,
|
|
324
324
|
parseUpdateConfigInstruction: () => parseUpdateConfigInstruction,
|
|
325
325
|
parseWithdrawVaultExcessInstruction: () => parseWithdrawVaultExcessInstruction,
|
|
326
|
-
poolDataCodec: () =>
|
|
327
|
-
poolExists: () =>
|
|
328
|
-
positionDataCodec: () =>
|
|
329
|
-
q64Div: () =>
|
|
330
|
-
q64Mul: () =>
|
|
331
|
-
q64ToNumber: () =>
|
|
332
|
-
quoteToNumeraireArgsCodec: () =>
|
|
333
|
-
ratioToNumber: () =>
|
|
334
|
-
removeLiquidityArgsCodec: () =>
|
|
335
|
-
setFeesArgsCodec: () =>
|
|
336
|
-
setHookArgsCodec: () =>
|
|
337
|
-
setRouteArgsCodec: () =>
|
|
338
|
-
sortMints: () =>
|
|
339
|
-
sortPoolsByReserves: () =>
|
|
340
|
-
sortPositionsByShares: () =>
|
|
341
|
-
swapExactInArgsCodec: () =>
|
|
342
|
-
transferAdminArgsCodec: () =>
|
|
326
|
+
poolDataCodec: () => chunkGUGN3EYX_cjs.poolDataCodec,
|
|
327
|
+
poolExists: () => chunkGUGN3EYX_cjs.poolExists,
|
|
328
|
+
positionDataCodec: () => chunkGUGN3EYX_cjs.positionDataCodec,
|
|
329
|
+
q64Div: () => chunkGUGN3EYX_cjs.q64Div,
|
|
330
|
+
q64Mul: () => chunkGUGN3EYX_cjs.q64Mul,
|
|
331
|
+
q64ToNumber: () => chunkGUGN3EYX_cjs.q64ToNumber,
|
|
332
|
+
quoteToNumeraireArgsCodec: () => chunkGUGN3EYX_cjs.quoteToNumeraireArgsCodec,
|
|
333
|
+
ratioToNumber: () => chunkGUGN3EYX_cjs.ratioToNumber,
|
|
334
|
+
removeLiquidityArgsCodec: () => chunkGUGN3EYX_cjs.removeLiquidityArgsCodec,
|
|
335
|
+
setFeesArgsCodec: () => chunkGUGN3EYX_cjs.setFeesArgsCodec,
|
|
336
|
+
setHookArgsCodec: () => chunkGUGN3EYX_cjs.setHookArgsCodec,
|
|
337
|
+
setRouteArgsCodec: () => chunkGUGN3EYX_cjs.setRouteArgsCodec,
|
|
338
|
+
sortMints: () => chunkAKLS6T3R_cjs.sortMints,
|
|
339
|
+
sortPoolsByReserves: () => chunkGUGN3EYX_cjs.sortPoolsByReserves,
|
|
340
|
+
sortPositionsByShares: () => chunkGUGN3EYX_cjs.sortPositionsByShares,
|
|
341
|
+
swapExactInArgsCodec: () => chunkGUGN3EYX_cjs.swapExactInArgsCodec,
|
|
342
|
+
transferAdminArgsCodec: () => chunkGUGN3EYX_cjs.transferAdminArgsCodec,
|
|
343
343
|
validateMarketCapParameters: () => validateMarketCapParameters
|
|
344
344
|
});
|
|
345
345
|
var addressCodec = kit.getAddressCodec();
|
|
346
346
|
var textEncoder = new TextEncoder();
|
|
347
347
|
async function getMetadataAddress(mint) {
|
|
348
348
|
return kit.getProgramDerivedAddress({
|
|
349
|
-
programAddress:
|
|
349
|
+
programAddress: chunkAKLS6T3R_cjs.TOKEN_METADATA_PROGRAM_ID,
|
|
350
350
|
seeds: [
|
|
351
351
|
textEncoder.encode("metadata"),
|
|
352
|
-
addressCodec.encode(
|
|
352
|
+
addressCodec.encode(chunkAKLS6T3R_cjs.TOKEN_METADATA_PROGRAM_ID),
|
|
353
353
|
addressCodec.encode(mint)
|
|
354
354
|
]
|
|
355
355
|
});
|
|
@@ -1716,7 +1716,9 @@ function getInitializePoolInstructionDataEncoder() {
|
|
|
1716
1716
|
["initialSwapFeeBps", kit.getU16Encoder()],
|
|
1717
1717
|
["initialFeeSplitBps", kit.getU16Encoder()],
|
|
1718
1718
|
["liquidityMeasureTokenIndex", kit.getU8Encoder()],
|
|
1719
|
-
["numeraireMintOverride", kit.getOptionEncoder(kit.getAddressEncoder())]
|
|
1719
|
+
["numeraireMintOverride", kit.getOptionEncoder(kit.getAddressEncoder())],
|
|
1720
|
+
["hookProgram", kit.getAddressEncoder()],
|
|
1721
|
+
["hookFlags", kit.getU32Encoder()]
|
|
1720
1722
|
]),
|
|
1721
1723
|
(value) => ({ ...value, discriminator: INITIALIZE_POOL_DISCRIMINATOR })
|
|
1722
1724
|
);
|
|
@@ -1729,7 +1731,9 @@ function getInitializePoolInstructionDataDecoder() {
|
|
|
1729
1731
|
["initialSwapFeeBps", kit.getU16Decoder()],
|
|
1730
1732
|
["initialFeeSplitBps", kit.getU16Decoder()],
|
|
1731
1733
|
["liquidityMeasureTokenIndex", kit.getU8Decoder()],
|
|
1732
|
-
["numeraireMintOverride", kit.getOptionDecoder(kit.getAddressDecoder())]
|
|
1734
|
+
["numeraireMintOverride", kit.getOptionDecoder(kit.getAddressDecoder())],
|
|
1735
|
+
["hookProgram", kit.getAddressDecoder()],
|
|
1736
|
+
["hookFlags", kit.getU32Decoder()]
|
|
1733
1737
|
]);
|
|
1734
1738
|
}
|
|
1735
1739
|
function getInitializePoolInstructionDataCodec() {
|
|
@@ -3554,8 +3558,8 @@ function createSwapInstruction(params) {
|
|
|
3554
3558
|
userIn,
|
|
3555
3559
|
userOut,
|
|
3556
3560
|
trader,
|
|
3557
|
-
token0Program: token0Program ?? tokenProgram ??
|
|
3558
|
-
token1Program: token1Program ?? tokenProgram ??
|
|
3561
|
+
token0Program: token0Program ?? tokenProgram ?? chunkAKLS6T3R_cjs.TOKEN_PROGRAM_ADDRESS,
|
|
3562
|
+
token1Program: token1Program ?? tokenProgram ?? chunkAKLS6T3R_cjs.TOKEN_PROGRAM_ADDRESS,
|
|
3559
3563
|
oracle,
|
|
3560
3564
|
amountIn,
|
|
3561
3565
|
minAmountOut,
|
|
@@ -3583,8 +3587,8 @@ function base64ToBytes(base64) {
|
|
|
3583
3587
|
}
|
|
3584
3588
|
return bytes;
|
|
3585
3589
|
}
|
|
3586
|
-
async function fetchConfig(rpc, programId =
|
|
3587
|
-
const [configAddress] = await
|
|
3590
|
+
async function fetchConfig(rpc, programId = chunkAKLS6T3R_cjs.CPMM_PROGRAM_ID, commitment) {
|
|
3591
|
+
const [configAddress] = await chunkAKLS6T3R_cjs.getConfigAddress(programId);
|
|
3588
3592
|
const response = await rpc.getAccountInfo(configAddress, {
|
|
3589
3593
|
encoding: "base64",
|
|
3590
3594
|
commitment
|
|
@@ -3592,10 +3596,10 @@ async function fetchConfig(rpc, programId = chunk3BW6IVP3_cjs.CPMM_PROGRAM_ID, c
|
|
|
3592
3596
|
if (!response.value) {
|
|
3593
3597
|
return null;
|
|
3594
3598
|
}
|
|
3595
|
-
return
|
|
3599
|
+
return chunkGUGN3EYX_cjs.decodeAmmConfig(base64ToBytes(response.value.data[0]));
|
|
3596
3600
|
}
|
|
3597
|
-
async function fetchConfigWithAddress(rpc, programId =
|
|
3598
|
-
const [configAddress] = await
|
|
3601
|
+
async function fetchConfigWithAddress(rpc, programId = chunkAKLS6T3R_cjs.CPMM_PROGRAM_ID, commitment) {
|
|
3602
|
+
const [configAddress] = await chunkAKLS6T3R_cjs.getConfigAddress(programId);
|
|
3599
3603
|
const account = await fetchConfig(rpc, programId, commitment);
|
|
3600
3604
|
if (!account) {
|
|
3601
3605
|
return null;
|
|
@@ -4557,6 +4561,7 @@ chunkQ7SFCCGT_cjs.__export(initializer_exports, {
|
|
|
4557
4561
|
SEED_CONFIG: () => SEED_CONFIG2,
|
|
4558
4562
|
SEED_LAUNCH: () => SEED_LAUNCH,
|
|
4559
4563
|
SEED_LAUNCH_AUTHORITY: () => SEED_LAUNCH_AUTHORITY,
|
|
4564
|
+
SEED_LAUNCH_FEE_STATE: () => SEED_LAUNCH_FEE_STATE,
|
|
4560
4565
|
TRADE_DIRECTION_BUY: () => TRADE_DIRECTION_BUY,
|
|
4561
4566
|
TRADE_DIRECTION_SELL: () => TRADE_DIRECTION_SELL,
|
|
4562
4567
|
buildAddressLookupTableSetupInstructions: () => buildAddressLookupTableSetupInstructions,
|
|
@@ -4576,7 +4581,9 @@ chunkQ7SFCCGT_cjs.__export(initializer_exports, {
|
|
|
4576
4581
|
fetchAllLaunches: () => fetchAllLaunches,
|
|
4577
4582
|
fetchLaunch: () => fetchLaunch2,
|
|
4578
4583
|
fetchLaunchesByAuthority: () => fetchLaunchesByAuthority,
|
|
4584
|
+
getClaimFeesInstructionAsync: () => getClaimFeesInstructionAsync,
|
|
4579
4585
|
getConfigAddress: () => getConfigAddress2,
|
|
4586
|
+
getHarvestMigratedFeesInstructionAsync: () => getHarvestMigratedFeesInstructionAsync,
|
|
4580
4587
|
getInitConfigCodec: () => getInitConfigCodec,
|
|
4581
4588
|
getInitConfigDecoder: () => getInitConfigDecoder,
|
|
4582
4589
|
getInitConfigEncoder: () => getInitConfigEncoder,
|
|
@@ -4592,7 +4599,13 @@ chunkQ7SFCCGT_cjs.__export(initializer_exports, {
|
|
|
4592
4599
|
getLaunchCodec: () => getLaunchCodec,
|
|
4593
4600
|
getLaunchDecoder: () => getLaunchDecoder,
|
|
4594
4601
|
getLaunchEncoder: () => getLaunchEncoder,
|
|
4602
|
+
getLaunchFeeStateAddress: () => getLaunchFeeStateAddress,
|
|
4603
|
+
getLaunchFeeStateCodec: () => getLaunchFeeStateCodec,
|
|
4604
|
+
getLaunchFeeStateDecoder: () => getLaunchFeeStateDecoder,
|
|
4605
|
+
getLaunchFeeStateEncoder: () => getLaunchFeeStateEncoder,
|
|
4595
4606
|
getProgramDataAddress: () => getProgramDataAddress,
|
|
4607
|
+
getReplaceFeeBeneficiaryInstructionAsync: () => getReplaceFeeBeneficiaryInstructionAsync,
|
|
4608
|
+
getSetFeePolicyInstructionAsync: () => getSetFeePolicyInstructionAsync,
|
|
4596
4609
|
getTokenMetadataAddress: () => getTokenMetadataAddress,
|
|
4597
4610
|
launchExists: () => launchExists,
|
|
4598
4611
|
launchIdFromU64: () => launchIdFromU64,
|
|
@@ -4613,6 +4626,7 @@ var PREDICTION_HOOK_PROGRAM_ID = kit.address(
|
|
|
4613
4626
|
var SEED_CONFIG2 = "config";
|
|
4614
4627
|
var SEED_LAUNCH = "launch";
|
|
4615
4628
|
var SEED_LAUNCH_AUTHORITY = "launch_authority";
|
|
4629
|
+
var SEED_LAUNCH_FEE_STATE = "launch_fee_state";
|
|
4616
4630
|
var EMPTY_REMAINING_ACCOUNTS_HASH = new Uint8Array([
|
|
4617
4631
|
232,
|
|
4618
4632
|
231,
|
|
@@ -4759,7 +4773,18 @@ var INITIALIZER_ACCOUNT_DISCRIMINATORS = {
|
|
|
4759
4773
|
// SHA256("account:InitConfig")[0:8]
|
|
4760
4774
|
InitConfig: new Uint8Array([97, 166, 35, 7, 20, 2, 164, 126]),
|
|
4761
4775
|
// SHA256("account:Launch")[0:8]
|
|
4762
|
-
Launch: new Uint8Array([144, 51, 51, 163, 206, 85, 213, 38])
|
|
4776
|
+
Launch: new Uint8Array([144, 51, 51, 163, 206, 85, 213, 38]),
|
|
4777
|
+
// SHA256("account:LaunchFeeState")[0:8]
|
|
4778
|
+
LaunchFeeState: new Uint8Array([
|
|
4779
|
+
1,
|
|
4780
|
+
106,
|
|
4781
|
+
55,
|
|
4782
|
+
241,
|
|
4783
|
+
179,
|
|
4784
|
+
18,
|
|
4785
|
+
230,
|
|
4786
|
+
232
|
|
4787
|
+
])
|
|
4763
4788
|
};
|
|
4764
4789
|
var INIT_CONFIG_DISCRIMINATOR = new Uint8Array([
|
|
4765
4790
|
97,
|
|
@@ -4782,7 +4807,10 @@ function getInitConfigEncoder() {
|
|
|
4782
4807
|
["hookAllowlist", kit.getArrayEncoder(kit.getAddressEncoder(), { size: 32 })],
|
|
4783
4808
|
["bump", kit.getU8Encoder()],
|
|
4784
4809
|
["version", kit.getU8Encoder()],
|
|
4785
|
-
["
|
|
4810
|
+
["protocolFeeBps", kit.getU16Encoder()],
|
|
4811
|
+
["minSwapFeeBps", kit.getU16Encoder()],
|
|
4812
|
+
["maxSwapFeeBps", kit.getU16Encoder()],
|
|
4813
|
+
["reserved", kit.fixEncoderSize(kit.getBytesEncoder(), 24)]
|
|
4786
4814
|
]),
|
|
4787
4815
|
(value) => ({ ...value, discriminator: INIT_CONFIG_DISCRIMINATOR })
|
|
4788
4816
|
);
|
|
@@ -4797,22 +4825,57 @@ function getInitConfigDecoder() {
|
|
|
4797
4825
|
["hookAllowlist", kit.getArrayDecoder(kit.getAddressDecoder(), { size: 32 })],
|
|
4798
4826
|
["bump", kit.getU8Decoder()],
|
|
4799
4827
|
["version", kit.getU8Decoder()],
|
|
4800
|
-
["
|
|
4828
|
+
["protocolFeeBps", kit.getU16Decoder()],
|
|
4829
|
+
["minSwapFeeBps", kit.getU16Decoder()],
|
|
4830
|
+
["maxSwapFeeBps", kit.getU16Decoder()],
|
|
4831
|
+
["reserved", kit.fixDecoderSize(kit.getBytesDecoder(), 24)]
|
|
4801
4832
|
]);
|
|
4802
4833
|
}
|
|
4803
4834
|
function getInitConfigCodec() {
|
|
4804
4835
|
return kit.combineCodec(getInitConfigEncoder(), getInitConfigDecoder());
|
|
4805
4836
|
}
|
|
4837
|
+
function getFeeBeneficiaryEncoder() {
|
|
4838
|
+
return kit.getStructEncoder([
|
|
4839
|
+
["wallet", kit.getAddressEncoder()],
|
|
4840
|
+
["shareBps", kit.getU16Encoder()],
|
|
4841
|
+
["pad", kit.fixEncoderSize(kit.getBytesEncoder(), 6)]
|
|
4842
|
+
]);
|
|
4843
|
+
}
|
|
4844
|
+
function getFeeBeneficiaryDecoder() {
|
|
4845
|
+
return kit.getStructDecoder([
|
|
4846
|
+
["wallet", kit.getAddressDecoder()],
|
|
4847
|
+
["shareBps", kit.getU16Decoder()],
|
|
4848
|
+
["pad", kit.fixDecoderSize(kit.getBytesDecoder(), 6)]
|
|
4849
|
+
]);
|
|
4850
|
+
}
|
|
4851
|
+
function getFeeBeneficiaryInputEncoder() {
|
|
4852
|
+
return kit.getStructEncoder([
|
|
4853
|
+
["wallet", kit.getAddressEncoder()],
|
|
4854
|
+
["shareBps", kit.getU16Encoder()]
|
|
4855
|
+
]);
|
|
4856
|
+
}
|
|
4857
|
+
function getFeeBeneficiaryInputDecoder() {
|
|
4858
|
+
return kit.getStructDecoder([
|
|
4859
|
+
["wallet", kit.getAddressDecoder()],
|
|
4860
|
+
["shareBps", kit.getU16Decoder()]
|
|
4861
|
+
]);
|
|
4862
|
+
}
|
|
4806
4863
|
function getInitializeConfigArgsEncoder2() {
|
|
4807
4864
|
return kit.getStructEncoder([
|
|
4808
4865
|
["migratorAllowlist", kit.getArrayEncoder(kit.getAddressEncoder())],
|
|
4809
|
-
["hookAllowlist", kit.getArrayEncoder(kit.getAddressEncoder())]
|
|
4866
|
+
["hookAllowlist", kit.getArrayEncoder(kit.getAddressEncoder())],
|
|
4867
|
+
["protocolFeeBps", kit.getU16Encoder()],
|
|
4868
|
+
["minSwapFeeBps", kit.getU16Encoder()],
|
|
4869
|
+
["maxSwapFeeBps", kit.getU16Encoder()]
|
|
4810
4870
|
]);
|
|
4811
4871
|
}
|
|
4812
4872
|
function getInitializeConfigArgsDecoder2() {
|
|
4813
4873
|
return kit.getStructDecoder([
|
|
4814
4874
|
["migratorAllowlist", kit.getArrayDecoder(kit.getAddressDecoder())],
|
|
4815
|
-
["hookAllowlist", kit.getArrayDecoder(kit.getAddressDecoder())]
|
|
4875
|
+
["hookAllowlist", kit.getArrayDecoder(kit.getAddressDecoder())],
|
|
4876
|
+
["protocolFeeBps", kit.getU16Decoder()],
|
|
4877
|
+
["minSwapFeeBps", kit.getU16Decoder()],
|
|
4878
|
+
["maxSwapFeeBps", kit.getU16Decoder()]
|
|
4816
4879
|
]);
|
|
4817
4880
|
}
|
|
4818
4881
|
function getInitializeConfigArgsCodec2() {
|
|
@@ -4831,7 +4894,7 @@ function getInitializeLaunchArgsEncoder() {
|
|
|
4831
4894
|
["baseForLiquidity", kit.getU64Encoder()],
|
|
4832
4895
|
["curveVirtualBase", kit.getU64Encoder()],
|
|
4833
4896
|
["curveVirtualQuote", kit.getU64Encoder()],
|
|
4834
|
-
["
|
|
4897
|
+
["swapFeeBps", kit.getU16Encoder()],
|
|
4835
4898
|
["curveKind", kit.getU8Encoder()],
|
|
4836
4899
|
["curveParams", kit.addEncoderSizePrefix(kit.getBytesEncoder(), kit.getU32Encoder())],
|
|
4837
4900
|
["allowBuy", kit.getU8Encoder()],
|
|
@@ -4858,7 +4921,8 @@ function getInitializeLaunchArgsEncoder() {
|
|
|
4858
4921
|
["migratorRemainingAccountsHash", kit.fixEncoderSize(kit.getBytesEncoder(), 32)],
|
|
4859
4922
|
["metadataName", kit.addEncoderSizePrefix(kit.getUtf8Encoder(), kit.getU32Encoder())],
|
|
4860
4923
|
["metadataSymbol", kit.addEncoderSizePrefix(kit.getUtf8Encoder(), kit.getU32Encoder())],
|
|
4861
|
-
["metadataUri", kit.addEncoderSizePrefix(kit.getUtf8Encoder(), kit.getU32Encoder())]
|
|
4924
|
+
["metadataUri", kit.addEncoderSizePrefix(kit.getUtf8Encoder(), kit.getU32Encoder())],
|
|
4925
|
+
["feeBeneficiaries", kit.getArrayEncoder(getFeeBeneficiaryInputEncoder())]
|
|
4862
4926
|
]);
|
|
4863
4927
|
}
|
|
4864
4928
|
function getInitializeLaunchArgsDecoder() {
|
|
@@ -4871,7 +4935,7 @@ function getInitializeLaunchArgsDecoder() {
|
|
|
4871
4935
|
["baseForLiquidity", kit.getU64Decoder()],
|
|
4872
4936
|
["curveVirtualBase", kit.getU64Decoder()],
|
|
4873
4937
|
["curveVirtualQuote", kit.getU64Decoder()],
|
|
4874
|
-
["
|
|
4938
|
+
["swapFeeBps", kit.getU16Decoder()],
|
|
4875
4939
|
["curveKind", kit.getU8Decoder()],
|
|
4876
4940
|
["curveParams", kit.addDecoderSizePrefix(kit.getBytesDecoder(), kit.getU32Decoder())],
|
|
4877
4941
|
["allowBuy", kit.getU8Decoder()],
|
|
@@ -4898,7 +4962,8 @@ function getInitializeLaunchArgsDecoder() {
|
|
|
4898
4962
|
["migratorRemainingAccountsHash", kit.fixDecoderSize(kit.getBytesDecoder(), 32)],
|
|
4899
4963
|
["metadataName", kit.addDecoderSizePrefix(kit.getUtf8Decoder(), kit.getU32Decoder())],
|
|
4900
4964
|
["metadataSymbol", kit.addDecoderSizePrefix(kit.getUtf8Decoder(), kit.getU32Decoder())],
|
|
4901
|
-
["metadataUri", kit.addDecoderSizePrefix(kit.getUtf8Decoder(), kit.getU32Decoder())]
|
|
4965
|
+
["metadataUri", kit.addDecoderSizePrefix(kit.getUtf8Decoder(), kit.getU32Decoder())],
|
|
4966
|
+
["feeBeneficiaries", kit.getArrayDecoder(getFeeBeneficiaryInputDecoder())]
|
|
4902
4967
|
]);
|
|
4903
4968
|
}
|
|
4904
4969
|
function getInitializeLaunchArgsCodec() {
|
|
@@ -4952,7 +5017,7 @@ function getLaunchEncoder() {
|
|
|
4952
5017
|
["baseForCurve", kit.getU64Encoder()],
|
|
4953
5018
|
["curveVirtualBase", kit.getU64Encoder()],
|
|
4954
5019
|
["curveVirtualQuote", kit.getU64Encoder()],
|
|
4955
|
-
["
|
|
5020
|
+
["swapFeeBps", kit.getU16Encoder()],
|
|
4956
5021
|
["pad1", kit.fixEncoderSize(kit.getBytesEncoder(), 6)],
|
|
4957
5022
|
["allowBuy", kit.getU8Encoder()],
|
|
4958
5023
|
["allowSell", kit.getU8Encoder()],
|
|
@@ -4994,7 +5059,7 @@ function getLaunchDecoder() {
|
|
|
4994
5059
|
["baseForCurve", kit.getU64Decoder()],
|
|
4995
5060
|
["curveVirtualBase", kit.getU64Decoder()],
|
|
4996
5061
|
["curveVirtualQuote", kit.getU64Decoder()],
|
|
4997
|
-
["
|
|
5062
|
+
["swapFeeBps", kit.getU16Decoder()],
|
|
4998
5063
|
["pad1", kit.fixDecoderSize(kit.getBytesDecoder(), 6)],
|
|
4999
5064
|
["allowBuy", kit.getU8Decoder()],
|
|
5000
5065
|
["allowSell", kit.getU8Decoder()],
|
|
@@ -5017,6 +5082,213 @@ function getLaunchDecoder() {
|
|
|
5017
5082
|
function getLaunchCodec() {
|
|
5018
5083
|
return kit.combineCodec(getLaunchEncoder(), getLaunchDecoder());
|
|
5019
5084
|
}
|
|
5085
|
+
var LAUNCH_FEE_STATE_DISCRIMINATOR = new Uint8Array([
|
|
5086
|
+
1,
|
|
5087
|
+
106,
|
|
5088
|
+
55,
|
|
5089
|
+
241,
|
|
5090
|
+
179,
|
|
5091
|
+
18,
|
|
5092
|
+
230,
|
|
5093
|
+
232
|
|
5094
|
+
]);
|
|
5095
|
+
function getLaunchFeeStateEncoder() {
|
|
5096
|
+
return kit.transformEncoder(
|
|
5097
|
+
kit.getStructEncoder([
|
|
5098
|
+
["discriminator", kit.fixEncoderSize(kit.getBytesEncoder(), 8)],
|
|
5099
|
+
["launch", kit.getAddressEncoder()],
|
|
5100
|
+
["protocolBeneficiary", kit.getAddressEncoder()],
|
|
5101
|
+
["beneficiaryLen", kit.getU8Encoder()],
|
|
5102
|
+
["bump", kit.getU8Encoder()],
|
|
5103
|
+
["protocolFeeBps", kit.getU16Encoder()],
|
|
5104
|
+
["swapFeeBps", kit.getU16Encoder()],
|
|
5105
|
+
["version", kit.getU8Encoder()],
|
|
5106
|
+
["pad0", kit.fixEncoderSize(kit.getBytesEncoder(), 1)],
|
|
5107
|
+
[
|
|
5108
|
+
"beneficiaries",
|
|
5109
|
+
kit.getArrayEncoder(getFeeBeneficiaryEncoder(), { size: 8 })
|
|
5110
|
+
],
|
|
5111
|
+
["cumulatedBaseFees", kit.getU64Encoder()],
|
|
5112
|
+
["cumulatedQuoteFees", kit.getU64Encoder()],
|
|
5113
|
+
["distributedProtocolBaseFees", kit.getU64Encoder()],
|
|
5114
|
+
["distributedProtocolQuoteFees", kit.getU64Encoder()],
|
|
5115
|
+
[
|
|
5116
|
+
"distributedBaseByBeneficiary",
|
|
5117
|
+
kit.getArrayEncoder(kit.getU64Encoder(), { size: 8 })
|
|
5118
|
+
],
|
|
5119
|
+
[
|
|
5120
|
+
"distributedQuoteByBeneficiary",
|
|
5121
|
+
kit.getArrayEncoder(kit.getU64Encoder(), { size: 8 })
|
|
5122
|
+
],
|
|
5123
|
+
["reserved", kit.fixEncoderSize(kit.getBytesEncoder(), 128)]
|
|
5124
|
+
]),
|
|
5125
|
+
(value) => ({ ...value, discriminator: LAUNCH_FEE_STATE_DISCRIMINATOR })
|
|
5126
|
+
);
|
|
5127
|
+
}
|
|
5128
|
+
function getLaunchFeeStateDecoder() {
|
|
5129
|
+
return kit.getStructDecoder([
|
|
5130
|
+
["discriminator", kit.fixDecoderSize(kit.getBytesDecoder(), 8)],
|
|
5131
|
+
["launch", kit.getAddressDecoder()],
|
|
5132
|
+
["protocolBeneficiary", kit.getAddressDecoder()],
|
|
5133
|
+
["beneficiaryLen", kit.getU8Decoder()],
|
|
5134
|
+
["bump", kit.getU8Decoder()],
|
|
5135
|
+
["protocolFeeBps", kit.getU16Decoder()],
|
|
5136
|
+
["swapFeeBps", kit.getU16Decoder()],
|
|
5137
|
+
["version", kit.getU8Decoder()],
|
|
5138
|
+
["pad0", kit.fixDecoderSize(kit.getBytesDecoder(), 1)],
|
|
5139
|
+
["beneficiaries", kit.getArrayDecoder(getFeeBeneficiaryDecoder(), { size: 8 })],
|
|
5140
|
+
["cumulatedBaseFees", kit.getU64Decoder()],
|
|
5141
|
+
["cumulatedQuoteFees", kit.getU64Decoder()],
|
|
5142
|
+
["distributedProtocolBaseFees", kit.getU64Decoder()],
|
|
5143
|
+
["distributedProtocolQuoteFees", kit.getU64Decoder()],
|
|
5144
|
+
[
|
|
5145
|
+
"distributedBaseByBeneficiary",
|
|
5146
|
+
kit.getArrayDecoder(kit.getU64Decoder(), { size: 8 })
|
|
5147
|
+
],
|
|
5148
|
+
[
|
|
5149
|
+
"distributedQuoteByBeneficiary",
|
|
5150
|
+
kit.getArrayDecoder(kit.getU64Decoder(), { size: 8 })
|
|
5151
|
+
],
|
|
5152
|
+
["reserved", kit.fixDecoderSize(kit.getBytesDecoder(), 128)]
|
|
5153
|
+
]);
|
|
5154
|
+
}
|
|
5155
|
+
function getLaunchFeeStateCodec() {
|
|
5156
|
+
return kit.combineCodec(getLaunchFeeStateEncoder(), getLaunchFeeStateDecoder());
|
|
5157
|
+
}
|
|
5158
|
+
var CLAIM_FEES_DISCRIMINATOR = new Uint8Array([
|
|
5159
|
+
82,
|
|
5160
|
+
251,
|
|
5161
|
+
233,
|
|
5162
|
+
156,
|
|
5163
|
+
12,
|
|
5164
|
+
52,
|
|
5165
|
+
184,
|
|
5166
|
+
202
|
|
5167
|
+
]);
|
|
5168
|
+
function getClaimFeesInstructionDataEncoder() {
|
|
5169
|
+
return kit.transformEncoder(
|
|
5170
|
+
kit.getStructEncoder([["discriminator", kit.fixEncoderSize(kit.getBytesEncoder(), 8)]]),
|
|
5171
|
+
(value) => ({ ...value, discriminator: CLAIM_FEES_DISCRIMINATOR })
|
|
5172
|
+
);
|
|
5173
|
+
}
|
|
5174
|
+
async function getClaimFeesInstructionAsync(input, config) {
|
|
5175
|
+
const programAddress = config?.programAddress ?? INITIALIZER_PROGRAM_ADDRESS;
|
|
5176
|
+
const originalAccounts = {
|
|
5177
|
+
launch: { value: input.launch ?? null, isWritable: false },
|
|
5178
|
+
launchFeeState: { value: input.launchFeeState ?? null, isWritable: true },
|
|
5179
|
+
launchAuthority: {
|
|
5180
|
+
value: input.launchAuthority ?? null,
|
|
5181
|
+
isWritable: false
|
|
5182
|
+
},
|
|
5183
|
+
recipient: { value: input.recipient ?? null, isWritable: false },
|
|
5184
|
+
baseMint: { value: input.baseMint ?? null, isWritable: false },
|
|
5185
|
+
quoteMint: { value: input.quoteMint ?? null, isWritable: false },
|
|
5186
|
+
baseVault: { value: input.baseVault ?? null, isWritable: true },
|
|
5187
|
+
quoteVault: { value: input.quoteVault ?? null, isWritable: true },
|
|
5188
|
+
recipientBaseAta: {
|
|
5189
|
+
value: input.recipientBaseAta ?? null,
|
|
5190
|
+
isWritable: true
|
|
5191
|
+
},
|
|
5192
|
+
recipientQuoteAta: {
|
|
5193
|
+
value: input.recipientQuoteAta ?? null,
|
|
5194
|
+
isWritable: true
|
|
5195
|
+
},
|
|
5196
|
+
baseTokenProgram: {
|
|
5197
|
+
value: input.baseTokenProgram ?? null,
|
|
5198
|
+
isWritable: false
|
|
5199
|
+
},
|
|
5200
|
+
quoteTokenProgram: {
|
|
5201
|
+
value: input.quoteTokenProgram ?? null,
|
|
5202
|
+
isWritable: false
|
|
5203
|
+
}
|
|
5204
|
+
};
|
|
5205
|
+
const accounts = originalAccounts;
|
|
5206
|
+
if (!accounts.launchFeeState.value) {
|
|
5207
|
+
accounts.launchFeeState.value = await kit.getProgramDerivedAddress({
|
|
5208
|
+
programAddress,
|
|
5209
|
+
seeds: [
|
|
5210
|
+
kit.getBytesEncoder().encode(
|
|
5211
|
+
new Uint8Array([
|
|
5212
|
+
108,
|
|
5213
|
+
97,
|
|
5214
|
+
117,
|
|
5215
|
+
110,
|
|
5216
|
+
99,
|
|
5217
|
+
104,
|
|
5218
|
+
95,
|
|
5219
|
+
102,
|
|
5220
|
+
101,
|
|
5221
|
+
101,
|
|
5222
|
+
95,
|
|
5223
|
+
115,
|
|
5224
|
+
116,
|
|
5225
|
+
97,
|
|
5226
|
+
116,
|
|
5227
|
+
101
|
|
5228
|
+
])
|
|
5229
|
+
),
|
|
5230
|
+
kit.getAddressEncoder().encode(
|
|
5231
|
+
programClientCore.getAddressFromResolvedInstructionAccount(
|
|
5232
|
+
"launch",
|
|
5233
|
+
accounts.launch.value
|
|
5234
|
+
)
|
|
5235
|
+
)
|
|
5236
|
+
]
|
|
5237
|
+
});
|
|
5238
|
+
}
|
|
5239
|
+
if (!accounts.launchAuthority.value) {
|
|
5240
|
+
accounts.launchAuthority.value = await kit.getProgramDerivedAddress({
|
|
5241
|
+
programAddress,
|
|
5242
|
+
seeds: [
|
|
5243
|
+
kit.getBytesEncoder().encode(
|
|
5244
|
+
new Uint8Array([
|
|
5245
|
+
108,
|
|
5246
|
+
97,
|
|
5247
|
+
117,
|
|
5248
|
+
110,
|
|
5249
|
+
99,
|
|
5250
|
+
104,
|
|
5251
|
+
95,
|
|
5252
|
+
97,
|
|
5253
|
+
117,
|
|
5254
|
+
116,
|
|
5255
|
+
104,
|
|
5256
|
+
111,
|
|
5257
|
+
114,
|
|
5258
|
+
105,
|
|
5259
|
+
116,
|
|
5260
|
+
121
|
|
5261
|
+
])
|
|
5262
|
+
),
|
|
5263
|
+
kit.getAddressEncoder().encode(
|
|
5264
|
+
programClientCore.getAddressFromResolvedInstructionAccount(
|
|
5265
|
+
"launch",
|
|
5266
|
+
accounts.launch.value
|
|
5267
|
+
)
|
|
5268
|
+
)
|
|
5269
|
+
]
|
|
5270
|
+
});
|
|
5271
|
+
}
|
|
5272
|
+
const getAccountMeta = programClientCore.getAccountMetaFactory(programAddress, "programId");
|
|
5273
|
+
return Object.freeze({
|
|
5274
|
+
accounts: [
|
|
5275
|
+
getAccountMeta("launch", accounts.launch),
|
|
5276
|
+
getAccountMeta("launchFeeState", accounts.launchFeeState),
|
|
5277
|
+
getAccountMeta("launchAuthority", accounts.launchAuthority),
|
|
5278
|
+
getAccountMeta("recipient", accounts.recipient),
|
|
5279
|
+
getAccountMeta("baseMint", accounts.baseMint),
|
|
5280
|
+
getAccountMeta("quoteMint", accounts.quoteMint),
|
|
5281
|
+
getAccountMeta("baseVault", accounts.baseVault),
|
|
5282
|
+
getAccountMeta("quoteVault", accounts.quoteVault),
|
|
5283
|
+
getAccountMeta("recipientBaseAta", accounts.recipientBaseAta),
|
|
5284
|
+
getAccountMeta("recipientQuoteAta", accounts.recipientQuoteAta),
|
|
5285
|
+
getAccountMeta("baseTokenProgram", accounts.baseTokenProgram),
|
|
5286
|
+
getAccountMeta("quoteTokenProgram", accounts.quoteTokenProgram)
|
|
5287
|
+
],
|
|
5288
|
+
data: getClaimFeesInstructionDataEncoder().encode({}),
|
|
5289
|
+
programAddress
|
|
5290
|
+
});
|
|
5291
|
+
}
|
|
5020
5292
|
var CURVE_SWAP_EXACT_IN_DISCRIMINATOR = new Uint8Array([
|
|
5021
5293
|
196,
|
|
5022
5294
|
247,
|
|
@@ -5038,6 +5310,153 @@ function getCurveSwapExactInInstructionDataEncoder() {
|
|
|
5038
5310
|
(value) => ({ ...value, discriminator: CURVE_SWAP_EXACT_IN_DISCRIMINATOR })
|
|
5039
5311
|
);
|
|
5040
5312
|
}
|
|
5313
|
+
var HARVEST_MIGRATED_FEES_DISCRIMINATOR = new Uint8Array([
|
|
5314
|
+
63,
|
|
5315
|
+
77,
|
|
5316
|
+
73,
|
|
5317
|
+
117,
|
|
5318
|
+
2,
|
|
5319
|
+
43,
|
|
5320
|
+
255,
|
|
5321
|
+
176
|
|
5322
|
+
]);
|
|
5323
|
+
function getHarvestMigratedFeesInstructionDataEncoder() {
|
|
5324
|
+
return kit.transformEncoder(
|
|
5325
|
+
kit.getStructEncoder([["discriminator", kit.fixEncoderSize(kit.getBytesEncoder(), 8)]]),
|
|
5326
|
+
(value) => ({
|
|
5327
|
+
...value,
|
|
5328
|
+
discriminator: HARVEST_MIGRATED_FEES_DISCRIMINATOR
|
|
5329
|
+
})
|
|
5330
|
+
);
|
|
5331
|
+
}
|
|
5332
|
+
async function getHarvestMigratedFeesInstructionAsync(input, config) {
|
|
5333
|
+
const programAddress = config?.programAddress ?? INITIALIZER_PROGRAM_ADDRESS;
|
|
5334
|
+
const originalAccounts = {
|
|
5335
|
+
launch: { value: input.launch ?? null, isWritable: false },
|
|
5336
|
+
launchFeeState: { value: input.launchFeeState ?? null, isWritable: true },
|
|
5337
|
+
launchAuthority: {
|
|
5338
|
+
value: input.launchAuthority ?? null,
|
|
5339
|
+
isWritable: false
|
|
5340
|
+
},
|
|
5341
|
+
baseMint: { value: input.baseMint ?? null, isWritable: false },
|
|
5342
|
+
quoteMint: { value: input.quoteMint ?? null, isWritable: false },
|
|
5343
|
+
baseVault: { value: input.baseVault ?? null, isWritable: true },
|
|
5344
|
+
quoteVault: { value: input.quoteVault ?? null, isWritable: true },
|
|
5345
|
+
pool: { value: input.pool ?? null, isWritable: true },
|
|
5346
|
+
launchLpPosition: {
|
|
5347
|
+
value: input.launchLpPosition ?? null,
|
|
5348
|
+
isWritable: true
|
|
5349
|
+
},
|
|
5350
|
+
poolAuthority: { value: input.poolAuthority ?? null, isWritable: false },
|
|
5351
|
+
poolVault0: { value: input.poolVault0 ?? null, isWritable: true },
|
|
5352
|
+
poolVault1: { value: input.poolVault1 ?? null, isWritable: true },
|
|
5353
|
+
token0Mint: { value: input.token0Mint ?? null, isWritable: false },
|
|
5354
|
+
token1Mint: { value: input.token1Mint ?? null, isWritable: false },
|
|
5355
|
+
cpmmProgram: { value: input.cpmmProgram ?? null, isWritable: false },
|
|
5356
|
+
baseTokenProgram: {
|
|
5357
|
+
value: input.baseTokenProgram ?? null,
|
|
5358
|
+
isWritable: false
|
|
5359
|
+
},
|
|
5360
|
+
quoteTokenProgram: {
|
|
5361
|
+
value: input.quoteTokenProgram ?? null,
|
|
5362
|
+
isWritable: false
|
|
5363
|
+
}
|
|
5364
|
+
};
|
|
5365
|
+
const accounts = originalAccounts;
|
|
5366
|
+
if (!accounts.launchFeeState.value) {
|
|
5367
|
+
accounts.launchFeeState.value = await kit.getProgramDerivedAddress({
|
|
5368
|
+
programAddress,
|
|
5369
|
+
seeds: [
|
|
5370
|
+
kit.getBytesEncoder().encode(
|
|
5371
|
+
new Uint8Array([
|
|
5372
|
+
108,
|
|
5373
|
+
97,
|
|
5374
|
+
117,
|
|
5375
|
+
110,
|
|
5376
|
+
99,
|
|
5377
|
+
104,
|
|
5378
|
+
95,
|
|
5379
|
+
102,
|
|
5380
|
+
101,
|
|
5381
|
+
101,
|
|
5382
|
+
95,
|
|
5383
|
+
115,
|
|
5384
|
+
116,
|
|
5385
|
+
97,
|
|
5386
|
+
116,
|
|
5387
|
+
101
|
|
5388
|
+
])
|
|
5389
|
+
),
|
|
5390
|
+
kit.getAddressEncoder().encode(
|
|
5391
|
+
programClientCore.getAddressFromResolvedInstructionAccount(
|
|
5392
|
+
"launch",
|
|
5393
|
+
accounts.launch.value
|
|
5394
|
+
)
|
|
5395
|
+
)
|
|
5396
|
+
]
|
|
5397
|
+
});
|
|
5398
|
+
}
|
|
5399
|
+
if (!accounts.launchAuthority.value) {
|
|
5400
|
+
accounts.launchAuthority.value = await kit.getProgramDerivedAddress({
|
|
5401
|
+
programAddress,
|
|
5402
|
+
seeds: [
|
|
5403
|
+
kit.getBytesEncoder().encode(
|
|
5404
|
+
new Uint8Array([
|
|
5405
|
+
108,
|
|
5406
|
+
97,
|
|
5407
|
+
117,
|
|
5408
|
+
110,
|
|
5409
|
+
99,
|
|
5410
|
+
104,
|
|
5411
|
+
95,
|
|
5412
|
+
97,
|
|
5413
|
+
117,
|
|
5414
|
+
116,
|
|
5415
|
+
104,
|
|
5416
|
+
111,
|
|
5417
|
+
114,
|
|
5418
|
+
105,
|
|
5419
|
+
116,
|
|
5420
|
+
121
|
|
5421
|
+
])
|
|
5422
|
+
),
|
|
5423
|
+
kit.getAddressEncoder().encode(
|
|
5424
|
+
programClientCore.getAddressFromResolvedInstructionAccount(
|
|
5425
|
+
"launch",
|
|
5426
|
+
accounts.launch.value
|
|
5427
|
+
)
|
|
5428
|
+
)
|
|
5429
|
+
]
|
|
5430
|
+
});
|
|
5431
|
+
}
|
|
5432
|
+
if (!accounts.cpmmProgram.value) {
|
|
5433
|
+
accounts.cpmmProgram.value = "9PSxVPoPfnbZ8Q1uQhgS6ZxvBjFboZtebNsu34umxkgQ";
|
|
5434
|
+
}
|
|
5435
|
+
const getAccountMeta = programClientCore.getAccountMetaFactory(programAddress, "programId");
|
|
5436
|
+
return Object.freeze({
|
|
5437
|
+
accounts: [
|
|
5438
|
+
getAccountMeta("launch", accounts.launch),
|
|
5439
|
+
getAccountMeta("launchFeeState", accounts.launchFeeState),
|
|
5440
|
+
getAccountMeta("launchAuthority", accounts.launchAuthority),
|
|
5441
|
+
getAccountMeta("baseMint", accounts.baseMint),
|
|
5442
|
+
getAccountMeta("quoteMint", accounts.quoteMint),
|
|
5443
|
+
getAccountMeta("baseVault", accounts.baseVault),
|
|
5444
|
+
getAccountMeta("quoteVault", accounts.quoteVault),
|
|
5445
|
+
getAccountMeta("pool", accounts.pool),
|
|
5446
|
+
getAccountMeta("launchLpPosition", accounts.launchLpPosition),
|
|
5447
|
+
getAccountMeta("poolAuthority", accounts.poolAuthority),
|
|
5448
|
+
getAccountMeta("poolVault0", accounts.poolVault0),
|
|
5449
|
+
getAccountMeta("poolVault1", accounts.poolVault1),
|
|
5450
|
+
getAccountMeta("token0Mint", accounts.token0Mint),
|
|
5451
|
+
getAccountMeta("token1Mint", accounts.token1Mint),
|
|
5452
|
+
getAccountMeta("cpmmProgram", accounts.cpmmProgram),
|
|
5453
|
+
getAccountMeta("baseTokenProgram", accounts.baseTokenProgram),
|
|
5454
|
+
getAccountMeta("quoteTokenProgram", accounts.quoteTokenProgram)
|
|
5455
|
+
],
|
|
5456
|
+
data: getHarvestMigratedFeesInstructionDataEncoder().encode({}),
|
|
5457
|
+
programAddress
|
|
5458
|
+
});
|
|
5459
|
+
}
|
|
5041
5460
|
var INITIALIZE_CONFIG_DISCRIMINATOR3 = new Uint8Array([
|
|
5042
5461
|
208,
|
|
5043
5462
|
127,
|
|
@@ -5053,7 +5472,10 @@ function getInitializeConfigInstructionDataEncoder3() {
|
|
|
5053
5472
|
kit.getStructEncoder([
|
|
5054
5473
|
["discriminator", kit.fixEncoderSize(kit.getBytesEncoder(), 8)],
|
|
5055
5474
|
["migratorAllowlist", kit.getArrayEncoder(kit.getAddressEncoder())],
|
|
5056
|
-
["hookAllowlist", kit.getArrayEncoder(kit.getAddressEncoder())]
|
|
5475
|
+
["hookAllowlist", kit.getArrayEncoder(kit.getAddressEncoder())],
|
|
5476
|
+
["protocolFeeBps", kit.getU16Encoder()],
|
|
5477
|
+
["minSwapFeeBps", kit.getU16Encoder()],
|
|
5478
|
+
["maxSwapFeeBps", kit.getU16Encoder()]
|
|
5057
5479
|
]),
|
|
5058
5480
|
(value) => ({ ...value, discriminator: INITIALIZE_CONFIG_DISCRIMINATOR3 })
|
|
5059
5481
|
);
|
|
@@ -5080,7 +5502,7 @@ function getInitializeLaunchInstructionDataEncoder() {
|
|
|
5080
5502
|
["baseForLiquidity", kit.getU64Encoder()],
|
|
5081
5503
|
["curveVirtualBase", kit.getU64Encoder()],
|
|
5082
5504
|
["curveVirtualQuote", kit.getU64Encoder()],
|
|
5083
|
-
["
|
|
5505
|
+
["swapFeeBps", kit.getU16Encoder()],
|
|
5084
5506
|
["curveKind", kit.getU8Encoder()],
|
|
5085
5507
|
["curveParams", kit.addEncoderSizePrefix(kit.getBytesEncoder(), kit.getU32Encoder())],
|
|
5086
5508
|
["allowBuy", kit.getU8Encoder()],
|
|
@@ -5113,7 +5535,8 @@ function getInitializeLaunchInstructionDataEncoder() {
|
|
|
5113
5535
|
"metadataSymbol",
|
|
5114
5536
|
kit.addEncoderSizePrefix(kit.getUtf8Encoder(), kit.getU32Encoder())
|
|
5115
5537
|
],
|
|
5116
|
-
["metadataUri", kit.addEncoderSizePrefix(kit.getUtf8Encoder(), kit.getU32Encoder())]
|
|
5538
|
+
["metadataUri", kit.addEncoderSizePrefix(kit.getUtf8Encoder(), kit.getU32Encoder())],
|
|
5539
|
+
["feeBeneficiaries", kit.getArrayEncoder(getFeeBeneficiaryInputEncoder())]
|
|
5117
5540
|
]),
|
|
5118
5541
|
(value) => ({ ...value, discriminator: INITIALIZE_LAUNCH_DISCRIMINATOR })
|
|
5119
5542
|
);
|
|
@@ -5141,6 +5564,135 @@ function getPreviewSwapExactInInstructionDataEncoder2() {
|
|
|
5141
5564
|
})
|
|
5142
5565
|
);
|
|
5143
5566
|
}
|
|
5567
|
+
var REPLACE_FEE_BENEFICIARY_DISCRIMINATOR = new Uint8Array([
|
|
5568
|
+
125,
|
|
5569
|
+
194,
|
|
5570
|
+
227,
|
|
5571
|
+
81,
|
|
5572
|
+
175,
|
|
5573
|
+
100,
|
|
5574
|
+
78,
|
|
5575
|
+
200
|
|
5576
|
+
]);
|
|
5577
|
+
function getReplaceFeeBeneficiaryInstructionDataEncoder() {
|
|
5578
|
+
return kit.transformEncoder(
|
|
5579
|
+
kit.getStructEncoder([
|
|
5580
|
+
["discriminator", kit.fixEncoderSize(kit.getBytesEncoder(), 8)],
|
|
5581
|
+
["newBeneficiary", kit.getAddressEncoder()]
|
|
5582
|
+
]),
|
|
5583
|
+
(value) => ({
|
|
5584
|
+
...value,
|
|
5585
|
+
discriminator: REPLACE_FEE_BENEFICIARY_DISCRIMINATOR
|
|
5586
|
+
})
|
|
5587
|
+
);
|
|
5588
|
+
}
|
|
5589
|
+
async function getReplaceFeeBeneficiaryInstructionAsync(input, config) {
|
|
5590
|
+
const programAddress = config?.programAddress ?? INITIALIZER_PROGRAM_ADDRESS;
|
|
5591
|
+
const originalAccounts = {
|
|
5592
|
+
launch: { value: input.launch ?? null, isWritable: false },
|
|
5593
|
+
launchFeeState: { value: input.launchFeeState ?? null, isWritable: true },
|
|
5594
|
+
currentBeneficiary: {
|
|
5595
|
+
value: input.currentBeneficiary ?? null,
|
|
5596
|
+
isWritable: false
|
|
5597
|
+
}
|
|
5598
|
+
};
|
|
5599
|
+
const accounts = originalAccounts;
|
|
5600
|
+
const args = { ...input };
|
|
5601
|
+
if (!accounts.launchFeeState.value) {
|
|
5602
|
+
accounts.launchFeeState.value = await kit.getProgramDerivedAddress({
|
|
5603
|
+
programAddress,
|
|
5604
|
+
seeds: [
|
|
5605
|
+
kit.getBytesEncoder().encode(
|
|
5606
|
+
new Uint8Array([
|
|
5607
|
+
108,
|
|
5608
|
+
97,
|
|
5609
|
+
117,
|
|
5610
|
+
110,
|
|
5611
|
+
99,
|
|
5612
|
+
104,
|
|
5613
|
+
95,
|
|
5614
|
+
102,
|
|
5615
|
+
101,
|
|
5616
|
+
101,
|
|
5617
|
+
95,
|
|
5618
|
+
115,
|
|
5619
|
+
116,
|
|
5620
|
+
97,
|
|
5621
|
+
116,
|
|
5622
|
+
101
|
|
5623
|
+
])
|
|
5624
|
+
),
|
|
5625
|
+
kit.getAddressEncoder().encode(
|
|
5626
|
+
programClientCore.getAddressFromResolvedInstructionAccount(
|
|
5627
|
+
"launch",
|
|
5628
|
+
accounts.launch.value
|
|
5629
|
+
)
|
|
5630
|
+
)
|
|
5631
|
+
]
|
|
5632
|
+
});
|
|
5633
|
+
}
|
|
5634
|
+
const getAccountMeta = programClientCore.getAccountMetaFactory(programAddress, "programId");
|
|
5635
|
+
return Object.freeze({
|
|
5636
|
+
accounts: [
|
|
5637
|
+
getAccountMeta("launch", accounts.launch),
|
|
5638
|
+
getAccountMeta("launchFeeState", accounts.launchFeeState),
|
|
5639
|
+
getAccountMeta("currentBeneficiary", accounts.currentBeneficiary)
|
|
5640
|
+
],
|
|
5641
|
+
data: getReplaceFeeBeneficiaryInstructionDataEncoder().encode(
|
|
5642
|
+
args
|
|
5643
|
+
),
|
|
5644
|
+
programAddress
|
|
5645
|
+
});
|
|
5646
|
+
}
|
|
5647
|
+
var SET_FEE_POLICY_DISCRIMINATOR = new Uint8Array([
|
|
5648
|
+
91,
|
|
5649
|
+
32,
|
|
5650
|
+
224,
|
|
5651
|
+
109,
|
|
5652
|
+
147,
|
|
5653
|
+
98,
|
|
5654
|
+
71,
|
|
5655
|
+
132
|
|
5656
|
+
]);
|
|
5657
|
+
function getSetFeePolicyInstructionDataEncoder() {
|
|
5658
|
+
return kit.transformEncoder(
|
|
5659
|
+
kit.getStructEncoder([
|
|
5660
|
+
["discriminator", kit.fixEncoderSize(kit.getBytesEncoder(), 8)],
|
|
5661
|
+
["protocolFeeBps", kit.getU16Encoder()],
|
|
5662
|
+
["minSwapFeeBps", kit.getU16Encoder()],
|
|
5663
|
+
["maxSwapFeeBps", kit.getU16Encoder()]
|
|
5664
|
+
]),
|
|
5665
|
+
(value) => ({ ...value, discriminator: SET_FEE_POLICY_DISCRIMINATOR })
|
|
5666
|
+
);
|
|
5667
|
+
}
|
|
5668
|
+
async function getSetFeePolicyInstructionAsync(input, config) {
|
|
5669
|
+
const programAddress = config?.programAddress ?? INITIALIZER_PROGRAM_ADDRESS;
|
|
5670
|
+
const originalAccounts = {
|
|
5671
|
+
config: { value: input.config ?? null, isWritable: true },
|
|
5672
|
+
admin: { value: input.admin ?? null, isWritable: false }
|
|
5673
|
+
};
|
|
5674
|
+
const accounts = originalAccounts;
|
|
5675
|
+
const args = { ...input };
|
|
5676
|
+
if (!accounts.config.value) {
|
|
5677
|
+
accounts.config.value = await kit.getProgramDerivedAddress({
|
|
5678
|
+
programAddress,
|
|
5679
|
+
seeds: [
|
|
5680
|
+
kit.getBytesEncoder().encode(new Uint8Array([99, 111, 110, 102, 105, 103]))
|
|
5681
|
+
]
|
|
5682
|
+
});
|
|
5683
|
+
}
|
|
5684
|
+
const getAccountMeta = programClientCore.getAccountMetaFactory(programAddress, "programId");
|
|
5685
|
+
return Object.freeze({
|
|
5686
|
+
accounts: [
|
|
5687
|
+
getAccountMeta("config", accounts.config),
|
|
5688
|
+
getAccountMeta("admin", accounts.admin)
|
|
5689
|
+
],
|
|
5690
|
+
data: getSetFeePolicyInstructionDataEncoder().encode(
|
|
5691
|
+
args
|
|
5692
|
+
),
|
|
5693
|
+
programAddress
|
|
5694
|
+
});
|
|
5695
|
+
}
|
|
5144
5696
|
var SET_HOOK_ALLOWLIST_DISCRIMINATOR = new Uint8Array([
|
|
5145
5697
|
232,
|
|
5146
5698
|
28,
|
|
@@ -5182,6 +5734,9 @@ function getSetMigratorAllowlistInstructionDataEncoder() {
|
|
|
5182
5734
|
})
|
|
5183
5735
|
);
|
|
5184
5736
|
}
|
|
5737
|
+
|
|
5738
|
+
// src/solana/generated/initializer/programs/initializer.ts
|
|
5739
|
+
var INITIALIZER_PROGRAM_ADDRESS = "4h3Dqyo5qmteJoMxXt3tdtfXELDB6pdRTPU9mWruiKp1";
|
|
5185
5740
|
if (process.env.NODE_ENV !== "production") ;
|
|
5186
5741
|
var addressCodec2 = kit.getAddressCodec();
|
|
5187
5742
|
var textEncoder3 = new TextEncoder();
|
|
@@ -5225,6 +5780,15 @@ async function getLaunchAuthorityAddress(launch, programId = INITIALIZER_PROGRAM
|
|
|
5225
5780
|
]
|
|
5226
5781
|
});
|
|
5227
5782
|
}
|
|
5783
|
+
async function getLaunchFeeStateAddress(launch, programId = INITIALIZER_PROGRAM_ID) {
|
|
5784
|
+
return kit.getProgramDerivedAddress({
|
|
5785
|
+
programAddress: programId,
|
|
5786
|
+
seeds: [
|
|
5787
|
+
textEncoder3.encode(SEED_LAUNCH_FEE_STATE),
|
|
5788
|
+
addressCodec2.encode(launch)
|
|
5789
|
+
]
|
|
5790
|
+
});
|
|
5791
|
+
}
|
|
5228
5792
|
function launchIdFromU64(launchId) {
|
|
5229
5793
|
const out = new Uint8Array(32);
|
|
5230
5794
|
out.set(encodeU64LE(launchId), 0);
|
|
@@ -5244,7 +5808,7 @@ function createInitializeConfigInstruction(accounts, args, programId = INITIALIZ
|
|
|
5244
5808
|
admin,
|
|
5245
5809
|
config,
|
|
5246
5810
|
programData,
|
|
5247
|
-
systemProgram =
|
|
5811
|
+
systemProgram = chunkAKLS6T3R_cjs.SYSTEM_PROGRAM_ADDRESS
|
|
5248
5812
|
} = accounts;
|
|
5249
5813
|
const keys = [
|
|
5250
5814
|
createSignerAccountMeta(admin, kit.AccountRole.WRITABLE_SIGNER),
|
|
@@ -5574,6 +6138,84 @@ async function fetchAllMaybeEntryByMint(rpc, addresses, config) {
|
|
|
5574
6138
|
function getEntryByMintSize() {
|
|
5575
6139
|
return 112;
|
|
5576
6140
|
}
|
|
6141
|
+
var INIT_CONFIG_DISCRIMINATOR2 = new Uint8Array([
|
|
6142
|
+
97,
|
|
6143
|
+
166,
|
|
6144
|
+
35,
|
|
6145
|
+
7,
|
|
6146
|
+
20,
|
|
6147
|
+
2,
|
|
6148
|
+
164,
|
|
6149
|
+
126
|
|
6150
|
+
]);
|
|
6151
|
+
function getInitConfigDiscriminatorBytes() {
|
|
6152
|
+
return kit.fixEncoderSize(kit.getBytesEncoder(), 8).encode(INIT_CONFIG_DISCRIMINATOR2);
|
|
6153
|
+
}
|
|
6154
|
+
function getInitConfigEncoder2() {
|
|
6155
|
+
return kit.transformEncoder(
|
|
6156
|
+
kit.getStructEncoder([
|
|
6157
|
+
["discriminator", kit.fixEncoderSize(kit.getBytesEncoder(), 8)],
|
|
6158
|
+
["admin", kit.getAddressEncoder()],
|
|
6159
|
+
["migratorAllowlistLen", kit.getU8Encoder()],
|
|
6160
|
+
["migratorAllowlist", kit.getArrayEncoder(kit.getAddressEncoder(), { size: 32 })],
|
|
6161
|
+
["hookAllowlistLen", kit.getU8Encoder()],
|
|
6162
|
+
["hookAllowlist", kit.getArrayEncoder(kit.getAddressEncoder(), { size: 32 })],
|
|
6163
|
+
["bump", kit.getU8Encoder()],
|
|
6164
|
+
["version", kit.getU8Encoder()],
|
|
6165
|
+
["protocolFeeBps", kit.getU16Encoder()],
|
|
6166
|
+
["minSwapFeeBps", kit.getU16Encoder()],
|
|
6167
|
+
["maxSwapFeeBps", kit.getU16Encoder()],
|
|
6168
|
+
["reserved", kit.fixEncoderSize(kit.getBytesEncoder(), 24)]
|
|
6169
|
+
]),
|
|
6170
|
+
(value) => ({ ...value, discriminator: INIT_CONFIG_DISCRIMINATOR2 })
|
|
6171
|
+
);
|
|
6172
|
+
}
|
|
6173
|
+
function getInitConfigDecoder2() {
|
|
6174
|
+
return kit.getStructDecoder([
|
|
6175
|
+
["discriminator", kit.fixDecoderSize(kit.getBytesDecoder(), 8)],
|
|
6176
|
+
["admin", kit.getAddressDecoder()],
|
|
6177
|
+
["migratorAllowlistLen", kit.getU8Decoder()],
|
|
6178
|
+
["migratorAllowlist", kit.getArrayDecoder(kit.getAddressDecoder(), { size: 32 })],
|
|
6179
|
+
["hookAllowlistLen", kit.getU8Decoder()],
|
|
6180
|
+
["hookAllowlist", kit.getArrayDecoder(kit.getAddressDecoder(), { size: 32 })],
|
|
6181
|
+
["bump", kit.getU8Decoder()],
|
|
6182
|
+
["version", kit.getU8Decoder()],
|
|
6183
|
+
["protocolFeeBps", kit.getU16Decoder()],
|
|
6184
|
+
["minSwapFeeBps", kit.getU16Decoder()],
|
|
6185
|
+
["maxSwapFeeBps", kit.getU16Decoder()],
|
|
6186
|
+
["reserved", kit.fixDecoderSize(kit.getBytesDecoder(), 24)]
|
|
6187
|
+
]);
|
|
6188
|
+
}
|
|
6189
|
+
function getInitConfigCodec2() {
|
|
6190
|
+
return kit.combineCodec(getInitConfigEncoder2(), getInitConfigDecoder2());
|
|
6191
|
+
}
|
|
6192
|
+
function decodeInitConfig(encodedAccount) {
|
|
6193
|
+
return kit.decodeAccount(
|
|
6194
|
+
encodedAccount,
|
|
6195
|
+
getInitConfigDecoder2()
|
|
6196
|
+
);
|
|
6197
|
+
}
|
|
6198
|
+
async function fetchInitConfig(rpc, address3, config) {
|
|
6199
|
+
const maybeAccount = await fetchMaybeInitConfig(rpc, address3, config);
|
|
6200
|
+
kit.assertAccountExists(maybeAccount);
|
|
6201
|
+
return maybeAccount;
|
|
6202
|
+
}
|
|
6203
|
+
async function fetchMaybeInitConfig(rpc, address3, config) {
|
|
6204
|
+
const maybeAccount = await kit.fetchEncodedAccount(rpc, address3, config);
|
|
6205
|
+
return decodeInitConfig(maybeAccount);
|
|
6206
|
+
}
|
|
6207
|
+
async function fetchAllInitConfig(rpc, addresses, config) {
|
|
6208
|
+
const maybeAccounts = await fetchAllMaybeInitConfig(rpc, addresses, config);
|
|
6209
|
+
kit.assertAccountsExist(maybeAccounts);
|
|
6210
|
+
return maybeAccounts;
|
|
6211
|
+
}
|
|
6212
|
+
async function fetchAllMaybeInitConfig(rpc, addresses, config) {
|
|
6213
|
+
const maybeAccounts = await kit.fetchEncodedAccounts(rpc, addresses, config);
|
|
6214
|
+
return maybeAccounts.map((maybeAccount) => decodeInitConfig(maybeAccount));
|
|
6215
|
+
}
|
|
6216
|
+
function getInitConfigSize() {
|
|
6217
|
+
return 2123;
|
|
6218
|
+
}
|
|
5577
6219
|
function getAccumulatorUpdatedEncoder() {
|
|
5578
6220
|
return kit.getStructEncoder([
|
|
5579
6221
|
["market", kit.getAddressEncoder()],
|
|
@@ -5788,7 +6430,7 @@ function getLaunchEncoder2() {
|
|
|
5788
6430
|
["baseForCurve", kit.getU64Encoder()],
|
|
5789
6431
|
["curveVirtualBase", kit.getU64Encoder()],
|
|
5790
6432
|
["curveVirtualQuote", kit.getU64Encoder()],
|
|
5791
|
-
["
|
|
6433
|
+
["swapFeeBps", kit.getU16Encoder()],
|
|
5792
6434
|
["pad1", kit.fixEncoderSize(kit.getBytesEncoder(), 6)],
|
|
5793
6435
|
["allowBuy", kit.getU8Encoder()],
|
|
5794
6436
|
["allowSell", kit.getU8Encoder()],
|
|
@@ -5830,7 +6472,7 @@ function getLaunchDecoder2() {
|
|
|
5830
6472
|
["baseForCurve", kit.getU64Decoder()],
|
|
5831
6473
|
["curveVirtualBase", kit.getU64Decoder()],
|
|
5832
6474
|
["curveVirtualQuote", kit.getU64Decoder()],
|
|
5833
|
-
["
|
|
6475
|
+
["swapFeeBps", kit.getU16Decoder()],
|
|
5834
6476
|
["pad1", kit.fixDecoderSize(kit.getBytesDecoder(), 6)],
|
|
5835
6477
|
["allowBuy", kit.getU8Decoder()],
|
|
5836
6478
|
["allowSell", kit.getU8Decoder()],
|
|
@@ -7044,9 +7686,10 @@ var PredictionMigratorAccount = /* @__PURE__ */ ((PredictionMigratorAccount2) =>
|
|
|
7044
7686
|
PredictionMigratorAccount2[PredictionMigratorAccount2["ClaimReceipt"] = 0] = "ClaimReceipt";
|
|
7045
7687
|
PredictionMigratorAccount2[PredictionMigratorAccount2["Entry"] = 1] = "Entry";
|
|
7046
7688
|
PredictionMigratorAccount2[PredictionMigratorAccount2["EntryByMint"] = 2] = "EntryByMint";
|
|
7047
|
-
PredictionMigratorAccount2[PredictionMigratorAccount2["
|
|
7048
|
-
PredictionMigratorAccount2[PredictionMigratorAccount2["
|
|
7049
|
-
PredictionMigratorAccount2[PredictionMigratorAccount2["
|
|
7689
|
+
PredictionMigratorAccount2[PredictionMigratorAccount2["InitConfig"] = 3] = "InitConfig";
|
|
7690
|
+
PredictionMigratorAccount2[PredictionMigratorAccount2["Launch"] = 4] = "Launch";
|
|
7691
|
+
PredictionMigratorAccount2[PredictionMigratorAccount2["Market"] = 5] = "Market";
|
|
7692
|
+
PredictionMigratorAccount2[PredictionMigratorAccount2["OracleState"] = 6] = "OracleState";
|
|
7050
7693
|
return PredictionMigratorAccount2;
|
|
7051
7694
|
})(PredictionMigratorAccount || {});
|
|
7052
7695
|
function identifyPredictionMigratorAccount(account) {
|
|
@@ -7078,6 +7721,15 @@ function identifyPredictionMigratorAccount(account) {
|
|
|
7078
7721
|
)) {
|
|
7079
7722
|
return 2 /* EntryByMint */;
|
|
7080
7723
|
}
|
|
7724
|
+
if (kit.containsBytes(
|
|
7725
|
+
data,
|
|
7726
|
+
kit.fixEncoderSize(kit.getBytesEncoder(), 8).encode(
|
|
7727
|
+
new Uint8Array([97, 166, 35, 7, 20, 2, 164, 126])
|
|
7728
|
+
),
|
|
7729
|
+
0
|
|
7730
|
+
)) {
|
|
7731
|
+
return 3 /* InitConfig */;
|
|
7732
|
+
}
|
|
7081
7733
|
if (kit.containsBytes(
|
|
7082
7734
|
data,
|
|
7083
7735
|
kit.fixEncoderSize(kit.getBytesEncoder(), 8).encode(
|
|
@@ -7085,7 +7737,7 @@ function identifyPredictionMigratorAccount(account) {
|
|
|
7085
7737
|
),
|
|
7086
7738
|
0
|
|
7087
7739
|
)) {
|
|
7088
|
-
return
|
|
7740
|
+
return 4 /* Launch */;
|
|
7089
7741
|
}
|
|
7090
7742
|
if (kit.containsBytes(
|
|
7091
7743
|
data,
|
|
@@ -7094,7 +7746,7 @@ function identifyPredictionMigratorAccount(account) {
|
|
|
7094
7746
|
),
|
|
7095
7747
|
0
|
|
7096
7748
|
)) {
|
|
7097
|
-
return
|
|
7749
|
+
return 5 /* Market */;
|
|
7098
7750
|
}
|
|
7099
7751
|
if (kit.containsBytes(
|
|
7100
7752
|
data,
|
|
@@ -7103,7 +7755,7 @@ function identifyPredictionMigratorAccount(account) {
|
|
|
7103
7755
|
),
|
|
7104
7756
|
0
|
|
7105
7757
|
)) {
|
|
7106
|
-
return
|
|
7758
|
+
return 6 /* OracleState */;
|
|
7107
7759
|
}
|
|
7108
7760
|
throw new kit.SolanaError(
|
|
7109
7761
|
kit.SOLANA_ERROR__PROGRAM_CLIENTS__FAILED_TO_IDENTIFY_ACCOUNT,
|
|
@@ -7210,6 +7862,7 @@ function predictionMigratorProgram() {
|
|
|
7210
7862
|
claimReceipt: programClientCore.addSelfFetchFunctions(client, getClaimReceiptCodec()),
|
|
7211
7863
|
entry: programClientCore.addSelfFetchFunctions(client, getEntryCodec()),
|
|
7212
7864
|
entryByMint: programClientCore.addSelfFetchFunctions(client, getEntryByMintCodec()),
|
|
7865
|
+
initConfig: programClientCore.addSelfFetchFunctions(client, getInitConfigCodec2()),
|
|
7213
7866
|
launch: programClientCore.addSelfFetchFunctions(client, getLaunchCodec2()),
|
|
7214
7867
|
market: programClientCore.addSelfFetchFunctions(client, getMarketCodec()),
|
|
7215
7868
|
oracleState: programClientCore.addSelfFetchFunctions(client, getOracleStateCodec2())
|
|
@@ -7302,10 +7955,10 @@ function createAccountMeta(value, role) {
|
|
|
7302
7955
|
async function getTokenMetadataAddress(mint) {
|
|
7303
7956
|
const encoder = kit.getAddressEncoder();
|
|
7304
7957
|
const [metadataAddress] = await kit.getProgramDerivedAddress({
|
|
7305
|
-
programAddress:
|
|
7958
|
+
programAddress: chunkAKLS6T3R_cjs.TOKEN_METADATA_PROGRAM_ID,
|
|
7306
7959
|
seeds: [
|
|
7307
7960
|
new TextEncoder().encode("metadata"),
|
|
7308
|
-
encoder.encode(
|
|
7961
|
+
encoder.encode(chunkAKLS6T3R_cjs.TOKEN_METADATA_PROGRAM_ID),
|
|
7309
7962
|
encoder.encode(mint)
|
|
7310
7963
|
]
|
|
7311
7964
|
});
|
|
@@ -7331,16 +7984,17 @@ async function createInitializeLaunchInstruction(accounts, args, programId = INI
|
|
|
7331
7984
|
quoteMint,
|
|
7332
7985
|
baseVault,
|
|
7333
7986
|
quoteVault,
|
|
7987
|
+
launchFeeState,
|
|
7334
7988
|
payer,
|
|
7335
7989
|
authority,
|
|
7336
7990
|
hookProgram,
|
|
7337
7991
|
migratorProgram,
|
|
7338
|
-
baseTokenProgram =
|
|
7339
|
-
quoteTokenProgram =
|
|
7340
|
-
systemProgram =
|
|
7992
|
+
baseTokenProgram = chunkAKLS6T3R_cjs.TOKEN_PROGRAM_ADDRESS,
|
|
7993
|
+
quoteTokenProgram = chunkAKLS6T3R_cjs.TOKEN_PROGRAM_ADDRESS,
|
|
7994
|
+
systemProgram = chunkAKLS6T3R_cjs.SYSTEM_PROGRAM_ADDRESS,
|
|
7341
7995
|
rent,
|
|
7342
7996
|
metadataAccount,
|
|
7343
|
-
metadataProgram =
|
|
7997
|
+
metadataProgram = chunkAKLS6T3R_cjs.TOKEN_METADATA_PROGRAM_ID,
|
|
7344
7998
|
hookCreateRemainingAccounts = []
|
|
7345
7999
|
} = accounts;
|
|
7346
8000
|
const withMetadata = Boolean(
|
|
@@ -7355,6 +8009,10 @@ async function createInitializeLaunchInstruction(accounts, args, programId = INI
|
|
|
7355
8009
|
const hookCreateRemainingAccountAddresses = hookCreateRemainingAccounts.map(
|
|
7356
8010
|
(account) => isTransactionSigner5(account) ? account.address : account
|
|
7357
8011
|
);
|
|
8012
|
+
const swapFeeBps = args.swapFeeBps ?? args.curveFeeBps;
|
|
8013
|
+
if (swapFeeBps === void 0) {
|
|
8014
|
+
throw new Error("swapFeeBps is required");
|
|
8015
|
+
}
|
|
7358
8016
|
const keys = [
|
|
7359
8017
|
{ address: config, role: kit.AccountRole.READONLY },
|
|
7360
8018
|
{ address: launch, role: kit.AccountRole.WRITABLE },
|
|
@@ -7363,6 +8021,10 @@ async function createInitializeLaunchInstruction(accounts, args, programId = INI
|
|
|
7363
8021
|
{ address: quoteMint, role: kit.AccountRole.READONLY },
|
|
7364
8022
|
createAccountMeta(baseVault, kit.AccountRole.WRITABLE_SIGNER),
|
|
7365
8023
|
createAccountMeta(quoteVault, kit.AccountRole.WRITABLE_SIGNER),
|
|
8024
|
+
{
|
|
8025
|
+
address: launchFeeState ?? (await getLaunchFeeStateAddress(launch, programId))[0],
|
|
8026
|
+
role: kit.AccountRole.WRITABLE
|
|
8027
|
+
},
|
|
7366
8028
|
createAccountMeta(payer, kit.AccountRole.WRITABLE_SIGNER)
|
|
7367
8029
|
];
|
|
7368
8030
|
keys.push(
|
|
@@ -7387,11 +8049,13 @@ async function createInitializeLaunchInstruction(accounts, args, programId = INI
|
|
|
7387
8049
|
}
|
|
7388
8050
|
const encoderArgs = {
|
|
7389
8051
|
...args,
|
|
8052
|
+
swapFeeBps,
|
|
8053
|
+
feeBeneficiaries: args.feeBeneficiaries ?? [],
|
|
7390
8054
|
allowBuy: args.allowBuy ? 1 : 0,
|
|
7391
8055
|
allowSell: args.allowSell ? 1 : 0,
|
|
7392
|
-
hookProgram: args.hookProgram ?? hookProgram ??
|
|
8056
|
+
hookProgram: args.hookProgram ?? hookProgram ?? chunkAKLS6T3R_cjs.SYSTEM_PROGRAM_ADDRESS,
|
|
7393
8057
|
hookCreateRemainingAccountsLen: args.hookCreateRemainingAccountsLen ?? hookCreateRemainingAccounts.length,
|
|
7394
|
-
migratorProgram: migratorProgram ??
|
|
8058
|
+
migratorProgram: migratorProgram ?? chunkAKLS6T3R_cjs.SYSTEM_PROGRAM_ADDRESS,
|
|
7395
8059
|
hookCreateRemainingAccountsHash: args.hookCreateRemainingAccountsHash ?? (createHooksEnabled ? computeRemainingAccountsHash(hookCreateRemainingAccountAddresses) : new Uint8Array(32))
|
|
7396
8060
|
};
|
|
7397
8061
|
const data = new Uint8Array(
|
|
@@ -7477,9 +8141,10 @@ function createCurveSwapExactInInstruction(accounts, args, programId = INITIALIZ
|
|
|
7477
8141
|
baseMint,
|
|
7478
8142
|
quoteMint,
|
|
7479
8143
|
user,
|
|
7480
|
-
hookProgram =
|
|
7481
|
-
|
|
7482
|
-
|
|
8144
|
+
hookProgram = chunkAKLS6T3R_cjs.SYSTEM_PROGRAM_ADDRESS,
|
|
8145
|
+
launchFeeState,
|
|
8146
|
+
baseTokenProgram = chunkAKLS6T3R_cjs.TOKEN_PROGRAM_ADDRESS,
|
|
8147
|
+
quoteTokenProgram = chunkAKLS6T3R_cjs.TOKEN_PROGRAM_ADDRESS,
|
|
7483
8148
|
remainingAccounts = []
|
|
7484
8149
|
} = accounts;
|
|
7485
8150
|
const keys = [
|
|
@@ -7497,6 +8162,7 @@ function createCurveSwapExactInInstruction(accounts, args, programId = INITIALIZ
|
|
|
7497
8162
|
// slot (token_program follows it). Always emit it — use SYSTEM_PROGRAM_ADDRESS as the
|
|
7498
8163
|
// no-op placeholder when no real hook is configured.
|
|
7499
8164
|
{ address: hookProgram, role: kit.AccountRole.READONLY },
|
|
8165
|
+
{ address: launchFeeState, role: kit.AccountRole.WRITABLE },
|
|
7500
8166
|
{ address: baseTokenProgram, role: kit.AccountRole.READONLY },
|
|
7501
8167
|
{ address: quoteTokenProgram, role: kit.AccountRole.READONLY },
|
|
7502
8168
|
...remainingAccounts.map(createRemainingAccountMeta)
|
|
@@ -7524,11 +8190,12 @@ function createMigrateLaunchInstruction(accounts, programId = INITIALIZER_PROGRA
|
|
|
7524
8190
|
quoteMint,
|
|
7525
8191
|
baseVault,
|
|
7526
8192
|
quoteVault,
|
|
8193
|
+
launchFeeState,
|
|
7527
8194
|
migratorProgram,
|
|
7528
8195
|
payer,
|
|
7529
|
-
baseTokenProgram =
|
|
7530
|
-
quoteTokenProgram =
|
|
7531
|
-
systemProgram =
|
|
8196
|
+
baseTokenProgram = chunkAKLS6T3R_cjs.TOKEN_PROGRAM_ADDRESS,
|
|
8197
|
+
quoteTokenProgram = chunkAKLS6T3R_cjs.TOKEN_PROGRAM_ADDRESS,
|
|
8198
|
+
systemProgram = chunkAKLS6T3R_cjs.SYSTEM_PROGRAM_ADDRESS,
|
|
7532
8199
|
rent
|
|
7533
8200
|
} = accounts;
|
|
7534
8201
|
const keys = [
|
|
@@ -7539,6 +8206,7 @@ function createMigrateLaunchInstruction(accounts, programId = INITIALIZER_PROGRA
|
|
|
7539
8206
|
{ address: quoteMint, role: kit.AccountRole.READONLY },
|
|
7540
8207
|
{ address: baseVault, role: kit.AccountRole.WRITABLE },
|
|
7541
8208
|
{ address: quoteVault, role: kit.AccountRole.WRITABLE },
|
|
8209
|
+
{ address: launchFeeState, role: kit.AccountRole.READONLY },
|
|
7542
8210
|
{ address: migratorProgram, role: kit.AccountRole.READONLY },
|
|
7543
8211
|
createSignerAccountMeta4(payer, kit.AccountRole.WRITABLE_SIGNER),
|
|
7544
8212
|
{ address: baseTokenProgram, role: kit.AccountRole.READONLY },
|
|
@@ -7546,7 +8214,7 @@ function createMigrateLaunchInstruction(accounts, programId = INITIALIZER_PROGRA
|
|
|
7546
8214
|
{ address: systemProgram, role: kit.AccountRole.READONLY },
|
|
7547
8215
|
{ address: rent, role: kit.AccountRole.READONLY }
|
|
7548
8216
|
];
|
|
7549
|
-
const data =
|
|
8217
|
+
const data = chunkGUGN3EYX_cjs.encodeInstructionData(
|
|
7550
8218
|
INITIALIZER_INSTRUCTION_DISCRIMINATORS.migrateLaunch
|
|
7551
8219
|
);
|
|
7552
8220
|
return { programAddress: programId, accounts: keys, data };
|
|
@@ -7574,6 +8242,7 @@ var previewSwapExactInResultCodec = kit.getStructCodec([
|
|
|
7574
8242
|
function createPreviewSwapExactInInstruction(accounts, args, programId = INITIALIZER_PROGRAM_ID) {
|
|
7575
8243
|
const {
|
|
7576
8244
|
launch,
|
|
8245
|
+
launchFeeState,
|
|
7577
8246
|
baseVault,
|
|
7578
8247
|
quoteVault,
|
|
7579
8248
|
hookProgram,
|
|
@@ -7581,6 +8250,7 @@ function createPreviewSwapExactInInstruction(accounts, args, programId = INITIAL
|
|
|
7581
8250
|
} = accounts;
|
|
7582
8251
|
const keys = [
|
|
7583
8252
|
{ address: launch, role: kit.AccountRole.READONLY },
|
|
8253
|
+
{ address: launchFeeState, role: kit.AccountRole.READONLY },
|
|
7584
8254
|
{ address: baseVault, role: kit.AccountRole.READONLY },
|
|
7585
8255
|
{ address: quoteVault, role: kit.AccountRole.READONLY }
|
|
7586
8256
|
];
|
|
@@ -7610,7 +8280,7 @@ function createPreviewMigrationInstruction(accounts, programId = INITIALIZER_PRO
|
|
|
7610
8280
|
{ address: baseVault, role: kit.AccountRole.READONLY },
|
|
7611
8281
|
{ address: quoteVault, role: kit.AccountRole.READONLY }
|
|
7612
8282
|
];
|
|
7613
|
-
const data =
|
|
8283
|
+
const data = chunkGUGN3EYX_cjs.encodeInstructionData(
|
|
7614
8284
|
INITIALIZER_INSTRUCTION_DISCRIMINATORS.previewMigration
|
|
7615
8285
|
);
|
|
7616
8286
|
return { programAddress: programId, accounts: keys, data };
|
|
@@ -7983,7 +8653,7 @@ async function buildCpmmMigrationRemainingAccounts({
|
|
|
7983
8653
|
adminBaseAta,
|
|
7984
8654
|
adminQuoteAta,
|
|
7985
8655
|
recipientAtas,
|
|
7986
|
-
cpmmProgram =
|
|
8656
|
+
cpmmProgram = chunkAKLS6T3R_cjs.CPMM_PROGRAM_ID,
|
|
7987
8657
|
cpmmMigratorProgram = CPMM_MIGRATOR_PROGRAM_ID
|
|
7988
8658
|
}) {
|
|
7989
8659
|
const [cpmmMigrationState] = await getCpmmMigratorStateAddress(
|
|
@@ -7991,9 +8661,9 @@ async function buildCpmmMigrationRemainingAccounts({
|
|
|
7991
8661
|
cpmmMigratorProgram
|
|
7992
8662
|
);
|
|
7993
8663
|
const [migrationAuthority] = await getCpmmMigrationAuthorityAddress(cpmmMigratorProgram);
|
|
7994
|
-
const poolInit = await
|
|
8664
|
+
const poolInit = await chunkAKLS6T3R_cjs.getPoolInitAddresses(baseMint, quoteMint, cpmmProgram);
|
|
7995
8665
|
const pool = poolInit.pool[0];
|
|
7996
|
-
const [launchLpPosition] = await
|
|
8666
|
+
const [launchLpPosition] = await chunkAKLS6T3R_cjs.getPositionAddress(
|
|
7997
8667
|
pool,
|
|
7998
8668
|
launchAuthority,
|
|
7999
8669
|
0n,
|
|
@@ -8073,6 +8743,7 @@ chunkQ7SFCCGT_cjs.__export(predictionMigrator_exports, {
|
|
|
8073
8743
|
CLAIM_RECEIPT_DISCRIMINATOR: () => CLAIM_RECEIPT_DISCRIMINATOR,
|
|
8074
8744
|
ENTRY_BY_MINT_DISCRIMINATOR: () => ENTRY_BY_MINT_DISCRIMINATOR,
|
|
8075
8745
|
ENTRY_DISCRIMINATOR: () => ENTRY_DISCRIMINATOR,
|
|
8746
|
+
INIT_CONFIG_DISCRIMINATOR: () => INIT_CONFIG_DISCRIMINATOR2,
|
|
8076
8747
|
LAUNCH_DISCRIMINATOR: () => LAUNCH_DISCRIMINATOR2,
|
|
8077
8748
|
MARKET_DISCRIMINATOR: () => MARKET_DISCRIMINATOR,
|
|
8078
8749
|
MIGRATE_ENTRY_DISCRIMINATOR: () => MIGRATE_ENTRY_DISCRIMINATOR,
|
|
@@ -8105,17 +8776,20 @@ chunkQ7SFCCGT_cjs.__export(predictionMigrator_exports, {
|
|
|
8105
8776
|
decodeClaimReceipt: () => decodeClaimReceipt,
|
|
8106
8777
|
decodeEntry: () => decodeEntry,
|
|
8107
8778
|
decodeEntryByMint: () => decodeEntryByMint,
|
|
8779
|
+
decodeInitConfig: () => decodeInitConfig,
|
|
8108
8780
|
decodeLaunch: () => decodeLaunch,
|
|
8109
8781
|
decodeMarket: () => decodeMarket,
|
|
8110
8782
|
decodeOracleState: () => decodeOracleState2,
|
|
8111
8783
|
fetchAllClaimReceipt: () => fetchAllClaimReceipt,
|
|
8112
8784
|
fetchAllEntry: () => fetchAllEntry,
|
|
8113
8785
|
fetchAllEntryByMint: () => fetchAllEntryByMint,
|
|
8786
|
+
fetchAllInitConfig: () => fetchAllInitConfig,
|
|
8114
8787
|
fetchAllLaunch: () => fetchAllLaunch,
|
|
8115
8788
|
fetchAllMarket: () => fetchAllMarket,
|
|
8116
8789
|
fetchAllMaybeClaimReceipt: () => fetchAllMaybeClaimReceipt,
|
|
8117
8790
|
fetchAllMaybeEntry: () => fetchAllMaybeEntry,
|
|
8118
8791
|
fetchAllMaybeEntryByMint: () => fetchAllMaybeEntryByMint,
|
|
8792
|
+
fetchAllMaybeInitConfig: () => fetchAllMaybeInitConfig,
|
|
8119
8793
|
fetchAllMaybeLaunch: () => fetchAllMaybeLaunch,
|
|
8120
8794
|
fetchAllMaybeMarket: () => fetchAllMaybeMarket,
|
|
8121
8795
|
fetchAllMaybeOracleState: () => fetchAllMaybeOracleState,
|
|
@@ -8123,11 +8797,13 @@ chunkQ7SFCCGT_cjs.__export(predictionMigrator_exports, {
|
|
|
8123
8797
|
fetchClaimReceipt: () => fetchClaimReceipt,
|
|
8124
8798
|
fetchEntry: () => fetchEntry,
|
|
8125
8799
|
fetchEntryByMint: () => fetchEntryByMint,
|
|
8800
|
+
fetchInitConfig: () => fetchInitConfig,
|
|
8126
8801
|
fetchLaunch: () => fetchLaunch,
|
|
8127
8802
|
fetchMarket: () => fetchMarket,
|
|
8128
8803
|
fetchMaybeClaimReceipt: () => fetchMaybeClaimReceipt,
|
|
8129
8804
|
fetchMaybeEntry: () => fetchMaybeEntry,
|
|
8130
8805
|
fetchMaybeEntryByMint: () => fetchMaybeEntryByMint,
|
|
8806
|
+
fetchMaybeInitConfig: () => fetchMaybeInitConfig,
|
|
8131
8807
|
fetchMaybeLaunch: () => fetchMaybeLaunch,
|
|
8132
8808
|
fetchMaybeMarket: () => fetchMaybeMarket,
|
|
8133
8809
|
fetchMaybeOracleState: () => fetchMaybeOracleState,
|
|
@@ -8162,6 +8838,11 @@ chunkQ7SFCCGT_cjs.__export(predictionMigrator_exports, {
|
|
|
8162
8838
|
getEntryRegisteredDecoder: () => getEntryRegisteredDecoder,
|
|
8163
8839
|
getEntryRegisteredEncoder: () => getEntryRegisteredEncoder,
|
|
8164
8840
|
getEntrySize: () => getEntrySize,
|
|
8841
|
+
getInitConfigCodec: () => getInitConfigCodec2,
|
|
8842
|
+
getInitConfigDecoder: () => getInitConfigDecoder2,
|
|
8843
|
+
getInitConfigDiscriminatorBytes: () => getInitConfigDiscriminatorBytes,
|
|
8844
|
+
getInitConfigEncoder: () => getInitConfigEncoder2,
|
|
8845
|
+
getInitConfigSize: () => getInitConfigSize,
|
|
8165
8846
|
getLaunchCodec: () => getLaunchCodec2,
|
|
8166
8847
|
getLaunchDecoder: () => getLaunchDecoder2,
|
|
8167
8848
|
getLaunchDiscriminatorBytes: () => getLaunchDiscriminatorBytes,
|
|
@@ -8741,14 +9422,14 @@ async function getOracleStateAddress(oracleAuthority, nonce) {
|
|
|
8741
9422
|
|
|
8742
9423
|
// src/solana/deployment.ts
|
|
8743
9424
|
var DOPPLER_SOLANA_DEVNET_PROGRAM_ADDRESSES = {
|
|
8744
|
-
cpmmProgram:
|
|
9425
|
+
cpmmProgram: chunkAKLS6T3R_cjs.CPMM_PROGRAM_ID,
|
|
8745
9426
|
initializerProgram: INITIALIZER_PROGRAM_ID,
|
|
8746
9427
|
cpmmMigratorProgram: CPMM_MIGRATOR_PROGRAM_ID,
|
|
8747
9428
|
cpmmHookProgram: CPMM_HOOK_PROGRAM_ID,
|
|
8748
9429
|
cosignerHookProgram: COSIGNER_HOOK_PROGRAM_ID
|
|
8749
9430
|
};
|
|
8750
9431
|
async function deriveSolanaCpmmDeployment(programs = DOPPLER_SOLANA_DEVNET_PROGRAM_ADDRESSES) {
|
|
8751
|
-
const [cpmmConfig] = await
|
|
9432
|
+
const [cpmmConfig] = await chunkAKLS6T3R_cjs.getConfigAddress(programs.cpmmProgram);
|
|
8752
9433
|
const [initializerConfig] = await getConfigAddress2(
|
|
8753
9434
|
programs.initializerProgram
|
|
8754
9435
|
);
|