@ethersproject/providers
Advanced tools
Comparing version 5.6.4 to 5.6.5
@@ -1,2 +0,2 @@ | ||
export declare const version = "providers/5.6.4"; | ||
export declare const version = "providers/5.6.5"; | ||
//# sourceMappingURL=_version.d.ts.map |
@@ -1,2 +0,2 @@ | ||
export const version = "providers/5.6.4"; | ||
export const version = "providers/5.6.5"; | ||
//# sourceMappingURL=_version.js.map |
@@ -11,2 +11,8 @@ import { showThrottleMessage } from "./formatter"; | ||
return "rpc.ankr.com/eth/"; | ||
case "ropsten": | ||
return "rpc.ankr.com/eth_ropsten/"; | ||
case "rinkeby": | ||
return "rpc.ankr.com/eth_rinkeby/"; | ||
case "goerli": | ||
return "rpc.ankr.com/eth_goerli/"; | ||
case "matic": | ||
@@ -13,0 +19,0 @@ return "rpc.ankr.com/polygon/"; |
@@ -77,3 +77,3 @@ "use strict"; | ||
// "insufficient funds for gas * price + value + cost(data)" | ||
if (message.match(/insufficient funds|base fee exceeds gas limit/)) { | ||
if (message.match(/insufficient funds|base fee exceeds gas limit/i)) { | ||
logger.throwError("insufficient funds for intrinsic transaction cost", Logger.errors.INSUFFICIENT_FUNDS, { | ||
@@ -84,3 +84,3 @@ error, method, transaction | ||
// "nonce too low" | ||
if (message.match(/nonce (is )?too low/)) { | ||
if (message.match(/nonce (is )?too low/i)) { | ||
logger.throwError("nonce has already been used", Logger.errors.NONCE_EXPIRED, { | ||
@@ -91,3 +91,3 @@ error, method, transaction | ||
// "replacement transaction underpriced" | ||
if (message.match(/replacement transaction underpriced/)) { | ||
if (message.match(/replacement transaction underpriced|transaction gas price.*too low/i)) { | ||
logger.throwError("replacement fee too low", Logger.errors.REPLACEMENT_UNDERPRICED, { | ||
@@ -98,3 +98,3 @@ error, method, transaction | ||
// "replacement transaction underpriced" | ||
if (message.match(/only replay-protected/)) { | ||
if (message.match(/only replay-protected/i)) { | ||
logger.throwError("legacy pre-eip-155 transactions not supported", Logger.errors.UNSUPPORTED_OPERATION, { | ||
@@ -502,3 +502,3 @@ error, method, transaction | ||
if (tx && tx.type != null && BigNumber.from(tx.type).isZero()) { | ||
// If there are no EIP-1559 properties, it might be non-EIP-a559 | ||
// If there are no EIP-1559 properties, it might be non-EIP-1559 | ||
if (tx.maxFeePerGas == null && tx.maxPriorityFeePerGas == null) { | ||
@@ -605,3 +605,3 @@ const feeData = yield this.getFeeData(); | ||
} | ||
const value = hexValue(transaction[key]); | ||
const value = hexValue(BigNumber.from(transaction[key])); | ||
if (key === "gasLimit") { | ||
@@ -608,0 +608,0 @@ key = "gas"; |
@@ -1,2 +0,2 @@ | ||
export declare const version = "providers/5.6.4"; | ||
export declare const version = "providers/5.6.5"; | ||
//# sourceMappingURL=_version.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.version = void 0; | ||
exports.version = "providers/5.6.4"; | ||
exports.version = "providers/5.6.5"; | ||
//# sourceMappingURL=_version.js.map |
@@ -29,2 +29,8 @@ "use strict"; | ||
return "rpc.ankr.com/eth/"; | ||
case "ropsten": | ||
return "rpc.ankr.com/eth_ropsten/"; | ||
case "rinkeby": | ||
return "rpc.ankr.com/eth_rinkeby/"; | ||
case "goerli": | ||
return "rpc.ankr.com/eth_goerli/"; | ||
case "matic": | ||
@@ -31,0 +37,0 @@ return "rpc.ankr.com/polygon/"; |
@@ -122,3 +122,3 @@ "use strict"; | ||
// "insufficient funds for gas * price + value + cost(data)" | ||
if (message.match(/insufficient funds|base fee exceeds gas limit/)) { | ||
if (message.match(/insufficient funds|base fee exceeds gas limit/i)) { | ||
logger.throwError("insufficient funds for intrinsic transaction cost", logger_1.Logger.errors.INSUFFICIENT_FUNDS, { | ||
@@ -131,3 +131,3 @@ error: error, | ||
// "nonce too low" | ||
if (message.match(/nonce (is )?too low/)) { | ||
if (message.match(/nonce (is )?too low/i)) { | ||
logger.throwError("nonce has already been used", logger_1.Logger.errors.NONCE_EXPIRED, { | ||
@@ -140,3 +140,3 @@ error: error, | ||
// "replacement transaction underpriced" | ||
if (message.match(/replacement transaction underpriced/)) { | ||
if (message.match(/replacement transaction underpriced|transaction gas price.*too low/i)) { | ||
logger.throwError("replacement fee too low", logger_1.Logger.errors.REPLACEMENT_UNDERPRICED, { | ||
@@ -149,3 +149,3 @@ error: error, | ||
// "replacement transaction underpriced" | ||
if (message.match(/only replay-protected/)) { | ||
if (message.match(/only replay-protected/i)) { | ||
logger.throwError("legacy pre-eip-155 transactions not supported", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { | ||
@@ -775,3 +775,3 @@ error: error, | ||
} | ||
var value = (0, bytes_1.hexValue)(transaction[key]); | ||
var value = (0, bytes_1.hexValue)(bignumber_1.BigNumber.from(transaction[key])); | ||
if (key === "gasLimit") { | ||
@@ -778,0 +778,0 @@ key = "gas"; |
@@ -49,3 +49,3 @@ { | ||
], | ||
"gitHead": "7bc9c6b953491c7a2297e64460eae3fd8e0e60b5", | ||
"gitHead": "fc1e006575d59792fa97b4efb9ea2f8cca1944cf", | ||
"keywords": [ | ||
@@ -71,5 +71,5 @@ "Ethereum", | ||
"sideEffects": false, | ||
"tarballHash": "0x98814719c4a1517f463a920356cdd7222458bee014cb7409f7c9715068e28e66", | ||
"tarballHash": "0x7a45763f3e787cc940b0f2717661a0a248e2d6d8c9bceb0e845f75cc83422144", | ||
"types": "./lib/index.d.ts", | ||
"version": "5.6.4" | ||
"version": "5.6.5" | ||
} |
@@ -1,1 +0,1 @@ | ||
export const version = "providers/5.6.4"; | ||
export const version = "providers/5.6.5"; |
@@ -20,4 +20,12 @@ | ||
return "rpc.ankr.com/eth/"; | ||
case "ropsten": | ||
return "rpc.ankr.com/eth_ropsten/"; | ||
case "rinkeby": | ||
return "rpc.ankr.com/eth_rinkeby/"; | ||
case "goerli": | ||
return "rpc.ankr.com/eth_goerli/"; | ||
case "matic": | ||
return "rpc.ankr.com/polygon/"; | ||
case "arbitrum": | ||
@@ -24,0 +32,0 @@ return "rpc.ankr.com/arbitrum/"; |
@@ -80,3 +80,3 @@ "use strict"; | ||
// "insufficient funds for gas * price + value + cost(data)" | ||
if (message.match(/insufficient funds|base fee exceeds gas limit/)) { | ||
if (message.match(/insufficient funds|base fee exceeds gas limit/i)) { | ||
logger.throwError("insufficient funds for intrinsic transaction cost", Logger.errors.INSUFFICIENT_FUNDS, { | ||
@@ -88,3 +88,3 @@ error, method, transaction | ||
// "nonce too low" | ||
if (message.match(/nonce (is )?too low/)) { | ||
if (message.match(/nonce (is )?too low/i)) { | ||
logger.throwError("nonce has already been used", Logger.errors.NONCE_EXPIRED, { | ||
@@ -96,3 +96,3 @@ error, method, transaction | ||
// "replacement transaction underpriced" | ||
if (message.match(/replacement transaction underpriced/)) { | ||
if (message.match(/replacement transaction underpriced|transaction gas price.*too low/i)) { | ||
logger.throwError("replacement fee too low", Logger.errors.REPLACEMENT_UNDERPRICED, { | ||
@@ -104,3 +104,3 @@ error, method, transaction | ||
// "replacement transaction underpriced" | ||
if (message.match(/only replay-protected/)) { | ||
if (message.match(/only replay-protected/i)) { | ||
logger.throwError("legacy pre-eip-155 transactions not supported", Logger.errors.UNSUPPORTED_OPERATION, { | ||
@@ -573,3 +573,3 @@ error, method, transaction | ||
if (tx && tx.type != null && BigNumber.from(tx.type).isZero()) { | ||
// If there are no EIP-1559 properties, it might be non-EIP-a559 | ||
// If there are no EIP-1559 properties, it might be non-EIP-1559 | ||
if (tx.maxFeePerGas == null && tx.maxPriorityFeePerGas == null) { | ||
@@ -679,3 +679,3 @@ const feeData = await this.getFeeData(); | ||
if ((<any>transaction)[key] == null) { return; } | ||
const value = hexValue((<any>transaction)[key]); | ||
const value = hexValue(BigNumber.from((<any>transaction)[key])); | ||
if (key === "gasLimit") { key = "gas"; } | ||
@@ -682,0 +682,0 @@ result[key] = value; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1197638
17824