@layerzerolabs/onesig-evm 0.0.1

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,53 @@
1
+ {
2
+ "_format": "hh-zksolc-artifact-1",
3
+ "contractName": "MockOApp",
4
+ "sourceName": "contracts/mocks/MockOApp.sol",
5
+ "abi": [
6
+ {
7
+ "inputs": [
8
+ {
9
+ "internalType": "uint32",
10
+ "name": "",
11
+ "type": "uint32"
12
+ }
13
+ ],
14
+ "name": "bytesMapping",
15
+ "outputs": [
16
+ {
17
+ "internalType": "bytes",
18
+ "name": "",
19
+ "type": "bytes"
20
+ }
21
+ ],
22
+ "stateMutability": "view",
23
+ "type": "function"
24
+ },
25
+ {
26
+ "inputs": [
27
+ {
28
+ "internalType": "uint32",
29
+ "name": "_dstEid",
30
+ "type": "uint32"
31
+ },
32
+ {
33
+ "internalType": "bytes",
34
+ "name": "_bytes",
35
+ "type": "bytes"
36
+ }
37
+ ],
38
+ "name": "setBytes",
39
+ "outputs": [],
40
+ "stateMutability": "nonpayable",
41
+ "type": "function"
42
+ },
43
+ {
44
+ "stateMutability": "payable",
45
+ "type": "receive"
46
+ }
47
+ ],
48
+ "bytecode": "0x0001000000000002000500000000000200000000000103550000008003000039000000400030043f0000000003010019000000600330027000000050033001970000000102200190000000a30000c13d000000040230008c000000ab0000413d000000000201043b000000e002200270000000520420009c000000af0000613d000000530220009c000000f40000c13d0000000002000416000000000202004b000000f40000c13d000000040230008a000000400220008c000000f40000413d0000000402100370000000000202043b000000500420009c000000f40000213d0000002404100370000000000404043b000000540540009c000000f40000213d00000023054000390000005506000041000000000735004b000000000700001900000000070680190000005505500197000000000805004b0000000006008019000000550550009c000000000607c019000000000506004b000000f40000c13d0000000406400039000000000161034f000000000501043b000000540150009c000000f40000213d00000024044000390000000001450019000000000131004b000000f40000213d0000000000200435000000200000043f00000050010000410000000002000414000000500320009c0000000002018019000000c00120021000000056011001c70000801002000039000500000005001d000300000004001d000400000006001d013b01360000040f000000040600002900000005040000290000000102200190000000f40000613d000000000501043b000000000105041a000000010210019000000001021002700000007f0320018f000000000302c0190000001f0230008c00000000020000190000000102002039000000000121013f0000000101100190000000d10000c13d000000200130008c000000740000413d000100000003001d000200000005001d000000000050043500000050010000410000000002000414000000500320009c0000000002018019000000c00120021000000057011001c70000801002000039013b01360000040f000000040600002900000005040000290000000102200190000000f40000613d0000001f024000390000000502200270000000200340008c0000000002004019000000000301043b00000001010000290000001f01100039000000050110027000000000011300190000000002230019000000000312004b0000000205000029000000740000813d000000000002041b0000000102200039000000000312004b000000700000413d0000001f0140008c000001260000a13d000200000005001d000000000050043500000050010000410000000002000414000000500320009c0000000002018019000000c00120021000000057011001c70000801002000039013b01360000040f000000030700002900000005060000290000000102200190000000f40000613d000000200200008a0000000003260170000000000101043b0000000002000019000000930000613d000000000400036700000000020000190000000005720019000000000554034f000000000505043b000000000051041b00000001011000390000002002200039000000000532004b0000008b0000413d000000000363004b0000009f0000813d0000000303600210000000f80330018f000000010400008a000000000334022f000000000343013f00000000027200190000000002200367000000000202043b000000000232016f000000000021041b000000010100003900000001026002100000000205000029000001320000013d0000000001000416000000000101004b000000f40000c13d00000020010000390000010000100443000001200000044300000051010000410000013c0001042e000000000103004b000000f40000c13d00000000010000190000013c0001042e0000000002000416000000000202004b000000f40000c13d000000040230008a000000200220008c000000f40000413d0000000401100370000000000101043b000000500210009c000000f40000213d0000000000100435000000200000043f00000050010000410000000002000414000000500320009c0000000002018019000000c00120021000000056011001c70000801002000039013b01360000040f0000000102200190000000f40000613d000000000101043b000000000201041a000000010320019000000001042002700000007f0540018f000000000504c0190000001f0450008c00000000040000190000000104002039000000010440018f000000000443004b000000d50000613d0000005a0100004100000000001004350000002201000039000001050000013d000000800050043f000000000303004b000000f60000613d000500000005001d000000000010043500000050010000410000000002000414000000500320009c0000000002018019000000c00120021000000057011001c70000801002000039013b01360000040f0000000102200190000000f40000613d000000a0020000390000000505000029000000000305004b000001080000613d000000000101043b00000000030000190000000002030019000000000301041a000000a004200039000000000034043500000001011000390000002003200039000000000453004b000000ea0000413d000000c001200039000000fc0000013d00000000010000190000013d00010430000001000100008a000000000112016f000000a00010043f000000000105004b000000c001000039000000a0010060390000001f01100039000000200200008a000000000221016f0000005801200041000000590110009c000001080000813d0000005a0100004100000000001004350000004101000039000000040010043f0000005b010000410000013d00010430000000400020043f00000020010000390000000003120436000000800100043d00000000001304350000004003200039000000000401004b000001180000613d00000000040000190000000005340019000000a006400039000000000606043300000000006504350000002004400039000000000514004b000001110000413d000000000331001900000000000304350000005f01100039000000200300008a000000000131016f0000005003000041000000500410009c0000000001038019000000500420009c000000000203801900000040022002100000006001100210000000000121019f0000013c0001042e000000000104004b00000000010000190000012c0000613d00000020016000390000000001100367000000000101043b0000000302400210000000010300008a000000000223022f000000000232013f000000000221016f0000000101400210000000000112019f000000000015041b00000000010000190000013c0001042e00000139002104230000000102000039000000000001042d0000000002000019000000000001042d0000013b000004320000013c0001042e0000013d000104300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffff000000020000000000000000000000000000004000000100000000000000000000000000000000000000000000000000000000000000000000000000063a54080000000000000000000000000000000000000000000000000000000040411086000000000000000000000000000000000000000000000000ffffffffffffffff800000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000400000000000000000000000000200000000000000000000000000000000000020000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffff00000000000000804e487b71000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024000000000000000000000000d2f2c4c81b3a9271642efe790b7997cf0b5e7414f8f22444f7600e3a7f0f4974",
49
+ "deployedBytecode": "0x0001000000000002000500000000000200000000000103550000008003000039000000400030043f0000000003010019000000600330027000000050033001970000000102200190000000a30000c13d000000040230008c000000ab0000413d000000000201043b000000e002200270000000520420009c000000af0000613d000000530220009c000000f40000c13d0000000002000416000000000202004b000000f40000c13d000000040230008a000000400220008c000000f40000413d0000000402100370000000000202043b000000500420009c000000f40000213d0000002404100370000000000404043b000000540540009c000000f40000213d00000023054000390000005506000041000000000735004b000000000700001900000000070680190000005505500197000000000805004b0000000006008019000000550550009c000000000607c019000000000506004b000000f40000c13d0000000406400039000000000161034f000000000501043b000000540150009c000000f40000213d00000024044000390000000001450019000000000131004b000000f40000213d0000000000200435000000200000043f00000050010000410000000002000414000000500320009c0000000002018019000000c00120021000000056011001c70000801002000039000500000005001d000300000004001d000400000006001d013b01360000040f000000040600002900000005040000290000000102200190000000f40000613d000000000501043b000000000105041a000000010210019000000001021002700000007f0320018f000000000302c0190000001f0230008c00000000020000190000000102002039000000000121013f0000000101100190000000d10000c13d000000200130008c000000740000413d000100000003001d000200000005001d000000000050043500000050010000410000000002000414000000500320009c0000000002018019000000c00120021000000057011001c70000801002000039013b01360000040f000000040600002900000005040000290000000102200190000000f40000613d0000001f024000390000000502200270000000200340008c0000000002004019000000000301043b00000001010000290000001f01100039000000050110027000000000011300190000000002230019000000000312004b0000000205000029000000740000813d000000000002041b0000000102200039000000000312004b000000700000413d0000001f0140008c000001260000a13d000200000005001d000000000050043500000050010000410000000002000414000000500320009c0000000002018019000000c00120021000000057011001c70000801002000039013b01360000040f000000030700002900000005060000290000000102200190000000f40000613d000000200200008a0000000003260170000000000101043b0000000002000019000000930000613d000000000400036700000000020000190000000005720019000000000554034f000000000505043b000000000051041b00000001011000390000002002200039000000000532004b0000008b0000413d000000000363004b0000009f0000813d0000000303600210000000f80330018f000000010400008a000000000334022f000000000343013f00000000027200190000000002200367000000000202043b000000000232016f000000000021041b000000010100003900000001026002100000000205000029000001320000013d0000000001000416000000000101004b000000f40000c13d00000020010000390000010000100443000001200000044300000051010000410000013c0001042e000000000103004b000000f40000c13d00000000010000190000013c0001042e0000000002000416000000000202004b000000f40000c13d000000040230008a000000200220008c000000f40000413d0000000401100370000000000101043b000000500210009c000000f40000213d0000000000100435000000200000043f00000050010000410000000002000414000000500320009c0000000002018019000000c00120021000000056011001c70000801002000039013b01360000040f0000000102200190000000f40000613d000000000101043b000000000201041a000000010320019000000001042002700000007f0540018f000000000504c0190000001f0450008c00000000040000190000000104002039000000010440018f000000000443004b000000d50000613d0000005a0100004100000000001004350000002201000039000001050000013d000000800050043f000000000303004b000000f60000613d000500000005001d000000000010043500000050010000410000000002000414000000500320009c0000000002018019000000c00120021000000057011001c70000801002000039013b01360000040f0000000102200190000000f40000613d000000a0020000390000000505000029000000000305004b000001080000613d000000000101043b00000000030000190000000002030019000000000301041a000000a004200039000000000034043500000001011000390000002003200039000000000453004b000000ea0000413d000000c001200039000000fc0000013d00000000010000190000013d00010430000001000100008a000000000112016f000000a00010043f000000000105004b000000c001000039000000a0010060390000001f01100039000000200200008a000000000221016f0000005801200041000000590110009c000001080000813d0000005a0100004100000000001004350000004101000039000000040010043f0000005b010000410000013d00010430000000400020043f00000020010000390000000003120436000000800100043d00000000001304350000004003200039000000000401004b000001180000613d00000000040000190000000005340019000000a006400039000000000606043300000000006504350000002004400039000000000514004b000001110000413d000000000331001900000000000304350000005f01100039000000200300008a000000000131016f0000005003000041000000500410009c0000000001038019000000500420009c000000000203801900000040022002100000006001100210000000000121019f0000013c0001042e000000000104004b00000000010000190000012c0000613d00000020016000390000000001100367000000000101043b0000000302400210000000010300008a000000000223022f000000000232013f000000000221016f0000000101400210000000000112019f000000000015041b00000000010000190000013c0001042e00000139002104230000000102000039000000000001042d0000000002000019000000000001042d0000013b000004320000013c0001042e0000013d000104300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffff000000020000000000000000000000000000004000000100000000000000000000000000000000000000000000000000000000000000000000000000063a54080000000000000000000000000000000000000000000000000000000040411086000000000000000000000000000000000000000000000000ffffffffffffffff800000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000400000000000000000000000000200000000000000000000000000000000000020000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffff00000000000000804e487b71000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024000000000000000000000000d2f2c4c81b3a9271642efe790b7997cf0b5e7414f8f22444f7600e3a7f0f4974",
50
+ "linkReferences": {},
51
+ "deployedLinkReferences": {},
52
+ "factoryDeps": {}
53
+ }
package/package.json ADDED
@@ -0,0 +1,103 @@
1
+ {
2
+ "name": "@layerzerolabs/onesig-evm",
3
+ "version": "0.0.1",
4
+ "license": "MIT",
5
+ "exports": {
6
+ ".": {
7
+ "types": "./dist/index.d.ts",
8
+ "import": "./dist/index.mjs",
9
+ "require": "./dist/index.js"
10
+ },
11
+ "./package.json": "./package.json"
12
+ },
13
+ "files": [
14
+ "artifacts/contracts/**/!(*.dbg).json",
15
+ "artifacts-zk/contracts/**/!(*.dbg).json",
16
+ "artifacts-tron/contracts/**/!(*.dbg).json",
17
+ "dist/**/*"
18
+ ],
19
+ "lint-staged": {
20
+ "**/*.{js,ts,tsx,json}": [
21
+ "pnpm prettier --write --ignore-unknown .",
22
+ "pnpm eslint --fix"
23
+ ],
24
+ "**/*.sol": [
25
+ "pnpm prettier --write --ignore-unknown .",
26
+ "pnpm solhint --fix --noPrompt"
27
+ ]
28
+ },
29
+ "devDependencies": {
30
+ "@babel/core": "^7.23.9",
31
+ "@ethersproject/abstract-provider": "^5.7.0",
32
+ "@ethersproject/abstract-signer": "^5.7.0",
33
+ "@layerzerolabs/eslint-config-next": "^3.0.59",
34
+ "@layerzerolabs/hardhat-tron": "^3.0.63",
35
+ "@layerzerolabs/prettier-config-next": "^3.0.59",
36
+ "@layerzerolabs/solhint-config": "^3.0.59",
37
+ "@layerzerolabs/toolbox-foundry": "~0.1.6",
38
+ "@matterlabs/hardhat-zksync-solc": "~1.0.3",
39
+ "@nomicfoundation/hardhat-chai-matchers": "^1.0.6",
40
+ "@nomicfoundation/hardhat-ethers": "^3.0.5",
41
+ "@nomiclabs/hardhat-ethers": "^2.2.3",
42
+ "@openzeppelin/contracts": "5.0.2",
43
+ "@openzeppelin/contracts-upgradeable": "5.0.2",
44
+ "@rushstack/eslint-patch": "^1.7.0",
45
+ "@typechain/ethers-v5": "^10.2.1",
46
+ "@typechain/hardhat": "^6.1.6",
47
+ "@types/chai": "^4.3.11",
48
+ "@types/mocha": "^10.0.6",
49
+ "@types/node": "~18.18.14",
50
+ "chai": "~4.3.10",
51
+ "chai-ethers": "^0.0.1",
52
+ "dotenv": "^16.4.1",
53
+ "eslint": "^8.55.0",
54
+ "eslint-plugin-jest-extended": "~2.0.0",
55
+ "ethers": "^5.7.2",
56
+ "fast-check": "^3.19.0",
57
+ "hardhat": "~2.19.0",
58
+ "hardhat-contract-sizer": "^2.10.0",
59
+ "hardhat-deploy": "^0.12.4",
60
+ "hardhat-deploy-ethers": "^0.4.1",
61
+ "husky": "^8.0.3",
62
+ "keccak256": "^1.0.6",
63
+ "lint-staged": "^15.2.2",
64
+ "merkletreejs": "^0.3.11",
65
+ "mocha": "^10.2.0",
66
+ "p-memoize": "~4.0.4",
67
+ "prettier": "^3.2.5",
68
+ "rimraf": "^5.0.5",
69
+ "solhint": "^5.0.5",
70
+ "solidity-bytes-utils": "^0.8.2",
71
+ "solidity-coverage": "^0.8.12",
72
+ "ts-node": "^10.9.2",
73
+ "tsup": "~8.1.0",
74
+ "typechain": "^8.3.2",
75
+ "typescript": "^5.3.3",
76
+ "zod": "~3.23.8"
77
+ },
78
+ "packageManager": "pnpm@8.14.0",
79
+ "engines": {
80
+ "node": ">=20.10.0"
81
+ },
82
+ "publishConfig": {
83
+ "access": "restricted"
84
+ },
85
+ "scripts": {
86
+ "build": "pnpm forge:build && pnpm hardhat:build && pnpm hardhat:build:tron && pnpm hardhat:build:zk",
87
+ "build:test": "pnpm build && pnpm test",
88
+ "clean": "pnpm clean:prebuild && rimraf cache out artifacts artifacts-zk artifacts-tron typechain-types",
89
+ "clean:prebuild": "rimraf dist",
90
+ "forge:build": "forge build",
91
+ "forge:test": "forge test",
92
+ "format:fix": "pnpm prettier --no-error-on-unmatched-pattern --ignore-unknown -w .",
93
+ "hardhat:build": "pnpm hardhat compile",
94
+ "hardhat:build:tron": "pnpm hardhat compile --network tron",
95
+ "hardhat:build:zk": "pnpm hardhat compile --network zksync",
96
+ "hardhat:test": "pnpm hardhat test",
97
+ "lint": "pnpm run lint:js && pnpm run lint:sol",
98
+ "lint:fix": "eslint --fix '**/*.{js,ts,json}' && prettier --write . && solhint 'contracts/**/*.sol' --fix --noPrompt",
99
+ "lint:js": "eslint '**/*.{js,ts,json}' && prettier --check .",
100
+ "lint:sol": "solhint 'contracts/**/*.sol'",
101
+ "test": "pnpm forge:test && pnpm hardhat:test"
102
+ }
103
+ }