@hyperlane-xyz/sdk 1.2.3 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/HyperlaneApp.d.ts +11 -7
- package/dist/HyperlaneApp.d.ts.map +1 -1
- package/dist/HyperlaneApp.js +14 -0
- package/dist/HyperlaneApp.js.map +1 -1
- package/dist/agents/types.d.ts +56 -0
- package/dist/agents/types.d.ts.map +1 -0
- package/dist/agents/types.js +43 -0
- package/dist/agents/types.js.map +1 -0
- package/dist/consts/bytecode.d.ts +11 -0
- package/dist/consts/bytecode.d.ts.map +1 -0
- package/dist/consts/bytecode.js +15 -0
- package/dist/consts/bytecode.js.map +1 -0
- package/dist/consts/environments/index.d.ts +64 -231
- package/dist/consts/environments/index.d.ts.map +1 -1
- package/dist/consts/environments/index.js +2 -12
- package/dist/consts/environments/index.js.map +1 -1
- package/dist/consts/environments/mainnet.json +28 -99
- package/dist/consts/environments/test.json +20 -44
- package/dist/consts/environments/testnet.json +27 -90
- package/dist/consts/multisigIsm.d.ts +4 -0
- package/dist/consts/multisigIsm.d.ts.map +1 -0
- package/dist/consts/multisigIsm.js +174 -0
- package/dist/consts/multisigIsm.js.map +1 -0
- package/dist/contracts.d.ts +14 -10
- package/dist/contracts.d.ts.map +1 -1
- package/dist/contracts.js +28 -43
- package/dist/contracts.js.map +1 -1
- package/dist/core/HyperlaneCore.d.ts +5 -16
- package/dist/core/HyperlaneCore.d.ts.map +1 -1
- package/dist/core/HyperlaneCore.js +7 -35
- package/dist/core/HyperlaneCore.js.map +1 -1
- package/dist/core/HyperlaneCoreChecker.d.ts +0 -6
- package/dist/core/HyperlaneCoreChecker.d.ts.map +1 -1
- package/dist/core/HyperlaneCoreChecker.js +20 -155
- package/dist/core/HyperlaneCoreChecker.js.map +1 -1
- package/dist/core/HyperlaneCoreDeployer.d.ts +8 -22
- package/dist/core/HyperlaneCoreDeployer.d.ts.map +1 -1
- package/dist/core/HyperlaneCoreDeployer.js +14 -141
- package/dist/core/HyperlaneCoreDeployer.js.map +1 -1
- package/dist/core/TestCoreApp.d.ts +8 -12
- package/dist/core/TestCoreApp.d.ts.map +1 -1
- package/dist/core/TestCoreApp.js +6 -3
- package/dist/core/TestCoreApp.js.map +1 -1
- package/dist/core/TestCoreDeployer.d.ts +2 -2
- package/dist/core/TestCoreDeployer.d.ts.map +1 -1
- package/dist/core/TestCoreDeployer.js +4 -25
- package/dist/core/TestCoreDeployer.js.map +1 -1
- package/dist/core/contracts.d.ts +3 -22
- package/dist/core/contracts.d.ts.map +1 -1
- package/dist/core/contracts.js +1 -7
- package/dist/core/contracts.js.map +1 -1
- package/dist/core/testHyperlaneDeploy.hardhat-test.js +2 -2
- package/dist/core/testHyperlaneDeploy.hardhat-test.js.map +1 -1
- package/dist/core/types.d.ts +4 -47
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js +1 -16
- package/dist/core/types.js.map +1 -1
- package/dist/deploy/HyperlaneAppChecker.d.ts +2 -4
- package/dist/deploy/HyperlaneAppChecker.d.ts.map +1 -1
- package/dist/deploy/HyperlaneAppChecker.js +46 -28
- package/dist/deploy/HyperlaneAppChecker.js.map +1 -1
- package/dist/deploy/HyperlaneDeployer.d.ts +20 -19
- package/dist/deploy/HyperlaneDeployer.d.ts.map +1 -1
- package/dist/deploy/HyperlaneDeployer.js +112 -86
- package/dist/deploy/HyperlaneDeployer.js.map +1 -1
- package/dist/deploy/proxy.d.ts +1 -13
- package/dist/deploy/proxy.d.ts.map +1 -1
- package/dist/deploy/proxy.js +8 -13
- package/dist/deploy/proxy.js.map +1 -1
- package/dist/deploy/types.d.ts +1 -0
- package/dist/deploy/types.d.ts.map +1 -1
- package/dist/deploy/verify/utils.d.ts +1 -0
- package/dist/deploy/verify/utils.d.ts.map +1 -1
- package/dist/deploy/verify/utils.js +9 -4
- package/dist/deploy/verify/utils.js.map +1 -1
- package/dist/gas/HyperlaneIgp.d.ts +53 -0
- package/dist/gas/HyperlaneIgp.d.ts.map +1 -0
- package/dist/gas/HyperlaneIgp.js +72 -0
- package/dist/gas/HyperlaneIgp.js.map +1 -0
- package/dist/gas/HyperlaneIgpChecker.d.ts +14 -0
- package/dist/gas/HyperlaneIgpChecker.d.ts.map +1 -0
- package/dist/gas/HyperlaneIgpChecker.js +148 -0
- package/dist/gas/HyperlaneIgpChecker.js.map +1 -0
- package/dist/gas/HyperlaneIgpDeployer.d.ts +22 -0
- package/dist/gas/HyperlaneIgpDeployer.d.ts.map +1 -0
- package/dist/gas/HyperlaneIgpDeployer.js +113 -0
- package/dist/gas/HyperlaneIgpDeployer.js.map +1 -0
- package/dist/gas/contracts.d.ts +9 -0
- package/dist/gas/contracts.d.ts.map +1 -0
- package/dist/gas/contracts.js +11 -0
- package/dist/gas/contracts.js.map +1 -0
- package/dist/gas/types.d.ts +35 -50
- package/dist/gas/types.d.ts.map +1 -1
- package/dist/gas/types.js +11 -17
- package/dist/gas/types.js.map +1 -1
- package/dist/index.d.ts +33 -25
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +66 -43
- package/dist/index.js.map +1 -1
- package/dist/middleware/MiddlewareRouterChecker.d.ts +8 -0
- package/dist/middleware/MiddlewareRouterChecker.d.ts.map +1 -0
- package/dist/middleware/MiddlewareRouterChecker.js +26 -0
- package/dist/middleware/MiddlewareRouterChecker.js.map +1 -0
- package/dist/middleware/MiddlewareRouterDeployer.d.ts +17 -0
- package/dist/middleware/MiddlewareRouterDeployer.d.ts.map +1 -0
- package/dist/middleware/MiddlewareRouterDeployer.js +62 -0
- package/dist/middleware/MiddlewareRouterDeployer.js.map +1 -0
- package/dist/middleware/account/InterchainAccount.d.ts +11 -0
- package/dist/middleware/account/InterchainAccount.d.ts.map +1 -0
- package/dist/middleware/account/InterchainAccount.js +21 -0
- package/dist/middleware/account/InterchainAccount.js.map +1 -0
- package/dist/middleware/account/InterchainAccountChecker.d.ts +7 -0
- package/dist/middleware/account/InterchainAccountChecker.d.ts.map +1 -0
- package/dist/middleware/account/InterchainAccountChecker.js +8 -0
- package/dist/middleware/account/InterchainAccountChecker.js.map +1 -0
- package/dist/middleware/account/InterchainAccountDeployer.d.ts +14 -0
- package/dist/middleware/account/InterchainAccountDeployer.d.ts.map +1 -0
- package/dist/middleware/account/InterchainAccountDeployer.js +64 -0
- package/dist/middleware/account/InterchainAccountDeployer.js.map +1 -0
- package/dist/middleware/account/accounts.hardhat-test.d.ts.map +1 -0
- package/dist/middleware/{accounts.hardhat-test.js → account/accounts.hardhat-test.js} +21 -24
- package/dist/middleware/account/accounts.hardhat-test.js.map +1 -0
- package/dist/middleware/account/contracts.d.ts +7 -0
- package/dist/middleware/account/contracts.d.ts.map +1 -0
- package/dist/middleware/account/contracts.js +9 -0
- package/dist/middleware/account/contracts.js.map +1 -0
- package/dist/middleware/liquidity-layer/LiquidityLayerApp.d.ts +5 -4
- package/dist/middleware/liquidity-layer/LiquidityLayerApp.d.ts.map +1 -1
- package/dist/middleware/liquidity-layer/LiquidityLayerApp.js +12 -2
- package/dist/middleware/liquidity-layer/LiquidityLayerApp.js.map +1 -1
- package/dist/middleware/liquidity-layer/LiquidityLayerRouterDeployer.d.ts +8 -6
- package/dist/middleware/liquidity-layer/LiquidityLayerRouterDeployer.d.ts.map +1 -1
- package/dist/middleware/liquidity-layer/LiquidityLayerRouterDeployer.js +13 -10
- package/dist/middleware/liquidity-layer/LiquidityLayerRouterDeployer.js.map +1 -1
- package/dist/middleware/liquidity-layer/contracts.d.ts +5 -8
- package/dist/middleware/liquidity-layer/contracts.d.ts.map +1 -1
- package/dist/middleware/liquidity-layer/contracts.js +2 -1
- package/dist/middleware/liquidity-layer/contracts.js.map +1 -1
- package/dist/middleware/liquidity-layer/liquidity-layer.hardhat-test.js +33 -30
- package/dist/middleware/liquidity-layer/liquidity-layer.hardhat-test.js.map +1 -1
- package/dist/middleware/query/InterchainQuery.d.ts +11 -0
- package/dist/middleware/query/InterchainQuery.d.ts.map +1 -0
- package/dist/middleware/query/InterchainQuery.js +21 -0
- package/dist/middleware/query/InterchainQuery.js.map +1 -0
- package/dist/middleware/query/InterchainQueryChecker.d.ts +7 -0
- package/dist/middleware/query/InterchainQueryChecker.d.ts.map +1 -0
- package/dist/middleware/query/InterchainQueryChecker.js +8 -0
- package/dist/middleware/query/InterchainQueryChecker.js.map +1 -0
- package/dist/middleware/query/InterchainQueryDeployer.d.ts +12 -0
- package/dist/middleware/query/InterchainQueryDeployer.d.ts.map +1 -0
- package/dist/middleware/query/InterchainQueryDeployer.js +13 -0
- package/dist/middleware/query/InterchainQueryDeployer.js.map +1 -0
- package/dist/middleware/query/contracts.d.ts +7 -0
- package/dist/middleware/query/contracts.d.ts.map +1 -0
- package/dist/middleware/query/contracts.js +9 -0
- package/dist/middleware/query/contracts.js.map +1 -0
- package/dist/middleware/query/queries.hardhat-test.d.ts.map +1 -0
- package/dist/middleware/{queries.hardhat-test.js → query/queries.hardhat-test.js} +21 -12
- package/dist/middleware/query/queries.hardhat-test.js.map +1 -0
- package/dist/providers/MultiProvider.d.ts +6 -1
- package/dist/providers/MultiProvider.d.ts.map +1 -1
- package/dist/providers/MultiProvider.js +32 -26
- package/dist/providers/MultiProvider.js.map +1 -1
- package/dist/router/GasRouterDeployer.d.ts +4 -4
- package/dist/router/GasRouterDeployer.d.ts.map +1 -1
- package/dist/router/GasRouterDeployer.js +1 -1
- package/dist/router/GasRouterDeployer.js.map +1 -1
- package/dist/router/HyperlaneRouterChecker.d.ts +3 -5
- package/dist/router/HyperlaneRouterChecker.d.ts.map +1 -1
- package/dist/router/HyperlaneRouterChecker.js +4 -8
- package/dist/router/HyperlaneRouterChecker.js.map +1 -1
- package/dist/router/HyperlaneRouterDeployer.d.ts +9 -6
- package/dist/router/HyperlaneRouterDeployer.d.ts.map +1 -1
- package/dist/router/HyperlaneRouterDeployer.js +13 -28
- package/dist/router/HyperlaneRouterDeployer.js.map +1 -1
- package/dist/router/RouterApps.d.ts +6 -4
- package/dist/router/RouterApps.d.ts.map +1 -1
- package/dist/router/RouterApps.js +2 -2
- package/dist/router/RouterApps.js.map +1 -1
- package/dist/router/types.d.ts +4 -16
- package/dist/router/types.d.ts.map +1 -1
- package/dist/test/envSubsetDeployer/app.d.ts +18 -11
- package/dist/test/envSubsetDeployer/app.d.ts.map +1 -1
- package/dist/test/envSubsetDeployer/app.js +14 -15
- package/dist/test/envSubsetDeployer/app.js.map +1 -1
- package/dist/test/envSubsetDeployer/check-single-chain.js +6 -4
- package/dist/test/envSubsetDeployer/check-single-chain.js.map +1 -1
- package/dist/test/envSubsetDeployer/deploy-single-chain.js +7 -5
- package/dist/test/envSubsetDeployer/deploy-single-chain.js.map +1 -1
- package/dist/test/envSubsetDeployer/deploy.hardhat-test.js +12 -13
- package/dist/test/envSubsetDeployer/deploy.hardhat-test.js.map +1 -1
- package/dist/test/testUtils.d.ts +10 -23
- package/dist/test/testUtils.d.ts.map +1 -1
- package/dist/test/testUtils.js +45 -60
- package/dist/test/testUtils.js.map +1 -1
- package/dist/utils/ism.d.ts +2 -0
- package/dist/utils/ism.d.ts.map +1 -0
- package/dist/utils/ism.js +18 -0
- package/dist/utils/ism.js.map +1 -0
- package/dist/utils/objects.d.ts +3 -1
- package/dist/utils/objects.d.ts.map +1 -1
- package/dist/utils/objects.js +35 -2
- package/dist/utils/objects.js.map +1 -1
- package/package.json +4 -4
- package/dist/deploy/utils.d.ts +0 -6
- package/dist/deploy/utils.d.ts.map +0 -1
- package/dist/deploy/utils.js +0 -13
- package/dist/deploy/utils.js.map +0 -1
- package/dist/gas/calculator.d.ts +0 -186
- package/dist/gas/calculator.d.ts.map +0 -1
- package/dist/gas/calculator.hardhat-test.d.ts +0 -2
- package/dist/gas/calculator.hardhat-test.d.ts.map +0 -1
- package/dist/gas/calculator.hardhat-test.js +0 -59
- package/dist/gas/calculator.hardhat-test.js.map +0 -1
- package/dist/gas/calculator.js +0 -301
- package/dist/gas/calculator.js.map +0 -1
- package/dist/gas/calculator.test.d.ts +0 -2
- package/dist/gas/calculator.test.d.ts.map +0 -1
- package/dist/gas/calculator.test.js +0 -197
- package/dist/gas/calculator.test.js.map +0 -1
- package/dist/middleware/accounts.hardhat-test.d.ts.map +0 -1
- package/dist/middleware/accounts.hardhat-test.js.map +0 -1
- package/dist/middleware/deploy.d.ts +0 -28
- package/dist/middleware/deploy.d.ts.map +0 -1
- package/dist/middleware/deploy.js +0 -68
- package/dist/middleware/deploy.js.map +0 -1
- package/dist/middleware/queries.hardhat-test.d.ts.map +0 -1
- package/dist/middleware/queries.hardhat-test.js.map +0 -1
- package/dist/proxy.d.ts +0 -21
- package/dist/proxy.d.ts.map +0 -1
- package/dist/proxy.js +0 -32
- package/dist/proxy.js.map +0 -1
- /package/dist/middleware/{accounts.hardhat-test.d.ts → account/accounts.hardhat-test.d.ts} +0 -0
- /package/dist/middleware/{queries.hardhat-test.d.ts → query/queries.hardhat-test.d.ts} +0 -0
package/dist/test/testUtils.js
CHANGED
|
@@ -9,47 +9,56 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.MockCoinGecko = exports.testCoreConfig = exports.deployTestIgpsAndGetRouterConfig = exports.createRouterConfigMap = void 0;
|
|
13
13
|
const ethers_1 = require("ethers");
|
|
14
|
+
const core_1 = require("@hyperlane-xyz/core");
|
|
14
15
|
const chainMetadata_1 = require("../consts/chainMetadata");
|
|
15
|
-
const
|
|
16
|
-
function
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
const objects_1 = require("../utils/objects");
|
|
17
|
+
function createRouterConfigMap(owner, coreContracts, igpContracts) {
|
|
18
|
+
return (0, objects_1.objMap)(coreContracts, (chain, contracts) => {
|
|
19
|
+
return {
|
|
20
|
+
owner,
|
|
21
|
+
mailbox: contracts.mailbox.address,
|
|
22
|
+
interchainGasPaymaster: igpContracts[chain].interchainGasPaymaster.address,
|
|
23
|
+
};
|
|
24
|
+
});
|
|
20
25
|
}
|
|
21
|
-
exports.
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
constructor() {
|
|
29
|
-
super(MOCK_NETWORK);
|
|
30
|
-
this.methodResolveValues = {};
|
|
31
|
-
}
|
|
32
|
-
// Required to be implemented or the BaseProvider throws
|
|
33
|
-
detectNetwork() {
|
|
34
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
-
return Promise.resolve(MOCK_NETWORK);
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
perform(method, params) {
|
|
39
|
-
const value = this.methodResolveValues[method];
|
|
40
|
-
if (value) {
|
|
41
|
-
return Promise.resolve(value);
|
|
26
|
+
exports.createRouterConfigMap = createRouterConfigMap;
|
|
27
|
+
function deployTestIgpsAndGetRouterConfig(multiProvider, owner, coreContracts) {
|
|
28
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
29
|
+
const igps = {};
|
|
30
|
+
for (const chain of multiProvider.getKnownChainNames()) {
|
|
31
|
+
const factory = new core_1.TestInterchainGasPaymaster__factory(multiProvider.getSigner(chain));
|
|
32
|
+
igps[chain] = yield factory.deploy(owner);
|
|
42
33
|
}
|
|
43
|
-
return
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
34
|
+
return (0, objects_1.objMap)(coreContracts, (chain, contracts) => {
|
|
35
|
+
return {
|
|
36
|
+
owner,
|
|
37
|
+
mailbox: contracts.mailbox.address,
|
|
38
|
+
interchainGasPaymaster: igps[chain].address,
|
|
39
|
+
};
|
|
40
|
+
});
|
|
41
|
+
});
|
|
51
42
|
}
|
|
52
|
-
exports.
|
|
43
|
+
exports.deployTestIgpsAndGetRouterConfig = deployTestIgpsAndGetRouterConfig;
|
|
44
|
+
const nonZeroAddress = ethers_1.ethers.constants.AddressZero.replace('00', '01');
|
|
45
|
+
// dummy config as TestInbox and TestOutbox do not use deployed ISM
|
|
46
|
+
function testCoreConfig(chains) {
|
|
47
|
+
const multisigIsm = {
|
|
48
|
+
validators: [nonZeroAddress],
|
|
49
|
+
threshold: 1,
|
|
50
|
+
};
|
|
51
|
+
return Object.fromEntries(chains.map((local) => [
|
|
52
|
+
local,
|
|
53
|
+
{
|
|
54
|
+
owner: nonZeroAddress,
|
|
55
|
+
multisigIsm: Object.fromEntries(chains
|
|
56
|
+
.filter((c) => c !== local)
|
|
57
|
+
.map((remote) => [remote, multisigIsm])),
|
|
58
|
+
},
|
|
59
|
+
]));
|
|
60
|
+
}
|
|
61
|
+
exports.testCoreConfig = testCoreConfig;
|
|
53
62
|
// A mock CoinGecko intended to be used by tests
|
|
54
63
|
class MockCoinGecko {
|
|
55
64
|
constructor() {
|
|
@@ -86,28 +95,4 @@ class MockCoinGecko {
|
|
|
86
95
|
}
|
|
87
96
|
}
|
|
88
97
|
exports.MockCoinGecko = MockCoinGecko;
|
|
89
|
-
// A mock TokenPriceGetter intended to be used by tests when mocking token prices
|
|
90
|
-
class MockTokenPriceGetter {
|
|
91
|
-
constructor() {
|
|
92
|
-
this.tokenPrices = {};
|
|
93
|
-
}
|
|
94
|
-
getTokenExchangeRate(base, quote) {
|
|
95
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
96
|
-
const basePrice = yield this.getTokenPrice(base);
|
|
97
|
-
const quotePrice = yield this.getTokenPrice(quote);
|
|
98
|
-
return basePrice / quotePrice;
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
getTokenPrice(chain) {
|
|
102
|
-
const price = this.tokenPrices[chain];
|
|
103
|
-
if (price) {
|
|
104
|
-
return Promise.resolve(price);
|
|
105
|
-
}
|
|
106
|
-
throw Error(`No price for chain ${chain}`);
|
|
107
|
-
}
|
|
108
|
-
setTokenPrice(chain, price) {
|
|
109
|
-
this.tokenPrices[chain] = price;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
exports.MockTokenPriceGetter = MockTokenPriceGetter;
|
|
113
98
|
//# sourceMappingURL=testUtils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testUtils.js","sourceRoot":"","sources":["../../src/test/testUtils.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mCAAgC;
|
|
1
|
+
{"version":3,"file":"testUtils.js","sourceRoot":"","sources":["../../src/test/testUtils.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mCAAgC;AAEhC,8CAG6B;AAG7B,2DAAwD;AAcxD,8CAA0C;AAE1C,SAAgB,qBAAqB,CACnC,KAAoB,EACpB,aAAmD,EACnD,YAAiD;IAEjD,OAAO,IAAA,gBAAM,EAAC,aAAa,EAAE,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE;QAChD,OAAO;YACL,KAAK;YACL,OAAO,EAAE,SAAS,CAAC,OAAO,CAAC,OAAO;YAClC,sBAAsB,EACpB,YAAY,CAAC,KAAK,CAAC,CAAC,sBAAsB,CAAC,OAAO;SACrD,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAbD,sDAaC;AAED,SAAsB,gCAAgC,CACpD,aAA4B,EAC5B,KAAoB,EACpB,aAAmD;;QAEnD,MAAM,IAAI,GAAyC,EAAE,CAAC;QACtD,KAAK,MAAM,KAAK,IAAI,aAAa,CAAC,kBAAkB,EAAE,EAAE;YACtD,MAAM,OAAO,GAAG,IAAI,0CAAmC,CACrD,aAAa,CAAC,SAAS,CAAC,KAAK,CAAC,CAC/B,CAAC;YACF,IAAI,CAAC,KAAK,CAAC,GAAG,MAAM,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;SAC3C;QACD,OAAO,IAAA,gBAAM,EAAC,aAAa,EAAE,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE;YAChD,OAAO;gBACL,KAAK;gBACL,OAAO,EAAE,SAAS,CAAC,OAAO,CAAC,OAAO;gBAClC,sBAAsB,EAAE,IAA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;QACD,OAAO,OAAO,CAAC,OAAO,CAAC;YACrB,OAAO,EAAE,IAAI;YACb,OAAO,EAAE,EAAE;YACX,IAAI,EAAE,GAAG;YACT,IAAI;SACL,CAAC,CAAC;IACL,CAAC;IAED,IAAI,MAAM;QACR,OAAO,IAAI,CAAC;IACd,CAAC;IAED,aAAa,CAAC,KAAgB,EAAE,KAAa;QAC3C,MAAM,EAAE,GAAG,6BAAa,CAAC,KAAK,CAAC,CAAC,sBAAsB,IAAI,KAAK,CAAC;QAChE,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC;IAC/B,CAAC;IAED,OAAO,CAAC,KAAgB,EAAE,IAAa;QACrC,MAAM,EAAE,GAAG,6BAAa,CAAC,KAAK,CAAC,CAAC,sBAAsB,IAAI,KAAK,CAAC;QAChE,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC;IACvB,CAAC;CACF;AA1CD,sCA0CC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ism.d.ts","sourceRoot":"","sources":["../../src/utils/ism.ts"],"names":[],"mappings":"AAEA,wBAAgB,2BAA2B,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAUxE"}
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
exports.multisigIsmVerificationCost = void 0;
|
|
7
|
+
const multisigIsmVerifyCosts_json_1 = __importDefault(require("../consts/multisigIsmVerifyCosts.json"));
|
|
8
|
+
function multisigIsmVerificationCost(m, n) {
|
|
9
|
+
if (!(`${n}` in multisigIsmVerifyCosts_json_1.default) ||
|
|
10
|
+
// @ts-ignore
|
|
11
|
+
!(`${m}` in multisigIsmVerifyCosts_json_1.default[`${n}`])) {
|
|
12
|
+
throw new Error(`No multisigIsmVerificationCost found for ${m}-of-${n}`);
|
|
13
|
+
}
|
|
14
|
+
// @ts-ignore
|
|
15
|
+
return multisigIsmVerifyCosts_json_1.default[`${n}`][`${m}`];
|
|
16
|
+
}
|
|
17
|
+
exports.multisigIsmVerificationCost = multisigIsmVerificationCost;
|
|
18
|
+
//# sourceMappingURL=ism.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ism.js","sourceRoot":"","sources":["../../src/utils/ism.ts"],"names":[],"mappings":";;;;;;AAAA,wGAA2E;AAE3E,SAAgB,2BAA2B,CAAC,CAAS,EAAE,CAAS;IAC9D,IACE,CAAC,CAAC,GAAG,CAAC,EAAE,IAAI,qCAAsB,CAAC;QACnC,aAAa;QACb,CAAC,CAAC,GAAG,CAAC,EAAE,IAAI,qCAAsB,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,EAC3C;QACA,MAAM,IAAI,KAAK,CAAC,4CAA4C,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;KAC1E;IACD,aAAa;IACb,OAAO,qCAAsB,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAChD,CAAC;AAVD,kEAUC"}
|
package/dist/utils/objects.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export declare function objMapEntries<K extends string, I = any, O = any>(obj: Record<K, I>, func: (k: K, _: I) => O): [K, O][];
|
|
2
2
|
export declare function objMap<K extends string, I = any, O = any>(obj: Record<K, I>, func: (k: K, _: I) => O): Record<K, O>;
|
|
3
|
-
export declare function objFilter<K extends string, I, O extends I>(obj: Record<K, I>, func: (v: I) => v is O): Record<K, O>;
|
|
3
|
+
export declare function objFilter<K extends string, I, O extends I>(obj: Record<K, I>, func: (k: K, v: I) => v is O): Record<K, O>;
|
|
4
4
|
export declare function promiseObjAll<K extends string, V>(obj: {
|
|
5
5
|
[key in K]: Promise<V>;
|
|
6
6
|
}): Promise<Record<K, V>>;
|
|
7
7
|
export declare function pick<K extends string, V = any>(obj: Record<K, V>, keys: K[]): Record<K, V>;
|
|
8
|
+
export declare function isObject(item: any): any;
|
|
9
|
+
export declare function objMerge(a: Record<string, any>, b: Record<string, any>, max_depth?: number): any;
|
|
8
10
|
//# sourceMappingURL=objects.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"objects.d.ts","sourceRoot":"","sources":["../../src/utils/objects.ts"],"names":[],"mappings":"AAEA,wBAAgB,aAAa,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,GAAG,GAAG,EAC9D,GAAG,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,EACjB,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,GACtB,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAEV;AAGD,wBAAgB,MAAM,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,GAAG,GAAG,EACvD,GAAG,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,EACjB,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,gBAMxB;AAED,wBAAgB,SAAS,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,EAAE,CAAC,SAAS,CAAC,EACxD,GAAG,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,EACjB,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"objects.d.ts","sourceRoot":"","sources":["../../src/utils/objects.ts"],"names":[],"mappings":"AAEA,wBAAgB,aAAa,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,GAAG,GAAG,EAC9D,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AS,SAAK,GACb,GAAG,CAsBL"}
|
package/dist/utils/objects.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// TODO move to utils package
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.pick = exports.promiseObjAll = exports.objFilter = exports.objMap = exports.objMapEntries = void 0;
|
|
4
|
+
exports.objMerge = exports.isObject = exports.pick = exports.promiseObjAll = exports.objFilter = exports.objMap = exports.objMapEntries = void 0;
|
|
5
5
|
function objMapEntries(obj, func) {
|
|
6
6
|
return Object.entries(obj).map(([k, v]) => [k, func(k, v)]);
|
|
7
7
|
}
|
|
@@ -12,7 +12,7 @@ function objMap(obj, func) {
|
|
|
12
12
|
}
|
|
13
13
|
exports.objMap = objMap;
|
|
14
14
|
function objFilter(obj, func) {
|
|
15
|
-
return Object.fromEntries(Object.entries(obj).filter(([, v]) => func(v)));
|
|
15
|
+
return Object.fromEntries(Object.entries(obj).filter(([k, v]) => func(k, v)));
|
|
16
16
|
}
|
|
17
17
|
exports.objFilter = objFilter;
|
|
18
18
|
// promiseObjectAll :: {k: Promise a} -> Promise {k: a}
|
|
@@ -30,4 +30,37 @@ function pick(obj, keys) {
|
|
|
30
30
|
return ret;
|
|
31
31
|
}
|
|
32
32
|
exports.pick = pick;
|
|
33
|
+
function isObject(item) {
|
|
34
|
+
return item && typeof item === 'object' && !Array.isArray(item);
|
|
35
|
+
}
|
|
36
|
+
exports.isObject = isObject;
|
|
37
|
+
// Recursively merges b into a
|
|
38
|
+
// Where there are conflicts, b takes priority over a
|
|
39
|
+
function objMerge(a, b, max_depth = 10) {
|
|
40
|
+
if (max_depth === 0) {
|
|
41
|
+
throw new Error('objMerge tried to go too deep');
|
|
42
|
+
}
|
|
43
|
+
if (isObject(a) && isObject(b)) {
|
|
44
|
+
const ret = {};
|
|
45
|
+
const aKeys = new Set(Object.keys(a));
|
|
46
|
+
const bKeys = new Set(Object.keys(b));
|
|
47
|
+
const allKeys = new Set([...aKeys, ...bKeys]);
|
|
48
|
+
for (const key of allKeys.values()) {
|
|
49
|
+
if (aKeys.has(key) && bKeys.has(key)) {
|
|
50
|
+
ret[key] = objMerge(a[key], b[key], max_depth - 1);
|
|
51
|
+
}
|
|
52
|
+
else if (aKeys.has(key)) {
|
|
53
|
+
ret[key] = a[key];
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
ret[key] = b[key];
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return ret;
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
return b ? b : a;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
exports.objMerge = objMerge;
|
|
33
66
|
//# sourceMappingURL=objects.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"objects.js","sourceRoot":"","sources":["../../src/utils/objects.ts"],"names":[],"mappings":";AAAA,6BAA6B;;;AAE7B,SAAgB,aAAa,CAC3B,GAAiB,EACjB,IAAuB;IAEvB,OAAO,MAAM,CAAC,OAAO,CAAI,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAM,EAAE,IAAI,CAAC,CAAM,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3E,CAAC;AALD,sCAKC;AAED,oCAAoC;AACpC,SAAgB,MAAM,CACpB,GAAiB,EACjB,IAAuB;IAEvB,OAAO,MAAM,CAAC,WAAW,CAAI,aAAa,CAAU,GAAG,EAAE,IAAI,CAAC,CAG7D,CAAC;AACJ,CAAC;AARD,wBAQC;AAED,SAAgB,SAAS,CACvB,GAAiB,EACjB,
|
|
1
|
+
{"version":3,"file":"objects.js","sourceRoot":"","sources":["../../src/utils/objects.ts"],"names":[],"mappings":";AAAA,6BAA6B;;;AAE7B,SAAgB,aAAa,CAC3B,GAAiB,EACjB,IAAuB;IAEvB,OAAO,MAAM,CAAC,OAAO,CAAI,G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AM;gBACL,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;aACnB;SACF;QACD,OAAO,GAAG,CAAC;KACZ;SAAM;QACL,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;KAClB;AACH,CAAC;AA1BD,4BA0BC"}
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperlane-xyz/sdk",
|
|
3
3
|
"description": "The official SDK for the Hyperlane Network",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.3.0",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@hyperlane-xyz/core": "1.
|
|
7
|
-
"@hyperlane-xyz/utils": "1.
|
|
6
|
+
"@hyperlane-xyz/core": "1.3.0",
|
|
7
|
+
"@hyperlane-xyz/utils": "1.3.0",
|
|
8
8
|
"@wagmi/chains": "^0.2.6",
|
|
9
9
|
"coingecko-api": "^1.0.10",
|
|
10
10
|
"cross-fetch": "^3.1.5",
|
|
@@ -53,4 +53,4 @@
|
|
|
53
53
|
"test:hardhat": "hardhat test ./src/**/*.hardhat-test.ts"
|
|
54
54
|
},
|
|
55
55
|
"types": "dist/index.d.ts"
|
|
56
|
-
}
|
|
56
|
+
}
|
package/dist/deploy/utils.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/deploy/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAE7C,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAGpC,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,QAAQ,CAAC,GAAG,CAAC,EACxB,KAAK,EAAE,KAAK,CAAC,OAAO,GACnB,QAAQ,CAAC;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CAM7B"}
|
package/dist/deploy/utils.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getChainToOwnerMap = void 0;
|
|
4
|
-
const objects_1 = require("../utils/objects");
|
|
5
|
-
function getChainToOwnerMap(configMap, owner) {
|
|
6
|
-
return (0, objects_1.objMap)(configMap, () => {
|
|
7
|
-
return {
|
|
8
|
-
owner,
|
|
9
|
-
};
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
exports.getChainToOwnerMap = getChainToOwnerMap;
|
|
13
|
-
//# sourceMappingURL=utils.js.map
|
package/dist/deploy/utils.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/deploy/utils.ts"],"names":[],"mappings":";;;AAGA,8CAA0C;AAE1C,SAAgB,kBAAkB,CAChC,SAAwB,EACxB,KAAoB;IAEpB,OAAO,IAAA,gBAAM,EAAC,SAAS,EAAE,GAAG,EAAE;QAC5B,OAAO;YACL,KAAK;SACN,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AATD,gDASC"}
|
package/dist/gas/calculator.d.ts
DELETED
|
@@ -1,186 +0,0 @@
|
|
|
1
|
-
import { BigNumber } from 'ethers';
|
|
2
|
-
import { types } from '@hyperlane-xyz/utils';
|
|
3
|
-
import { CoreEnvironment, HyperlaneCore } from '../core/HyperlaneCore';
|
|
4
|
-
import { MultiProvider } from '../providers/MultiProvider';
|
|
5
|
-
import { ChainName } from '../types';
|
|
6
|
-
import { TokenPriceGetter } from './token-prices';
|
|
7
|
-
export interface InterchainGasCalculatorConfig {
|
|
8
|
-
/**
|
|
9
|
-
* A multiplier applied to the estimated origin token payment amount.
|
|
10
|
-
* This should be high enough to account for movements in token exchange
|
|
11
|
-
* rates and gas prices.
|
|
12
|
-
* Only used for gas payment estimates that are not quoted on-chain.
|
|
13
|
-
* @defaultValue 1.25
|
|
14
|
-
*/
|
|
15
|
-
paymentEstimateMultiplier?: string;
|
|
16
|
-
/**
|
|
17
|
-
* An amount of additional gas to add to the estimated gas of processing a message.
|
|
18
|
-
* Only used when estimating a payment from a message.
|
|
19
|
-
* Only used for gas payment estimates that are not quoted on-chain.
|
|
20
|
-
* @defaultValue 50,000
|
|
21
|
-
*/
|
|
22
|
-
messageGasEstimateBuffer?: string;
|
|
23
|
-
/**
|
|
24
|
-
* Used to get the native token prices of the origin and destination chains.
|
|
25
|
-
* Only used for gas payment estimates that are not quoted on-chain.
|
|
26
|
-
* @defaultValue An instance of DefaultTokenPriceGetter.
|
|
27
|
-
*/
|
|
28
|
-
tokenPriceGetter?: TokenPriceGetter;
|
|
29
|
-
}
|
|
30
|
-
export interface ParsedMessage {
|
|
31
|
-
origin: ChainName;
|
|
32
|
-
sender: string;
|
|
33
|
-
destination: ChainName;
|
|
34
|
-
recipient: string;
|
|
35
|
-
body: string;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Calculates interchain gas payments.
|
|
39
|
-
*/
|
|
40
|
-
export declare class InterchainGasCalculator {
|
|
41
|
-
private core;
|
|
42
|
-
private multiProvider;
|
|
43
|
-
private tokenPriceGetter;
|
|
44
|
-
private paymentEstimateMultiplier;
|
|
45
|
-
private messageGasEstimateBuffer;
|
|
46
|
-
static fromEnvironment<Env extends CoreEnvironment>(env: Env, multiProvider: MultiProvider, config?: InterchainGasCalculatorConfig): InterchainGasCalculator;
|
|
47
|
-
constructor(multiProvider: MultiProvider, core: HyperlaneCore, config?: InterchainGasCalculatorConfig);
|
|
48
|
-
/**
|
|
49
|
-
* Only intended for IGPs that quote gas payments on-chain.
|
|
50
|
-
* Calls the default ISM IGP's `quoteGasPayment` function to get the amount of native tokens
|
|
51
|
-
* required to pay for interchain gas.
|
|
52
|
-
* The default ISM IGP will add any gas overhead amounts related to the Mailbox
|
|
53
|
-
* and default ISM on the destination to the provided gasAmount.
|
|
54
|
-
* @param origin The name of the origin chain.
|
|
55
|
-
* @param destination The name of the destination chain.
|
|
56
|
-
* @param gasAmount The amount of gas to use when calling `quoteGasPayment`.
|
|
57
|
-
* The default IGP is expected to add any gas overhead related to the Mailbox
|
|
58
|
-
* or ISM, so this gas amount is only required to cover the usage of the `handle`
|
|
59
|
-
* function.
|
|
60
|
-
* @returns The amount of native tokens required to pay for interchain gas.
|
|
61
|
-
*/
|
|
62
|
-
quoteGasPaymentForDefaultIsmIgp(origin: ChainName, destination: ChainName, gasAmount: BigNumber): Promise<BigNumber>;
|
|
63
|
-
/**
|
|
64
|
-
* Only intended for IGPs that quote gas payments on-chain.
|
|
65
|
-
* Calls the "base" IGP's `quoteGasPayment` function to get the amount of native tokens
|
|
66
|
-
* required to pay for interchain gas.
|
|
67
|
-
* This IGP will not apply any overhead gas to the provided gasAmount.
|
|
68
|
-
* @param origin The name of the origin chain.
|
|
69
|
-
* @param destination The name of the destination chain.
|
|
70
|
-
* @param gasAmount The amount of gas to use when calling `quoteGasPayment`.
|
|
71
|
-
* This is expected to be the total amount of gas that a transaction would use
|
|
72
|
-
* on the destination chain. This should consider intrinsic transaction gas,
|
|
73
|
-
* Mailbox overhead gas costs, ISM gas costs, and the recipient's handle function
|
|
74
|
-
* gas cost.
|
|
75
|
-
* @returns The amount of native tokens required to pay for interchain gas.
|
|
76
|
-
*/
|
|
77
|
-
quoteGasPayment(origin: ChainName, destination: ChainName, gasAmount: BigNumber): Promise<BigNumber>;
|
|
78
|
-
/**
|
|
79
|
-
* Only intended for IGPs that quote gas payments on-chain.
|
|
80
|
-
* Calls the origin's default IGP's `quoteGasPayment` function to get the
|
|
81
|
-
* amount of native tokens required to pay for interchain gas.
|
|
82
|
-
* The default IGP is expected to add any gas overhead related to the Mailbox
|
|
83
|
-
* and ISM to the provided gasAmount.
|
|
84
|
-
* @param origin The name of the origin chain.
|
|
85
|
-
* @param destination The name of the destination chain.
|
|
86
|
-
* @param gasAmount The amount of gas to use when calling `quoteGasPayment`.
|
|
87
|
-
* The default IGP is expected to add any gas overhead related to the Mailbox
|
|
88
|
-
* or ISM, so this gas amount is only required to cover the usage of the `handle`
|
|
89
|
-
* function.
|
|
90
|
-
* @returns The amount of native tokens required to pay for interchain gas.
|
|
91
|
-
*/
|
|
92
|
-
quoteGasPaymentForIGP(origin: ChainName, destination: ChainName, gasAmount: BigNumber, interchainGasPaymasterAddress: types.Address): Promise<BigNumber>;
|
|
93
|
-
/**
|
|
94
|
-
* Only intended for IGPs that do *not* quote gas payments on-chain.
|
|
95
|
-
* Given an amount of gas to consume on the destination chain, calculates the
|
|
96
|
-
* estimated payment denominated in the native token of the origin chain.
|
|
97
|
-
* Considers the exchange rate between the native tokens of the origin and
|
|
98
|
-
* destination chains and the suggested gas price of the destination chain.
|
|
99
|
-
* @param origin The name of the origin chain.
|
|
100
|
-
* @param destination The name of the destination chain.
|
|
101
|
-
* @param gas The amount of gas to pay for on the destination chain.
|
|
102
|
-
* @returns An estimated amount of origin chain tokens to cover gas costs on the
|
|
103
|
-
* destination chain.
|
|
104
|
-
*/
|
|
105
|
-
estimatePaymentForGas(origin: ChainName, destination: ChainName, gas: BigNumber): Promise<BigNumber>;
|
|
106
|
-
/**
|
|
107
|
-
* Only intended for IGPs that do *not* quote gas payments on-chain.
|
|
108
|
-
* Given an amount of gas the message's recipient `handle` function is expected
|
|
109
|
-
* to use, calculates the estimated payment denominated in the native
|
|
110
|
-
* token of the origin chain. Considers the exchange rate between the native
|
|
111
|
-
* tokens of the origin and destination chains, the suggested gas price on
|
|
112
|
-
* the destination chain, gas costs incurred by a relayer when submitting a signed
|
|
113
|
-
* checkpoint to the destination chain, and the overhead gas cost in Inbox of processing
|
|
114
|
-
* a message.
|
|
115
|
-
* @param origin The name of the origin chain.
|
|
116
|
-
* @param destination The name of the destination chain.
|
|
117
|
-
* @param handleGas The amount of gas the recipient `handle` function
|
|
118
|
-
* is estimated to use.
|
|
119
|
-
* @returns An estimated amount of origin chain tokens to cover gas costs of the
|
|
120
|
-
* message on the destination chain.
|
|
121
|
-
*/
|
|
122
|
-
estimatePaymentForHandleGas(origin: ChainName, destination: ChainName, handleGas: BigNumber): Promise<BigNumber>;
|
|
123
|
-
/**
|
|
124
|
-
* Only intended for IGPs that do *not* quote gas payments on-chain.
|
|
125
|
-
* Calculates the estimated payment to process the message on its destination chain,
|
|
126
|
-
* denominated in the native token of the origin chain. The gas used by the message's
|
|
127
|
-
* recipient handler function is estimated in an eth_estimateGas call to the
|
|
128
|
-
* destination chain, and is then used to calculate the payment using
|
|
129
|
-
* Currently made private as it does not work properly for Arbitrum.
|
|
130
|
-
* {@link estimatePaymentForHandleGasAmount}.
|
|
131
|
-
* @param message The parsed message to estimate payment for.
|
|
132
|
-
* @returns An estimated amount of origin chain tokens to cover gas costs of the
|
|
133
|
-
* message on the destination chain.
|
|
134
|
-
*/
|
|
135
|
-
protected estimatePaymentForMessage(message: ParsedMessage): Promise<BigNumber>;
|
|
136
|
-
/**
|
|
137
|
-
* Using the exchange rates provided by tokenPriceGetter, returns the amount of
|
|
138
|
-
* `toChain` native tokens equivalent in value to the provided `fromAmount` of
|
|
139
|
-
* `fromChain` native tokens. Accounts for differences in the decimals of the tokens.
|
|
140
|
-
* @param fromChain The chain whose native token is being converted from.
|
|
141
|
-
* @param toChain The chain whose native token is being converted into.
|
|
142
|
-
* @param fromAmount The amount of `fromChain` native tokens to convert from.
|
|
143
|
-
* @returns The amount of `toChain` native tokens whose value is equivalent to
|
|
144
|
-
* `fromAmount` of `fromChain` native tokens.
|
|
145
|
-
*/
|
|
146
|
-
protected convertBetweenTokens(fromChain: ChainName, toChain: ChainName, value: BigNumber): Promise<BigNumber>;
|
|
147
|
-
/**
|
|
148
|
-
* Gets a suggested gas price for a chain.
|
|
149
|
-
* @param chainName The name of the chain to get the gas price for
|
|
150
|
-
* @returns The suggested gas price in wei on the destination chain.
|
|
151
|
-
*/
|
|
152
|
-
protected getGasPrice(chain: ChainName): Promise<BigNumber>;
|
|
153
|
-
/**
|
|
154
|
-
* Gets the number of decimals of the provided chain's native token.
|
|
155
|
-
* @param chain The chain.
|
|
156
|
-
* @returns The number of decimals of `chain`'s native token.
|
|
157
|
-
*/
|
|
158
|
-
protected tokenDecimals(chain: ChainName): number;
|
|
159
|
-
/**
|
|
160
|
-
* Estimates the amount of gas used by message's recipient `handle` function
|
|
161
|
-
* on its destination chain. This does not assume the Inbox of the destination
|
|
162
|
-
* chain has a checkpoint that the message is included in, and does not
|
|
163
|
-
* consider intrinsic gas or any "overhead" gas incurred by Inbox.process.
|
|
164
|
-
* The estimated gas returned is the sum of:
|
|
165
|
-
* 1. The estimated gas consumption of a direct call to the `handle`
|
|
166
|
-
* function of the recipient address using the correct parameters and
|
|
167
|
-
* setting the `from` address of the transaction to the address of the inbox.
|
|
168
|
-
* 2. A buffer to account for inaccuracies in the above estimation.
|
|
169
|
-
* @param message The message to estimate recipient `handle` gas usage for.
|
|
170
|
-
* @returns The estimated gas required by the message's recipient handle function
|
|
171
|
-
* on the destination chain.
|
|
172
|
-
*/
|
|
173
|
-
protected estimateGasForHandle(message: ParsedMessage): Promise<BigNumber>;
|
|
174
|
-
/**
|
|
175
|
-
* @returns A generous estimation of the gas consumption of all process
|
|
176
|
-
* operations within Inbox.sol, including intrinsic gas. Does not include any gas
|
|
177
|
-
* consumed within a message's recipient `handle` function.
|
|
178
|
-
*/
|
|
179
|
-
protected estimateGasForProcess(origin: ChainName, destination: ChainName): Promise<BigNumber>;
|
|
180
|
-
/**
|
|
181
|
-
* @returns The intrinsic gas of a basic transaction. Note this does not consider calldata
|
|
182
|
-
* costs or potentially different intrinsic gas costs for different chains.
|
|
183
|
-
*/
|
|
184
|
-
protected intrinsicGas(): BigNumber;
|
|
185
|
-
}
|
|
186
|
-
//# sourceMappingURL=calculator.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"calculator.d.ts","sourceRoot":"","sources":["../../src/gas/calculator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAuB,MAAM,QAAQ,C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Y,IAAI,SAAS;CAGpC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"calculator.hardhat-test.d.ts","sourceRoot":"","sources":["../../src/gas/calculator.hardhat-test.ts"],"names":[],"mappings":""}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const chai_1 = require("chai");
|
|
13
|
-
const ethers_1 = require("ethers");
|
|
14
|
-
const hardhat_1 = require("hardhat");
|
|
15
|
-
const chains_1 = require("../consts/chains");
|
|
16
|
-
const HyperlaneCore_1 = require("../core/HyperlaneCore");
|
|
17
|
-
const TestCoreDeployer_1 = require("../core/TestCoreDeployer");
|
|
18
|
-
const MultiProvider_1 = require("../providers/MultiProvider");
|
|
19
|
-
const calculator_1 = require("./calculator");
|
|
20
|
-
describe('InterchainGasCalculator', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
21
|
-
const localChain = chains_1.Chains.test1;
|
|
22
|
-
const remoteChain = chains_1.Chains.test2;
|
|
23
|
-
const testGasAmount = ethers_1.BigNumber.from('100000');
|
|
24
|
-
let signer;
|
|
25
|
-
let multiProvider;
|
|
26
|
-
let calculator;
|
|
27
|
-
let igp;
|
|
28
|
-
before(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
29
|
-
[signer] = yield hardhat_1.ethers.getSigners();
|
|
30
|
-
multiProvider = MultiProvider_1.MultiProvider.createTestMultiProvider({ signer });
|
|
31
|
-
const coreDeployer = new TestCoreDeployer_1.TestCoreDeployer(multiProvider);
|
|
32
|
-
const coreContractsMaps = yield coreDeployer.deploy();
|
|
33
|
-
const core = new HyperlaneCore_1.HyperlaneCore(coreContractsMaps, multiProvider);
|
|
34
|
-
calculator = new calculator_1.InterchainGasCalculator(multiProvider, core);
|
|
35
|
-
igp = coreContractsMaps[localChain].interchainGasPaymaster.address;
|
|
36
|
-
}));
|
|
37
|
-
describe('quoteGasPaymentForDefaultIsmIgp', () => {
|
|
38
|
-
it("calls the default ISM IGP's quoteGasPayment function", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
39
|
-
const quote = yield calculator.quoteGasPaymentForDefaultIsmIgp(localChain, remoteChain, testGasAmount);
|
|
40
|
-
// (100,000 gas amount + 151,966 overhead) * 10 gas price
|
|
41
|
-
(0, chai_1.expect)(quote).to.equal(ethers_1.BigNumber.from('2519660'));
|
|
42
|
-
}));
|
|
43
|
-
});
|
|
44
|
-
describe('quoteGasPayment', () => {
|
|
45
|
-
it("calls the IGP's quoteGasPayment function", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
46
|
-
const quote = yield calculator.quoteGasPayment(localChain, remoteChain, testGasAmount);
|
|
47
|
-
// 100,000 gas amount * 10 gas price
|
|
48
|
-
(0, chai_1.expect)(quote).to.equal(ethers_1.BigNumber.from('1000000'));
|
|
49
|
-
}));
|
|
50
|
-
});
|
|
51
|
-
describe('quoteGasPaymentForIGP', () => {
|
|
52
|
-
it("calls the provided IGP's quoteGasPayment", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
53
|
-
const quote = yield calculator.quoteGasPaymentForIGP(localChain, remoteChain, testGasAmount, igp);
|
|
54
|
-
// 100,000 gas amount * 10 gas price
|
|
55
|
-
(0, chai_1.expect)(quote).to.equal(ethers_1.BigNumber.from('1000000'));
|
|
56
|
-
}));
|
|
57
|
-
});
|
|
58
|
-
}));
|
|
59
|
-
//# sourceMappingURL=calculator.hardhat-test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"calculator.hardhat-test.js","sourceRoot":"","sources":["../../src/gas/calculator.hardhat-test.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,+BAA8B;AAC9B,mCAAmC;AACnC,qCAAiC;AAIjC,6CAA0C;AAC1C,yDAAsD;AACtD,+DAA4D;AAC5D,8DAA2D;AAE3D,6CAAuD;AAEvD,QAAQ,CAAC,yBAAyB,EAAE,GAAS,EAAE;IAC7C,MAAM,UAAU,GAAG,eAAM,CAAC,KAAK,CAAC;IAChC,MAAM,WAAW,GAAG,eAAM,CAAC,KAAK,CAAC;IAEjC,MAAM,aAAa,GAAG,kBAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAE/C,IAAI,MAAyB,CAAC;IAC9B,IAAI,aAA4B,CAAC;IAEjC,IAAI,UAAmC,CAAC;IACxC,IAAI,GAAkB,CAAC;IAEvB,MAAM,CAAC,GAAS,EAAE;QAChB,CAAC,MAAM,CAAC,GAAG,MAAM,gBAAM,CAAC,UAAU,EAAE,CAAC;QAErC,aAAa,GAAG,6BAAa,CAAC,uBAAuB,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;QAElE,MAAM,YAAY,GAAG,IAAI,mCAAgB,CAAC,aAAa,CAAC,CAAC;QACzD,MAAM,iBAAiB,GAAG,MAAM,YAAY,CAAC,MAAM,EAAE,CAAC;QACtD,MAAM,IAAI,GAAG,IAAI,6BAAa,CAAC,iBAAiB,EAAE,aAAa,CAAC,CAAC;QACjE,UAAU,GAAG,IAAI,oCAAuB,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;QAC9D,GAAG,GAAG,iBAAiB,CAAC,UAAU,CAAC,CAAC,sBAAsB,CAAC,OAAO,CAAC;IACrE,CAAC,CAAA,CAAC,CAAC;IAEH,QAAQ,CAAC,iCAAiC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