@zentity/fhevm-contracts 0.2.1 → 0.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.
@@ -0,0 +1,18 @@
1
+ {
2
+ "network": "sepolia",
3
+ "chainId": 11155111,
4
+ "contracts": {
5
+ "IdentityRegistry": {
6
+ "address": "0x05c6FB879BbF0Cab2B0206523583F94E49Ba62e2",
7
+ "txHash": "0x203b1dec1bbb029c5ad0dfcfa5ee60d6da1cfb85308a445a5cd48564343082bb"
8
+ },
9
+ "ComplianceRules": {
10
+ "address": "0x78dE340fc7A6ba470a5dD8b0a5f5933cD48dC164",
11
+ "txHash": "0xe0ccb896555413504f26240b4e0977b5da6a16125d72ec4c98129bf1f48553dd"
12
+ },
13
+ "CompliantERC20": {
14
+ "address": "0x2CBEF5Da4F16346bBb34C3D7a81bFC0D9882c711",
15
+ "txHash": "0x31c7bf7c5b461787fd11f68567a99400a6811c57138ce82971d8e6b039540865"
16
+ }
17
+ }
18
+ }
package/dist/index.d.ts CHANGED
@@ -29,11 +29,9 @@ export type NetworkName = keyof typeof CHAIN_ID_BY_NETWORK;
29
29
  export type ChainId = (typeof CHAIN_ID_BY_NETWORK)[NetworkName];
30
30
  export declare const DEPLOYMENTS: Partial<Record<NetworkName, DeploymentManifest>>;
31
31
  export declare const ADDRESSES: {
32
- readonly hardhat: {
33
- readonly IdentityRegistry: string;
34
- readonly ComplianceRules: string;
35
- readonly CompliantERC20: string;
36
- };
32
+ readonly hardhat: ContractAddresses;
33
+ readonly localhost: ContractAddresses;
34
+ readonly sepolia: ContractAddresses;
37
35
  };
38
36
  export declare const ABIS: {
39
37
  readonly IdentityRegistry: ({
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH,eAAO,MAAM,cAAc,oEAAqE,CAAC;AAEjG,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,cAAc,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;;;;;;;KAExC;AAED,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAsB,CAAC;AACvD,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAqB,CAAC;AACrD,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAoB,CAAC;AAEnD,wBAAgB,aAAa,CAAC,OAAO,EAAE,WAAW,GAAG,kBAAkB,CAQtE;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAE3D;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,WAAW,CAEjE;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,WAAW,EAAE,CAI9D;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,WAAW,CAOjF;AAED,wBAAgB,oBAAoB,CAClC,gBAAgB,EAAE,WAAW,GAAG,MAAM,EACtC,OAAO,CAAC,EAAE;IACR,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAC;CACxC,GACA,iBAAiB,CAcnB;AAED,wBAAgB,wBAAwB,CACtC,gBAAgB,EAAE,WAAW,GAAG,MAAM,EACtC,OAAO,CAAC,EAAE;IACR,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAC;CACxC,GACA,iBAAiB,CAmBnB"}
package/dist/index.js CHANGED
@@ -21,32 +21,44 @@ const ComplianceRules_json_1 = __importDefault(require("../abi/ComplianceRules.j
21
21
  const CompliantERC20_json_1 = __importDefault(require("../abi/CompliantERC20.json"));
22
22
  const IdentityRegistry_json_1 = __importDefault(require("../abi/IdentityRegistry.json"));
23
23
  const addresses_json_1 = __importDefault(require("../deployments/hardhat/addresses.json"));
24
+ const addresses_json_2 = __importDefault(require("../deployments/sepolia/addresses.json"));
24
25
  exports.CONTRACT_NAMES = ["IdentityRegistry", "ComplianceRules", "CompliantERC20"];
25
26
  const hardhatAddresses = addresses_json_1.default;
27
+ const sepoliaAddresses = addresses_json_2.default;
26
28
  exports.CHAIN_ID_BY_NETWORK = {
27
29
  hardhat: 31337,
28
30
  localhost: 31337,
29
31
  sepolia: 11155111,
30
32
  };
31
- exports.DEPLOYMENTS = {
32
- hardhat: {
33
- network: hardhatAddresses.network ?? "hardhat",
34
- chainId: hardhatAddresses.chainId ?? exports.CHAIN_ID_BY_NETWORK.hardhat,
35
- deployedAt: hardhatAddresses.deployedAt,
36
- deployer: hardhatAddresses.deployer,
33
+ function toManifest(source, fallbackNetwork, fallbackChainId) {
34
+ return {
35
+ network: source.network ?? fallbackNetwork,
36
+ chainId: source.chainId ?? fallbackChainId,
37
+ deployedAt: source.deployedAt,
38
+ deployer: source.deployer,
37
39
  contracts: {
38
- IdentityRegistry: hardhatAddresses.contracts.IdentityRegistry,
39
- ComplianceRules: hardhatAddresses.contracts.ComplianceRules,
40
- CompliantERC20: hardhatAddresses.contracts.CompliantERC20,
40
+ IdentityRegistry: source.contracts.IdentityRegistry,
41
+ ComplianceRules: source.contracts.ComplianceRules,
42
+ CompliantERC20: source.contracts.CompliantERC20,
41
43
  },
42
- },
44
+ };
45
+ }
46
+ exports.DEPLOYMENTS = {
47
+ hardhat: toManifest(hardhatAddresses, "hardhat", exports.CHAIN_ID_BY_NETWORK.hardhat),
48
+ localhost: toManifest(hardhatAddresses, "localhost", exports.CHAIN_ID_BY_NETWORK.localhost),
49
+ sepolia: toManifest(sepoliaAddresses, "sepolia", exports.CHAIN_ID_BY_NETWORK.sepolia),
43
50
  };
51
+ function toAddresses(source) {
52
+ return {
53
+ IdentityRegistry: source.contracts.IdentityRegistry.address,
54
+ ComplianceRules: source.contracts.ComplianceRules.address,
55
+ CompliantERC20: source.contracts.CompliantERC20.address,
56
+ };
57
+ }
44
58
  exports.ADDRESSES = {
45
- hardhat: {
46
- IdentityRegistry: hardhatAddresses.contracts.IdentityRegistry.address,
47
- ComplianceRules: hardhatAddresses.contracts.ComplianceRules.address,
48
- CompliantERC20: hardhatAddresses.contracts.CompliantERC20.address,
49
- },
59
+ hardhat: toAddresses(hardhatAddresses),
60
+ localhost: toAddresses(hardhatAddresses),
61
+ sepolia: toAddresses(sepoliaAddresses),
50
62
  };
51
63
  exports.ABIS = {
52
64
  IdentityRegistry: IdentityRegistry_json_1.default,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zentity/fhevm-contracts",
3
- "version": "0.2.1",
3
+ "version": "0.3.0",
4
4
  "description": "fhEVM smart contracts for Zentity privacy-preserving identity attestations",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -51,7 +51,8 @@
51
51
  "typechain": "hardhat typechain",
52
52
  "export-abi": "bun scripts/export-abi.ts",
53
53
  "print:deployments": "bun scripts/print-deployments.ts",
54
- "build": "bun run compile && bun run typechain && bun run export-abi && tsc -p tsconfig.build.json",
54
+ "consolidate": "bun scripts/consolidate-deployments.ts",
55
+ "build": "bun run compile && bun run typechain && bun run export-abi && bun run consolidate && tsc -p tsconfig.build.json",
55
56
  "prepublishOnly": "bun run build",
56
57
  "ci:version": "changeset version",
57
58
  "ci:publish": "changeset publish",