@chainlink/ccip-cli 0.91.0 → 0.92.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 +60 -55
- package/dist/commands/manual-exec.d.ts +7 -1
- package/dist/commands/manual-exec.d.ts.map +1 -1
- package/dist/commands/manual-exec.js +16 -7
- package/dist/commands/manual-exec.js.map +1 -1
- package/dist/commands/parse.d.ts.map +1 -1
- package/dist/commands/parse.js +6 -5
- package/dist/commands/parse.js.map +1 -1
- package/dist/commands/send.d.ts +6 -1
- package/dist/commands/send.d.ts.map +1 -1
- package/dist/commands/send.js +27 -22
- package/dist/commands/send.js.map +1 -1
- package/dist/commands/show.d.ts +10 -1
- package/dist/commands/show.d.ts.map +1 -1
- package/dist/commands/show.js +85 -27
- package/dist/commands/show.js.map +1 -1
- package/dist/commands/supported-tokens.d.ts.map +1 -1
- package/dist/commands/supported-tokens.js +6 -6
- package/dist/commands/supported-tokens.js.map +1 -1
- package/dist/commands/types.d.ts +3 -2
- package/dist/commands/types.d.ts.map +1 -1
- package/dist/commands/utils.d.ts +27 -7
- package/dist/commands/utils.d.ts.map +1 -1
- package/dist/commands/utils.js +97 -35
- package/dist/commands/utils.js.map +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -3
- package/dist/index.js.map +1 -1
- package/dist/providers/aptos.d.ts.map +1 -1
- package/dist/providers/aptos.js +3 -5
- package/dist/providers/aptos.js.map +1 -1
- package/dist/providers/evm.d.ts.map +1 -1
- package/dist/providers/evm.js +2 -4
- package/dist/providers/evm.js.map +1 -1
- package/dist/providers/index.d.ts +6 -5
- package/dist/providers/index.d.ts.map +1 -1
- package/dist/providers/index.js +104 -71
- package/dist/providers/index.js.map +1 -1
- package/dist/providers/solana.d.ts.map +1 -1
- package/dist/providers/solana.js +5 -4
- package/dist/providers/solana.js.map +1 -1
- package/dist/providers/sui.d.ts +10 -0
- package/dist/providers/sui.d.ts.map +1 -0
- package/dist/providers/sui.js +15 -0
- package/dist/providers/sui.js.map +1 -0
- package/dist/providers/ton.d.ts +10 -0
- package/dist/providers/ton.d.ts.map +1 -0
- package/dist/providers/ton.js +55 -0
- package/dist/providers/ton.js.map +1 -0
- package/package.json +13 -13
- package/src/commands/manual-exec.ts +18 -6
- package/src/commands/parse.ts +9 -5
- package/src/commands/send.ts +36 -28
- package/src/commands/show.ts +94 -31
- package/src/commands/supported-tokens.ts +6 -9
- package/src/commands/types.ts +3 -2
- package/src/commands/utils.ts +118 -43
- package/src/index.ts +13 -5
- package/src/providers/aptos.ts +3 -5
- package/src/providers/evm.ts +2 -4
- package/src/providers/index.ts +120 -94
- package/src/providers/solana.ts +5 -6
- package/src/providers/sui.ts +15 -0
- package/src/providers/ton.ts +68 -0
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @chainlink/ccip-cli
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## TypeScript CLI to interact with CCIP
|
|
4
4
|
|
|
5
5
|
This tool can be used to query and interact with [CCIP](https://ccip.chain.link) contracts deployed
|
|
6
6
|
in supported blockchains, through its publicly accessible data and methods, requiring only
|
|
@@ -9,6 +9,8 @@ compatible RPCs for each involved network.
|
|
|
9
9
|
> [!IMPORTANT]
|
|
10
10
|
> This tool is provided under an MIT license and is for convenience and illustration purposes only.
|
|
11
11
|
|
|
12
|
+
📖 **[Full Documentation](https://github.com/smartcontractkit/ccip-tools-ts/blob/main/docs/cli/index.md)** - Complete command reference, all options, and troubleshooting guide.
|
|
13
|
+
|
|
12
14
|
## Installation
|
|
13
15
|
|
|
14
16
|
To install it from latest NpmJS release, do:
|
|
@@ -16,7 +18,10 @@ To install it from latest NpmJS release, do:
|
|
|
16
18
|
```sh
|
|
17
19
|
npm install -g @chainlink/ccip-cli
|
|
18
20
|
ccip-cli --help
|
|
19
|
-
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
To run it directly with NPX, do:
|
|
24
|
+
```
|
|
20
25
|
npx @chainlink/ccip-cli --help
|
|
21
26
|
```
|
|
22
27
|
|
|
@@ -33,11 +38,6 @@ alias ccip-cli="$PWD/ccip-cli/ccip-cli" # optional, to run from local repo dire
|
|
|
33
38
|
> [!NOTE]
|
|
34
39
|
> In dev context below, we'll assume you are on `ccip-cli` folder.
|
|
35
40
|
|
|
36
|
-
> [!NOTE]
|
|
37
|
-
> NodeJS version v20+ is required, with v23+ recommended.
|
|
38
|
-
> When running from local folder, it'll try to execute the [src](./src/index.ts) script directly,
|
|
39
|
-
> without an explicit transpilation step. NodeJS v23+ can run `.ts` files directly, while older
|
|
40
|
-
> versions are run with [tsx](https://tsx.is/).
|
|
41
41
|
|
|
42
42
|
## RPCs
|
|
43
43
|
|
|
@@ -52,10 +52,14 @@ with any prefix or suffix (only URLs are parsed).
|
|
|
52
52
|
The default filename is just for compatibility with previous tools, and isn't required to be an
|
|
53
53
|
actual env file. `.txt`, `.csv` or `.json` arrays should work out of the box.
|
|
54
54
|
|
|
55
|
+
|
|
56
|
+
> [!IMPORTANT]
|
|
57
|
+
> We recommend .env files. Do not upload RPCs with your API secrets in the URL to source countrol like github.
|
|
58
|
+
|
|
55
59
|
Example `.env` file:
|
|
56
60
|
|
|
57
61
|
```
|
|
58
|
-
https://
|
|
62
|
+
https://ethereum-sepolia-rpc.publicnode.com
|
|
59
63
|
ARB_SEPOLIA_RPC: https://arbitrum-sepolia.drpc.org
|
|
60
64
|
RPC_AVALANCHE_TESTNET=https://avalanche-fuji-c-chain-rpc.publicnode.com
|
|
61
65
|
https://api.devnet.solana.com # solana devnet public rpc
|
|
@@ -69,7 +73,7 @@ to reply for each network.
|
|
|
69
73
|
|
|
70
74
|
## Wallet
|
|
71
75
|
|
|
72
|
-
Commands which need to send transactions try to get a private key from a `
|
|
76
|
+
Commands which need to send transactions try to get a private key from a `PRIVATE_KEY` environment
|
|
73
77
|
variable.
|
|
74
78
|
|
|
75
79
|
Wallet options can also be passed as `--wallet`, where each chain family may interpret it however it
|
|
@@ -87,8 +91,8 @@ E.g. `--wallet ledger:1` uses derivation `m/44'/60'/1'/0/0` for EVM accounts
|
|
|
87
91
|
|
|
88
92
|
## Chain names and selectors
|
|
89
93
|
|
|
90
|
-
Where required, networks can be referred by name or selector from [chain-selectors](https://github.com/smartcontractkit/chain-selectors).
|
|
91
|
-
ChainIDs
|
|
94
|
+
Where required, networks can be referred by ChainID, name or selector from [chain-selectors](https://github.com/smartcontractkit/chain-selectors).
|
|
95
|
+
ChainIDs depend on the chain family and must be passed using this pattern:
|
|
92
96
|
|
|
93
97
|
- `EVM`: numeric chain id; e.g. `1` for `ethereum-mainnet`.
|
|
94
98
|
- `Solana`: genesis hash; e.g. `5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpKuc147dw2N9d` for `solana-mainnet`
|
|
@@ -105,6 +109,49 @@ ChainIDs follow this pattern:
|
|
|
105
109
|
- `--page=10000`: limits `eth_getLogs` (and others) pagination/scanning ranges (e.g. for RPCs which
|
|
106
110
|
don't support large ranges)
|
|
107
111
|
|
|
112
|
+
### `send`
|
|
113
|
+
|
|
114
|
+
```sh
|
|
115
|
+
ccip-cli send 11155111 0x0BF3dE8c5D3e8A2B34D2BEeB17ABfCeBaf363A59 ethereum-testnet-sepolia-arbitrum-1 \
|
|
116
|
+
--receiver 0xAB4f961939BFE6A93567cC57C59eEd7084CE2131 \
|
|
117
|
+
--data 'hello world' \
|
|
118
|
+
--gas-limit 300000 \
|
|
119
|
+
--fee-token 0x779877A7B0D9E8603169DdbD7836e478b4624789 \
|
|
120
|
+
--transfer-tokens 0xFd57b4ddBf88a4e07fF4e34C487b99af2Fe82a05=0.1
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Sends a message from router on source network, to dest; positional parameters are:
|
|
124
|
+
|
|
125
|
+
1. `source`: chainId or name
|
|
126
|
+
2. `router`: address on source
|
|
127
|
+
3. `dest`: chainId or name
|
|
128
|
+
|
|
129
|
+
If `--receiver` is omitted, sends to self (sender, see [Wallet](#wallet) section above) address on
|
|
130
|
+
dest, if to same chain family (e.g. EVM-to-EVM). If not same chain family, it is mandatory.
|
|
131
|
+
|
|
132
|
+
If `--data` is not a hex-string, it will be UTF-8 encoded.
|
|
133
|
+
|
|
134
|
+
If `--gas-limit` is omitted, ramp default config (usually 200k) is used.
|
|
135
|
+
It can be `0` to disable execution on receiver.
|
|
136
|
+
`--estimate-gas-limit` can be provided instead, to estimate the gas limit for the message execution.
|
|
137
|
+
It receives a percentage margin (e.g. `--estimate-gas-limit=10` for +10% margin), which is added to
|
|
138
|
+
the estimation before sending the message.
|
|
139
|
+
`--only-estimate` prints gas estimation then exits.
|
|
140
|
+
|
|
141
|
+
If `--fee-token` is not provided, CCIP fee will be paid in native token.
|
|
142
|
+
`--only-get-fee` prints CCIP fee then exits.
|
|
143
|
+
|
|
144
|
+
`--transfer-tokens` can receive multiple pairs of `0xTokenAddr=amount` (source token addresses,
|
|
145
|
+
separated by spaces, terminated with `--` if needed). `amount` will be converted using token
|
|
146
|
+
decimals (e.g. 0.1 = 10^5 of the smallest unit for USDC, which is 6 decimals).
|
|
147
|
+
|
|
148
|
+
`--allow-out-of-order-exec` (`--ooo`) is only available on v1.5+ lanes, and opt-out of _sender_
|
|
149
|
+
`nonce` order enforcement. It's useful for destinations where execution can't be guaranteed
|
|
150
|
+
(e.g. zkOverflow), and required for many destinations. You can read about this config [here](https://docs.chain.link/ccip/tutorials/svm/source/token-transfers#understanding-the-configuration-fields).
|
|
151
|
+
|
|
152
|
+
`--approve-max` will approve the maximum possible amount of tokens, if approval is needed for
|
|
153
|
+
either transfer or fee tokens. Default behavior is to approve the strictly needed allowance.
|
|
154
|
+
|
|
108
155
|
### `show` (default command)
|
|
109
156
|
|
|
110
157
|
```sh
|
|
@@ -114,8 +161,8 @@ ccip-cli [show] <request_transaction_hash> [--log-index num]
|
|
|
114
161
|
Receives a transaction containing a `CCIPSendRequested` (<=v1.5) or `CCIPMessageSent` (>=1.6) event.
|
|
115
162
|
Try every available RPC and uses first network to respond with this transaction.
|
|
116
163
|
|
|
117
|
-
If more than one CCIP
|
|
118
|
-
one
|
|
164
|
+
If more than one CCIP message request is present in this transaction, the user is prompted to select
|
|
165
|
+
one from a list, with some basic info on the screen.
|
|
119
166
|
The `--log-index` option allows to pre-select a request non-interactively.
|
|
120
167
|
|
|
121
168
|
If an RPC for dest is also available, scans for the CommitReport for this request, and Execution
|
|
@@ -167,48 +214,6 @@ ccip-cli manualExec 0xafd36a0b99d5457e403c918194cb69cd070d991dcbadc99576acfce502
|
|
|
167
214
|
--clear-leftover-accounts
|
|
168
215
|
```
|
|
169
216
|
|
|
170
|
-
### `send`
|
|
171
|
-
|
|
172
|
-
```sh
|
|
173
|
-
ccip-cli send 11155111 0x0BF3dE8c5D3e8A2B34D2BEeB17ABfCeBaf363A59 ethereum-testnet-sepolia-arbitrum-1 \
|
|
174
|
-
--receiver 0xAB4f961939BFE6A93567cC57C59eEd7084CE2131 \
|
|
175
|
-
--data 'hello world' \
|
|
176
|
-
--gas-limit 300000 \
|
|
177
|
-
--fee-token 0x779877A7B0D9E8603169DdbD7836e478b4624789 \
|
|
178
|
-
--transfer-tokens 0xFd57b4ddBf88a4e07fF4e34C487b99af2Fe82a05=0.1
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
Sends a message from router on source network, to dest; positional parameters are:
|
|
182
|
-
|
|
183
|
-
1. `source`: chainId or name
|
|
184
|
-
2. `router`: address on source
|
|
185
|
-
3. `dest`: chainId or name
|
|
186
|
-
|
|
187
|
-
If `--receiver` is omitted, sends to self (sender, see [Wallet](#wallet) section above) address on
|
|
188
|
-
dest, if to same chain family (e.g. EVM-to-EVM). If not same chain family, it is mandatory.
|
|
189
|
-
|
|
190
|
-
If `--data` is not a hex-string, it will be UTF-8 encoded.
|
|
191
|
-
|
|
192
|
-
If `--gas-limit` is omitted, ramp default config (usually 200k) is used.
|
|
193
|
-
It can be `0` to disable execution on receiver.
|
|
194
|
-
`--estimate-gas-limit` can be provided instead, to estimate the gas limit for the message execution.
|
|
195
|
-
It receives a percentage margin (e.g. `--estimate-gas-limit=10` for +10% margin), which is added to
|
|
196
|
-
the estimation before sending the message.
|
|
197
|
-
`--only-estimate` prints gas estimation then exits.
|
|
198
|
-
|
|
199
|
-
If `--fee-token` is not provided, CCIP fee will be paid in native token.
|
|
200
|
-
`--only-get-fee` prints CCIP fee then exits.
|
|
201
|
-
|
|
202
|
-
`--transfer-tokens` can receive multiple pairs of `0xTokenAddr=amount` (source token addresses,
|
|
203
|
-
separated by spaces, terminated with `--` if needed). `amount` will be converted using token
|
|
204
|
-
decimals (e.g. 0.1 = 10^5 of the smallest unit for USDC, which is 6 decimals).
|
|
205
|
-
|
|
206
|
-
`--allow-out-of-order-exec` (`--ooo`) is only available on v1.5+ lanes, and opt-out of _sender_
|
|
207
|
-
`nonce` order enforcement. It's useful for destinations where execution can't be guaranteed
|
|
208
|
-
(e.g. zkOverflow), and required for many destinations.
|
|
209
|
-
|
|
210
|
-
`--approve-max` will approve the maximum possible amount of tokens, if approval is needed for
|
|
211
|
-
either transfer or fee tokens. Default behavior is to approve the strictly needed allowance.
|
|
212
217
|
|
|
213
218
|
### `parse`
|
|
214
219
|
|
|
@@ -9,7 +9,7 @@ export declare const describe = "Execute manually pending or failed messages";
|
|
|
9
9
|
*/
|
|
10
10
|
export declare const builder: (yargs: Argv) => Argv<import("yargs").Omit<{
|
|
11
11
|
"tx-hash": string;
|
|
12
|
-
}, "wallet" | "log-index" | "gas-limit" | "tokens-gas-limit" | "estimate-gas-limit" | "force-buffer" | "force-lookup-table" | "clear-leftover-accounts" | "sender-queue" | "exec-failed"> & import("yargs").InferredOptionTypes<{
|
|
12
|
+
}, "wallet" | "log-index" | "gas-limit" | "tokens-gas-limit" | "estimate-gas-limit" | "force-buffer" | "force-lookup-table" | "clear-leftover-accounts" | "receiver-object-ids" | "sender-queue" | "exec-failed"> & import("yargs").InferredOptionTypes<{
|
|
13
13
|
'log-index': {
|
|
14
14
|
type: "number";
|
|
15
15
|
describe: string;
|
|
@@ -46,6 +46,12 @@ export declare const builder: (yargs: Argv) => Argv<import("yargs").Omit<{
|
|
|
46
46
|
type: "boolean";
|
|
47
47
|
describe: string;
|
|
48
48
|
};
|
|
49
|
+
'receiver-object-ids': {
|
|
50
|
+
type: "array";
|
|
51
|
+
describe: string;
|
|
52
|
+
string: true;
|
|
53
|
+
example: string;
|
|
54
|
+
};
|
|
49
55
|
'sender-queue': {
|
|
50
56
|
type: "boolean";
|
|
51
57
|
describe: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manual-exec.d.ts","sourceRoot":"","sources":["../../src/commands/manual-exec.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"manual-exec.d.ts","sourceRoot":"","sources":["../../src/commands/manual-exec.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAEjC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAiB7C,eAAO,MAAM,OAAO,yBAAyB,CAAA;AAC7C,eAAO,MAAM,QAAQ,gDAAgD,CAAA;AAErE;;;;GAIG;AACH,eAAO,MAAM,OAAO,GAAI,OAAO,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiE7B,CAAA;AAEN;;;GAGG;AACH,wBAAsB,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,UAAU,iBAW3F"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChainFamily, bigIntReplacer, calculateManualExecProof, discoverOffRamp, estimateExecGasForRequest, } from '@chainlink/ccip-sdk';
|
|
1
|
+
import { CCIPChainFamilyUnsupportedError, CCIPReceiptNotFoundError, ChainFamily, bigIntReplacer, calculateManualExecProof, discoverOffRamp, estimateExecGasForRequest, isSupportedTxHash, } from '@chainlink/ccip-sdk';
|
|
2
2
|
import { Format } from "./types.js";
|
|
3
3
|
import { getCtx, logParsedError, prettyCommit, prettyReceipt, prettyRequest, selectRequest, withDateTimestamp, } from "./utils.js";
|
|
4
4
|
import { fetchChainsFromRpcs, loadChainWallet } from "../providers/index.js";
|
|
@@ -18,6 +18,7 @@ export const builder = (yargs) => yargs
|
|
|
18
18
|
demandOption: true,
|
|
19
19
|
describe: 'transaction hash of the request (source) message',
|
|
20
20
|
})
|
|
21
|
+
.check(({ txHash }) => isSupportedTxHash(txHash))
|
|
21
22
|
.options({
|
|
22
23
|
'log-index': {
|
|
23
24
|
type: 'number',
|
|
@@ -55,6 +56,12 @@ export const builder = (yargs) => yargs
|
|
|
55
56
|
type: 'boolean',
|
|
56
57
|
describe: 'Clears buffers (if a previous attempt was aborted) or any ALT owned by this sender.',
|
|
57
58
|
},
|
|
59
|
+
'receiver-object-ids': {
|
|
60
|
+
type: 'array',
|
|
61
|
+
describe: 'Receiver object IDs for Sui execution (if executing on Sui destination)',
|
|
62
|
+
string: true,
|
|
63
|
+
example: '--receiver-object-ids 0xabc... 0xdef...',
|
|
64
|
+
},
|
|
58
65
|
'sender-queue': {
|
|
59
66
|
type: 'boolean',
|
|
60
67
|
describe: 'Execute all messages in sender queue, starting with the provided tx',
|
|
@@ -71,7 +78,7 @@ export const builder = (yargs) => yargs
|
|
|
71
78
|
* @param argv - Command line arguments.
|
|
72
79
|
*/
|
|
73
80
|
export async function handler(argv) {
|
|
74
|
-
const [
|
|
81
|
+
const [ctx, destroy] = getCtx(argv);
|
|
75
82
|
// argv.senderQueue
|
|
76
83
|
// ? manualExecSenderQueue(providers, argv.tx_hash, argv)
|
|
77
84
|
// : manualExec(argv, destroy$)
|
|
@@ -81,7 +88,7 @@ export async function handler(argv) {
|
|
|
81
88
|
if (!logParsedError.call(ctx, err))
|
|
82
89
|
ctx.logger.error(err);
|
|
83
90
|
})
|
|
84
|
-
.finally(
|
|
91
|
+
.finally(destroy);
|
|
85
92
|
}
|
|
86
93
|
async function manualExec(ctx, argv) {
|
|
87
94
|
const { logger } = ctx;
|
|
@@ -118,18 +125,20 @@ async function manualExec(ctx, argv) {
|
|
|
118
125
|
break;
|
|
119
126
|
}
|
|
120
127
|
const messagesInBatch = await source.fetchAllMessagesInBatch(request, commit.report, argv);
|
|
121
|
-
const execReportProof = calculateManualExecProof(messagesInBatch, request.lane, request.message.
|
|
128
|
+
const execReportProof = calculateManualExecProof(messagesInBatch, request.lane, request.message.messageId, commit.report.merkleRoot, dest);
|
|
122
129
|
const offchainTokenData = await source.fetchOffchainTokenData(request);
|
|
123
130
|
const execReport = {
|
|
124
131
|
...execReportProof,
|
|
125
132
|
message: request.message,
|
|
126
|
-
offchainTokenData
|
|
133
|
+
offchainTokenData,
|
|
127
134
|
};
|
|
128
135
|
if (argv.estimateGasLimit != null &&
|
|
129
136
|
'gasLimit' in request.message &&
|
|
130
137
|
'extraArgs' in request.message) {
|
|
131
138
|
if (dest.network.family !== ChainFamily.EVM)
|
|
132
|
-
throw new
|
|
139
|
+
throw new CCIPChainFamilyUnsupportedError(dest.network.family, {
|
|
140
|
+
context: { feature: 'gas estimation' },
|
|
141
|
+
});
|
|
133
142
|
let estimated = await estimateExecGasForRequest(source, dest, request);
|
|
134
143
|
logger.info('Estimated gasLimit override:', estimated);
|
|
135
144
|
estimated += Math.ceil((estimated * argv.estimateGasLimit) / 100);
|
|
@@ -167,7 +176,7 @@ async function manualExec(ctx, argv) {
|
|
|
167
176
|
found = true;
|
|
168
177
|
}
|
|
169
178
|
if (!found)
|
|
170
|
-
throw new
|
|
179
|
+
throw new CCIPReceiptNotFoundError(manualExecTx.hash);
|
|
171
180
|
}
|
|
172
181
|
/*
|
|
173
182
|
export async function manualExecSenderQueue(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manual-exec.js","sourceRoot":"","sources":["../../src/commands/manual-exec.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,WAAW,EACX,cAAc,EAC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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6OE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../src/commands/parse.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../src/commands/parse.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAEjC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAI7C,eAAO,MAAM,OAAO,UAA4D,CAAA;AAChF,eAAO,MAAM,QAAQ,iFAC2D,CAAA;AAEhF;;;;GAIG;AACH,eAAO,MAAM,OAAO,GAAI,OAAO,IAAI;;EAK/B,CAAA;AAEJ;;;GAGG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,UAAU,QAQrF"}
|
package/dist/commands/parse.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { bigIntReplacer, supportedChains } from '@chainlink/ccip-sdk';
|
|
1
|
+
import { CCIPDataParseError, bigIntReplacer, supportedChains, } from '@chainlink/ccip-sdk';
|
|
2
2
|
import { Format } from "./types.js";
|
|
3
|
-
import { getCtx, prettyTable } from "./utils.js";
|
|
3
|
+
import { getCtx, logParsedError, prettyTable } from "./utils.js";
|
|
4
4
|
export const command = ['parse <data>', 'parseBytes <data>', 'parseData <data>'];
|
|
5
5
|
export const describe = 'Try to parse and print errors, revert reasons or function call or event data';
|
|
6
6
|
/**
|
|
@@ -18,13 +18,14 @@ export const builder = (yargs) => yargs.positional('data', {
|
|
|
18
18
|
* @param argv - Command line arguments.
|
|
19
19
|
*/
|
|
20
20
|
export function handler(argv) {
|
|
21
|
-
const [
|
|
21
|
+
const [ctx] = getCtx(argv);
|
|
22
22
|
try {
|
|
23
23
|
parseBytes(ctx, argv);
|
|
24
24
|
}
|
|
25
25
|
catch (err) {
|
|
26
26
|
process.exitCode = 1;
|
|
27
|
-
|
|
27
|
+
if (!logParsedError.call(ctx, err))
|
|
28
|
+
ctx.logger.error(err);
|
|
28
29
|
}
|
|
29
30
|
}
|
|
30
31
|
function parseBytes(ctx, argv) {
|
|
@@ -41,7 +42,7 @@ function parseBytes(ctx, argv) {
|
|
|
41
42
|
}
|
|
42
43
|
}
|
|
43
44
|
if (!parsed)
|
|
44
|
-
throw new
|
|
45
|
+
throw new CCIPDataParseError(argv.data);
|
|
45
46
|
switch (argv.format) {
|
|
46
47
|
case Format.log: {
|
|
47
48
|
logger.log(`parsed =`, parsed);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse.js","sourceRoot":"","sources":["../../src/commands/parse.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"parse.js","sourceRoot":"","sources":["../../src/commands/parse.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,eAAe,GAChB,MAAM,kCAAkC,CAAA;AAIzC,OAAO,EAAY,MAAM,EAAE,MAAM,YAAY,CAAA;AAC7C,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAEhE,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,cAAc,EAAE,mBAAmB,EAAE,kBAAkB,CAAC,CAAA;AAChF,MAAM,CAAC,MAAM,QAAQ,GACnB,8EAA8E,CAAA;AAEhF;;;;GAIG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,KAAW,EAAE,EAAE,CACrC,KAAK,CAAC,UAAU,CAAC,MAAM,EAAE;IACvB,IAAI,EAAE,QAAQ;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A;YAC7B,MAAK;QACP,KAAK,MAAM,CAAC,IAAI;YACd,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,CAAA;YACtD,MAAK;IACT,CAAC;AACH,CAAC"}
|
package/dist/commands/send.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export declare const builder: (yargs: Argv) => Argv<import("yargs").Omit<{
|
|
|
13
13
|
router: string;
|
|
14
14
|
} & {
|
|
15
15
|
dest: string;
|
|
16
|
-
}, "data" | "receiver" | "
|
|
16
|
+
}, "data" | "receiver" | "wallet" | "account" | "gas-limit" | "estimate-gas-limit" | "wait" | "allow-out-of-order-exec" | "fee-token" | "transfer-tokens" | "token-receiver" | "only-get-fee" | "only-estimate" | "approve-max"> & import("yargs").InferredOptionTypes<{
|
|
17
17
|
receiver: {
|
|
18
18
|
alias: string;
|
|
19
19
|
type: "string";
|
|
@@ -80,6 +80,11 @@ export declare const builder: (yargs: Argv) => Argv<import("yargs").Omit<{
|
|
|
80
80
|
type: "boolean";
|
|
81
81
|
describe: string;
|
|
82
82
|
};
|
|
83
|
+
wait: {
|
|
84
|
+
type: "boolean";
|
|
85
|
+
default: boolean;
|
|
86
|
+
describe: string;
|
|
87
|
+
};
|
|
83
88
|
}>>;
|
|
84
89
|
/**
|
|
85
90
|
* Handler for the send command.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"send.d.ts","sourceRoot":"","sources":["../../src/commands/send.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"send.d.ts","sourceRoot":"","sources":["../../src/commands/send.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAEjC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAM7C,eAAO,MAAM,OAAO,kCAAkC,CAAA;AACtD,eAAO,MAAM,QAAQ,sDAAsD,CAAA;AAE3E;;;;GAIG;AACH,eAAO,MAAM,OAAO,GAAI,OAAO,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuG9B,CAAA;AAEL;;;GAGG;AACH,wBAAsB,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,UAAU,iBAQ3F"}
|
package/dist/commands/send.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CCIPArgumentInvalidError, CCIPChainFamilyUnsupportedError, CCIPTokenNotFoundError, ChainFamily, estimateExecGasForRequest, getDataBytes, networkInfo, sourceToDestTokenAmounts, } from '@chainlink/ccip-sdk';
|
|
2
2
|
import { dataLength, formatUnits, toUtf8Bytes } from 'ethers';
|
|
3
|
-
import {
|
|
4
|
-
import { getCtx, logParsedError, parseTokenAmounts
|
|
3
|
+
import { showRequests } from "./show.js";
|
|
4
|
+
import { getCtx, logParsedError, parseTokenAmounts } from "./utils.js";
|
|
5
5
|
import { fetchChainsFromRpcs, loadChainWallet } from "../providers/index.js";
|
|
6
6
|
export const command = 'send <source> <router> <dest>';
|
|
7
7
|
export const describe = 'Send a CCIP message from router on source to dest';
|
|
@@ -95,6 +95,11 @@ export const builder = (yargs) => yargs
|
|
|
95
95
|
type: 'boolean',
|
|
96
96
|
describe: "Approve the maximum amount of tokens to transfer; default=false approves only what's needed",
|
|
97
97
|
},
|
|
98
|
+
wait: {
|
|
99
|
+
type: 'boolean',
|
|
100
|
+
default: false,
|
|
101
|
+
describe: 'Wait for execution',
|
|
102
|
+
},
|
|
98
103
|
})
|
|
99
104
|
.check(({ 'transfer-tokens': transferTokens }) => !transferTokens || transferTokens.every((t) => /^[^=]+=\d+(\.\d+)?$/.test(t)));
|
|
100
105
|
/**
|
|
@@ -102,14 +107,14 @@ export const builder = (yargs) => yargs
|
|
|
102
107
|
* @param argv - Command line arguments.
|
|
103
108
|
*/
|
|
104
109
|
export async function handler(argv) {
|
|
105
|
-
const [
|
|
110
|
+
const [ctx, destroy] = getCtx(argv);
|
|
106
111
|
return sendMessage(ctx, argv)
|
|
107
112
|
.catch((err) => {
|
|
108
113
|
process.exitCode = 1;
|
|
109
114
|
if (!logParsedError.call(ctx, err))
|
|
110
115
|
ctx.logger.error(err);
|
|
111
116
|
})
|
|
112
|
-
.finally(
|
|
117
|
+
.finally(destroy);
|
|
113
118
|
}
|
|
114
119
|
async function sendMessage(ctx, argv) {
|
|
115
120
|
const { logger } = ctx;
|
|
@@ -147,7 +152,7 @@ async function sendMessage(ctx, argv) {
|
|
|
147
152
|
receiver = '11111111111111111111111111111111';
|
|
148
153
|
}
|
|
149
154
|
else {
|
|
150
|
-
throw new
|
|
155
|
+
throw new CCIPArgumentInvalidError('token-receiver', 'required when sending tokens with data to Solana');
|
|
151
156
|
}
|
|
152
157
|
if (argv.account) {
|
|
153
158
|
accounts = argv.account.map((account, i) => {
|
|
@@ -162,19 +167,21 @@ async function sendMessage(ctx, argv) {
|
|
|
162
167
|
accounts = [];
|
|
163
168
|
}
|
|
164
169
|
else if (argv.tokenReceiver || argv.account?.length) {
|
|
165
|
-
throw new
|
|
170
|
+
throw new CCIPArgumentInvalidError('token-receiver/account', 'only valid for Solana destination');
|
|
166
171
|
}
|
|
167
172
|
let walletAddress, wallet;
|
|
168
173
|
if (!receiver) {
|
|
169
174
|
if (sourceNetwork.family !== destNetwork.family)
|
|
170
|
-
throw new
|
|
175
|
+
throw new CCIPArgumentInvalidError('receiver', 'required for cross-family transfers');
|
|
171
176
|
[walletAddress, wallet] = await loadChainWallet(source, argv);
|
|
172
177
|
receiver = walletAddress; // send to self if same family
|
|
173
178
|
}
|
|
174
179
|
if (argv.estimateGasLimit != null || argv.onlyEstimate) {
|
|
175
180
|
// TODO: implement for all chain families
|
|
176
181
|
if (destNetwork.family !== ChainFamily.EVM)
|
|
177
|
-
throw new
|
|
182
|
+
throw new CCIPChainFamilyUnsupportedError(destNetwork.family, {
|
|
183
|
+
context: { feature: 'gas estimation' },
|
|
184
|
+
});
|
|
178
185
|
const dest = (await getChain(destNetwork.chainSelector));
|
|
179
186
|
const onRamp = await source.getOnRampForRouter(argv.router, destNetwork.chainSelector);
|
|
180
187
|
const lane = {
|
|
@@ -229,7 +236,7 @@ async function sendMessage(ctx, argv) {
|
|
|
229
236
|
break;
|
|
230
237
|
}
|
|
231
238
|
if (!feeTokenInfo)
|
|
232
|
-
throw new
|
|
239
|
+
throw new CCIPTokenNotFoundError(argv.feeToken);
|
|
233
240
|
}
|
|
234
241
|
}
|
|
235
242
|
else {
|
|
@@ -255,17 +262,15 @@ async function sendMessage(ctx, argv) {
|
|
|
255
262
|
const request = await source.sendMessage(argv.router, destNetwork.chainSelector, { ...message, fee }, { ...argv, wallet });
|
|
256
263
|
logger.info('🚀 Sending message to', tokenReceiver && tokenReceiver !== '11111111111111111111111111111111'
|
|
257
264
|
? tokenReceiver
|
|
258
|
-
: receiver, '@', destNetwork.name, ', tx =>', request.tx.hash, ', messageId =>', request.message.
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
break;
|
|
269
|
-
}
|
|
265
|
+
: receiver, '@', destNetwork.name, ', tx =>', request.tx.hash, ', messageId =>', request.message.messageId);
|
|
266
|
+
await showRequests(ctx, {
|
|
267
|
+
...argv,
|
|
268
|
+
txHash: request.tx.hash,
|
|
269
|
+
'tx-hash': request.tx.hash,
|
|
270
|
+
'id-from-source': undefined,
|
|
271
|
+
idFromSource: undefined,
|
|
272
|
+
'log-index': undefined,
|
|
273
|
+
logIndex: undefined,
|
|
274
|
+
});
|
|
270
275
|
}
|
|
271
276
|
//# sourceMappingURL=send.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"send.js","sourceRoot":"","sources":["../../src/commands/send.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,WAAW,EACX,
|
|
1
|
+
{"version":3,"file":"send.js","sourceRoot":"","sources":["../../src/commands/send.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,wBAAwB,EACxB,+BAA+B,EAC/B,sBAAsB,EACtB,WAAW,EACX,yBAAyB,EACzB,YAAY,EACZ,WAAW,EACX,wBAAwB,GACzB,MAAM,kCAAkC,CAAA;AACzC,OAAO,EAAkB,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAA;AAI7E,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAExC,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AACtE,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAE5E,MAAM,CAAC,MAAM,OAAO,GAAG,+BAA+B,CAAA;AACtD,MAAM,CAAC,MAAM,QAAQ,GAAG,mDAAmD,CAAA;AAE3E;;;;GAIG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,KAAW,EAAE,EAAE,CACrC,KAAK;KACF,UAAU,CAAC,QAAQ,EAAE;IACpB,IAAI,EAAE,QAAQ;IACd,YAAY,EAAE,IAAI;IAClB,QAAQ,EAAE,iCAAiC;IAC3C,OAAO,EAAE,0BAA0B;CACpC,CAAC;KACD,UAAU,CAAC,QAAQ,EAAE;IACpB,IAAI,EAAE,QAAQ;IACd,YAAY,EAAE,IAAI;IAClB,QAAQ,EAAE,mCAAmC;CAC9C,CAAC;KACD,UAAU,CAAC,MAAM,EAAE;IAClB,IAAI,EAAE,QAAQ;IACd,YAAY,EAAE,IAAI;IAClB,QAAQ,EAAE,sCAAsC;IAChD,OAAO,EAAE,qCAAqC;CAC/C,CAAC;KACD,OAAO,CAAC;IACP,QAAQ,EAAE;QACR,KAAK,EAAE,GAAG;QACV,IAAI,EAAE,QAAQ;QACd,QAAQ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AAG,EACH,WAAW,CAAC,IAAI,EAChB,SAAS,EACT,OAAO,CAAC,EAAE,CAAC,IAAI,EACf,gBAAgB,EAChB,OAAO,CAAC,OAAO,CAAC,SAAS,CAC1B,CAAA;IAED,MAAM,YAAY,CAAC,GAAG,EAAE;QACtB,GAAG,IAAI;QACP,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC,IAAI;QACvB,SAAS,EAAE,OAAO,CAAC,EAAE,CAAC,IAAI;QAC1B,gBAAgB,EAAE,SAAS;QAC3B,YAAY,EAAE,SAAS;QACvB,WAAW,EAAE,SAAS;QACtB,QAAQ,EAAE,SAAS;KACpB,CAAC,CAAA;AACJ,CAAC"}
|
package/dist/commands/show.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Argv } from 'yargs';
|
|
2
2
|
import type { GlobalOpts } from '../index.ts';
|
|
3
|
+
import { type Ctx } from './types.ts';
|
|
3
4
|
export declare const command: string[];
|
|
4
5
|
export declare const describe = "Show details of a CCIP request";
|
|
5
6
|
/**
|
|
@@ -9,7 +10,7 @@ export declare const describe = "Show details of a CCIP request";
|
|
|
9
10
|
*/
|
|
10
11
|
export declare const builder: (yargs: Argv) => Argv<import("yargs").Omit<{
|
|
11
12
|
"tx-hash": string;
|
|
12
|
-
}, "log-index" | "id-from-source"> & import("yargs").InferredOptionTypes<{
|
|
13
|
+
}, "log-index" | "id-from-source" | "wait"> & import("yargs").InferredOptionTypes<{
|
|
13
14
|
'log-index': {
|
|
14
15
|
type: "number";
|
|
15
16
|
describe: string;
|
|
@@ -18,10 +19,18 @@ export declare const builder: (yargs: Argv) => Argv<import("yargs").Omit<{
|
|
|
18
19
|
type: "string";
|
|
19
20
|
describe: string;
|
|
20
21
|
};
|
|
22
|
+
wait: {
|
|
23
|
+
type: "boolean";
|
|
24
|
+
describe: string;
|
|
25
|
+
};
|
|
21
26
|
}>>;
|
|
22
27
|
/**
|
|
23
28
|
* Handler for the show command.
|
|
24
29
|
* @param argv - Command line arguments.
|
|
25
30
|
*/
|
|
26
31
|
export declare function handler(argv: Awaited<ReturnType<typeof builder>['argv']> & GlobalOpts): Promise<void>;
|
|
32
|
+
/**
|
|
33
|
+
* Show details of a request.
|
|
34
|
+
*/
|
|
35
|
+
export declare function showRequests(ctx: Ctx, argv: Parameters<typeof handler>[0]): Promise<void>;
|
|
27
36
|
//# sourceMappingURL=show.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"show.d.ts","sourceRoot":"","sources":["../../src/commands/show.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"show.d.ts","sourceRoot":"","sources":["../../src/commands/show.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAEjC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAC7C,OAAO,EAAE,KAAK,GAAG,EAAU,MAAM,YAAY,CAAA;AAa7C,eAAO,MAAM,OAAO,UAAoC,CAAA;AACxD,eAAO,MAAM,QAAQ,mCAAmC,CAAA;AAExD;;;;GAIG;AACH,eAAO,MAAM,OAAO,GAAI,OAAO,IAAI;;;;;;;;;;;;;;;GAuB7B,CAAA;AAEN;;;GAGG;AACH,wBAAsB,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,UAAU,iBAQ3F;AAED;;GAEG;AACH,wBAAsB,YAAY,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,CAAC,OAAO,OAAO,CAAC,CAAC,CAAC,CAAC,iBAwI/E"}
|