@chainlink/ccip-sdk 0.0.0 → 0.90.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.
Files changed (319) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +109 -0
  3. package/dist/aptos/exec.d.ts +18 -0
  4. package/dist/aptos/exec.d.ts.map +1 -0
  5. package/dist/aptos/exec.js +55 -0
  6. package/dist/aptos/exec.js.map +1 -0
  7. package/dist/aptos/hasher.d.ts +11 -0
  8. package/dist/aptos/hasher.d.ts.map +1 -0
  9. package/dist/aptos/hasher.js +62 -0
  10. package/dist/aptos/hasher.js.map +1 -0
  11. package/dist/aptos/index.d.ts +92 -0
  12. package/dist/aptos/index.d.ts.map +1 -0
  13. package/dist/aptos/index.js +482 -0
  14. package/dist/aptos/index.js.map +1 -0
  15. package/dist/aptos/logs.d.ts +9 -0
  16. package/dist/aptos/logs.d.ts.map +1 -0
  17. package/dist/aptos/logs.js +167 -0
  18. package/dist/aptos/logs.js.map +1 -0
  19. package/dist/aptos/send.d.ts +11 -0
  20. package/dist/aptos/send.d.ts.map +1 -0
  21. package/dist/aptos/send.js +78 -0
  22. package/dist/aptos/send.js.map +1 -0
  23. package/dist/aptos/token.d.ts +4 -0
  24. package/dist/aptos/token.d.ts.map +1 -0
  25. package/dist/aptos/token.js +134 -0
  26. package/dist/aptos/token.js.map +1 -0
  27. package/dist/aptos/types.d.ts +78 -0
  28. package/dist/aptos/types.d.ts.map +1 -0
  29. package/dist/aptos/types.js +60 -0
  30. package/dist/aptos/types.js.map +1 -0
  31. package/dist/aptos/utils.d.ts +12 -0
  32. package/dist/aptos/utils.d.ts.map +1 -0
  33. package/dist/aptos/utils.js +15 -0
  34. package/dist/aptos/utils.js.map +1 -0
  35. package/dist/chain.d.ts +344 -0
  36. package/dist/chain.d.ts.map +1 -0
  37. package/dist/chain.js +41 -0
  38. package/dist/chain.js.map +1 -0
  39. package/dist/commits.d.ts +25 -0
  40. package/dist/commits.d.ts.map +1 -0
  41. package/dist/commits.js +29 -0
  42. package/dist/commits.js.map +1 -0
  43. package/dist/evm/abi/BurnMintERC677Token.d.ts +602 -0
  44. package/dist/evm/abi/BurnMintERC677Token.d.ts.map +1 -0
  45. package/dist/evm/abi/BurnMintERC677Token.js +488 -0
  46. package/dist/evm/abi/BurnMintERC677Token.js.map +1 -0
  47. package/dist/evm/abi/CommitStore_1_2.d.ts +688 -0
  48. package/dist/evm/abi/CommitStore_1_2.d.ts.map +1 -0
  49. package/dist/evm/abi/CommitStore_1_2.js +638 -0
  50. package/dist/evm/abi/CommitStore_1_2.js.map +1 -0
  51. package/dist/evm/abi/CommitStore_1_5.d.ts +708 -0
  52. package/dist/evm/abi/CommitStore_1_5.d.ts.map +1 -0
  53. package/dist/evm/abi/CommitStore_1_5.js +675 -0
  54. package/dist/evm/abi/CommitStore_1_5.js.map +1 -0
  55. package/dist/evm/abi/FeeQuoter_1_6.d.ts +1770 -0
  56. package/dist/evm/abi/FeeQuoter_1_6.d.ts.map +1 -0
  57. package/dist/evm/abi/FeeQuoter_1_6.js +1904 -0
  58. package/dist/evm/abi/FeeQuoter_1_6.js.map +1 -0
  59. package/dist/evm/abi/LockReleaseTokenPool_1_5.d.ts +1116 -0
  60. package/dist/evm/abi/LockReleaseTokenPool_1_5.d.ts.map +1 -0
  61. package/dist/evm/abi/LockReleaseTokenPool_1_5.js +1096 -0
  62. package/dist/evm/abi/LockReleaseTokenPool_1_5.js.map +1 -0
  63. package/dist/evm/abi/LockReleaseTokenPool_1_5_1.d.ts +1306 -0
  64. package/dist/evm/abi/LockReleaseTokenPool_1_5_1.d.ts.map +1 -0
  65. package/dist/evm/abi/LockReleaseTokenPool_1_5_1.js +1278 -0
  66. package/dist/evm/abi/LockReleaseTokenPool_1_5_1.js.map +1 -0
  67. package/dist/evm/abi/LockReleaseTokenPool_1_6_1.d.ts +1290 -0
  68. package/dist/evm/abi/LockReleaseTokenPool_1_6_1.d.ts.map +1 -0
  69. package/dist/evm/abi/LockReleaseTokenPool_1_6_1.js +1288 -0
  70. package/dist/evm/abi/LockReleaseTokenPool_1_6_1.js.map +1 -0
  71. package/dist/evm/abi/OffRamp_1_2.d.ts +1217 -0
  72. package/dist/evm/abi/OffRamp_1_2.d.ts.map +1 -0
  73. package/dist/evm/abi/OffRamp_1_2.js +1204 -0
  74. package/dist/evm/abi/OffRamp_1_2.js.map +1 -0
  75. package/dist/evm/abi/OffRamp_1_5.d.ts +1271 -0
  76. package/dist/evm/abi/OffRamp_1_5.d.ts.map +1 -0
  77. package/dist/evm/abi/OffRamp_1_5.js +1273 -0
  78. package/dist/evm/abi/OffRamp_1_5.js.map +1 -0
  79. package/dist/evm/abi/OffRamp_1_6.d.ts +1472 -0
  80. package/dist/evm/abi/OffRamp_1_6.d.ts.map +1 -0
  81. package/dist/evm/abi/OffRamp_1_6.js +1529 -0
  82. package/dist/evm/abi/OffRamp_1_6.js.map +1 -0
  83. package/dist/evm/abi/OnRamp_1_2.d.ts +1391 -0
  84. package/dist/evm/abi/OnRamp_1_2.d.ts.map +1 -0
  85. package/dist/evm/abi/OnRamp_1_2.js +1343 -0
  86. package/dist/evm/abi/OnRamp_1_2.js.map +1 -0
  87. package/dist/evm/abi/OnRamp_1_5.d.ts +1443 -0
  88. package/dist/evm/abi/OnRamp_1_5.d.ts.map +1 -0
  89. package/dist/evm/abi/OnRamp_1_5.js +1427 -0
  90. package/dist/evm/abi/OnRamp_1_5.js.map +1 -0
  91. package/dist/evm/abi/OnRamp_1_6.d.ts +796 -0
  92. package/dist/evm/abi/OnRamp_1_6.d.ts.map +1 -0
  93. package/dist/evm/abi/OnRamp_1_6.js +880 -0
  94. package/dist/evm/abi/OnRamp_1_6.js.map +1 -0
  95. package/dist/evm/abi/Router.d.ts +541 -0
  96. package/dist/evm/abi/Router.d.ts.map +1 -0
  97. package/dist/evm/abi/Router.js +508 -0
  98. package/dist/evm/abi/Router.js.map +1 -0
  99. package/dist/evm/abi/TokenAdminRegistry_1_5.d.ts +373 -0
  100. package/dist/evm/abi/TokenAdminRegistry_1_5.d.ts.map +1 -0
  101. package/dist/evm/abi/TokenAdminRegistry_1_5.js +333 -0
  102. package/dist/evm/abi/TokenAdminRegistry_1_5.js.map +1 -0
  103. package/dist/evm/const.d.ts +27 -0
  104. package/dist/evm/const.d.ts.map +1 -0
  105. package/dist/evm/const.js +63 -0
  106. package/dist/evm/const.js.map +1 -0
  107. package/dist/evm/errors.d.ts +36 -0
  108. package/dist/evm/errors.d.ts.map +1 -0
  109. package/dist/evm/errors.js +192 -0
  110. package/dist/evm/errors.js.map +1 -0
  111. package/dist/evm/hasher.d.ts +5 -0
  112. package/dist/evm/hasher.d.ts.map +1 -0
  113. package/dist/evm/hasher.js +116 -0
  114. package/dist/evm/hasher.js.map +1 -0
  115. package/dist/evm/index.d.ts +121 -0
  116. package/dist/evm/index.d.ts.map +1 -0
  117. package/dist/evm/index.js +904 -0
  118. package/dist/evm/index.js.map +1 -0
  119. package/dist/evm/messages.d.ts +35 -0
  120. package/dist/evm/messages.d.ts.map +1 -0
  121. package/dist/evm/messages.js +11 -0
  122. package/dist/evm/messages.js.map +1 -0
  123. package/dist/evm/offchain.d.ts +16 -0
  124. package/dist/evm/offchain.d.ts.map +1 -0
  125. package/dist/evm/offchain.js +142 -0
  126. package/dist/evm/offchain.js.map +1 -0
  127. package/dist/execution.d.ts +80 -0
  128. package/dist/execution.d.ts.map +1 -0
  129. package/dist/execution.js +91 -0
  130. package/dist/execution.js.map +1 -0
  131. package/dist/extra-args.d.ts +45 -0
  132. package/dist/extra-args.d.ts.map +1 -0
  133. package/dist/extra-args.js +44 -0
  134. package/dist/extra-args.js.map +1 -0
  135. package/dist/gas.d.ts +27 -0
  136. package/dist/gas.d.ts.map +1 -0
  137. package/dist/gas.js +80 -0
  138. package/dist/gas.js.map +1 -0
  139. package/dist/hasher/common.d.ts +12 -0
  140. package/dist/hasher/common.d.ts.map +1 -0
  141. package/dist/hasher/common.js +19 -0
  142. package/dist/hasher/common.js.map +1 -0
  143. package/dist/hasher/hasher.d.ts +4 -0
  144. package/dist/hasher/hasher.d.ts.map +1 -0
  145. package/dist/hasher/hasher.js +11 -0
  146. package/dist/hasher/hasher.js.map +1 -0
  147. package/dist/hasher/index.d.ts +4 -0
  148. package/dist/hasher/index.d.ts.map +1 -0
  149. package/dist/hasher/index.js +4 -0
  150. package/dist/hasher/index.js.map +1 -0
  151. package/dist/hasher/merklemulti.d.ts +58 -0
  152. package/dist/hasher/merklemulti.d.ts.map +1 -0
  153. package/dist/hasher/merklemulti.js +257 -0
  154. package/dist/hasher/merklemulti.js.map +1 -0
  155. package/dist/index.d.ts +13 -0
  156. package/dist/index.d.ts.map +1 -0
  157. package/dist/index.js +13 -0
  158. package/dist/index.js.map +1 -0
  159. package/dist/offchain.d.ts +20 -0
  160. package/dist/offchain.d.ts.map +1 -0
  161. package/dist/offchain.js +59 -0
  162. package/dist/offchain.js.map +1 -0
  163. package/dist/requests.d.ts +48 -0
  164. package/dist/requests.d.ts.map +1 -0
  165. package/dist/requests.js +286 -0
  166. package/dist/requests.js.map +1 -0
  167. package/dist/selectors.d.ts +9 -0
  168. package/dist/selectors.d.ts.map +1 -0
  169. package/dist/selectors.js +1330 -0
  170. package/dist/selectors.js.map +1 -0
  171. package/dist/solana/cleanup.d.ts +15 -0
  172. package/dist/solana/cleanup.d.ts.map +1 -0
  173. package/dist/solana/cleanup.js +159 -0
  174. package/dist/solana/cleanup.js.map +1 -0
  175. package/dist/solana/exec.d.ts +15 -0
  176. package/dist/solana/exec.d.ts.map +1 -0
  177. package/dist/solana/exec.js +417 -0
  178. package/dist/solana/exec.js.map +1 -0
  179. package/dist/solana/hasher.d.ts +4 -0
  180. package/dist/solana/hasher.d.ts.map +1 -0
  181. package/dist/solana/hasher.js +81 -0
  182. package/dist/solana/hasher.js.map +1 -0
  183. package/dist/solana/idl/1.6.0/BASE_TOKEN_POOL.d.ts +866 -0
  184. package/dist/solana/idl/1.6.0/BASE_TOKEN_POOL.d.ts.map +1 -0
  185. package/dist/solana/idl/1.6.0/BASE_TOKEN_POOL.js +866 -0
  186. package/dist/solana/idl/1.6.0/BASE_TOKEN_POOL.js.map +1 -0
  187. package/dist/solana/idl/1.6.0/BURN_MINT_TOKEN_POOL.d.ts +949 -0
  188. package/dist/solana/idl/1.6.0/BURN_MINT_TOKEN_POOL.d.ts.map +1 -0
  189. package/dist/solana/idl/1.6.0/BURN_MINT_TOKEN_POOL.js +949 -0
  190. package/dist/solana/idl/1.6.0/BURN_MINT_TOKEN_POOL.js.map +1 -0
  191. package/dist/solana/idl/1.6.0/CCIP_CCTP_TOKEN_POOL.d.ts +1374 -0
  192. package/dist/solana/idl/1.6.0/CCIP_CCTP_TOKEN_POOL.d.ts.map +1 -0
  193. package/dist/solana/idl/1.6.0/CCIP_CCTP_TOKEN_POOL.js +1374 -0
  194. package/dist/solana/idl/1.6.0/CCIP_CCTP_TOKEN_POOL.js.map +1 -0
  195. package/dist/solana/idl/1.6.0/CCIP_COMMON.d.ts +104 -0
  196. package/dist/solana/idl/1.6.0/CCIP_COMMON.d.ts.map +1 -0
  197. package/dist/solana/idl/1.6.0/CCIP_COMMON.js +104 -0
  198. package/dist/solana/idl/1.6.0/CCIP_COMMON.js.map +1 -0
  199. package/dist/solana/idl/1.6.0/CCIP_OFFRAMP.d.ts +2746 -0
  200. package/dist/solana/idl/1.6.0/CCIP_OFFRAMP.d.ts.map +1 -0
  201. package/dist/solana/idl/1.6.0/CCIP_OFFRAMP.js +2746 -0
  202. package/dist/solana/idl/1.6.0/CCIP_OFFRAMP.js.map +1 -0
  203. package/dist/solana/idl/1.6.0/CCIP_ROUTER.d.ts +2332 -0
  204. package/dist/solana/idl/1.6.0/CCIP_ROUTER.d.ts.map +1 -0
  205. package/dist/solana/idl/1.6.0/CCIP_ROUTER.js +2332 -0
  206. package/dist/solana/idl/1.6.0/CCIP_ROUTER.js.map +1 -0
  207. package/dist/solana/index.d.ts +205 -0
  208. package/dist/solana/index.d.ts.map +1 -0
  209. package/dist/solana/index.js +1085 -0
  210. package/dist/solana/index.js.map +1 -0
  211. package/dist/solana/offchain.d.ts +31 -0
  212. package/dist/solana/offchain.d.ts.map +1 -0
  213. package/dist/solana/offchain.js +152 -0
  214. package/dist/solana/offchain.js.map +1 -0
  215. package/dist/solana/patchBorsh.d.ts +2 -0
  216. package/dist/solana/patchBorsh.d.ts.map +1 -0
  217. package/dist/solana/patchBorsh.js +60 -0
  218. package/dist/solana/patchBorsh.js.map +1 -0
  219. package/dist/solana/send.d.ts +14 -0
  220. package/dist/solana/send.d.ts.map +1 -0
  221. package/dist/solana/send.js +272 -0
  222. package/dist/solana/send.js.map +1 -0
  223. package/dist/solana/types.d.ts +4 -0
  224. package/dist/solana/types.d.ts.map +1 -0
  225. package/dist/solana/types.js +2 -0
  226. package/dist/solana/types.js.map +1 -0
  227. package/dist/solana/utils.d.ts +58 -0
  228. package/dist/solana/utils.d.ts.map +1 -0
  229. package/dist/solana/utils.js +211 -0
  230. package/dist/solana/utils.js.map +1 -0
  231. package/dist/sui/hasher.d.ts +12 -0
  232. package/dist/sui/hasher.d.ts.map +1 -0
  233. package/dist/sui/hasher.js +63 -0
  234. package/dist/sui/hasher.js.map +1 -0
  235. package/dist/sui/index.d.ts +72 -0
  236. package/dist/sui/index.d.ts.map +1 -0
  237. package/dist/sui/index.js +128 -0
  238. package/dist/sui/index.js.map +1 -0
  239. package/dist/sui/types.d.ts +17 -0
  240. package/dist/sui/types.d.ts.map +1 -0
  241. package/dist/sui/types.js +17 -0
  242. package/dist/sui/types.js.map +1 -0
  243. package/dist/supported-chains.d.ts +5 -0
  244. package/dist/supported-chains.d.ts.map +1 -0
  245. package/dist/supported-chains.js +3 -0
  246. package/dist/supported-chains.js.map +1 -0
  247. package/dist/types.d.ts +118 -0
  248. package/dist/types.d.ts.map +1 -0
  249. package/dist/types.js +11 -0
  250. package/dist/types.js.map +1 -0
  251. package/dist/utils.d.ts +117 -0
  252. package/dist/utils.d.ts.map +1 -0
  253. package/dist/utils.js +336 -0
  254. package/dist/utils.js.map +1 -0
  255. package/package.json +66 -8
  256. package/src/aptos/exec.ts +69 -0
  257. package/src/aptos/hasher.ts +92 -0
  258. package/src/aptos/index.ts +660 -0
  259. package/src/aptos/logs.ts +210 -0
  260. package/src/aptos/send.ts +120 -0
  261. package/src/aptos/token.ts +150 -0
  262. package/src/aptos/types.ts +85 -0
  263. package/src/aptos/utils.ts +24 -0
  264. package/src/chain.ts +398 -0
  265. package/src/commits.ts +44 -0
  266. package/src/evm/abi/BurnMintERC677Token.ts +487 -0
  267. package/src/evm/abi/CommitStore_1_2.ts +637 -0
  268. package/src/evm/abi/CommitStore_1_5.ts +674 -0
  269. package/src/evm/abi/FeeQuoter_1_6.ts +1903 -0
  270. package/src/evm/abi/LockReleaseTokenPool_1_5.ts +1095 -0
  271. package/src/evm/abi/LockReleaseTokenPool_1_5_1.ts +1277 -0
  272. package/src/evm/abi/LockReleaseTokenPool_1_6_1.ts +1287 -0
  273. package/src/evm/abi/OffRamp_1_2.ts +1203 -0
  274. package/src/evm/abi/OffRamp_1_5.ts +1272 -0
  275. package/src/evm/abi/OffRamp_1_6.ts +1528 -0
  276. package/src/evm/abi/OnRamp_1_2.ts +1342 -0
  277. package/src/evm/abi/OnRamp_1_5.ts +1426 -0
  278. package/src/evm/abi/OnRamp_1_6.ts +879 -0
  279. package/src/evm/abi/Router.ts +507 -0
  280. package/src/evm/abi/TokenAdminRegistry_1_5.ts +332 -0
  281. package/src/evm/const.ts +69 -0
  282. package/src/evm/errors.ts +212 -0
  283. package/src/evm/hasher.ts +166 -0
  284. package/src/evm/index.ts +1262 -0
  285. package/src/evm/messages.ts +73 -0
  286. package/src/evm/offchain.ts +189 -0
  287. package/src/execution.ts +131 -0
  288. package/src/extra-args.ts +71 -0
  289. package/src/gas.ts +135 -0
  290. package/src/hasher/common.ts +23 -0
  291. package/src/hasher/hasher.ts +12 -0
  292. package/src/hasher/index.ts +3 -0
  293. package/src/hasher/merklemulti.ts +309 -0
  294. package/src/index.ts +51 -0
  295. package/src/offchain.ts +86 -0
  296. package/src/requests.ts +339 -0
  297. package/src/selectors.ts +1340 -0
  298. package/src/solana/cleanup.ts +216 -0
  299. package/src/solana/exec.ts +645 -0
  300. package/src/solana/hasher.ts +104 -0
  301. package/src/solana/idl/1.6.0/BASE_TOKEN_POOL.ts +1734 -0
  302. package/src/solana/idl/1.6.0/BURN_MINT_TOKEN_POOL.ts +1900 -0
  303. package/src/solana/idl/1.6.0/CCIP_CCTP_TOKEN_POOL.ts +2750 -0
  304. package/src/solana/idl/1.6.0/CCIP_COMMON.ts +210 -0
  305. package/src/solana/idl/1.6.0/CCIP_OFFRAMP.ts +5494 -0
  306. package/src/solana/idl/1.6.0/CCIP_ROUTER.ts +4671 -0
  307. package/src/solana/index.ts +1454 -0
  308. package/src/solana/offchain.ts +209 -0
  309. package/src/solana/patchBorsh.ts +67 -0
  310. package/src/solana/send.ts +436 -0
  311. package/src/solana/types.ts +6 -0
  312. package/src/solana/utils.ts +272 -0
  313. package/src/sui/hasher.ts +90 -0
  314. package/src/sui/index.ts +198 -0
  315. package/src/sui/types.ts +22 -0
  316. package/src/supported-chains.ts +4 -0
  317. package/src/types.ts +153 -0
  318. package/src/utils.ts +405 -0
  319. package/tsconfig.json +18 -0
@@ -0,0 +1,4671 @@
1
+ // generate:
2
+ // fetch('https://github.com/smartcontractkit/chainlink-ccip/raw/refs/heads/main/chains/solana/contracts/target/types/ccip_router.ts')
3
+ // .then((res) => res.text())
4
+ // .then((text) => text.trim().split('\n'))
5
+ // .then((lines) => lines.map((l, i, arr) => {
6
+ // if (!l.match(/.?\bisMut.?:/) || !arr[i - 1].includes('feeTokenUserAssociatedAccount')) return l;
7
+ // if (l.match(/.?\bisMut.?: false/)) return l.replace('false', 'true');
8
+ // else throw new Error('isMut is already true, no need for this workaround anymore');
9
+ // }))
10
+ export type CcipRouter = {
11
+ version: '0.1.1'
12
+ name: 'ccip_router'
13
+ docs: [
14
+ 'The `ccip_router` module contains the implementation of the Cross-Chain Interoperability Protocol (CCIP) Router.',
15
+ '',
16
+ 'This is the Collapsed Router Program for CCIP.',
17
+ "As it's upgradable persisting the same program id, there is no need to have an indirection of a Proxy Program.",
18
+ 'This Router handles the OnRamp flow of the CCIP Messages.',
19
+ '',
20
+ 'NOTE to devs: This file however should contain *no logic*, only the entrypoints to the different versioned modules,',
21
+ 'thus making it easier to ensure later on that logic can be changed during upgrades without affecting the interface.',
22
+ ]
23
+ instructions: [
24
+ {
25
+ name: 'initialize'
26
+ docs: [
27
+ 'Initialization Flow //',
28
+ 'Initializes the CCIP Router.',
29
+ '',
30
+ 'The initialization of the Router is responsibility of Admin, nothing more than calling this method should be done first.',
31
+ '',
32
+ '# Arguments',
33
+ '',
34
+ '* `ctx` - The context containing the accounts required for initialization.',
35
+ '* `svm_chain_selector` - The chain selector for SVM.',
36
+ '* `fee_aggregator` - The public key of the fee aggregator.',
37
+ '* `fee_quoter` - The public key of the fee quoter.',
38
+ '* `link_token_mint` - The public key of the LINK token mint.',
39
+ '* `rmn_remote` - The public key of the RMN remote.',
40
+ ]
41
+ accounts: [
42
+ {
43
+ name: 'config'
44
+ isMut: true
45
+ isSigner: false
46
+ },
47
+ {
48
+ name: 'authority'
49
+ isMut: true
50
+ isSigner: true
51
+ },
52
+ {
53
+ name: 'systemProgram'
54
+ isMut: false
55
+ isSigner: false
56
+ },
57
+ {
58
+ name: 'program'
59
+ isMut: false
60
+ isSigner: false
61
+ },
62
+ {
63
+ name: 'programData'
64
+ isMut: false
65
+ isSigner: false
66
+ },
67
+ ]
68
+ args: [
69
+ {
70
+ name: 'svmChainSelector'
71
+ type: 'u64'
72
+ },
73
+ {
74
+ name: 'feeAggregator'
75
+ type: 'publicKey'
76
+ },
77
+ {
78
+ name: 'feeQuoter'
79
+ type: 'publicKey'
80
+ },
81
+ {
82
+ name: 'linkTokenMint'
83
+ type: 'publicKey'
84
+ },
85
+ {
86
+ name: 'rmnRemote'
87
+ type: 'publicKey'
88
+ },
89
+ ]
90
+ },
91
+ {
92
+ name: 'typeVersion'
93
+ docs: [
94
+ 'Returns the program type (name) and version.',
95
+ 'Used by offchain code to easily determine which program & version is being interacted with.',
96
+ '',
97
+ '# Arguments',
98
+ '* `ctx` - The context',
99
+ ]
100
+ accounts: [
101
+ {
102
+ name: 'clock'
103
+ isMut: false
104
+ isSigner: false
105
+ },
106
+ ]
107
+ args: []
108
+ returns: 'string'
109
+ },
110
+ {
111
+ name: 'transferOwnership'
112
+ docs: [
113
+ 'Transfers the ownership of the router to a new proposed owner.',
114
+ '',
115
+ 'Shared func signature with other programs',
116
+ '',
117
+ '# Arguments',
118
+ '',
119
+ '* `ctx` - The context containing the accounts required for the transfer.',
120
+ '* `proposed_owner` - The public key of the new proposed owner.',
121
+ ]
122
+ accounts: [
123
+ {
124
+ name: 'config'
125
+ isMut: true
126
+ isSigner: false
127
+ },
128
+ {
129
+ name: 'authority'
130
+ isMut: false
131
+ isSigner: true
132
+ },
133
+ ]
134
+ args: [
135
+ {
136
+ name: 'proposedOwner'
137
+ type: 'publicKey'
138
+ },
139
+ ]
140
+ },
141
+ {
142
+ name: 'acceptOwnership'
143
+ docs: [
144
+ 'Accepts the ownership of the router by the proposed owner.',
145
+ '',
146
+ 'Shared func signature with other programs',
147
+ '',
148
+ '# Arguments',
149
+ '',
150
+ '* `ctx` - The context containing the accounts required for accepting ownership.',
151
+ 'The new owner must be a signer of the transaction.',
152
+ ]
153
+ accounts: [
154
+ {
155
+ name: 'config'
156
+ isMut: true
157
+ isSigner: false
158
+ },
159
+ {
160
+ name: 'authority'
161
+ isMut: false
162
+ isSigner: true
163
+ },
164
+ ]
165
+ args: []
166
+ },
167
+ {
168
+ name: 'setDefaultCodeVersion'
169
+ docs: [
170
+ 'Config //',
171
+ 'Sets the default code version to be used. This is then used by the slim routing layer to determine',
172
+ 'which version of the versioned business logic module (`instructions`) to use. Only the admin may set this.',
173
+ '',
174
+ 'Shared func signature with other programs',
175
+ '',
176
+ '# Arguments',
177
+ '',
178
+ '* `ctx` - The context containing the accounts required for updating the configuration.',
179
+ '* `code_version` - The new code version to be set as default.',
180
+ ]
181
+ accounts: [
182
+ {
183
+ name: 'config'
184
+ isMut: true
185
+ isSigner: false
186
+ },
187
+ {
188
+ name: 'authority'
189
+ isMut: false
190
+ isSigner: true
191
+ },
192
+ {
193
+ name: 'systemProgram'
194
+ isMut: false
195
+ isSigner: false
196
+ },
197
+ ]
198
+ args: [
199
+ {
200
+ name: 'codeVersion'
201
+ type: {
202
+ defined: 'CodeVersion'
203
+ }
204
+ },
205
+ ]
206
+ },
207
+ {
208
+ name: 'setLinkTokenMint'
209
+ docs: [
210
+ 'Sets the address of the LINK token mint.',
211
+ 'The Admin is the only one able to set it.',
212
+ '',
213
+ '# Arguments',
214
+ '',
215
+ '* `ctx` - The context containing the accounts required for updating the configuration.',
216
+ '* `link_token_mint` - The new address of the LINK token mint.',
217
+ ]
218
+ accounts: [
219
+ {
220
+ name: 'config'
221
+ isMut: true
222
+ isSigner: false
223
+ },
224
+ {
225
+ name: 'authority'
226
+ isMut: false
227
+ isSigner: true
228
+ },
229
+ {
230
+ name: 'systemProgram'
231
+ isMut: false
232
+ isSigner: false
233
+ },
234
+ ]
235
+ args: [
236
+ {
237
+ name: 'linkTokenMint'
238
+ type: 'publicKey'
239
+ },
240
+ ]
241
+ },
242
+ {
243
+ name: 'updateFeeAggregator'
244
+ docs: [
245
+ 'Updates the fee aggregator in the router configuration.',
246
+ 'The Admin is the only one able to update the fee aggregator.',
247
+ '',
248
+ '# Arguments',
249
+ '',
250
+ '* `ctx` - The context containing the accounts required for updating the configuration.',
251
+ '* `fee_aggregator` - The new fee aggregator address (ATAs will be derived for it for each token).',
252
+ ]
253
+ accounts: [
254
+ {
255
+ name: 'config'
256
+ isMut: true
257
+ isSigner: false
258
+ },
259
+ {
260
+ name: 'authority'
261
+ isMut: false
262
+ isSigner: true
263
+ },
264
+ {
265
+ name: 'systemProgram'
266
+ isMut: false
267
+ isSigner: false
268
+ },
269
+ ]
270
+ args: [
271
+ {
272
+ name: 'feeAggregator'
273
+ type: 'publicKey'
274
+ },
275
+ ]
276
+ },
277
+ {
278
+ name: 'updateRmnRemote'
279
+ docs: [
280
+ 'Updates the RMN remote program in the router configuration.',
281
+ 'The Admin is the only one able to update the RMN remote program.',
282
+ '',
283
+ '# Arguments',
284
+ '',
285
+ '* `ctx` - The context containing the accounts required for updating the configuration.',
286
+ '* `rmn_remote,` - The new RMN remote address.',
287
+ ]
288
+ accounts: [
289
+ {
290
+ name: 'config'
291
+ isMut: true
292
+ isSigner: false
293
+ },
294
+ {
295
+ name: 'authority'
296
+ isMut: false
297
+ isSigner: true
298
+ },
299
+ {
300
+ name: 'systemProgram'
301
+ isMut: false
302
+ isSigner: false
303
+ },
304
+ ]
305
+ args: [
306
+ {
307
+ name: 'rmnRemote'
308
+ type: 'publicKey'
309
+ },
310
+ ]
311
+ },
312
+ {
313
+ name: 'addChainSelector'
314
+ docs: [
315
+ 'Adds a new chain selector to the router.',
316
+ '',
317
+ 'The Admin needs to add any new chain supported (this means both OnRamp and OffRamp).',
318
+ "When adding a new chain, the Admin needs to specify if it's enabled or not.",
319
+ 'They may enable only source, or only destination, or neither, or both.',
320
+ '',
321
+ '# Arguments',
322
+ '',
323
+ '* `ctx` - The context containing the accounts required for adding the chain selector.',
324
+ '* `new_chain_selector` - The new chain selector to be added.',
325
+ '* `source_chain_config` - The configuration for the chain as source.',
326
+ '* `dest_chain_config` - The configuration for the chain as destination.',
327
+ ]
328
+ accounts: [
329
+ {
330
+ name: 'destChainState'
331
+ isMut: true
332
+ isSigner: false
333
+ },
334
+ {
335
+ name: 'config'
336
+ isMut: false
337
+ isSigner: false
338
+ },
339
+ {
340
+ name: 'authority'
341
+ isMut: true
342
+ isSigner: true
343
+ },
344
+ {
345
+ name: 'systemProgram'
346
+ isMut: false
347
+ isSigner: false
348
+ },
349
+ ]
350
+ args: [
351
+ {
352
+ name: 'newChainSelector'
353
+ type: 'u64'
354
+ },
355
+ {
356
+ name: 'destChainConfig'
357
+ type: {
358
+ defined: 'DestChainConfig'
359
+ }
360
+ },
361
+ ]
362
+ },
363
+ {
364
+ name: 'updateDestChainConfig'
365
+ docs: [
366
+ 'Updates the configuration of the destination chain selector.',
367
+ '',
368
+ 'The Admin is the only one able to update the destination chain config.',
369
+ '',
370
+ '# Arguments',
371
+ '',
372
+ '* `ctx` - The context containing the accounts required for updating the chain selector.',
373
+ '* `dest_chain_selector` - The destination chain selector to be updated.',
374
+ '* `dest_chain_config` - The new configuration for the destination chain.',
375
+ ]
376
+ accounts: [
377
+ {
378
+ name: 'destChainState'
379
+ isMut: true
380
+ isSigner: false
381
+ },
382
+ {
383
+ name: 'config'
384
+ isMut: false
385
+ isSigner: false
386
+ },
387
+ {
388
+ name: 'authority'
389
+ isMut: true
390
+ isSigner: true
391
+ },
392
+ {
393
+ name: 'systemProgram'
394
+ isMut: false
395
+ isSigner: false
396
+ },
397
+ ]
398
+ args: [
399
+ {
400
+ name: 'destChainSelector'
401
+ type: 'u64'
402
+ },
403
+ {
404
+ name: 'destChainConfig'
405
+ type: {
406
+ defined: 'DestChainConfig'
407
+ }
408
+ },
409
+ ]
410
+ },
411
+ {
412
+ name: 'addOfframp'
413
+ docs: [
414
+ 'Add an offramp address to the list of offramps allowed by the router, for a',
415
+ 'particular source chain. External users will check this list before accepting',
416
+ 'a `ccip_receive` CPI.',
417
+ '',
418
+ '# Arguments',
419
+ '',
420
+ '* `ctx` - The context containing the accounts required for this operation.',
421
+ "* `source_chain_selector` - The source chain for the offramp's lane.",
422
+ "* `offramp` - The offramp's address.",
423
+ ]
424
+ accounts: [
425
+ {
426
+ name: 'allowedOfframp'
427
+ isMut: true
428
+ isSigner: false
429
+ },
430
+ {
431
+ name: 'config'
432
+ isMut: false
433
+ isSigner: false
434
+ },
435
+ {
436
+ name: 'authority'
437
+ isMut: true
438
+ isSigner: true
439
+ },
440
+ {
441
+ name: 'systemProgram'
442
+ isMut: false
443
+ isSigner: false
444
+ },
445
+ ]
446
+ args: [
447
+ {
448
+ name: 'sourceChainSelector'
449
+ type: 'u64'
450
+ },
451
+ {
452
+ name: 'offramp'
453
+ type: 'publicKey'
454
+ },
455
+ ]
456
+ },
457
+ {
458
+ name: 'removeOfframp'
459
+ docs: [
460
+ 'Remove an offramp address from the list of offramps allowed by the router, for a',
461
+ 'particular source chain. External users will check this list before accepting',
462
+ 'a `ccip_receive` CPI.',
463
+ '',
464
+ '# Arguments',
465
+ '',
466
+ '* `ctx` - The context containing the accounts required for this operation.',
467
+ "* `source_chain_selector` - The source chain for the offramp's lane.",
468
+ "* `offramp` - The offramp's address.",
469
+ ]
470
+ accounts: [
471
+ {
472
+ name: 'allowedOfframp'
473
+ isMut: true
474
+ isSigner: false
475
+ },
476
+ {
477
+ name: 'config'
478
+ isMut: false
479
+ isSigner: false
480
+ },
481
+ {
482
+ name: 'authority'
483
+ isMut: true
484
+ isSigner: true
485
+ },
486
+ {
487
+ name: 'systemProgram'
488
+ isMut: false
489
+ isSigner: false
490
+ },
491
+ ]
492
+ args: [
493
+ {
494
+ name: 'sourceChainSelector'
495
+ type: 'u64'
496
+ },
497
+ {
498
+ name: 'offramp'
499
+ type: 'publicKey'
500
+ },
501
+ ]
502
+ },
503
+ {
504
+ name: 'updateSvmChainSelector'
505
+ docs: [
506
+ 'Updates the SVM chain selector in the router configuration.',
507
+ '',
508
+ 'This method should only be used if there was an error with the initial configuration or if the solana chain selector changes.',
509
+ '',
510
+ '# Arguments',
511
+ '',
512
+ '* `ctx` - The context containing the accounts required for updating the configuration.',
513
+ '* `new_chain_selector` - The new chain selector for SVM.',
514
+ ]
515
+ accounts: [
516
+ {
517
+ name: 'config'
518
+ isMut: true
519
+ isSigner: false
520
+ },
521
+ {
522
+ name: 'authority'
523
+ isMut: false
524
+ isSigner: true
525
+ },
526
+ {
527
+ name: 'systemProgram'
528
+ isMut: false
529
+ isSigner: false
530
+ },
531
+ ]
532
+ args: [
533
+ {
534
+ name: 'newChainSelector'
535
+ type: 'u64'
536
+ },
537
+ ]
538
+ },
539
+ {
540
+ name: 'bumpCcipVersionForDestChain'
541
+ docs: [
542
+ 'Bumps the CCIP version for a destination chain.',
543
+ 'This effectively just resets the sequence number of the destination chain state.',
544
+ 'If there had been a previous rollback, on re-upgrade the sequence number will resume from where it was',
545
+ 'prior to the rollback.',
546
+ '',
547
+ '# Arguments',
548
+ '* `ctx` - The context containing the accounts required for the bump.',
549
+ '* `dest_chain_selector` - The destination chain selector to bump version for.',
550
+ ]
551
+ accounts: [
552
+ {
553
+ name: 'destChainState'
554
+ isMut: true
555
+ isSigner: false
556
+ },
557
+ {
558
+ name: 'config'
559
+ isMut: false
560
+ isSigner: false
561
+ },
562
+ {
563
+ name: 'authority'
564
+ isMut: true
565
+ isSigner: true
566
+ },
567
+ ]
568
+ args: [
569
+ {
570
+ name: 'destChainSelector'
571
+ type: 'u64'
572
+ },
573
+ ]
574
+ },
575
+ {
576
+ name: 'rollbackCcipVersionForDestChain'
577
+ docs: [
578
+ 'Rolls back the CCIP version for a destination chain.',
579
+ "This effectively just restores the old version's sequence number of the destination chain state.",
580
+ "We only support 1 consecutive rollback. If a rollback has occurred for that lane, the version can't",
581
+ 'be rolled back again without bumping the version first.',
582
+ '',
583
+ '# Arguments',
584
+ '* `ctx` - The context containing the accounts required for the rollback.',
585
+ '* `dest_chain_selector` - The destination chain selector to rollback the version for.',
586
+ ]
587
+ accounts: [
588
+ {
589
+ name: 'destChainState'
590
+ isMut: true
591
+ isSigner: false
592
+ },
593
+ {
594
+ name: 'config'
595
+ isMut: false
596
+ isSigner: false
597
+ },
598
+ {
599
+ name: 'authority'
600
+ isMut: true
601
+ isSigner: true
602
+ },
603
+ ]
604
+ args: [
605
+ {
606
+ name: 'destChainSelector'
607
+ type: 'u64'
608
+ },
609
+ ]
610
+ },
611
+ {
612
+ name: 'ccipAdminProposeAdministrator'
613
+ docs: [
614
+ 'Token Admin Registry //',
615
+ 'Registers the Token Admin Registry via the CCIP Admin',
616
+ '',
617
+ '# Arguments',
618
+ '',
619
+ '* `ctx` - The context containing the accounts required for registration.',
620
+ '* `token_admin_registry_admin` - The public key of the token admin registry admin to propose.',
621
+ ]
622
+ accounts: [
623
+ {
624
+ name: 'config'
625
+ isMut: false
626
+ isSigner: false
627
+ },
628
+ {
629
+ name: 'tokenAdminRegistry'
630
+ isMut: true
631
+ isSigner: false
632
+ },
633
+ {
634
+ name: 'mint'
635
+ isMut: false
636
+ isSigner: false
637
+ },
638
+ {
639
+ name: 'authority'
640
+ isMut: true
641
+ isSigner: true
642
+ },
643
+ {
644
+ name: 'systemProgram'
645
+ isMut: false
646
+ isSigner: false
647
+ },
648
+ ]
649
+ args: [
650
+ {
651
+ name: 'tokenAdminRegistryAdmin'
652
+ type: 'publicKey'
653
+ },
654
+ ]
655
+ },
656
+ {
657
+ name: 'ccipAdminOverridePendingAdministrator'
658
+ docs: [
659
+ 'Overrides the pending admin of the Token Admin Registry',
660
+ '',
661
+ '# Arguments',
662
+ '',
663
+ '* `ctx` - The context containing the accounts required for registration.',
664
+ '* `token_admin_registry_admin` - The public key of the token admin registry admin to propose.',
665
+ ]
666
+ accounts: [
667
+ {
668
+ name: 'config'
669
+ isMut: false
670
+ isSigner: false
671
+ },
672
+ {
673
+ name: 'tokenAdminRegistry'
674
+ isMut: true
675
+ isSigner: false
676
+ },
677
+ {
678
+ name: 'mint'
679
+ isMut: false
680
+ isSigner: false
681
+ },
682
+ {
683
+ name: 'authority'
684
+ isMut: true
685
+ isSigner: true
686
+ },
687
+ {
688
+ name: 'systemProgram'
689
+ isMut: false
690
+ isSigner: false
691
+ },
692
+ ]
693
+ args: [
694
+ {
695
+ name: 'tokenAdminRegistryAdmin'
696
+ type: 'publicKey'
697
+ },
698
+ ]
699
+ },
700
+ {
701
+ name: 'ownerProposeAdministrator'
702
+ docs: [
703
+ 'Registers the Token Admin Registry by the token owner.',
704
+ '',
705
+ 'The Authority of the Mint Token can claim the registry of the token.',
706
+ '',
707
+ '# Arguments',
708
+ '',
709
+ '* `ctx` - The context containing the accounts required for registration.',
710
+ '* `token_admin_registry_admin` - The public key of the token admin registry admin to propose.',
711
+ ]
712
+ accounts: [
713
+ {
714
+ name: 'config'
715
+ isMut: false
716
+ isSigner: false
717
+ },
718
+ {
719
+ name: 'tokenAdminRegistry'
720
+ isMut: true
721
+ isSigner: false
722
+ },
723
+ {
724
+ name: 'mint'
725
+ isMut: false
726
+ isSigner: false
727
+ },
728
+ {
729
+ name: 'authority'
730
+ isMut: true
731
+ isSigner: true
732
+ },
733
+ {
734
+ name: 'systemProgram'
735
+ isMut: false
736
+ isSigner: false
737
+ },
738
+ ]
739
+ args: [
740
+ {
741
+ name: 'tokenAdminRegistryAdmin'
742
+ type: 'publicKey'
743
+ },
744
+ ]
745
+ },
746
+ {
747
+ name: 'ownerOverridePendingAdministrator'
748
+ docs: [
749
+ 'Overrides the pending admin of the Token Admin Registry by the token owner',
750
+ '',
751
+ '# Arguments',
752
+ '',
753
+ '* `ctx` - The context containing the accounts required for registration.',
754
+ '* `token_admin_registry_admin` - The public key of the token admin registry admin to propose.',
755
+ ]
756
+ accounts: [
757
+ {
758
+ name: 'config'
759
+ isMut: false
760
+ isSigner: false
761
+ },
762
+ {
763
+ name: 'tokenAdminRegistry'
764
+ isMut: true
765
+ isSigner: false
766
+ },
767
+ {
768
+ name: 'mint'
769
+ isMut: false
770
+ isSigner: false
771
+ },
772
+ {
773
+ name: 'authority'
774
+ isMut: true
775
+ isSigner: true
776
+ },
777
+ {
778
+ name: 'systemProgram'
779
+ isMut: false
780
+ isSigner: false
781
+ },
782
+ ]
783
+ args: [
784
+ {
785
+ name: 'tokenAdminRegistryAdmin'
786
+ type: 'publicKey'
787
+ },
788
+ ]
789
+ },
790
+ {
791
+ name: 'acceptAdminRoleTokenAdminRegistry'
792
+ docs: [
793
+ 'Accepts the admin role of the token admin registry.',
794
+ '',
795
+ 'The Pending Admin must call this function to accept the admin role of the Token Admin Registry.',
796
+ '',
797
+ '# Arguments',
798
+ '',
799
+ '* `ctx` - The context containing the accounts required for accepting the admin role.',
800
+ '* `mint` - The public key of the token mint.',
801
+ ]
802
+ accounts: [
803
+ {
804
+ name: 'config'
805
+ isMut: false
806
+ isSigner: false
807
+ },
808
+ {
809
+ name: 'tokenAdminRegistry'
810
+ isMut: true
811
+ isSigner: false
812
+ },
813
+ {
814
+ name: 'mint'
815
+ isMut: false
816
+ isSigner: false
817
+ },
818
+ {
819
+ name: 'authority'
820
+ isMut: true
821
+ isSigner: true
822
+ },
823
+ ]
824
+ args: []
825
+ },
826
+ {
827
+ name: 'transferAdminRoleTokenAdminRegistry'
828
+ docs: [
829
+ 'Transfers the admin role of the token admin registry to a new admin.',
830
+ '',
831
+ "Only the Admin can transfer the Admin Role of the Token Admin Registry, this setups the Pending Admin and then it's their responsibility to accept the role.",
832
+ '',
833
+ '# Arguments',
834
+ '',
835
+ '* `ctx` - The context containing the accounts required for the transfer.',
836
+ '* `mint` - The public key of the token mint.',
837
+ '* `new_admin` - The public key of the new admin.',
838
+ ]
839
+ accounts: [
840
+ {
841
+ name: 'config'
842
+ isMut: false
843
+ isSigner: false
844
+ },
845
+ {
846
+ name: 'tokenAdminRegistry'
847
+ isMut: true
848
+ isSigner: false
849
+ },
850
+ {
851
+ name: 'mint'
852
+ isMut: false
853
+ isSigner: false
854
+ },
855
+ {
856
+ name: 'authority'
857
+ isMut: true
858
+ isSigner: true
859
+ },
860
+ ]
861
+ args: [
862
+ {
863
+ name: 'newAdmin'
864
+ type: 'publicKey'
865
+ },
866
+ ]
867
+ },
868
+ {
869
+ name: 'setPoolSupportsAutoDerivation'
870
+ docs: [
871
+ 'Edits the pool config flags for a given token mint.',
872
+ '',
873
+ 'The administrator of the token admin registry is the only one allowed to invoke this.',
874
+ '',
875
+ '# Arguments',
876
+ '',
877
+ '* `ctx` - The context containing the accounts required for setting the pool.',
878
+ '* `mint` - The mint of the pool to be edited.',
879
+ '* `supports_auto_derivation` - A boolean flag indicating whether the pool supports auto-derivation of accounts.',
880
+ ]
881
+ accounts: [
882
+ {
883
+ name: 'config'
884
+ isMut: false
885
+ isSigner: false
886
+ },
887
+ {
888
+ name: 'tokenAdminRegistry'
889
+ isMut: true
890
+ isSigner: false
891
+ },
892
+ {
893
+ name: 'authority'
894
+ isMut: true
895
+ isSigner: true
896
+ },
897
+ ]
898
+ args: [
899
+ {
900
+ name: 'mint'
901
+ type: 'publicKey'
902
+ },
903
+ {
904
+ name: 'supportsAutoDerivation'
905
+ type: 'bool'
906
+ },
907
+ ]
908
+ },
909
+ {
910
+ name: 'upgradeTokenAdminRegistryFromV1'
911
+ docs: [
912
+ 'Upgrades the Token Admin Registry from version 1 to the current version.',
913
+ '',
914
+ 'Anyone may invoke this method, as the upgrade has safe defaults for any new value,',
915
+ 'and those can then be changed by the Token Admin Registry Admin via separate instructions.',
916
+ '',
917
+ '# Arguments',
918
+ '',
919
+ '* `ctx` - The context containing the accounts required for the upgrade.',
920
+ ]
921
+ accounts: [
922
+ {
923
+ name: 'config'
924
+ isMut: false
925
+ isSigner: false
926
+ },
927
+ {
928
+ name: 'tokenAdminRegistry'
929
+ isMut: true
930
+ isSigner: false
931
+ docs: [
932
+ "types Anchor would attempt to deserialize the data _before_ realloc'ing it, which would fail.",
933
+ 'The code will load it and realloc it to the new size manually, and migrate its data.',
934
+ ]
935
+ },
936
+ {
937
+ name: 'mint'
938
+ isMut: false
939
+ isSigner: false
940
+ },
941
+ {
942
+ name: 'authority'
943
+ isMut: true
944
+ isSigner: true
945
+ },
946
+ {
947
+ name: 'systemProgram'
948
+ isMut: false
949
+ isSigner: false
950
+ },
951
+ ]
952
+ args: []
953
+ },
954
+ {
955
+ name: 'setPool'
956
+ docs: [
957
+ 'Sets the pool lookup table for a given token mint.',
958
+ '',
959
+ 'The administrator of the token admin registry can set the pool lookup table for a given token mint.',
960
+ '',
961
+ '# Arguments',
962
+ '',
963
+ '* `ctx` - The context containing the accounts required for setting the pool.',
964
+ '* `writable_indexes` - a bit map of the indexes of the accounts in lookup table that are writable',
965
+ ]
966
+ accounts: [
967
+ {
968
+ name: 'config'
969
+ isMut: false
970
+ isSigner: false
971
+ },
972
+ {
973
+ name: 'tokenAdminRegistry'
974
+ isMut: true
975
+ isSigner: false
976
+ },
977
+ {
978
+ name: 'mint'
979
+ isMut: false
980
+ isSigner: false
981
+ },
982
+ {
983
+ name: 'poolLookuptable'
984
+ isMut: false
985
+ isSigner: false
986
+ },
987
+ {
988
+ name: 'authority'
989
+ isMut: true
990
+ isSigner: true
991
+ },
992
+ ]
993
+ args: [
994
+ {
995
+ name: 'writableIndexes'
996
+ type: 'bytes'
997
+ },
998
+ ]
999
+ },
1000
+ {
1001
+ name: 'withdrawBilledFunds'
1002
+ docs: [
1003
+ 'Billing //',
1004
+ 'Transfers the accumulated billed fees in a particular token to an arbitrary token account.',
1005
+ 'Only the CCIP Admin can withdraw billed funds.',
1006
+ '',
1007
+ '# Arguments',
1008
+ '',
1009
+ '* `ctx` - The context containing the accounts required for the transfer of billed fees.',
1010
+ '* `transfer_all` - A flag indicating whether to transfer all the accumulated fees in that token or not.',
1011
+ '* `desired_amount` - The amount to transfer. If `transfer_all` is true, this value must be 0.',
1012
+ ]
1013
+ accounts: [
1014
+ {
1015
+ name: 'feeTokenMint'
1016
+ isMut: false
1017
+ isSigner: false
1018
+ },
1019
+ {
1020
+ name: 'feeTokenAccum'
1021
+ isMut: true
1022
+ isSigner: false
1023
+ },
1024
+ {
1025
+ name: 'recipient'
1026
+ isMut: true
1027
+ isSigner: false
1028
+ },
1029
+ {
1030
+ name: 'tokenProgram'
1031
+ isMut: false
1032
+ isSigner: false
1033
+ },
1034
+ {
1035
+ name: 'feeBillingSigner'
1036
+ isMut: false
1037
+ isSigner: false
1038
+ },
1039
+ {
1040
+ name: 'config'
1041
+ isMut: false
1042
+ isSigner: false
1043
+ },
1044
+ {
1045
+ name: 'authority'
1046
+ isMut: true
1047
+ isSigner: true
1048
+ },
1049
+ ]
1050
+ args: [
1051
+ {
1052
+ name: 'transferAll'
1053
+ type: 'bool'
1054
+ },
1055
+ {
1056
+ name: 'desiredAmount'
1057
+ type: 'u64'
1058
+ },
1059
+ ]
1060
+ },
1061
+ {
1062
+ name: 'ccipSend'
1063
+ docs: [
1064
+ 'On Ramp Flow //',
1065
+ 'Sends a message to the destination chain.',
1066
+ '',
1067
+ 'Request a message to be sent to the destination chain.',
1068
+ 'The method name needs to be ccip_send with Anchor encoding.',
1069
+ 'This function is called by the CCIP Sender Contract (or final user) to send a message to the CCIP Router.',
1070
+ 'The message will be sent to the receiver on the destination chain selector.',
1071
+ 'This message emits the event CCIPMessageSent with all the necessary data to be retrieved by the OffChain Code',
1072
+ '',
1073
+ '# Arguments',
1074
+ '',
1075
+ '* `ctx` - The context containing the accounts required for sending the message.',
1076
+ '* `dest_chain_selector` - The chain selector for the destination chain.',
1077
+ '* `message` - The message to be sent. The size limit of data is 256 bytes.',
1078
+ '* `token_indexes` - Indices into the remaining accounts vector where the subslice for a token begins.',
1079
+ ]
1080
+ accounts: [
1081
+ {
1082
+ name: 'config'
1083
+ isMut: false
1084
+ isSigner: false
1085
+ },
1086
+ {
1087
+ name: 'destChainState'
1088
+ isMut: true
1089
+ isSigner: false
1090
+ },
1091
+ {
1092
+ name: 'nonce'
1093
+ isMut: true
1094
+ isSigner: false
1095
+ docs: [
1096
+ 'CHECK this represents the PDA where the message counters are stored. As it may be initialized or not,',
1097
+ "and it may be in it's v1 or v2 form, it is an UncheckedAccount and the code handles all cases manually.",
1098
+ ]
1099
+ },
1100
+ {
1101
+ name: 'authority'
1102
+ isMut: true
1103
+ isSigner: true
1104
+ },
1105
+ {
1106
+ name: 'systemProgram'
1107
+ isMut: false
1108
+ isSigner: false
1109
+ },
1110
+ {
1111
+ name: 'feeTokenProgram'
1112
+ isMut: false
1113
+ isSigner: false
1114
+ },
1115
+ {
1116
+ name: 'feeTokenMint'
1117
+ isMut: false
1118
+ isSigner: false
1119
+ },
1120
+ {
1121
+ name: 'feeTokenUserAssociatedAccount'
1122
+ isMut: true
1123
+ isSigner: false
1124
+ docs: ['If paying with native SOL, this must be the zero address.']
1125
+ },
1126
+ {
1127
+ name: 'feeTokenReceiver'
1128
+ isMut: true
1129
+ isSigner: false
1130
+ },
1131
+ {
1132
+ name: 'feeBillingSigner'
1133
+ isMut: false
1134
+ isSigner: false
1135
+ },
1136
+ {
1137
+ name: 'feeQuoter'
1138
+ isMut: false
1139
+ isSigner: false
1140
+ },
1141
+ {
1142
+ name: 'feeQuoterConfig'
1143
+ isMut: false
1144
+ isSigner: false
1145
+ },
1146
+ {
1147
+ name: 'feeQuoterDestChain'
1148
+ isMut: false
1149
+ isSigner: false
1150
+ },
1151
+ {
1152
+ name: 'feeQuoterBillingTokenConfig'
1153
+ isMut: false
1154
+ isSigner: false
1155
+ },
1156
+ {
1157
+ name: 'feeQuoterLinkTokenConfig'
1158
+ isMut: false
1159
+ isSigner: false
1160
+ },
1161
+ {
1162
+ name: 'rmnRemote'
1163
+ isMut: false
1164
+ isSigner: false
1165
+ },
1166
+ {
1167
+ name: 'rmnRemoteCurses'
1168
+ isMut: false
1169
+ isSigner: false
1170
+ },
1171
+ {
1172
+ name: 'rmnRemoteConfig'
1173
+ isMut: false
1174
+ isSigner: false
1175
+ },
1176
+ ]
1177
+ args: [
1178
+ {
1179
+ name: 'destChainSelector'
1180
+ type: 'u64'
1181
+ },
1182
+ {
1183
+ name: 'message'
1184
+ type: {
1185
+ defined: 'SVM2AnyMessage'
1186
+ }
1187
+ },
1188
+ {
1189
+ name: 'tokenIndexes'
1190
+ type: 'bytes'
1191
+ },
1192
+ ]
1193
+ returns: {
1194
+ array: ['u8', 32]
1195
+ }
1196
+ },
1197
+ {
1198
+ name: 'getFee'
1199
+ docs: [
1200
+ 'Queries the onramp for the fee required to send a message.',
1201
+ '',
1202
+ "This call is permissionless. Note it does not verify whether there's a curse active",
1203
+ 'in order to avoid the RMN CPI overhead.',
1204
+ '',
1205
+ '# Arguments',
1206
+ '',
1207
+ '* `ctx` - The context containing the accounts required for obtaining the message fee.',
1208
+ '* `dest_chain_selector` - The chain selector for the destination chain.',
1209
+ '* `message` - The message to be sent. The size limit of data is 256 bytes.',
1210
+ ]
1211
+ accounts: [
1212
+ {
1213
+ name: 'config'
1214
+ isMut: false
1215
+ isSigner: false
1216
+ },
1217
+ {
1218
+ name: 'destChainState'
1219
+ isMut: false
1220
+ isSigner: false
1221
+ },
1222
+ {
1223
+ name: 'feeQuoter'
1224
+ isMut: false
1225
+ isSigner: false
1226
+ },
1227
+ {
1228
+ name: 'feeQuoterConfig'
1229
+ isMut: false
1230
+ isSigner: false
1231
+ },
1232
+ {
1233
+ name: 'feeQuoterDestChain'
1234
+ isMut: false
1235
+ isSigner: false
1236
+ },
1237
+ {
1238
+ name: 'feeQuoterBillingTokenConfig'
1239
+ isMut: false
1240
+ isSigner: false
1241
+ },
1242
+ {
1243
+ name: 'feeQuoterLinkTokenConfig'
1244
+ isMut: false
1245
+ isSigner: false
1246
+ },
1247
+ ]
1248
+ args: [
1249
+ {
1250
+ name: 'destChainSelector'
1251
+ type: 'u64'
1252
+ },
1253
+ {
1254
+ name: 'message'
1255
+ type: {
1256
+ defined: 'SVM2AnyMessage'
1257
+ }
1258
+ },
1259
+ ]
1260
+ returns: {
1261
+ defined: 'GetFeeResult'
1262
+ }
1263
+ },
1264
+ {
1265
+ name: 'deriveAccountsCcipSend'
1266
+ docs: [
1267
+ 'Automatically derives all accounts required to call `ccip_send`.',
1268
+ '',
1269
+ 'This method receives the bare minimum amount of information needed to construct',
1270
+ 'the entire account list to send a transaction, and builds it iteratively',
1271
+ 'over the course of multiple calls.',
1272
+ '',
1273
+ 'The return type contains:',
1274
+ '',
1275
+ '* `accounts_to_save`: The caller must append these accounts to a list they maintain.',
1276
+ 'When complete, this list will contain all accounts needed to call `ccip_send`.',
1277
+ '* `ask_again_with`: When `next_stage` is not empty, the caller must call `derive_accounts_ccip_send`',
1278
+ 'again, including exactly these accounts as the `remaining_accounts`.',
1279
+ '* `lookup_tables_to_save`: The caller must save those LUTs. They can be used for `ccip_send`.',
1280
+ '* `current_stage`: A string describing the current stage of the derivation process. When the stage',
1281
+ 'is "TokenTransferStaticAccounts/<N>/0", it means the `accounts_to_save` block in this response contains',
1282
+ 'all accounts relating to the Nth token being transferred. Use this information to construct',
1283
+ 'the `token_indexes` vector that `ccip_send` requires.',
1284
+ '* `next_stage`: If nonempty, this means the instruction must get called again with this value',
1285
+ 'as the `stage` argument.',
1286
+ '',
1287
+ 'Therefore, and starting with an empty `remaining_accounts` list, the caller must repeatedly',
1288
+ 'call `derive_accounts_ccip_send` until `next_stage` is returned empty.',
1289
+ '',
1290
+ '# Arguments',
1291
+ '',
1292
+ '* `ctx`: Context containing only the config.',
1293
+ '* `stage`: Requested derivation stage. Pass "Start" the first time, then for each subsequent',
1294
+ 'call, pass the value returned in `response.next_stage` until empty.',
1295
+ '* `params`:',
1296
+ '* `ccip_send_caller`: Public key of the account that will sign the call to `ccip_send`.',
1297
+ '* `dest_chain_selector`: CCIP chain selector for the dest chain.',
1298
+ '* `fee_token_mint`: The mint address for the token used for fees. Pubkey::default() if native SOL.',
1299
+ '* `mints_of_transferred_token`: List of all token mints for tokens being transferred.',
1300
+ ]
1301
+ accounts: [
1302
+ {
1303
+ name: 'config'
1304
+ isMut: false
1305
+ isSigner: false
1306
+ },
1307
+ ]
1308
+ args: [
1309
+ {
1310
+ name: 'params'
1311
+ type: {
1312
+ defined: 'DeriveAccountsCcipSendParams'
1313
+ }
1314
+ },
1315
+ {
1316
+ name: 'stage'
1317
+ type: 'string'
1318
+ },
1319
+ ]
1320
+ returns: {
1321
+ defined: 'DeriveAccountsResponse'
1322
+ }
1323
+ },
1324
+ ]
1325
+ accounts: [
1326
+ {
1327
+ name: 'allowedOfframp'
1328
+ type: {
1329
+ kind: 'struct'
1330
+ fields: []
1331
+ }
1332
+ },
1333
+ {
1334
+ name: 'config'
1335
+ type: {
1336
+ kind: 'struct'
1337
+ fields: [
1338
+ {
1339
+ name: 'version'
1340
+ type: 'u8'
1341
+ },
1342
+ {
1343
+ name: 'defaultCodeVersion'
1344
+ type: {
1345
+ defined: 'CodeVersion'
1346
+ }
1347
+ },
1348
+ {
1349
+ name: 'svmChainSelector'
1350
+ type: 'u64'
1351
+ },
1352
+ {
1353
+ name: 'owner'
1354
+ type: 'publicKey'
1355
+ },
1356
+ {
1357
+ name: 'proposedOwner'
1358
+ type: 'publicKey'
1359
+ },
1360
+ {
1361
+ name: 'feeQuoter'
1362
+ type: 'publicKey'
1363
+ },
1364
+ {
1365
+ name: 'rmnRemote'
1366
+ type: 'publicKey'
1367
+ },
1368
+ {
1369
+ name: 'linkTokenMint'
1370
+ type: 'publicKey'
1371
+ },
1372
+ {
1373
+ name: 'feeAggregator'
1374
+ type: 'publicKey'
1375
+ },
1376
+ ]
1377
+ }
1378
+ },
1379
+ {
1380
+ name: 'destChain'
1381
+ type: {
1382
+ kind: 'struct'
1383
+ fields: [
1384
+ {
1385
+ name: 'version'
1386
+ type: 'u8'
1387
+ },
1388
+ {
1389
+ name: 'chainSelector'
1390
+ type: 'u64'
1391
+ },
1392
+ {
1393
+ name: 'state'
1394
+ type: {
1395
+ defined: 'DestChainState'
1396
+ }
1397
+ },
1398
+ {
1399
+ name: 'config'
1400
+ type: {
1401
+ defined: 'DestChainConfig'
1402
+ }
1403
+ },
1404
+ ]
1405
+ }
1406
+ },
1407
+ {
1408
+ name: 'nonce'
1409
+ type: {
1410
+ kind: 'struct'
1411
+ fields: [
1412
+ {
1413
+ name: 'version'
1414
+ type: 'u8'
1415
+ },
1416
+ {
1417
+ name: 'orderedNonce'
1418
+ type: 'u64'
1419
+ },
1420
+ {
1421
+ name: 'totalNonce'
1422
+ type: 'u64'
1423
+ },
1424
+ ]
1425
+ }
1426
+ },
1427
+ ]
1428
+ types: [
1429
+ {
1430
+ name: 'RampMessageHeader'
1431
+ type: {
1432
+ kind: 'struct'
1433
+ fields: [
1434
+ {
1435
+ name: 'messageId'
1436
+ type: {
1437
+ array: ['u8', 32]
1438
+ }
1439
+ },
1440
+ {
1441
+ name: 'sourceChainSelector'
1442
+ type: 'u64'
1443
+ },
1444
+ {
1445
+ name: 'destChainSelector'
1446
+ type: 'u64'
1447
+ },
1448
+ {
1449
+ name: 'sequenceNumber'
1450
+ type: 'u64'
1451
+ },
1452
+ {
1453
+ name: 'nonce'
1454
+ type: 'u64'
1455
+ },
1456
+ ]
1457
+ }
1458
+ },
1459
+ {
1460
+ name: 'SVM2AnyRampMessage'
1461
+ type: {
1462
+ kind: 'struct'
1463
+ fields: [
1464
+ {
1465
+ name: 'header'
1466
+ type: {
1467
+ defined: 'RampMessageHeader'
1468
+ }
1469
+ },
1470
+ {
1471
+ name: 'sender'
1472
+ type: 'publicKey'
1473
+ },
1474
+ {
1475
+ name: 'data'
1476
+ type: 'bytes'
1477
+ },
1478
+ {
1479
+ name: 'receiver'
1480
+ type: 'bytes'
1481
+ },
1482
+ {
1483
+ name: 'extraArgs'
1484
+ type: 'bytes'
1485
+ },
1486
+ {
1487
+ name: 'feeToken'
1488
+ type: 'publicKey'
1489
+ },
1490
+ {
1491
+ name: 'tokenAmounts'
1492
+ type: {
1493
+ vec: {
1494
+ defined: 'SVM2AnyTokenTransfer'
1495
+ }
1496
+ }
1497
+ },
1498
+ {
1499
+ name: 'feeTokenAmount'
1500
+ type: {
1501
+ defined: 'CrossChainAmount'
1502
+ }
1503
+ },
1504
+ {
1505
+ name: 'feeValueJuels'
1506
+ type: {
1507
+ defined: 'CrossChainAmount'
1508
+ }
1509
+ },
1510
+ ]
1511
+ }
1512
+ },
1513
+ {
1514
+ name: 'SVM2AnyTokenTransfer'
1515
+ type: {
1516
+ kind: 'struct'
1517
+ fields: [
1518
+ {
1519
+ name: 'sourcePoolAddress'
1520
+ type: 'publicKey'
1521
+ },
1522
+ {
1523
+ name: 'destTokenAddress'
1524
+ type: 'bytes'
1525
+ },
1526
+ {
1527
+ name: 'extraData'
1528
+ type: 'bytes'
1529
+ },
1530
+ {
1531
+ name: 'amount'
1532
+ type: {
1533
+ defined: 'CrossChainAmount'
1534
+ }
1535
+ },
1536
+ {
1537
+ name: 'destExecData'
1538
+ type: 'bytes'
1539
+ },
1540
+ ]
1541
+ }
1542
+ },
1543
+ {
1544
+ name: 'SVM2AnyMessage'
1545
+ type: {
1546
+ kind: 'struct'
1547
+ fields: [
1548
+ {
1549
+ name: 'receiver'
1550
+ type: 'bytes'
1551
+ },
1552
+ {
1553
+ name: 'data'
1554
+ type: 'bytes'
1555
+ },
1556
+ {
1557
+ name: 'tokenAmounts'
1558
+ type: {
1559
+ vec: {
1560
+ defined: 'SVMTokenAmount'
1561
+ }
1562
+ }
1563
+ },
1564
+ {
1565
+ name: 'feeToken'
1566
+ type: 'publicKey'
1567
+ },
1568
+ {
1569
+ name: 'extraArgs'
1570
+ type: 'bytes'
1571
+ },
1572
+ ]
1573
+ }
1574
+ },
1575
+ {
1576
+ name: 'SVMTokenAmount'
1577
+ type: {
1578
+ kind: 'struct'
1579
+ fields: [
1580
+ {
1581
+ name: 'token'
1582
+ type: 'publicKey'
1583
+ },
1584
+ {
1585
+ name: 'amount'
1586
+ type: 'u64'
1587
+ },
1588
+ ]
1589
+ }
1590
+ },
1591
+ {
1592
+ name: 'CrossChainAmount'
1593
+ type: {
1594
+ kind: 'struct'
1595
+ fields: [
1596
+ {
1597
+ name: 'leBytes'
1598
+ type: {
1599
+ array: ['u8', 32]
1600
+ }
1601
+ },
1602
+ ]
1603
+ }
1604
+ },
1605
+ {
1606
+ name: 'GetFeeResult'
1607
+ type: {
1608
+ kind: 'struct'
1609
+ fields: [
1610
+ {
1611
+ name: 'amount'
1612
+ type: 'u64'
1613
+ },
1614
+ {
1615
+ name: 'juels'
1616
+ type: 'u128'
1617
+ },
1618
+ {
1619
+ name: 'token'
1620
+ type: 'publicKey'
1621
+ },
1622
+ ]
1623
+ }
1624
+ },
1625
+ {
1626
+ name: 'DestChainState'
1627
+ type: {
1628
+ kind: 'struct'
1629
+ fields: [
1630
+ {
1631
+ name: 'sequenceNumber'
1632
+ type: 'u64'
1633
+ },
1634
+ {
1635
+ name: 'sequenceNumberToRestore'
1636
+ type: 'u64'
1637
+ },
1638
+ {
1639
+ name: 'restoreOnAction'
1640
+ type: {
1641
+ defined: 'RestoreOnAction'
1642
+ }
1643
+ },
1644
+ ]
1645
+ }
1646
+ },
1647
+ {
1648
+ name: 'DestChainConfig'
1649
+ type: {
1650
+ kind: 'struct'
1651
+ fields: [
1652
+ {
1653
+ name: 'laneCodeVersion'
1654
+ type: {
1655
+ defined: 'CodeVersion'
1656
+ }
1657
+ },
1658
+ {
1659
+ name: 'allowedSenders'
1660
+ type: {
1661
+ vec: 'publicKey'
1662
+ }
1663
+ },
1664
+ {
1665
+ name: 'allowListEnabled'
1666
+ type: 'bool'
1667
+ },
1668
+ ]
1669
+ }
1670
+ },
1671
+ {
1672
+ name: 'DeriveAccountsResponse'
1673
+ type: {
1674
+ kind: 'struct'
1675
+ fields: [
1676
+ {
1677
+ name: 'askAgainWith'
1678
+ docs: [
1679
+ 'If this vector is not empty, you must call the `derive_` method again including',
1680
+ 'exactly these accounts as the `remaining_accounts` field.',
1681
+ ]
1682
+ type: {
1683
+ vec: {
1684
+ defined: 'CcipAccountMeta'
1685
+ }
1686
+ }
1687
+ },
1688
+ {
1689
+ name: 'accountsToSave'
1690
+ docs: [
1691
+ 'You must append these accounts at the end of a separate list. When `next_stage`',
1692
+ 'is finally empty, this separate list will contain all the accounts to use for the',
1693
+ 'instruction of interest.',
1694
+ ]
1695
+ type: {
1696
+ vec: {
1697
+ defined: 'CcipAccountMeta'
1698
+ }
1699
+ }
1700
+ },
1701
+ {
1702
+ name: 'lookUpTablesToSave'
1703
+ docs: [
1704
+ 'Append these look up tables at the end of a list. It will contain all LUTs',
1705
+ 'that the instruction of interest can use.',
1706
+ ]
1707
+ type: {
1708
+ vec: 'publicKey'
1709
+ }
1710
+ },
1711
+ {
1712
+ name: 'currentStage'
1713
+ docs: ['Identifies the derivation stage.']
1714
+ type: 'string'
1715
+ },
1716
+ {
1717
+ name: 'nextStage'
1718
+ docs: ['Identifies the next derivation stage. If empty, the derivation is complete.']
1719
+ type: 'string'
1720
+ },
1721
+ ]
1722
+ }
1723
+ },
1724
+ {
1725
+ name: 'CcipAccountMeta'
1726
+ type: {
1727
+ kind: 'struct'
1728
+ fields: [
1729
+ {
1730
+ name: 'pubkey'
1731
+ type: 'publicKey'
1732
+ },
1733
+ {
1734
+ name: 'isSigner'
1735
+ type: 'bool'
1736
+ },
1737
+ {
1738
+ name: 'isWritable'
1739
+ type: 'bool'
1740
+ },
1741
+ ]
1742
+ }
1743
+ },
1744
+ {
1745
+ name: 'DeriveAccountsCcipSendParams'
1746
+ type: {
1747
+ kind: 'struct'
1748
+ fields: [
1749
+ {
1750
+ name: 'destChainSelector'
1751
+ type: 'u64'
1752
+ },
1753
+ {
1754
+ name: 'ccipSendCaller'
1755
+ type: 'publicKey'
1756
+ },
1757
+ {
1758
+ name: 'message'
1759
+ type: {
1760
+ defined: 'SVM2AnyMessage'
1761
+ }
1762
+ },
1763
+ ]
1764
+ }
1765
+ },
1766
+ {
1767
+ name: 'DeriveAccountsCcipSendStage'
1768
+ type: {
1769
+ kind: 'enum'
1770
+ variants: [
1771
+ {
1772
+ name: 'Start'
1773
+ },
1774
+ {
1775
+ name: 'FinishMainAccountList'
1776
+ },
1777
+ {
1778
+ name: 'RetrieveTokenLUTs'
1779
+ },
1780
+ {
1781
+ name: 'RetrievePoolPrograms'
1782
+ },
1783
+ {
1784
+ name: 'TokenTransferStaticAccounts'
1785
+ fields: [
1786
+ {
1787
+ name: 'token'
1788
+ type: 'u32'
1789
+ },
1790
+ {
1791
+ name: 'page'
1792
+ type: 'u32'
1793
+ },
1794
+ ]
1795
+ },
1796
+ {
1797
+ name: 'NestedTokenDerive'
1798
+ fields: [
1799
+ {
1800
+ name: 'token'
1801
+ type: 'u32'
1802
+ },
1803
+ {
1804
+ name: 'tokenSubstage'
1805
+ type: 'string'
1806
+ },
1807
+ ]
1808
+ },
1809
+ ]
1810
+ }
1811
+ },
1812
+ {
1813
+ name: 'CodeVersion'
1814
+ type: {
1815
+ kind: 'enum'
1816
+ variants: [
1817
+ {
1818
+ name: 'Default'
1819
+ },
1820
+ {
1821
+ name: 'V1'
1822
+ },
1823
+ ]
1824
+ }
1825
+ },
1826
+ {
1827
+ name: 'RestoreOnAction'
1828
+ type: {
1829
+ kind: 'enum'
1830
+ variants: [
1831
+ {
1832
+ name: 'None'
1833
+ },
1834
+ {
1835
+ name: 'Upgrade'
1836
+ },
1837
+ {
1838
+ name: 'Rollback'
1839
+ },
1840
+ ]
1841
+ }
1842
+ },
1843
+ ]
1844
+ events: [
1845
+ {
1846
+ name: 'ConfigSet'
1847
+ fields: [
1848
+ {
1849
+ name: 'svmChainSelector'
1850
+ type: 'u64'
1851
+ index: false
1852
+ },
1853
+ {
1854
+ name: 'feeQuoter'
1855
+ type: 'publicKey'
1856
+ index: false
1857
+ },
1858
+ {
1859
+ name: 'rmnRemote'
1860
+ type: 'publicKey'
1861
+ index: false
1862
+ },
1863
+ {
1864
+ name: 'linkTokenMint'
1865
+ type: 'publicKey'
1866
+ index: false
1867
+ },
1868
+ {
1869
+ name: 'feeAggregator'
1870
+ type: 'publicKey'
1871
+ index: false
1872
+ },
1873
+ ]
1874
+ },
1875
+ {
1876
+ name: 'FeeTokenAdded'
1877
+ fields: [
1878
+ {
1879
+ name: 'feeToken'
1880
+ type: 'publicKey'
1881
+ index: false
1882
+ },
1883
+ {
1884
+ name: 'enabled'
1885
+ type: 'bool'
1886
+ index: false
1887
+ },
1888
+ ]
1889
+ },
1890
+ {
1891
+ name: 'FeeTokenEnabled'
1892
+ fields: [
1893
+ {
1894
+ name: 'feeToken'
1895
+ type: 'publicKey'
1896
+ index: false
1897
+ },
1898
+ ]
1899
+ },
1900
+ {
1901
+ name: 'FeeTokenDisabled'
1902
+ fields: [
1903
+ {
1904
+ name: 'feeToken'
1905
+ type: 'publicKey'
1906
+ index: false
1907
+ },
1908
+ ]
1909
+ },
1910
+ {
1911
+ name: 'FeeTokenRemoved'
1912
+ fields: [
1913
+ {
1914
+ name: 'feeToken'
1915
+ type: 'publicKey'
1916
+ index: false
1917
+ },
1918
+ ]
1919
+ },
1920
+ {
1921
+ name: 'DestChainConfigUpdated'
1922
+ fields: [
1923
+ {
1924
+ name: 'destChainSelector'
1925
+ type: 'u64'
1926
+ index: false
1927
+ },
1928
+ {
1929
+ name: 'destChainConfig'
1930
+ type: {
1931
+ defined: 'DestChainConfig'
1932
+ }
1933
+ index: false
1934
+ },
1935
+ ]
1936
+ },
1937
+ {
1938
+ name: 'DestChainAdded'
1939
+ fields: [
1940
+ {
1941
+ name: 'destChainSelector'
1942
+ type: 'u64'
1943
+ index: false
1944
+ },
1945
+ {
1946
+ name: 'destChainConfig'
1947
+ type: {
1948
+ defined: 'DestChainConfig'
1949
+ }
1950
+ index: false
1951
+ },
1952
+ ]
1953
+ },
1954
+ {
1955
+ name: 'OwnershipTransferRequested'
1956
+ fields: [
1957
+ {
1958
+ name: 'from'
1959
+ type: 'publicKey'
1960
+ index: false
1961
+ },
1962
+ {
1963
+ name: 'to'
1964
+ type: 'publicKey'
1965
+ index: false
1966
+ },
1967
+ ]
1968
+ },
1969
+ {
1970
+ name: 'OwnershipTransferred'
1971
+ fields: [
1972
+ {
1973
+ name: 'from'
1974
+ type: 'publicKey'
1975
+ index: false
1976
+ },
1977
+ {
1978
+ name: 'to'
1979
+ type: 'publicKey'
1980
+ index: false
1981
+ },
1982
+ ]
1983
+ },
1984
+ {
1985
+ name: 'OfframpAdded'
1986
+ fields: [
1987
+ {
1988
+ name: 'sourceChainSelector'
1989
+ type: 'u64'
1990
+ index: false
1991
+ },
1992
+ {
1993
+ name: 'offramp'
1994
+ type: 'publicKey'
1995
+ index: false
1996
+ },
1997
+ ]
1998
+ },
1999
+ {
2000
+ name: 'OfframpRemoved'
2001
+ fields: [
2002
+ {
2003
+ name: 'sourceChainSelector'
2004
+ type: 'u64'
2005
+ index: false
2006
+ },
2007
+ {
2008
+ name: 'offramp'
2009
+ type: 'publicKey'
2010
+ index: false
2011
+ },
2012
+ ]
2013
+ },
2014
+ {
2015
+ name: 'CcipVersionForDestChainVersionBumped'
2016
+ fields: [
2017
+ {
2018
+ name: 'destChainSelector'
2019
+ type: 'u64'
2020
+ index: false
2021
+ },
2022
+ {
2023
+ name: 'previousSequenceNumber'
2024
+ type: 'u64'
2025
+ index: false
2026
+ },
2027
+ {
2028
+ name: 'newSequenceNumber'
2029
+ type: 'u64'
2030
+ index: false
2031
+ },
2032
+ ]
2033
+ },
2034
+ {
2035
+ name: 'CcipVersionForDestChainVersionRolledBack'
2036
+ fields: [
2037
+ {
2038
+ name: 'destChainSelector'
2039
+ type: 'u64'
2040
+ index: false
2041
+ },
2042
+ {
2043
+ name: 'previousSequenceNumber'
2044
+ type: 'u64'
2045
+ index: false
2046
+ },
2047
+ {
2048
+ name: 'newSequenceNumber'
2049
+ type: 'u64'
2050
+ index: false
2051
+ },
2052
+ ]
2053
+ },
2054
+ {
2055
+ name: 'CCIPMessageSent'
2056
+ fields: [
2057
+ {
2058
+ name: 'destChainSelector'
2059
+ type: 'u64'
2060
+ index: false
2061
+ },
2062
+ {
2063
+ name: 'sequenceNumber'
2064
+ type: 'u64'
2065
+ index: false
2066
+ },
2067
+ {
2068
+ name: 'message'
2069
+ type: {
2070
+ defined: 'SVM2AnyRampMessage'
2071
+ }
2072
+ index: false
2073
+ },
2074
+ ]
2075
+ },
2076
+ {
2077
+ name: 'PoolSet'
2078
+ fields: [
2079
+ {
2080
+ name: 'token'
2081
+ type: 'publicKey'
2082
+ index: false
2083
+ },
2084
+ {
2085
+ name: 'previousPoolLookupTable'
2086
+ type: 'publicKey'
2087
+ index: false
2088
+ },
2089
+ {
2090
+ name: 'newPoolLookupTable'
2091
+ type: 'publicKey'
2092
+ index: false
2093
+ },
2094
+ ]
2095
+ },
2096
+ {
2097
+ name: 'AdministratorTransferRequested'
2098
+ fields: [
2099
+ {
2100
+ name: 'token'
2101
+ type: 'publicKey'
2102
+ index: false
2103
+ },
2104
+ {
2105
+ name: 'currentAdmin'
2106
+ type: 'publicKey'
2107
+ index: false
2108
+ },
2109
+ {
2110
+ name: 'newAdmin'
2111
+ type: 'publicKey'
2112
+ index: false
2113
+ },
2114
+ ]
2115
+ },
2116
+ {
2117
+ name: 'AdministratorTransferred'
2118
+ fields: [
2119
+ {
2120
+ name: 'token'
2121
+ type: 'publicKey'
2122
+ index: false
2123
+ },
2124
+ {
2125
+ name: 'newAdmin'
2126
+ type: 'publicKey'
2127
+ index: false
2128
+ },
2129
+ ]
2130
+ },
2131
+ {
2132
+ name: 'PoolEdited'
2133
+ fields: [
2134
+ {
2135
+ name: 'token'
2136
+ type: 'publicKey'
2137
+ index: false
2138
+ },
2139
+ {
2140
+ name: 'supportsAutoDerivation'
2141
+ type: 'bool'
2142
+ index: false
2143
+ },
2144
+ ]
2145
+ },
2146
+ {
2147
+ name: 'PdaUpgraded'
2148
+ fields: [
2149
+ {
2150
+ name: 'address'
2151
+ type: 'publicKey'
2152
+ index: false
2153
+ },
2154
+ {
2155
+ name: 'oldVersion'
2156
+ type: 'u8'
2157
+ index: false
2158
+ },
2159
+ {
2160
+ name: 'newVersion'
2161
+ type: 'u8'
2162
+ index: false
2163
+ },
2164
+ {
2165
+ name: 'name'
2166
+ type: 'string'
2167
+ index: false
2168
+ },
2169
+ {
2170
+ name: 'seeds'
2171
+ type: 'bytes'
2172
+ index: false
2173
+ },
2174
+ ]
2175
+ },
2176
+ ]
2177
+ errors: [
2178
+ {
2179
+ code: 7000
2180
+ name: 'Unauthorized'
2181
+ msg: 'The signer is unauthorized'
2182
+ },
2183
+ {
2184
+ code: 7001
2185
+ name: 'InvalidRMNRemoteAddress'
2186
+ msg: 'Invalid RMN Remote Address'
2187
+ },
2188
+ {
2189
+ code: 7002
2190
+ name: 'InvalidInputsMint'
2191
+ msg: 'Mint account input is invalid'
2192
+ },
2193
+ {
2194
+ code: 7003
2195
+ name: 'InvalidVersion'
2196
+ msg: 'Invalid version of the onchain state'
2197
+ },
2198
+ {
2199
+ code: 7004
2200
+ name: 'FeeTokenMismatch'
2201
+ msg: "Fee token doesn't match transfer token"
2202
+ },
2203
+ {
2204
+ code: 7005
2205
+ name: 'RedundantOwnerProposal'
2206
+ msg: 'Proposed owner is the current owner'
2207
+ },
2208
+ {
2209
+ code: 7006
2210
+ name: 'ReachedMaxSequenceNumber'
2211
+ msg: 'Reached max sequence number'
2212
+ },
2213
+ {
2214
+ code: 7007
2215
+ name: 'InvalidInputsTokenIndices'
2216
+ msg: 'Invalid pool account account indices'
2217
+ },
2218
+ {
2219
+ code: 7008
2220
+ name: 'InvalidInputsPoolAccounts'
2221
+ msg: 'Invalid pool accounts'
2222
+ },
2223
+ {
2224
+ code: 7009
2225
+ name: 'InvalidInputsTokenAccounts'
2226
+ msg: 'Invalid token accounts'
2227
+ },
2228
+ {
2229
+ code: 7010
2230
+ name: 'InvalidInputsTokenAdminRegistryAccounts'
2231
+ msg: 'Invalid Token Admin Registry account'
2232
+ },
2233
+ {
2234
+ code: 7011
2235
+ name: 'InvalidInputsLookupTableAccounts'
2236
+ msg: 'Invalid LookupTable account'
2237
+ },
2238
+ {
2239
+ code: 7012
2240
+ name: 'InvalidInputsLookupTableAccountWritable'
2241
+ msg: 'Invalid LookupTable account writable access'
2242
+ },
2243
+ {
2244
+ code: 7013
2245
+ name: 'InvalidInputsTokenAmount'
2246
+ msg: 'Cannot send zero tokens'
2247
+ },
2248
+ {
2249
+ code: 7014
2250
+ name: 'InvalidInputsTransferAllAmount'
2251
+ msg: 'Must specify zero amount to send alongside transfer_all'
2252
+ },
2253
+ {
2254
+ code: 7015
2255
+ name: 'InvalidInputsAtaAddress'
2256
+ msg: 'Invalid Associated Token Account address'
2257
+ },
2258
+ {
2259
+ code: 7016
2260
+ name: 'InvalidInputsAtaWritable'
2261
+ msg: 'Invalid Associated Token Account writable flag'
2262
+ },
2263
+ {
2264
+ code: 7017
2265
+ name: 'InvalidInputsChainSelector'
2266
+ msg: 'Chain selector is invalid'
2267
+ },
2268
+ {
2269
+ code: 7018
2270
+ name: 'InsufficientLamports'
2271
+ msg: 'Insufficient lamports'
2272
+ },
2273
+ {
2274
+ code: 7019
2275
+ name: 'InsufficientFunds'
2276
+ msg: 'Insufficient funds'
2277
+ },
2278
+ {
2279
+ code: 7020
2280
+ name: 'SourceTokenDataTooLarge'
2281
+ msg: 'Source token data is too large'
2282
+ },
2283
+ {
2284
+ code: 7021
2285
+ name: 'InvalidTokenAdminRegistryInputsZeroAddress'
2286
+ msg: 'New Admin can not be zero address'
2287
+ },
2288
+ {
2289
+ code: 7022
2290
+ name: 'InvalidTokenAdminRegistryProposedAdmin'
2291
+ msg: 'An already owned registry can not be proposed'
2292
+ },
2293
+ {
2294
+ code: 7023
2295
+ name: 'SenderNotAllowed'
2296
+ msg: 'Sender not allowed for that destination chain'
2297
+ },
2298
+ {
2299
+ code: 7024
2300
+ name: 'InvalidCodeVersion'
2301
+ msg: 'Invalid code version'
2302
+ },
2303
+ {
2304
+ code: 7025
2305
+ name: 'InvalidCcipVersionRollback'
2306
+ msg: 'Invalid rollback attempt on the CCIP version of the onramp to the destination chain'
2307
+ },
2308
+ {
2309
+ code: 7026
2310
+ name: 'InvalidAccountListForPdaDerivation'
2311
+ msg: 'Invalid account list for PDA derivation'
2312
+ },
2313
+ {
2314
+ code: 7027
2315
+ name: 'InvalidDerivationStage'
2316
+ msg: 'Unexpected account derivation stage'
2317
+ },
2318
+ {
2319
+ code: 7028
2320
+ name: 'InvalidNonceVersion'
2321
+ msg: 'Invalid version of the Nonce account'
2322
+ },
2323
+ {
2324
+ code: 7029
2325
+ name: 'InvalidTokenPoolAccountDerivationResponse'
2326
+ msg: 'Token pool returned an unexpected derivation response'
2327
+ },
2328
+ {
2329
+ code: 7030
2330
+ name: 'AccountDerivationResponseTooLarge'
2331
+ msg: "Can't fit account derivation response."
2332
+ },
2333
+ {
2334
+ code: 7031
2335
+ name: 'DefaultOwnerProposal'
2336
+ msg: 'Proposed owner is the default pubkey'
2337
+ },
2338
+ ]
2339
+ }
2340
+
2341
+ export const IDL: CcipRouter = {
2342
+ version: '0.1.1',
2343
+ name: 'ccip_router',
2344
+ docs: [
2345
+ 'The `ccip_router` module contains the implementation of the Cross-Chain Interoperability Protocol (CCIP) Router.',
2346
+ '',
2347
+ 'This is the Collapsed Router Program for CCIP.',
2348
+ "As it's upgradable persisting the same program id, there is no need to have an indirection of a Proxy Program.",
2349
+ 'This Router handles the OnRamp flow of the CCIP Messages.',
2350
+ '',
2351
+ 'NOTE to devs: This file however should contain *no logic*, only the entrypoints to the different versioned modules,',
2352
+ 'thus making it easier to ensure later on that logic can be changed during upgrades without affecting the interface.',
2353
+ ],
2354
+ instructions: [
2355
+ {
2356
+ name: 'initialize',
2357
+ docs: [
2358
+ 'Initialization Flow //',
2359
+ 'Initializes the CCIP Router.',
2360
+ '',
2361
+ 'The initialization of the Router is responsibility of Admin, nothing more than calling this method should be done first.',
2362
+ '',
2363
+ '# Arguments',
2364
+ '',
2365
+ '* `ctx` - The context containing the accounts required for initialization.',
2366
+ '* `svm_chain_selector` - The chain selector for SVM.',
2367
+ '* `fee_aggregator` - The public key of the fee aggregator.',
2368
+ '* `fee_quoter` - The public key of the fee quoter.',
2369
+ '* `link_token_mint` - The public key of the LINK token mint.',
2370
+ '* `rmn_remote` - The public key of the RMN remote.',
2371
+ ],
2372
+ accounts: [
2373
+ {
2374
+ name: 'config',
2375
+ isMut: true,
2376
+ isSigner: false,
2377
+ },
2378
+ {
2379
+ name: 'authority',
2380
+ isMut: true,
2381
+ isSigner: true,
2382
+ },
2383
+ {
2384
+ name: 'systemProgram',
2385
+ isMut: false,
2386
+ isSigner: false,
2387
+ },
2388
+ {
2389
+ name: 'program',
2390
+ isMut: false,
2391
+ isSigner: false,
2392
+ },
2393
+ {
2394
+ name: 'programData',
2395
+ isMut: false,
2396
+ isSigner: false,
2397
+ },
2398
+ ],
2399
+ args: [
2400
+ {
2401
+ name: 'svmChainSelector',
2402
+ type: 'u64',
2403
+ },
2404
+ {
2405
+ name: 'feeAggregator',
2406
+ type: 'publicKey',
2407
+ },
2408
+ {
2409
+ name: 'feeQuoter',
2410
+ type: 'publicKey',
2411
+ },
2412
+ {
2413
+ name: 'linkTokenMint',
2414
+ type: 'publicKey',
2415
+ },
2416
+ {
2417
+ name: 'rmnRemote',
2418
+ type: 'publicKey',
2419
+ },
2420
+ ],
2421
+ },
2422
+ {
2423
+ name: 'typeVersion',
2424
+ docs: [
2425
+ 'Returns the program type (name) and version.',
2426
+ 'Used by offchain code to easily determine which program & version is being interacted with.',
2427
+ '',
2428
+ '# Arguments',
2429
+ '* `ctx` - The context',
2430
+ ],
2431
+ accounts: [
2432
+ {
2433
+ name: 'clock',
2434
+ isMut: false,
2435
+ isSigner: false,
2436
+ },
2437
+ ],
2438
+ args: [],
2439
+ returns: 'string',
2440
+ },
2441
+ {
2442
+ name: 'transferOwnership',
2443
+ docs: [
2444
+ 'Transfers the ownership of the router to a new proposed owner.',
2445
+ '',
2446
+ 'Shared func signature with other programs',
2447
+ '',
2448
+ '# Arguments',
2449
+ '',
2450
+ '* `ctx` - The context containing the accounts required for the transfer.',
2451
+ '* `proposed_owner` - The public key of the new proposed owner.',
2452
+ ],
2453
+ accounts: [
2454
+ {
2455
+ name: 'config',
2456
+ isMut: true,
2457
+ isSigner: false,
2458
+ },
2459
+ {
2460
+ name: 'authority',
2461
+ isMut: false,
2462
+ isSigner: true,
2463
+ },
2464
+ ],
2465
+ args: [
2466
+ {
2467
+ name: 'proposedOwner',
2468
+ type: 'publicKey',
2469
+ },
2470
+ ],
2471
+ },
2472
+ {
2473
+ name: 'acceptOwnership',
2474
+ docs: [
2475
+ 'Accepts the ownership of the router by the proposed owner.',
2476
+ '',
2477
+ 'Shared func signature with other programs',
2478
+ '',
2479
+ '# Arguments',
2480
+ '',
2481
+ '* `ctx` - The context containing the accounts required for accepting ownership.',
2482
+ 'The new owner must be a signer of the transaction.',
2483
+ ],
2484
+ accounts: [
2485
+ {
2486
+ name: 'config',
2487
+ isMut: true,
2488
+ isSigner: false,
2489
+ },
2490
+ {
2491
+ name: 'authority',
2492
+ isMut: false,
2493
+ isSigner: true,
2494
+ },
2495
+ ],
2496
+ args: [],
2497
+ },
2498
+ {
2499
+ name: 'setDefaultCodeVersion',
2500
+ docs: [
2501
+ 'Config //',
2502
+ 'Sets the default code version to be used. This is then used by the slim routing layer to determine',
2503
+ 'which version of the versioned business logic module (`instructions`) to use. Only the admin may set this.',
2504
+ '',
2505
+ 'Shared func signature with other programs',
2506
+ '',
2507
+ '# Arguments',
2508
+ '',
2509
+ '* `ctx` - The context containing the accounts required for updating the configuration.',
2510
+ '* `code_version` - The new code version to be set as default.',
2511
+ ],
2512
+ accounts: [
2513
+ {
2514
+ name: 'config',
2515
+ isMut: true,
2516
+ isSigner: false,
2517
+ },
2518
+ {
2519
+ name: 'authority',
2520
+ isMut: false,
2521
+ isSigner: true,
2522
+ },
2523
+ {
2524
+ name: 'systemProgram',
2525
+ isMut: false,
2526
+ isSigner: false,
2527
+ },
2528
+ ],
2529
+ args: [
2530
+ {
2531
+ name: 'codeVersion',
2532
+ type: {
2533
+ defined: 'CodeVersion',
2534
+ },
2535
+ },
2536
+ ],
2537
+ },
2538
+ {
2539
+ name: 'setLinkTokenMint',
2540
+ docs: [
2541
+ 'Sets the address of the LINK token mint.',
2542
+ 'The Admin is the only one able to set it.',
2543
+ '',
2544
+ '# Arguments',
2545
+ '',
2546
+ '* `ctx` - The context containing the accounts required for updating the configuration.',
2547
+ '* `link_token_mint` - The new address of the LINK token mint.',
2548
+ ],
2549
+ accounts: [
2550
+ {
2551
+ name: 'config',
2552
+ isMut: true,
2553
+ isSigner: false,
2554
+ },
2555
+ {
2556
+ name: 'authority',
2557
+ isMut: false,
2558
+ isSigner: true,
2559
+ },
2560
+ {
2561
+ name: 'systemProgram',
2562
+ isMut: false,
2563
+ isSigner: false,
2564
+ },
2565
+ ],
2566
+ args: [
2567
+ {
2568
+ name: 'linkTokenMint',
2569
+ type: 'publicKey',
2570
+ },
2571
+ ],
2572
+ },
2573
+ {
2574
+ name: 'updateFeeAggregator',
2575
+ docs: [
2576
+ 'Updates the fee aggregator in the router configuration.',
2577
+ 'The Admin is the only one able to update the fee aggregator.',
2578
+ '',
2579
+ '# Arguments',
2580
+ '',
2581
+ '* `ctx` - The context containing the accounts required for updating the configuration.',
2582
+ '* `fee_aggregator` - The new fee aggregator address (ATAs will be derived for it for each token).',
2583
+ ],
2584
+ accounts: [
2585
+ {
2586
+ name: 'config',
2587
+ isMut: true,
2588
+ isSigner: false,
2589
+ },
2590
+ {
2591
+ name: 'authority',
2592
+ isMut: false,
2593
+ isSigner: true,
2594
+ },
2595
+ {
2596
+ name: 'systemProgram',
2597
+ isMut: false,
2598
+ isSigner: false,
2599
+ },
2600
+ ],
2601
+ args: [
2602
+ {
2603
+ name: 'feeAggregator',
2604
+ type: 'publicKey',
2605
+ },
2606
+ ],
2607
+ },
2608
+ {
2609
+ name: 'updateRmnRemote',
2610
+ docs: [
2611
+ 'Updates the RMN remote program in the router configuration.',
2612
+ 'The Admin is the only one able to update the RMN remote program.',
2613
+ '',
2614
+ '# Arguments',
2615
+ '',
2616
+ '* `ctx` - The context containing the accounts required for updating the configuration.',
2617
+ '* `rmn_remote,` - The new RMN remote address.',
2618
+ ],
2619
+ accounts: [
2620
+ {
2621
+ name: 'config',
2622
+ isMut: true,
2623
+ isSigner: false,
2624
+ },
2625
+ {
2626
+ name: 'authority',
2627
+ isMut: false,
2628
+ isSigner: true,
2629
+ },
2630
+ {
2631
+ name: 'systemProgram',
2632
+ isMut: false,
2633
+ isSigner: false,
2634
+ },
2635
+ ],
2636
+ args: [
2637
+ {
2638
+ name: 'rmnRemote',
2639
+ type: 'publicKey',
2640
+ },
2641
+ ],
2642
+ },
2643
+ {
2644
+ name: 'addChainSelector',
2645
+ docs: [
2646
+ 'Adds a new chain selector to the router.',
2647
+ '',
2648
+ 'The Admin needs to add any new chain supported (this means both OnRamp and OffRamp).',
2649
+ "When adding a new chain, the Admin needs to specify if it's enabled or not.",
2650
+ 'They may enable only source, or only destination, or neither, or both.',
2651
+ '',
2652
+ '# Arguments',
2653
+ '',
2654
+ '* `ctx` - The context containing the accounts required for adding the chain selector.',
2655
+ '* `new_chain_selector` - The new chain selector to be added.',
2656
+ '* `source_chain_config` - The configuration for the chain as source.',
2657
+ '* `dest_chain_config` - The configuration for the chain as destination.',
2658
+ ],
2659
+ accounts: [
2660
+ {
2661
+ name: 'destChainState',
2662
+ isMut: true,
2663
+ isSigner: false,
2664
+ },
2665
+ {
2666
+ name: 'config',
2667
+ isMut: false,
2668
+ isSigner: false,
2669
+ },
2670
+ {
2671
+ name: 'authority',
2672
+ isMut: true,
2673
+ isSigner: true,
2674
+ },
2675
+ {
2676
+ name: 'systemProgram',
2677
+ isMut: false,
2678
+ isSigner: false,
2679
+ },
2680
+ ],
2681
+ args: [
2682
+ {
2683
+ name: 'newChainSelector',
2684
+ type: 'u64',
2685
+ },
2686
+ {
2687
+ name: 'destChainConfig',
2688
+ type: {
2689
+ defined: 'DestChainConfig',
2690
+ },
2691
+ },
2692
+ ],
2693
+ },
2694
+ {
2695
+ name: 'updateDestChainConfig',
2696
+ docs: [
2697
+ 'Updates the configuration of the destination chain selector.',
2698
+ '',
2699
+ 'The Admin is the only one able to update the destination chain config.',
2700
+ '',
2701
+ '# Arguments',
2702
+ '',
2703
+ '* `ctx` - The context containing the accounts required for updating the chain selector.',
2704
+ '* `dest_chain_selector` - The destination chain selector to be updated.',
2705
+ '* `dest_chain_config` - The new configuration for the destination chain.',
2706
+ ],
2707
+ accounts: [
2708
+ {
2709
+ name: 'destChainState',
2710
+ isMut: true,
2711
+ isSigner: false,
2712
+ },
2713
+ {
2714
+ name: 'config',
2715
+ isMut: false,
2716
+ isSigner: false,
2717
+ },
2718
+ {
2719
+ name: 'authority',
2720
+ isMut: true,
2721
+ isSigner: true,
2722
+ },
2723
+ {
2724
+ name: 'systemProgram',
2725
+ isMut: false,
2726
+ isSigner: false,
2727
+ },
2728
+ ],
2729
+ args: [
2730
+ {
2731
+ name: 'destChainSelector',
2732
+ type: 'u64',
2733
+ },
2734
+ {
2735
+ name: 'destChainConfig',
2736
+ type: {
2737
+ defined: 'DestChainConfig',
2738
+ },
2739
+ },
2740
+ ],
2741
+ },
2742
+ {
2743
+ name: 'addOfframp',
2744
+ docs: [
2745
+ 'Add an offramp address to the list of offramps allowed by the router, for a',
2746
+ 'particular source chain. External users will check this list before accepting',
2747
+ 'a `ccip_receive` CPI.',
2748
+ '',
2749
+ '# Arguments',
2750
+ '',
2751
+ '* `ctx` - The context containing the accounts required for this operation.',
2752
+ "* `source_chain_selector` - The source chain for the offramp's lane.",
2753
+ "* `offramp` - The offramp's address.",
2754
+ ],
2755
+ accounts: [
2756
+ {
2757
+ name: 'allowedOfframp',
2758
+ isMut: true,
2759
+ isSigner: false,
2760
+ },
2761
+ {
2762
+ name: 'config',
2763
+ isMut: false,
2764
+ isSigner: false,
2765
+ },
2766
+ {
2767
+ name: 'authority',
2768
+ isMut: true,
2769
+ isSigner: true,
2770
+ },
2771
+ {
2772
+ name: 'systemProgram',
2773
+ isMut: false,
2774
+ isSigner: false,
2775
+ },
2776
+ ],
2777
+ args: [
2778
+ {
2779
+ name: 'sourceChainSelector',
2780
+ type: 'u64',
2781
+ },
2782
+ {
2783
+ name: 'offramp',
2784
+ type: 'publicKey',
2785
+ },
2786
+ ],
2787
+ },
2788
+ {
2789
+ name: 'removeOfframp',
2790
+ docs: [
2791
+ 'Remove an offramp address from the list of offramps allowed by the router, for a',
2792
+ 'particular source chain. External users will check this list before accepting',
2793
+ 'a `ccip_receive` CPI.',
2794
+ '',
2795
+ '# Arguments',
2796
+ '',
2797
+ '* `ctx` - The context containing the accounts required for this operation.',
2798
+ "* `source_chain_selector` - The source chain for the offramp's lane.",
2799
+ "* `offramp` - The offramp's address.",
2800
+ ],
2801
+ accounts: [
2802
+ {
2803
+ name: 'allowedOfframp',
2804
+ isMut: true,
2805
+ isSigner: false,
2806
+ },
2807
+ {
2808
+ name: 'config',
2809
+ isMut: false,
2810
+ isSigner: false,
2811
+ },
2812
+ {
2813
+ name: 'authority',
2814
+ isMut: true,
2815
+ isSigner: true,
2816
+ },
2817
+ {
2818
+ name: 'systemProgram',
2819
+ isMut: false,
2820
+ isSigner: false,
2821
+ },
2822
+ ],
2823
+ args: [
2824
+ {
2825
+ name: 'sourceChainSelector',
2826
+ type: 'u64',
2827
+ },
2828
+ {
2829
+ name: 'offramp',
2830
+ type: 'publicKey',
2831
+ },
2832
+ ],
2833
+ },
2834
+ {
2835
+ name: 'updateSvmChainSelector',
2836
+ docs: [
2837
+ 'Updates the SVM chain selector in the router configuration.',
2838
+ '',
2839
+ 'This method should only be used if there was an error with the initial configuration or if the solana chain selector changes.',
2840
+ '',
2841
+ '# Arguments',
2842
+ '',
2843
+ '* `ctx` - The context containing the accounts required for updating the configuration.',
2844
+ '* `new_chain_selector` - The new chain selector for SVM.',
2845
+ ],
2846
+ accounts: [
2847
+ {
2848
+ name: 'config',
2849
+ isMut: true,
2850
+ isSigner: false,
2851
+ },
2852
+ {
2853
+ name: 'authority',
2854
+ isMut: false,
2855
+ isSigner: true,
2856
+ },
2857
+ {
2858
+ name: 'systemProgram',
2859
+ isMut: false,
2860
+ isSigner: false,
2861
+ },
2862
+ ],
2863
+ args: [
2864
+ {
2865
+ name: 'newChainSelector',
2866
+ type: 'u64',
2867
+ },
2868
+ ],
2869
+ },
2870
+ {
2871
+ name: 'bumpCcipVersionForDestChain',
2872
+ docs: [
2873
+ 'Bumps the CCIP version for a destination chain.',
2874
+ 'This effectively just resets the sequence number of the destination chain state.',
2875
+ 'If there had been a previous rollback, on re-upgrade the sequence number will resume from where it was',
2876
+ 'prior to the rollback.',
2877
+ '',
2878
+ '# Arguments',
2879
+ '* `ctx` - The context containing the accounts required for the bump.',
2880
+ '* `dest_chain_selector` - The destination chain selector to bump version for.',
2881
+ ],
2882
+ accounts: [
2883
+ {
2884
+ name: 'destChainState',
2885
+ isMut: true,
2886
+ isSigner: false,
2887
+ },
2888
+ {
2889
+ name: 'config',
2890
+ isMut: false,
2891
+ isSigner: false,
2892
+ },
2893
+ {
2894
+ name: 'authority',
2895
+ isMut: true,
2896
+ isSigner: true,
2897
+ },
2898
+ ],
2899
+ args: [
2900
+ {
2901
+ name: 'destChainSelector',
2902
+ type: 'u64',
2903
+ },
2904
+ ],
2905
+ },
2906
+ {
2907
+ name: 'rollbackCcipVersionForDestChain',
2908
+ docs: [
2909
+ 'Rolls back the CCIP version for a destination chain.',
2910
+ "This effectively just restores the old version's sequence number of the destination chain state.",
2911
+ "We only support 1 consecutive rollback. If a rollback has occurred for that lane, the version can't",
2912
+ 'be rolled back again without bumping the version first.',
2913
+ '',
2914
+ '# Arguments',
2915
+ '* `ctx` - The context containing the accounts required for the rollback.',
2916
+ '* `dest_chain_selector` - The destination chain selector to rollback the version for.',
2917
+ ],
2918
+ accounts: [
2919
+ {
2920
+ name: 'destChainState',
2921
+ isMut: true,
2922
+ isSigner: false,
2923
+ },
2924
+ {
2925
+ name: 'config',
2926
+ isMut: false,
2927
+ isSigner: false,
2928
+ },
2929
+ {
2930
+ name: 'authority',
2931
+ isMut: true,
2932
+ isSigner: true,
2933
+ },
2934
+ ],
2935
+ args: [
2936
+ {
2937
+ name: 'destChainSelector',
2938
+ type: 'u64',
2939
+ },
2940
+ ],
2941
+ },
2942
+ {
2943
+ name: 'ccipAdminProposeAdministrator',
2944
+ docs: [
2945
+ 'Token Admin Registry //',
2946
+ 'Registers the Token Admin Registry via the CCIP Admin',
2947
+ '',
2948
+ '# Arguments',
2949
+ '',
2950
+ '* `ctx` - The context containing the accounts required for registration.',
2951
+ '* `token_admin_registry_admin` - The public key of the token admin registry admin to propose.',
2952
+ ],
2953
+ accounts: [
2954
+ {
2955
+ name: 'config',
2956
+ isMut: false,
2957
+ isSigner: false,
2958
+ },
2959
+ {
2960
+ name: 'tokenAdminRegistry',
2961
+ isMut: true,
2962
+ isSigner: false,
2963
+ },
2964
+ {
2965
+ name: 'mint',
2966
+ isMut: false,
2967
+ isSigner: false,
2968
+ },
2969
+ {
2970
+ name: 'authority',
2971
+ isMut: true,
2972
+ isSigner: true,
2973
+ },
2974
+ {
2975
+ name: 'systemProgram',
2976
+ isMut: false,
2977
+ isSigner: false,
2978
+ },
2979
+ ],
2980
+ args: [
2981
+ {
2982
+ name: 'tokenAdminRegistryAdmin',
2983
+ type: 'publicKey',
2984
+ },
2985
+ ],
2986
+ },
2987
+ {
2988
+ name: 'ccipAdminOverridePendingAdministrator',
2989
+ docs: [
2990
+ 'Overrides the pending admin of the Token Admin Registry',
2991
+ '',
2992
+ '# Arguments',
2993
+ '',
2994
+ '* `ctx` - The context containing the accounts required for registration.',
2995
+ '* `token_admin_registry_admin` - The public key of the token admin registry admin to propose.',
2996
+ ],
2997
+ accounts: [
2998
+ {
2999
+ name: 'config',
3000
+ isMut: false,
3001
+ isSigner: false,
3002
+ },
3003
+ {
3004
+ name: 'tokenAdminRegistry',
3005
+ isMut: true,
3006
+ isSigner: false,
3007
+ },
3008
+ {
3009
+ name: 'mint',
3010
+ isMut: false,
3011
+ isSigner: false,
3012
+ },
3013
+ {
3014
+ name: 'authority',
3015
+ isMut: true,
3016
+ isSigner: true,
3017
+ },
3018
+ {
3019
+ name: 'systemProgram',
3020
+ isMut: false,
3021
+ isSigner: false,
3022
+ },
3023
+ ],
3024
+ args: [
3025
+ {
3026
+ name: 'tokenAdminRegistryAdmin',
3027
+ type: 'publicKey',
3028
+ },
3029
+ ],
3030
+ },
3031
+ {
3032
+ name: 'ownerProposeAdministrator',
3033
+ docs: [
3034
+ 'Registers the Token Admin Registry by the token owner.',
3035
+ '',
3036
+ 'The Authority of the Mint Token can claim the registry of the token.',
3037
+ '',
3038
+ '# Arguments',
3039
+ '',
3040
+ '* `ctx` - The context containing the accounts required for registration.',
3041
+ '* `token_admin_registry_admin` - The public key of the token admin registry admin to propose.',
3042
+ ],
3043
+ accounts: [
3044
+ {
3045
+ name: 'config',
3046
+ isMut: false,
3047
+ isSigner: false,
3048
+ },
3049
+ {
3050
+ name: 'tokenAdminRegistry',
3051
+ isMut: true,
3052
+ isSigner: false,
3053
+ },
3054
+ {
3055
+ name: 'mint',
3056
+ isMut: false,
3057
+ isSigner: false,
3058
+ },
3059
+ {
3060
+ name: 'authority',
3061
+ isMut: true,
3062
+ isSigner: true,
3063
+ },
3064
+ {
3065
+ name: 'systemProgram',
3066
+ isMut: false,
3067
+ isSigner: false,
3068
+ },
3069
+ ],
3070
+ args: [
3071
+ {
3072
+ name: 'tokenAdminRegistryAdmin',
3073
+ type: 'publicKey',
3074
+ },
3075
+ ],
3076
+ },
3077
+ {
3078
+ name: 'ownerOverridePendingAdministrator',
3079
+ docs: [
3080
+ 'Overrides the pending admin of the Token Admin Registry by the token owner',
3081
+ '',
3082
+ '# Arguments',
3083
+ '',
3084
+ '* `ctx` - The context containing the accounts required for registration.',
3085
+ '* `token_admin_registry_admin` - The public key of the token admin registry admin to propose.',
3086
+ ],
3087
+ accounts: [
3088
+ {
3089
+ name: 'config',
3090
+ isMut: false,
3091
+ isSigner: false,
3092
+ },
3093
+ {
3094
+ name: 'tokenAdminRegistry',
3095
+ isMut: true,
3096
+ isSigner: false,
3097
+ },
3098
+ {
3099
+ name: 'mint',
3100
+ isMut: false,
3101
+ isSigner: false,
3102
+ },
3103
+ {
3104
+ name: 'authority',
3105
+ isMut: true,
3106
+ isSigner: true,
3107
+ },
3108
+ {
3109
+ name: 'systemProgram',
3110
+ isMut: false,
3111
+ isSigner: false,
3112
+ },
3113
+ ],
3114
+ args: [
3115
+ {
3116
+ name: 'tokenAdminRegistryAdmin',
3117
+ type: 'publicKey',
3118
+ },
3119
+ ],
3120
+ },
3121
+ {
3122
+ name: 'acceptAdminRoleTokenAdminRegistry',
3123
+ docs: [
3124
+ 'Accepts the admin role of the token admin registry.',
3125
+ '',
3126
+ 'The Pending Admin must call this function to accept the admin role of the Token Admin Registry.',
3127
+ '',
3128
+ '# Arguments',
3129
+ '',
3130
+ '* `ctx` - The context containing the accounts required for accepting the admin role.',
3131
+ '* `mint` - The public key of the token mint.',
3132
+ ],
3133
+ accounts: [
3134
+ {
3135
+ name: 'config',
3136
+ isMut: false,
3137
+ isSigner: false,
3138
+ },
3139
+ {
3140
+ name: 'tokenAdminRegistry',
3141
+ isMut: true,
3142
+ isSigner: false,
3143
+ },
3144
+ {
3145
+ name: 'mint',
3146
+ isMut: false,
3147
+ isSigner: false,
3148
+ },
3149
+ {
3150
+ name: 'authority',
3151
+ isMut: true,
3152
+ isSigner: true,
3153
+ },
3154
+ ],
3155
+ args: [],
3156
+ },
3157
+ {
3158
+ name: 'transferAdminRoleTokenAdminRegistry',
3159
+ docs: [
3160
+ 'Transfers the admin role of the token admin registry to a new admin.',
3161
+ '',
3162
+ "Only the Admin can transfer the Admin Role of the Token Admin Registry, this setups the Pending Admin and then it's their responsibility to accept the role.",
3163
+ '',
3164
+ '# Arguments',
3165
+ '',
3166
+ '* `ctx` - The context containing the accounts required for the transfer.',
3167
+ '* `mint` - The public key of the token mint.',
3168
+ '* `new_admin` - The public key of the new admin.',
3169
+ ],
3170
+ accounts: [
3171
+ {
3172
+ name: 'config',
3173
+ isMut: false,
3174
+ isSigner: false,
3175
+ },
3176
+ {
3177
+ name: 'tokenAdminRegistry',
3178
+ isMut: true,
3179
+ isSigner: false,
3180
+ },
3181
+ {
3182
+ name: 'mint',
3183
+ isMut: false,
3184
+ isSigner: false,
3185
+ },
3186
+ {
3187
+ name: 'authority',
3188
+ isMut: true,
3189
+ isSigner: true,
3190
+ },
3191
+ ],
3192
+ args: [
3193
+ {
3194
+ name: 'newAdmin',
3195
+ type: 'publicKey',
3196
+ },
3197
+ ],
3198
+ },
3199
+ {
3200
+ name: 'setPoolSupportsAutoDerivation',
3201
+ docs: [
3202
+ 'Edits the pool config flags for a given token mint.',
3203
+ '',
3204
+ 'The administrator of the token admin registry is the only one allowed to invoke this.',
3205
+ '',
3206
+ '# Arguments',
3207
+ '',
3208
+ '* `ctx` - The context containing the accounts required for setting the pool.',
3209
+ '* `mint` - The mint of the pool to be edited.',
3210
+ '* `supports_auto_derivation` - A boolean flag indicating whether the pool supports auto-derivation of accounts.',
3211
+ ],
3212
+ accounts: [
3213
+ {
3214
+ name: 'config',
3215
+ isMut: false,
3216
+ isSigner: false,
3217
+ },
3218
+ {
3219
+ name: 'tokenAdminRegistry',
3220
+ isMut: true,
3221
+ isSigner: false,
3222
+ },
3223
+ {
3224
+ name: 'authority',
3225
+ isMut: true,
3226
+ isSigner: true,
3227
+ },
3228
+ ],
3229
+ args: [
3230
+ {
3231
+ name: 'mint',
3232
+ type: 'publicKey',
3233
+ },
3234
+ {
3235
+ name: 'supportsAutoDerivation',
3236
+ type: 'bool',
3237
+ },
3238
+ ],
3239
+ },
3240
+ {
3241
+ name: 'upgradeTokenAdminRegistryFromV1',
3242
+ docs: [
3243
+ 'Upgrades the Token Admin Registry from version 1 to the current version.',
3244
+ '',
3245
+ 'Anyone may invoke this method, as the upgrade has safe defaults for any new value,',
3246
+ 'and those can then be changed by the Token Admin Registry Admin via separate instructions.',
3247
+ '',
3248
+ '# Arguments',
3249
+ '',
3250
+ '* `ctx` - The context containing the accounts required for the upgrade.',
3251
+ ],
3252
+ accounts: [
3253
+ {
3254
+ name: 'config',
3255
+ isMut: false,
3256
+ isSigner: false,
3257
+ },
3258
+ {
3259
+ name: 'tokenAdminRegistry',
3260
+ isMut: true,
3261
+ isSigner: false,
3262
+ docs: [
3263
+ "types Anchor would attempt to deserialize the data _before_ realloc'ing it, which would fail.",
3264
+ 'The code will load it and realloc it to the new size manually, and migrate its data.',
3265
+ ],
3266
+ },
3267
+ {
3268
+ name: 'mint',
3269
+ isMut: false,
3270
+ isSigner: false,
3271
+ },
3272
+ {
3273
+ name: 'authority',
3274
+ isMut: true,
3275
+ isSigner: true,
3276
+ },
3277
+ {
3278
+ name: 'systemProgram',
3279
+ isMut: false,
3280
+ isSigner: false,
3281
+ },
3282
+ ],
3283
+ args: [],
3284
+ },
3285
+ {
3286
+ name: 'setPool',
3287
+ docs: [
3288
+ 'Sets the pool lookup table for a given token mint.',
3289
+ '',
3290
+ 'The administrator of the token admin registry can set the pool lookup table for a given token mint.',
3291
+ '',
3292
+ '# Arguments',
3293
+ '',
3294
+ '* `ctx` - The context containing the accounts required for setting the pool.',
3295
+ '* `writable_indexes` - a bit map of the indexes of the accounts in lookup table that are writable',
3296
+ ],
3297
+ accounts: [
3298
+ {
3299
+ name: 'config',
3300
+ isMut: false,
3301
+ isSigner: false,
3302
+ },
3303
+ {
3304
+ name: 'tokenAdminRegistry',
3305
+ isMut: true,
3306
+ isSigner: false,
3307
+ },
3308
+ {
3309
+ name: 'mint',
3310
+ isMut: false,
3311
+ isSigner: false,
3312
+ },
3313
+ {
3314
+ name: 'poolLookuptable',
3315
+ isMut: false,
3316
+ isSigner: false,
3317
+ },
3318
+ {
3319
+ name: 'authority',
3320
+ isMut: true,
3321
+ isSigner: true,
3322
+ },
3323
+ ],
3324
+ args: [
3325
+ {
3326
+ name: 'writableIndexes',
3327
+ type: 'bytes',
3328
+ },
3329
+ ],
3330
+ },
3331
+ {
3332
+ name: 'withdrawBilledFunds',
3333
+ docs: [
3334
+ 'Billing //',
3335
+ 'Transfers the accumulated billed fees in a particular token to an arbitrary token account.',
3336
+ 'Only the CCIP Admin can withdraw billed funds.',
3337
+ '',
3338
+ '# Arguments',
3339
+ '',
3340
+ '* `ctx` - The context containing the accounts required for the transfer of billed fees.',
3341
+ '* `transfer_all` - A flag indicating whether to transfer all the accumulated fees in that token or not.',
3342
+ '* `desired_amount` - The amount to transfer. If `transfer_all` is true, this value must be 0.',
3343
+ ],
3344
+ accounts: [
3345
+ {
3346
+ name: 'feeTokenMint',
3347
+ isMut: false,
3348
+ isSigner: false,
3349
+ },
3350
+ {
3351
+ name: 'feeTokenAccum',
3352
+ isMut: true,
3353
+ isSigner: false,
3354
+ },
3355
+ {
3356
+ name: 'recipient',
3357
+ isMut: true,
3358
+ isSigner: false,
3359
+ },
3360
+ {
3361
+ name: 'tokenProgram',
3362
+ isMut: false,
3363
+ isSigner: false,
3364
+ },
3365
+ {
3366
+ name: 'feeBillingSigner',
3367
+ isMut: false,
3368
+ isSigner: false,
3369
+ },
3370
+ {
3371
+ name: 'config',
3372
+ isMut: false,
3373
+ isSigner: false,
3374
+ },
3375
+ {
3376
+ name: 'authority',
3377
+ isMut: true,
3378
+ isSigner: true,
3379
+ },
3380
+ ],
3381
+ args: [
3382
+ {
3383
+ name: 'transferAll',
3384
+ type: 'bool',
3385
+ },
3386
+ {
3387
+ name: 'desiredAmount',
3388
+ type: 'u64',
3389
+ },
3390
+ ],
3391
+ },
3392
+ {
3393
+ name: 'ccipSend',
3394
+ docs: [
3395
+ 'On Ramp Flow //',
3396
+ 'Sends a message to the destination chain.',
3397
+ '',
3398
+ 'Request a message to be sent to the destination chain.',
3399
+ 'The method name needs to be ccip_send with Anchor encoding.',
3400
+ 'This function is called by the CCIP Sender Contract (or final user) to send a message to the CCIP Router.',
3401
+ 'The message will be sent to the receiver on the destination chain selector.',
3402
+ 'This message emits the event CCIPMessageSent with all the necessary data to be retrieved by the OffChain Code',
3403
+ '',
3404
+ '# Arguments',
3405
+ '',
3406
+ '* `ctx` - The context containing the accounts required for sending the message.',
3407
+ '* `dest_chain_selector` - The chain selector for the destination chain.',
3408
+ '* `message` - The message to be sent. The size limit of data is 256 bytes.',
3409
+ '* `token_indexes` - Indices into the remaining accounts vector where the subslice for a token begins.',
3410
+ ],
3411
+ accounts: [
3412
+ {
3413
+ name: 'config',
3414
+ isMut: false,
3415
+ isSigner: false,
3416
+ },
3417
+ {
3418
+ name: 'destChainState',
3419
+ isMut: true,
3420
+ isSigner: false,
3421
+ },
3422
+ {
3423
+ name: 'nonce',
3424
+ isMut: true,
3425
+ isSigner: false,
3426
+ docs: [
3427
+ 'CHECK this represents the PDA where the message counters are stored. As it may be initialized or not,',
3428
+ "and it may be in it's v1 or v2 form, it is an UncheckedAccount and the code handles all cases manually.",
3429
+ ],
3430
+ },
3431
+ {
3432
+ name: 'authority',
3433
+ isMut: true,
3434
+ isSigner: true,
3435
+ },
3436
+ {
3437
+ name: 'systemProgram',
3438
+ isMut: false,
3439
+ isSigner: false,
3440
+ },
3441
+ {
3442
+ name: 'feeTokenProgram',
3443
+ isMut: false,
3444
+ isSigner: false,
3445
+ },
3446
+ {
3447
+ name: 'feeTokenMint',
3448
+ isMut: false,
3449
+ isSigner: false,
3450
+ },
3451
+ {
3452
+ name: 'feeTokenUserAssociatedAccount',
3453
+ isMut: true,
3454
+ isSigner: false,
3455
+ docs: ['If paying with native SOL, this must be the zero address.'],
3456
+ },
3457
+ {
3458
+ name: 'feeTokenReceiver',
3459
+ isMut: true,
3460
+ isSigner: false,
3461
+ },
3462
+ {
3463
+ name: 'feeBillingSigner',
3464
+ isMut: false,
3465
+ isSigner: false,
3466
+ },
3467
+ {
3468
+ name: 'feeQuoter',
3469
+ isMut: false,
3470
+ isSigner: false,
3471
+ },
3472
+ {
3473
+ name: 'feeQuoterConfig',
3474
+ isMut: false,
3475
+ isSigner: false,
3476
+ },
3477
+ {
3478
+ name: 'feeQuoterDestChain',
3479
+ isMut: false,
3480
+ isSigner: false,
3481
+ },
3482
+ {
3483
+ name: 'feeQuoterBillingTokenConfig',
3484
+ isMut: false,
3485
+ isSigner: false,
3486
+ },
3487
+ {
3488
+ name: 'feeQuoterLinkTokenConfig',
3489
+ isMut: false,
3490
+ isSigner: false,
3491
+ },
3492
+ {
3493
+ name: 'rmnRemote',
3494
+ isMut: false,
3495
+ isSigner: false,
3496
+ },
3497
+ {
3498
+ name: 'rmnRemoteCurses',
3499
+ isMut: false,
3500
+ isSigner: false,
3501
+ },
3502
+ {
3503
+ name: 'rmnRemoteConfig',
3504
+ isMut: false,
3505
+ isSigner: false,
3506
+ },
3507
+ ],
3508
+ args: [
3509
+ {
3510
+ name: 'destChainSelector',
3511
+ type: 'u64',
3512
+ },
3513
+ {
3514
+ name: 'message',
3515
+ type: {
3516
+ defined: 'SVM2AnyMessage',
3517
+ },
3518
+ },
3519
+ {
3520
+ name: 'tokenIndexes',
3521
+ type: 'bytes',
3522
+ },
3523
+ ],
3524
+ returns: {
3525
+ array: ['u8', 32],
3526
+ },
3527
+ },
3528
+ {
3529
+ name: 'getFee',
3530
+ docs: [
3531
+ 'Queries the onramp for the fee required to send a message.',
3532
+ '',
3533
+ "This call is permissionless. Note it does not verify whether there's a curse active",
3534
+ 'in order to avoid the RMN CPI overhead.',
3535
+ '',
3536
+ '# Arguments',
3537
+ '',
3538
+ '* `ctx` - The context containing the accounts required for obtaining the message fee.',
3539
+ '* `dest_chain_selector` - The chain selector for the destination chain.',
3540
+ '* `message` - The message to be sent. The size limit of data is 256 bytes.',
3541
+ ],
3542
+ accounts: [
3543
+ {
3544
+ name: 'config',
3545
+ isMut: false,
3546
+ isSigner: false,
3547
+ },
3548
+ {
3549
+ name: 'destChainState',
3550
+ isMut: false,
3551
+ isSigner: false,
3552
+ },
3553
+ {
3554
+ name: 'feeQuoter',
3555
+ isMut: false,
3556
+ isSigner: false,
3557
+ },
3558
+ {
3559
+ name: 'feeQuoterConfig',
3560
+ isMut: false,
3561
+ isSigner: false,
3562
+ },
3563
+ {
3564
+ name: 'feeQuoterDestChain',
3565
+ isMut: false,
3566
+ isSigner: false,
3567
+ },
3568
+ {
3569
+ name: 'feeQuoterBillingTokenConfig',
3570
+ isMut: false,
3571
+ isSigner: false,
3572
+ },
3573
+ {
3574
+ name: 'feeQuoterLinkTokenConfig',
3575
+ isMut: false,
3576
+ isSigner: false,
3577
+ },
3578
+ ],
3579
+ args: [
3580
+ {
3581
+ name: 'destChainSelector',
3582
+ type: 'u64',
3583
+ },
3584
+ {
3585
+ name: 'message',
3586
+ type: {
3587
+ defined: 'SVM2AnyMessage',
3588
+ },
3589
+ },
3590
+ ],
3591
+ returns: {
3592
+ defined: 'GetFeeResult',
3593
+ },
3594
+ },
3595
+ {
3596
+ name: 'deriveAccountsCcipSend',
3597
+ docs: [
3598
+ 'Automatically derives all accounts required to call `ccip_send`.',
3599
+ '',
3600
+ 'This method receives the bare minimum amount of information needed to construct',
3601
+ 'the entire account list to send a transaction, and builds it iteratively',
3602
+ 'over the course of multiple calls.',
3603
+ '',
3604
+ 'The return type contains:',
3605
+ '',
3606
+ '* `accounts_to_save`: The caller must append these accounts to a list they maintain.',
3607
+ 'When complete, this list will contain all accounts needed to call `ccip_send`.',
3608
+ '* `ask_again_with`: When `next_stage` is not empty, the caller must call `derive_accounts_ccip_send`',
3609
+ 'again, including exactly these accounts as the `remaining_accounts`.',
3610
+ '* `lookup_tables_to_save`: The caller must save those LUTs. They can be used for `ccip_send`.',
3611
+ '* `current_stage`: A string describing the current stage of the derivation process. When the stage',
3612
+ 'is "TokenTransferStaticAccounts/<N>/0", it means the `accounts_to_save` block in this response contains',
3613
+ 'all accounts relating to the Nth token being transferred. Use this information to construct',
3614
+ 'the `token_indexes` vector that `ccip_send` requires.',
3615
+ '* `next_stage`: If nonempty, this means the instruction must get called again with this value',
3616
+ 'as the `stage` argument.',
3617
+ '',
3618
+ 'Therefore, and starting with an empty `remaining_accounts` list, the caller must repeatedly',
3619
+ 'call `derive_accounts_ccip_send` until `next_stage` is returned empty.',
3620
+ '',
3621
+ '# Arguments',
3622
+ '',
3623
+ '* `ctx`: Context containing only the config.',
3624
+ '* `stage`: Requested derivation stage. Pass "Start" the first time, then for each subsequent',
3625
+ 'call, pass the value returned in `response.next_stage` until empty.',
3626
+ '* `params`:',
3627
+ '* `ccip_send_caller`: Public key of the account that will sign the call to `ccip_send`.',
3628
+ '* `dest_chain_selector`: CCIP chain selector for the dest chain.',
3629
+ '* `fee_token_mint`: The mint address for the token used for fees. Pubkey::default() if native SOL.',
3630
+ '* `mints_of_transferred_token`: List of all token mints for tokens being transferred.',
3631
+ ],
3632
+ accounts: [
3633
+ {
3634
+ name: 'config',
3635
+ isMut: false,
3636
+ isSigner: false,
3637
+ },
3638
+ ],
3639
+ args: [
3640
+ {
3641
+ name: 'params',
3642
+ type: {
3643
+ defined: 'DeriveAccountsCcipSendParams',
3644
+ },
3645
+ },
3646
+ {
3647
+ name: 'stage',
3648
+ type: 'string',
3649
+ },
3650
+ ],
3651
+ returns: {
3652
+ defined: 'DeriveAccountsResponse',
3653
+ },
3654
+ },
3655
+ ],
3656
+ accounts: [
3657
+ {
3658
+ name: 'allowedOfframp',
3659
+ type: {
3660
+ kind: 'struct',
3661
+ fields: [],
3662
+ },
3663
+ },
3664
+ {
3665
+ name: 'config',
3666
+ type: {
3667
+ kind: 'struct',
3668
+ fields: [
3669
+ {
3670
+ name: 'version',
3671
+ type: 'u8',
3672
+ },
3673
+ {
3674
+ name: 'defaultCodeVersion',
3675
+ type: {
3676
+ defined: 'CodeVersion',
3677
+ },
3678
+ },
3679
+ {
3680
+ name: 'svmChainSelector',
3681
+ type: 'u64',
3682
+ },
3683
+ {
3684
+ name: 'owner',
3685
+ type: 'publicKey',
3686
+ },
3687
+ {
3688
+ name: 'proposedOwner',
3689
+ type: 'publicKey',
3690
+ },
3691
+ {
3692
+ name: 'feeQuoter',
3693
+ type: 'publicKey',
3694
+ },
3695
+ {
3696
+ name: 'rmnRemote',
3697
+ type: 'publicKey',
3698
+ },
3699
+ {
3700
+ name: 'linkTokenMint',
3701
+ type: 'publicKey',
3702
+ },
3703
+ {
3704
+ name: 'feeAggregator',
3705
+ type: 'publicKey',
3706
+ },
3707
+ ],
3708
+ },
3709
+ },
3710
+ {
3711
+ name: 'destChain',
3712
+ type: {
3713
+ kind: 'struct',
3714
+ fields: [
3715
+ {
3716
+ name: 'version',
3717
+ type: 'u8',
3718
+ },
3719
+ {
3720
+ name: 'chainSelector',
3721
+ type: 'u64',
3722
+ },
3723
+ {
3724
+ name: 'state',
3725
+ type: {
3726
+ defined: 'DestChainState',
3727
+ },
3728
+ },
3729
+ {
3730
+ name: 'config',
3731
+ type: {
3732
+ defined: 'DestChainConfig',
3733
+ },
3734
+ },
3735
+ ],
3736
+ },
3737
+ },
3738
+ {
3739
+ name: 'nonce',
3740
+ type: {
3741
+ kind: 'struct',
3742
+ fields: [
3743
+ {
3744
+ name: 'version',
3745
+ type: 'u8',
3746
+ },
3747
+ {
3748
+ name: 'orderedNonce',
3749
+ type: 'u64',
3750
+ },
3751
+ {
3752
+ name: 'totalNonce',
3753
+ type: 'u64',
3754
+ },
3755
+ ],
3756
+ },
3757
+ },
3758
+ ],
3759
+ types: [
3760
+ {
3761
+ name: 'RampMessageHeader',
3762
+ type: {
3763
+ kind: 'struct',
3764
+ fields: [
3765
+ {
3766
+ name: 'messageId',
3767
+ type: {
3768
+ array: ['u8', 32],
3769
+ },
3770
+ },
3771
+ {
3772
+ name: 'sourceChainSelector',
3773
+ type: 'u64',
3774
+ },
3775
+ {
3776
+ name: 'destChainSelector',
3777
+ type: 'u64',
3778
+ },
3779
+ {
3780
+ name: 'sequenceNumber',
3781
+ type: 'u64',
3782
+ },
3783
+ {
3784
+ name: 'nonce',
3785
+ type: 'u64',
3786
+ },
3787
+ ],
3788
+ },
3789
+ },
3790
+ {
3791
+ name: 'SVM2AnyRampMessage',
3792
+ type: {
3793
+ kind: 'struct',
3794
+ fields: [
3795
+ {
3796
+ name: 'header',
3797
+ type: {
3798
+ defined: 'RampMessageHeader',
3799
+ },
3800
+ },
3801
+ {
3802
+ name: 'sender',
3803
+ type: 'publicKey',
3804
+ },
3805
+ {
3806
+ name: 'data',
3807
+ type: 'bytes',
3808
+ },
3809
+ {
3810
+ name: 'receiver',
3811
+ type: 'bytes',
3812
+ },
3813
+ {
3814
+ name: 'extraArgs',
3815
+ type: 'bytes',
3816
+ },
3817
+ {
3818
+ name: 'feeToken',
3819
+ type: 'publicKey',
3820
+ },
3821
+ {
3822
+ name: 'tokenAmounts',
3823
+ type: {
3824
+ vec: {
3825
+ defined: 'SVM2AnyTokenTransfer',
3826
+ },
3827
+ },
3828
+ },
3829
+ {
3830
+ name: 'feeTokenAmount',
3831
+ type: {
3832
+ defined: 'CrossChainAmount',
3833
+ },
3834
+ },
3835
+ {
3836
+ name: 'feeValueJuels',
3837
+ type: {
3838
+ defined: 'CrossChainAmount',
3839
+ },
3840
+ },
3841
+ ],
3842
+ },
3843
+ },
3844
+ {
3845
+ name: 'SVM2AnyTokenTransfer',
3846
+ type: {
3847
+ kind: 'struct',
3848
+ fields: [
3849
+ {
3850
+ name: 'sourcePoolAddress',
3851
+ type: 'publicKey',
3852
+ },
3853
+ {
3854
+ name: 'destTokenAddress',
3855
+ type: 'bytes',
3856
+ },
3857
+ {
3858
+ name: 'extraData',
3859
+ type: 'bytes',
3860
+ },
3861
+ {
3862
+ name: 'amount',
3863
+ type: {
3864
+ defined: 'CrossChainAmount',
3865
+ },
3866
+ },
3867
+ {
3868
+ name: 'destExecData',
3869
+ type: 'bytes',
3870
+ },
3871
+ ],
3872
+ },
3873
+ },
3874
+ {
3875
+ name: 'SVM2AnyMessage',
3876
+ type: {
3877
+ kind: 'struct',
3878
+ fields: [
3879
+ {
3880
+ name: 'receiver',
3881
+ type: 'bytes',
3882
+ },
3883
+ {
3884
+ name: 'data',
3885
+ type: 'bytes',
3886
+ },
3887
+ {
3888
+ name: 'tokenAmounts',
3889
+ type: {
3890
+ vec: {
3891
+ defined: 'SVMTokenAmount',
3892
+ },
3893
+ },
3894
+ },
3895
+ {
3896
+ name: 'feeToken',
3897
+ type: 'publicKey',
3898
+ },
3899
+ {
3900
+ name: 'extraArgs',
3901
+ type: 'bytes',
3902
+ },
3903
+ ],
3904
+ },
3905
+ },
3906
+ {
3907
+ name: 'SVMTokenAmount',
3908
+ type: {
3909
+ kind: 'struct',
3910
+ fields: [
3911
+ {
3912
+ name: 'token',
3913
+ type: 'publicKey',
3914
+ },
3915
+ {
3916
+ name: 'amount',
3917
+ type: 'u64',
3918
+ },
3919
+ ],
3920
+ },
3921
+ },
3922
+ {
3923
+ name: 'CrossChainAmount',
3924
+ type: {
3925
+ kind: 'struct',
3926
+ fields: [
3927
+ {
3928
+ name: 'leBytes',
3929
+ type: {
3930
+ array: ['u8', 32],
3931
+ },
3932
+ },
3933
+ ],
3934
+ },
3935
+ },
3936
+ {
3937
+ name: 'GetFeeResult',
3938
+ type: {
3939
+ kind: 'struct',
3940
+ fields: [
3941
+ {
3942
+ name: 'amount',
3943
+ type: 'u64',
3944
+ },
3945
+ {
3946
+ name: 'juels',
3947
+ type: 'u128',
3948
+ },
3949
+ {
3950
+ name: 'token',
3951
+ type: 'publicKey',
3952
+ },
3953
+ ],
3954
+ },
3955
+ },
3956
+ {
3957
+ name: 'DestChainState',
3958
+ type: {
3959
+ kind: 'struct',
3960
+ fields: [
3961
+ {
3962
+ name: 'sequenceNumber',
3963
+ type: 'u64',
3964
+ },
3965
+ {
3966
+ name: 'sequenceNumberToRestore',
3967
+ type: 'u64',
3968
+ },
3969
+ {
3970
+ name: 'restoreOnAction',
3971
+ type: {
3972
+ defined: 'RestoreOnAction',
3973
+ },
3974
+ },
3975
+ ],
3976
+ },
3977
+ },
3978
+ {
3979
+ name: 'DestChainConfig',
3980
+ type: {
3981
+ kind: 'struct',
3982
+ fields: [
3983
+ {
3984
+ name: 'laneCodeVersion',
3985
+ type: {
3986
+ defined: 'CodeVersion',
3987
+ },
3988
+ },
3989
+ {
3990
+ name: 'allowedSenders',
3991
+ type: {
3992
+ vec: 'publicKey',
3993
+ },
3994
+ },
3995
+ {
3996
+ name: 'allowListEnabled',
3997
+ type: 'bool',
3998
+ },
3999
+ ],
4000
+ },
4001
+ },
4002
+ {
4003
+ name: 'DeriveAccountsResponse',
4004
+ type: {
4005
+ kind: 'struct',
4006
+ fields: [
4007
+ {
4008
+ name: 'askAgainWith',
4009
+ docs: [
4010
+ 'If this vector is not empty, you must call the `derive_` method again including',
4011
+ 'exactly these accounts as the `remaining_accounts` field.',
4012
+ ],
4013
+ type: {
4014
+ vec: {
4015
+ defined: 'CcipAccountMeta',
4016
+ },
4017
+ },
4018
+ },
4019
+ {
4020
+ name: 'accountsToSave',
4021
+ docs: [
4022
+ 'You must append these accounts at the end of a separate list. When `next_stage`',
4023
+ 'is finally empty, this separate list will contain all the accounts to use for the',
4024
+ 'instruction of interest.',
4025
+ ],
4026
+ type: {
4027
+ vec: {
4028
+ defined: 'CcipAccountMeta',
4029
+ },
4030
+ },
4031
+ },
4032
+ {
4033
+ name: 'lookUpTablesToSave',
4034
+ docs: [
4035
+ 'Append these look up tables at the end of a list. It will contain all LUTs',
4036
+ 'that the instruction of interest can use.',
4037
+ ],
4038
+ type: {
4039
+ vec: 'publicKey',
4040
+ },
4041
+ },
4042
+ {
4043
+ name: 'currentStage',
4044
+ docs: ['Identifies the derivation stage.'],
4045
+ type: 'string',
4046
+ },
4047
+ {
4048
+ name: 'nextStage',
4049
+ docs: ['Identifies the next derivation stage. If empty, the derivation is complete.'],
4050
+ type: 'string',
4051
+ },
4052
+ ],
4053
+ },
4054
+ },
4055
+ {
4056
+ name: 'CcipAccountMeta',
4057
+ type: {
4058
+ kind: 'struct',
4059
+ fields: [
4060
+ {
4061
+ name: 'pubkey',
4062
+ type: 'publicKey',
4063
+ },
4064
+ {
4065
+ name: 'isSigner',
4066
+ type: 'bool',
4067
+ },
4068
+ {
4069
+ name: 'isWritable',
4070
+ type: 'bool',
4071
+ },
4072
+ ],
4073
+ },
4074
+ },
4075
+ {
4076
+ name: 'DeriveAccountsCcipSendParams',
4077
+ type: {
4078
+ kind: 'struct',
4079
+ fields: [
4080
+ {
4081
+ name: 'destChainSelector',
4082
+ type: 'u64',
4083
+ },
4084
+ {
4085
+ name: 'ccipSendCaller',
4086
+ type: 'publicKey',
4087
+ },
4088
+ {
4089
+ name: 'message',
4090
+ type: {
4091
+ defined: 'SVM2AnyMessage',
4092
+ },
4093
+ },
4094
+ ],
4095
+ },
4096
+ },
4097
+ {
4098
+ name: 'DeriveAccountsCcipSendStage',
4099
+ type: {
4100
+ kind: 'enum',
4101
+ variants: [
4102
+ {
4103
+ name: 'Start',
4104
+ },
4105
+ {
4106
+ name: 'FinishMainAccountList',
4107
+ },
4108
+ {
4109
+ name: 'RetrieveTokenLUTs',
4110
+ },
4111
+ {
4112
+ name: 'RetrievePoolPrograms',
4113
+ },
4114
+ {
4115
+ name: 'TokenTransferStaticAccounts',
4116
+ fields: [
4117
+ {
4118
+ name: 'token',
4119
+ type: 'u32',
4120
+ },
4121
+ {
4122
+ name: 'page',
4123
+ type: 'u32',
4124
+ },
4125
+ ],
4126
+ },
4127
+ {
4128
+ name: 'NestedTokenDerive',
4129
+ fields: [
4130
+ {
4131
+ name: 'token',
4132
+ type: 'u32',
4133
+ },
4134
+ {
4135
+ name: 'tokenSubstage',
4136
+ type: 'string',
4137
+ },
4138
+ ],
4139
+ },
4140
+ ],
4141
+ },
4142
+ },
4143
+ {
4144
+ name: 'CodeVersion',
4145
+ type: {
4146
+ kind: 'enum',
4147
+ variants: [
4148
+ {
4149
+ name: 'Default',
4150
+ },
4151
+ {
4152
+ name: 'V1',
4153
+ },
4154
+ ],
4155
+ },
4156
+ },
4157
+ {
4158
+ name: 'RestoreOnAction',
4159
+ type: {
4160
+ kind: 'enum',
4161
+ variants: [
4162
+ {
4163
+ name: 'None',
4164
+ },
4165
+ {
4166
+ name: 'Upgrade',
4167
+ },
4168
+ {
4169
+ name: 'Rollback',
4170
+ },
4171
+ ],
4172
+ },
4173
+ },
4174
+ ],
4175
+ events: [
4176
+ {
4177
+ name: 'ConfigSet',
4178
+ fields: [
4179
+ {
4180
+ name: 'svmChainSelector',
4181
+ type: 'u64',
4182
+ index: false,
4183
+ },
4184
+ {
4185
+ name: 'feeQuoter',
4186
+ type: 'publicKey',
4187
+ index: false,
4188
+ },
4189
+ {
4190
+ name: 'rmnRemote',
4191
+ type: 'publicKey',
4192
+ index: false,
4193
+ },
4194
+ {
4195
+ name: 'linkTokenMint',
4196
+ type: 'publicKey',
4197
+ index: false,
4198
+ },
4199
+ {
4200
+ name: 'feeAggregator',
4201
+ type: 'publicKey',
4202
+ index: false,
4203
+ },
4204
+ ],
4205
+ },
4206
+ {
4207
+ name: 'FeeTokenAdded',
4208
+ fields: [
4209
+ {
4210
+ name: 'feeToken',
4211
+ type: 'publicKey',
4212
+ index: false,
4213
+ },
4214
+ {
4215
+ name: 'enabled',
4216
+ type: 'bool',
4217
+ index: false,
4218
+ },
4219
+ ],
4220
+ },
4221
+ {
4222
+ name: 'FeeTokenEnabled',
4223
+ fields: [
4224
+ {
4225
+ name: 'feeToken',
4226
+ type: 'publicKey',
4227
+ index: false,
4228
+ },
4229
+ ],
4230
+ },
4231
+ {
4232
+ name: 'FeeTokenDisabled',
4233
+ fields: [
4234
+ {
4235
+ name: 'feeToken',
4236
+ type: 'publicKey',
4237
+ index: false,
4238
+ },
4239
+ ],
4240
+ },
4241
+ {
4242
+ name: 'FeeTokenRemoved',
4243
+ fields: [
4244
+ {
4245
+ name: 'feeToken',
4246
+ type: 'publicKey',
4247
+ index: false,
4248
+ },
4249
+ ],
4250
+ },
4251
+ {
4252
+ name: 'DestChainConfigUpdated',
4253
+ fields: [
4254
+ {
4255
+ name: 'destChainSelector',
4256
+ type: 'u64',
4257
+ index: false,
4258
+ },
4259
+ {
4260
+ name: 'destChainConfig',
4261
+ type: {
4262
+ defined: 'DestChainConfig',
4263
+ },
4264
+ index: false,
4265
+ },
4266
+ ],
4267
+ },
4268
+ {
4269
+ name: 'DestChainAdded',
4270
+ fields: [
4271
+ {
4272
+ name: 'destChainSelector',
4273
+ type: 'u64',
4274
+ index: false,
4275
+ },
4276
+ {
4277
+ name: 'destChainConfig',
4278
+ type: {
4279
+ defined: 'DestChainConfig',
4280
+ },
4281
+ index: false,
4282
+ },
4283
+ ],
4284
+ },
4285
+ {
4286
+ name: 'OwnershipTransferRequested',
4287
+ fields: [
4288
+ {
4289
+ name: 'from',
4290
+ type: 'publicKey',
4291
+ index: false,
4292
+ },
4293
+ {
4294
+ name: 'to',
4295
+ type: 'publicKey',
4296
+ index: false,
4297
+ },
4298
+ ],
4299
+ },
4300
+ {
4301
+ name: 'OwnershipTransferred',
4302
+ fields: [
4303
+ {
4304
+ name: 'from',
4305
+ type: 'publicKey',
4306
+ index: false,
4307
+ },
4308
+ {
4309
+ name: 'to',
4310
+ type: 'publicKey',
4311
+ index: false,
4312
+ },
4313
+ ],
4314
+ },
4315
+ {
4316
+ name: 'OfframpAdded',
4317
+ fields: [
4318
+ {
4319
+ name: 'sourceChainSelector',
4320
+ type: 'u64',
4321
+ index: false,
4322
+ },
4323
+ {
4324
+ name: 'offramp',
4325
+ type: 'publicKey',
4326
+ index: false,
4327
+ },
4328
+ ],
4329
+ },
4330
+ {
4331
+ name: 'OfframpRemoved',
4332
+ fields: [
4333
+ {
4334
+ name: 'sourceChainSelector',
4335
+ type: 'u64',
4336
+ index: false,
4337
+ },
4338
+ {
4339
+ name: 'offramp',
4340
+ type: 'publicKey',
4341
+ index: false,
4342
+ },
4343
+ ],
4344
+ },
4345
+ {
4346
+ name: 'CcipVersionForDestChainVersionBumped',
4347
+ fields: [
4348
+ {
4349
+ name: 'destChainSelector',
4350
+ type: 'u64',
4351
+ index: false,
4352
+ },
4353
+ {
4354
+ name: 'previousSequenceNumber',
4355
+ type: 'u64',
4356
+ index: false,
4357
+ },
4358
+ {
4359
+ name: 'newSequenceNumber',
4360
+ type: 'u64',
4361
+ index: false,
4362
+ },
4363
+ ],
4364
+ },
4365
+ {
4366
+ name: 'CcipVersionForDestChainVersionRolledBack',
4367
+ fields: [
4368
+ {
4369
+ name: 'destChainSelector',
4370
+ type: 'u64',
4371
+ index: false,
4372
+ },
4373
+ {
4374
+ name: 'previousSequenceNumber',
4375
+ type: 'u64',
4376
+ index: false,
4377
+ },
4378
+ {
4379
+ name: 'newSequenceNumber',
4380
+ type: 'u64',
4381
+ index: false,
4382
+ },
4383
+ ],
4384
+ },
4385
+ {
4386
+ name: 'CCIPMessageSent',
4387
+ fields: [
4388
+ {
4389
+ name: 'destChainSelector',
4390
+ type: 'u64',
4391
+ index: false,
4392
+ },
4393
+ {
4394
+ name: 'sequenceNumber',
4395
+ type: 'u64',
4396
+ index: false,
4397
+ },
4398
+ {
4399
+ name: 'message',
4400
+ type: {
4401
+ defined: 'SVM2AnyRampMessage',
4402
+ },
4403
+ index: false,
4404
+ },
4405
+ ],
4406
+ },
4407
+ {
4408
+ name: 'PoolSet',
4409
+ fields: [
4410
+ {
4411
+ name: 'token',
4412
+ type: 'publicKey',
4413
+ index: false,
4414
+ },
4415
+ {
4416
+ name: 'previousPoolLookupTable',
4417
+ type: 'publicKey',
4418
+ index: false,
4419
+ },
4420
+ {
4421
+ name: 'newPoolLookupTable',
4422
+ type: 'publicKey',
4423
+ index: false,
4424
+ },
4425
+ ],
4426
+ },
4427
+ {
4428
+ name: 'AdministratorTransferRequested',
4429
+ fields: [
4430
+ {
4431
+ name: 'token',
4432
+ type: 'publicKey',
4433
+ index: false,
4434
+ },
4435
+ {
4436
+ name: 'currentAdmin',
4437
+ type: 'publicKey',
4438
+ index: false,
4439
+ },
4440
+ {
4441
+ name: 'newAdmin',
4442
+ type: 'publicKey',
4443
+ index: false,
4444
+ },
4445
+ ],
4446
+ },
4447
+ {
4448
+ name: 'AdministratorTransferred',
4449
+ fields: [
4450
+ {
4451
+ name: 'token',
4452
+ type: 'publicKey',
4453
+ index: false,
4454
+ },
4455
+ {
4456
+ name: 'newAdmin',
4457
+ type: 'publicKey',
4458
+ index: false,
4459
+ },
4460
+ ],
4461
+ },
4462
+ {
4463
+ name: 'PoolEdited',
4464
+ fields: [
4465
+ {
4466
+ name: 'token',
4467
+ type: 'publicKey',
4468
+ index: false,
4469
+ },
4470
+ {
4471
+ name: 'supportsAutoDerivation',
4472
+ type: 'bool',
4473
+ index: false,
4474
+ },
4475
+ ],
4476
+ },
4477
+ {
4478
+ name: 'PdaUpgraded',
4479
+ fields: [
4480
+ {
4481
+ name: 'address',
4482
+ type: 'publicKey',
4483
+ index: false,
4484
+ },
4485
+ {
4486
+ name: 'oldVersion',
4487
+ type: 'u8',
4488
+ index: false,
4489
+ },
4490
+ {
4491
+ name: 'newVersion',
4492
+ type: 'u8',
4493
+ index: false,
4494
+ },
4495
+ {
4496
+ name: 'name',
4497
+ type: 'string',
4498
+ index: false,
4499
+ },
4500
+ {
4501
+ name: 'seeds',
4502
+ type: 'bytes',
4503
+ index: false,
4504
+ },
4505
+ ],
4506
+ },
4507
+ ],
4508
+ errors: [
4509
+ {
4510
+ code: 7000,
4511
+ name: 'Unauthorized',
4512
+ msg: 'The signer is unauthorized',
4513
+ },
4514
+ {
4515
+ code: 7001,
4516
+ name: 'InvalidRMNRemoteAddress',
4517
+ msg: 'Invalid RMN Remote Address',
4518
+ },
4519
+ {
4520
+ code: 7002,
4521
+ name: 'InvalidInputsMint',
4522
+ msg: 'Mint account input is invalid',
4523
+ },
4524
+ {
4525
+ code: 7003,
4526
+ name: 'InvalidVersion',
4527
+ msg: 'Invalid version of the onchain state',
4528
+ },
4529
+ {
4530
+ code: 7004,
4531
+ name: 'FeeTokenMismatch',
4532
+ msg: "Fee token doesn't match transfer token",
4533
+ },
4534
+ {
4535
+ code: 7005,
4536
+ name: 'RedundantOwnerProposal',
4537
+ msg: 'Proposed owner is the current owner',
4538
+ },
4539
+ {
4540
+ code: 7006,
4541
+ name: 'ReachedMaxSequenceNumber',
4542
+ msg: 'Reached max sequence number',
4543
+ },
4544
+ {
4545
+ code: 7007,
4546
+ name: 'InvalidInputsTokenIndices',
4547
+ msg: 'Invalid pool account account indices',
4548
+ },
4549
+ {
4550
+ code: 7008,
4551
+ name: 'InvalidInputsPoolAccounts',
4552
+ msg: 'Invalid pool accounts',
4553
+ },
4554
+ {
4555
+ code: 7009,
4556
+ name: 'InvalidInputsTokenAccounts',
4557
+ msg: 'Invalid token accounts',
4558
+ },
4559
+ {
4560
+ code: 7010,
4561
+ name: 'InvalidInputsTokenAdminRegistryAccounts',
4562
+ msg: 'Invalid Token Admin Registry account',
4563
+ },
4564
+ {
4565
+ code: 7011,
4566
+ name: 'InvalidInputsLookupTableAccounts',
4567
+ msg: 'Invalid LookupTable account',
4568
+ },
4569
+ {
4570
+ code: 7012,
4571
+ name: 'InvalidInputsLookupTableAccountWritable',
4572
+ msg: 'Invalid LookupTable account writable access',
4573
+ },
4574
+ {
4575
+ code: 7013,
4576
+ name: 'InvalidInputsTokenAmount',
4577
+ msg: 'Cannot send zero tokens',
4578
+ },
4579
+ {
4580
+ code: 7014,
4581
+ name: 'InvalidInputsTransferAllAmount',
4582
+ msg: 'Must specify zero amount to send alongside transfer_all',
4583
+ },
4584
+ {
4585
+ code: 7015,
4586
+ name: 'InvalidInputsAtaAddress',
4587
+ msg: 'Invalid Associated Token Account address',
4588
+ },
4589
+ {
4590
+ code: 7016,
4591
+ name: 'InvalidInputsAtaWritable',
4592
+ msg: 'Invalid Associated Token Account writable flag',
4593
+ },
4594
+ {
4595
+ code: 7017,
4596
+ name: 'InvalidInputsChainSelector',
4597
+ msg: 'Chain selector is invalid',
4598
+ },
4599
+ {
4600
+ code: 7018,
4601
+ name: 'InsufficientLamports',
4602
+ msg: 'Insufficient lamports',
4603
+ },
4604
+ {
4605
+ code: 7019,
4606
+ name: 'InsufficientFunds',
4607
+ msg: 'Insufficient funds',
4608
+ },
4609
+ {
4610
+ code: 7020,
4611
+ name: 'SourceTokenDataTooLarge',
4612
+ msg: 'Source token data is too large',
4613
+ },
4614
+ {
4615
+ code: 7021,
4616
+ name: 'InvalidTokenAdminRegistryInputsZeroAddress',
4617
+ msg: 'New Admin can not be zero address',
4618
+ },
4619
+ {
4620
+ code: 7022,
4621
+ name: 'InvalidTokenAdminRegistryProposedAdmin',
4622
+ msg: 'An already owned registry can not be proposed',
4623
+ },
4624
+ {
4625
+ code: 7023,
4626
+ name: 'SenderNotAllowed',
4627
+ msg: 'Sender not allowed for that destination chain',
4628
+ },
4629
+ {
4630
+ code: 7024,
4631
+ name: 'InvalidCodeVersion',
4632
+ msg: 'Invalid code version',
4633
+ },
4634
+ {
4635
+ code: 7025,
4636
+ name: 'InvalidCcipVersionRollback',
4637
+ msg: 'Invalid rollback attempt on the CCIP version of the onramp to the destination chain',
4638
+ },
4639
+ {
4640
+ code: 7026,
4641
+ name: 'InvalidAccountListForPdaDerivation',
4642
+ msg: 'Invalid account list for PDA derivation',
4643
+ },
4644
+ {
4645
+ code: 7027,
4646
+ name: 'InvalidDerivationStage',
4647
+ msg: 'Unexpected account derivation stage',
4648
+ },
4649
+ {
4650
+ code: 7028,
4651
+ name: 'InvalidNonceVersion',
4652
+ msg: 'Invalid version of the Nonce account',
4653
+ },
4654
+ {
4655
+ code: 7029,
4656
+ name: 'InvalidTokenPoolAccountDerivationResponse',
4657
+ msg: 'Token pool returned an unexpected derivation response',
4658
+ },
4659
+ {
4660
+ code: 7030,
4661
+ name: 'AccountDerivationResponseTooLarge',
4662
+ msg: "Can't fit account derivation response.",
4663
+ },
4664
+ {
4665
+ code: 7031,
4666
+ name: 'DefaultOwnerProposal',
4667
+ msg: 'Proposed owner is the default pubkey',
4668
+ },
4669
+ ],
4670
+ }
4671
+ // generate:end