@layerzerolabs/onesig-evm 0.0.2 → 0.0.4

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.
Files changed (32) hide show
  1. package/contracts/MultiSig.sol +219 -0
  2. package/contracts/OneSig.sol +258 -0
  3. package/contracts/mocks/MockOApp.sol +13 -0
  4. package/dist/index.d.ts +12 -0
  5. package/dist/index.js +54 -0
  6. package/package.json +10 -14
  7. package/typechain-types/@openzeppelin/contracts/index.ts +5 -0
  8. package/typechain-types/@openzeppelin/contracts/utils/cryptography/ECDSA.ts +55 -0
  9. package/typechain-types/@openzeppelin/contracts/utils/cryptography/MerkleProof.ts +55 -0
  10. package/typechain-types/@openzeppelin/contracts/utils/cryptography/index.ts +5 -0
  11. package/typechain-types/@openzeppelin/contracts/utils/index.ts +5 -0
  12. package/typechain-types/@openzeppelin/index.ts +5 -0
  13. package/typechain-types/common.ts +46 -0
  14. package/typechain-types/contracts/MultiSig.ts +358 -0
  15. package/typechain-types/contracts/OneSig.ts +687 -0
  16. package/typechain-types/contracts/index.ts +7 -0
  17. package/typechain-types/contracts/mocks/MockOApp.ts +144 -0
  18. package/typechain-types/contracts/mocks/index.ts +4 -0
  19. package/typechain-types/factories/@openzeppelin/contracts/index.ts +4 -0
  20. package/typechain-types/factories/@openzeppelin/contracts/utils/cryptography/ECDSA__factory.ts +87 -0
  21. package/typechain-types/factories/@openzeppelin/contracts/utils/cryptography/MerkleProof__factory.ts +68 -0
  22. package/typechain-types/factories/@openzeppelin/contracts/utils/cryptography/index.ts +5 -0
  23. package/typechain-types/factories/@openzeppelin/contracts/utils/index.ts +4 -0
  24. package/typechain-types/factories/@openzeppelin/index.ts +4 -0
  25. package/typechain-types/factories/contracts/MultiSig__factory.ts +275 -0
  26. package/typechain-types/factories/contracts/OneSig__factory.ts +653 -0
  27. package/typechain-types/factories/contracts/index.ts +6 -0
  28. package/typechain-types/factories/contracts/mocks/MockOApp__factory.ts +104 -0
  29. package/typechain-types/factories/contracts/mocks/index.ts +4 -0
  30. package/typechain-types/factories/index.ts +5 -0
  31. package/typechain-types/hardhat.d.ts +78 -0
  32. package/typechain-types/index.ts +18 -0
@@ -0,0 +1,6 @@
1
+ /* Autogenerated file. Do not edit manually. */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ export * as mocks from "./mocks";
5
+ export { MultiSig__factory } from "./MultiSig__factory";
6
+ export { OneSig__factory } from "./OneSig__factory";
@@ -0,0 +1,104 @@
1
+ /* Autogenerated file. Do not edit manually. */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers";
5
+ import type { Provider, TransactionRequest } from "@ethersproject/providers";
6
+ import type { PromiseOrValue } from "../../../common";
7
+ import type {
8
+ MockOApp,
9
+ MockOAppInterface,
10
+ } from "../../../contracts/mocks/MockOApp";
11
+
12
+ const _abi = [
13
+ {
14
+ inputs: [
15
+ {
16
+ internalType: "uint32",
17
+ name: "",
18
+ type: "uint32",
19
+ },
20
+ ],
21
+ name: "bytesMapping",
22
+ outputs: [
23
+ {
24
+ internalType: "bytes",
25
+ name: "",
26
+ type: "bytes",
27
+ },
28
+ ],
29
+ stateMutability: "view",
30
+ type: "function",
31
+ },
32
+ {
33
+ inputs: [
34
+ {
35
+ internalType: "uint32",
36
+ name: "_dstEid",
37
+ type: "uint32",
38
+ },
39
+ {
40
+ internalType: "bytes",
41
+ name: "_bytes",
42
+ type: "bytes",
43
+ },
44
+ ],
45
+ name: "setBytes",
46
+ outputs: [],
47
+ stateMutability: "nonpayable",
48
+ type: "function",
49
+ },
50
+ {
51
+ stateMutability: "payable",
52
+ type: "receive",
53
+ },
54
+ ] as const;
55
+
56
+ const _bytecode =
57
+ "0x0001000000000002000500000000000200000000000103550000008003000039000000400030043f0000000003010019000000600330027000000050033001970000000102200190000000a30000c13d000000040230008c000000ab0000413d000000000201043b000000e002200270000000520420009c000000af0000613d000000530220009c000000f40000c13d0000000002000416000000000202004b000000f40000c13d000000040230008a000000400220008c000000f40000413d0000000402100370000000000202043b000000500420009c000000f40000213d0000002404100370000000000404043b000000540540009c000000f40000213d00000023054000390000005506000041000000000735004b000000000700001900000000070680190000005505500197000000000805004b0000000006008019000000550550009c000000000607c019000000000506004b000000f40000c13d0000000406400039000000000161034f000000000501043b000000540150009c000000f40000213d00000024044000390000000001450019000000000131004b000000f40000213d0000000000200435000000200000043f00000050010000410000000002000414000000500320009c0000000002018019000000c00120021000000056011001c70000801002000039000500000005001d000300000004001d000400000006001d013b01360000040f000000040600002900000005040000290000000102200190000000f40000613d000000000501043b000000000105041a000000010210019000000001021002700000007f0320018f000000000302c0190000001f0230008c00000000020000190000000102002039000000000121013f0000000101100190000000d10000c13d000000200130008c000000740000413d000100000003001d000200000005001d000000000050043500000050010000410000000002000414000000500320009c0000000002018019000000c00120021000000057011001c70000801002000039013b01360000040f000000040600002900000005040000290000000102200190000000f40000613d0000001f024000390000000502200270000000200340008c0000000002004019000000000301043b00000001010000290000001f01100039000000050110027000000000011300190000000002230019000000000312004b0000000205000029000000740000813d000000000002041b0000000102200039000000000312004b000000700000413d0000001f0140008c000001260000a13d000200000005001d000000000050043500000050010000410000000002000414000000500320009c0000000002018019000000c00120021000000057011001c70000801002000039013b01360000040f000000030700002900000005060000290000000102200190000000f40000613d000000200200008a0000000003260170000000000101043b0000000002000019000000930000613d000000000400036700000000020000190000000005720019000000000554034f000000000505043b000000000051041b00000001011000390000002002200039000000000532004b0000008b0000413d000000000363004b0000009f0000813d0000000303600210000000f80330018f000000010400008a000000000334022f000000000343013f00000000027200190000000002200367000000000202043b000000000232016f000000000021041b000000010100003900000001026002100000000205000029000001320000013d0000000001000416000000000101004b000000f40000c13d00000020010000390000010000100443000001200000044300000051010000410000013c0001042e000000000103004b000000f40000c13d00000000010000190000013c0001042e0000000002000416000000000202004b000000f40000c13d000000040230008a000000200220008c000000f40000413d0000000401100370000000000101043b000000500210009c000000f40000213d0000000000100435000000200000043f00000050010000410000000002000414000000500320009c0000000002018019000000c00120021000000056011001c70000801002000039013b01360000040f0000000102200190000000f40000613d000000000101043b000000000201041a000000010320019000000001042002700000007f0540018f000000000504c0190000001f0450008c00000000040000190000000104002039000000010440018f000000000443004b000000d50000613d0000005a0100004100000000001004350000002201000039000001050000013d000000800050043f000000000303004b000000f60000613d000500000005001d000000000010043500000050010000410000000002000414000000500320009c0000000002018019000000c00120021000000057011001c70000801002000039013b01360000040f0000000102200190000000f40000613d000000a0020000390000000505000029000000000305004b000001080000613d000000000101043b00000000030000190000000002030019000000000301041a000000a004200039000000000034043500000001011000390000002003200039000000000453004b000000ea0000413d000000c001200039000000fc0000013d00000000010000190000013d00010430000001000100008a000000000112016f000000a00010043f000000000105004b000000c001000039000000a0010060390000001f01100039000000200200008a000000000221016f0000005801200041000000590110009c000001080000813d0000005a0100004100000000001004350000004101000039000000040010043f0000005b010000410000013d00010430000000400020043f00000020010000390000000003120436000000800100043d00000000001304350000004003200039000000000401004b000001180000613d00000000040000190000000005340019000000a006400039000000000606043300000000006504350000002004400039000000000514004b000001110000413d000000000331001900000000000304350000005f01100039000000200300008a000000000131016f0000005003000041000000500410009c0000000001038019000000500420009c000000000203801900000040022002100000006001100210000000000121019f0000013c0001042e000000000104004b00000000010000190000012c0000613d00000020016000390000000001100367000000000101043b0000000302400210000000010300008a000000000223022f000000000232013f000000000221016f0000000101400210000000000112019f000000000015041b00000000010000190000013c0001042e00000139002104230000000102000039000000000001042d0000000002000019000000000001042d0000013b000004320000013c0001042e0000013d000104300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffff000000020000000000000000000000000000004000000100000000000000000000000000000000000000000000000000000000000000000000000000063a54080000000000000000000000000000000000000000000000000000000040411086000000000000000000000000000000000000000000000000ffffffffffffffff800000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000400000000000000000000000000200000000000000000000000000000000000020000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffff00000000000000804e487b71000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024000000000000000000000000d2f2c4c81b3a9271642efe790b7997cf0b5e7414f8f22444f7600e3a7f0f4974";
58
+
59
+ type MockOAppConstructorParams =
60
+ | [signer?: Signer]
61
+ | ConstructorParameters<typeof ContractFactory>;
62
+
63
+ const isSuperArgs = (
64
+ xs: MockOAppConstructorParams
65
+ ): xs is ConstructorParameters<typeof ContractFactory> => xs.length > 1;
66
+
67
+ export class MockOApp__factory extends ContractFactory {
68
+ constructor(...args: MockOAppConstructorParams) {
69
+ if (isSuperArgs(args)) {
70
+ super(...args);
71
+ } else {
72
+ super(_abi, _bytecode, args[0]);
73
+ }
74
+ }
75
+
76
+ override deploy(
77
+ overrides?: Overrides & { from?: PromiseOrValue<string> }
78
+ ): Promise<MockOApp> {
79
+ return super.deploy(overrides || {}) as Promise<MockOApp>;
80
+ }
81
+ override getDeployTransaction(
82
+ overrides?: Overrides & { from?: PromiseOrValue<string> }
83
+ ): TransactionRequest {
84
+ return super.getDeployTransaction(overrides || {});
85
+ }
86
+ override attach(address: string): MockOApp {
87
+ return super.attach(address) as MockOApp;
88
+ }
89
+ override connect(signer: Signer): MockOApp__factory {
90
+ return super.connect(signer) as MockOApp__factory;
91
+ }
92
+
93
+ static readonly bytecode = _bytecode;
94
+ static readonly abi = _abi;
95
+ static createInterface(): MockOAppInterface {
96
+ return new utils.Interface(_abi) as MockOAppInterface;
97
+ }
98
+ static connect(
99
+ address: string,
100
+ signerOrProvider: Signer | Provider
101
+ ): MockOApp {
102
+ return new Contract(address, _abi, signerOrProvider) as MockOApp;
103
+ }
104
+ }
@@ -0,0 +1,4 @@
1
+ /* Autogenerated file. Do not edit manually. */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ export { MockOApp__factory } from "./MockOApp__factory";
@@ -0,0 +1,5 @@
1
+ /* Autogenerated file. Do not edit manually. */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ export * as openzeppelin from "./@openzeppelin";
5
+ export * as contracts from "./contracts";
@@ -0,0 +1,78 @@
1
+ /* Autogenerated file. Do not edit manually. */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ import { ethers } from "ethers";
6
+ import {
7
+ FactoryOptions,
8
+ HardhatEthersHelpers as HardhatEthersHelpersBase,
9
+ } from "@nomiclabs/hardhat-ethers/types";
10
+
11
+ import * as Contracts from ".";
12
+
13
+ declare module "hardhat/types/runtime" {
14
+ interface HardhatEthersHelpers extends HardhatEthersHelpersBase {
15
+ getContractFactory(
16
+ name: "ECDSA",
17
+ signerOrOptions?: ethers.Signer | FactoryOptions
18
+ ): Promise<Contracts.ECDSA__factory>;
19
+ getContractFactory(
20
+ name: "MerkleProof",
21
+ signerOrOptions?: ethers.Signer | FactoryOptions
22
+ ): Promise<Contracts.MerkleProof__factory>;
23
+ getContractFactory(
24
+ name: "MockOApp",
25
+ signerOrOptions?: ethers.Signer | FactoryOptions
26
+ ): Promise<Contracts.MockOApp__factory>;
27
+ getContractFactory(
28
+ name: "MultiSig",
29
+ signerOrOptions?: ethers.Signer | FactoryOptions
30
+ ): Promise<Contracts.MultiSig__factory>;
31
+ getContractFactory(
32
+ name: "OneSig",
33
+ signerOrOptions?: ethers.Signer | FactoryOptions
34
+ ): Promise<Contracts.OneSig__factory>;
35
+
36
+ getContractAt(
37
+ name: "ECDSA",
38
+ address: string,
39
+ signer?: ethers.Signer
40
+ ): Promise<Contracts.ECDSA>;
41
+ getContractAt(
42
+ name: "MerkleProof",
43
+ address: string,
44
+ signer?: ethers.Signer
45
+ ): Promise<Contracts.MerkleProof>;
46
+ getContractAt(
47
+ name: "MockOApp",
48
+ address: string,
49
+ signer?: ethers.Signer
50
+ ): Promise<Contracts.MockOApp>;
51
+ getContractAt(
52
+ name: "MultiSig",
53
+ address: string,
54
+ signer?: ethers.Signer
55
+ ): Promise<Contracts.MultiSig>;
56
+ getContractAt(
57
+ name: "OneSig",
58
+ address: string,
59
+ signer?: ethers.Signer
60
+ ): Promise<Contracts.OneSig>;
61
+
62
+ // default types
63
+ getContractFactory(
64
+ name: string,
65
+ signerOrOptions?: ethers.Signer | FactoryOptions
66
+ ): Promise<ethers.ContractFactory>;
67
+ getContractFactory(
68
+ abi: any[],
69
+ bytecode: ethers.utils.BytesLike,
70
+ signer?: ethers.Signer
71
+ ): Promise<ethers.ContractFactory>;
72
+ getContractAt(
73
+ nameOrAbi: string | any[],
74
+ address: string,
75
+ signer?: ethers.Signer
76
+ ): Promise<ethers.Contract>;
77
+ }
78
+ }
@@ -0,0 +1,18 @@
1
+ /* Autogenerated file. Do not edit manually. */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ import type * as openzeppelin from "./@openzeppelin";
5
+ export type { openzeppelin };
6
+ import type * as contracts from "./contracts";
7
+ export type { contracts };
8
+ export * as factories from "./factories";
9
+ export type { ECDSA } from "./@openzeppelin/contracts/utils/cryptography/ECDSA";
10
+ export { ECDSA__factory } from "./factories/@openzeppelin/contracts/utils/cryptography/ECDSA__factory";
11
+ export type { MerkleProof } from "./@openzeppelin/contracts/utils/cryptography/MerkleProof";
12
+ export { MerkleProof__factory } from "./factories/@openzeppelin/contracts/utils/cryptography/MerkleProof__factory";
13
+ export type { MockOApp } from "./contracts/mocks/MockOApp";
14
+ export { MockOApp__factory } from "./factories/contracts/mocks/MockOApp__factory";
15
+ export type { MultiSig } from "./contracts/MultiSig";
16
+ export { MultiSig__factory } from "./factories/contracts/MultiSig__factory";
17
+ export type { OneSig } from "./contracts/OneSig";
18
+ export { OneSig__factory } from "./factories/contracts/OneSig__factory";