viem 0.0.0-w-20230816184753 → 0.0.0-w-20230818170445
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/cjs/actions/public/multicall.js +3 -6
- package/dist/cjs/actions/public/multicall.js.map +1 -1
- package/dist/cjs/clients/decorators/public.js.map +1 -1
- package/dist/cjs/constants/number.js +96 -96
- package/dist/cjs/constants/number.js.map +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/actions/public/multicall.js +4 -7
- package/dist/esm/actions/public/multicall.js.map +1 -1
- package/dist/esm/clients/decorators/public.js.map +1 -1
- package/dist/esm/constants/number.js +96 -96
- package/dist/esm/constants/number.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/types/actions/public/multicall.d.ts +16 -10
- package/dist/types/actions/public/multicall.d.ts.map +1 -1
- package/dist/types/clients/decorators/public.d.ts +2 -2
- package/dist/types/clients/decorators/public.d.ts.map +1 -1
- package/dist/types/constants/number.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/types/contract.d.ts +21 -3
- package/dist/types/types/contract.d.ts.map +1 -1
- package/dist/types/types/multicall.d.ts +60 -37
- package/dist/types/types/multicall.d.ts.map +1 -1
- package/dist/types/types/utils.d.ts +8 -0
- package/dist/types/types/utils.d.ts.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +3 -3
- package/src/actions/public/multicall.ts +25 -37
- package/src/clients/decorators/public.ts +5 -11
- package/src/constants/number.ts +96 -96
- package/src/index.ts +1 -1
- package/src/types/contract.ts +106 -1
- package/src/types/multicall.ts +181 -90
- package/src/types/utils.ts +33 -0
- package/src/version.ts +1 -1
@@ -10,7 +10,8 @@ const chain_js_1 = require("../../utils/chain.js");
|
|
10
10
|
const getContractError_js_1 = require("../../utils/errors/getContractError.js");
|
11
11
|
const readContract_js_1 = require("./readContract.js");
|
12
12
|
async function multicall(client, parameters) {
|
13
|
-
const { allowFailure = true, batchSize: batchSize_, blockNumber, blockTag,
|
13
|
+
const { allowFailure = true, batchSize: batchSize_, blockNumber, blockTag, multicallAddress: multicallAddress_, } = parameters;
|
14
|
+
const contracts = parameters.contracts;
|
14
15
|
const batchSize = batchSize_ ??
|
15
16
|
((typeof client.batch?.multicall === 'object' &&
|
16
17
|
client.batch.multicall.batchSize) ||
|
@@ -31,11 +32,7 @@ async function multicall(client, parameters) {
|
|
31
32
|
for (let i = 0; i < contracts.length; i++) {
|
32
33
|
const { abi, address, args, functionName } = contracts[i];
|
33
34
|
try {
|
34
|
-
const callData = (0, encodeFunctionData_js_1.encodeFunctionData)({
|
35
|
-
abi,
|
36
|
-
args,
|
37
|
-
functionName,
|
38
|
-
});
|
35
|
+
const callData = (0, encodeFunctionData_js_1.encodeFunctionData)({ abi, args, functionName });
|
39
36
|
currentChunkSize += callData.length;
|
40
37
|
if (batchSize > 0 && currentChunkSize > batchSize) {
|
41
38
|
currentChunk++;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"multicall.js","sourceRoot":"","sources":["../../../../src/actions/public/multicall.ts"],"names":[],"mappings":";;;AAIA,qDAAuD;AACvD,gDAA8D;AAE9D,0DAA2D;
|
1
|
+
{"version":3,"file":"multicall.js","sourceRoot":"","sources":["../../../../src/actions/public/multicall.ts"],"names":[],"mappings":";;;AAIA,qDAAuD;AACvD,gDAA8D;AAE9D,0DAA2D;AAQ3D,qFAA8E;AAC9E,iFAA0E;AAC1E,mDAA8D;AAC9D,gFAAyE;AAGzE,uDAAgD;AAsEzC,KAAK,UAAU,SAAS,CAK7B,MAAgC,EAChC,UAAwD;IAExD,MAAM,EACJ,YAAY,GAAG,IAAI,EACnB,SAAS,EAAE,UAAU,EACrB,WAAW,EACX,QAAQ,EACR,gBAAgB,EAAE,iBAAiB,GACpC,GAAG,UAAU,CAAA;IACd,MAAM,SAAS,GAAG,UAAU,CAAC,SAAgC,CAAA;IAE7D,MAAM,SAAS,GACb,UAA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D,oEAI0C;AAC1C,0EAI6C;AAC7C,kFAIiD;AACjD,gFAIgD;AAChD,4EAI8C;AAC9C,gFAIgD;AAChD,oGAI0D;AAC1D,kFAIiD;AACjD,wEAI4C;AAC5C,sFAImD;AACnD,sEAI2C;AAC3C,kGAIyD;
|
1
|
+
{"version":3,"file":"public.js","sourceRoot":"","sources":["../../../../src/clients/decorators/public.ts"],"names":[],"mappings":";;;AAEA,yEAI2C;AAC3C,uEAI0C;AAC1C,mEAIwC;AACxC,2EAI4C;AAC5C,mEAIwC;AACxC,0DAIqC;AACrC,oFAGkD;AAClD,oGAI0D;AAC1D,oFAIkD;AAClD,8GAG+D;AAC/D,wFAIoD;AACpD,wEAI4C;AAC5C,sEAI2C;AAC3C,kEAIyC;AACzC,8EAI+C;AAC/C,kGAIyD;AACzD,wEAI4C;AAC5C,sEAG2C;AAC3C,4EAI8C;AAC9C,kFAIiD;AACjD,4EAI8C;AAC9C,wEAG4C;AAC5C,gEAIwC;AACxC,0EAI6C;AAC7C,8EAI+C;AAC/C,wGAI4D;AAC5D,wFAIoD;AACpD,4FAIsD;AACtD,oEAI0C;AAC1C,0EAI6C;AAC7C,kFAIiD;AACjD,gFAIgD;AAChD,4EAI8C;AAC9C,gFAIgD;AAChD,oGAI0D;AAC1D,kFAIiD;AACjD,wEAI4C;AAC5C,sFAImD;AACnD,sEAI2C;AAC3C,kGAIyD;AAmvCzD,SAAgB,aAAa,CAK3B,MAA4C;IAE5C,OAAO;QACL,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,cAAI,EAAC,MAAM,EAAE,IAAI,CAAC;QAClC,iBAAiB,EAAE,GAAG,EAAE,CAAC,IAAA,wCAAiB,EAAC,MAAM,CAAC;QAClD,yBAAyB,EAAE,CAAC,IAAI,EAAE,EAAE,CAClC,IAAA,wDAAyB,EAAC,MAAM,EAAE,IAAI,CAAC;QACzC,iBAAiB,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,wCAAiB,E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AAC;QAC1D,aAAa,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,gCAAa,EAAC,MAAM,EAAE,IAAI,CAAC;QACpD,eAAe,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,oCAAe,EAAC,MAAM,EAAE,IAAI,CAAC;QACxD,eAAe,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,oCAAe,EAAC,MAAM,EAAE,IAAI,CAAC;QACxD,yBAAyB,EAAE,CAAC,IAAI,EAAE,EAAE,CAClC,IAAA,wDAAyB,EAAC,MAAM,EAAE,IAAI,CAAC;QACzC,WAAW,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,4BAAW,EAAC,MAAM,EAAE,IAAI,CAAC;QAChD,gBAAgB,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,sCAAgB,EAAC,MAAM,EAAE,IAAI,CAAC;QAC1D,kBAAkB,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,0CAAkB,EAAC,MAAM,EAAE,IAAI,CAAC;QAC9D,UAAU,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,0BAAU,EAAC,MAAM,EAAE,IAAI,CAAC;QAC9C,wBAAwB,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,sDAAwB,EAAC,MAAM,EAAE,IAAI,CAAC;KAC3E,CAAA;AACH,CAAC;AArDD,sCAqDC"}
|
@@ -2,100 +2,100 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.minInt144 = exports.minInt136 = exports.minInt128 = exports.minInt120 = exports.minInt112 = exports.minInt104 = exports.minInt96 = exports.minInt88 = exports.minInt80 = exports.minInt72 = exports.minInt64 = exports.minInt56 = exports.minInt48 = exports.minInt40 = exports.minInt32 = exports.minInt24 = exports.minInt16 = exports.minInt8 = exports.maxInt256 = exports.maxInt248 = exports.maxInt240 = exports.maxInt232 = exports.maxInt224 = exports.maxInt216 = exports.maxInt208 = exports.maxInt200 = exports.maxInt192 = exports.maxInt184 = exports.maxInt176 = exports.maxInt168 = exports.maxInt160 = exports.maxInt152 = exports.maxInt144 = exports.maxInt136 = exports.maxInt128 = exports.maxInt120 = exports.maxInt112 = exports.maxInt104 = exports.maxInt96 = exports.maxInt88 = exports.maxInt80 = exports.maxInt72 = exports.maxInt64 = exports.maxInt56 = exports.maxInt48 = exports.maxInt40 = exports.maxInt32 = exports.maxInt24 = exports.maxInt16 = exports.maxInt8 = void 0;
|
4
4
|
exports.maxUint256 = exports.maxUint248 = exports.maxUint240 = exports.maxUint232 = exports.maxUint224 = exports.maxUint216 = exports.maxUint208 = exports.maxUint200 = exports.maxUint192 = exports.maxUint184 = exports.maxUint176 = exports.maxUint168 = exports.maxUint160 = exports.maxUint152 = exports.maxUint144 = exports.maxUint136 = exports.maxUint128 = exports.maxUint120 = exports.maxUint112 = exports.maxUint104 = exports.maxUint96 = exports.maxUint88 = exports.maxUint80 = exports.maxUint72 = exports.maxUint64 = exports.maxUint56 = exports.maxUint48 = exports.maxUint40 = exports.maxUint32 = exports.maxUint24 = exports.maxUint16 = exports.maxUint8 = exports.minInt256 = exports.minInt248 = exports.minInt240 = exports.minInt232 = exports.minInt224 = exports.minInt216 = exports.minInt208 = exports.minInt200 = exports.minInt192 = exports.minInt184 = exports.minInt176 = exports.minInt168 = exports.minInt160 = exports.minInt152 = void 0;
|
5
|
-
exports.maxInt8 = 2n ** (8n - 1n);
|
6
|
-
exports.maxInt16 = 2n ** (16n - 1n);
|
7
|
-
exports.maxInt24 = 2n ** (24n - 1n);
|
8
|
-
exports.maxInt32 = 2n ** (32n - 1n);
|
9
|
-
exports.maxInt40 = 2n ** (40n - 1n);
|
10
|
-
exports.maxInt48 = 2n ** (48n - 1n);
|
11
|
-
exports.maxInt56 = 2n ** (56n - 1n);
|
12
|
-
exports.maxInt64 = 2n ** (64n - 1n);
|
13
|
-
exports.maxInt72 = 2n ** (72n - 1n);
|
14
|
-
exports.maxInt80 = 2n ** (80n - 1n);
|
15
|
-
exports.maxInt88 = 2n ** (88n - 1n);
|
16
|
-
exports.maxInt96 = 2n ** (96n - 1n);
|
17
|
-
exports.maxInt104 = 2n ** (104n - 1n);
|
18
|
-
exports.maxInt112 = 2n ** (112n - 1n);
|
19
|
-
exports.maxInt120 = 2n ** (120n - 1n);
|
20
|
-
exports.maxInt128 = 2n ** (128n - 1n);
|
21
|
-
exports.maxInt136 = 2n ** (136n - 1n);
|
22
|
-
exports.maxInt144 = 2n ** (144n - 1n);
|
23
|
-
exports.maxInt152 = 2n ** (152n - 1n);
|
24
|
-
exports.maxInt160 = 2n ** (160n - 1n);
|
25
|
-
exports.maxInt168 = 2n ** (168n - 1n);
|
26
|
-
exports.maxInt176 = 2n ** (176n - 1n);
|
27
|
-
exports.maxInt184 = 2n ** (184n - 1n);
|
28
|
-
exports.maxInt192 = 2n ** (192n - 1n);
|
29
|
-
exports.maxInt200 = 2n ** (200n - 1n);
|
30
|
-
exports.maxInt208 = 2n ** (208n - 1n);
|
31
|
-
exports.maxInt216 = 2n ** (216n - 1n);
|
32
|
-
exports.maxInt224 = 2n ** (224n - 1n);
|
33
|
-
exports.maxInt232 = 2n ** (232n - 1n);
|
34
|
-
exports.maxInt240 = 2n ** (240n - 1n);
|
35
|
-
exports.maxInt248 = 2n ** (248n - 1n);
|
36
|
-
exports.maxInt256 = 2n ** (256n - 1n);
|
37
|
-
exports.minInt8 = -(2n ** 8n);
|
38
|
-
exports.minInt16 = -(2n ** 16n);
|
39
|
-
exports.minInt24 = -(2n ** 24n);
|
40
|
-
exports.minInt32 = -(2n ** 32n);
|
41
|
-
exports.minInt40 = -(2n ** 40n);
|
42
|
-
exports.minInt48 = -(2n ** 48n);
|
43
|
-
exports.minInt56 = -(2n ** 56n);
|
44
|
-
exports.minInt64 = -(2n ** 64n);
|
45
|
-
exports.minInt72 = -(2n ** 72n);
|
46
|
-
exports.minInt80 = -(2n ** 80n);
|
47
|
-
exports.minInt88 = -(2n ** 88n);
|
48
|
-
exports.minInt96 = -(2n ** 96n);
|
49
|
-
exports.minInt104 = -(2n ** 104n);
|
50
|
-
exports.minInt112 = -(2n ** 112n);
|
51
|
-
exports.minInt120 = -(2n ** 120n);
|
52
|
-
exports.minInt128 = -(2n ** 128n);
|
53
|
-
exports.minInt136 = -(2n ** 136n);
|
54
|
-
exports.minInt144 = -(2n ** 144n);
|
55
|
-
exports.minInt152 = -(2n ** 152n);
|
56
|
-
exports.minInt160 = -(2n ** 160n);
|
57
|
-
exports.minInt168 = -(2n ** 168n);
|
58
|
-
exports.minInt176 = -(2n ** 176n);
|
59
|
-
exports.minInt184 = -(2n ** 184n);
|
60
|
-
exports.minInt192 = -(2n ** 192n);
|
61
|
-
exports.minInt200 = -(2n ** 200n);
|
62
|
-
exports.minInt208 = -(2n ** 208n);
|
63
|
-
exports.minInt216 = -(2n ** 216n);
|
64
|
-
exports.minInt224 = -(2n ** 224n);
|
65
|
-
exports.minInt232 = -(2n ** 232n);
|
66
|
-
exports.minInt240 = -(2n ** 240n);
|
67
|
-
exports.minInt248 = -(2n ** 248n);
|
68
|
-
exports.minInt256 = -(2n ** 256n);
|
69
|
-
exports.maxUint8 = 2n ** 8n;
|
70
|
-
exports.maxUint16 = 2n ** 16n;
|
71
|
-
exports.maxUint24 = 2n ** 24n;
|
72
|
-
exports.maxUint32 = 2n ** 32n;
|
73
|
-
exports.maxUint40 = 2n ** 40n;
|
74
|
-
exports.maxUint48 = 2n ** 48n;
|
75
|
-
exports.maxUint56 = 2n ** 56n;
|
76
|
-
exports.maxUint64 = 2n ** 64n;
|
77
|
-
exports.maxUint72 = 2n ** 72n;
|
78
|
-
exports.maxUint80 = 2n ** 80n;
|
79
|
-
exports.maxUint88 = 2n ** 88n;
|
80
|
-
exports.maxUint96 = 2n ** 96n;
|
81
|
-
exports.maxUint104 = 2n ** 104n;
|
82
|
-
exports.maxUint112 = 2n ** 112n;
|
83
|
-
exports.maxUint120 = 2n ** 120n;
|
84
|
-
exports.maxUint128 = 2n ** 128n;
|
85
|
-
exports.maxUint136 = 2n ** 136n;
|
86
|
-
exports.maxUint144 = 2n ** 144n;
|
87
|
-
exports.maxUint152 = 2n ** 152n;
|
88
|
-
exports.maxUint160 = 2n ** 160n;
|
89
|
-
exports.maxUint168 = 2n ** 168n;
|
90
|
-
exports.maxUint176 = 2n ** 176n;
|
91
|
-
exports.maxUint184 = 2n ** 184n;
|
92
|
-
exports.maxUint192 = 2n ** 192n;
|
93
|
-
exports.maxUint200 = 2n ** 200n;
|
94
|
-
exports.maxUint208 = 2n ** 208n;
|
95
|
-
exports.maxUint216 = 2n ** 216n;
|
96
|
-
exports.maxUint224 = 2n ** 224n;
|
97
|
-
exports.maxUint232 = 2n ** 232n;
|
98
|
-
exports.maxUint240 = 2n ** 240n;
|
99
|
-
exports.maxUint248 = 2n ** 248n;
|
100
|
-
exports.maxUint256 = 2n ** 256n;
|
5
|
+
exports.maxInt8 = 2n ** (8n - 1n) - 1n;
|
6
|
+
exports.maxInt16 = 2n ** (16n - 1n) - 1n;
|
7
|
+
exports.maxInt24 = 2n ** (24n - 1n) - 1n;
|
8
|
+
exports.maxInt32 = 2n ** (32n - 1n) - 1n;
|
9
|
+
exports.maxInt40 = 2n ** (40n - 1n) - 1n;
|
10
|
+
exports.maxInt48 = 2n ** (48n - 1n) - 1n;
|
11
|
+
exports.maxInt56 = 2n ** (56n - 1n) - 1n;
|
12
|
+
exports.maxInt64 = 2n ** (64n - 1n) - 1n;
|
13
|
+
exports.maxInt72 = 2n ** (72n - 1n) - 1n;
|
14
|
+
exports.maxInt80 = 2n ** (80n - 1n) - 1n;
|
15
|
+
exports.maxInt88 = 2n ** (88n - 1n) - 1n;
|
16
|
+
exports.maxInt96 = 2n ** (96n - 1n) - 1n;
|
17
|
+
exports.maxInt104 = 2n ** (104n - 1n) - 1n;
|
18
|
+
exports.maxInt112 = 2n ** (112n - 1n) - 1n;
|
19
|
+
exports.maxInt120 = 2n ** (120n - 1n) - 1n;
|
20
|
+
exports.maxInt128 = 2n ** (128n - 1n) - 1n;
|
21
|
+
exports.maxInt136 = 2n ** (136n - 1n) - 1n;
|
22
|
+
exports.maxInt144 = 2n ** (144n - 1n) - 1n;
|
23
|
+
exports.maxInt152 = 2n ** (152n - 1n) - 1n;
|
24
|
+
exports.maxInt160 = 2n ** (160n - 1n) - 1n;
|
25
|
+
exports.maxInt168 = 2n ** (168n - 1n) - 1n;
|
26
|
+
exports.maxInt176 = 2n ** (176n - 1n) - 1n;
|
27
|
+
exports.maxInt184 = 2n ** (184n - 1n) - 1n;
|
28
|
+
exports.maxInt192 = 2n ** (192n - 1n) - 1n;
|
29
|
+
exports.maxInt200 = 2n ** (200n - 1n) - 1n;
|
30
|
+
exports.maxInt208 = 2n ** (208n - 1n) - 1n;
|
31
|
+
exports.maxInt216 = 2n ** (216n - 1n) - 1n;
|
32
|
+
exports.maxInt224 = 2n ** (224n - 1n) - 1n;
|
33
|
+
exports.maxInt232 = 2n ** (232n - 1n) - 1n;
|
34
|
+
exports.maxInt240 = 2n ** (240n - 1n) - 1n;
|
35
|
+
exports.maxInt248 = 2n ** (248n - 1n) - 1n;
|
36
|
+
exports.maxInt256 = 2n ** (256n - 1n) - 1n;
|
37
|
+
exports.minInt8 = -(2n ** (8n - 1n));
|
38
|
+
exports.minInt16 = -(2n ** (16n - 1n));
|
39
|
+
exports.minInt24 = -(2n ** (24n - 1n));
|
40
|
+
exports.minInt32 = -(2n ** (32n - 1n));
|
41
|
+
exports.minInt40 = -(2n ** (40n - 1n));
|
42
|
+
exports.minInt48 = -(2n ** (48n - 1n));
|
43
|
+
exports.minInt56 = -(2n ** (56n - 1n));
|
44
|
+
exports.minInt64 = -(2n ** (64n - 1n));
|
45
|
+
exports.minInt72 = -(2n ** (72n - 1n));
|
46
|
+
exports.minInt80 = -(2n ** (80n - 1n));
|
47
|
+
exports.minInt88 = -(2n ** (88n - 1n));
|
48
|
+
exports.minInt96 = -(2n ** (96n - 1n));
|
49
|
+
exports.minInt104 = -(2n ** (104n - 1n));
|
50
|
+
exports.minInt112 = -(2n ** (112n - 1n));
|
51
|
+
exports.minInt120 = -(2n ** (120n - 1n));
|
52
|
+
exports.minInt128 = -(2n ** (128n - 1n));
|
53
|
+
exports.minInt136 = -(2n ** (136n - 1n));
|
54
|
+
exports.minInt144 = -(2n ** (144n - 1n));
|
55
|
+
exports.minInt152 = -(2n ** (152n - 1n));
|
56
|
+
exports.minInt160 = -(2n ** (160n - 1n));
|
57
|
+
exports.minInt168 = -(2n ** (168n - 1n));
|
58
|
+
exports.minInt176 = -(2n ** (176n - 1n));
|
59
|
+
exports.minInt184 = -(2n ** (184n - 1n));
|
60
|
+
exports.minInt192 = -(2n ** (192n - 1n));
|
61
|
+
exports.minInt200 = -(2n ** (200n - 1n));
|
62
|
+
exports.minInt208 = -(2n ** (208n - 1n));
|
63
|
+
exports.minInt216 = -(2n ** (216n - 1n));
|
64
|
+
exports.minInt224 = -(2n ** (224n - 1n));
|
65
|
+
exports.minInt232 = -(2n ** (232n - 1n));
|
66
|
+
exports.minInt240 = -(2n ** (240n - 1n));
|
67
|
+
exports.minInt248 = -(2n ** (248n - 1n));
|
68
|
+
exports.minInt256 = -(2n ** (256n - 1n));
|
69
|
+
exports.maxUint8 = 2n ** 8n - 1n;
|
70
|
+
exports.maxUint16 = 2n ** 16n - 1n;
|
71
|
+
exports.maxUint24 = 2n ** 24n - 1n;
|
72
|
+
exports.maxUint32 = 2n ** 32n - 1n;
|
73
|
+
exports.maxUint40 = 2n ** 40n - 1n;
|
74
|
+
exports.maxUint48 = 2n ** 48n - 1n;
|
75
|
+
exports.maxUint56 = 2n ** 56n - 1n;
|
76
|
+
exports.maxUint64 = 2n ** 64n - 1n;
|
77
|
+
exports.maxUint72 = 2n ** 72n - 1n;
|
78
|
+
exports.maxUint80 = 2n ** 80n - 1n;
|
79
|
+
exports.maxUint88 = 2n ** 88n - 1n;
|
80
|
+
exports.maxUint96 = 2n ** 96n - 1n;
|
81
|
+
exports.maxUint104 = 2n ** 104n - 1n;
|
82
|
+
exports.maxUint112 = 2n ** 112n - 1n;
|
83
|
+
exports.maxUint120 = 2n ** 120n - 1n;
|
84
|
+
exports.maxUint128 = 2n ** 128n - 1n;
|
85
|
+
exports.maxUint136 = 2n ** 136n - 1n;
|
86
|
+
exports.maxUint144 = 2n ** 144n - 1n;
|
87
|
+
exports.maxUint152 = 2n ** 152n - 1n;
|
88
|
+
exports.maxUint160 = 2n ** 160n - 1n;
|
89
|
+
exports.maxUint168 = 2n ** 168n - 1n;
|
90
|
+
exports.maxUint176 = 2n ** 176n - 1n;
|
91
|
+
exports.maxUint184 = 2n ** 184n - 1n;
|
92
|
+
exports.maxUint192 = 2n ** 192n - 1n;
|
93
|
+
exports.maxUint200 = 2n ** 200n - 1n;
|
94
|
+
exports.maxUint208 = 2n ** 208n - 1n;
|
95
|
+
exports.maxUint216 = 2n ** 216n - 1n;
|
96
|
+
exports.maxUint224 = 2n ** 224n - 1n;
|
97
|
+
exports.maxUint232 = 2n ** 232n - 1n;
|
98
|
+
exports.maxUint240 = 2n ** 240n - 1n;
|
99
|
+
exports.maxUint248 = 2n ** 248n - 1n;
|
100
|
+
exports.maxUint256 = 2n ** 256n - 1n;
|
101
101
|
//# sourceMappingURL=number.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"number.js","sourceRoot":"","sources":["../../../src/constants/number.ts"],"names":[],"mappings":";;;;AAAa,QAAA,OAAO,GAAG,EAAE,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC,CAAA;
|
1
|
+
{"version":3,"file":"number.js","sourceRoot":"","sources":["../../../src/constants/number.ts"],"names":[],"mappings":";;;;AAAa,QAAA,OAAO,GAAG,EAAE,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,EAAE,CAAA;AAC9B,QAAA,QAAQ,GAAG,EAAE,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC,GAAG,EAAE,CAAA;AAChC,QAAA,QAAQ,GAAG,EAAE,IAAI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cjs/version.js
CHANGED
@@ -2,7 +2,7 @@ import { multicall3Abi } from '../../constants/abis.js';
|
|
2
2
|
import { AbiDecodingZeroDataError } from '../../errors/abi.js';
|
3
3
|
import { RawContractError } from '../../errors/contract.js';
|
4
4
|
import { decodeFunctionResult } from '../../utils/abi/decodeFunctionResult.js';
|
5
|
-
import { encodeFunctionData
|
5
|
+
import { encodeFunctionData } from '../../utils/abi/encodeFunctionData.js';
|
6
6
|
import { getChainContractAddress } from '../../utils/chain.js';
|
7
7
|
import { getContractError } from '../../utils/errors/getContractError.js';
|
8
8
|
import { readContract } from './readContract.js';
|
@@ -46,7 +46,8 @@ import { readContract } from './readContract.js';
|
|
46
46
|
* // [{ result: 424122n, status: 'success' }, { result: 1000000n, status: 'success' }]
|
47
47
|
*/
|
48
48
|
export async function multicall(client, parameters) {
|
49
|
-
const { allowFailure = true, batchSize: batchSize_, blockNumber, blockTag,
|
49
|
+
const { allowFailure = true, batchSize: batchSize_, blockNumber, blockTag, multicallAddress: multicallAddress_, } = parameters;
|
50
|
+
const contracts = parameters.contracts;
|
50
51
|
const batchSize = batchSize_ ??
|
51
52
|
((typeof client.batch?.multicall === 'object' &&
|
52
53
|
client.batch.multicall.batchSize) ||
|
@@ -67,11 +68,7 @@ export async function multicall(client, parameters) {
|
|
67
68
|
for (let i = 0; i < contracts.length; i++) {
|
68
69
|
const { abi, address, args, functionName } = contracts[i];
|
69
70
|
try {
|
70
|
-
const callData = encodeFunctionData({
|
71
|
-
abi,
|
72
|
-
args,
|
73
|
-
functionName,
|
74
|
-
});
|
71
|
+
const callData = encodeFunctionData({ abi, args, functionName });
|
75
72
|
currentChunkSize += callData.length;
|
76
73
|
if (batchSize > 0 && currentChunkSize > batchSize) {
|
77
74
|
currentChunk++;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"multicall.js","sourceRoot":"","sources":["../../../../src/actions/public/multicall.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB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AAE,IAAI,CAAC;QACpD,eAAe,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,eAAe,CAAC,MAAM,EAAE,IAAI,CAAC;QACxD,eAAe,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,eAAe,CAAC,MAAM,EAAE,IAAI,CAAC;QACxD,yBAAyB,EAAE,CAAC,IAAI,EAAE,EAAE,CAClC,yBAAyB,CAAC,MAAM,EAAE,IAAI,CAAC;QACzC,WAAW,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,WAAW,CAAC,MAAM,EAAE,IAAI,CAAC;QAChD,gBAAgB,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,gBAAgB,CAAC,MAAM,EAAE,IAAI,CAAC;QAC1D,kBAAkB,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,kBAAkB,CAAC,MAAM,EAAE,IAAI,CAAC;QAC9D,UAAU,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC;QAC9C,wBAAwB,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,wBAAwB,CAAC,MAAM,EAAE,IAAI,CAAC;KAC3E,CAAA;AACH,CAAC"}
|
@@ -1,97 +1,97 @@
|
|
1
|
-
export const maxInt8 = 2n ** (8n - 1n);
|
2
|
-
export const maxInt16 = 2n ** (16n - 1n);
|
3
|
-
export const maxInt24 = 2n ** (24n - 1n);
|
4
|
-
export const maxInt32 = 2n ** (32n - 1n);
|
5
|
-
export const maxInt40 = 2n ** (40n - 1n);
|
6
|
-
export const maxInt48 = 2n ** (48n - 1n);
|
7
|
-
export const maxInt56 = 2n ** (56n - 1n);
|
8
|
-
export const maxInt64 = 2n ** (64n - 1n);
|
9
|
-
export const maxInt72 = 2n ** (72n - 1n);
|
10
|
-
export const maxInt80 = 2n ** (80n - 1n);
|
11
|
-
export const maxInt88 = 2n ** (88n - 1n);
|
12
|
-
export const maxInt96 = 2n ** (96n - 1n);
|
13
|
-
export const maxInt104 = 2n ** (104n - 1n);
|
14
|
-
export const maxInt112 = 2n ** (112n - 1n);
|
15
|
-
export const maxInt120 = 2n ** (120n - 1n);
|
16
|
-
export const maxInt128 = 2n ** (128n - 1n);
|
17
|
-
export const maxInt136 = 2n ** (136n - 1n);
|
18
|
-
export const maxInt144 = 2n ** (144n - 1n);
|
19
|
-
export const maxInt152 = 2n ** (152n - 1n);
|
20
|
-
export const maxInt160 = 2n ** (160n - 1n);
|
21
|
-
export const maxInt168 = 2n ** (168n - 1n);
|
22
|
-
export const maxInt176 = 2n ** (176n - 1n);
|
23
|
-
export const maxInt184 = 2n ** (184n - 1n);
|
24
|
-
export const maxInt192 = 2n ** (192n - 1n);
|
25
|
-
export const maxInt200 = 2n ** (200n - 1n);
|
26
|
-
export const maxInt208 = 2n ** (208n - 1n);
|
27
|
-
export const maxInt216 = 2n ** (216n - 1n);
|
28
|
-
export const maxInt224 = 2n ** (224n - 1n);
|
29
|
-
export const maxInt232 = 2n ** (232n - 1n);
|
30
|
-
export const maxInt240 = 2n ** (240n - 1n);
|
31
|
-
export const maxInt248 = 2n ** (248n - 1n);
|
32
|
-
export const maxInt256 = 2n ** (256n - 1n);
|
33
|
-
export const minInt8 = -(2n ** 8n);
|
34
|
-
export const minInt16 = -(2n ** 16n);
|
35
|
-
export const minInt24 = -(2n ** 24n);
|
36
|
-
export const minInt32 = -(2n ** 32n);
|
37
|
-
export const minInt40 = -(2n ** 40n);
|
38
|
-
export const minInt48 = -(2n ** 48n);
|
39
|
-
export const minInt56 = -(2n ** 56n);
|
40
|
-
export const minInt64 = -(2n ** 64n);
|
41
|
-
export const minInt72 = -(2n ** 72n);
|
42
|
-
export const minInt80 = -(2n ** 80n);
|
43
|
-
export const minInt88 = -(2n ** 88n);
|
44
|
-
export const minInt96 = -(2n ** 96n);
|
45
|
-
export const minInt104 = -(2n ** 104n);
|
46
|
-
export const minInt112 = -(2n ** 112n);
|
47
|
-
export const minInt120 = -(2n ** 120n);
|
48
|
-
export const minInt128 = -(2n ** 128n);
|
49
|
-
export const minInt136 = -(2n ** 136n);
|
50
|
-
export const minInt144 = -(2n ** 144n);
|
51
|
-
export const minInt152 = -(2n ** 152n);
|
52
|
-
export const minInt160 = -(2n ** 160n);
|
53
|
-
export const minInt168 = -(2n ** 168n);
|
54
|
-
export const minInt176 = -(2n ** 176n);
|
55
|
-
export const minInt184 = -(2n ** 184n);
|
56
|
-
export const minInt192 = -(2n ** 192n);
|
57
|
-
export const minInt200 = -(2n ** 200n);
|
58
|
-
export const minInt208 = -(2n ** 208n);
|
59
|
-
export const minInt216 = -(2n ** 216n);
|
60
|
-
export const minInt224 = -(2n ** 224n);
|
61
|
-
export const minInt232 = -(2n ** 232n);
|
62
|
-
export const minInt240 = -(2n ** 240n);
|
63
|
-
export const minInt248 = -(2n ** 248n);
|
64
|
-
export const minInt256 = -(2n ** 256n);
|
65
|
-
export const maxUint8 = 2n ** 8n;
|
66
|
-
export const maxUint16 = 2n ** 16n;
|
67
|
-
export const maxUint24 = 2n ** 24n;
|
68
|
-
export const maxUint32 = 2n ** 32n;
|
69
|
-
export const maxUint40 = 2n ** 40n;
|
70
|
-
export const maxUint48 = 2n ** 48n;
|
71
|
-
export const maxUint56 = 2n ** 56n;
|
72
|
-
export const maxUint64 = 2n ** 64n;
|
73
|
-
export const maxUint72 = 2n ** 72n;
|
74
|
-
export const maxUint80 = 2n ** 80n;
|
75
|
-
export const maxUint88 = 2n ** 88n;
|
76
|
-
export const maxUint96 = 2n ** 96n;
|
77
|
-
export const maxUint104 = 2n ** 104n;
|
78
|
-
export const maxUint112 = 2n ** 112n;
|
79
|
-
export const maxUint120 = 2n ** 120n;
|
80
|
-
export const maxUint128 = 2n ** 128n;
|
81
|
-
export const maxUint136 = 2n ** 136n;
|
82
|
-
export const maxUint144 = 2n ** 144n;
|
83
|
-
export const maxUint152 = 2n ** 152n;
|
84
|
-
export const maxUint160 = 2n ** 160n;
|
85
|
-
export const maxUint168 = 2n ** 168n;
|
86
|
-
export const maxUint176 = 2n ** 176n;
|
87
|
-
export const maxUint184 = 2n ** 184n;
|
88
|
-
export const maxUint192 = 2n ** 192n;
|
89
|
-
export const maxUint200 = 2n ** 200n;
|
90
|
-
export const maxUint208 = 2n ** 208n;
|
91
|
-
export const maxUint216 = 2n ** 216n;
|
92
|
-
export const maxUint224 = 2n ** 224n;
|
93
|
-
export const maxUint232 = 2n ** 232n;
|
94
|
-
export const maxUint240 = 2n ** 240n;
|
95
|
-
export const maxUint248 = 2n ** 248n;
|
96
|
-
export const maxUint256 = 2n ** 256n;
|
1
|
+
export const maxInt8 = 2n ** (8n - 1n) - 1n;
|
2
|
+
export const maxInt16 = 2n ** (16n - 1n) - 1n;
|
3
|
+
export const maxInt24 = 2n ** (24n - 1n) - 1n;
|
4
|
+
export const maxInt32 = 2n ** (32n - 1n) - 1n;
|
5
|
+
export const maxInt40 = 2n ** (40n - 1n) - 1n;
|
6
|
+
export const maxInt48 = 2n ** (48n - 1n) - 1n;
|
7
|
+
export const maxInt56 = 2n ** (56n - 1n) - 1n;
|
8
|
+
export const maxInt64 = 2n ** (64n - 1n) - 1n;
|
9
|
+
export const maxInt72 = 2n ** (72n - 1n) - 1n;
|
10
|
+
export const maxInt80 = 2n ** (80n - 1n) - 1n;
|
11
|
+
export const maxInt88 = 2n ** (88n - 1n) - 1n;
|
12
|
+
export const maxInt96 = 2n ** (96n - 1n) - 1n;
|
13
|
+
export const maxInt104 = 2n ** (104n - 1n) - 1n;
|
14
|
+
export const maxInt112 = 2n ** (112n - 1n) - 1n;
|
15
|
+
export const maxInt120 = 2n ** (120n - 1n) - 1n;
|
16
|
+
export const maxInt128 = 2n ** (128n - 1n) - 1n;
|
17
|
+
export const maxInt136 = 2n ** (136n - 1n) - 1n;
|
18
|
+
export const maxInt144 = 2n ** (144n - 1n) - 1n;
|
19
|
+
export const maxInt152 = 2n ** (152n - 1n) - 1n;
|
20
|
+
export const maxInt160 = 2n ** (160n - 1n) - 1n;
|
21
|
+
export const maxInt168 = 2n ** (168n - 1n) - 1n;
|
22
|
+
export const maxInt176 = 2n ** (176n - 1n) - 1n;
|
23
|
+
export const maxInt184 = 2n ** (184n - 1n) - 1n;
|
24
|
+
export const maxInt192 = 2n ** (192n - 1n) - 1n;
|
25
|
+
export const maxInt200 = 2n ** (200n - 1n) - 1n;
|
26
|
+
export const maxInt208 = 2n ** (208n - 1n) - 1n;
|
27
|
+
export const maxInt216 = 2n ** (216n - 1n) - 1n;
|
28
|
+
export const maxInt224 = 2n ** (224n - 1n) - 1n;
|
29
|
+
export const maxInt232 = 2n ** (232n - 1n) - 1n;
|
30
|
+
export const maxInt240 = 2n ** (240n - 1n) - 1n;
|
31
|
+
export const maxInt248 = 2n ** (248n - 1n) - 1n;
|
32
|
+
export const maxInt256 = 2n ** (256n - 1n) - 1n;
|
33
|
+
export const minInt8 = -(2n ** (8n - 1n));
|
34
|
+
export const minInt16 = -(2n ** (16n - 1n));
|
35
|
+
export const minInt24 = -(2n ** (24n - 1n));
|
36
|
+
export const minInt32 = -(2n ** (32n - 1n));
|
37
|
+
export const minInt40 = -(2n ** (40n - 1n));
|
38
|
+
export const minInt48 = -(2n ** (48n - 1n));
|
39
|
+
export const minInt56 = -(2n ** (56n - 1n));
|
40
|
+
export const minInt64 = -(2n ** (64n - 1n));
|
41
|
+
export const minInt72 = -(2n ** (72n - 1n));
|
42
|
+
export const minInt80 = -(2n ** (80n - 1n));
|
43
|
+
export const minInt88 = -(2n ** (88n - 1n));
|
44
|
+
export const minInt96 = -(2n ** (96n - 1n));
|
45
|
+
export const minInt104 = -(2n ** (104n - 1n));
|
46
|
+
export const minInt112 = -(2n ** (112n - 1n));
|
47
|
+
export const minInt120 = -(2n ** (120n - 1n));
|
48
|
+
export const minInt128 = -(2n ** (128n - 1n));
|
49
|
+
export const minInt136 = -(2n ** (136n - 1n));
|
50
|
+
export const minInt144 = -(2n ** (144n - 1n));
|
51
|
+
export const minInt152 = -(2n ** (152n - 1n));
|
52
|
+
export const minInt160 = -(2n ** (160n - 1n));
|
53
|
+
export const minInt168 = -(2n ** (168n - 1n));
|
54
|
+
export const minInt176 = -(2n ** (176n - 1n));
|
55
|
+
export const minInt184 = -(2n ** (184n - 1n));
|
56
|
+
export const minInt192 = -(2n ** (192n - 1n));
|
57
|
+
export const minInt200 = -(2n ** (200n - 1n));
|
58
|
+
export const minInt208 = -(2n ** (208n - 1n));
|
59
|
+
export const minInt216 = -(2n ** (216n - 1n));
|
60
|
+
export const minInt224 = -(2n ** (224n - 1n));
|
61
|
+
export const minInt232 = -(2n ** (232n - 1n));
|
62
|
+
export const minInt240 = -(2n ** (240n - 1n));
|
63
|
+
export const minInt248 = -(2n ** (248n - 1n));
|
64
|
+
export const minInt256 = -(2n ** (256n - 1n));
|
65
|
+
export const maxUint8 = 2n ** 8n - 1n;
|
66
|
+
export const maxUint16 = 2n ** 16n - 1n;
|
67
|
+
export const maxUint24 = 2n ** 24n - 1n;
|
68
|
+
export const maxUint32 = 2n ** 32n - 1n;
|
69
|
+
export const maxUint40 = 2n ** 40n - 1n;
|
70
|
+
export const maxUint48 = 2n ** 48n - 1n;
|
71
|
+
export const maxUint56 = 2n ** 56n - 1n;
|
72
|
+
export const maxUint64 = 2n ** 64n - 1n;
|
73
|
+
export const maxUint72 = 2n ** 72n - 1n;
|
74
|
+
export const maxUint80 = 2n ** 80n - 1n;
|
75
|
+
export const maxUint88 = 2n ** 88n - 1n;
|
76
|
+
export const maxUint96 = 2n ** 96n - 1n;
|
77
|
+
export const maxUint104 = 2n ** 104n - 1n;
|
78
|
+
export const maxUint112 = 2n ** 112n - 1n;
|
79
|
+
export const maxUint120 = 2n ** 120n - 1n;
|
80
|
+
export const maxUint128 = 2n ** 128n - 1n;
|
81
|
+
export const maxUint136 = 2n ** 136n - 1n;
|
82
|
+
export const maxUint144 = 2n ** 144n - 1n;
|
83
|
+
export const maxUint152 = 2n ** 152n - 1n;
|
84
|
+
export const maxUint160 = 2n ** 160n - 1n;
|
85
|
+
export const maxUint168 = 2n ** 168n - 1n;
|
86
|
+
export const maxUint176 = 2n ** 176n - 1n;
|
87
|
+
export const maxUint184 = 2n ** 184n - 1n;
|
88
|
+
export const maxUint192 = 2n ** 192n - 1n;
|
89
|
+
export const maxUint200 = 2n ** 200n - 1n;
|
90
|
+
export const maxUint208 = 2n ** 208n - 1n;
|
91
|
+
export const maxUint216 = 2n ** 216n - 1n;
|
92
|
+
export const maxUint224 = 2n ** 224n - 1n;
|
93
|
+
export const maxUint232 = 2n ** 232n - 1n;
|
94
|
+
export const maxUint240 = 2n ** 240n - 1n;
|
95
|
+
export const maxUint248 = 2n ** 248n - 1n;
|
96
|
+
export const maxUint256 = 2n ** 256n - 1n;
|
97
97
|
//# sourceMappingURL=number.js.map
|