@xyo-network/chain-sdk 1.12.0 → 1.12.2
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/dist/browser/index-browser.mjs +6 -0
- package/dist/browser/index-browser.mjs.map +1 -1
- package/dist/browser/index-node.d.ts +11 -1
- package/dist/browser/index-node.d.ts.map +1 -1
- package/dist/browser/index-shared.d.ts +3 -0
- package/dist/browser/index-shared.d.ts.map +1 -1
- package/dist/neutral/index-node.d.ts +11 -1
- package/dist/neutral/index-node.d.ts.map +1 -1
- package/dist/neutral/index-shared.d.ts +3 -0
- package/dist/neutral/index-shared.d.ts.map +1 -1
- package/dist/neutral/index-shared.mjs +3 -0
- package/dist/neutral/index-shared.mjs.map +1 -1
- package/dist/node/index-node.d.ts +11 -1
- package/dist/node/index-node.d.ts.map +1 -1
- package/dist/node/index-node.mjs +51 -88
- package/dist/node/index-node.mjs.map +1 -1
- package/dist/node/index-shared.d.ts +3 -0
- package/dist/node/index-shared.d.ts.map +1 -1
- package/package.json +33 -34
- package/src/index-node.ts +11 -1
- package/src/index-shared.ts +3 -0
|
@@ -17,19 +17,25 @@ var index_browser_exports = {};
|
|
|
17
17
|
|
|
18
18
|
// src/index-shared.ts
|
|
19
19
|
var index_shared_exports = {};
|
|
20
|
+
__reExport(index_shared_exports, chain_analyze_star);
|
|
20
21
|
__reExport(index_shared_exports, chain_ethereum_star);
|
|
21
22
|
__reExport(index_shared_exports, chain_modules_star);
|
|
23
|
+
__reExport(index_shared_exports, chain_network_model_star);
|
|
22
24
|
__reExport(index_shared_exports, chain_orchestration_star);
|
|
23
25
|
__reExport(index_shared_exports, chain_protocol_star);
|
|
24
26
|
__reExport(index_shared_exports, chain_services_star);
|
|
27
|
+
__reExport(index_shared_exports, chain_telemetry_star);
|
|
25
28
|
__reExport(index_shared_exports, chain_utils_star);
|
|
26
29
|
__reExport(index_shared_exports, chain_validation_star);
|
|
27
30
|
__reExport(index_shared_exports, xl1_protocol_star);
|
|
31
|
+
import * as chain_analyze_star from "@xyo-network/chain-analyze";
|
|
28
32
|
import * as chain_ethereum_star from "@xyo-network/chain-ethereum";
|
|
29
33
|
import * as chain_modules_star from "@xyo-network/chain-modules";
|
|
34
|
+
import * as chain_network_model_star from "@xyo-network/chain-network-model";
|
|
30
35
|
import * as chain_orchestration_star from "@xyo-network/chain-orchestration";
|
|
31
36
|
import * as chain_protocol_star from "@xyo-network/chain-protocol";
|
|
32
37
|
import * as chain_services_star from "@xyo-network/chain-services";
|
|
38
|
+
import * as chain_telemetry_star from "@xyo-network/chain-telemetry";
|
|
33
39
|
import * as chain_utils_star from "@xyo-network/chain-utils";
|
|
34
40
|
import * as chain_validation_star from "@xyo-network/chain-validation";
|
|
35
41
|
import * as xl1_protocol_star from "@xyo-network/xl1-protocol";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index-browser.ts","../../src/index-shared.ts"],"sourcesContent":["export * from './index-shared.ts'\n","export * from '@xyo-network/chain-ethereum'\nexport * from '@xyo-network/chain-modules'\nexport * from '@xyo-network/chain-orchestration'\nexport * from '@xyo-network/chain-protocol'\nexport * from '@xyo-network/chain-services'\nexport * from '@xyo-network/chain-utils'\nexport * from '@xyo-network/chain-validation'\nexport * from '@xyo-network/xl1-protocol'\n"],"mappings":";;;;;;;;;;;;;;;AAAA;;;ACAA;
|
|
1
|
+
{"version":3,"sources":["../../src/index-browser.ts","../../src/index-shared.ts"],"sourcesContent":["export * from './index-shared.ts'\n","export * from '@xyo-network/chain-analyze'\nexport * from '@xyo-network/chain-ethereum'\nexport * from '@xyo-network/chain-modules'\nexport * from '@xyo-network/chain-network-model'\nexport * from '@xyo-network/chain-orchestration'\nexport * from '@xyo-network/chain-protocol'\nexport * from '@xyo-network/chain-services'\nexport * from '@xyo-network/chain-telemetry'\nexport * from '@xyo-network/chain-utils'\nexport * from '@xyo-network/chain-validation'\nexport * from '@xyo-network/xl1-protocol'\n"],"mappings":";;;;;;;;;;;;;;;AAAA;;;ACAA;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAVA,oCAAc;AACd,qCAAc;AACd,oCAAc;AACd,0CAAc;AACd,0CAAc;AACd,qCAAc;AACd,qCAAc;AACd,sCAAc;AACd,kCAAc;AACd,uCAAc;AACd,mCAAc;;;ADVd,kCAAc;","names":[]}
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
-
export * from './index-shared.ts';
|
|
2
1
|
export * from './test/index.ts';
|
|
2
|
+
export * from '@xyo-network/chain-analyze';
|
|
3
|
+
export * from '@xyo-network/chain-ethereum';
|
|
4
|
+
export * from '@xyo-network/chain-modules';
|
|
5
|
+
export * from '@xyo-network/chain-network-model';
|
|
6
|
+
export * from '@xyo-network/chain-orchestration';
|
|
7
|
+
export * from '@xyo-network/chain-protocol';
|
|
8
|
+
export * from '@xyo-network/chain-services';
|
|
9
|
+
export * from '@xyo-network/chain-telemetry';
|
|
10
|
+
export * from '@xyo-network/chain-utils';
|
|
11
|
+
export * from '@xyo-network/chain-validation';
|
|
12
|
+
export * from '@xyo-network/xl1-protocol';
|
|
3
13
|
//# sourceMappingURL=index-node.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-node.d.ts","sourceRoot":"","sources":["../../src/index-node.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index-node.d.ts","sourceRoot":"","sources":["../../src/index-node.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,4BAA4B,CAAA;AAC1C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,kCAAkC,CAAA;AAChD,cAAc,kCAAkC,CAAA;AAChD,cAAc,6BAA6B,CAAA;AAC3C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,8BAA8B,CAAA;AAC5C,cAAc,0BAA0B,CAAA;AACxC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,2BAA2B,CAAA"}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
export * from '@xyo-network/chain-analyze';
|
|
1
2
|
export * from '@xyo-network/chain-ethereum';
|
|
2
3
|
export * from '@xyo-network/chain-modules';
|
|
4
|
+
export * from '@xyo-network/chain-network-model';
|
|
3
5
|
export * from '@xyo-network/chain-orchestration';
|
|
4
6
|
export * from '@xyo-network/chain-protocol';
|
|
5
7
|
export * from '@xyo-network/chain-services';
|
|
8
|
+
export * from '@xyo-network/chain-telemetry';
|
|
6
9
|
export * from '@xyo-network/chain-utils';
|
|
7
10
|
export * from '@xyo-network/chain-validation';
|
|
8
11
|
export * from '@xyo-network/xl1-protocol';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-shared.d.ts","sourceRoot":"","sources":["../../src/index-shared.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAA;AAC3C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,kCAAkC,CAAA;AAChD,cAAc,6BAA6B,CAAA;AAC3C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,0BAA0B,CAAA;AACxC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,2BAA2B,CAAA"}
|
|
1
|
+
{"version":3,"file":"index-shared.d.ts","sourceRoot":"","sources":["../../src/index-shared.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAA;AAC1C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,kCAAkC,CAAA;AAChD,cAAc,kCAAkC,CAAA;AAChD,cAAc,6BAA6B,CAAA;AAC3C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,8BAA8B,CAAA;AAC5C,cAAc,0BAA0B,CAAA;AACxC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,2BAA2B,CAAA"}
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
-
export * from './index-shared.ts';
|
|
2
1
|
export * from './test/index.ts';
|
|
2
|
+
export * from '@xyo-network/chain-analyze';
|
|
3
|
+
export * from '@xyo-network/chain-ethereum';
|
|
4
|
+
export * from '@xyo-network/chain-modules';
|
|
5
|
+
export * from '@xyo-network/chain-network-model';
|
|
6
|
+
export * from '@xyo-network/chain-orchestration';
|
|
7
|
+
export * from '@xyo-network/chain-protocol';
|
|
8
|
+
export * from '@xyo-network/chain-services';
|
|
9
|
+
export * from '@xyo-network/chain-telemetry';
|
|
10
|
+
export * from '@xyo-network/chain-utils';
|
|
11
|
+
export * from '@xyo-network/chain-validation';
|
|
12
|
+
export * from '@xyo-network/xl1-protocol';
|
|
3
13
|
//# sourceMappingURL=index-node.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-node.d.ts","sourceRoot":"","sources":["../../src/index-node.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index-node.d.ts","sourceRoot":"","sources":["../../src/index-node.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,4BAA4B,CAAA;AAC1C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,kCAAkC,CAAA;AAChD,cAAc,kCAAkC,CAAA;AAChD,cAAc,6BAA6B,CAAA;AAC3C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,8BAA8B,CAAA;AAC5C,cAAc,0BAA0B,CAAA;AACxC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,2BAA2B,CAAA"}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
export * from '@xyo-network/chain-analyze';
|
|
1
2
|
export * from '@xyo-network/chain-ethereum';
|
|
2
3
|
export * from '@xyo-network/chain-modules';
|
|
4
|
+
export * from '@xyo-network/chain-network-model';
|
|
3
5
|
export * from '@xyo-network/chain-orchestration';
|
|
4
6
|
export * from '@xyo-network/chain-protocol';
|
|
5
7
|
export * from '@xyo-network/chain-services';
|
|
8
|
+
export * from '@xyo-network/chain-telemetry';
|
|
6
9
|
export * from '@xyo-network/chain-utils';
|
|
7
10
|
export * from '@xyo-network/chain-validation';
|
|
8
11
|
export * from '@xyo-network/xl1-protocol';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-shared.d.ts","sourceRoot":"","sources":["../../src/index-shared.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAA;AAC3C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,kCAAkC,CAAA;AAChD,cAAc,6BAA6B,CAAA;AAC3C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,0BAA0B,CAAA;AACxC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,2BAA2B,CAAA"}
|
|
1
|
+
{"version":3,"file":"index-shared.d.ts","sourceRoot":"","sources":["../../src/index-shared.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAA;AAC1C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,kCAAkC,CAAA;AAChD,cAAc,kCAAkC,CAAA;AAChD,cAAc,6BAA6B,CAAA;AAC3C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,8BAA8B,CAAA;AAC5C,cAAc,0BAA0B,CAAA;AACxC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,2BAA2B,CAAA"}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
// src/index-shared.ts
|
|
2
|
+
export * from "@xyo-network/chain-analyze";
|
|
2
3
|
export * from "@xyo-network/chain-ethereum";
|
|
3
4
|
export * from "@xyo-network/chain-modules";
|
|
5
|
+
export * from "@xyo-network/chain-network-model";
|
|
4
6
|
export * from "@xyo-network/chain-orchestration";
|
|
5
7
|
export * from "@xyo-network/chain-protocol";
|
|
6
8
|
export * from "@xyo-network/chain-services";
|
|
9
|
+
export * from "@xyo-network/chain-telemetry";
|
|
7
10
|
export * from "@xyo-network/chain-utils";
|
|
8
11
|
export * from "@xyo-network/chain-validation";
|
|
9
12
|
export * from "@xyo-network/xl1-protocol";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index-shared.ts"],"sourcesContent":["export * from '@xyo-network/chain-ethereum'\nexport * from '@xyo-network/chain-modules'\nexport * from '@xyo-network/chain-orchestration'\nexport * from '@xyo-network/chain-protocol'\nexport * from '@xyo-network/chain-services'\nexport * from '@xyo-network/chain-utils'\nexport * from '@xyo-network/chain-validation'\nexport * from '@xyo-network/xl1-protocol'\n"],"mappings":";AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/index-shared.ts"],"sourcesContent":["export * from '@xyo-network/chain-analyze'\nexport * from '@xyo-network/chain-ethereum'\nexport * from '@xyo-network/chain-modules'\nexport * from '@xyo-network/chain-network-model'\nexport * from '@xyo-network/chain-orchestration'\nexport * from '@xyo-network/chain-protocol'\nexport * from '@xyo-network/chain-services'\nexport * from '@xyo-network/chain-telemetry'\nexport * from '@xyo-network/chain-utils'\nexport * from '@xyo-network/chain-validation'\nexport * from '@xyo-network/xl1-protocol'\n"],"mappings":";AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
-
export * from './index-shared.ts';
|
|
2
1
|
export * from './test/index.ts';
|
|
2
|
+
export * from '@xyo-network/chain-analyze';
|
|
3
|
+
export * from '@xyo-network/chain-ethereum';
|
|
4
|
+
export * from '@xyo-network/chain-modules';
|
|
5
|
+
export * from '@xyo-network/chain-network-model';
|
|
6
|
+
export * from '@xyo-network/chain-orchestration';
|
|
7
|
+
export * from '@xyo-network/chain-protocol';
|
|
8
|
+
export * from '@xyo-network/chain-services';
|
|
9
|
+
export * from '@xyo-network/chain-telemetry';
|
|
10
|
+
export * from '@xyo-network/chain-utils';
|
|
11
|
+
export * from '@xyo-network/chain-validation';
|
|
12
|
+
export * from '@xyo-network/xl1-protocol';
|
|
3
13
|
//# sourceMappingURL=index-node.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-node.d.ts","sourceRoot":"","sources":["../../src/index-node.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index-node.d.ts","sourceRoot":"","sources":["../../src/index-node.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,4BAA4B,CAAA;AAC1C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,kCAAkC,CAAA;AAChD,cAAc,kCAAkC,CAAA;AAChD,cAAc,6BAA6B,CAAA;AAC3C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,8BAA8B,CAAA;AAC5C,cAAc,0BAA0B,CAAA;AACxC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,2BAA2B,CAAA"}
|
package/dist/node/index-node.mjs
CHANGED
|
@@ -1,54 +1,5 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
18
|
-
|
|
19
|
-
// src/index-node.ts
|
|
20
|
-
var index_node_exports = {};
|
|
21
|
-
__export(index_node_exports, {
|
|
22
|
-
approveTestStakeChainAddress: () => approveTestStakeChainAddress,
|
|
23
|
-
createTestChainContract: () => createTestChainContract,
|
|
24
|
-
createTestErc20: () => createTestErc20,
|
|
25
|
-
createTestGenesisBlock: () => createTestGenesisBlock,
|
|
26
|
-
startGanache: () => startGanache,
|
|
27
|
-
stopGanache: () => stopGanache,
|
|
28
|
-
transferTestTokens: () => transferTestTokens
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
// src/index-shared.ts
|
|
32
|
-
var index_shared_exports = {};
|
|
33
|
-
__reExport(index_shared_exports, chain_ethereum_star);
|
|
34
|
-
__reExport(index_shared_exports, chain_modules_star);
|
|
35
|
-
__reExport(index_shared_exports, chain_orchestration_star);
|
|
36
|
-
__reExport(index_shared_exports, chain_protocol_star);
|
|
37
|
-
__reExport(index_shared_exports, chain_services_star);
|
|
38
|
-
__reExport(index_shared_exports, chain_utils_star);
|
|
39
|
-
__reExport(index_shared_exports, chain_validation_star);
|
|
40
|
-
__reExport(index_shared_exports, xl1_protocol_star);
|
|
41
|
-
import * as chain_ethereum_star from "@xyo-network/chain-ethereum";
|
|
42
|
-
import * as chain_modules_star from "@xyo-network/chain-modules";
|
|
43
|
-
import * as chain_orchestration_star from "@xyo-network/chain-orchestration";
|
|
44
|
-
import * as chain_protocol_star from "@xyo-network/chain-protocol";
|
|
45
|
-
import * as chain_services_star from "@xyo-network/chain-services";
|
|
46
|
-
import * as chain_utils_star from "@xyo-network/chain-utils";
|
|
47
|
-
import * as chain_validation_star from "@xyo-network/chain-validation";
|
|
48
|
-
import * as xl1_protocol_star from "@xyo-network/xl1-protocol";
|
|
49
|
-
|
|
50
|
-
// src/index-node.ts
|
|
51
|
-
__reExport(index_node_exports, index_shared_exports);
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
52
3
|
|
|
53
4
|
// src/test/evm/runGanache.ts
|
|
54
5
|
import { spawn } from "child_process";
|
|
@@ -63,18 +14,26 @@ async function isGanacheRunning(url) {
|
|
|
63
14
|
return false;
|
|
64
15
|
}
|
|
65
16
|
}
|
|
17
|
+
__name(isGanacheRunning, "isGanacheRunning");
|
|
66
18
|
async function startGanache(port, mnemonic) {
|
|
67
19
|
console.log("Starting Ganache CLI...");
|
|
68
|
-
const ganacheProcess = spawn(
|
|
69
|
-
"
|
|
70
|
-
|
|
71
|
-
{
|
|
72
|
-
|
|
20
|
+
const ganacheProcess = spawn("yarn", [
|
|
21
|
+
"ganache",
|
|
22
|
+
"--port",
|
|
23
|
+
`${port}`,
|
|
24
|
+
"--chain.chainId",
|
|
25
|
+
"1337",
|
|
26
|
+
"--mnemonic",
|
|
27
|
+
mnemonic
|
|
28
|
+
], {
|
|
29
|
+
stdio: "inherit"
|
|
30
|
+
});
|
|
73
31
|
while (!await isGanacheRunning(`http://127.0.0.1:${port}`)) {
|
|
74
32
|
await delay(500);
|
|
75
33
|
}
|
|
76
34
|
return ganacheProcess;
|
|
77
35
|
}
|
|
36
|
+
__name(startGanache, "startGanache");
|
|
78
37
|
function stopGanache(process) {
|
|
79
38
|
console.log("Stopping Ganache CLI...");
|
|
80
39
|
if (process) {
|
|
@@ -82,6 +41,7 @@ function stopGanache(process) {
|
|
|
82
41
|
console.log("Ganache CLI stopped.");
|
|
83
42
|
}
|
|
84
43
|
}
|
|
44
|
+
__name(stopGanache, "stopGanache");
|
|
85
45
|
|
|
86
46
|
// src/test/evm/stakingContractUtils.ts
|
|
87
47
|
import { assertEx } from "@xylabs/assert";
|
|
@@ -97,14 +57,13 @@ import { getAddress } from "ethers/address";
|
|
|
97
57
|
import { JsonRpcProvider as JsonRpcProvider2 } from "ethers/providers";
|
|
98
58
|
import { parseUnits } from "ethers/utils";
|
|
99
59
|
import { Wallet } from "ethers/wallet";
|
|
100
|
-
var gasConfig = () => {
|
|
60
|
+
var gasConfig = /* @__PURE__ */ __name(() => {
|
|
101
61
|
return {
|
|
102
62
|
gasLimit: 2e6,
|
|
103
|
-
// Set the gas limit
|
|
104
63
|
gasPrice: parseUnits("100", "gwei")
|
|
105
64
|
};
|
|
106
|
-
};
|
|
107
|
-
var createTestErc20 = async (ganachePort, testPhrase, contractCreator) => {
|
|
65
|
+
}, "gasConfig");
|
|
66
|
+
var createTestErc20 = /* @__PURE__ */ __name(async (ganachePort, testPhrase, contractCreator) => {
|
|
108
67
|
const provider = new JsonRpcProvider2(`http://127.0.0.1:${ganachePort}`, 1337);
|
|
109
68
|
const ethWallet = new Wallet(contractCreator.privateKey, provider);
|
|
110
69
|
const erc20 = new Erc20Factory(ethWallet);
|
|
@@ -115,8 +74,8 @@ var createTestErc20 = async (ganachePort, testPhrase, contractCreator) => {
|
|
|
115
74
|
const balance = await erc20ContractPerson0.balanceOf(ethWallet.address);
|
|
116
75
|
assertEx(balance === totalSupply, () => "Balance does not match total supply");
|
|
117
76
|
return assertEx(asAddress(erc20Address), () => "Invalid ERC20 contract address");
|
|
118
|
-
};
|
|
119
|
-
var transferTestTokens = async (ganachePort, erc20Address, account0, account1) => {
|
|
77
|
+
}, "createTestErc20");
|
|
78
|
+
var transferTestTokens = /* @__PURE__ */ __name(async (ganachePort, erc20Address, account0, account1) => {
|
|
120
79
|
const provider0 = new JsonRpcProvider2(`http://127.0.0.1:${ganachePort}`, 1337);
|
|
121
80
|
const ethWalletPerson0 = new Wallet(account0.privateKey, provider0);
|
|
122
81
|
const provider1 = new JsonRpcProvider2(`http://127.0.0.1:${ganachePort}`, 1337);
|
|
@@ -127,51 +86,55 @@ var transferTestTokens = async (ganachePort, erc20Address, account0, account1) =
|
|
|
127
86
|
const erc20ContractPerson1 = Erc20Factory.connect(getAddress(erc20Address), ethWalletPerson1);
|
|
128
87
|
const balance = await erc20ContractPerson1.balanceOf(ethWalletPerson1.address);
|
|
129
88
|
assertEx(balance === transferAmount, () => "Balance does not match transfer amount");
|
|
130
|
-
};
|
|
131
|
-
var createTestChainContract = async (ganachePort, erc20Address, account0, initialProducer) => {
|
|
89
|
+
}, "transferTestTokens");
|
|
90
|
+
var createTestChainContract = /* @__PURE__ */ __name(async (ganachePort, erc20Address, account0, initialProducer) => {
|
|
132
91
|
const provider0 = new JsonRpcProvider2(`http://127.0.0.1:${ganachePort}`, 1337);
|
|
133
92
|
const ethWalletPerson0 = new Wallet(account0.privateKey, provider0);
|
|
134
|
-
const [xyoChainContractAddress] = await createChain(
|
|
135
|
-
ethWalletPerson0,
|
|
136
|
-
erc20Address,
|
|
137
|
-
initialProducer,
|
|
138
|
-
XYO_ZERO_ADDRESS,
|
|
139
|
-
0n,
|
|
140
|
-
XYO_ZERO_ADDRESS,
|
|
141
|
-
50000n,
|
|
142
|
-
gasConfig()
|
|
143
|
-
);
|
|
93
|
+
const [xyoChainContractAddress] = await createChain(ethWalletPerson0, erc20Address, initialProducer, XYO_ZERO_ADDRESS, 0n, XYO_ZERO_ADDRESS, 50000n, gasConfig());
|
|
144
94
|
return assertEx(asAddress(xyoChainContractAddress), () => "Invalid staking contract address");
|
|
145
|
-
};
|
|
146
|
-
var approveTestStakeChainAddress = async (ganachePort, erc20Address, xyoChainContractAddress, account1) => {
|
|
95
|
+
}, "createTestChainContract");
|
|
96
|
+
var approveTestStakeChainAddress = /* @__PURE__ */ __name(async (ganachePort, erc20Address, xyoChainContractAddress, account1) => {
|
|
147
97
|
const provider1 = new JsonRpcProvider2(`http://127.0.0.1:${ganachePort}`, 1337);
|
|
148
98
|
const ethWalletPerson1 = new Wallet(account1.privateKey, provider1);
|
|
149
99
|
const erc20ContractPerson1 = Erc20Factory.connect(getAddress(erc20Address), ethWalletPerson1);
|
|
150
100
|
const _approveResultTx = await (await erc20ContractPerson1.approve(getAddress(xyoChainContractAddress), parseUnits("100", 18), gasConfig())).wait();
|
|
151
|
-
};
|
|
152
|
-
var createTestGenesisBlock = async (blockProducerAccounts) => {
|
|
101
|
+
}, "approveTestStakeChainAddress");
|
|
102
|
+
var createTestGenesisBlock = /* @__PURE__ */ __name(async (blockProducerAccounts) => {
|
|
153
103
|
const randomChainId = (await Account.random()).address;
|
|
154
104
|
const signedStakedBlockProducerIntents = await Promise.all(blockProducerAccounts.map(async (blockProducerAccount) => {
|
|
155
|
-
const stakeIntent = new PayloadBuilder({
|
|
105
|
+
const stakeIntent = new PayloadBuilder({
|
|
106
|
+
schema: ChainStakeIntentSchema
|
|
107
|
+
}).fields({
|
|
156
108
|
from: blockProducerAccount.address,
|
|
157
109
|
exp: Number.MAX_SAFE_INTEGER,
|
|
158
110
|
nbf: 0,
|
|
159
111
|
intent: "producer"
|
|
160
112
|
}).build();
|
|
161
|
-
const signedStakedBlockProducerIntent = await buildTransaction(
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
[],
|
|
165
|
-
blockProducerAccount,
|
|
166
|
-
0,
|
|
167
|
-
1e3
|
|
168
|
-
);
|
|
113
|
+
const signedStakedBlockProducerIntent = await buildTransaction(randomChainId, [
|
|
114
|
+
stakeIntent
|
|
115
|
+
], [], blockProducerAccount, 0, 1e3);
|
|
169
116
|
return signedStakedBlockProducerIntent;
|
|
170
117
|
}));
|
|
171
118
|
const intents = signedStakedBlockProducerIntents.map((intent) => intent[0]);
|
|
172
119
|
const payloads = signedStakedBlockProducerIntents.flatMap((intent) => intent[1]);
|
|
173
|
-
return await buildGenesisBlock(randomChainId, signedStakedBlockProducerIntents, [
|
|
174
|
-
|
|
120
|
+
return await buildGenesisBlock(randomChainId, signedStakedBlockProducerIntents, [
|
|
121
|
+
...intents,
|
|
122
|
+
...payloads
|
|
123
|
+
], blockProducerAccounts);
|
|
124
|
+
}, "createTestGenesisBlock");
|
|
125
|
+
|
|
126
|
+
// src/index-node.ts
|
|
127
|
+
export * from "@xyo-network/chain-analyze";
|
|
128
|
+
export * from "@xyo-network/chain-ethereum";
|
|
129
|
+
export * from "@xyo-network/chain-modules";
|
|
130
|
+
export * from "@xyo-network/chain-network-model";
|
|
131
|
+
export * from "@xyo-network/chain-orchestration";
|
|
132
|
+
export * from "@xyo-network/chain-protocol";
|
|
133
|
+
export * from "@xyo-network/chain-services";
|
|
134
|
+
export * from "@xyo-network/chain-telemetry";
|
|
135
|
+
export * from "@xyo-network/chain-utils";
|
|
136
|
+
export * from "@xyo-network/chain-validation";
|
|
137
|
+
export * from "@xyo-network/xl1-protocol";
|
|
175
138
|
export {
|
|
176
139
|
approveTestStakeChainAddress,
|
|
177
140
|
createTestChainContract,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index-node.ts","../../src/index-shared.ts","../../src/test/evm/runGanache.ts","../../src/test/evm/stakingContractUtils.ts"],"sourcesContent":["export * from './index-shared.ts'\nexport * from './test/index.ts'\n","export * from '@xyo-network/chain-ethereum'\nexport * from '@xyo-network/chain-modules'\nexport * from '@xyo-network/chain-orchestration'\nexport * from '@xyo-network/chain-protocol'\nexport * from '@xyo-network/chain-services'\nexport * from '@xyo-network/chain-utils'\nexport * from '@xyo-network/chain-validation'\nexport * from '@xyo-network/xl1-protocol'\n","import type { ChildProcess } from 'node:child_process'\nimport { spawn } from 'node:child_process'\n\nimport { delay } from '@xylabs/delay'\nimport { JsonRpcProvider } from 'ethers/providers'\n\nasync function isGanacheRunning(url: string) {\n try {\n const provider = new JsonRpcProvider(url)\n await provider.getBlockNumber() // Try to fetch the latest block number\n return true // If this succeeds, the server is running\n } catch {\n return false // If this fails, the server is not running\n }\n}\n\nexport async function startGanache(port: number, mnemonic: string) {\n console.log('Starting Ganache CLI...')\n\n // Start Ganache CLI\n const ganacheProcess = spawn(\n 'yarn',\n ['ganache', '--port', `${port}`, '--chain.chainId', '1337', '--mnemonic', mnemonic],\n { stdio: 'inherit' },\n )\n\n // Wait for Ganache to be ready\n while (!await isGanacheRunning(`http://127.0.0.1:${port}`)) {\n await delay(500)\n }\n\n return ganacheProcess\n}\n\nexport function stopGanache(process?: ChildProcess | undefined) {\n console.log('Stopping Ganache CLI...')\n if (process) {\n process.kill('SIGTERM')\n console.log('Ganache CLI stopped.')\n }\n}\n","import { assertEx } from '@xylabs/assert'\nimport type { Address } from '@xylabs/hex'\nimport { asAddress } from '@xylabs/hex'\nimport { Account } from '@xyo-network/account'\nimport type { AccountInstance } from '@xyo-network/account-model'\nimport { createChain } from '@xyo-network/chain-ethereum'\nimport { buildGenesisBlock } from '@xyo-network/chain-protocol'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport type { WithStorageMeta } from '@xyo-network/payload-model'\nimport { BurnableErc20__factory as Erc20Factory } from '@xyo-network/typechain'\nimport type { WalletInstance } from '@xyo-network/wallet-model'\nimport type { ChainStakeIntent, HydratedBlock } from '@xyo-network/xl1-protocol'\nimport { ChainStakeIntentSchema, XYO_ZERO_ADDRESS } from '@xyo-network/xl1-protocol'\nimport { buildTransaction } from '@xyo-network/xl1-protocol-sdk'\nimport { getAddress } from 'ethers/address'\nimport { JsonRpcProvider } from 'ethers/providers'\nimport { parseUnits } from 'ethers/utils'\nimport { Wallet } from 'ethers/wallet'\n\nconst gasConfig = () => {\n return {\n gasLimit: 2_000_000, // Set the gas limit\n gasPrice: parseUnits('100', 'gwei'),\n }\n}\n\nexport const createTestErc20 = async (ganachePort: number, testPhrase: string, contractCreator: WalletInstance): Promise<Address> => {\n const provider = new JsonRpcProvider(`http://127.0.0.1:${ganachePort}`, 1337)\n const ethWallet = new Wallet(contractCreator.privateKey, provider)\n const erc20 = new Erc20Factory(ethWallet)\n const totalSupply = parseUnits('1000000', 18)\n const erc20Contract = await (await erc20.deploy('Test Token', 'TST', totalSupply, gasConfig())).waitForDeployment()\n const erc20Address = await erc20Contract.getAddress()\n const erc20ContractPerson0 = Erc20Factory.connect(erc20Address, ethWallet)\n const balance = await erc20ContractPerson0.balanceOf(ethWallet.address)\n assertEx(balance === totalSupply, () => 'Balance does not match total supply')\n return assertEx(asAddress(erc20Address), () => 'Invalid ERC20 contract address')\n}\n\nexport const transferTestTokens = async (ganachePort: number, erc20Address: Address, account0: WalletInstance, account1: WalletInstance) => {\n const provider0 = new JsonRpcProvider(`http://127.0.0.1:${ganachePort}`, 1337)\n const ethWalletPerson0 = new Wallet(account0.privateKey, provider0)\n const provider1 = new JsonRpcProvider(`http://127.0.0.1:${ganachePort}`, 1337)\n const ethWalletPerson1 = new Wallet(account1.privateKey, provider1)\n const erc20ContractPerson0 = Erc20Factory.connect(getAddress(erc20Address), ethWalletPerson0)\n const transferAmount = parseUnits('1000', 18)\n await (await erc20ContractPerson0.transfer(ethWalletPerson1.address, transferAmount, gasConfig())).wait()\n const erc20ContractPerson1 = Erc20Factory.connect(getAddress(erc20Address), ethWalletPerson1)\n const balance = await erc20ContractPerson1.balanceOf(ethWalletPerson1.address)\n assertEx(balance === transferAmount, () => 'Balance does not match transfer amount')\n}\n\nexport const createTestChainContract = async (\n ganachePort: number,\n erc20Address: Address,\n account0: WalletInstance,\n initialProducer: AccountInstance,\n): Promise<Address> => {\n const provider0 = new JsonRpcProvider(`http://127.0.0.1:${ganachePort}`, 1337)\n const ethWalletPerson0 = new Wallet(account0.privateKey, provider0)\n const [xyoChainContractAddress] = await createChain(\n ethWalletPerson0,\n erc20Address,\n initialProducer,\n XYO_ZERO_ADDRESS,\n 0n,\n XYO_ZERO_ADDRESS,\n 50_000n,\n gasConfig(),\n )\n return assertEx(asAddress(xyoChainContractAddress), () => 'Invalid staking contract address')\n}\n\nexport const approveTestStakeChainAddress = async (ganachePort: number, erc20Address: Address, xyoChainContractAddress: Address, account1: WalletInstance) => {\n const provider1 = new JsonRpcProvider(`http://127.0.0.1:${ganachePort}`, 1337)\n const ethWalletPerson1 = new Wallet(account1.privateKey, provider1)\n const erc20ContractPerson1 = Erc20Factory.connect(getAddress(erc20Address), ethWalletPerson1)\n\n const _approveResultTx = await (await erc20ContractPerson1.approve(getAddress(xyoChainContractAddress), parseUnits('100', 18), gasConfig())).wait()\n}\n\nexport const createTestGenesisBlock = async (\n blockProducerAccounts: WalletInstance[],\n): Promise<HydratedBlock> => {\n const randomChainId = (await Account.random()).address\n // Create staked intents for all the block producers declaring their intent to produce blocks\n const signedStakedBlockProducerIntents = await Promise.all(blockProducerAccounts.map(async (blockProducerAccount) => {\n const stakeIntent = new PayloadBuilder<ChainStakeIntent>({ schema: ChainStakeIntentSchema }).fields({\n from: blockProducerAccount.address,\n exp: Number.MAX_SAFE_INTEGER,\n nbf: 0,\n intent: 'producer',\n })\n .build()\n\n const signedStakedBlockProducerIntent = await buildTransaction(\n randomChainId,\n [stakeIntent],\n [],\n blockProducerAccount,\n 0,\n 1000,\n )\n return signedStakedBlockProducerIntent\n }))\n const intents = signedStakedBlockProducerIntents.map(intent => intent[0])\n const payloads = signedStakedBlockProducerIntents.flatMap(intent => intent[1]) as WithStorageMeta<ChainStakeIntent>[]\n return await buildGenesisBlock(randomChainId, signedStakedBlockProducerIntents, [...intents, ...payloads], blockProducerAccounts)\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAPA,qCAAc;AACd,oCAAc;AACd,0CAAc;AACd,qCAAc;AACd,qCAAc;AACd,kCAAc;AACd,uCAAc;AACd,mCAAc;;;ADPd,+BAAc;;;AECd,SAAS,aAAa;AAEtB,SAAS,aAAa;AACtB,SAAS,uBAAuB;AAEhC,eAAe,iBAAiB,KAAa;AAC3C,MAAI;AACF,UAAM,WAAW,IAAI,gBAAgB,GAAG;AACxC,UAAM,SAAS,eAAe;AAC9B,WAAO;AAAA,EACT,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAEA,eAAsB,aAAa,MAAc,UAAkB;AACjE,UAAQ,IAAI,yBAAyB;AAGrC,QAAM,iBAAiB;AAAA,IACrB;AAAA,IACA,CAAC,WAAW,UAAU,GAAG,IAAI,IAAI,mBAAmB,QAAQ,cAAc,QAAQ;AA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AG,gBAAgB;AAE5F,QAAM,mBAAmB,OAAO,MAAM,qBAAqB,QAAQ,WAAW,uBAAuB,GAAG,WAAW,OAAO,EAAE,GAAG,UAAU,CAAC,GAAG,KAAK;AACpJ;AAEO,IAAM,yBAAyB,OACpC,0BAC2B;AAC3B,QAAM,iBAAiB,MAAM,QAAQ,OAAO,GAAG;AAE/C,QAAM,mCAAmC,MAAM,QAAQ,IAAI,sBAAsB,IAAI,OAAO,yBAAyB;AACnH,UAAM,cAAc,IAAI,eAAiC,EAAE,QAAQ,uBAAuB,CAAC,EAAE,OAAO;AAAA,MAClG,MAAM,qBAAqB;AAAA,MAC3B,KAAK,OAAO;AAAA,MACZ,KAAK;AAAA,MACL,QAAQ;AAAA,IACV,CAAC,EACE,MAAM;AAET,UAAM,kCAAkC,MAAM;AAAA,MAC5C;AAAA,MACA,CAAC,WAAW;AAAA,MACZ,CAAC;AAAA,MACD;AAAA,MACA;AAAA,MACA;AAAA,IACF;AACA,WAAO;AAAA,EACT,CAAC,CAAC;AACF,QAAM,UAAU,iCAAiC,IAAI,YAAU,OAAO,CAAC,CAAC;AACxE,QAAM,WAAW,iCAAiC,QAAQ,YAAU,OAAO,CAAC,CAAC;AAC7E,SAAO,MAAM,kBAAkB,eAAe,kCAAkC,CAAC,GAAG,SAAS,GAAG,QAAQ,GAAG,qBAAqB;AAClI;","names":["JsonRpcProvider"]}
|
|
1
|
+
{"version":3,"sources":["../../src/test/evm/runGanache.ts","../../src/test/evm/stakingContractUtils.ts","../../src/index-node.ts"],"sourcesContent":["import type { ChildProcess } from 'node:child_process'\nimport { spawn } from 'node:child_process'\n\nimport { delay } from '@xylabs/delay'\nimport { JsonRpcProvider } from 'ethers/providers'\n\nasync function isGanacheRunning(url: string) {\n try {\n const provider = new JsonRpcProvider(url)\n await provider.getBlockNumber() // Try to fetch the latest block number\n return true // If this succeeds, the server is running\n } catch {\n return false // If this fails, the server is not running\n }\n}\n\nexport async function startGanache(port: number, mnemonic: string) {\n console.log('Starting Ganache CLI...')\n\n // Start Ganache CLI\n const ganacheProcess = spawn(\n 'yarn',\n ['ganache', '--port', `${port}`, '--chain.chainId', '1337', '--mnemonic', mnemonic],\n { stdio: 'inherit' },\n )\n\n // Wait for Ganache to be ready\n while (!await isGanacheRunning(`http://127.0.0.1:${port}`)) {\n await delay(500)\n }\n\n return ganacheProcess\n}\n\nexport function stopGanache(process?: ChildProcess | undefined) {\n console.log('Stopping Ganache CLI...')\n if (process) {\n process.kill('SIGTERM')\n console.log('Ganache CLI stopped.')\n }\n}\n","import { assertEx } from '@xylabs/assert'\nimport type { Address } from '@xylabs/hex'\nimport { asAddress } from '@xylabs/hex'\nimport { Account } from '@xyo-network/account'\nimport type { AccountInstance } from '@xyo-network/account-model'\nimport { createChain } from '@xyo-network/chain-ethereum'\nimport { buildGenesisBlock } from '@xyo-network/chain-protocol'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport type { WithStorageMeta } from '@xyo-network/payload-model'\nimport { BurnableErc20__factory as Erc20Factory } from '@xyo-network/typechain'\nimport type { WalletInstance } from '@xyo-network/wallet-model'\nimport type { ChainStakeIntent, HydratedBlock } from '@xyo-network/xl1-protocol'\nimport { ChainStakeIntentSchema, XYO_ZERO_ADDRESS } from '@xyo-network/xl1-protocol'\nimport { buildTransaction } from '@xyo-network/xl1-protocol-sdk'\nimport { getAddress } from 'ethers/address'\nimport { JsonRpcProvider } from 'ethers/providers'\nimport { parseUnits } from 'ethers/utils'\nimport { Wallet } from 'ethers/wallet'\n\nconst gasConfig = () => {\n return {\n gasLimit: 2_000_000, // Set the gas limit\n gasPrice: parseUnits('100', 'gwei'),\n }\n}\n\nexport const createTestErc20 = async (ganachePort: number, testPhrase: string, contractCreator: WalletInstance): Promise<Address> => {\n const provider = new JsonRpcProvider(`http://127.0.0.1:${ganachePort}`, 1337)\n const ethWallet = new Wallet(contractCreator.privateKey, provider)\n const erc20 = new Erc20Factory(ethWallet)\n const totalSupply = parseUnits('1000000', 18)\n const erc20Contract = await (await erc20.deploy('Test Token', 'TST', totalSupply, gasConfig())).waitForDeployment()\n const erc20Address = await erc20Contract.getAddress()\n const erc20ContractPerson0 = Erc20Factory.connect(erc20Address, ethWallet)\n const balance = await erc20ContractPerson0.balanceOf(ethWallet.address)\n assertEx(balance === totalSupply, () => 'Balance does not match total supply')\n return assertEx(asAddress(erc20Address), () => 'Invalid ERC20 contract address')\n}\n\nexport const transferTestTokens = async (ganachePort: number, erc20Address: Address, account0: WalletInstance, account1: WalletInstance) => {\n const provider0 = new JsonRpcProvider(`http://127.0.0.1:${ganachePort}`, 1337)\n const ethWalletPerson0 = new Wallet(account0.privateKey, provider0)\n const provider1 = new JsonRpcProvider(`http://127.0.0.1:${ganachePort}`, 1337)\n const ethWalletPerson1 = new Wallet(account1.privateKey, provider1)\n const erc20ContractPerson0 = Erc20Factory.connect(getAddress(erc20Address), ethWalletPerson0)\n const transferAmount = parseUnits('1000', 18)\n await (await erc20ContractPerson0.transfer(ethWalletPerson1.address, transferAmount, gasConfig())).wait()\n const erc20ContractPerson1 = Erc20Factory.connect(getAddress(erc20Address), ethWalletPerson1)\n const balance = await erc20ContractPerson1.balanceOf(ethWalletPerson1.address)\n assertEx(balance === transferAmount, () => 'Balance does not match transfer amount')\n}\n\nexport const createTestChainContract = async (\n ganachePort: number,\n erc20Address: Address,\n account0: WalletInstance,\n initialProducer: AccountInstance,\n): Promise<Address> => {\n const provider0 = new JsonRpcProvider(`http://127.0.0.1:${ganachePort}`, 1337)\n const ethWalletPerson0 = new Wallet(account0.privateKey, provider0)\n const [xyoChainContractAddress] = await createChain(\n ethWalletPerson0,\n erc20Address,\n initialProducer,\n XYO_ZERO_ADDRESS,\n 0n,\n XYO_ZERO_ADDRESS,\n 50_000n,\n gasConfig(),\n )\n return assertEx(asAddress(xyoChainContractAddress), () => 'Invalid staking contract address')\n}\n\nexport const approveTestStakeChainAddress = async (ganachePort: number, erc20Address: Address, xyoChainContractAddress: Address, account1: WalletInstance) => {\n const provider1 = new JsonRpcProvider(`http://127.0.0.1:${ganachePort}`, 1337)\n const ethWalletPerson1 = new Wallet(account1.privateKey, provider1)\n const erc20ContractPerson1 = Erc20Factory.connect(getAddress(erc20Address), ethWalletPerson1)\n\n const _approveResultTx = await (await erc20ContractPerson1.approve(getAddress(xyoChainContractAddress), parseUnits('100', 18), gasConfig())).wait()\n}\n\nexport const createTestGenesisBlock = async (\n blockProducerAccounts: WalletInstance[],\n): Promise<HydratedBlock> => {\n const randomChainId = (await Account.random()).address\n // Create staked intents for all the block producers declaring their intent to produce blocks\n const signedStakedBlockProducerIntents = await Promise.all(blockProducerAccounts.map(async (blockProducerAccount) => {\n const stakeIntent = new PayloadBuilder<ChainStakeIntent>({ schema: ChainStakeIntentSchema }).fields({\n from: blockProducerAccount.address,\n exp: Number.MAX_SAFE_INTEGER,\n nbf: 0,\n intent: 'producer',\n })\n .build()\n\n const signedStakedBlockProducerIntent = await buildTransaction(\n randomChainId,\n [stakeIntent],\n [],\n blockProducerAccount,\n 0,\n 1000,\n )\n return signedStakedBlockProducerIntent\n }))\n const intents = signedStakedBlockProducerIntents.map(intent => intent[0])\n const payloads = signedStakedBlockProducerIntents.flatMap(intent => intent[1]) as WithStorageMeta<ChainStakeIntent>[]\n return await buildGenesisBlock(randomChainId, signedStakedBlockProducerIntents, [...intents, ...payloads], blockProducerAccounts)\n}\n","export * from './test/index.ts'\nexport * from '@xyo-network/chain-analyze'\nexport * from '@xyo-network/chain-ethereum'\nexport * from '@xyo-network/chain-modules'\nexport * from '@xyo-network/chain-network-model'\nexport * from '@xyo-network/chain-orchestration'\nexport * from '@xyo-network/chain-protocol'\nexport * from '@xyo-network/chain-services'\nexport * from '@xyo-network/chain-telemetry'\nexport * from '@xyo-network/chain-utils'\nexport * from '@xyo-network/chain-validation'\nexport * from '@xyo-network/xl1-protocol'\n"],"mappings":";;;;AACA,SAASA,aAAa;AAEtB,SAASC,aAAa;AACtB,SAASC,uBAAuB;AAEhC,eAAeC,iBAAiBC,KAAW;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O,CAAA,CAAE;AAC7E,SAAO,MAAMO,kBAAkBzB,eAAeG,kCAAkC;OAAImB;OAAYC;KAAWxB,qBAAAA;AAC7G,GA3BsC;;;AChFtC,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;","names":["spawn","delay","JsonRpcProvider","isGanacheRunning","url","provider","JsonRpcProvider","getBlockNumber","startGanache","port","mnemonic","console","log","ganacheProcess","spawn","stdio","delay","stopGanache","process","kill","assertEx","asAddress","Account","createChain","buildGenesisBlock","PayloadBuilder","BurnableErc20__factory","Erc20Factory","ChainStakeIntentSchema","XYO_ZERO_ADDRESS","buildTransaction","getAddress","JsonRpcProvider","parseUnits","Wallet","gasConfig","gasLimit","gasPrice","parseUnits","createTestErc20","ganachePort","testPhrase","contractCreator","provider","JsonRpcProvider","ethWallet","Wallet","privateKey","erc20","Erc20Factory","totalSupply","erc20Contract","deploy","waitForDeployment","erc20Address","getAddress","erc20ContractPerson0","connect","balance","balanceOf","address","assertEx","asAddress","transferTestTokens","account0","account1","provider0","ethWalletPerson0","provider1","ethWalletPerson1","transferAmount","transfer","wait","erc20ContractPerson1","createTestChainContract","initialProducer","xyoChainContractAddress","createChain","XYO_ZERO_ADDRESS","approveTestStakeChainAddress","_approveResultTx","approve","createTestGenesisBlock","blockProducerAccounts","randomChainId","Account","random","signedStakedBlockProducerIntents","Promise","all","map","blockProducerAccount","stakeIntent","PayloadBuilder","schema","ChainStakeIntentSchema","fields","from","exp","Number","MAX_SAFE_INTEGER","nbf","intent","build","signedStakedBlockProducerIntent","buildTransaction","intents","payloads","flatMap","buildGenesisBlock"]}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
export * from '@xyo-network/chain-analyze';
|
|
1
2
|
export * from '@xyo-network/chain-ethereum';
|
|
2
3
|
export * from '@xyo-network/chain-modules';
|
|
4
|
+
export * from '@xyo-network/chain-network-model';
|
|
3
5
|
export * from '@xyo-network/chain-orchestration';
|
|
4
6
|
export * from '@xyo-network/chain-protocol';
|
|
5
7
|
export * from '@xyo-network/chain-services';
|
|
8
|
+
export * from '@xyo-network/chain-telemetry';
|
|
6
9
|
export * from '@xyo-network/chain-utils';
|
|
7
10
|
export * from '@xyo-network/chain-validation';
|
|
8
11
|
export * from '@xyo-network/xl1-protocol';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-shared.d.ts","sourceRoot":"","sources":["../../src/index-shared.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAA;AAC3C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,kCAAkC,CAAA;AAChD,cAAc,6BAA6B,CAAA;AAC3C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,0BAA0B,CAAA;AACxC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,2BAA2B,CAAA"}
|
|
1
|
+
{"version":3,"file":"index-shared.d.ts","sourceRoot":"","sources":["../../src/index-shared.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAA;AAC1C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,kCAAkC,CAAA;AAChD,cAAc,kCAAkC,CAAA;AAChD,cAAc,6BAA6B,CAAA;AAC3C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,8BAA8B,CAAA;AAC5C,cAAc,0BAA0B,CAAA;AACxC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,2BAA2B,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@xyo-network/chain-sdk",
|
|
4
|
-
"version": "1.12.
|
|
4
|
+
"version": "1.12.2",
|
|
5
5
|
"description": "XYO Layer One SDK",
|
|
6
6
|
"homepage": "https://xylabs.com",
|
|
7
7
|
"bugs": {
|
|
@@ -40,9 +40,6 @@
|
|
|
40
40
|
},
|
|
41
41
|
"./package.json": "./package.json"
|
|
42
42
|
},
|
|
43
|
-
"module": "./dist/neutral/index-shared.mjs",
|
|
44
|
-
"source": "./src/index-shared.ts",
|
|
45
|
-
"types": "./dist/neutral/index-shared.d.ts",
|
|
46
43
|
"files": [
|
|
47
44
|
"dist",
|
|
48
45
|
"src"
|
|
@@ -57,40 +54,42 @@
|
|
|
57
54
|
"deploy3": "echo Deploy3 not allowed!"
|
|
58
55
|
},
|
|
59
56
|
"dependencies": {
|
|
60
|
-
"@xylabs/assert": "~5.0.
|
|
61
|
-
"@xylabs/delay": "~5.0.
|
|
62
|
-
"@xylabs/hex": "~5.0.
|
|
63
|
-
"@xyo-network/account": "~5.0.
|
|
64
|
-
"@xyo-network/account-model": "~5.0.
|
|
65
|
-
"@xyo-network/chain-
|
|
66
|
-
"@xyo-network/chain-
|
|
67
|
-
"@xyo-network/chain-
|
|
68
|
-
"@xyo-network/chain-
|
|
69
|
-
"@xyo-network/chain-
|
|
70
|
-
"@xyo-network/chain-
|
|
71
|
-
"@xyo-network/chain-
|
|
72
|
-
"@xyo-network/
|
|
57
|
+
"@xylabs/assert": "~5.0.10",
|
|
58
|
+
"@xylabs/delay": "~5.0.10",
|
|
59
|
+
"@xylabs/hex": "~5.0.10",
|
|
60
|
+
"@xyo-network/account": "~5.0.7",
|
|
61
|
+
"@xyo-network/account-model": "~5.0.7",
|
|
62
|
+
"@xyo-network/chain-analyze": "~1.12.2",
|
|
63
|
+
"@xyo-network/chain-ethereum": "~1.12.2",
|
|
64
|
+
"@xyo-network/chain-modules": "~1.12.2",
|
|
65
|
+
"@xyo-network/chain-network-model": "~1.12.2",
|
|
66
|
+
"@xyo-network/chain-orchestration": "~1.12.2",
|
|
67
|
+
"@xyo-network/chain-protocol": "~1.12.2",
|
|
68
|
+
"@xyo-network/chain-services": "~1.12.2",
|
|
69
|
+
"@xyo-network/chain-telemetry": "~1.12.2",
|
|
70
|
+
"@xyo-network/chain-utils": "~1.12.2",
|
|
71
|
+
"@xyo-network/chain-validation": "~1.12.2",
|
|
72
|
+
"@xyo-network/payload-builder": "~5.0.7",
|
|
73
73
|
"@xyo-network/typechain": "~4.0.0",
|
|
74
|
-
"@xyo-network/wallet-model": "~5.0.
|
|
75
|
-
"@xyo-network/xl1-protocol": "~1.10.
|
|
76
|
-
"@xyo-network/xl1-protocol-sdk": "~1.12.
|
|
74
|
+
"@xyo-network/wallet-model": "~5.0.7",
|
|
75
|
+
"@xyo-network/xl1-protocol": "~1.10.15",
|
|
76
|
+
"@xyo-network/xl1-protocol-sdk": "~1.12.2",
|
|
77
77
|
"ethers": "6.15.0"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
|
-
"@types/node": "~24.
|
|
81
|
-
"@xylabs/creatable": "~5.0.
|
|
82
|
-
"@xylabs/decimal-precision": "~5.0.
|
|
83
|
-
"@xylabs/delay": "~5.0.
|
|
84
|
-
"@xylabs/ts-scripts-yarn3": "~7.1.
|
|
85
|
-
"@xylabs/tsconfig": "~7.1.
|
|
86
|
-
"@xyo-network/account": "~5.0.
|
|
87
|
-
"@xyo-network/account-model": "~5.0.
|
|
88
|
-
"@xyo-network/archivist-memory": "~5.0.
|
|
89
|
-
"@xyo-network/archivist-model": "~5.0.
|
|
90
|
-
"@xyo-network/boundwitness-builder": "~5.0.
|
|
91
|
-
"@xyo-network/
|
|
92
|
-
"@xyo-network/
|
|
93
|
-
"@xyo-network/wallet": "~5.0.2",
|
|
80
|
+
"@types/node": "~24.3.0",
|
|
81
|
+
"@xylabs/creatable": "~5.0.10",
|
|
82
|
+
"@xylabs/decimal-precision": "~5.0.10",
|
|
83
|
+
"@xylabs/delay": "~5.0.10",
|
|
84
|
+
"@xylabs/ts-scripts-yarn3": "~7.1.3",
|
|
85
|
+
"@xylabs/tsconfig": "~7.1.3",
|
|
86
|
+
"@xyo-network/account": "~5.0.7",
|
|
87
|
+
"@xyo-network/account-model": "~5.0.7",
|
|
88
|
+
"@xyo-network/archivist-memory": "~5.0.7",
|
|
89
|
+
"@xyo-network/archivist-model": "~5.0.7",
|
|
90
|
+
"@xyo-network/boundwitness-builder": "~5.0.7",
|
|
91
|
+
"@xyo-network/payload-model": "~5.0.7",
|
|
92
|
+
"@xyo-network/wallet": "~5.0.7",
|
|
94
93
|
"eslint": "~9.33.0",
|
|
95
94
|
"typescript": "~5.9.2",
|
|
96
95
|
"vitest": "~3.2.4"
|
package/src/index-node.ts
CHANGED
|
@@ -1,2 +1,12 @@
|
|
|
1
|
-
export * from './index-shared.ts'
|
|
2
1
|
export * from './test/index.ts'
|
|
2
|
+
export * from '@xyo-network/chain-analyze'
|
|
3
|
+
export * from '@xyo-network/chain-ethereum'
|
|
4
|
+
export * from '@xyo-network/chain-modules'
|
|
5
|
+
export * from '@xyo-network/chain-network-model'
|
|
6
|
+
export * from '@xyo-network/chain-orchestration'
|
|
7
|
+
export * from '@xyo-network/chain-protocol'
|
|
8
|
+
export * from '@xyo-network/chain-services'
|
|
9
|
+
export * from '@xyo-network/chain-telemetry'
|
|
10
|
+
export * from '@xyo-network/chain-utils'
|
|
11
|
+
export * from '@xyo-network/chain-validation'
|
|
12
|
+
export * from '@xyo-network/xl1-protocol'
|
package/src/index-shared.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
export * from '@xyo-network/chain-analyze'
|
|
1
2
|
export * from '@xyo-network/chain-ethereum'
|
|
2
3
|
export * from '@xyo-network/chain-modules'
|
|
4
|
+
export * from '@xyo-network/chain-network-model'
|
|
3
5
|
export * from '@xyo-network/chain-orchestration'
|
|
4
6
|
export * from '@xyo-network/chain-protocol'
|
|
5
7
|
export * from '@xyo-network/chain-services'
|
|
8
|
+
export * from '@xyo-network/chain-telemetry'
|
|
6
9
|
export * from '@xyo-network/chain-utils'
|
|
7
10
|
export * from '@xyo-network/chain-validation'
|
|
8
11
|
export * from '@xyo-network/xl1-protocol'
|