@chainlink/ccip-sdk 0.92.1 → 0.93.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 +20 -18
- package/dist/api/index.d.ts +103 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/index.js +141 -0
- package/dist/api/index.js.map +1 -0
- package/dist/api/types.d.ts +38 -0
- package/dist/api/types.d.ts.map +1 -0
- package/dist/api/types.js +2 -0
- package/dist/api/types.js.map +1 -0
- package/dist/aptos/index.d.ts +20 -33
- package/dist/aptos/index.d.ts.map +1 -1
- package/dist/aptos/index.js +34 -26
- package/dist/aptos/index.js.map +1 -1
- package/dist/aptos/logs.js +1 -1
- package/dist/aptos/logs.js.map +1 -1
- package/dist/aptos/token.js.map +1 -1
- package/dist/chain.d.ts +206 -71
- package/dist/chain.d.ts.map +1 -1
- package/dist/chain.js +89 -20
- package/dist/chain.js.map +1 -1
- package/dist/commits.d.ts +2 -2
- package/dist/commits.d.ts.map +1 -1
- package/dist/commits.js +4 -4
- package/dist/commits.js.map +1 -1
- package/dist/errors/CCIPError.d.ts.map +1 -1
- package/dist/errors/CCIPError.js +3 -2
- package/dist/errors/CCIPError.js.map +1 -1
- package/dist/errors/codes.d.ts +4 -1
- package/dist/errors/codes.d.ts.map +1 -1
- package/dist/errors/codes.js +6 -1
- package/dist/errors/codes.js.map +1 -1
- package/dist/errors/index.d.ts +5 -2
- package/dist/errors/index.d.ts.map +1 -1
- package/dist/errors/index.js +8 -2
- package/dist/errors/index.js.map +1 -1
- package/dist/errors/recovery.d.ts.map +1 -1
- package/dist/errors/recovery.js +4 -1
- package/dist/errors/recovery.js.map +1 -1
- package/dist/errors/specialized.d.ts +29 -4
- package/dist/errors/specialized.d.ts.map +1 -1
- package/dist/errors/specialized.js +48 -6
- package/dist/errors/specialized.js.map +1 -1
- package/dist/evm/errors.js.map +1 -1
- package/dist/evm/index.d.ts +24 -48
- package/dist/evm/index.d.ts.map +1 -1
- package/dist/evm/index.js +71 -59
- package/dist/evm/index.js.map +1 -1
- package/dist/evm/logs.js.map +1 -1
- package/dist/evm/offchain.js +3 -2
- package/dist/evm/offchain.js.map +1 -1
- package/dist/evm/viem/client-adapter.d.ts +68 -0
- package/dist/evm/viem/client-adapter.d.ts.map +1 -0
- package/dist/evm/viem/client-adapter.js +104 -0
- package/dist/evm/viem/client-adapter.js.map +1 -0
- package/dist/evm/viem/index.d.ts +29 -0
- package/dist/evm/viem/index.d.ts.map +1 -0
- package/dist/evm/viem/index.js +28 -0
- package/dist/evm/viem/index.js.map +1 -0
- package/dist/evm/viem/types.d.ts +13 -0
- package/dist/evm/viem/types.d.ts.map +1 -0
- package/dist/evm/viem/types.js +2 -0
- package/dist/evm/viem/types.js.map +1 -0
- package/dist/evm/viem/wallet-adapter.d.ts +58 -0
- package/dist/evm/viem/wallet-adapter.d.ts.map +1 -0
- package/dist/evm/viem/wallet-adapter.js +197 -0
- package/dist/evm/viem/wallet-adapter.js.map +1 -0
- package/dist/execution.d.ts +1 -1
- package/dist/execution.d.ts.map +1 -1
- package/dist/execution.js +2 -2
- package/dist/execution.js.map +1 -1
- package/dist/explorer.d.ts +74 -0
- package/dist/explorer.d.ts.map +1 -0
- package/dist/explorer.js +67 -0
- package/dist/explorer.js.map +1 -0
- package/dist/gas.js.map +1 -1
- package/dist/hasher/merklemulti.js.map +1 -1
- package/dist/http-status.d.ts +20 -0
- package/dist/http-status.d.ts.map +1 -0
- package/dist/http-status.js +25 -0
- package/dist/http-status.js.map +1 -0
- package/dist/index.d.ts +10 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/offchain.js.map +1 -1
- package/dist/requests.d.ts +4 -4
- package/dist/requests.d.ts.map +1 -1
- package/dist/requests.js +6 -6
- package/dist/requests.js.map +1 -1
- package/dist/solana/cleanup.js +2 -2
- package/dist/solana/cleanup.js.map +1 -1
- package/dist/solana/exec.js +1 -5
- package/dist/solana/exec.js.map +1 -1
- package/dist/solana/index.d.ts +28 -57
- package/dist/solana/index.d.ts.map +1 -1
- package/dist/solana/index.js +66 -70
- package/dist/solana/index.js.map +1 -1
- package/dist/solana/logs.js +2 -2
- package/dist/solana/logs.js.map +1 -1
- package/dist/solana/offchain.js +3 -3
- package/dist/solana/offchain.js.map +1 -1
- package/dist/solana/send.js +1 -1
- package/dist/solana/send.js.map +1 -1
- package/dist/solana/utils.js +1 -1
- package/dist/solana/utils.js.map +1 -1
- package/dist/sui/discovery.d.ts.map +1 -1
- package/dist/sui/discovery.js +2 -5
- package/dist/sui/discovery.js.map +1 -1
- package/dist/sui/events.d.ts.map +1 -1
- package/dist/sui/events.js +1 -4
- package/dist/sui/events.js.map +1 -1
- package/dist/sui/index.d.ts +18 -29
- package/dist/sui/index.d.ts.map +1 -1
- package/dist/sui/index.js +24 -26
- package/dist/sui/index.js.map +1 -1
- package/dist/sui/manuallyExec/encoder.d.ts.map +1 -1
- package/dist/sui/manuallyExec/encoder.js +0 -3
- package/dist/sui/manuallyExec/encoder.js.map +1 -1
- package/dist/sui/manuallyExec/index.d.ts.map +1 -1
- package/dist/sui/manuallyExec/index.js +1 -2
- package/dist/sui/manuallyExec/index.js.map +1 -1
- package/dist/sui/objects.js +4 -4
- package/dist/sui/objects.js.map +1 -1
- package/dist/ton/exec.d.ts +2 -2
- package/dist/ton/exec.d.ts.map +1 -1
- package/dist/ton/exec.js.map +1 -1
- package/dist/ton/hasher.js +5 -5
- package/dist/ton/hasher.js.map +1 -1
- package/dist/ton/index.d.ts +54 -49
- package/dist/ton/index.d.ts.map +1 -1
- package/dist/ton/index.js +331 -236
- package/dist/ton/index.js.map +1 -1
- package/dist/ton/logs.d.ts +11 -22
- package/dist/ton/logs.d.ts.map +1 -1
- package/dist/ton/logs.js +95 -118
- package/dist/ton/logs.js.map +1 -1
- package/dist/ton/types.d.ts +9 -9
- package/dist/ton/types.d.ts.map +1 -1
- package/dist/ton/types.js +5 -9
- package/dist/ton/types.js.map +1 -1
- package/dist/ton/utils.d.ts +8 -27
- package/dist/ton/utils.d.ts.map +1 -1
- package/dist/ton/utils.js +31 -111
- package/dist/ton/utils.js.map +1 -1
- package/dist/types.d.ts +34 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +30 -0
- package/dist/types.js.map +1 -1
- package/dist/utils.d.ts +6 -5
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +76 -52
- package/dist/utils.js.map +1 -1
- package/dist/viem.d.ts +6 -0
- package/dist/viem.d.ts.map +1 -0
- package/dist/viem.js +6 -0
- package/dist/viem.js.map +1 -0
- package/package.json +17 -2
- package/src/api/index.ts +167 -0
- package/src/api/types.ts +39 -0
- package/src/aptos/index.ts +57 -64
- package/src/aptos/logs.ts +10 -10
- package/src/aptos/token.ts +1 -1
- package/src/chain.ts +274 -97
- package/src/commits.ts +5 -5
- package/src/errors/CCIPError.ts +5 -2
- package/src/errors/codes.ts +8 -1
- package/src/errors/index.ts +15 -2
- package/src/errors/recovery.ts +9 -1
- package/src/errors/specialized.ts +61 -6
- package/src/evm/errors.ts +2 -2
- package/src/evm/index.ts +107 -120
- package/src/evm/logs.ts +4 -4
- package/src/evm/offchain.ts +5 -4
- package/src/evm/viem/client-adapter.ts +124 -0
- package/src/evm/viem/index.ts +29 -0
- package/src/evm/viem/types.ts +14 -0
- package/src/evm/viem/wallet-adapter.ts +233 -0
- package/src/execution.ts +9 -9
- package/src/explorer.ts +90 -0
- package/src/gas.ts +2 -2
- package/src/hasher/merklemulti.ts +7 -7
- package/src/http-status.ts +31 -0
- package/src/index.ts +18 -1
- package/src/offchain.ts +1 -1
- package/src/requests.ts +9 -12
- package/src/solana/cleanup.ts +4 -4
- package/src/solana/exec.ts +13 -18
- package/src/solana/index.ts +92 -117
- package/src/solana/logs.ts +8 -8
- package/src/solana/offchain.ts +3 -3
- package/src/solana/send.ts +20 -20
- package/src/solana/utils.ts +4 -4
- package/src/sui/discovery.ts +4 -10
- package/src/sui/events.ts +4 -8
- package/src/sui/index.ts +36 -48
- package/src/sui/manuallyExec/encoder.ts +0 -4
- package/src/sui/manuallyExec/index.ts +1 -3
- package/src/sui/objects.ts +14 -14
- package/src/ton/exec.ts +2 -5
- package/src/ton/hasher.ts +5 -5
- package/src/ton/index.ts +392 -316
- package/src/ton/logs.ts +122 -143
- package/src/ton/types.ts +17 -21
- package/src/ton/utils.ts +39 -145
- package/src/types.ts +36 -0
- package/src/utils.ts +96 -66
- package/src/viem.ts +5 -0
- package/tsconfig.json +3 -2
- package/dist/ton/bindings/offramp.d.ts +0 -48
- package/dist/ton/bindings/offramp.d.ts.map +0 -1
- package/dist/ton/bindings/offramp.js +0 -63
- package/dist/ton/bindings/offramp.js.map +0 -1
- package/dist/ton/bindings/onramp.d.ts +0 -40
- package/dist/ton/bindings/onramp.d.ts.map +0 -1
- package/dist/ton/bindings/onramp.js +0 -51
- package/dist/ton/bindings/onramp.js.map +0 -1
- package/dist/ton/bindings/router.d.ts +0 -47
- package/dist/ton/bindings/router.d.ts.map +0 -1
- package/dist/ton/bindings/router.js +0 -51
- package/dist/ton/bindings/router.js.map +0 -1
- package/src/ton/bindings/offramp.ts +0 -96
- package/src/ton/bindings/onramp.ts +0 -72
- package/src/ton/bindings/router.ts +0 -65
package/src/index.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
export type { APIErrorResponse, CCIPAPIClientContext, LaneLatencyResponse } from './api/index.ts'
|
|
2
|
+
export { CCIPAPIClient, DEFAULT_API_BASE_URL } from './api/index.ts'
|
|
3
|
+
|
|
1
4
|
export type {
|
|
2
5
|
Chain,
|
|
6
|
+
ChainContext,
|
|
3
7
|
ChainGetter,
|
|
4
8
|
ChainStatic,
|
|
5
9
|
LogFilter,
|
|
@@ -18,7 +22,7 @@ export {
|
|
|
18
22
|
encodeExtraArgs,
|
|
19
23
|
} from './extra-args.ts'
|
|
20
24
|
export { estimateExecGasForRequest } from './gas.ts'
|
|
21
|
-
export { decodeMessage,
|
|
25
|
+
export { decodeMessage, getMessagesForSender, sourceToDestTokenAmounts } from './requests.ts'
|
|
22
26
|
export {
|
|
23
27
|
type AnyMessage,
|
|
24
28
|
type CCIPCommit,
|
|
@@ -36,6 +40,8 @@ export {
|
|
|
36
40
|
type WithLogger,
|
|
37
41
|
CCIPVersion,
|
|
38
42
|
ExecutionState,
|
|
43
|
+
IntentStatus,
|
|
44
|
+
MessageStatus,
|
|
39
45
|
} from './types.ts'
|
|
40
46
|
export {
|
|
41
47
|
bigIntReplacer,
|
|
@@ -46,16 +52,27 @@ export {
|
|
|
46
52
|
isSupportedTxHash,
|
|
47
53
|
networkInfo,
|
|
48
54
|
} from './utils.ts'
|
|
55
|
+
export {
|
|
56
|
+
type CCIPExplorerLinks,
|
|
57
|
+
type ExplorerLinkType,
|
|
58
|
+
CCIP_EXPLORER_BASE_URL,
|
|
59
|
+
getCCIPExplorerLinks,
|
|
60
|
+
getCCIPExplorerUrl,
|
|
61
|
+
} from './explorer.ts'
|
|
49
62
|
|
|
50
63
|
// errors
|
|
51
64
|
export * from './errors/index.ts'
|
|
52
65
|
|
|
53
66
|
// chains
|
|
54
67
|
import { AptosChain } from './aptos/index.ts'
|
|
68
|
+
export type { UnsignedAptosTx } from './aptos/index.ts'
|
|
55
69
|
import { EVMChain } from './evm/index.ts'
|
|
70
|
+
export type { UnsignedEVMTx } from './evm/index.ts'
|
|
56
71
|
import { SolanaChain } from './solana/index.ts'
|
|
72
|
+
export type { UnsignedSolanaTx } from './solana/index.ts'
|
|
57
73
|
import { SuiChain } from './sui/index.ts'
|
|
58
74
|
import { TONChain } from './ton/index.ts'
|
|
75
|
+
export type { UnsignedTONTx } from './ton/index.ts'
|
|
59
76
|
import { ChainFamily } from './types.ts'
|
|
60
77
|
export { AptosChain, ChainFamily, EVMChain, SolanaChain, SuiChain, TONChain }
|
|
61
78
|
// use `supportedChains` to override/register derived classes, if needed
|
package/src/offchain.ts
CHANGED
|
@@ -64,7 +64,7 @@ export async function getLbtcAttestation(
|
|
|
64
64
|
method: 'POST',
|
|
65
65
|
body: JSON.stringify({ messageHash: [payloadHash] }),
|
|
66
66
|
})
|
|
67
|
-
const response = (await res.json()) as LombardAttestationsResponse
|
|
67
|
+
const response = (await res.json()) as LombardAttestationsResponse | null
|
|
68
68
|
if (response == null || !('attestations' in response)) {
|
|
69
69
|
throw new CCIPLbtcAttestationNotFoundError(payloadHash, response)
|
|
70
70
|
}
|
package/src/requests.ts
CHANGED
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
} from './types.ts'
|
|
26
26
|
import { convertKeysToCamelCase, decodeAddress, leToBigInt, networkInfo } from './utils.ts'
|
|
27
27
|
|
|
28
|
-
function decodeJsonMessage(data: Record<string, unknown>) {
|
|
28
|
+
function decodeJsonMessage(data: Record<string, unknown> | undefined) {
|
|
29
29
|
if (!data || typeof data != 'object') throw new CCIPMessageInvalidError(data)
|
|
30
30
|
if (data.message) data = data.message as Record<string, unknown>
|
|
31
31
|
if (data.header) {
|
|
@@ -60,7 +60,7 @@ function decodeJsonMessage(data: Record<string, unknown>) {
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
for (const ta of data_.tokenAmounts) {
|
|
63
|
-
if (ta.destGasAmount != null || ta.destExecData
|
|
63
|
+
if (ta.destGasAmount != null || !ta.destExecData) continue
|
|
64
64
|
switch (sourceNetwork.family) {
|
|
65
65
|
// EVM & Solana encode destExecData as big-endian
|
|
66
66
|
case ChainFamily.EVM:
|
|
@@ -90,7 +90,7 @@ function decodeJsonMessage(data: Record<string, unknown>) {
|
|
|
90
90
|
export function decodeMessage(data: string | Uint8Array | Record<string, unknown>): CCIPMessage {
|
|
91
91
|
if (
|
|
92
92
|
(typeof data === 'string' && data.startsWith('{')) ||
|
|
93
|
-
(typeof data === 'object' &&
|
|
93
|
+
(typeof data === 'object' && !isBytesLike(data))
|
|
94
94
|
) {
|
|
95
95
|
if (typeof data === 'string')
|
|
96
96
|
data = yaml.parse(data, { intAsBigInt: true }) as Record<string, unknown>
|
|
@@ -115,10 +115,7 @@ export function decodeMessage(data: string | Uint8Array | Record<string, unknown
|
|
|
115
115
|
* @param tx - ChainTransaction to search in
|
|
116
116
|
* @returns CCIP requests (messages) in the transaction (at least one)
|
|
117
117
|
**/
|
|
118
|
-
export async function
|
|
119
|
-
source: Chain,
|
|
120
|
-
tx: ChainTransaction,
|
|
121
|
-
): Promise<CCIPRequest[]> {
|
|
118
|
+
export async function getMessagesInTx(source: Chain, tx: ChainTransaction): Promise<CCIPRequest[]> {
|
|
122
119
|
const txHash = tx.hash
|
|
123
120
|
|
|
124
121
|
const requests: CCIPRequest[] = []
|
|
@@ -156,7 +153,7 @@ export async function fetchCCIPRequestsInTx(
|
|
|
156
153
|
* @param hints - Optional hints for pagination (e.g., `address` for onRamp, `page` for pagination size).
|
|
157
154
|
* @returns CCIPRequest with given messageId.
|
|
158
155
|
*/
|
|
159
|
-
export async function
|
|
156
|
+
export async function getMessageById(
|
|
160
157
|
source: Chain,
|
|
161
158
|
messageId: string,
|
|
162
159
|
hints?: { page?: number; address?: string },
|
|
@@ -201,7 +198,7 @@ const BLOCK_LOG_WINDOW_SIZE = 5000
|
|
|
201
198
|
* @param opts - Optional log filtering parameters.
|
|
202
199
|
* @returns Array of messages in the batch.
|
|
203
200
|
*/
|
|
204
|
-
export async function
|
|
201
|
+
export async function getMessagesInBatch<
|
|
205
202
|
C extends Chain,
|
|
206
203
|
R extends PickDeep<
|
|
207
204
|
CCIPRequest,
|
|
@@ -249,7 +246,7 @@ export async function fetchAllMessagesInBatch<
|
|
|
249
246
|
messages.push(message)
|
|
250
247
|
if (message.sequenceNumber >= maxSeqNr) break
|
|
251
248
|
}
|
|
252
|
-
if (messages.length && messages[0]
|
|
249
|
+
if (messages.length && messages[0]!.sequenceNumber > minSeqNr) {
|
|
253
250
|
// still work to be done backwards
|
|
254
251
|
delete filter['startBlock']
|
|
255
252
|
filter['endBlock'] = backwardsEndBlock
|
|
@@ -287,7 +284,7 @@ export async function fetchAllMessagesInBatch<
|
|
|
287
284
|
* @param filter - Log filter options.
|
|
288
285
|
* @returns Async generator of CCIP requests.
|
|
289
286
|
*/
|
|
290
|
-
export async function*
|
|
287
|
+
export async function* getMessagesForSender(
|
|
291
288
|
source: Chain,
|
|
292
289
|
sender: string,
|
|
293
290
|
filter: Pick<LogFilter, 'address' | 'startBlock' | 'startTime' | 'endBlock'>,
|
|
@@ -348,7 +345,7 @@ export async function sourceToDestTokenAmounts<S extends { token: string }>(
|
|
|
348
345
|
return {
|
|
349
346
|
...rest,
|
|
350
347
|
sourcePoolAddress,
|
|
351
|
-
destTokenAddress: remotes[networkInfo(destChainSelector).name]
|
|
348
|
+
destTokenAddress: remotes[networkInfo(destChainSelector).name]!.remoteToken,
|
|
352
349
|
}
|
|
353
350
|
}),
|
|
354
351
|
)
|
package/src/solana/cleanup.ts
CHANGED
|
@@ -92,7 +92,7 @@ export async function cleanUpBuffers(
|
|
|
92
92
|
logger.info('🗑️ Closed lookup table', altAddr, ': tx =>', sig)
|
|
93
93
|
} catch (err) {
|
|
94
94
|
const info = await connection.getAddressLookupTable(lookupTable)
|
|
95
|
-
if (!info
|
|
95
|
+
if (!info.value) break
|
|
96
96
|
else if (info.value.state.deactivationSlot < 2n ** 63n)
|
|
97
97
|
deactivationSlot = Number(info.value.state.deactivationSlot)
|
|
98
98
|
logger.warn('Failed to close lookup table', altAddr, err)
|
|
@@ -181,12 +181,12 @@ export async function cleanUpBuffers(
|
|
|
181
181
|
}
|
|
182
182
|
case 'Instruction: DeactivateLookupTable':
|
|
183
183
|
case 'Instruction: CreateLookupTable': {
|
|
184
|
-
const lookupTable = tx.tx.transaction.message.staticAccountKeys[1]
|
|
184
|
+
const lookupTable = tx.tx.transaction.message.staticAccountKeys[1]!
|
|
185
185
|
if (seenAccs.has(lookupTable.toBase58())) continue
|
|
186
186
|
seenAccs.add(lookupTable.toBase58())
|
|
187
187
|
|
|
188
188
|
const info = await connection.getAddressLookupTable(lookupTable)
|
|
189
|
-
if (!info
|
|
189
|
+
if (!info.value) {
|
|
190
190
|
alreadyClosed++ // assume we're done when we hit Nth closed ALT; maybe add an option to keep going?
|
|
191
191
|
logger.debug('Lookup table', lookupTable.toBase58(), 'already closed')
|
|
192
192
|
} else if (info.value.state.authority?.toBase58() !== wallet.publicKey.toBase58()) {
|
|
@@ -201,7 +201,7 @@ export async function cleanUpBuffers(
|
|
|
201
201
|
pendingPromises.push(closeAlt(lookupTable, Number(info.value.state.deactivationSlot)))
|
|
202
202
|
} else if (
|
|
203
203
|
info.value.state.addresses.length >= 18 &&
|
|
204
|
-
info.value.state.addresses[6]
|
|
204
|
+
info.value.state.addresses[6]!.equals(wallet.publicKey)
|
|
205
205
|
) {
|
|
206
206
|
// the conditions above match for ALTs created for ccip manualExec
|
|
207
207
|
const deactivateIx = AddressLookupTableProgram.deactivateLookupTable({
|
package/src/solana/exec.ts
CHANGED
|
@@ -105,18 +105,18 @@ export async function generateUnsignedExecuteReport(
|
|
|
105
105
|
const execIx = await program.methods
|
|
106
106
|
.manuallyExecute(serializedReport, tokenIndexes)
|
|
107
107
|
.accounts({
|
|
108
|
-
config: accounts[0]
|
|
109
|
-
referenceAddresses: accounts[1]
|
|
110
|
-
sourceChain: accounts[2]
|
|
111
|
-
commitReport: accounts[3]
|
|
112
|
-
offramp: accounts[4]
|
|
113
|
-
allowedOfframp: accounts[5]
|
|
114
|
-
authority: accounts[6]
|
|
115
|
-
systemProgram: accounts[7]
|
|
116
|
-
sysvarInstructions: accounts[8]
|
|
117
|
-
rmnRemote: accounts[9]
|
|
118
|
-
rmnRemoteCurses: accounts[10]
|
|
119
|
-
rmnRemoteConfig: accounts[11]
|
|
108
|
+
config: accounts[0]!.pubkey,
|
|
109
|
+
referenceAddresses: accounts[1]!.pubkey,
|
|
110
|
+
sourceChain: accounts[2]!.pubkey,
|
|
111
|
+
commitReport: accounts[3]!.pubkey,
|
|
112
|
+
offramp: accounts[4]!.pubkey,
|
|
113
|
+
allowedOfframp: accounts[5]!.pubkey,
|
|
114
|
+
authority: accounts[6]!.pubkey,
|
|
115
|
+
systemProgram: accounts[7]!.pubkey,
|
|
116
|
+
sysvarInstructions: accounts[8]!.pubkey,
|
|
117
|
+
rmnRemote: accounts[9]!.pubkey,
|
|
118
|
+
rmnRemoteCurses: accounts[10]!.pubkey,
|
|
119
|
+
rmnRemoteConfig: accounts[11]!.pubkey,
|
|
120
120
|
})
|
|
121
121
|
.remainingAccounts(accounts.slice(12))
|
|
122
122
|
.instruction()
|
|
@@ -414,7 +414,7 @@ async function autoDeriveExecutionAccounts({
|
|
|
414
414
|
|
|
415
415
|
const [configPDA] = PublicKey.findProgramAddressSync([Buffer.from('config')], offramp.programId)
|
|
416
416
|
|
|
417
|
-
while (
|
|
417
|
+
while (stage) {
|
|
418
418
|
const params: IdlTypes<typeof CCIP_OFFRAMP_IDL>['DeriveAccountsExecuteParams'] = {
|
|
419
419
|
executeCaller: payer,
|
|
420
420
|
messageAccounts: messagingAccounts,
|
|
@@ -481,11 +481,6 @@ async function autoDeriveExecutionAccounts({
|
|
|
481
481
|
// Collect lookup tables
|
|
482
482
|
lookupTables.push(...response.lookUpTablesToSave)
|
|
483
483
|
|
|
484
|
-
// Check if derivation is complete
|
|
485
|
-
if (!response.nextStage || response.nextStage.length === 0) {
|
|
486
|
-
break
|
|
487
|
-
}
|
|
488
|
-
|
|
489
484
|
stage = response.nextStage
|
|
490
485
|
}
|
|
491
486
|
|