@across-protocol/contracts 4.1.6 → 4.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -0
- package/dist/deploy/consts.js +3 -0
- package/dist/deployments/deployments.json +37 -33
- package/dist/hardhat.config.js +8 -1
- package/dist/src/svm/assets/idl/svm_spoke.json +42 -32
- package/dist/src/svm/assets/svm_spoke.d.ts +42 -32
- package/dist/src/svm/clients/SvmSpoke/errors/svmSpoke.d.ts +37 -33
- package/dist/src/svm/clients/SvmSpoke/errors/svmSpoke.js +55 -49
- package/dist/target/types/svm_spoke.d.ts +42 -32
- package/package.json +5 -4
package/README.md
CHANGED
|
@@ -77,6 +77,24 @@ forge script script/001DeployHubPool.s.sol:DeployHubPool --rpc-url ethereum --br
|
|
|
77
77
|
|
|
78
78
|
```
|
|
79
79
|
|
|
80
|
+
#### Foundry (ZKSync)
|
|
81
|
+
|
|
82
|
+
To enable ZKSync support, the zksync fork of foundry must be installed (see [here](https://foundry-book.zksync.io/introduction/installation#using-foundryup-zksync) for instructions).
|
|
83
|
+
|
|
84
|
+
Also, the `FOUNDRY_PROFILE` environment variable must be set to `zksync`.
|
|
85
|
+
|
|
86
|
+
```shell
|
|
87
|
+
export FOUNDRY_PROFILE=zksync
|
|
88
|
+
|
|
89
|
+
forge script script/016DeployZkSyncSpokePool.s.sol:DeployZkSyncSpokePool --rpc-url zksync --broadcast --verify -vvvv
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Alternatively, the `yarn forge-script-zksync` command can be used to deploy the contract.
|
|
93
|
+
|
|
94
|
+
```shell
|
|
95
|
+
yarn forge-script-zksync script/016DeployZkSyncSpokePool.s.sol:DeployZkSyncSpokePool --rpc-url zksync --broadcast --verify -vvvv
|
|
96
|
+
```
|
|
97
|
+
|
|
80
98
|
### SVM
|
|
81
99
|
|
|
82
100
|
Before deploying for the first time make sure all program IDs in `lib.rs` and `Anchor.toml` are the same as listed when running `anchor keys list`. If not, update them to match the deployment keypairs under `target/deploy/` and commit the changes.
|
package/dist/deploy/consts.js
CHANGED
|
@@ -180,6 +180,9 @@ exports.L2_ADDRESS_MAP = {
|
|
|
180
180
|
cctpV2TokenMessenger: "0x28b5a0e9C621a5BadaA536219b3a228C8168cf5d",
|
|
181
181
|
cctpV2MessageTransmitter: "0x81D40F21F12A8F0E3252Bccb954D722d4c464B64",
|
|
182
182
|
},
|
|
183
|
+
[utils_1.CHAIN_IDs.PLASMA]: {
|
|
184
|
+
permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
|
|
185
|
+
},
|
|
183
186
|
[utils_1.CHAIN_IDs.POLYGON]: {
|
|
184
187
|
fxChild: "0x8397259c983751DAf40400790063935a11afa28a",
|
|
185
188
|
cctpTokenMessenger: "0x9daF8c91AEFAE50b9c0E69629D3F6Ca40cA3B3FE",
|
|
@@ -21,10 +21,11 @@
|
|
|
21
21
|
"BondToken": { "address": "0xee1dc6bcf1ee967a350e9ac6caaaa236109002ea", "blockNumber": 17980554 },
|
|
22
22
|
"SpokePoolVerifier": { "address": "0x3Fb9cED51E968594C87963a371Ed90c39519f65A", "blockNumber": 22420136 },
|
|
23
23
|
"Mode_Adapter": { "address": "0xf1B59868697f3925b72889ede818B9E7ba0316d0", "blockNumber": 19914094 },
|
|
24
|
-
"MulticallHandler": { "address": "
|
|
24
|
+
"MulticallHandler": { "address": "0x0F7Ae28dE1C8532170AD4ee566B5801485c13a0E", "blockNumber": 22967417 },
|
|
25
25
|
"Lisk_Adapter": { "address": "0xF039AdCC74936F90fE175e8b3FE0FdC8b8E0c73b", "blockNumber": 22474211 },
|
|
26
26
|
"Universal_Adapter_56": { "address": "0x6f1C9d3bcDF51316E7b515a62C02F601500b084b", "blockNumber": 23251254 },
|
|
27
27
|
"Universal_Adapter_999": { "address": "0x0ec70777Ac388774041dD5A1778Cdf3AF3134D2B", "blockNumber": 23371516 },
|
|
28
|
+
"Universal_Adapter_9745": { "address": "0xb47fD69FE25878F4E43aAF2F9ad7D0A3A0B22363", "blockNumber": 23419367 },
|
|
28
29
|
"Blast_Adapter": { "address": "0xF2bEf5E905AAE0295003ab14872F811E914EdD81", "blockNumber": 20221494 },
|
|
29
30
|
"Scroll_Adapter": { "address": "0x2DA799c2223c6ffB595e578903AE6b95839160d8", "blockNumber": 22325451 },
|
|
30
31
|
"Blast_DaiRetriever": { "address": "0x98Dd57048d7d5337e92D9102743528ea4Fea64aB", "blockNumber": 20378862 },
|
|
@@ -46,12 +47,12 @@
|
|
|
46
47
|
"UniswapV3_SwapAndBridge": { "address": "0x6f4A733c7889f038D77D4f540182Dda17423CcbF", "blockNumber": 120044742 },
|
|
47
48
|
"AcrossMerkleDistributor": { "address": "0xc8b31410340d57417bE62672f6B53dfB9de30aC2", "blockNumber": 114652330 },
|
|
48
49
|
"SpokePoolVerifier": { "address": "0x3Fb9cED51E968594C87963a371Ed90c39519f65A", "blockNumber": 135440379 },
|
|
49
|
-
"MulticallHandler": { "address": "
|
|
50
|
+
"MulticallHandler": { "address": "0x0F7Ae28dE1C8532170AD4ee566B5801485c13a0E", "blockNumber": 138622548 },
|
|
50
51
|
"SpokePoolPeriphery": { "address": "0x89415a82d909a7238d69094C3Dd1dCC1aCbDa85C", "blockNumber": 137675818 }
|
|
51
52
|
},
|
|
52
53
|
"11155420": {
|
|
53
54
|
"SpokePool": { "address": "0x4e8E101924eDE233C13e2D8622DC8aED2872d505", "blockNumber": 7762656 },
|
|
54
|
-
"MulticallHandler": { "address": "
|
|
55
|
+
"MulticallHandler": { "address": "0x0F7Ae28dE1C8532170AD4ee566B5801485c13a0E", "blockNumber": 138622548 }
|
|
55
56
|
},
|
|
56
57
|
"56": {
|
|
57
58
|
"SpokePool": { "address": "0x4e8E101924eDE233C13e2D8622DC8aED2872d505", "blockNumber": 48762335 },
|
|
@@ -62,7 +63,8 @@
|
|
|
62
63
|
},
|
|
63
64
|
"999": {
|
|
64
65
|
"SpokePool": { "address": "0x35E63eA3eb0fb7A3bc543C71FB66412e1F6B0E04", "blockNumber": 13937805 },
|
|
65
|
-
"Helios": { "address": "0xd08baaE74D6d2eAb1F3320B2E1a53eeb391ce8e5", "blockNumber": 13934816 }
|
|
66
|
+
"Helios": { "address": "0xd08baaE74D6d2eAb1F3320B2E1a53eeb391ce8e5", "blockNumber": 13934816 },
|
|
67
|
+
"MulticallHandler": { "address": "0x5E7840E06fAcCb6d1c3b5F5E0d1d3d07F2829bba", "blockNumber": 13992522 }
|
|
66
68
|
},
|
|
67
69
|
"137": {
|
|
68
70
|
"MintableERC1155": { "address": "0xA15a90E7936A2F8B70E181E955760860D133e56B", "blockNumber": 40600414 },
|
|
@@ -79,57 +81,57 @@
|
|
|
79
81
|
"blockNumber": 56529578
|
|
80
82
|
},
|
|
81
83
|
"UniswapV3_SwapAndBridge": { "address": "0x9220fa27ae680e4e8d9733932128fa73362e0393", "blockNumber": 56675837 },
|
|
82
|
-
"MulticallHandler": { "address": "
|
|
84
|
+
"MulticallHandler": { "address": "0x0F7Ae28dE1C8532170AD4ee566B5801485c13a0E", "blockNumber": 74229464 },
|
|
83
85
|
"SpokePoolPeriphery": { "address": "0x89415a82d909a7238d69094C3Dd1dCC1aCbDa85C", "blockNumber": 73247089 }
|
|
84
86
|
},
|
|
85
87
|
"232": {
|
|
86
88
|
"SpokePool": { "address": "0xb234cA484866c811d0e6D3318866F583781ED045", "blockNumber": 4197027 },
|
|
87
|
-
"MulticallHandler": { "address": "
|
|
89
|
+
"MulticallHandler": { "address": "0x1Ed0D59019a52870337b51DEe8190486a8663037", "blockNumber": 3458452 },
|
|
88
90
|
"SpokePoolPeriphery": { "address": "0x8A8cA9c4112c67b7Dae7dF7E89EA45D592362107", "blockNumber": 2884429 }
|
|
89
91
|
},
|
|
90
92
|
"288": { "SpokePool": { "address": "0xBbc6009fEfFc27ce705322832Cb2068F8C1e0A58", "blockNumber": 619993 } },
|
|
91
93
|
"324": {
|
|
92
94
|
"SpokePool": { "address": "0xE0B015E54d54fc84a6cB9B666099c46adE9335FF", "blockNumber": 10352565 },
|
|
93
|
-
"MulticallHandler": { "address": "
|
|
95
|
+
"MulticallHandler": { "address": "0x68d3806E57148D6c6793C78EbDDbc272fE605dbf", "blockNumber": 63168917 },
|
|
94
96
|
"SpokePoolPeriphery": { "address": "0x672b9ba0CE73b69b5F940362F0ee36AAA3F02986", "blockNumber": 62189304 }
|
|
95
97
|
},
|
|
96
98
|
"480": {
|
|
97
99
|
"SpokePool": { "address": "0x09aea4b2242abC8bb4BB78D537A67a245A7bEC64", "blockNumber": 4524742 },
|
|
98
100
|
"SpokePoolVerifier": { "address": "0x3Fb9cED51E968594C87963a371Ed90c39519f65A", "blockNumber": 13571842 },
|
|
99
|
-
"MulticallHandler": { "address": "
|
|
101
|
+
"MulticallHandler": { "address": "0x0F7Ae28dE1C8532170AD4ee566B5801485c13a0E", "blockNumber": 16881850 },
|
|
100
102
|
"SpokePoolPeriphery": { "address": "0x89415a82d909a7238d69094C3Dd1dCC1aCbDa85C", "blockNumber": 15809528 }
|
|
101
103
|
},
|
|
102
104
|
"690": {
|
|
103
105
|
"SpokePool": { "address": "0x13fDac9F9b4777705db45291bbFF3c972c6d1d97", "blockNumber": 5512122 },
|
|
104
106
|
"SpokePoolVerifier": { "address": "0x3Fb9cED51E968594C87963a371Ed90c39519f65A", "blockNumber": 17147100 },
|
|
105
|
-
"MulticallHandler": { "address": "
|
|
107
|
+
"MulticallHandler": { "address": "0x0F7Ae28dE1C8532170AD4ee566B5801485c13a0E", "blockNumber": 20457079 },
|
|
106
108
|
"SpokePoolPeriphery": { "address": "0x89415a82d909a7238d69094C3Dd1dCC1aCbDa85C", "blockNumber": 16783149 }
|
|
107
109
|
},
|
|
108
110
|
"919": {
|
|
109
111
|
"SpokePool": { "address": "0xbd886FC0725Cc459b55BbFEb3E4278610331f83b", "blockNumber": 13999465 },
|
|
110
|
-
"MulticallHandler": { "address": "
|
|
112
|
+
"MulticallHandler": { "address": "0x0F7Ae28dE1C8532170AD4ee566B5801485c13a0E", "blockNumber": 32616082 }
|
|
111
113
|
},
|
|
112
114
|
"1135": {
|
|
113
115
|
"SpokePool": { "address": "0x9552a0a6624A23B848060AE5901659CDDa1f83f8", "blockNumber": 2602337 },
|
|
114
116
|
"SpokePoolVerifier": { "address": "0x3Fb9cED51E968594C87963a371Ed90c39519f65A", "blockNumber": 15875239 },
|
|
115
|
-
"MulticallHandler": { "address": "
|
|
117
|
+
"MulticallHandler": { "address": "0x0F7Ae28dE1C8532170AD4ee566B5801485c13a0E", "blockNumber": 19185347 },
|
|
116
118
|
"SpokePoolPeriphery": { "address": "0x89415a82d909a7238d69094C3Dd1dCC1aCbDa85C", "blockNumber": 18113085 }
|
|
117
119
|
},
|
|
118
120
|
"4202": {
|
|
119
121
|
"SpokePool": { "address": "0xeF684C38F94F48775959ECf2012D7E864ffb9dd4", "blockNumber": 7267988 },
|
|
120
|
-
"MulticallHandler": { "address": "
|
|
122
|
+
"MulticallHandler": { "address": "0x0F7Ae28dE1C8532170AD4ee566B5801485c13a0E", "blockNumber": 23893534 }
|
|
121
123
|
},
|
|
122
124
|
"8453": {
|
|
123
125
|
"SpokePool": { "address": "0x09aea4b2242abC8bb4BB78D537A67a245A7bEC64", "blockNumber": 2164878 },
|
|
124
126
|
"SpokePoolVerifier": { "address": "0x3Fb9cED51E968594C87963a371Ed90c39519f65A", "blockNumber": 29844942 },
|
|
125
127
|
"1inch_SwapAndBridge": { "address": "0x7CFaBF2eA327009B39f40078011B0Fb714b65926", "blockNumber": 14450808 },
|
|
126
128
|
"UniswapV3_SwapAndBridge": { "address": "0xbcfbCE9D92A516e3e7b0762AE218B4194adE34b4", "blockNumber": 14450714 },
|
|
127
|
-
"MulticallHandler": { "address": "
|
|
129
|
+
"MulticallHandler": { "address": "0x0F7Ae28dE1C8532170AD4ee566B5801485c13a0E", "blockNumber": 33154505 }
|
|
128
130
|
},
|
|
129
131
|
"34443": {
|
|
130
132
|
"SpokePool": { "address": "0x3baD7AD0728f9917d1Bf08af5782dCbD516cDd96", "blockNumber": 8043187 },
|
|
131
133
|
"SpokePoolVerifier": { "address": "0x3Fb9cED51E968594C87963a371Ed90c39519f65A", "blockNumber": 23155816 },
|
|
132
|
-
"MulticallHandler": { "address": "
|
|
134
|
+
"MulticallHandler": { "address": "0x0F7Ae28dE1C8532170AD4ee566B5801485c13a0E", "blockNumber": 26465760 },
|
|
133
135
|
"SpokePoolPeriphery": { "address": "0x89415a82d909a7238d69094C3Dd1dCC1aCbDa85C", "blockNumber": 25393939 }
|
|
134
136
|
},
|
|
135
137
|
"42161": {
|
|
@@ -137,53 +139,60 @@
|
|
|
137
139
|
"SpokePoolVerifier": { "address": "0x3Fb9cED51E968594C87963a371Ed90c39519f65A", "blockNumber": 333624754 },
|
|
138
140
|
"1inch_SwapAndBridge": { "address": "0xC456398D5eE3B93828252e48beDEDbc39e03368E", "blockNumber": 211175795 },
|
|
139
141
|
"UniswapV3_SwapAndBridge": { "address": "0xF633b72A4C2Fb73b77A379bf72864A825aD35b6D", "blockNumber": 211175481 },
|
|
140
|
-
"MulticallHandler": { "address": "
|
|
142
|
+
"MulticallHandler": { "address": "0x0F7Ae28dE1C8532170AD4ee566B5801485c13a0E", "blockNumber": 360020909 },
|
|
141
143
|
"SpokePoolPeriphery": { "address": "0x89415a82d909a7238d69094C3Dd1dCC1aCbDa85C", "blockNumber": 351421618 }
|
|
142
144
|
},
|
|
143
145
|
"59144": {
|
|
144
146
|
"SpokePool": { "address": "0x7E63A5f1a8F0B4d0934B2f2327DAED3F6bb2ee75", "blockNumber": 2721169 },
|
|
145
147
|
"SpokePoolVerifier": { "address": "0x3Fb9cED51E968594C87963a371Ed90c39519f65A", "blockNumber": 18705781 },
|
|
146
|
-
"MulticallHandler": { "address": "
|
|
148
|
+
"MulticallHandler": { "address": "0xdF1C940487574EEfa79989a79a4936A0F979cDa2", "blockNumber": 21108879 },
|
|
147
149
|
"SpokePoolPeriphery": { "address": "0xE0BCff426509723B18D6b2f0D8F4602d143bE3e0", "blockNumber": 20348650 }
|
|
148
150
|
},
|
|
149
151
|
"84532": {
|
|
150
152
|
"SpokePool": { "address": "0x82B564983aE7274c86695917BBf8C99ECb6F0F8F", "blockNumber": 6082004 },
|
|
151
|
-
"MulticallHandler": { "address": "
|
|
153
|
+
"MulticallHandler": { "address": "0x0F7Ae28dE1C8532170AD4ee566B5801485c13a0E", "blockNumber": 28665844 },
|
|
152
154
|
"SpokePoolPeriphery": { "address": "0x89415a82d909a7238d69094C3Dd1dCC1aCbDa85C", "blockNumber": 32080834 }
|
|
153
155
|
},
|
|
154
156
|
"80002": {
|
|
155
157
|
"PolygonTokenBridger": { "address": "0x4e3737679081c4D3029D88cA560918094f2e0284", "blockNumber": 7529773 },
|
|
156
158
|
"SpokePool": { "address": "0xd08baaE74D6d2eAb1F3320B2E1a53eeb391ce8e5", "blockNumber": 7529960 },
|
|
157
|
-
"MulticallHandler": { "address": "
|
|
159
|
+
"MulticallHandler": { "address": "0x0F7Ae28dE1C8532170AD4ee566B5801485c13a0E", "blockNumber": 24181411 }
|
|
158
160
|
},
|
|
159
161
|
"168587773": {
|
|
160
162
|
"SpokePool": { "address": "0x5545092553Cf5Bf786e87a87192E902D50D8f022", "blockNumber": 7634204 },
|
|
161
|
-
"MulticallHandler": { "address": "
|
|
163
|
+
"MulticallHandler": { "address": "0x0F7Ae28dE1C8532170AD4ee566B5801485c13a0E", "blockNumber": 24206664 }
|
|
164
|
+
},
|
|
165
|
+
"9745": {
|
|
166
|
+
"Helios": { "address": "0x7e63a5f1a8f0b4d0934b2f2327daed3f6bb2ee75", "blockNumber": 1552582 },
|
|
167
|
+
"SpokePool": { "address": "0x2271a5E74eA8A29764ab10523575b41AA52455f0", "blockNumber": 1623864 },
|
|
168
|
+
"SpokePoolVerifier": { "address": "0x3Fb9cED51E968594C87963a371Ed90c39519f65A", "blockNumber": 1619568 },
|
|
169
|
+
"SpokePoolPeriphery": { "address": "0xF1BF00D947267Da5cC63f8c8A60568c59FA31bCb", "blockNumber": 1628438 },
|
|
170
|
+
"MulticallHandler": { "address": "0x5E7840E06fAcCb6d1c3b5F5E0d1d3d07F2829bba", "blockNumber": 1619956 }
|
|
162
171
|
},
|
|
163
172
|
"81457": {
|
|
164
173
|
"SpokePool": { "address": "0x2D509190Ed0172ba588407D4c2df918F955Cc6E1", "blockNumber": 5574280 },
|
|
165
174
|
"SpokePoolVerifier": { "address": "0x3Fb9cED51E968594C87963a371Ed90c39519f65A", "blockNumber": 18834642 },
|
|
166
|
-
"MulticallHandler": { "address": "
|
|
175
|
+
"MulticallHandler": { "address": "0x0F7Ae28dE1C8532170AD4ee566B5801485c13a0E", "blockNumber": 22144286 },
|
|
167
176
|
"SpokePoolPeriphery": { "address": "0x89415a82d909a7238d69094C3Dd1dCC1aCbDa85C", "blockNumber": 21071991 }
|
|
168
177
|
},
|
|
169
178
|
"421614": {
|
|
170
179
|
"SpokePool": { "address": "0x7E63A5f1a8F0B4d0934B2f2327DAED3F6bb2ee75", "blockNumber": 12411026 },
|
|
171
|
-
"MulticallHandler": { "address": "
|
|
180
|
+
"MulticallHandler": { "address": "0x0F7Ae28dE1C8532170AD4ee566B5801485c13a0E", "blockNumber": 175845768 }
|
|
172
181
|
},
|
|
173
182
|
"534352": {
|
|
174
183
|
"SpokePool": { "address": "0x3baD7AD0728f9917d1Bf08af5782dCbD516cDd96", "blockNumber": 7489705 },
|
|
175
184
|
"SpokePoolVerifier": { "address": "0x3Fb9cED51E968594C87963a371Ed90c39519f65A", "blockNumber": 15223712 },
|
|
176
|
-
"MulticallHandler": { "address": "
|
|
185
|
+
"MulticallHandler": { "address": "0x0F7Ae28dE1C8532170AD4ee566B5801485c13a0E", "blockNumber": 17441646 },
|
|
177
186
|
"SpokePoolPeriphery": { "address": "0x89415a82d909a7238d69094C3Dd1dCC1aCbDa85C", "blockNumber": 16783149 }
|
|
178
187
|
},
|
|
179
188
|
"7777777": {
|
|
180
189
|
"SpokePool": { "address": "0x13fDac9F9b4777705db45291bbFF3c972c6d1d97", "blockNumber": 18382867 },
|
|
181
190
|
"SpokePoolVerifier": { "address": "0x3Fb9cED51E968594C87963a371Ed90c39519f65A", "blockNumber": 29892606 },
|
|
182
|
-
"MulticallHandler": { "address": "
|
|
191
|
+
"MulticallHandler": { "address": "0x0F7Ae28dE1C8532170AD4ee566B5801485c13a0E", "blockNumber": 33202799 },
|
|
183
192
|
"SpokePoolPeriphery": { "address": "0x89415a82d909a7238d69094C3Dd1dCC1aCbDa85C", "blockNumber": 32130332 }
|
|
184
193
|
},
|
|
185
194
|
"11155111": {
|
|
186
|
-
"MulticallHandler": { "address": "
|
|
195
|
+
"MulticallHandler": { "address": "0x0F7Ae28dE1C8532170AD4ee566B5801485c13a0E", "blockNumber": 8810926 },
|
|
187
196
|
"AcrossConfigStore": { "address": "0xB3De1e212B49e68f4a68b5993f31f63946FCA2a6", "blockNumber": 4968255 },
|
|
188
197
|
"LPTokenFactory": { "address": "0xFB87Ac52Bac7ccF497b6053610A9c59B87a0cE7D", "blockNumber": 4911834 },
|
|
189
198
|
"HubPool": { "address": "0x14224e63716aface30c9a417e0542281869f7d9e", "blockNumber": 4911835 },
|
|
@@ -200,32 +209,27 @@
|
|
|
200
209
|
"SpokePool": { "address": "0x6A0a7f39530923911832Dd60667CE5da5449967B", "blockNumber": 156275 },
|
|
201
210
|
"MulticallHandler": { "address": "0x02D2B95F631E0CF6c203E77f827381B0885F7822", "blockNumber": 145561 }
|
|
202
211
|
},
|
|
203
|
-
"41455": {
|
|
204
|
-
"SpokePool": { "address": "0x13fDac9F9b4777705db45291bbFF3c972c6d1d97", "blockNumber": 4240318 },
|
|
205
|
-
"SpokePoolVerifier": { "address": "0x3Fb9cED51E968594C87963a371Ed90c39519f65A", "blockNumber": 8669066 },
|
|
206
|
-
"MulticallHandler": { "address": "0x924a9f036260DdD5808007E1AA95f08eD08aA569", "blockNumber": 4112529 }
|
|
207
|
-
},
|
|
208
212
|
"57073": {
|
|
209
213
|
"SpokePool": { "address": "0xeF684C38F94F48775959ECf2012D7E864ffb9dd4", "blockNumber": 1139240 },
|
|
210
214
|
"SpokePoolVerifier": { "address": "0x3Fb9cED51E968594C87963a371Ed90c39519f65A", "blockNumber": 12980498 },
|
|
211
|
-
"MulticallHandler": { "address": "
|
|
215
|
+
"MulticallHandler": { "address": "0x0F7Ae28dE1C8532170AD4ee566B5801485c13a0E", "blockNumber": 19600021 },
|
|
212
216
|
"SpokePoolPeriphery": { "address": "0x89415a82d909a7238d69094C3Dd1dCC1aCbDa85C", "blockNumber": 17456376 }
|
|
213
217
|
},
|
|
214
218
|
"1868": {
|
|
215
219
|
"SpokePool": { "address": "0x3baD7AD0728f9917d1Bf08af5782dCbD516cDd96", "blockNumber": 1709997 },
|
|
216
220
|
"SpokePoolVerifier": { "address": "0x3Fb9cED51E968594C87963a371Ed90c39519f65A", "blockNumber": 6672118 },
|
|
217
|
-
"MulticallHandler": { "address": "
|
|
221
|
+
"MulticallHandler": { "address": "0x0F7Ae28dE1C8532170AD4ee566B5801485c13a0E", "blockNumber": 9982275 },
|
|
218
222
|
"SpokePoolPeriphery": { "address": "0x89415a82d909a7238d69094C3Dd1dCC1aCbDa85C", "blockNumber": 8910059 }
|
|
219
223
|
},
|
|
220
224
|
"130": {
|
|
221
225
|
"SpokePool": { "address": "0x09aea4b2242abC8bb4BB78D537A67a245A7bEC64", "blockNumber": 7915488 },
|
|
222
226
|
"SpokePoolVerifier": { "address": "0x3Fb9cED51E968594C87963a371Ed90c39519f65A", "blockNumber": 15730595 },
|
|
223
|
-
"MulticallHandler": { "address": "
|
|
227
|
+
"MulticallHandler": { "address": "0x0F7Ae28dE1C8532170AD4ee566B5801485c13a0E", "blockNumber": 22350961 },
|
|
224
228
|
"SpokePoolPeriphery": { "address": "0x89415a82d909a7238d69094C3Dd1dCC1aCbDa85C", "blockNumber": 20205357 }
|
|
225
229
|
},
|
|
226
230
|
"1301": {
|
|
227
231
|
"SpokePool": { "address": "0x6999526e507Cc3b03b180BbE05E1Ff938259A874", "blockNumber": 12593713 },
|
|
228
|
-
"MulticallHandler": { "address": "
|
|
232
|
+
"MulticallHandler": { "address": "0x0F7Ae28dE1C8532170AD4ee566B5801485c13a0E", "blockNumber": 26247751 }
|
|
229
233
|
},
|
|
230
234
|
"129399": {
|
|
231
235
|
"SpokePool": { "address": "0x09aea4b2242abC8bb4BB78D537A67a245A7bEC64", "blockNumber": 2929205 },
|
package/dist/hardhat.config.js
CHANGED
|
@@ -142,7 +142,7 @@ const config = {
|
|
|
142
142
|
enabled: true,
|
|
143
143
|
},
|
|
144
144
|
suppressedErrors: ["sendtransfer"],
|
|
145
|
-
contractsToCompile: ["SpokePoolPeriphery"],
|
|
145
|
+
contractsToCompile: ["SpokePoolPeriphery", "MulticallHandler"],
|
|
146
146
|
},
|
|
147
147
|
},
|
|
148
148
|
networks: {
|
|
@@ -263,6 +263,13 @@ const config = {
|
|
|
263
263
|
accounts: { mnemonic },
|
|
264
264
|
companionNetworks: { l1: "mainnet" },
|
|
265
265
|
},
|
|
266
|
+
plasma: {
|
|
267
|
+
chainId: constants_1.CHAIN_IDs.PLASMA,
|
|
268
|
+
url: getNodeUrl(constants_1.CHAIN_IDs.PLASMA),
|
|
269
|
+
saveDeployments: true,
|
|
270
|
+
accounts: { mnemonic },
|
|
271
|
+
companionNetworks: { l1: "mainnet" },
|
|
272
|
+
},
|
|
266
273
|
scroll: {
|
|
267
274
|
chainId: constants_1.CHAIN_IDs.SCROLL,
|
|
268
275
|
url: getNodeUrl(constants_1.CHAIN_IDs.SCROLL),
|
|
@@ -4525,83 +4525,93 @@
|
|
|
4525
4525
|
"errors": [
|
|
4526
4526
|
{
|
|
4527
4527
|
"code": 6000,
|
|
4528
|
-
"name": "
|
|
4529
|
-
"msg": "
|
|
4528
|
+
"name": "NotOwner",
|
|
4529
|
+
"msg": "Only the owner can call this function!"
|
|
4530
4530
|
},
|
|
4531
4531
|
{
|
|
4532
4532
|
"code": 6001,
|
|
4533
|
-
"name": "
|
|
4534
|
-
"msg": "Invalid
|
|
4533
|
+
"name": "InvalidRelayHash",
|
|
4534
|
+
"msg": "Invalid relay hash!"
|
|
4535
4535
|
},
|
|
4536
4536
|
{
|
|
4537
4537
|
"code": 6002,
|
|
4538
|
-
"name": "
|
|
4539
|
-
"msg": "
|
|
4538
|
+
"name": "CanOnlyCloseFillStatusPdaIfFillDeadlinePassed",
|
|
4539
|
+
"msg": "The fill deadline has not passed!"
|
|
4540
4540
|
},
|
|
4541
4541
|
{
|
|
4542
4542
|
"code": 6003,
|
|
4543
|
-
"name": "
|
|
4544
|
-
"msg": "The
|
|
4543
|
+
"name": "NotRelayer",
|
|
4544
|
+
"msg": "The caller is not the relayer!"
|
|
4545
4545
|
},
|
|
4546
4546
|
{
|
|
4547
4547
|
"code": 6004,
|
|
4548
|
-
"name": "
|
|
4549
|
-
"msg": "
|
|
4548
|
+
"name": "CannotSetCurrentTime",
|
|
4549
|
+
"msg": "Cannot set time if not in test mode!"
|
|
4550
4550
|
},
|
|
4551
4551
|
{
|
|
4552
4552
|
"code": 6005,
|
|
4553
|
-
"name": "
|
|
4554
|
-
"msg": "
|
|
4553
|
+
"name": "InvalidRemoteDomain",
|
|
4554
|
+
"msg": "Invalid remote domain!"
|
|
4555
4555
|
},
|
|
4556
4556
|
{
|
|
4557
4557
|
"code": 6006,
|
|
4558
|
-
"name": "
|
|
4559
|
-
"msg": "
|
|
4558
|
+
"name": "InvalidRemoteSender",
|
|
4559
|
+
"msg": "Invalid remote sender!"
|
|
4560
4560
|
},
|
|
4561
4561
|
{
|
|
4562
4562
|
"code": 6007,
|
|
4563
|
-
"name": "
|
|
4564
|
-
"msg": "Invalid
|
|
4563
|
+
"name": "InvalidMint",
|
|
4564
|
+
"msg": "Invalid mint!"
|
|
4565
4565
|
},
|
|
4566
4566
|
{
|
|
4567
4567
|
"code": 6008,
|
|
4568
|
-
"name": "
|
|
4569
|
-
"msg": "
|
|
4568
|
+
"name": "ExceededPendingBridgeAmount",
|
|
4569
|
+
"msg": "Exceeded pending bridge amount to HubPool!"
|
|
4570
4570
|
},
|
|
4571
4571
|
{
|
|
4572
4572
|
"code": 6009,
|
|
4573
|
-
"name": "
|
|
4574
|
-
"msg": "
|
|
4573
|
+
"name": "ParamsWriteOverflow",
|
|
4574
|
+
"msg": "Overflow writing to parameters account!"
|
|
4575
4575
|
},
|
|
4576
4576
|
{
|
|
4577
4577
|
"code": 6010,
|
|
4578
|
-
"name": "
|
|
4579
|
-
"msg": "
|
|
4578
|
+
"name": "InvalidRefund",
|
|
4579
|
+
"msg": "Invalid refund address!"
|
|
4580
4580
|
},
|
|
4581
4581
|
{
|
|
4582
4582
|
"code": 6011,
|
|
4583
|
-
"name": "
|
|
4584
|
-
"msg": "
|
|
4583
|
+
"name": "ZeroRefundClaim",
|
|
4584
|
+
"msg": "Zero relayer refund claim!"
|
|
4585
4585
|
},
|
|
4586
4586
|
{
|
|
4587
4587
|
"code": 6012,
|
|
4588
|
-
"name": "
|
|
4589
|
-
"msg": "
|
|
4588
|
+
"name": "NonZeroRefundClaim",
|
|
4589
|
+
"msg": "Cannot close non-zero relayer refund claim!"
|
|
4590
4590
|
},
|
|
4591
4591
|
{
|
|
4592
4592
|
"code": 6013,
|
|
4593
|
-
"name": "
|
|
4594
|
-
"msg": "
|
|
4593
|
+
"name": "InvalidClaimInitializer",
|
|
4594
|
+
"msg": "Invalid claim initializer!"
|
|
4595
4595
|
},
|
|
4596
4596
|
{
|
|
4597
4597
|
"code": 6014,
|
|
4598
|
-
"name": "
|
|
4599
|
-
"msg": "Invalid
|
|
4598
|
+
"name": "InvalidRefundTokenAccount",
|
|
4599
|
+
"msg": "Invalid refund token account!"
|
|
4600
4600
|
},
|
|
4601
4601
|
{
|
|
4602
4602
|
"code": 6015,
|
|
4603
|
-
"name": "
|
|
4604
|
-
"msg": "
|
|
4603
|
+
"name": "InvalidProductionSeed",
|
|
4604
|
+
"msg": "Seed must be 0 in production!"
|
|
4605
|
+
},
|
|
4606
|
+
{
|
|
4607
|
+
"code": 6016,
|
|
4608
|
+
"name": "InvalidATACreationAccounts",
|
|
4609
|
+
"msg": "Invalid remaining accounts for ATA creation!"
|
|
4610
|
+
},
|
|
4611
|
+
{
|
|
4612
|
+
"code": 6017,
|
|
4613
|
+
"name": "InvalidDelegatePda",
|
|
4614
|
+
"msg": "Invalid delegate PDA!"
|
|
4605
4615
|
}
|
|
4606
4616
|
],
|
|
4607
4617
|
"types": [
|
|
@@ -4531,83 +4531,93 @@ export type SvmSpoke = {
|
|
|
4531
4531
|
"errors": [
|
|
4532
4532
|
{
|
|
4533
4533
|
"code": 6000;
|
|
4534
|
-
"name": "
|
|
4535
|
-
"msg": "
|
|
4534
|
+
"name": "notOwner";
|
|
4535
|
+
"msg": "Only the owner can call this function!";
|
|
4536
4536
|
},
|
|
4537
4537
|
{
|
|
4538
4538
|
"code": 6001;
|
|
4539
|
-
"name": "
|
|
4540
|
-
"msg": "Invalid
|
|
4539
|
+
"name": "invalidRelayHash";
|
|
4540
|
+
"msg": "Invalid relay hash!";
|
|
4541
4541
|
},
|
|
4542
4542
|
{
|
|
4543
4543
|
"code": 6002;
|
|
4544
|
-
"name": "
|
|
4545
|
-
"msg": "
|
|
4544
|
+
"name": "canOnlyCloseFillStatusPdaIfFillDeadlinePassed";
|
|
4545
|
+
"msg": "The fill deadline has not passed!";
|
|
4546
4546
|
},
|
|
4547
4547
|
{
|
|
4548
4548
|
"code": 6003;
|
|
4549
|
-
"name": "
|
|
4550
|
-
"msg": "The
|
|
4549
|
+
"name": "notRelayer";
|
|
4550
|
+
"msg": "The caller is not the relayer!";
|
|
4551
4551
|
},
|
|
4552
4552
|
{
|
|
4553
4553
|
"code": 6004;
|
|
4554
|
-
"name": "
|
|
4555
|
-
"msg": "
|
|
4554
|
+
"name": "cannotSetCurrentTime";
|
|
4555
|
+
"msg": "Cannot set time if not in test mode!";
|
|
4556
4556
|
},
|
|
4557
4557
|
{
|
|
4558
4558
|
"code": 6005;
|
|
4559
|
-
"name": "
|
|
4560
|
-
"msg": "
|
|
4559
|
+
"name": "invalidRemoteDomain";
|
|
4560
|
+
"msg": "Invalid remote domain!";
|
|
4561
4561
|
},
|
|
4562
4562
|
{
|
|
4563
4563
|
"code": 6006;
|
|
4564
|
-
"name": "
|
|
4565
|
-
"msg": "
|
|
4564
|
+
"name": "invalidRemoteSender";
|
|
4565
|
+
"msg": "Invalid remote sender!";
|
|
4566
4566
|
},
|
|
4567
4567
|
{
|
|
4568
4568
|
"code": 6007;
|
|
4569
|
-
"name": "
|
|
4570
|
-
"msg": "Invalid
|
|
4569
|
+
"name": "invalidMint";
|
|
4570
|
+
"msg": "Invalid mint!";
|
|
4571
4571
|
},
|
|
4572
4572
|
{
|
|
4573
4573
|
"code": 6008;
|
|
4574
|
-
"name": "
|
|
4575
|
-
"msg": "
|
|
4574
|
+
"name": "exceededPendingBridgeAmount";
|
|
4575
|
+
"msg": "Exceeded pending bridge amount to HubPool!";
|
|
4576
4576
|
},
|
|
4577
4577
|
{
|
|
4578
4578
|
"code": 6009;
|
|
4579
|
-
"name": "
|
|
4580
|
-
"msg": "
|
|
4579
|
+
"name": "paramsWriteOverflow";
|
|
4580
|
+
"msg": "Overflow writing to parameters account!";
|
|
4581
4581
|
},
|
|
4582
4582
|
{
|
|
4583
4583
|
"code": 6010;
|
|
4584
|
-
"name": "
|
|
4585
|
-
"msg": "
|
|
4584
|
+
"name": "invalidRefund";
|
|
4585
|
+
"msg": "Invalid refund address!";
|
|
4586
4586
|
},
|
|
4587
4587
|
{
|
|
4588
4588
|
"code": 6011;
|
|
4589
|
-
"name": "
|
|
4590
|
-
"msg": "
|
|
4589
|
+
"name": "zeroRefundClaim";
|
|
4590
|
+
"msg": "Zero relayer refund claim!";
|
|
4591
4591
|
},
|
|
4592
4592
|
{
|
|
4593
4593
|
"code": 6012;
|
|
4594
|
-
"name": "
|
|
4595
|
-
"msg": "
|
|
4594
|
+
"name": "nonZeroRefundClaim";
|
|
4595
|
+
"msg": "Cannot close non-zero relayer refund claim!";
|
|
4596
4596
|
},
|
|
4597
4597
|
{
|
|
4598
4598
|
"code": 6013;
|
|
4599
|
-
"name": "
|
|
4600
|
-
"msg": "
|
|
4599
|
+
"name": "invalidClaimInitializer";
|
|
4600
|
+
"msg": "Invalid claim initializer!";
|
|
4601
4601
|
},
|
|
4602
4602
|
{
|
|
4603
4603
|
"code": 6014;
|
|
4604
|
-
"name": "
|
|
4605
|
-
"msg": "Invalid
|
|
4604
|
+
"name": "invalidRefundTokenAccount";
|
|
4605
|
+
"msg": "Invalid refund token account!";
|
|
4606
4606
|
},
|
|
4607
4607
|
{
|
|
4608
4608
|
"code": 6015;
|
|
4609
|
-
"name": "
|
|
4610
|
-
"msg": "
|
|
4609
|
+
"name": "invalidProductionSeed";
|
|
4610
|
+
"msg": "Seed must be 0 in production!";
|
|
4611
|
+
},
|
|
4612
|
+
{
|
|
4613
|
+
"code": 6016;
|
|
4614
|
+
"name": "invalidAtaCreationAccounts";
|
|
4615
|
+
"msg": "Invalid remaining accounts for ATA creation!";
|
|
4616
|
+
},
|
|
4617
|
+
{
|
|
4618
|
+
"code": 6017;
|
|
4619
|
+
"name": "invalidDelegatePda";
|
|
4620
|
+
"msg": "Invalid delegate PDA!";
|
|
4611
4621
|
}
|
|
4612
4622
|
];
|
|
4613
4623
|
"types": [
|
|
@@ -6,39 +6,43 @@
|
|
|
6
6
|
* @see https://github.com/codama-idl/codama
|
|
7
7
|
*/
|
|
8
8
|
import { type Address, type SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM, type SolanaError } from '@solana/kit';
|
|
9
|
-
/**
|
|
10
|
-
export declare const
|
|
11
|
-
/**
|
|
12
|
-
export declare const
|
|
13
|
-
/**
|
|
14
|
-
export declare const
|
|
15
|
-
/**
|
|
16
|
-
export declare const
|
|
17
|
-
/**
|
|
18
|
-
export declare const
|
|
19
|
-
/**
|
|
20
|
-
export declare const
|
|
21
|
-
/**
|
|
22
|
-
export declare const
|
|
23
|
-
/**
|
|
24
|
-
export declare const
|
|
25
|
-
/**
|
|
26
|
-
export declare const
|
|
27
|
-
/**
|
|
28
|
-
export declare const
|
|
29
|
-
/**
|
|
30
|
-
export declare const
|
|
31
|
-
/**
|
|
32
|
-
export declare const
|
|
33
|
-
/**
|
|
34
|
-
export declare const
|
|
35
|
-
/**
|
|
36
|
-
export declare const
|
|
37
|
-
/**
|
|
38
|
-
export declare const
|
|
39
|
-
/**
|
|
40
|
-
export declare const
|
|
41
|
-
|
|
9
|
+
/** NotOwner: Only the owner can call this function! */
|
|
10
|
+
export declare const SVM_SPOKE_ERROR__NOT_OWNER = 6000;
|
|
11
|
+
/** InvalidRelayHash: Invalid relay hash! */
|
|
12
|
+
export declare const SVM_SPOKE_ERROR__INVALID_RELAY_HASH = 6001;
|
|
13
|
+
/** CanOnlyCloseFillStatusPdaIfFillDeadlinePassed: The fill deadline has not passed! */
|
|
14
|
+
export declare const SVM_SPOKE_ERROR__CAN_ONLY_CLOSE_FILL_STATUS_PDA_IF_FILL_DEADLINE_PASSED = 6002;
|
|
15
|
+
/** NotRelayer: The caller is not the relayer! */
|
|
16
|
+
export declare const SVM_SPOKE_ERROR__NOT_RELAYER = 6003;
|
|
17
|
+
/** CannotSetCurrentTime: Cannot set time if not in test mode! */
|
|
18
|
+
export declare const SVM_SPOKE_ERROR__CANNOT_SET_CURRENT_TIME = 6004;
|
|
19
|
+
/** InvalidRemoteDomain: Invalid remote domain! */
|
|
20
|
+
export declare const SVM_SPOKE_ERROR__INVALID_REMOTE_DOMAIN = 6005;
|
|
21
|
+
/** InvalidRemoteSender: Invalid remote sender! */
|
|
22
|
+
export declare const SVM_SPOKE_ERROR__INVALID_REMOTE_SENDER = 6006;
|
|
23
|
+
/** InvalidMint: Invalid mint! */
|
|
24
|
+
export declare const SVM_SPOKE_ERROR__INVALID_MINT = 6007;
|
|
25
|
+
/** ExceededPendingBridgeAmount: Exceeded pending bridge amount to HubPool! */
|
|
26
|
+
export declare const SVM_SPOKE_ERROR__EXCEEDED_PENDING_BRIDGE_AMOUNT = 6008;
|
|
27
|
+
/** ParamsWriteOverflow: Overflow writing to parameters account! */
|
|
28
|
+
export declare const SVM_SPOKE_ERROR__PARAMS_WRITE_OVERFLOW = 6009;
|
|
29
|
+
/** InvalidRefund: Invalid refund address! */
|
|
30
|
+
export declare const SVM_SPOKE_ERROR__INVALID_REFUND = 6010;
|
|
31
|
+
/** ZeroRefundClaim: Zero relayer refund claim! */
|
|
32
|
+
export declare const SVM_SPOKE_ERROR__ZERO_REFUND_CLAIM = 6011;
|
|
33
|
+
/** NonZeroRefundClaim: Cannot close non-zero relayer refund claim! */
|
|
34
|
+
export declare const SVM_SPOKE_ERROR__NON_ZERO_REFUND_CLAIM = 6012;
|
|
35
|
+
/** InvalidClaimInitializer: Invalid claim initializer! */
|
|
36
|
+
export declare const SVM_SPOKE_ERROR__INVALID_CLAIM_INITIALIZER = 6013;
|
|
37
|
+
/** InvalidRefundTokenAccount: Invalid refund token account! */
|
|
38
|
+
export declare const SVM_SPOKE_ERROR__INVALID_REFUND_TOKEN_ACCOUNT = 6014;
|
|
39
|
+
/** InvalidProductionSeed: Seed must be 0 in production! */
|
|
40
|
+
export declare const SVM_SPOKE_ERROR__INVALID_PRODUCTION_SEED = 6015;
|
|
41
|
+
/** InvalidATACreationAccounts: Invalid remaining accounts for ATA creation! */
|
|
42
|
+
export declare const SVM_SPOKE_ERROR__INVALID_A_T_A_CREATION_ACCOUNTS = 6016;
|
|
43
|
+
/** InvalidDelegatePda: Invalid delegate PDA! */
|
|
44
|
+
export declare const SVM_SPOKE_ERROR__INVALID_DELEGATE_PDA = 6017;
|
|
45
|
+
export type SvmSpokeError = typeof SVM_SPOKE_ERROR__CANNOT_SET_CURRENT_TIME | typeof SVM_SPOKE_ERROR__CAN_ONLY_CLOSE_FILL_STATUS_PDA_IF_FILL_DEADLINE_PASSED | typeof SVM_SPOKE_ERROR__EXCEEDED_PENDING_BRIDGE_AMOUNT | typeof SVM_SPOKE_ERROR__INVALID_A_T_A_CREATION_ACCOUNTS | typeof SVM_SPOKE_ERROR__INVALID_CLAIM_INITIALIZER | typeof SVM_SPOKE_ERROR__INVALID_DELEGATE_PDA | typeof SVM_SPOKE_ERROR__INVALID_MINT | typeof SVM_SPOKE_ERROR__INVALID_PRODUCTION_SEED | typeof SVM_SPOKE_ERROR__INVALID_REFUND | typeof SVM_SPOKE_ERROR__INVALID_REFUND_TOKEN_ACCOUNT | typeof SVM_SPOKE_ERROR__INVALID_RELAY_HASH | typeof SVM_SPOKE_ERROR__INVALID_REMOTE_DOMAIN | typeof SVM_SPOKE_ERROR__INVALID_REMOTE_SENDER | typeof SVM_SPOKE_ERROR__NON_ZERO_REFUND_CLAIM | typeof SVM_SPOKE_ERROR__NOT_OWNER | typeof SVM_SPOKE_ERROR__NOT_RELAYER | typeof SVM_SPOKE_ERROR__PARAMS_WRITE_OVERFLOW | typeof SVM_SPOKE_ERROR__ZERO_REFUND_CLAIM;
|
|
42
46
|
export declare function getSvmSpokeErrorMessage(code: SvmSpokeError): string;
|
|
43
47
|
export declare function isSvmSpokeError<TProgramErrorCode extends SvmSpokeError>(error: unknown, transactionMessage: {
|
|
44
48
|
instructions: Record<number, {
|
|
@@ -7,62 +7,68 @@
|
|
|
7
7
|
* @see https://github.com/codama-idl/codama
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.
|
|
10
|
+
exports.SVM_SPOKE_ERROR__INVALID_DELEGATE_PDA = exports.SVM_SPOKE_ERROR__INVALID_A_T_A_CREATION_ACCOUNTS = exports.SVM_SPOKE_ERROR__INVALID_PRODUCTION_SEED = exports.SVM_SPOKE_ERROR__INVALID_REFUND_TOKEN_ACCOUNT = exports.SVM_SPOKE_ERROR__INVALID_CLAIM_INITIALIZER = exports.SVM_SPOKE_ERROR__NON_ZERO_REFUND_CLAIM = exports.SVM_SPOKE_ERROR__ZERO_REFUND_CLAIM = exports.SVM_SPOKE_ERROR__INVALID_REFUND = exports.SVM_SPOKE_ERROR__PARAMS_WRITE_OVERFLOW = exports.SVM_SPOKE_ERROR__EXCEEDED_PENDING_BRIDGE_AMOUNT = exports.SVM_SPOKE_ERROR__INVALID_MINT = exports.SVM_SPOKE_ERROR__INVALID_REMOTE_SENDER = exports.SVM_SPOKE_ERROR__INVALID_REMOTE_DOMAIN = exports.SVM_SPOKE_ERROR__CANNOT_SET_CURRENT_TIME = exports.SVM_SPOKE_ERROR__NOT_RELAYER = exports.SVM_SPOKE_ERROR__CAN_ONLY_CLOSE_FILL_STATUS_PDA_IF_FILL_DEADLINE_PASSED = exports.SVM_SPOKE_ERROR__INVALID_RELAY_HASH = exports.SVM_SPOKE_ERROR__NOT_OWNER = void 0;
|
|
11
11
|
exports.getSvmSpokeErrorMessage = getSvmSpokeErrorMessage;
|
|
12
12
|
exports.isSvmSpokeError = isSvmSpokeError;
|
|
13
13
|
const kit_1 = require("@solana/kit");
|
|
14
14
|
const programs_1 = require("../programs");
|
|
15
|
-
/**
|
|
16
|
-
exports.
|
|
17
|
-
/**
|
|
18
|
-
exports.
|
|
19
|
-
/**
|
|
20
|
-
exports.
|
|
21
|
-
/**
|
|
22
|
-
exports.
|
|
23
|
-
/**
|
|
24
|
-
exports.
|
|
25
|
-
/**
|
|
26
|
-
exports.
|
|
27
|
-
/**
|
|
28
|
-
exports.
|
|
29
|
-
/**
|
|
30
|
-
exports.
|
|
31
|
-
/**
|
|
32
|
-
exports.
|
|
33
|
-
/**
|
|
34
|
-
exports.
|
|
35
|
-
/**
|
|
36
|
-
exports.
|
|
37
|
-
/**
|
|
38
|
-
exports.
|
|
39
|
-
/**
|
|
40
|
-
exports.
|
|
41
|
-
/**
|
|
42
|
-
exports.
|
|
43
|
-
/**
|
|
44
|
-
exports.
|
|
45
|
-
/**
|
|
46
|
-
exports.
|
|
15
|
+
/** NotOwner: Only the owner can call this function! */
|
|
16
|
+
exports.SVM_SPOKE_ERROR__NOT_OWNER = 0x1770; // 6000
|
|
17
|
+
/** InvalidRelayHash: Invalid relay hash! */
|
|
18
|
+
exports.SVM_SPOKE_ERROR__INVALID_RELAY_HASH = 0x1771; // 6001
|
|
19
|
+
/** CanOnlyCloseFillStatusPdaIfFillDeadlinePassed: The fill deadline has not passed! */
|
|
20
|
+
exports.SVM_SPOKE_ERROR__CAN_ONLY_CLOSE_FILL_STATUS_PDA_IF_FILL_DEADLINE_PASSED = 0x1772; // 6002
|
|
21
|
+
/** NotRelayer: The caller is not the relayer! */
|
|
22
|
+
exports.SVM_SPOKE_ERROR__NOT_RELAYER = 0x1773; // 6003
|
|
23
|
+
/** CannotSetCurrentTime: Cannot set time if not in test mode! */
|
|
24
|
+
exports.SVM_SPOKE_ERROR__CANNOT_SET_CURRENT_TIME = 0x1774; // 6004
|
|
25
|
+
/** InvalidRemoteDomain: Invalid remote domain! */
|
|
26
|
+
exports.SVM_SPOKE_ERROR__INVALID_REMOTE_DOMAIN = 0x1775; // 6005
|
|
27
|
+
/** InvalidRemoteSender: Invalid remote sender! */
|
|
28
|
+
exports.SVM_SPOKE_ERROR__INVALID_REMOTE_SENDER = 0x1776; // 6006
|
|
29
|
+
/** InvalidMint: Invalid mint! */
|
|
30
|
+
exports.SVM_SPOKE_ERROR__INVALID_MINT = 0x1777; // 6007
|
|
31
|
+
/** ExceededPendingBridgeAmount: Exceeded pending bridge amount to HubPool! */
|
|
32
|
+
exports.SVM_SPOKE_ERROR__EXCEEDED_PENDING_BRIDGE_AMOUNT = 0x1778; // 6008
|
|
33
|
+
/** ParamsWriteOverflow: Overflow writing to parameters account! */
|
|
34
|
+
exports.SVM_SPOKE_ERROR__PARAMS_WRITE_OVERFLOW = 0x1779; // 6009
|
|
35
|
+
/** InvalidRefund: Invalid refund address! */
|
|
36
|
+
exports.SVM_SPOKE_ERROR__INVALID_REFUND = 0x177a; // 6010
|
|
37
|
+
/** ZeroRefundClaim: Zero relayer refund claim! */
|
|
38
|
+
exports.SVM_SPOKE_ERROR__ZERO_REFUND_CLAIM = 0x177b; // 6011
|
|
39
|
+
/** NonZeroRefundClaim: Cannot close non-zero relayer refund claim! */
|
|
40
|
+
exports.SVM_SPOKE_ERROR__NON_ZERO_REFUND_CLAIM = 0x177c; // 6012
|
|
41
|
+
/** InvalidClaimInitializer: Invalid claim initializer! */
|
|
42
|
+
exports.SVM_SPOKE_ERROR__INVALID_CLAIM_INITIALIZER = 0x177d; // 6013
|
|
43
|
+
/** InvalidRefundTokenAccount: Invalid refund token account! */
|
|
44
|
+
exports.SVM_SPOKE_ERROR__INVALID_REFUND_TOKEN_ACCOUNT = 0x177e; // 6014
|
|
45
|
+
/** InvalidProductionSeed: Seed must be 0 in production! */
|
|
46
|
+
exports.SVM_SPOKE_ERROR__INVALID_PRODUCTION_SEED = 0x177f; // 6015
|
|
47
|
+
/** InvalidATACreationAccounts: Invalid remaining accounts for ATA creation! */
|
|
48
|
+
exports.SVM_SPOKE_ERROR__INVALID_A_T_A_CREATION_ACCOUNTS = 0x1780; // 6016
|
|
49
|
+
/** InvalidDelegatePda: Invalid delegate PDA! */
|
|
50
|
+
exports.SVM_SPOKE_ERROR__INVALID_DELEGATE_PDA = 0x1781; // 6017
|
|
47
51
|
let svmSpokeErrorMessages;
|
|
48
52
|
if (process.env.NODE_ENV !== 'production') {
|
|
49
53
|
svmSpokeErrorMessages = {
|
|
50
|
-
[exports.
|
|
51
|
-
[exports.
|
|
52
|
-
[exports.
|
|
53
|
-
[exports.
|
|
54
|
-
[exports.
|
|
55
|
-
[exports.
|
|
56
|
-
[exports.
|
|
57
|
-
[exports.
|
|
58
|
-
[exports.
|
|
59
|
-
[exports.
|
|
60
|
-
[exports.
|
|
61
|
-
[exports.
|
|
62
|
-
[exports.
|
|
63
|
-
[exports.
|
|
64
|
-
[exports.
|
|
65
|
-
[exports.
|
|
54
|
+
[exports.SVM_SPOKE_ERROR__CANNOT_SET_CURRENT_TIME]: `Cannot set time if not in test mode!`,
|
|
55
|
+
[exports.SVM_SPOKE_ERROR__CAN_ONLY_CLOSE_FILL_STATUS_PDA_IF_FILL_DEADLINE_PASSED]: `The fill deadline has not passed!`,
|
|
56
|
+
[exports.SVM_SPOKE_ERROR__EXCEEDED_PENDING_BRIDGE_AMOUNT]: `Exceeded pending bridge amount to HubPool!`,
|
|
57
|
+
[exports.SVM_SPOKE_ERROR__INVALID_A_T_A_CREATION_ACCOUNTS]: `Invalid remaining accounts for ATA creation!`,
|
|
58
|
+
[exports.SVM_SPOKE_ERROR__INVALID_CLAIM_INITIALIZER]: `Invalid claim initializer!`,
|
|
59
|
+
[exports.SVM_SPOKE_ERROR__INVALID_DELEGATE_PDA]: `Invalid delegate PDA!`,
|
|
60
|
+
[exports.SVM_SPOKE_ERROR__INVALID_MINT]: `Invalid mint!`,
|
|
61
|
+
[exports.SVM_SPOKE_ERROR__INVALID_PRODUCTION_SEED]: `Seed must be 0 in production!`,
|
|
62
|
+
[exports.SVM_SPOKE_ERROR__INVALID_REFUND]: `Invalid refund address!`,
|
|
63
|
+
[exports.SVM_SPOKE_ERROR__INVALID_REFUND_TOKEN_ACCOUNT]: `Invalid refund token account!`,
|
|
64
|
+
[exports.SVM_SPOKE_ERROR__INVALID_RELAY_HASH]: `Invalid relay hash!`,
|
|
65
|
+
[exports.SVM_SPOKE_ERROR__INVALID_REMOTE_DOMAIN]: `Invalid remote domain!`,
|
|
66
|
+
[exports.SVM_SPOKE_ERROR__INVALID_REMOTE_SENDER]: `Invalid remote sender!`,
|
|
67
|
+
[exports.SVM_SPOKE_ERROR__NON_ZERO_REFUND_CLAIM]: `Cannot close non-zero relayer refund claim!`,
|
|
68
|
+
[exports.SVM_SPOKE_ERROR__NOT_OWNER]: `Only the owner can call this function!`,
|
|
69
|
+
[exports.SVM_SPOKE_ERROR__NOT_RELAYER]: `The caller is not the relayer!`,
|
|
70
|
+
[exports.SVM_SPOKE_ERROR__PARAMS_WRITE_OVERFLOW]: `Overflow writing to parameters account!`,
|
|
71
|
+
[exports.SVM_SPOKE_ERROR__ZERO_REFUND_CLAIM]: `Zero relayer refund claim!`,
|
|
66
72
|
};
|
|
67
73
|
}
|
|
68
74
|
function getSvmSpokeErrorMessage(code) {
|
|
@@ -4531,83 +4531,93 @@ export type SvmSpoke = {
|
|
|
4531
4531
|
"errors": [
|
|
4532
4532
|
{
|
|
4533
4533
|
"code": 6000;
|
|
4534
|
-
"name": "
|
|
4535
|
-
"msg": "
|
|
4534
|
+
"name": "notOwner";
|
|
4535
|
+
"msg": "Only the owner can call this function!";
|
|
4536
4536
|
},
|
|
4537
4537
|
{
|
|
4538
4538
|
"code": 6001;
|
|
4539
|
-
"name": "
|
|
4540
|
-
"msg": "Invalid
|
|
4539
|
+
"name": "invalidRelayHash";
|
|
4540
|
+
"msg": "Invalid relay hash!";
|
|
4541
4541
|
},
|
|
4542
4542
|
{
|
|
4543
4543
|
"code": 6002;
|
|
4544
|
-
"name": "
|
|
4545
|
-
"msg": "
|
|
4544
|
+
"name": "canOnlyCloseFillStatusPdaIfFillDeadlinePassed";
|
|
4545
|
+
"msg": "The fill deadline has not passed!";
|
|
4546
4546
|
},
|
|
4547
4547
|
{
|
|
4548
4548
|
"code": 6003;
|
|
4549
|
-
"name": "
|
|
4550
|
-
"msg": "The
|
|
4549
|
+
"name": "notRelayer";
|
|
4550
|
+
"msg": "The caller is not the relayer!";
|
|
4551
4551
|
},
|
|
4552
4552
|
{
|
|
4553
4553
|
"code": 6004;
|
|
4554
|
-
"name": "
|
|
4555
|
-
"msg": "
|
|
4554
|
+
"name": "cannotSetCurrentTime";
|
|
4555
|
+
"msg": "Cannot set time if not in test mode!";
|
|
4556
4556
|
},
|
|
4557
4557
|
{
|
|
4558
4558
|
"code": 6005;
|
|
4559
|
-
"name": "
|
|
4560
|
-
"msg": "
|
|
4559
|
+
"name": "invalidRemoteDomain";
|
|
4560
|
+
"msg": "Invalid remote domain!";
|
|
4561
4561
|
},
|
|
4562
4562
|
{
|
|
4563
4563
|
"code": 6006;
|
|
4564
|
-
"name": "
|
|
4565
|
-
"msg": "
|
|
4564
|
+
"name": "invalidRemoteSender";
|
|
4565
|
+
"msg": "Invalid remote sender!";
|
|
4566
4566
|
},
|
|
4567
4567
|
{
|
|
4568
4568
|
"code": 6007;
|
|
4569
|
-
"name": "
|
|
4570
|
-
"msg": "Invalid
|
|
4569
|
+
"name": "invalidMint";
|
|
4570
|
+
"msg": "Invalid mint!";
|
|
4571
4571
|
},
|
|
4572
4572
|
{
|
|
4573
4573
|
"code": 6008;
|
|
4574
|
-
"name": "
|
|
4575
|
-
"msg": "
|
|
4574
|
+
"name": "exceededPendingBridgeAmount";
|
|
4575
|
+
"msg": "Exceeded pending bridge amount to HubPool!";
|
|
4576
4576
|
},
|
|
4577
4577
|
{
|
|
4578
4578
|
"code": 6009;
|
|
4579
|
-
"name": "
|
|
4580
|
-
"msg": "
|
|
4579
|
+
"name": "paramsWriteOverflow";
|
|
4580
|
+
"msg": "Overflow writing to parameters account!";
|
|
4581
4581
|
},
|
|
4582
4582
|
{
|
|
4583
4583
|
"code": 6010;
|
|
4584
|
-
"name": "
|
|
4585
|
-
"msg": "
|
|
4584
|
+
"name": "invalidRefund";
|
|
4585
|
+
"msg": "Invalid refund address!";
|
|
4586
4586
|
},
|
|
4587
4587
|
{
|
|
4588
4588
|
"code": 6011;
|
|
4589
|
-
"name": "
|
|
4590
|
-
"msg": "
|
|
4589
|
+
"name": "zeroRefundClaim";
|
|
4590
|
+
"msg": "Zero relayer refund claim!";
|
|
4591
4591
|
},
|
|
4592
4592
|
{
|
|
4593
4593
|
"code": 6012;
|
|
4594
|
-
"name": "
|
|
4595
|
-
"msg": "
|
|
4594
|
+
"name": "nonZeroRefundClaim";
|
|
4595
|
+
"msg": "Cannot close non-zero relayer refund claim!";
|
|
4596
4596
|
},
|
|
4597
4597
|
{
|
|
4598
4598
|
"code": 6013;
|
|
4599
|
-
"name": "
|
|
4600
|
-
"msg": "
|
|
4599
|
+
"name": "invalidClaimInitializer";
|
|
4600
|
+
"msg": "Invalid claim initializer!";
|
|
4601
4601
|
},
|
|
4602
4602
|
{
|
|
4603
4603
|
"code": 6014;
|
|
4604
|
-
"name": "
|
|
4605
|
-
"msg": "Invalid
|
|
4604
|
+
"name": "invalidRefundTokenAccount";
|
|
4605
|
+
"msg": "Invalid refund token account!";
|
|
4606
4606
|
},
|
|
4607
4607
|
{
|
|
4608
4608
|
"code": 6015;
|
|
4609
|
-
"name": "
|
|
4610
|
-
"msg": "
|
|
4609
|
+
"name": "invalidProductionSeed";
|
|
4610
|
+
"msg": "Seed must be 0 in production!";
|
|
4611
|
+
},
|
|
4612
|
+
{
|
|
4613
|
+
"code": 6016;
|
|
4614
|
+
"name": "invalidAtaCreationAccounts";
|
|
4615
|
+
"msg": "Invalid remaining accounts for ATA creation!";
|
|
4616
|
+
},
|
|
4617
|
+
{
|
|
4618
|
+
"code": 6017;
|
|
4619
|
+
"name": "invalidDelegatePda";
|
|
4620
|
+
"msg": "Invalid delegate PDA!";
|
|
4611
4621
|
}
|
|
4612
4622
|
];
|
|
4613
4623
|
"types": [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@across-protocol/contracts",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.7",
|
|
4
4
|
"author": "UMA Team",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"repository": {
|
|
@@ -19,13 +19,14 @@
|
|
|
19
19
|
"main": "dist/index.js",
|
|
20
20
|
"scripts": {
|
|
21
21
|
"compile-zksync": "COMPILE_ZK=true yarn hardhat compile",
|
|
22
|
+
"forge-script-zksync": " FOUNDRY_PROFILE=zksync forge script --zksync --suppress-errors sendtransfer",
|
|
22
23
|
"lint": "yarn lint-solidity && yarn lint-js && yarn lint-rust",
|
|
23
24
|
"lint-solidity": "yarn solhint ./contracts/**/*.sol",
|
|
24
25
|
"lint-js": "yarn prettier --list-different **/*.js **/*.ts",
|
|
25
26
|
"lint-rust": "cargo +nightly fmt --all -- --check && cargo clippy",
|
|
26
27
|
"lint-fix": "yarn prettier --write **/*.js **/*.ts ./programs/**/*.rs ./contracts**/*.sol && cargo +nightly fmt --all && cargo clippy",
|
|
27
|
-
"clean-fast": "for dir in node_modules cache cache-zk artifacts artifacts-zk dist typechain out; do mv \"${dir}\" \"_${dir}\"; rm -rf \"_${dir}\" &; done",
|
|
28
|
-
"clean": "rm -rf node_modules cache cache-zk artifacts artifacts-zk dist typechain out",
|
|
28
|
+
"clean-fast": "for dir in node_modules cache cache-zk artifacts artifacts-zk dist typechain out zkout; do mv \"${dir}\" \"_${dir}\"; rm -rf \"_${dir}\" &; done",
|
|
29
|
+
"clean": "rm -rf node_modules cache cache-zk artifacts artifacts-zk dist typechain out zkout",
|
|
29
30
|
"generate-svm-artifacts": "bash ./scripts/svm/buildHelpers/buildIdl.sh && sh ./scripts/svm/buildHelpers/generateSvmAssets.sh && yarn generate-svm-clients",
|
|
30
31
|
"generate-svm-clients": "yarn ts-node ./scripts/svm/buildHelpers/generateSvmClients.ts && yarn ts-node ./scripts/svm/buildHelpers/renameClientsImports.ts",
|
|
31
32
|
"build-evm": "hardhat compile",
|
|
@@ -51,7 +52,7 @@
|
|
|
51
52
|
"generate-constants-json": "ts-node ./script/utils/GenerateConstantsJson.ts"
|
|
52
53
|
},
|
|
53
54
|
"dependencies": {
|
|
54
|
-
"@across-protocol/constants": "^3.1.
|
|
55
|
+
"@across-protocol/constants": "^3.1.77",
|
|
55
56
|
"@coral-xyz/anchor": "^0.31.1",
|
|
56
57
|
"@defi-wonderland/smock": "^2.3.4",
|
|
57
58
|
"@eth-optimism/contracts": "^0.5.40",
|