@across-protocol/contracts 4.1.8 → 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 +6 -2
- package/dist/hardhat.config.js +95 -414
- 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/dist/utils/utils.hre.d.ts +1 -0
- package/dist/utils/utils.hre.js +12 -1
- package/package.json +4 -3
|
@@ -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
|
+
}
|
|
@@ -15,4 +15,5 @@ export declare function getSpokePoolDeploymentInfo(hre: HardhatRuntimeEnvironmen
|
|
|
15
15
|
}>;
|
|
16
16
|
type FnArgs = number | string | BigNumber;
|
|
17
17
|
export declare function deployNewProxy(name: string, constructorArgs: FnArgs[], initArgs: FnArgs[], implementationOnly?: boolean): Promise<void>;
|
|
18
|
+
export declare function verifyContract(address: string, constructorArguments: any[], contract?: string): Promise<void>;
|
|
18
19
|
export { hre };
|
package/dist/utils/utils.hre.js
CHANGED
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.hre = void 0;
|
|
7
7
|
exports.getSpokePoolDeploymentInfo = getSpokePoolDeploymentInfo;
|
|
8
8
|
exports.deployNewProxy = deployNewProxy;
|
|
9
|
+
exports.verifyContract = verifyContract;
|
|
9
10
|
const hardhat_1 = __importDefault(require("hardhat"));
|
|
10
11
|
exports.hre = hardhat_1.default;
|
|
11
12
|
const constants_1 = require("@across-protocol/constants");
|
|
@@ -72,5 +73,15 @@ async function deployNewProxy(name, constructorArgs, initArgs, implementationOnl
|
|
|
72
73
|
// to the implementation's ABI on etherscan.
|
|
73
74
|
// https://docs.openzeppelin.com/upgrades-plugins/1.x/api-hardhat-upgrades#verify
|
|
74
75
|
const contract = `contracts/${name}.sol:${name}`;
|
|
75
|
-
await
|
|
76
|
+
await verifyContract(instance, constructorArgs, contract);
|
|
77
|
+
}
|
|
78
|
+
async function verifyContract(address, constructorArguments, contract) {
|
|
79
|
+
const { run, getChainId } = hardhat_1.default;
|
|
80
|
+
const chainId = Number(await getChainId());
|
|
81
|
+
if (hardhat_1.default.config.blockscout.enabled && hardhat_1.default.config.blockscout.customChains.some((chain) => chain.chainId === chainId)) {
|
|
82
|
+
await run("verify:blockscout", { address, constructorArguments, contract });
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
await run("verify:verify", { address, constructorArguments, contract });
|
|
86
|
+
}
|
|
76
87
|
}
|
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",
|
|
@@ -85,9 +86,9 @@
|
|
|
85
86
|
"@matterlabs/hardhat-zksync-deploy": "^0.6.3",
|
|
86
87
|
"@matterlabs/hardhat-zksync-solc": "^1.4.0",
|
|
87
88
|
"@matterlabs/hardhat-zksync-upgradable": "^0.1.0",
|
|
88
|
-
"@matterlabs/hardhat-zksync-verify": "^
|
|
89
|
+
"@matterlabs/hardhat-zksync-verify": "^1.9.0",
|
|
89
90
|
"@matterlabs/zksync-contracts": "^0.2.4",
|
|
90
|
-
"@nomicfoundation/hardhat-verify": "^
|
|
91
|
+
"@nomicfoundation/hardhat-verify": "^2.0.14",
|
|
91
92
|
"@nomiclabs/hardhat-ethers": "^2.2.3",
|
|
92
93
|
"@nomiclabs/hardhat-waffle": "2.0.3",
|
|
93
94
|
"@openzeppelin/hardhat-upgrades": "^1.22.0",
|