@across-protocol/contracts 4.1.9 → 4.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/deploy/consts.js +1 -0
- package/dist/deployments/deployments.json +5 -1
- package/dist/hardhat.config.js +6 -14
- package/dist/scripts/deployMultisig.d.ts +1 -0
- package/dist/scripts/deployMultisig.js +96 -0
- 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/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +1 -0
- package/dist/utils/network.d.ts +1 -0
- package/dist/utils/network.js +13 -0
- package/package.json +2 -1
package/dist/deploy/consts.js
CHANGED
|
@@ -179,6 +179,7 @@ exports.L2_ADDRESS_MAP = {
|
|
|
179
179
|
[utils_1.CHAIN_IDs.HYPEREVM]: {
|
|
180
180
|
cctpV2TokenMessenger: "0x28b5a0e9C621a5BadaA536219b3a228C8168cf5d",
|
|
181
181
|
cctpV2MessageTransmitter: "0x81D40F21F12A8F0E3252Bccb954D722d4c464B64",
|
|
182
|
+
permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
|
|
182
183
|
},
|
|
183
184
|
[utils_1.CHAIN_IDs.PLASMA]: {
|
|
184
185
|
permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
|
|
@@ -63,8 +63,10 @@
|
|
|
63
63
|
},
|
|
64
64
|
"999": {
|
|
65
65
|
"SpokePool": { "address": "0x35E63eA3eb0fb7A3bc543C71FB66412e1F6B0E04", "blockNumber": 13937805 },
|
|
66
|
+
"SpokePoolVerifier": { "address": "0x3Fb9cED51E968594C87963a371Ed90c39519f65A", "blockNumber": 14459886 },
|
|
66
67
|
"Helios": { "address": "0xd08baaE74D6d2eAb1F3320B2E1a53eeb391ce8e5", "blockNumber": 13934816 },
|
|
67
|
-
"MulticallHandler": { "address": "0x5E7840E06fAcCb6d1c3b5F5E0d1d3d07F2829bba", "blockNumber": 13992522 }
|
|
68
|
+
"MulticallHandler": { "address": "0x5E7840E06fAcCb6d1c3b5F5E0d1d3d07F2829bba", "blockNumber": 13992522 },
|
|
69
|
+
"SpokePoolPeriphery": { "address": "0xF1BF00D947267Da5cC63f8c8A60568c59FA31bCb", "blockNumber": 15142204 }
|
|
68
70
|
},
|
|
69
71
|
"137": {
|
|
70
72
|
"MintableERC1155": { "address": "0xA15a90E7936A2F8B70E181E955760860D133e56B", "blockNumber": 40600414 },
|
|
@@ -86,12 +88,14 @@
|
|
|
86
88
|
},
|
|
87
89
|
"232": {
|
|
88
90
|
"SpokePool": { "address": "0xb234cA484866c811d0e6D3318866F583781ED045", "blockNumber": 4197027 },
|
|
91
|
+
"SpokePoolVerifier": { "address": "0x3Fb9cED51E968594C87963a371Ed90c39519f65A", "blockNumber": 4419395 },
|
|
89
92
|
"MulticallHandler": { "address": "0x1Ed0D59019a52870337b51DEe8190486a8663037", "blockNumber": 3458452 },
|
|
90
93
|
"SpokePoolPeriphery": { "address": "0x8A8cA9c4112c67b7Dae7dF7E89EA45D592362107", "blockNumber": 2884429 }
|
|
91
94
|
},
|
|
92
95
|
"288": { "SpokePool": { "address": "0xBbc6009fEfFc27ce705322832Cb2068F8C1e0A58", "blockNumber": 619993 } },
|
|
93
96
|
"324": {
|
|
94
97
|
"SpokePool": { "address": "0xE0B015E54d54fc84a6cB9B666099c46adE9335FF", "blockNumber": 10352565 },
|
|
98
|
+
"SpokePoolVerifier": { "address": "0x3Fb9cED51E968594C87963a371Ed90c39519f65A", "blockNumber": 64765628 },
|
|
95
99
|
"MulticallHandler": { "address": "0x68d3806E57148D6c6793C78EbDDbc272fE605dbf", "blockNumber": 63168917 },
|
|
96
100
|
"SpokePoolPeriphery": { "address": "0x672b9ba0CE73b69b5F940362F0ee36AAA3F02986", "blockNumber": 62189304 }
|
|
97
101
|
},
|
package/dist/hardhat.config.js
CHANGED
|
@@ -26,6 +26,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
26
26
|
const dotenv = __importStar(require("dotenv"));
|
|
27
27
|
dotenv.config();
|
|
28
28
|
const constants_1 = require("./utils/constants");
|
|
29
|
+
const utils_1 = require("./utils");
|
|
29
30
|
require("@nomicfoundation/hardhat-verify"); // Must be above hardhat-upgrades
|
|
30
31
|
require("@nomiclabs/hardhat-waffle");
|
|
31
32
|
require("@typechain/hardhat");
|
|
@@ -36,15 +37,6 @@ require("hardhat-gas-reporter");
|
|
|
36
37
|
require("solidity-coverage");
|
|
37
38
|
require("hardhat-deploy");
|
|
38
39
|
require("@openzeppelin/hardhat-upgrades");
|
|
39
|
-
const getNodeUrl = (chainId) => {
|
|
40
|
-
let url = process.env[`NODE_URL_${chainId}`] ?? process.env.CUSTOM_NODE_URL;
|
|
41
|
-
if (url === undefined) {
|
|
42
|
-
// eslint-disable-next-line no-console
|
|
43
|
-
console.log(`No configured RPC provider for chain ${chainId}, reverting to public RPC.`);
|
|
44
|
-
url = constants_1.PUBLIC_NETWORKS[chainId].publicRPC;
|
|
45
|
-
}
|
|
46
|
-
return url;
|
|
47
|
-
};
|
|
48
40
|
const getMnemonic = () => {
|
|
49
41
|
// Publicly-disclosed mnemonic. This is required for hre deployments in test.
|
|
50
42
|
const PUBLIC_MNEMONIC = "candy maple cake sugar pudding cream honey rich smooth crumble sweet treat";
|
|
@@ -55,7 +47,7 @@ const mnemonic = getMnemonic();
|
|
|
55
47
|
const getDefaultHardhatConfig = (chainId, isTestnet = false) => {
|
|
56
48
|
return {
|
|
57
49
|
chainId,
|
|
58
|
-
url: getNodeUrl(chainId),
|
|
50
|
+
url: (0, utils_1.getNodeUrl)(chainId),
|
|
59
51
|
accounts: { mnemonic },
|
|
60
52
|
saveDeployments: true,
|
|
61
53
|
companionNetworks: { l1: isTestnet ? "sepolia" : "mainnet" },
|
|
@@ -163,7 +155,7 @@ const config = {
|
|
|
163
155
|
mainnet: getDefaultHardhatConfig(constants_1.CHAIN_IDs.MAINNET),
|
|
164
156
|
zksync: {
|
|
165
157
|
chainId: constants_1.CHAIN_IDs.ZK_SYNC,
|
|
166
|
-
url: getNodeUrl(constants_1.CHAIN_IDs.ZK_SYNC),
|
|
158
|
+
url: (0, utils_1.getNodeUrl)(constants_1.CHAIN_IDs.ZK_SYNC),
|
|
167
159
|
saveDeployments: true,
|
|
168
160
|
accounts: { mnemonic },
|
|
169
161
|
ethNetwork: "mainnet",
|
|
@@ -209,7 +201,7 @@ const config = {
|
|
|
209
201
|
"mode-sepolia": getDefaultHardhatConfig(constants_1.CHAIN_IDs.MODE_SEPOLIA, true),
|
|
210
202
|
tatara: {
|
|
211
203
|
chainId: constants_1.CHAIN_IDs.TATARA,
|
|
212
|
-
url: getNodeUrl(constants_1.CHAIN_IDs.TATARA),
|
|
204
|
+
url: (0, utils_1.getNodeUrl)(constants_1.CHAIN_IDs.TATARA),
|
|
213
205
|
saveDeployments: true,
|
|
214
206
|
accounts: { mnemonic },
|
|
215
207
|
companionNetworks: { l1: "sepolia" },
|
|
@@ -217,7 +209,7 @@ const config = {
|
|
|
217
209
|
},
|
|
218
210
|
lens: {
|
|
219
211
|
chainId: constants_1.CHAIN_IDs.LENS,
|
|
220
|
-
url: getNodeUrl(constants_1.CHAIN_IDs.LENS),
|
|
212
|
+
url: (0, utils_1.getNodeUrl)(constants_1.CHAIN_IDs.LENS),
|
|
221
213
|
saveDeployments: true,
|
|
222
214
|
accounts: { mnemonic },
|
|
223
215
|
companionNetworks: { l1: "mainnet" },
|
|
@@ -227,7 +219,7 @@ const config = {
|
|
|
227
219
|
},
|
|
228
220
|
"lens-sepolia": {
|
|
229
221
|
chainId: constants_1.CHAIN_IDs.LENS_SEPOLIA,
|
|
230
|
-
url: getNodeUrl(constants_1.CHAIN_IDs.LENS_SEPOLIA),
|
|
222
|
+
url: (0, utils_1.getNodeUrl)(constants_1.CHAIN_IDs.LENS_SEPOLIA),
|
|
231
223
|
saveDeployments: true,
|
|
232
224
|
accounts: { mnemonic },
|
|
233
225
|
companionNetworks: { l1: "sepolia" },
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const utils_1 = require("../utils");
|
|
7
|
+
const utils_2 = require("../utils/utils");
|
|
8
|
+
const utils_hre_1 = require("../utils/utils.hre");
|
|
9
|
+
const protocol_kit_1 = __importDefault(require("@safe-global/protocol-kit"));
|
|
10
|
+
const safeAccountConfig = {
|
|
11
|
+
owners: [
|
|
12
|
+
"0x868CF19464e17F76D6419ACC802B122c22D2FD34",
|
|
13
|
+
"0xcc400c09ecBAC3e0033e4587BdFAABB26223e37d",
|
|
14
|
+
"0x837219D7a9C666F5542c4559Bf17D7B804E5c5fe",
|
|
15
|
+
"0x1d933Fd71FF07E69f066d50B39a7C34EB3b69F05",
|
|
16
|
+
"0x996267d7d1B7f5046543feDe2c2Db473Ed4f65e9",
|
|
17
|
+
],
|
|
18
|
+
threshold: 2,
|
|
19
|
+
};
|
|
20
|
+
const EXPECTED_SAFE_ADDRESS = "0x0Fc8E2BB9bEd4FDb51a0d36f2415c4C7F9e75F6e";
|
|
21
|
+
const predictedSafe = {
|
|
22
|
+
safeAccountConfig,
|
|
23
|
+
safeDeploymentConfig: {
|
|
24
|
+
// Safe addresses are deterministic based on owners and salt nonce.
|
|
25
|
+
saltNonce: "0x1234",
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Script to deploy a new Safe Multisig contract via the Safe SDK. Run via:
|
|
30
|
+
* ```
|
|
31
|
+
* yarn hardhat run ./scripts/deployMultisig.ts \
|
|
32
|
+
* --network hyperevm \
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
async function main() {
|
|
36
|
+
const chainId = parseInt(await utils_hre_1.hre.getChainId());
|
|
37
|
+
const nodeUrl = (0, utils_1.getNodeUrl)(chainId);
|
|
38
|
+
const wallet = utils_2.ethers.Wallet.fromMnemonic(utils_hre_1.hre.network.config.accounts.mnemonic);
|
|
39
|
+
const privateKey = wallet._signingKey().privateKey;
|
|
40
|
+
console.log(`Connected to node ${nodeUrl} for chain ${chainId}`);
|
|
41
|
+
const signer = wallet.connect(new utils_2.ethers.providers.JsonRpcProvider(nodeUrl));
|
|
42
|
+
const protocolKit = await protocol_kit_1.default.init({
|
|
43
|
+
provider: nodeUrl,
|
|
44
|
+
signer: privateKey,
|
|
45
|
+
predictedSafe,
|
|
46
|
+
});
|
|
47
|
+
// Check if the safe already exists:
|
|
48
|
+
const existingProtocolKit = await protocolKit.connect({
|
|
49
|
+
safeAddress: EXPECTED_SAFE_ADDRESS,
|
|
50
|
+
});
|
|
51
|
+
const isDeployed = await existingProtocolKit.isSafeDeployed();
|
|
52
|
+
if (isDeployed) {
|
|
53
|
+
const safeAddress = await existingProtocolKit.getAddress();
|
|
54
|
+
const safeOwners = await existingProtocolKit.getOwners();
|
|
55
|
+
const safeThreshold = await existingProtocolKit.getThreshold();
|
|
56
|
+
console.log(`Safe already exists at ${EXPECTED_SAFE_ADDRESS}:`, {
|
|
57
|
+
safeAddress,
|
|
58
|
+
safeOwners,
|
|
59
|
+
safeThreshold,
|
|
60
|
+
});
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
// Deploy a new safe:
|
|
64
|
+
const safeAddress = await protocolKit.getAddress();
|
|
65
|
+
if (safeAddress !== EXPECTED_SAFE_ADDRESS) {
|
|
66
|
+
throw new Error(`Safe address ${safeAddress} does not match expected ${EXPECTED_SAFE_ADDRESS}`);
|
|
67
|
+
}
|
|
68
|
+
console.log(`Deploying a new safe with determinstic address: ${safeAddress}`);
|
|
69
|
+
const deploymentTransaction = await protocolKit.createSafeDeploymentTransaction();
|
|
70
|
+
console.log(`Deployment txn data`, deploymentTransaction);
|
|
71
|
+
const client = await protocolKit.getSafeProvider().getExternalSigner();
|
|
72
|
+
if (!client) {
|
|
73
|
+
throw new Error("Unable to get external signer from safe provider");
|
|
74
|
+
}
|
|
75
|
+
const deployerAccount = client.account.address;
|
|
76
|
+
console.log(`Deployer account: ${deployerAccount}`);
|
|
77
|
+
const clientConnectedChain = client.chain;
|
|
78
|
+
if (client.chain?.id !== chainId) {
|
|
79
|
+
throw new Error(`Client connected to chain ${clientConnectedChain?.id}, but expected ${chainId}`);
|
|
80
|
+
}
|
|
81
|
+
if (deploymentTransaction.value.toString() !== "0") {
|
|
82
|
+
throw new Error(`Deployment transaction value should be 0, but is ${deploymentTransaction.value}`);
|
|
83
|
+
}
|
|
84
|
+
console.log(`Sending deployment transaction...`);
|
|
85
|
+
const txnHash = await signer.sendTransaction({
|
|
86
|
+
to: deploymentTransaction.to,
|
|
87
|
+
value: 0,
|
|
88
|
+
data: deploymentTransaction.data,
|
|
89
|
+
});
|
|
90
|
+
const txnReceipt = await txnHash.wait();
|
|
91
|
+
console.log(`Success! Deployment transaction receipt:`, txnReceipt);
|
|
92
|
+
}
|
|
93
|
+
main().catch((error) => {
|
|
94
|
+
console.error(error);
|
|
95
|
+
process.exitCode = 1;
|
|
96
|
+
});
|
|
@@ -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/dist/utils/index.d.ts
CHANGED
package/dist/utils/index.js
CHANGED
|
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./MerkleTree"), exports);
|
|
18
18
|
__exportStar(require("./constants"), exports);
|
|
19
|
+
__exportStar(require("./network"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getNodeUrl(chainId: number): string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getNodeUrl = getNodeUrl;
|
|
4
|
+
const constants_1 = require("./constants");
|
|
5
|
+
function getNodeUrl(chainId) {
|
|
6
|
+
let url = process.env[`NODE_URL_${chainId}`] ?? process.env.CUSTOM_NODE_URL;
|
|
7
|
+
if (url === undefined) {
|
|
8
|
+
// eslint-disable-next-line no-console
|
|
9
|
+
console.log(`No configured RPC provider for chain ${chainId}, reverting to public RPC.`);
|
|
10
|
+
url = constants_1.PUBLIC_NETWORKS[chainId].publicRPC;
|
|
11
|
+
}
|
|
12
|
+
return url;
|
|
13
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@across-protocol/contracts",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.10",
|
|
4
4
|
"author": "UMA Team",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"repository": {
|
|
@@ -62,6 +62,7 @@
|
|
|
62
62
|
"@openzeppelin/contracts": "4.9.6",
|
|
63
63
|
"@openzeppelin/contracts-upgradeable": "4.9.6",
|
|
64
64
|
"@openzeppelin/foundry-upgrades": "^0.4.0",
|
|
65
|
+
"@safe-global/protocol-kit": "^6.1.1",
|
|
65
66
|
"@scroll-tech/contracts": "^0.1.0",
|
|
66
67
|
"@solana-developers/helpers": "^2.4.0",
|
|
67
68
|
"@solana-program/address-lookup-table": "^0.7.0",
|