viem 0.0.0-main.20231105T204204 → 0.0.0-main.20231105T211250
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/_cjs/chains/celo/formatters.js +23 -35
- package/_cjs/chains/celo/formatters.js.map +1 -1
- package/_cjs/chains/celo/serializers.js +20 -38
- package/_cjs/chains/celo/serializers.js.map +1 -1
- package/_cjs/chains/celo/utils.js +44 -0
- package/_cjs/chains/celo/utils.js.map +1 -0
- package/_cjs/errors/node.js +11 -11
- package/_cjs/errors/node.js.map +1 -1
- package/_cjs/errors/rpc.js +18 -18
- package/_cjs/errors/rpc.js.map +1 -1
- package/_cjs/errors/version.js +1 -1
- package/_esm/chains/celo/formatters.js +23 -35
- package/_esm/chains/celo/formatters.js.map +1 -1
- package/_esm/chains/celo/serializers.js +19 -44
- package/_esm/chains/celo/serializers.js.map +1 -1
- package/_esm/chains/celo/utils.js +39 -0
- package/_esm/chains/celo/utils.js.map +1 -0
- package/_esm/errors/node.js +11 -22
- package/_esm/errors/node.js.map +1 -1
- package/_esm/errors/rpc.js +18 -36
- package/_esm/errors/rpc.js.map +1 -1
- package/_esm/errors/version.js +1 -1
- package/_types/chains/celo/formatters.d.ts +6 -6
- package/_types/chains/celo/formatters.d.ts.map +1 -1
- package/_types/chains/celo/serializers.d.ts +3 -2
- package/_types/chains/celo/serializers.d.ts.map +1 -1
- package/_types/chains/celo/types.d.ts +12 -7
- package/_types/chains/celo/types.d.ts.map +1 -1
- package/_types/chains/celo/utils.d.ts +7 -0
- package/_types/chains/celo/utils.d.ts.map +1 -0
- package/_types/chains/definitions/celo.d.ts +6 -6
- package/_types/chains/definitions/celoAlfajores.d.ts +6 -6
- package/_types/chains/definitions/celoCannoli.d.ts +6 -6
- package/_types/errors/version.d.ts +1 -1
- package/chains/celo/formatters.ts +24 -37
- package/chains/celo/serializers.ts +23 -59
- package/chains/celo/types.ts +29 -19
- package/chains/celo/utils.ts +68 -0
- package/errors/version.ts +1 -1
- package/package.json +1 -1
@@ -7,22 +7,7 @@ const block_js_1 = require("../../utils/formatters/block.js");
|
|
7
7
|
const transaction_js_1 = require("../../utils/formatters/transaction.js");
|
8
8
|
const transactionReceipt_js_1 = require("../../utils/formatters/transactionReceipt.js");
|
9
9
|
const transactionRequest_js_1 = require("../../utils/formatters/transactionRequest.js");
|
10
|
-
|
11
|
-
if (args.type === 'cip64')
|
12
|
-
return true;
|
13
|
-
if (args.type)
|
14
|
-
return false;
|
15
|
-
return ('feeCurrency' in args &&
|
16
|
-
args.gatewayFee === undefined &&
|
17
|
-
args.gatewayFeeRecipient === undefined);
|
18
|
-
}
|
19
|
-
function isTransactionRequestCIP42(args) {
|
20
|
-
if (args.type === 'cip42')
|
21
|
-
return true;
|
22
|
-
if (args.type)
|
23
|
-
return false;
|
24
|
-
return args.gatewayFee !== undefined || args.gatewayFeeRecipient !== undefined;
|
25
|
-
}
|
10
|
+
const utils_js_1 = require("./utils.js");
|
26
11
|
exports.formattersCelo = {
|
27
12
|
block: (0, block_js_1.defineBlock)({
|
28
13
|
exclude: ['difficulty', 'gasLimit', 'mixHash', 'nonce', 'uncles'],
|
@@ -51,15 +36,18 @@ exports.formattersCelo = {
|
|
51
36
|
}),
|
52
37
|
transaction: (0, transaction_js_1.defineTransaction)({
|
53
38
|
format(args) {
|
39
|
+
const transaction = { feeCurrency: args.feeCurrency };
|
54
40
|
if (args.type === '0x7b')
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
41
|
+
transaction.type = 'cip64';
|
42
|
+
else {
|
43
|
+
if (args.type === '0x7c')
|
44
|
+
transaction.type = 'cip42';
|
45
|
+
transaction.gatewayFee = args.gatewayFee
|
46
|
+
? (0, fromHex_js_1.hexToBigInt)(args.gatewayFee)
|
47
|
+
: null;
|
48
|
+
transaction.gatewayFeeRecipient = args.gatewayFeeRecipient;
|
49
|
+
}
|
50
|
+
return transaction;
|
63
51
|
},
|
64
52
|
}),
|
65
53
|
transactionReceipt: (0, transactionReceipt_js_1.defineTransactionReceipt)({
|
@@ -73,20 +61,20 @@ exports.formattersCelo = {
|
|
73
61
|
}),
|
74
62
|
transactionRequest: (0, transactionRequest_js_1.defineTransactionRequest)({
|
75
63
|
format(args) {
|
76
|
-
if (isTransactionRequestCIP64(args))
|
77
|
-
return {
|
78
|
-
type: '0x7b',
|
79
|
-
feeCurrency: args.feeCurrency,
|
80
|
-
};
|
81
64
|
const request = {
|
82
65
|
feeCurrency: args.feeCurrency,
|
83
|
-
gatewayFee: typeof args.gatewayFee !== 'undefined'
|
84
|
-
? (0, toHex_js_1.numberToHex)(args.gatewayFee)
|
85
|
-
: undefined,
|
86
|
-
gatewayFeeRecipient: args.gatewayFeeRecipient,
|
87
66
|
};
|
88
|
-
if (
|
89
|
-
request.type = '
|
67
|
+
if ((0, utils_js_1.isCIP64)(args))
|
68
|
+
request.type = '0x7b';
|
69
|
+
else {
|
70
|
+
if ((0, utils_js_1.isCIP42)(args))
|
71
|
+
request.type = '0x7c';
|
72
|
+
request.gatewayFee =
|
73
|
+
typeof args.gatewayFee !== 'undefined'
|
74
|
+
? (0, toHex_js_1.numberToHex)(args.gatewayFee)
|
75
|
+
: undefined;
|
76
|
+
request.gatewayFeeRecipient = args.gatewayFeeRecipient;
|
77
|
+
}
|
90
78
|
return request;
|
91
79
|
},
|
92
80
|
}),
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"formatters.js","sourceRoot":"","sources":["../../../chains/celo/formatters.ts"],"names":[],"mappings":";;;AAGA,gEAA6D;AAC7D,4DAA2D;AAC3D,8DAA6D;AAC7D,0EAG8C;AAC9C,wFAAuF;AACvF,wFAAuF;
|
1
|
+
{"version":3,"file":"formatters.js","sourceRoot":"","sources":["../../../chains/celo/formatters.ts"],"names":[],"mappings":";;;AAGA,gEAA6D;AAC7D,4DAA2D;AAC3D,8DAA6D;AAC7D,0EAG8C;AAC9C,wFAAuF;AACvF,wFA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13
13
|
const serializeAccessList_js_1 = require("../../utils/transaction/serializeAccessList.js");
|
14
14
|
const serializeTransaction_js_1 = require("../../utils/transaction/serializeTransaction.js");
|
15
|
+
const utils_js_1 = require("./utils.js");
|
15
16
|
const serializeTransactionCelo = (tx, signature) => {
|
16
|
-
if (isCIP64(tx)) {
|
17
|
+
if ((0, utils_js_1.isCIP64)(tx)) {
|
17
18
|
return serializeTransactionCIP64(tx, signature);
|
18
19
|
}
|
19
|
-
else if (isCIP42(tx)) {
|
20
|
+
else if ((0, utils_js_1.isCIP42)(tx)) {
|
20
21
|
return serializeTransactionCIP42(tx, signature);
|
21
22
|
}
|
22
23
|
else {
|
@@ -65,7 +66,7 @@ function serializeTransactionCIP64(transaction, signature) {
|
|
65
66
|
value ? (0, toHex_js_1.toHex)(value) : '0x',
|
66
67
|
data ?? '0x',
|
67
68
|
(0, serializeAccessList_js_1.serializeAccessList)(accessList),
|
68
|
-
feeCurrency
|
69
|
+
feeCurrency,
|
69
70
|
];
|
70
71
|
if (signature) {
|
71
72
|
serializedTransaction.push(signature.v === 27n ? '0x' : (0, toHex_js_1.toHex)(1), (0, trim_js_1.trim)(signature.r), (0, trim_js_1.trim)(signature.s));
|
@@ -75,29 +76,7 @@ function serializeTransactionCIP64(transaction, signature) {
|
|
75
76
|
(0, toRlp_js_1.toRlp)(serializedTransaction),
|
76
77
|
]);
|
77
78
|
}
|
78
|
-
|
79
|
-
if (transaction.type === 'cip42')
|
80
|
-
return true;
|
81
|
-
if (transaction.type)
|
82
|
-
return false;
|
83
|
-
return ('maxFeePerGas' in transaction &&
|
84
|
-
'maxPriorityFeePerGas' in transaction &&
|
85
|
-
('feeCurrency' in transaction ||
|
86
|
-
'gatewayFee' in transaction ||
|
87
|
-
'gatewayFeeRecipient' in transaction));
|
88
|
-
}
|
89
|
-
function isCIP64(transaction) {
|
90
|
-
if (transaction.type === 'cip64')
|
91
|
-
return true;
|
92
|
-
if (transaction.type)
|
93
|
-
return false;
|
94
|
-
return ('maxFeePerGas' in transaction &&
|
95
|
-
'maxPriorityFeePerGas' in transaction &&
|
96
|
-
'feeCurrency' in transaction &&
|
97
|
-
!('gatewayFee' in transaction) &&
|
98
|
-
!('gatewayFeeRecipient' in transaction));
|
99
|
-
}
|
100
|
-
const MAX_MAX_FEE_PER_GAS = 115792089237316195423570985008687907853269984665640564039457584007913129639935n;
|
79
|
+
const MAX_MAX_FEE_PER_GAS = 2n ** 256n - 1n;
|
101
80
|
function assertTransactionCIP42(transaction) {
|
102
81
|
const { chainId, maxPriorityFeePerGas, gasPrice, maxFeePerGas, to, feeCurrency, gatewayFee, gatewayFeeRecipient, } = transaction;
|
103
82
|
if (chainId <= 0)
|
@@ -106,20 +85,23 @@ function assertTransactionCIP42(transaction) {
|
|
106
85
|
throw new address_js_1.InvalidAddressError({ address: to });
|
107
86
|
if (gasPrice)
|
108
87
|
throw new base_js_1.BaseError('`gasPrice` is not a valid CIP-42 Transaction attribute.');
|
109
|
-
if (maxFeePerGas && maxFeePerGas > MAX_MAX_FEE_PER_GAS)
|
88
|
+
if ((0, utils_js_1.isPresent)(maxFeePerGas) && maxFeePerGas > MAX_MAX_FEE_PER_GAS)
|
110
89
|
throw new node_js_1.FeeCapTooHighError({ maxFeePerGas });
|
111
|
-
if (maxPriorityFeePerGas &&
|
112
|
-
maxFeePerGas &&
|
90
|
+
if ((0, utils_js_1.isPresent)(maxPriorityFeePerGas) &&
|
91
|
+
(0, utils_js_1.isPresent)(maxFeePerGas) &&
|
113
92
|
maxPriorityFeePerGas > maxFeePerGas)
|
114
93
|
throw new node_js_1.TipAboveFeeCapError({ maxFeePerGas, maxPriorityFeePerGas });
|
115
|
-
if ((gatewayFee &&
|
116
|
-
(gatewayFeeRecipient &&
|
94
|
+
if (((0, utils_js_1.isPresent)(gatewayFee) && (0, utils_js_1.isEmpty)(gatewayFeeRecipient)) ||
|
95
|
+
((0, utils_js_1.isPresent)(gatewayFeeRecipient) && (0, utils_js_1.isEmpty)(gatewayFee))) {
|
117
96
|
throw new base_js_1.BaseError('`gatewayFee` and `gatewayFeeRecipient` must be provided together.');
|
118
97
|
}
|
119
|
-
if (feeCurrency && !
|
98
|
+
if ((0, utils_js_1.isPresent)(feeCurrency) && !(0, isAddress_js_1.isAddress)(feeCurrency)) {
|
120
99
|
throw new base_js_1.BaseError('`feeCurrency` MUST be a token address for CIP-42 transactions.');
|
121
100
|
}
|
122
|
-
if (
|
101
|
+
if ((0, utils_js_1.isPresent)(gatewayFeeRecipient) && !(0, isAddress_js_1.isAddress)(gatewayFeeRecipient)) {
|
102
|
+
throw new address_js_1.InvalidAddressError(gatewayFeeRecipient);
|
103
|
+
}
|
104
|
+
if ((0, utils_js_1.isEmpty)(feeCurrency) && (0, utils_js_1.isEmpty)(gatewayFeeRecipient)) {
|
123
105
|
throw new base_js_1.BaseError('Either `feeCurrency` or `gatewayFeeRecipient` must be provided for CIP-42 transactions.');
|
124
106
|
}
|
125
107
|
}
|
@@ -132,16 +114,16 @@ function assertTransactionCIP64(transaction) {
|
|
132
114
|
throw new address_js_1.InvalidAddressError({ address: to });
|
133
115
|
if (gasPrice)
|
134
116
|
throw new base_js_1.BaseError('`gasPrice` is not a valid CIP-64 Transaction attribute.');
|
135
|
-
if (maxFeePerGas && maxFeePerGas > MAX_MAX_FEE_PER_GAS)
|
117
|
+
if ((0, utils_js_1.isPresent)(maxFeePerGas) && maxFeePerGas > MAX_MAX_FEE_PER_GAS)
|
136
118
|
throw new node_js_1.FeeCapTooHighError({ maxFeePerGas });
|
137
|
-
if (maxPriorityFeePerGas &&
|
138
|
-
maxFeePerGas &&
|
119
|
+
if ((0, utils_js_1.isPresent)(maxPriorityFeePerGas) &&
|
120
|
+
(0, utils_js_1.isPresent)(maxFeePerGas) &&
|
139
121
|
maxPriorityFeePerGas > maxFeePerGas)
|
140
122
|
throw new node_js_1.TipAboveFeeCapError({ maxFeePerGas, maxPriorityFeePerGas });
|
141
|
-
if (feeCurrency && !feeCurrency?.startsWith('0x')) {
|
123
|
+
if ((0, utils_js_1.isPresent)(feeCurrency) && !feeCurrency?.startsWith('0x')) {
|
142
124
|
throw new base_js_1.BaseError('`feeCurrency` MUST be a token address for CIP-64 transactions.');
|
143
125
|
}
|
144
|
-
if (
|
126
|
+
if ((0, utils_js_1.isEmpty)(feeCurrency)) {
|
145
127
|
throw new base_js_1.BaseError('`feeCurrency` must be provided for CIP-64 transactions.');
|
146
128
|
}
|
147
129
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"serializers.js","sourceRoot":"","sources":["../../../chains/celo/serializers.ts"],"names":[],"mappings":";;;AAAA,wDAA6D;AAC7D,kDAAgD;AAChD,oDAA2D;AAC3D,kDAA8E;AAI9E,mEAA4D;AAC5D,0DAAsD;AACtD,sDAA+C;AAC/C,4DAAqD;AACrD,4DAAqD;AACrD,2FAAoF;AACpF,6FAGwD;
|
1
|
+
{"version":3,"file":"serializers.js","sourceRoot":"","sources":["../../../chains/celo/serializers.ts"],"names":[],"mappings":";;;AAAA,wDAA6D;AAC7D,kDAAgD;AAChD,oDAA2D;AAC3D,kDAA8E;AAI9E,mEAA4D;AAC5D,0DAAsD;AACtD,sDAA+C;AAC/C,4DAAqD;AACrD,4DAAqD;AACrD,2FAAoF;AACpF,6FAGwD;AAQxD,yCAAiE;AAE1D,MAAM,wBAAwB,GAEjC,CAAC,EAAE,EAAE,SAAS,EAAE,EAAE;IACpB,IAAI,IAAA,kBAAO,EAAC,EAAE,CAAC,EAAE;QACf,OAAO,yBAAyB,CAAC,EAAE,EAAE,SAAS,CAAC,CAAA;KAChD;SAAM,IAAI,IAAA,kBAAO,EAAC,EAAE,CAAC,EAAE;QACtB,OAAO,yBAAyB,CAAC,EAAE,EAAE,SAAS,CAAC,CAAA;KAChD;SAAM;QACL,OAAO,IAAA,8CAAoB,EAAC,EAA6B,EAAE,SAAS,CAAC,CAAA;KACtE;AACH,CAAC,CAAA;AAVY,QAAA,wBAAwB,4BAUpC;AAEY,QAAA,eAAe,GAAG;IAC7B,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,EAAE,YAAY,EAAE,oBAAoB,EAAE,CAAC,CAAA;IAEvE,IAAI,IAAA,oBAAS,EAAC,WAAW,CAAC,IAAI,CAAC,WAAW,EAAE,UAAU,CAAC,IAAI,CAAC,EAAE;QAC5D,MAAM,IAAI,mBAAS,CACjB,gEAAgE,CACjE,CAAA;KACF;IAED,IAAI,IAAA,kBAAO,EAAC,WAAW,CAAC,EAAE;QACxB,MAAM,IAAI,mBAAS,CACjB,yDAAyD,CAC1D,CAAA;KACF;AACH,CAAC;AAxCD,wDAwCC"}
|
@@ -0,0 +1,44 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.isCIP64 = exports.isCIP42 = exports.isEIP1559 = exports.isPresent = exports.isEmpty = void 0;
|
4
|
+
const trim_js_1 = require("../../utils/data/trim.js");
|
5
|
+
function isEmpty(value) {
|
6
|
+
return (value === 0 ||
|
7
|
+
value === 0n ||
|
8
|
+
value === undefined ||
|
9
|
+
value === null ||
|
10
|
+
value === '0' ||
|
11
|
+
value === '' ||
|
12
|
+
(typeof value === 'string' &&
|
13
|
+
((0, trim_js_1.trim)(value).toLowerCase() === '0x' ||
|
14
|
+
(0, trim_js_1.trim)(value).toLowerCase() === '0x00')));
|
15
|
+
}
|
16
|
+
exports.isEmpty = isEmpty;
|
17
|
+
function isPresent(value) {
|
18
|
+
return !isEmpty(value);
|
19
|
+
}
|
20
|
+
exports.isPresent = isPresent;
|
21
|
+
function isEIP1559(transaction) {
|
22
|
+
return (isPresent(transaction.maxFeePerGas) &&
|
23
|
+
isPresent(transaction.maxPriorityFeePerGas));
|
24
|
+
}
|
25
|
+
exports.isEIP1559 = isEIP1559;
|
26
|
+
function isCIP42(transaction) {
|
27
|
+
if (transaction.type)
|
28
|
+
return transaction.type === 'cip42';
|
29
|
+
return (isEIP1559(transaction) &&
|
30
|
+
(isPresent(transaction.feeCurrency) ||
|
31
|
+
isPresent(transaction.gatewayFeeRecipient) ||
|
32
|
+
isPresent(transaction.gatewayFee)));
|
33
|
+
}
|
34
|
+
exports.isCIP42 = isCIP42;
|
35
|
+
function isCIP64(transaction) {
|
36
|
+
if (transaction.type)
|
37
|
+
return transaction.type === 'cip64';
|
38
|
+
return (isEIP1559(transaction) &&
|
39
|
+
isPresent(transaction.feeCurrency) &&
|
40
|
+
isEmpty(transaction.gatewayFee) &&
|
41
|
+
isEmpty(transaction.gatewayFeeRecipient));
|
42
|
+
}
|
43
|
+
exports.isCIP64 = isCIP64;
|
44
|
+
//# sourceMappingURL=utils.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../chains/celo/utils.ts"],"names":[],"mappings":";;;AACA,sDAA+C;AAQ/C,SAAgB,OAAO,CACrB,KAA2C;IAE3C,OAAO,CACL,KAAK,KAAK,CAAC;QACX,KAAK,KAAK,EAAE;QACZ,KAAK,KAAK,SAAS;QACnB,KAAK,KAAK,IAAI;QACd,KAAK,KAAK,GAAG;QACb,KAAK,KAAK,EAAE;QACZ,CAAC,OAAO,KAAK,KAAK,QAAQ;YACxB,CAAC,IAAA,cAAI,EAAC,KAAgB,CAAC,CAAC,WAAW,EAAE,KAAK,IAAI;gBAC5C,IAAA,cAAI,EAAC,KAAgB,CAAC,CAAC,WAAW,EAAE,KAAK,MAAM,CAAC,CAAC,CACtD,CAAA;AACH,CAAC;AAdD,0BAcC;AAED,SAAgB,SAAS,CACvB,KAA2C;IAE3C,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;AACxB,CAAC;AAJD,8BAIC;AAED,SAAgB,SAAS,CACvB,WAAiE;IAEjE,OAAO,CACL,SAAS,CAAC,WAAW,CAAC,YAAY,CAAC;QACnC,SAAS,CAAC,WAAW,CAAC,oBAAoB,CAAC,CAC5C,CAAA;AACH,CAAC;AAPD,8BAOC;AAGD,SAAgB,OAAO,CACrB,WAAiE;IAGjE,IAAI,WAAW,CAAC,IAAI;QAAE,OAAO,WAAW,CAAC,IAAI,KAAK,OAAO,CAAA;IAEzD,OAAO,CACL,SAAS,CAAC,WAAW,CAAC;QACtB,CAAC,SAAS,CAAC,WAAW,CAAC,WAAW,CAAC;YACjC,SAAS,CAAC,WAAW,CAAC,mBAAmB,CAAC;YAC1C,SAAS,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC,CACrC,CAAA;AACH,CAAC;AAZD,0BAYC;AAED,SAAgB,OAAO,CACrB,WAAiE;IAGjE,IAAI,WAAW,CAAC,IAAI;QAAE,OAAO,WAAW,CAAC,IAAI,KAAK,OAAO,CAAA;IAEzD,OAAO,CACL,SAAS,CAAC,WAAW,CAAC;QACtB,SAAS,CAAC,WAAW,CAAC,WAAW,CAAC;QAClC,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC;QAC/B,OAAO,CAAC,WAAW,CAAC,mBAAmB,CAAC,CACzC,CAAA;AACH,CAAC;AAZD,0BAYC"}
|
package/_cjs/errors/node.js
CHANGED
@@ -19,6 +19,7 @@ class ExecutionRevertedError extends base_js_1.BaseError {
|
|
19
19
|
});
|
20
20
|
}
|
21
21
|
}
|
22
|
+
exports.ExecutionRevertedError = ExecutionRevertedError;
|
22
23
|
Object.defineProperty(ExecutionRevertedError, "code", {
|
23
24
|
enumerable: true,
|
24
25
|
configurable: true,
|
@@ -31,7 +32,6 @@ Object.defineProperty(ExecutionRevertedError, "nodeMessage", {
|
|
31
32
|
writable: true,
|
32
33
|
value: /execution reverted/
|
33
34
|
});
|
34
|
-
exports.ExecutionRevertedError = ExecutionRevertedError;
|
35
35
|
class FeeCapTooHighError extends base_js_1.BaseError {
|
36
36
|
constructor({ cause, maxFeePerGas, } = {}) {
|
37
37
|
super(`The fee cap (\`maxFeePerGas\`${maxFeePerGas ? ` = ${(0, formatGwei_js_1.formatGwei)(maxFeePerGas)} gwei` : ''}) cannot be higher than the maximum allowed value (2^256-1).`, {
|
@@ -45,13 +45,13 @@ class FeeCapTooHighError extends base_js_1.BaseError {
|
|
45
45
|
});
|
46
46
|
}
|
47
47
|
}
|
48
|
+
exports.FeeCapTooHighError = FeeCapTooHighError;
|
48
49
|
Object.defineProperty(FeeCapTooHighError, "nodeMessage", {
|
49
50
|
enumerable: true,
|
50
51
|
configurable: true,
|
51
52
|
writable: true,
|
52
53
|
value: /max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/
|
53
54
|
});
|
54
|
-
exports.FeeCapTooHighError = FeeCapTooHighError;
|
55
55
|
class FeeCapTooLowError extends base_js_1.BaseError {
|
56
56
|
constructor({ cause, maxFeePerGas, } = {}) {
|
57
57
|
super(`The fee cap (\`maxFeePerGas\`${maxFeePerGas ? ` = ${(0, formatGwei_js_1.formatGwei)(maxFeePerGas)}` : ''} gwei) cannot be lower than the block base fee.`, {
|
@@ -65,13 +65,13 @@ class FeeCapTooLowError extends base_js_1.BaseError {
|
|
65
65
|
});
|
66
66
|
}
|
67
67
|
}
|
68
|
+
exports.FeeCapTooLowError = FeeCapTooLowError;
|
68
69
|
Object.defineProperty(FeeCapTooLowError, "nodeMessage", {
|
69
70
|
enumerable: true,
|
70
71
|
configurable: true,
|
71
72
|
writable: true,
|
72
73
|
value: /max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/
|
73
74
|
});
|
74
|
-
exports.FeeCapTooLowError = FeeCapTooLowError;
|
75
75
|
class NonceTooHighError extends base_js_1.BaseError {
|
76
76
|
constructor({ cause, nonce } = {}) {
|
77
77
|
super(`Nonce provided for the transaction ${nonce ? `(${nonce}) ` : ''}is higher than the next one expected.`, { cause });
|
@@ -83,13 +83,13 @@ class NonceTooHighError extends base_js_1.BaseError {
|
|
83
83
|
});
|
84
84
|
}
|
85
85
|
}
|
86
|
+
exports.NonceTooHighError = NonceTooHighError;
|
86
87
|
Object.defineProperty(NonceTooHighError, "nodeMessage", {
|
87
88
|
enumerable: true,
|
88
89
|
configurable: true,
|
89
90
|
writable: true,
|
90
91
|
value: /nonce too high/
|
91
92
|
});
|
92
|
-
exports.NonceTooHighError = NonceTooHighError;
|
93
93
|
class NonceTooLowError extends base_js_1.BaseError {
|
94
94
|
constructor({ cause, nonce } = {}) {
|
95
95
|
super([
|
@@ -104,13 +104,13 @@ class NonceTooLowError extends base_js_1.BaseError {
|
|
104
104
|
});
|
105
105
|
}
|
106
106
|
}
|
107
|
+
exports.NonceTooLowError = NonceTooLowError;
|
107
108
|
Object.defineProperty(NonceTooLowError, "nodeMessage", {
|
108
109
|
enumerable: true,
|
109
110
|
configurable: true,
|
110
111
|
writable: true,
|
111
112
|
value: /nonce too low|transaction already imported|already known/
|
112
113
|
});
|
113
|
-
exports.NonceTooLowError = NonceTooLowError;
|
114
114
|
class NonceMaxValueError extends base_js_1.BaseError {
|
115
115
|
constructor({ cause, nonce } = {}) {
|
116
116
|
super(`Nonce provided for the transaction ${nonce ? `(${nonce}) ` : ''}exceeds the maximum allowed nonce.`, { cause });
|
@@ -122,13 +122,13 @@ class NonceMaxValueError extends base_js_1.BaseError {
|
|
122
122
|
});
|
123
123
|
}
|
124
124
|
}
|
125
|
+
exports.NonceMaxValueError = NonceMaxValueError;
|
125
126
|
Object.defineProperty(NonceMaxValueError, "nodeMessage", {
|
126
127
|
enumerable: true,
|
127
128
|
configurable: true,
|
128
129
|
writable: true,
|
129
130
|
value: /nonce has max value/
|
130
131
|
});
|
131
|
-
exports.NonceMaxValueError = NonceMaxValueError;
|
132
132
|
class InsufficientFundsError extends base_js_1.BaseError {
|
133
133
|
constructor({ cause } = {}) {
|
134
134
|
super([
|
@@ -154,13 +154,13 @@ class InsufficientFundsError extends base_js_1.BaseError {
|
|
154
154
|
});
|
155
155
|
}
|
156
156
|
}
|
157
|
+
exports.InsufficientFundsError = InsufficientFundsError;
|
157
158
|
Object.defineProperty(InsufficientFundsError, "nodeMessage", {
|
158
159
|
enumerable: true,
|
159
160
|
configurable: true,
|
160
161
|
writable: true,
|
161
162
|
value: /insufficient funds/
|
162
163
|
});
|
163
|
-
exports.InsufficientFundsError = InsufficientFundsError;
|
164
164
|
class IntrinsicGasTooHighError extends base_js_1.BaseError {
|
165
165
|
constructor({ cause, gas } = {}) {
|
166
166
|
super(`The amount of gas ${gas ? `(${gas}) ` : ''}provided for the transaction exceeds the limit allowed for the block.`, {
|
@@ -174,13 +174,13 @@ class IntrinsicGasTooHighError extends base_js_1.BaseError {
|
|
174
174
|
});
|
175
175
|
}
|
176
176
|
}
|
177
|
+
exports.IntrinsicGasTooHighError = IntrinsicGasTooHighError;
|
177
178
|
Object.defineProperty(IntrinsicGasTooHighError, "nodeMessage", {
|
178
179
|
enumerable: true,
|
179
180
|
configurable: true,
|
180
181
|
writable: true,
|
181
182
|
value: /intrinsic gas too high|gas limit reached/
|
182
183
|
});
|
183
|
-
exports.IntrinsicGasTooHighError = IntrinsicGasTooHighError;
|
184
184
|
class IntrinsicGasTooLowError extends base_js_1.BaseError {
|
185
185
|
constructor({ cause, gas } = {}) {
|
186
186
|
super(`The amount of gas ${gas ? `(${gas}) ` : ''}provided for the transaction is too low.`, {
|
@@ -194,13 +194,13 @@ class IntrinsicGasTooLowError extends base_js_1.BaseError {
|
|
194
194
|
});
|
195
195
|
}
|
196
196
|
}
|
197
|
+
exports.IntrinsicGasTooLowError = IntrinsicGasTooLowError;
|
197
198
|
Object.defineProperty(IntrinsicGasTooLowError, "nodeMessage", {
|
198
199
|
enumerable: true,
|
199
200
|
configurable: true,
|
200
201
|
writable: true,
|
201
202
|
value: /intrinsic gas too low/
|
202
203
|
});
|
203
|
-
exports.IntrinsicGasTooLowError = IntrinsicGasTooLowError;
|
204
204
|
class TransactionTypeNotSupportedError extends base_js_1.BaseError {
|
205
205
|
constructor({ cause }) {
|
206
206
|
super('The transaction type is not supported for this chain.', {
|
@@ -214,13 +214,13 @@ class TransactionTypeNotSupportedError extends base_js_1.BaseError {
|
|
214
214
|
});
|
215
215
|
}
|
216
216
|
}
|
217
|
+
exports.TransactionTypeNotSupportedError = TransactionTypeNotSupportedError;
|
217
218
|
Object.defineProperty(TransactionTypeNotSupportedError, "nodeMessage", {
|
218
219
|
enumerable: true,
|
219
220
|
configurable: true,
|
220
221
|
writable: true,
|
221
222
|
value: /transaction type not valid/
|
222
223
|
});
|
223
|
-
exports.TransactionTypeNotSupportedError = TransactionTypeNotSupportedError;
|
224
224
|
class TipAboveFeeCapError extends base_js_1.BaseError {
|
225
225
|
constructor({ cause, maxPriorityFeePerGas, maxFeePerGas, } = {}) {
|
226
226
|
super([
|
@@ -238,13 +238,13 @@ class TipAboveFeeCapError extends base_js_1.BaseError {
|
|
238
238
|
});
|
239
239
|
}
|
240
240
|
}
|
241
|
+
exports.TipAboveFeeCapError = TipAboveFeeCapError;
|
241
242
|
Object.defineProperty(TipAboveFeeCapError, "nodeMessage", {
|
242
243
|
enumerable: true,
|
243
244
|
configurable: true,
|
244
245
|
writable: true,
|
245
246
|
value: /max priority fee per gas higher than max fee per gas|tip higher than fee cap/
|
246
247
|
});
|
247
|
-
exports.TipAboveFeeCapError = TipAboveFeeCapError;
|
248
248
|
class UnknownNodeError extends base_js_1.BaseError {
|
249
249
|
constructor({ cause }) {
|
250
250
|
super(`An error occurred while executing: ${cause?.shortMessage}`, {
|
package/_cjs/errors/node.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"node.js","sourceRoot":"","sources":["../../errors/node.ts"],"names":[],"mappings":";;;AAAA,+DAAwD;AAExD,uCAAqC;AAerC,MAAa,sBAAuB,SAAQ,mBAAS;IAMnD,YAAY,EACV,KAAK,EACL,OAAO,MACoC,EAAE;QAC7C,MAAM,MAAM,GAAG,OAAO;YACpB,EAAE,OAAO,CAAC,sBAAsB,EAAE,EAAE,CAAC;YACrC,EAAE,OAAO,CAAC,oBAAoB,EAAE,EAAE,CAAC,CAAA;QACrC,KAAK,CACH,sBACE,MAAM,CAAC,CAAC,CAAC,gBAAgB,MAAM,EAAE,CAAC,CAAC,CAAC,uBACtC,GAAG,EACH;YACE,KAAK;SACN,CACF,CAAA;QAhBM;;;;mBAAO,wBAAwB;WAAA;IAiBxC,C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