@layerzerolabs/lz-contract-addresses 1.2.91 → 1.2.92
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 +8 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +41 -5
- package/dist/index.js.map +1 -1
- package/package.json +9 -8
package/README.md
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Protocol address snapshot
|
|
2
|
+
|
|
3
|
+
`src/generated/<env>.json` holds the protocol contract addresses owned by the deploy & wire registry. Generate it from the registry with `export-address-snapshot` (`apps/projects/deploy-wire-protocol-project-app/scripts`); don't edit it by hand.
|
|
4
|
+
|
|
5
|
+
CI does not check it against the registry yet: that gate is step 2 of `apps/projects/deploy-wire-protocol-project-app/docs/cutover.md` (`export-address-snapshot --check` per environment). Until then, these tests guard it:
|
|
6
|
+
|
|
7
|
+
- `tests/deploymentInfo.test.ts` compares the snapshot to the deploymentInfo files still committed under `deployments/layerzero/<env>` (the published Canton mainnet and testnet packages).
|
|
8
|
+
- `tests/addressResolutionParity.test.ts` checks that every address main resolved still resolves the same, which covers the rest (EVM, Starknet, Stellar and the other VMs).
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import type { NormalizedHexString } from '@layerzerolabs/common-chain-model';
|
|
2
2
|
import type { ChainName } from '@layerzerolabs/layerzero-definitions';
|
|
3
3
|
import { Environment } from '@layerzerolabs/layerzero-definitions';
|
|
4
|
+
import { ProtocolContracts } from '@layerzerolabs/protocol-model';
|
|
5
|
+
export type ProtocolSnapshotContract = ProtocolContracts.ENDPOINT_V2 | ProtocolContracts.ULN_V302_SEND | ProtocolContracts.ULN_V302_RECEIVE | ProtocolContracts.DVN | ProtocolContracts.EXECUTOR | ProtocolContracts.PRICE_FEED | ProtocolContracts.TREASURY | ProtocolContracts.EXECUTOR_FEELIB | ProtocolContracts.DVN_FEELIB | ProtocolContracts.BLOCKED_MESSAGE_LIB | ProtocolContracts.SIMPLE_MESSAGE_LIB | ProtocolContracts.OMNI_COUNTER;
|
|
6
|
+
export declare const PROTOCOL_CONTRACT_SNAPSHOT_NAMES: Record<ProtocolSnapshotContract, string>;
|
|
7
|
+
export declare const getProtocolSnapshotAddress: (contractName: string, chainName: ChainName, environment: Environment) => NormalizedHexString;
|
|
8
|
+
export declare const listLZContractNames: () => string[];
|
|
4
9
|
/** Address from the registry snapshot, else the frozen legacy table. */
|
|
5
10
|
export declare const getLZContractAddressFromConfig: (contractName: string, chainName: ChainName, environment: Environment) => NormalizedHexString | undefined;
|
|
6
11
|
/**
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAE7E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAE7E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAuBlE,MAAM,MAAM,wBAAwB,GAC9B,iBAAiB,CAAC,WAAW,GAC7B,iBAAiB,CAAC,aAAa,GAC/B,iBAAiB,CAAC,gBAAgB,GAClC,iBAAiB,CAAC,GAAG,GACrB,iBAAiB,CAAC,QAAQ,GAC1B,iBAAiB,CAAC,UAAU,GAC5B,iBAAiB,CAAC,QAAQ,GAC1B,iBAAiB,CAAC,eAAe,GACjC,iBAAiB,CAAC,UAAU,GAC5B,iBAAiB,CAAC,mBAAmB,GACrC,iBAAiB,CAAC,kBAAkB,GACpC,iBAAiB,CAAC,YAAY,CAAC;AAErC,eAAO,MAAM,gCAAgC,EAAE,MAAM,CAAC,wBAAwB,EAAE,MAAM,CAarF,CAAC;AAEF,eAAO,MAAM,0BAA0B,iBACrB,MAAM,aACT,SAAS,eACP,WAAW,KACzB,mBAQF,CAAC;AAEF,eAAO,MAAM,mBAAmB,QAAO,MAAM,EAQ5C,CAAC;AAEF,wEAAwE;AACxE,eAAO,MAAM,8BAA8B,iBACzB,MAAM,aACT,SAAS,eACP,WAAW,KACzB,mBAAmB,GAAG,SAKxB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B,iBACxB,MAAM,4BACM,CACtB,SAAS,EAAE,SAAS,EACpB,WAAW,EAAE,WAAW,KACvB,mBAAmB,iBAEL,SAAS,eAAe,WAAW,wBAWzD,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { normalizeHex } from '@layerzerolabs/common-chain-model';
|
|
2
2
|
import { Environment } from '@layerzerolabs/layerzero-definitions';
|
|
3
|
+
import { ProtocolContracts } from '@layerzerolabs/protocol-model';
|
|
3
4
|
|
|
4
5
|
var __defProp = Object.defineProperty;
|
|
5
6
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
@@ -4804,7 +4805,7 @@ var testnet_default = {
|
|
|
4804
4805
|
DVN: "0x610178da211fef7d417bc0e6fed39f05609ad788",
|
|
4805
4806
|
DVNFeeLib: "0x8a791620dd6260079bf849dc5567adc3f2fdc318",
|
|
4806
4807
|
EndpointV2: "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512",
|
|
4807
|
-
Executor: "
|
|
4808
|
+
Executor: "0x9a676e781a523b5d0c0e43731313a708cb607508",
|
|
4808
4809
|
ExecutorFeeLib: "0xb7f8bc63bbcad18155201308c8f3540b07f84f5e",
|
|
4809
4810
|
OmniCounter: "0x0165878a594ca255338adfa4d48449f69242eb8f",
|
|
4810
4811
|
PriceFeed: "0x5fc8d32690cc91d4c39d9d3abcbd16989f875707",
|
|
@@ -12604,11 +12605,11 @@ var testnet_default2 = {
|
|
|
12604
12605
|
ReceiveUln302View: "0x5081a39b8A5f0E35a8D959395a630b68B74Dd30f"
|
|
12605
12606
|
},
|
|
12606
12607
|
zerointerop: {
|
|
12607
|
-
EndpointV2View: "
|
|
12608
|
+
EndpointV2View: "0x9A9f2CCfdE556A7E9Ff0848998Aa4a0CFD8863AE",
|
|
12608
12609
|
ExecutorProxyAdmin: "0x0DCd1Bf9A1b36cE34237eEaFef220932846BCD82",
|
|
12609
|
-
Executor_Proxy: "
|
|
12610
|
+
Executor_Proxy: "0x9A676e781A523b5d0C0e43731313A708CB607508",
|
|
12610
12611
|
PriceFeedProxyAdmin: "0xDc64a140Aa3E981100a9becA4E685f962f0cF6C9",
|
|
12611
|
-
ReceiveUln302View: "
|
|
12612
|
+
ReceiveUln302View: "0xc6e7DF5E7b4f2A278906862b61205850344D4e7d"
|
|
12612
12613
|
},
|
|
12613
12614
|
zerosystem: {
|
|
12614
12615
|
EndpointV2View: "0x4826533B4897376654Bb4d4AD88B7faFD0C98528",
|
|
@@ -12841,6 +12842,41 @@ var legacyTables = {
|
|
|
12841
12842
|
[Environment.TESTNET]: testnet_default2,
|
|
12842
12843
|
[Environment.SANDBOX]: sandbox_default2
|
|
12843
12844
|
};
|
|
12845
|
+
var PROTOCOL_CONTRACT_SNAPSHOT_NAMES = {
|
|
12846
|
+
[ProtocolContracts.ENDPOINT_V2]: "EndpointV2",
|
|
12847
|
+
[ProtocolContracts.ULN_V302_SEND]: "SendUln302",
|
|
12848
|
+
[ProtocolContracts.ULN_V302_RECEIVE]: "ReceiveUln302",
|
|
12849
|
+
[ProtocolContracts.DVN]: "DVN",
|
|
12850
|
+
[ProtocolContracts.EXECUTOR]: "Executor",
|
|
12851
|
+
[ProtocolContracts.PRICE_FEED]: "PriceFeed",
|
|
12852
|
+
[ProtocolContracts.TREASURY]: "Treasury",
|
|
12853
|
+
[ProtocolContracts.EXECUTOR_FEELIB]: "ExecutorFeeLib",
|
|
12854
|
+
[ProtocolContracts.DVN_FEELIB]: "DVNFeeLib",
|
|
12855
|
+
[ProtocolContracts.BLOCKED_MESSAGE_LIB]: "BlockedMessageLib",
|
|
12856
|
+
[ProtocolContracts.SIMPLE_MESSAGE_LIB]: "SimpleMessageLib",
|
|
12857
|
+
[ProtocolContracts.OMNI_COUNTER]: "OmniCounter"
|
|
12858
|
+
};
|
|
12859
|
+
var getProtocolSnapshotAddress = /* @__PURE__ */ __name((contractName, chainName, environment) => {
|
|
12860
|
+
const address = snapshots[environment]?.[chainName]?.[contractName];
|
|
12861
|
+
if (!address) {
|
|
12862
|
+
throw new Error(`No ${contractName} address for ${chainName} ${environment} in the protocol registry snapshot (@layerzerolabs/lz-contract-addresses generated/${environment}.json)`);
|
|
12863
|
+
}
|
|
12864
|
+
return normalizeHex(address);
|
|
12865
|
+
}, "getProtocolSnapshotAddress");
|
|
12866
|
+
var listLZContractNames = /* @__PURE__ */ __name(() => {
|
|
12867
|
+
const names = /* @__PURE__ */ new Set();
|
|
12868
|
+
for (const table of [
|
|
12869
|
+
...Object.values(snapshots),
|
|
12870
|
+
...Object.values(legacyTables)
|
|
12871
|
+
]) {
|
|
12872
|
+
for (const contracts of Object.values(table)) {
|
|
12873
|
+
for (const name of Object.keys(contracts)) names.add(name);
|
|
12874
|
+
}
|
|
12875
|
+
}
|
|
12876
|
+
return [
|
|
12877
|
+
...names
|
|
12878
|
+
].sort();
|
|
12879
|
+
}, "listLZContractNames");
|
|
12844
12880
|
var getLZContractAddressFromConfig = /* @__PURE__ */ __name((contractName, chainName, environment) => {
|
|
12845
12881
|
const address = snapshots[environment]?.[chainName]?.[contractName] ?? legacyTables[environment]?.[chainName]?.[contractName];
|
|
12846
12882
|
return address ? normalizeHex(address) : void 0;
|
|
@@ -12857,6 +12893,6 @@ var createLZContractAddressGetter = /* @__PURE__ */ __name((contractName, altern
|
|
|
12857
12893
|
};
|
|
12858
12894
|
}, "createLZContractAddressGetter");
|
|
12859
12895
|
|
|
12860
|
-
export { createLZContractAddressGetter, getLZContractAddressFromConfig };
|
|
12896
|
+
export { PROTOCOL_CONTRACT_SNAPSHOT_NAMES, createLZContractAddressGetter, getLZContractAddressFromConfig, getProtocolSnapshotAddress, listLZContractNames };
|
|
12861
12897
|
//# sourceMappingURL=index.js.map
|
|
12862
12898
|
//# sourceMappingURL=index.js.map
|