viem 2.0.0-beta.5 → 2.0.0-beta.6
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/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/errors/node.js +22 -11
- package/_esm/errors/node.js.map +1 -1
- package/_esm/errors/rpc.js +36 -18
- package/_esm/errors/rpc.js.map +1 -1
- package/_esm/errors/version.js +1 -1
- package/_types/chains/celo/chainConfig.d.ts +7 -7
- package/_types/chains/celo/formatters.d.ts +7 -7
- package/_types/chains/definitions/base.d.ts +7 -7
- package/_types/chains/definitions/baseGoerli.d.ts +7 -7
- package/_types/chains/definitions/baseSepolia.d.ts +7 -7
- package/_types/chains/definitions/celo.d.ts +7 -7
- package/_types/chains/definitions/celoAlfajores.d.ts +7 -7
- package/_types/chains/definitions/celoCannoli.d.ts +7 -7
- package/_types/chains/definitions/optimism.d.ts +7 -7
- package/_types/chains/definitions/optimismGoerli.d.ts +7 -7
- package/_types/chains/definitions/optimismSepolia.d.ts +7 -7
- package/_types/chains/definitions/zora.d.ts +7 -7
- package/_types/chains/definitions/zoraSepolia.d.ts +7 -7
- package/_types/chains/definitions/zoraTestnet.d.ts +7 -7
- package/_types/chains/index.d.ts +1 -1
- package/_types/chains/index.d.ts.map +1 -1
- package/_types/chains/opStack/chainConfig.d.ts +7 -7
- package/_types/chains/opStack/formatters.d.ts +7 -7
- package/_types/errors/version.d.ts +1 -1
- package/chains/index.ts +1 -1
- package/errors/version.ts +1 -1
- package/package.json +1 -1
package/_cjs/errors/node.js
CHANGED
@@ -19,7 +19,6 @@ class ExecutionRevertedError extends base_js_1.BaseError {
|
|
19
19
|
});
|
20
20
|
}
|
21
21
|
}
|
22
|
-
exports.ExecutionRevertedError = ExecutionRevertedError;
|
23
22
|
Object.defineProperty(ExecutionRevertedError, "code", {
|
24
23
|
enumerable: true,
|
25
24
|
configurable: true,
|
@@ -32,6 +31,7 @@ Object.defineProperty(ExecutionRevertedError, "nodeMessage", {
|
|
32
31
|
writable: true,
|
33
32
|
value: /execution reverted/
|
34
33
|
});
|
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;
|
49
48
|
Object.defineProperty(FeeCapTooHighError, "nodeMessage", {
|
50
49
|
enumerable: true,
|
51
50
|
configurable: true,
|
52
51
|
writable: true,
|
53
52
|
value: /max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/
|
54
53
|
});
|
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;
|
69
68
|
Object.defineProperty(FeeCapTooLowError, "nodeMessage", {
|
70
69
|
enumerable: true,
|
71
70
|
configurable: true,
|
72
71
|
writable: true,
|
73
72
|
value: /max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/
|
74
73
|
});
|
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;
|
87
86
|
Object.defineProperty(NonceTooHighError, "nodeMessage", {
|
88
87
|
enumerable: true,
|
89
88
|
configurable: true,
|
90
89
|
writable: true,
|
91
90
|
value: /nonce too high/
|
92
91
|
});
|
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;
|
108
107
|
Object.defineProperty(NonceTooLowError, "nodeMessage", {
|
109
108
|
enumerable: true,
|
110
109
|
configurable: true,
|
111
110
|
writable: true,
|
112
111
|
value: /nonce too low|transaction already imported|already known/
|
113
112
|
});
|
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;
|
126
125
|
Object.defineProperty(NonceMaxValueError, "nodeMessage", {
|
127
126
|
enumerable: true,
|
128
127
|
configurable: true,
|
129
128
|
writable: true,
|
130
129
|
value: /nonce has max value/
|
131
130
|
});
|
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;
|
158
157
|
Object.defineProperty(InsufficientFundsError, "nodeMessage", {
|
159
158
|
enumerable: true,
|
160
159
|
configurable: true,
|
161
160
|
writable: true,
|
162
161
|
value: /insufficient funds/
|
163
162
|
});
|
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;
|
178
177
|
Object.defineProperty(IntrinsicGasTooHighError, "nodeMessage", {
|
179
178
|
enumerable: true,
|
180
179
|
configurable: true,
|
181
180
|
writable: true,
|
182
181
|
value: /intrinsic gas too high|gas limit reached/
|
183
182
|
});
|
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;
|
198
197
|
Object.defineProperty(IntrinsicGasTooLowError, "nodeMessage", {
|
199
198
|
enumerable: true,
|
200
199
|
configurable: true,
|
201
200
|
writable: true,
|
202
201
|
value: /intrinsic gas too low/
|
203
202
|
});
|
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;
|
218
217
|
Object.defineProperty(TransactionTypeNotSupportedError, "nodeMessage", {
|
219
218
|
enumerable: true,
|
220
219
|
configurable: true,
|
221
220
|
writable: true,
|
222
221
|
value: /transaction type not valid/
|
223
222
|
});
|
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;
|
242
241
|
Object.defineProperty(TipAboveFeeCapError, "nodeMessage", {
|
243
242
|
enumerable: true,
|
244
243
|
configurable: true,
|
245
244
|
writable: true,
|
246
245
|
value: /max priority fee per gas higher than max fee per gas|tip higher than fee cap/
|
247
246
|
});
|
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,CAAC;;
|
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,CAAC;;AApBM;;;;WAAO,CAAC;EAAJ,CAAI;AACR;;;;WAAc,oBAAoB;EAAvB,CAAuB;AAF9B,wDAAsB;AA2BnC,MAAa,kBAAmB,SAAQ,mBAAS;IAI/C,YAAY,EACV,KAAK,EACL,YAAY,MACoC,EAAE;QAClD,KAAK,CACH,gCACE,YAAY,CAAC,CAAC,CAAC,MAAM,IAAA,0BAAU,EAAC,YA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E,KAAK;SACN,CACF,CAAA;QATM;;;;mBAAO,yBAAyB;WAAA;IAUzC,CAAC;;AAXM;;;;WAAc,uBAAuB;EAA1B,CAA0B;AADjC,0DAAuB;AAmBpC,MAAa,gCAAiC,SAAQ,mBAAS;IAG7D,YAAY,EAAE,KAAK,EAAyB;QAC1C,KAAK,CAAC,uDAAuD,EAAE;YAC7D,KAAK;SACN,CAAC,CAAA;QAJK;;;;mBAAO,kCAAkC;WAAA;IAKlD,CAAC;;AANM;;;;WAAc,4BAA4B;EAA/B,CAA+B;AADtC,4EAAgC;AAa7C,MAAa,mBAAoB,SAAQ,mBAAS;IAIhD,YAAY,EACV,KAAK,EACL,oBAAoB,EACpB,YAAY,MAKV,EAAE;QACJ,KAAK,CACH;YACE,6CACE,oBAAoB;gBAClB,CAAC,CAAC,MAAM,IAAA,0BAAU,EAAC,oBAAoB,CAAC,OAAO;gBAC/C,CAAC,CAAC,EACN,wDACE,YAAY,CAAC,CAAC,CAAC,MAAM,IAAA,0BAAU,EAAC,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC,EACzD,IAAI;SACL,CAAC,IAAI,CAAC,IAAI,CAAC,EACZ;YACE,KAAK;SACN,CACF,CAAA;QAvBM;;;;mBAAO,qBAAqB;WAAA;IAwBrC,CAAC;;AA1BM;;;;WACL,8EAA8E;EAD9D,CAC8D;AAFrE,kDAAmB;AAiChC,MAAa,gBAAiB,SAAQ,mBAAS;IAG7C,YAAY,EAAE,KAAK,EAAyB;QAC1C,KAAK,CAAC,sCAAsC,KAAK,EAAE,YAAY,EAAE,EAAE;YACjE,KAAK;SACN,CAAC,CAAA;QALK;;;;mBAAO,kBAAkB;WAAA;IAMlC,CAAC;CACF;AARD,4CAQC"}
|
package/_cjs/errors/rpc.js
CHANGED
@@ -61,13 +61,13 @@ class ParseRpcError extends RpcError {
|
|
61
61
|
});
|
62
62
|
}
|
63
63
|
}
|
64
|
-
exports.ParseRpcError = ParseRpcError;
|
65
64
|
Object.defineProperty(ParseRpcError, "code", {
|
66
65
|
enumerable: true,
|
67
66
|
configurable: true,
|
68
67
|
writable: true,
|
69
68
|
value: -32700
|
70
69
|
});
|
70
|
+
exports.ParseRpcError = ParseRpcError;
|
71
71
|
class InvalidRequestRpcError extends RpcError {
|
72
72
|
constructor(cause) {
|
73
73
|
super(cause, {
|
@@ -82,13 +82,13 @@ class InvalidRequestRpcError extends RpcError {
|
|
82
82
|
});
|
83
83
|
}
|
84
84
|
}
|
85
|
-
exports.InvalidRequestRpcError = InvalidRequestRpcError;
|
86
85
|
Object.defineProperty(InvalidRequestRpcError, "code", {
|
87
86
|
enumerable: true,
|
88
87
|
configurable: true,
|
89
88
|
writable: true,
|
90
89
|
value: -32600
|
91
90
|
});
|
91
|
+
exports.InvalidRequestRpcError = InvalidRequestRpcError;
|
92
92
|
class MethodNotFoundRpcError extends RpcError {
|
93
93
|
constructor(cause) {
|
94
94
|
super(cause, {
|
@@ -103,13 +103,13 @@ class MethodNotFoundRpcError extends RpcError {
|
|
103
103
|
});
|
104
104
|
}
|
105
105
|
}
|
106
|
-
exports.MethodNotFoundRpcError = MethodNotFoundRpcError;
|
107
106
|
Object.defineProperty(MethodNotFoundRpcError, "code", {
|
108
107
|
enumerable: true,
|
109
108
|
configurable: true,
|
110
109
|
writable: true,
|
111
110
|
value: -32601
|
112
111
|
});
|
112
|
+
exports.MethodNotFoundRpcError = MethodNotFoundRpcError;
|
113
113
|
class InvalidParamsRpcError extends RpcError {
|
114
114
|
constructor(cause) {
|
115
115
|
super(cause, {
|
@@ -127,13 +127,13 @@ class InvalidParamsRpcError extends RpcError {
|
|
127
127
|
});
|
128
128
|
}
|
129
129
|
}
|
130
|
-
exports.InvalidParamsRpcError = InvalidParamsRpcError;
|
131
130
|
Object.defineProperty(InvalidParamsRpcError, "code", {
|
132
131
|
enumerable: true,
|
133
132
|
configurable: true,
|
134
133
|
writable: true,
|
135
134
|
value: -32602
|
136
135
|
});
|
136
|
+
exports.InvalidParamsRpcError = InvalidParamsRpcError;
|
137
137
|
class InternalRpcError extends RpcError {
|
138
138
|
constructor(cause) {
|
139
139
|
super(cause, {
|
@@ -148,13 +148,13 @@ class InternalRpcError extends RpcError {
|
|
148
148
|
});
|
149
149
|
}
|
150
150
|
}
|
151
|
-
exports.InternalRpcError = InternalRpcError;
|
152
151
|
Object.defineProperty(InternalRpcError, "code", {
|
153
152
|
enumerable: true,
|
154
153
|
configurable: true,
|
155
154
|
writable: true,
|
156
155
|
value: -32603
|
157
156
|
});
|
157
|
+
exports.InternalRpcError = InternalRpcError;
|
158
158
|
class InvalidInputRpcError extends RpcError {
|
159
159
|
constructor(cause) {
|
160
160
|
super(cause, {
|
@@ -172,13 +172,13 @@ class InvalidInputRpcError extends RpcError {
|
|
172
172
|
});
|
173
173
|
}
|
174
174
|
}
|
175
|
-
exports.InvalidInputRpcError = InvalidInputRpcError;
|
176
175
|
Object.defineProperty(InvalidInputRpcError, "code", {
|
177
176
|
enumerable: true,
|
178
177
|
configurable: true,
|
179
178
|
writable: true,
|
180
179
|
value: -32000
|
181
180
|
});
|
181
|
+
exports.InvalidInputRpcError = InvalidInputRpcError;
|
182
182
|
class ResourceNotFoundRpcError extends RpcError {
|
183
183
|
constructor(cause) {
|
184
184
|
super(cause, {
|
@@ -193,13 +193,13 @@ class ResourceNotFoundRpcError extends RpcError {
|
|
193
193
|
});
|
194
194
|
}
|
195
195
|
}
|
196
|
-
exports.ResourceNotFoundRpcError = ResourceNotFoundRpcError;
|
197
196
|
Object.defineProperty(ResourceNotFoundRpcError, "code", {
|
198
197
|
enumerable: true,
|
199
198
|
configurable: true,
|
200
199
|
writable: true,
|
201
200
|
value: -32001
|
202
201
|
});
|
202
|
+
exports.ResourceNotFoundRpcError = ResourceNotFoundRpcError;
|
203
203
|
class ResourceUnavailableRpcError extends RpcError {
|
204
204
|
constructor(cause) {
|
205
205
|
super(cause, {
|
@@ -214,13 +214,13 @@ class ResourceUnavailableRpcError extends RpcError {
|
|
214
214
|
});
|
215
215
|
}
|
216
216
|
}
|
217
|
-
exports.ResourceUnavailableRpcError = ResourceUnavailableRpcError;
|
218
217
|
Object.defineProperty(ResourceUnavailableRpcError, "code", {
|
219
218
|
enumerable: true,
|
220
219
|
configurable: true,
|
221
220
|
writable: true,
|
222
221
|
value: -32002
|
223
222
|
});
|
223
|
+
exports.ResourceUnavailableRpcError = ResourceUnavailableRpcError;
|
224
224
|
class TransactionRejectedRpcError extends RpcError {
|
225
225
|
constructor(cause) {
|
226
226
|
super(cause, {
|
@@ -235,13 +235,13 @@ class TransactionRejectedRpcError extends RpcError {
|
|
235
235
|
});
|
236
236
|
}
|
237
237
|
}
|
238
|
-
exports.TransactionRejectedRpcError = TransactionRejectedRpcError;
|
239
238
|
Object.defineProperty(TransactionRejectedRpcError, "code", {
|
240
239
|
enumerable: true,
|
241
240
|
configurable: true,
|
242
241
|
writable: true,
|
243
242
|
value: -32003
|
244
243
|
});
|
244
|
+
exports.TransactionRejectedRpcError = TransactionRejectedRpcError;
|
245
245
|
class MethodNotSupportedRpcError extends RpcError {
|
246
246
|
constructor(cause) {
|
247
247
|
super(cause, {
|
@@ -256,13 +256,13 @@ class MethodNotSupportedRpcError extends RpcError {
|
|
256
256
|
});
|
257
257
|
}
|
258
258
|
}
|
259
|
-
exports.MethodNotSupportedRpcError = MethodNotSupportedRpcError;
|
260
259
|
Object.defineProperty(MethodNotSupportedRpcError, "code", {
|
261
260
|
enumerable: true,
|
262
261
|
configurable: true,
|
263
262
|
writable: true,
|
264
263
|
value: -32004
|
265
264
|
});
|
265
|
+
exports.MethodNotSupportedRpcError = MethodNotSupportedRpcError;
|
266
266
|
class LimitExceededRpcError extends RpcError {
|
267
267
|
constructor(cause) {
|
268
268
|
super(cause, {
|
@@ -277,13 +277,13 @@ class LimitExceededRpcError extends RpcError {
|
|
277
277
|
});
|
278
278
|
}
|
279
279
|
}
|
280
|
-
exports.LimitExceededRpcError = LimitExceededRpcError;
|
281
280
|
Object.defineProperty(LimitExceededRpcError, "code", {
|
282
281
|
enumerable: true,
|
283
282
|
configurable: true,
|
284
283
|
writable: true,
|
285
284
|
value: -32005
|
286
285
|
});
|
286
|
+
exports.LimitExceededRpcError = LimitExceededRpcError;
|
287
287
|
class JsonRpcVersionUnsupportedError extends RpcError {
|
288
288
|
constructor(cause) {
|
289
289
|
super(cause, {
|
@@ -298,13 +298,13 @@ class JsonRpcVersionUnsupportedError extends RpcError {
|
|
298
298
|
});
|
299
299
|
}
|
300
300
|
}
|
301
|
-
exports.JsonRpcVersionUnsupportedError = JsonRpcVersionUnsupportedError;
|
302
301
|
Object.defineProperty(JsonRpcVersionUnsupportedError, "code", {
|
303
302
|
enumerable: true,
|
304
303
|
configurable: true,
|
305
304
|
writable: true,
|
306
305
|
value: -32006
|
307
306
|
});
|
307
|
+
exports.JsonRpcVersionUnsupportedError = JsonRpcVersionUnsupportedError;
|
308
308
|
class UserRejectedRequestError extends ProviderRpcError {
|
309
309
|
constructor(cause) {
|
310
310
|
super(cause, {
|
@@ -319,13 +319,13 @@ class UserRejectedRequestError extends ProviderRpcError {
|
|
319
319
|
});
|
320
320
|
}
|
321
321
|
}
|
322
|
-
exports.UserRejectedRequestError = UserRejectedRequestError;
|
323
322
|
Object.defineProperty(UserRejectedRequestError, "code", {
|
324
323
|
enumerable: true,
|
325
324
|
configurable: true,
|
326
325
|
writable: true,
|
327
326
|
value: 4001
|
328
327
|
});
|
328
|
+
exports.UserRejectedRequestError = UserRejectedRequestError;
|
329
329
|
class UnauthorizedProviderError extends ProviderRpcError {
|
330
330
|
constructor(cause) {
|
331
331
|
super(cause, {
|
@@ -340,13 +340,13 @@ class UnauthorizedProviderError extends ProviderRpcError {
|
|
340
340
|
});
|
341
341
|
}
|
342
342
|
}
|
343
|
-
exports.UnauthorizedProviderError = UnauthorizedProviderError;
|
344
343
|
Object.defineProperty(UnauthorizedProviderError, "code", {
|
345
344
|
enumerable: true,
|
346
345
|
configurable: true,
|
347
346
|
writable: true,
|
348
347
|
value: 4100
|
349
348
|
});
|
349
|
+
exports.UnauthorizedProviderError = UnauthorizedProviderError;
|
350
350
|
class UnsupportedProviderMethodError extends ProviderRpcError {
|
351
351
|
constructor(cause) {
|
352
352
|
super(cause, {
|
@@ -361,13 +361,13 @@ class UnsupportedProviderMethodError extends ProviderRpcError {
|
|
361
361
|
});
|
362
362
|
}
|
363
363
|
}
|
364
|
-
exports.UnsupportedProviderMethodError = UnsupportedProviderMethodError;
|
365
364
|
Object.defineProperty(UnsupportedProviderMethodError, "code", {
|
366
365
|
enumerable: true,
|
367
366
|
configurable: true,
|
368
367
|
writable: true,
|
369
368
|
value: 4200
|
370
369
|
});
|
370
|
+
exports.UnsupportedProviderMethodError = UnsupportedProviderMethodError;
|
371
371
|
class ProviderDisconnectedError extends ProviderRpcError {
|
372
372
|
constructor(cause) {
|
373
373
|
super(cause, {
|
@@ -382,13 +382,13 @@ class ProviderDisconnectedError extends ProviderRpcError {
|
|
382
382
|
});
|
383
383
|
}
|
384
384
|
}
|
385
|
-
exports.ProviderDisconnectedError = ProviderDisconnectedError;
|
386
385
|
Object.defineProperty(ProviderDisconnectedError, "code", {
|
387
386
|
enumerable: true,
|
388
387
|
configurable: true,
|
389
388
|
writable: true,
|
390
389
|
value: 4900
|
391
390
|
});
|
391
|
+
exports.ProviderDisconnectedError = ProviderDisconnectedError;
|
392
392
|
class ChainDisconnectedError extends ProviderRpcError {
|
393
393
|
constructor(cause) {
|
394
394
|
super(cause, {
|
@@ -403,13 +403,13 @@ class ChainDisconnectedError extends ProviderRpcError {
|
|
403
403
|
});
|
404
404
|
}
|
405
405
|
}
|
406
|
-
exports.ChainDisconnectedError = ChainDisconnectedError;
|
407
406
|
Object.defineProperty(ChainDisconnectedError, "code", {
|
408
407
|
enumerable: true,
|
409
408
|
configurable: true,
|
410
409
|
writable: true,
|
411
410
|
value: 4901
|
412
411
|
});
|
412
|
+
exports.ChainDisconnectedError = ChainDisconnectedError;
|
413
413
|
class SwitchChainError extends ProviderRpcError {
|
414
414
|
constructor(cause) {
|
415
415
|
super(cause, {
|
@@ -424,13 +424,13 @@ class SwitchChainError extends ProviderRpcError {
|
|
424
424
|
});
|
425
425
|
}
|
426
426
|
}
|
427
|
-
exports.SwitchChainError = SwitchChainError;
|
428
427
|
Object.defineProperty(SwitchChainError, "code", {
|
429
428
|
enumerable: true,
|
430
429
|
configurable: true,
|
431
430
|
writable: true,
|
432
431
|
value: 4902
|
433
432
|
});
|
433
|
+
exports.SwitchChainError = SwitchChainError;
|
434
434
|
class UnknownRpcError extends RpcError {
|
435
435
|
constructor(cause) {
|
436
436
|
super(cause, {
|
package/_cjs/errors/rpc.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"rpc.js","sourceRoot":"","sources":["../../errors/rpc.ts"],"names":[],"mappings":";;;AACA,uCAAqC;AACrC,6CAA8C;AAE9C,MAAM,gBAAgB,GAAG,CAAC,CAAC,CAAA;AA+B3B,MAAa,QAA8C,SAAQ,mBAAS;IAK1E,YACE,KAAY,EACZ,EAAE,IAAI,EAAE,QAAQ,EAAE,YAAY,EAAE,YAAY,EAA0B;QAEtE,KAAK,CAAC,YAAY,EAAE;YAClB,KAAK;YACL,QAAQ;YACR,YAAY,EACV,YAAY,IAAK,KAAqC,EAAE,YAAY;SACvE,CAAC,CAAA;QAbK;;;;mBAAO,UAAU;WAAA;QAE1B;;;;;WAA2B;QAYzB,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAA;QACtB,IAAI,CAAC,IAAI,GAAG,CACV,KAAK,YAAY,4BAAe,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,gBAAgB,CAChE,CAAA;IACZ,CAAC;CACF;AApBD,4BAoBC;AAkBD,MAAa,gBAEX,SAAQ,QAA8B;IAKtC,YACE,KAAY,EACZ,OAIC;QAED,KAAK,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA;QAZd;;;;mBAAO,kBAAkB;WAAA;QAElC;;;;;WAAQ;QAY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,CAAgB;AAFhB,4CAAgB;AAkB7B,MAAa,eAAgB,SAAQ,QAAQ;IAG3C,YAAY,KAAY;QACtB,KAAK,CAAC,KAAK,EAAE;YACX,YAAY,EAAE,gCAAgC;SAC/C,CAAC,CAAA;QALK;;;;mBAAO,iBAAiB;WAAA;IAMjC,CAAC;CACF;AARD,0CAQC"}
|
package/_cjs/errors/version.js
CHANGED
package/_esm/errors/node.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { formatGwei } from '../utils/unit/formatGwei.js';
|
2
2
|
import { BaseError } from './base.js';
|
3
|
-
|
3
|
+
class ExecutionRevertedError extends BaseError {
|
4
4
|
constructor({ cause, message, } = {}) {
|
5
5
|
const reason = message
|
6
6
|
?.replace('execution reverted: ', '')
|
@@ -28,7 +28,8 @@ Object.defineProperty(ExecutionRevertedError, "nodeMessage", {
|
|
28
28
|
writable: true,
|
29
29
|
value: /execution reverted/
|
30
30
|
});
|
31
|
-
export
|
31
|
+
export { ExecutionRevertedError };
|
32
|
+
class FeeCapTooHighError extends BaseError {
|
32
33
|
constructor({ cause, maxFeePerGas, } = {}) {
|
33
34
|
super(`The fee cap (\`maxFeePerGas\`${maxFeePerGas ? ` = ${formatGwei(maxFeePerGas)} gwei` : ''}) cannot be higher than the maximum allowed value (2^256-1).`, {
|
34
35
|
cause,
|
@@ -47,7 +48,8 @@ Object.defineProperty(FeeCapTooHighError, "nodeMessage", {
|
|
47
48
|
writable: true,
|
48
49
|
value: /max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/
|
49
50
|
});
|
50
|
-
export
|
51
|
+
export { FeeCapTooHighError };
|
52
|
+
class FeeCapTooLowError extends BaseError {
|
51
53
|
constructor({ cause, maxFeePerGas, } = {}) {
|
52
54
|
super(`The fee cap (\`maxFeePerGas\`${maxFeePerGas ? ` = ${formatGwei(maxFeePerGas)}` : ''} gwei) cannot be lower than the block base fee.`, {
|
53
55
|
cause,
|
@@ -66,7 +68,8 @@ Object.defineProperty(FeeCapTooLowError, "nodeMessage", {
|
|
66
68
|
writable: true,
|
67
69
|
value: /max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/
|
68
70
|
});
|
69
|
-
export
|
71
|
+
export { FeeCapTooLowError };
|
72
|
+
class NonceTooHighError extends BaseError {
|
70
73
|
constructor({ cause, nonce } = {}) {
|
71
74
|
super(`Nonce provided for the transaction ${nonce ? `(${nonce}) ` : ''}is higher than the next one expected.`, { cause });
|
72
75
|
Object.defineProperty(this, "name", {
|
@@ -83,7 +86,8 @@ Object.defineProperty(NonceTooHighError, "nodeMessage", {
|
|
83
86
|
writable: true,
|
84
87
|
value: /nonce too high/
|
85
88
|
});
|
86
|
-
export
|
89
|
+
export { NonceTooHighError };
|
90
|
+
class NonceTooLowError extends BaseError {
|
87
91
|
constructor({ cause, nonce } = {}) {
|
88
92
|
super([
|
89
93
|
`Nonce provided for the transaction ${nonce ? `(${nonce}) ` : ''}is lower than the current nonce of the account.`,
|
@@ -103,7 +107,8 @@ Object.defineProperty(NonceTooLowError, "nodeMessage", {
|
|
103
107
|
writable: true,
|
104
108
|
value: /nonce too low|transaction already imported|already known/
|
105
109
|
});
|
106
|
-
export
|
110
|
+
export { NonceTooLowError };
|
111
|
+
class NonceMaxValueError extends BaseError {
|
107
112
|
constructor({ cause, nonce } = {}) {
|
108
113
|
super(`Nonce provided for the transaction ${nonce ? `(${nonce}) ` : ''}exceeds the maximum allowed nonce.`, { cause });
|
109
114
|
Object.defineProperty(this, "name", {
|
@@ -120,7 +125,8 @@ Object.defineProperty(NonceMaxValueError, "nodeMessage", {
|
|
120
125
|
writable: true,
|
121
126
|
value: /nonce has max value/
|
122
127
|
});
|
123
|
-
export
|
128
|
+
export { NonceMaxValueError };
|
129
|
+
class InsufficientFundsError extends BaseError {
|
124
130
|
constructor({ cause } = {}) {
|
125
131
|
super([
|
126
132
|
'The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account.',
|
@@ -151,7 +157,8 @@ Object.defineProperty(InsufficientFundsError, "nodeMessage", {
|
|
151
157
|
writable: true,
|
152
158
|
value: /insufficient funds/
|
153
159
|
});
|
154
|
-
export
|
160
|
+
export { InsufficientFundsError };
|
161
|
+
class IntrinsicGasTooHighError extends BaseError {
|
155
162
|
constructor({ cause, gas } = {}) {
|
156
163
|
super(`The amount of gas ${gas ? `(${gas}) ` : ''}provided for the transaction exceeds the limit allowed for the block.`, {
|
157
164
|
cause,
|
@@ -170,7 +177,8 @@ Object.defineProperty(IntrinsicGasTooHighError, "nodeMessage", {
|
|
170
177
|
writable: true,
|
171
178
|
value: /intrinsic gas too high|gas limit reached/
|
172
179
|
});
|
173
|
-
export
|
180
|
+
export { IntrinsicGasTooHighError };
|
181
|
+
class IntrinsicGasTooLowError extends BaseError {
|
174
182
|
constructor({ cause, gas } = {}) {
|
175
183
|
super(`The amount of gas ${gas ? `(${gas}) ` : ''}provided for the transaction is too low.`, {
|
176
184
|
cause,
|
@@ -189,7 +197,8 @@ Object.defineProperty(IntrinsicGasTooLowError, "nodeMessage", {
|
|
189
197
|
writable: true,
|
190
198
|
value: /intrinsic gas too low/
|
191
199
|
});
|
192
|
-
export
|
200
|
+
export { IntrinsicGasTooLowError };
|
201
|
+
class TransactionTypeNotSupportedError extends BaseError {
|
193
202
|
constructor({ cause }) {
|
194
203
|
super('The transaction type is not supported for this chain.', {
|
195
204
|
cause,
|
@@ -208,7 +217,8 @@ Object.defineProperty(TransactionTypeNotSupportedError, "nodeMessage", {
|
|
208
217
|
writable: true,
|
209
218
|
value: /transaction type not valid/
|
210
219
|
});
|
211
|
-
export
|
220
|
+
export { TransactionTypeNotSupportedError };
|
221
|
+
class TipAboveFeeCapError extends BaseError {
|
212
222
|
constructor({ cause, maxPriorityFeePerGas, maxFeePerGas, } = {}) {
|
213
223
|
super([
|
214
224
|
`The provided tip (\`maxPriorityFeePerGas\`${maxPriorityFeePerGas
|
@@ -231,6 +241,7 @@ Object.defineProperty(TipAboveFeeCapError, "nodeMessage", {
|
|
231
241
|
writable: true,
|
232
242
|
value: /max priority fee per gas higher than max fee per gas|tip higher than fee cap/
|
233
243
|
});
|
244
|
+
export { TipAboveFeeCapError };
|
234
245
|
export class UnknownNodeError extends BaseError {
|
235
246
|
constructor({ cause }) {
|
236
247
|
super(`An error occurred while executing: ${cause?.shortMessage}`, {
|
package/_esm/errors/node.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"node.js","sourceRoot":"","sources":["../../errors/node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AAExD,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAerC,
|
1
|
+
{"version":3,"file":"node.js","sourceRoot":"","sources":["../../errors/node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AAExD,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAerC,MAAa,sBAAuB,SAAQ,SAAS;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,CAAC;;AApBM;;;;WAAO,CAAC;EAAJ,CAAI;AACR;;;;WAAc,oBAAoB;EAAvB,CAAuB;SAF9B,sBAAsB;AA2BnC,MAAa,kBAAmB,SAAQ,SAAS;IAI/C,YAAY,EACV,KAAK,EACL,YAAY,MACoC,EAAE;QAClD,KAAK,CACH,gCACE,YAAY,CAAC,CAAC,CAAC,MAAM,UAAU,CAAC,YAAY,CAAC,OAAO,CAAC,C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