@layerzerolabs/onesig-evm 0.2.90 → 0.2.91
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/package.json +6 -7
- package/dist/index.js +0 -27
- package/dist/index.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@layerzerolabs/onesig-evm",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.91",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "GPL-3.0-only",
|
|
6
6
|
"exports": {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
],
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"ethers": "^5.8.0",
|
|
28
|
-
"@layerzerolabs/onesig-core": "0.2.
|
|
28
|
+
"@layerzerolabs/onesig-core": "0.2.91"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@ethersproject/abstract-provider": "^5.8.0",
|
|
@@ -49,16 +49,15 @@
|
|
|
49
49
|
"solhint": "^6.0.1",
|
|
50
50
|
"solidity-bytes-utils": "^0.8.4",
|
|
51
51
|
"solidity-coverage": "^0.8.12",
|
|
52
|
-
"ts-node": "10.9.2",
|
|
53
52
|
"tsup": "^8.4.0",
|
|
54
53
|
"tsx": "^4.19.3",
|
|
55
54
|
"typechain": "^8.3.2",
|
|
56
55
|
"typescript": "^5.8.2",
|
|
57
56
|
"vitest": "^3.2.3",
|
|
58
|
-
"@layerzerolabs/eslint-configuration": "0.2.
|
|
59
|
-
"@layerzerolabs/tsup-configuration": "0.2.
|
|
60
|
-
"@layerzerolabs/
|
|
61
|
-
"@layerzerolabs/
|
|
57
|
+
"@layerzerolabs/eslint-configuration": "0.2.91",
|
|
58
|
+
"@layerzerolabs/tsup-configuration": "0.2.91",
|
|
59
|
+
"@layerzerolabs/typescript-configuration": "0.2.91",
|
|
60
|
+
"@layerzerolabs/vm-tooling-evm": "0.2.91"
|
|
62
61
|
},
|
|
63
62
|
"publishConfig": {
|
|
64
63
|
"access": "public",
|
package/dist/index.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var ethers = require('ethers');
|
|
4
|
-
|
|
5
|
-
var __defProp = Object.defineProperty;
|
|
6
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
7
|
-
function evmLeafGenerator(leafs) {
|
|
8
|
-
return {
|
|
9
|
-
leafs,
|
|
10
|
-
encodeAddress(address) {
|
|
11
|
-
return Buffer.from(address.substring(2).padStart(64, "0"), "hex");
|
|
12
|
-
},
|
|
13
|
-
encodeCalls(calls) {
|
|
14
|
-
const hexString = ethers.ethers.utils.defaultAbiCoder.encode([
|
|
15
|
-
"tuple(address to, uint256 value, bytes data)[]"
|
|
16
|
-
], [
|
|
17
|
-
calls
|
|
18
|
-
]);
|
|
19
|
-
return Buffer.from(hexString.substring(2), "hex");
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
__name(evmLeafGenerator, "evmLeafGenerator");
|
|
24
|
-
|
|
25
|
-
exports.evmLeafGenerator = evmLeafGenerator;
|
|
26
|
-
//# sourceMappingURL=index.js.map
|
|
27
|
-
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":["evmLeafGenerator","leafs","encodeAddress","address","Buffer","from","substring","padStart","encodeCalls","calls","hexString","ethers","utils","defaultAbiCoder","encode"],"mappings":";;;;;;AAaO,SAASA,iBAAiBC,KAAAA,EAAoB;AACjD,EAAA,OAAO;AACHA,IAAAA,KAAAA;AACAC,IAAAA,aAAAA,CAAcC,OAAAA,EAAO;AACjB,MAAA,OAAOC,MAAAA,CAAOC,IAAAA,CAAKF,OAAAA,CAAQG,SAAAA,CAAU,CAAA,EAAGC,QAAAA,CAAS,EAAA,EAAI,GAAA,CAAA,EAAM,KAAA,CAAA;AAC/D,IAAA,CAAA;AACAC,IAAAA,WAAAA,CAAYC,KAAAA,EAA+B;AACvC,MAAA,MAAMC,SAAAA,GAAYC,aAAAA,CAAOC,KAAAA,CAAMC,eAAAA,CAAgBC,MAAAA,CAC3C;AAAC,QAAA;AACD,OAAA,EAAA;AAACL,QAAAA;AAAM,OAAA,CAAA;AAGX,MAAA,OAAOL,OAAOC,IAAAA,CAAKK,SAAAA,CAAUJ,SAAAA,CAAU,CAAA,GAAI,KAAA,CAAA;AAC/C,IAAA;AACJ,GAAA;AACJ;AAfgBN,MAAAA,CAAAA,gBAAAA,EAAAA,kBAAAA,CAAAA","file":"index.js","sourcesContent":["import type { BigNumber } from 'ethers';\nimport { ethers } from 'ethers';\n\nimport type { GenerateLeafsResult } from '@layerzerolabs/onesig-core';\nimport { type BaseLeafData } from '@layerzerolabs/onesig-core';\n\ninterface ETHTransactionCallData {\n to: string;\n value: BigNumber;\n data: string;\n}\nexport type ETHLeafData = BaseLeafData<string, ETHTransactionCallData>;\n\nexport function evmLeafGenerator(leafs: ETHLeafData[]): GenerateLeafsResult<ETHLeafData> {\n return {\n leafs,\n encodeAddress(address) {\n return Buffer.from(address.substring(2).padStart(64, '0'), 'hex');\n },\n encodeCalls(calls: ETHTransactionCallData[]) {\n const hexString = ethers.utils.defaultAbiCoder.encode(\n ['tuple(address to, uint256 value, bytes data)[]'],\n [calls],\n );\n\n return Buffer.from(hexString.substring(2), 'hex');\n },\n };\n}\n"]}
|