forked from tornado-packages/ethers.js
Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b39e955eb6 | ||
|
|
399356b912 | ||
|
|
4512e97f9b | ||
|
|
762c2f34ea | ||
|
|
48bbef7ade | ||
|
|
4665fb4c68 | ||
|
|
b1bb69356a | ||
|
|
a8afb72fbb | ||
|
|
085a9054f3 | ||
|
|
ddaa87a2e6 | ||
|
|
5afe840552 |
81
.github/ISSUE_TEMPLATE/bug-report-legacy.yml
vendored
Normal file
81
.github/ISSUE_TEMPLATE/bug-report-legacy.yml
vendored
Normal file
@@ -0,0 +1,81 @@
|
||||
name: Bug Report
|
||||
description: Open an issue for a bug in Ethers v5 (legacy)
|
||||
title: "Add Bug Title Here"
|
||||
labels: ["investigate", "v5"]
|
||||
assignees:
|
||||
- ricmoo
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
**READ THIS FIRST** and follow all instructions, please. `:)`
|
||||
|
||||
Thank you for taking the time to report an issue. This form is for reporting **bugs within ethers**, specifically for the legacy v5 branch.
|
||||
|
||||
If you are **new to ethers** or *uncertain* whether this is a bug in ethers, a bug in another framework or a bug in your own code, please [start a discussion](https://github.com/ethers-io/ethers.js/discussions) first.
|
||||
- type: input
|
||||
id: version
|
||||
attributes:
|
||||
label: Ethers Version
|
||||
description: What version of ethers are you using? Before opening an issue, please make sure you are up to date.
|
||||
placeholder: 5.y.z
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: search-terms
|
||||
attributes:
|
||||
label: Search Terms
|
||||
description: Have you searched for answers [in the documentation](https://docs.ethers.org), through [the issues](https://github.com/ethers-io/ethers.js/issues) and [on the discusions](https://github.com/ethers-io/ethers.js/discussions)? Please include the search terms you have tried. This helps us add more keywords where needed.
|
||||
placeholder: e.g. abi, network, utf8
|
||||
- type: textarea
|
||||
id: about-the-bug
|
||||
attributes:
|
||||
label: Describe the Problem
|
||||
description: Please describe what you expected to happen vs what did happen?
|
||||
placeholder: What happened?
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: code-snippet
|
||||
attributes:
|
||||
label: Code Snippet
|
||||
description: If possible, please include a **short and concise** code snippets that can reproduce this issue. Ideally code that can be pasted into the [Ethers Playground](https://playground.ethers.org).
|
||||
placeholder: e.g. provider.getBlockNumber()
|
||||
render: shell
|
||||
- type: textarea
|
||||
id: contract-abi
|
||||
attributes:
|
||||
label: Contract ABI
|
||||
description: If this involves a contract, please include any **concise and relevant** ABI fragments.
|
||||
placeholder: e.g. [ 'function balanceOf(address owner) view returns (uint)' ]
|
||||
render: shell
|
||||
- type: textarea
|
||||
id: errors
|
||||
attributes:
|
||||
label: Errors
|
||||
description: If there is an error, please include the **entire error** (redacting any sensitive information).
|
||||
placeholder: "e.g. Error: invalid name (code='INVALID_ARGUMENT, ...)"
|
||||
render: shell
|
||||
- type: dropdown
|
||||
id: environment
|
||||
attributes:
|
||||
label: Environment
|
||||
description: What environment, platforms or frameworks are you using? Select all that apply.
|
||||
multiple: true
|
||||
options:
|
||||
- Ethereum (mainnet/ropsten/rinkeby/goerli)
|
||||
- Altcoin - Please specify (e.g. Polygon)
|
||||
- node.js (v12 or newer)
|
||||
- node.js (older than v12)
|
||||
- Browser (Chrome, Safari, etc)
|
||||
- React Native/Expo/JavaScriptCore
|
||||
- Hardhat
|
||||
- Geth
|
||||
- Parity
|
||||
- Ganache
|
||||
- Other (please specify)
|
||||
- type: input
|
||||
id: other-envrionment
|
||||
attributes:
|
||||
label: Environment (Other)
|
||||
placeholder: anything else?
|
||||
8
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
8
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
@@ -1,7 +1,7 @@
|
||||
name: Bug Report
|
||||
description: Open an issue for a bug in Ethers
|
||||
title: "Bug Report Title"
|
||||
labels: ["investigate"]
|
||||
description: Open an issue for a bug in Ethers v6 (latest)
|
||||
title: "Add Bug Title Here"
|
||||
labels: ["investigate", "v6"]
|
||||
assignees:
|
||||
- ricmoo
|
||||
body:
|
||||
@@ -18,7 +18,7 @@ body:
|
||||
attributes:
|
||||
label: Ethers Version
|
||||
description: What version of ethers are you using? Before opening an issue, please make sure you are up to date.
|
||||
placeholder: x.y.z
|
||||
placeholder: 6.y.z
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
|
||||
@@ -4,6 +4,8 @@ tsconfig.*.json
|
||||
tsconfig.tsbuildinfo
|
||||
rollup.config.js
|
||||
output/**
|
||||
docs.wrm/**
|
||||
.github/**
|
||||
|
||||
# Ignore admin scripts and files
|
||||
src.ts/_admin/**
|
||||
|
||||
44
dist/ethers.js
vendored
44
dist/ethers.js
vendored
@@ -1,4 +1,8 @@
|
||||
const version = "6.0.3";
|
||||
/* Do NOT modify this file; see /src.ts/_admin/update-version.ts */
|
||||
/**
|
||||
* The current version of Ethers.
|
||||
*/
|
||||
const version = "6.0.4";
|
||||
|
||||
/**
|
||||
* Property helper functions.
|
||||
@@ -171,7 +175,7 @@ function makeError(message, code, info) {
|
||||
}
|
||||
defineProperties(error, { code });
|
||||
if (info) {
|
||||
defineProperties(error, info);
|
||||
Object.assign(error, info);
|
||||
}
|
||||
return error;
|
||||
}
|
||||
@@ -11000,7 +11004,11 @@ function getBuiltinCallException(action, tx, data, abiCoder) {
|
||||
message = "execution reverted";
|
||||
const bytes = getBytes(data);
|
||||
data = hexlify(data);
|
||||
if (bytes.length % 32 !== 4) {
|
||||
if (bytes.length === 0) {
|
||||
message += " (no data present; likely require(false) occurred";
|
||||
reason = "require(false)";
|
||||
}
|
||||
else if (bytes.length % 32 !== 4) {
|
||||
message += " (could not decode reason; invalid data length)";
|
||||
}
|
||||
else if (hexlify(bytes.slice(0, 4)) === "0x08c379a0") {
|
||||
@@ -11015,8 +11023,7 @@ function getBuiltinCallException(action, tx, data, abiCoder) {
|
||||
message += `: ${JSON.stringify(reason)}`;
|
||||
}
|
||||
catch (error) {
|
||||
console.log(error);
|
||||
message += " (could not decode reason; invalid data)";
|
||||
message += " (could not decode reason; invalid string data)";
|
||||
}
|
||||
}
|
||||
else if (hexlify(bytes.slice(0, 4)) === "0x4e487b71") {
|
||||
@@ -11032,8 +11039,7 @@ function getBuiltinCallException(action, tx, data, abiCoder) {
|
||||
message += `: ${reason}`;
|
||||
}
|
||||
catch (error) {
|
||||
console.log(error);
|
||||
message += " (could not decode panic reason)";
|
||||
message += " (could not decode panic code)";
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -11842,16 +11848,15 @@ getSelector(fragment: ErrorFragment | FunctionFragment): string {
|
||||
const data = getBytes(_data, "data");
|
||||
const error = AbiCoder.getBuiltinCallException("call", tx, data);
|
||||
// Not a built-in error; try finding a custom error
|
||||
if (!error.message.match(/could not decode/)) {
|
||||
const customPrefix = "execution reverted (unknown custom error)";
|
||||
if (error.message.startsWith(customPrefix)) {
|
||||
const selector = hexlify(data.slice(0, 4));
|
||||
error.message = "execution reverted (unknown custom error)";
|
||||
const ef = this.getError(selector);
|
||||
if (ef) {
|
||||
try {
|
||||
const args = this.#abiCoder.decode(ef.inputs, data.slice(4));
|
||||
error.revert = {
|
||||
name: ef.name,
|
||||
signature: ef.format(),
|
||||
args: this.#abiCoder.decode(ef.inputs, data.slice(4))
|
||||
name: ef.name, signature: ef.format(), args
|
||||
};
|
||||
error.reason = error.revert.signature;
|
||||
error.message = `execution reverted: ${error.reason}`;
|
||||
@@ -15916,14 +15921,23 @@ class AbstractProvider {
|
||||
"function name(bytes32) view returns (string)"
|
||||
], this);
|
||||
const name = await resolverContract.name(node);
|
||||
// Failed forward resolution
|
||||
const check = await this.resolveName(name);
|
||||
if (check !== address) {
|
||||
console.log("FAIL", address, check);
|
||||
return null;
|
||||
}
|
||||
return name;
|
||||
}
|
||||
catch (error) {
|
||||
console.log("TEMP", error);
|
||||
// No data was returned from the resolver
|
||||
if (isError(error, "BAD_DATA") && error.value === "0x") {
|
||||
return null;
|
||||
}
|
||||
// Something reerted
|
||||
if (isError(error, "CALL_EXCEPTION")) {
|
||||
return null;
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@@ -18992,7 +19006,7 @@ function getMedian(quorum, results) {
|
||||
}
|
||||
// Get the sorted values
|
||||
values.sort((a, b) => ((a < b) ? -1 : (b > a) ? 1 : 0));
|
||||
const mid = values.length / 2;
|
||||
const mid = Math.floor(values.length / 2);
|
||||
// Odd-length; take the middle value
|
||||
if (values.length % 2) {
|
||||
return values[mid];
|
||||
|
||||
2
dist/ethers.js.map
vendored
2
dist/ethers.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/ethers.min.js
vendored
2
dist/ethers.min.js
vendored
File diff suppressed because one or more lines are too long
8
dist/wordlists-extra.js
vendored
8
dist/wordlists-extra.js
vendored
@@ -145,7 +145,11 @@ const u64 = {
|
||||
add, add3L, add3H, add4L, add4H, add5H, add5L,
|
||||
};
|
||||
|
||||
const version = "6.0.3";
|
||||
/* Do NOT modify this file; see /src.ts/_admin/update-version.ts */
|
||||
/**
|
||||
* The current version of Ethers.
|
||||
*/
|
||||
const version = "6.0.4";
|
||||
|
||||
/**
|
||||
* Property helper functions.
|
||||
@@ -278,7 +282,7 @@ function makeError(message, code, info) {
|
||||
}
|
||||
defineProperties(error, { code });
|
||||
if (info) {
|
||||
defineProperties(error, info);
|
||||
Object.assign(error, info);
|
||||
}
|
||||
return error;
|
||||
}
|
||||
|
||||
2
dist/wordlists-extra.js.map
vendored
2
dist/wordlists-extra.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/wordlists-extra.min.js
vendored
2
dist/wordlists-extra.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
|
||||
_section: Contributings and Hacking @<about-contrib> @priority<-90>
|
||||
_section: Contributions and Hacking @<about-contrib> @priority<-90>
|
||||
|
||||
Pull requests are welcome, but please keep the following in mind:
|
||||
|
||||
@@ -93,7 +93,7 @@ _subsection: Adding Features @<about-contrib-feature>
|
||||
|
||||
Contributing new features usually require a deeper understanding
|
||||
of the internal interactions with Ethers and its components, and
|
||||
generally requires a minor version bumpincludes anything w
|
||||
generally requires a minor version bump.
|
||||
|
||||
When making any of the following changes, you must first open a
|
||||
[[link-discussion]] as the minor version will need to be bumped.
|
||||
|
||||
@@ -48,7 +48,7 @@ objects available and what they are responsible for, at a high level.
|
||||
_heading: Provider
|
||||
|
||||
A [[Provider]] is a read-only connection to the blockchain, which allows
|
||||
querying the blockchain state, such as accout, block or transaction details,
|
||||
querying the blockchain state, such as account, block or transaction details,
|
||||
querying event logs or evaluating read-only code using call.
|
||||
|
||||
If you are coming from Web3.js, you are used to a **Provider** offering
|
||||
@@ -118,7 +118,7 @@ extension that injects objects into the ``window``, providing:
|
||||
- authenticated write access backed by a private key (a [[Signer]])
|
||||
|
||||
When requesting access to the authenticated methods, such as
|
||||
sending a transaction or even requesting the private key addess,
|
||||
sending a transaction or even requesting the private key address,
|
||||
MetaMask will show a pop-up to the user asking for permission.
|
||||
|
||||
_code: @lang<script>
|
||||
@@ -172,7 +172,7 @@ _code: connecting to a JSON-RPC URL @lang<script>
|
||||
_subsection: User Interaction @<starting-display>
|
||||
|
||||
All units in Ethereum tend to be integer values, since dealing with
|
||||
decimals and floating points can lead to inprecise and non-obvious
|
||||
decimals and floating points can lead to imprecise and non-obvious
|
||||
results when performing mathematic operations.
|
||||
|
||||
As a result, the internal units used (e.g. wei) which are suited for
|
||||
@@ -272,7 +272,7 @@ _subsection: Contracts @<starting-contracts>
|
||||
|
||||
A **Contract** is a meta-class, which means that its definition
|
||||
its derived at run-time, based on the ABI it is passed, which then
|
||||
determined what mehods and properties are available on it.
|
||||
determined what methods and properties are available on it.
|
||||
|
||||
_heading: Application Binary Interface (ABI)
|
||||
|
||||
@@ -291,7 +291,7 @@ Any methods or events that are not needed can be safely excluded.
|
||||
There are several common formats available to describe an ABI. The
|
||||
Solidity compiler usually dumps a JSON representation but when typing
|
||||
an ABI by hand it is often easier (and more readable) to use the
|
||||
human-readable ABI, which is just the Solidity signautre.
|
||||
human-readable ABI, which is just the Solidity signature.
|
||||
|
||||
_code: simplified ERC-20 ABI @lang<script>
|
||||
abi = [
|
||||
@@ -478,7 +478,7 @@ it. It can also be used to sign other forms of data, which are then able
|
||||
to be validated for other purposes.
|
||||
|
||||
For example, signing **a message** can be used to prove ownership of an
|
||||
account which a website could use to authenicate a user and log them in.
|
||||
account which a website could use to authenticate a user and log them in.
|
||||
|
||||
_code: @lang<javascript>
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ _section: Documentation @<about-home> @nav<Documentation>
|
||||
The ethers.js library aims to be a complete and compact library
|
||||
for interacting with the Ethereum Blockchain and its ecosystem.
|
||||
|
||||
It is ofen used to create decentralized applications (dapps),
|
||||
It is often used to create decentralized applications (dapps),
|
||||
wallets (such as [[link-metamask]] and [[link-tally]]) and
|
||||
other tools and simple scripts that require reading and writing
|
||||
to the blockchain.
|
||||
@@ -14,7 +14,7 @@ _subsection: About this documentation?
|
||||
These docs are still under construction, and are being expanded
|
||||
every day.
|
||||
|
||||
Developers new to Ethers shoud be sure to read through the
|
||||
Developers new to Ethers should be sure to read through the
|
||||
[[getting-started]] section.
|
||||
|
||||
And the [[about-api]] is available for drilling down into more details
|
||||
|
||||
@@ -34,7 +34,7 @@ link-infura-secret [link-infura-secret](https://infura.io/docs/gettingStarted/au
|
||||
link-parity-trace [link-parity-trace](https://openethereum.github.io/wiki/JSONRPC-trace-module)
|
||||
link-parity-rpc [link-parity-rpc](https://openethereum.github.io/wiki/JSONRPC)
|
||||
link-pocket-signup [link-pocket-signup](https://pokt.network/pocket-gateway-ethereum-mainnet/)
|
||||
link-web3 [link-web3](https://github.com/ethereum/web3.js)
|
||||
link-web3js [link-web3](https://github.com/ethereum/web3.js)
|
||||
link-web3-http [link-web3-http](https://github.com/ethereum/web3.js/tree/1.x/packages/web3-providers-http)
|
||||
link-web3-ipc [link-web3-ipc](https://github.com/ethereum/web3.js/tree/1.x/packages/web3-providers-ipc)
|
||||
link-web3-send [link-web3-send](https://github.com/ethereum/web3.js/blob/1.x/packages/web3-providers-http/types/index.d.ts#L57)
|
||||
|
||||
@@ -10,7 +10,11 @@ so a lot of changes are largely internal.
|
||||
- [BigNumbers](migrate-bigint)
|
||||
- [Contracts](migrate-contracts)
|
||||
- [Importing](migrate-importing)
|
||||
- [Odds and Ends](migrate-other)
|
||||
- [Providers](migrate-providers)
|
||||
- [Signatures](migrate-signatures)
|
||||
- [Transactions](migrate-transactions)
|
||||
- [Utilities](migrate-utils)
|
||||
- [Removed Items](migrate-missing)
|
||||
|
||||
|
||||
_subsection: Big Numbers @<migrate-bigint>
|
||||
@@ -32,7 +36,7 @@ _code: creating large numbers @lang<script>
|
||||
// Using BigNumber in v5
|
||||
value = BigNumber.from("1000")
|
||||
|
||||
// Using BigInt in v6 (ysing literal notation).
|
||||
// Using BigInt in v6 (using literal notation).
|
||||
// Notice the suffix n
|
||||
value = 1000n
|
||||
|
||||
@@ -193,10 +197,95 @@ _code: importing in v6 @lang<script>
|
||||
import { InfuraProvider } from "ethers/providers"
|
||||
|
||||
|
||||
_subsection: Odds and Ends @<migrate-other>
|
||||
_subsection: Providers @<migrate-providers>
|
||||
|
||||
In addition to all the ``ethers.providers.*`` being moved to
|
||||
``ethers.*``, the biggest change developers need to keep in
|
||||
mind is that ``Web3Provider`` (which historically was used
|
||||
to wrap [[link-web3js]] providers) is now called
|
||||
[[BrowserProvider]] which is designed to wrap EIP-1193
|
||||
providers, which is the standard that both modern Web3.js and
|
||||
injected providers offer.
|
||||
|
||||
_code: wrapping EIP-1193 providers @lang<script>
|
||||
// v5
|
||||
provider = new ethers.providers.Web3Provider(window.ethereum)
|
||||
|
||||
// v6:
|
||||
provider = new ethers.BrowserProvider(window.ethereum)
|
||||
|
||||
|
||||
_code: default AbiCoder @lang<script>
|
||||
_subsection: Signatures @<migrate-signatures>
|
||||
|
||||
The Signature is now a class which facilitates all the parsing
|
||||
and serializing.
|
||||
|
||||
_code: signature manipulation
|
||||
// v5
|
||||
splitSig = splitSignature(sigBytes)
|
||||
sigBytes = joinSignature(splitSig)
|
||||
|
||||
// v6
|
||||
splitSig = ethers.Signature.from(sigBytes)
|
||||
sigBytes = ethers.Signature.from(splitSig).serialized
|
||||
|
||||
|
||||
_subsection: Transactions @<migrate-transactions>
|
||||
|
||||
The transaction helpers present in v5 were all wrapped into a
|
||||
[[Transaction]] class, which can handle any supported transaction
|
||||
format to be further processed
|
||||
|
||||
_code: parasing transactions @lang<script>
|
||||
|
||||
// v5
|
||||
tx = parseTransaction(txBytes)
|
||||
txBytes = serializeTransaction(tx)
|
||||
txBytes = serializeTransaction(tx, sig)
|
||||
|
||||
// v6
|
||||
tx = Transaction.from(txBytes)
|
||||
|
||||
// v6 (the tx can optionally include the signature)
|
||||
txBytes = Transaction.from(tx).serialized
|
||||
|
||||
|
||||
_subsection: Utilities @<migrate-utils>
|
||||
|
||||
_code: Bytes32 string helpers @lang<script>
|
||||
// In v5:
|
||||
bytes32 = ethers.utils.formatBytes32String(text)
|
||||
text = ethers.utils.parseBytes32String(bytes32)
|
||||
|
||||
// In v6:
|
||||
bytes32 = ethers.encodeBytes32String(text)
|
||||
text = ethers.decodeBytes32String(bytes32)
|
||||
|
||||
_code: constants @lang<script>
|
||||
// v5:
|
||||
ethers.constants.AddressZero
|
||||
ethers.constants.HashZero
|
||||
|
||||
// v6:
|
||||
ethers.ZeroAddress
|
||||
ethers.ZeroHash
|
||||
|
||||
_code: data manipulation @lang<script>
|
||||
// v5
|
||||
slice = ethers.utils.hexDataSlice(value, start, end)
|
||||
padded = ethers.utils.hexZeroPad(value, length)
|
||||
|
||||
// v5; converting numbers to hexstrings
|
||||
hex = hexlify(35)
|
||||
|
||||
// v6
|
||||
slice = ethers.dataSlice(value, start, end)
|
||||
padded = ethers.zeroPadValue(value, length)
|
||||
|
||||
// v6; converting numbers to hexstrings
|
||||
hex = toBeHex(35)
|
||||
|
||||
_code: defaultAbiCoder @lang<script>
|
||||
// In v5, it is a property of AbiCoder
|
||||
coder = AbiCoder.defaultAbiCoder
|
||||
|
||||
@@ -206,23 +295,27 @@ _code: default AbiCoder @lang<script>
|
||||
// instance is returned.
|
||||
coder = AbiCoder.defaultAbiCoder()
|
||||
|
||||
_code: getting a JSON-RPC quantity @lang<script>
|
||||
// In v5:
|
||||
hex = ethers.util.hexValue(value)
|
||||
_code: hex conversion @lang<script>
|
||||
// v5
|
||||
hex = ethers.utils.hexValue(value)
|
||||
array = ethers.utils.arrayify(value)
|
||||
|
||||
// In v6:
|
||||
// v6
|
||||
hex = ethers.toQuantity(value)
|
||||
array = ethers.getBytes(value)
|
||||
|
||||
_code: using Bytes32 strings @lang<script>
|
||||
// In v5:
|
||||
bytes32 = formatBytes32String(text)
|
||||
text = parseBytes32String(bytes32)
|
||||
_code: solidity non-standard packed @lang<script>
|
||||
// v5
|
||||
ethers.utils.solidityPack(types, values)
|
||||
|
||||
// In v6:
|
||||
bytes32 = encodeBytes32String(text)
|
||||
text = decodeBytes32String(bytes32)
|
||||
// v6
|
||||
ethers.solidityPacked(types, values)
|
||||
|
||||
_subsection: Removed Classes and functions
|
||||
|
||||
_subsection: Removed Classes and functions @<migrate-missing>
|
||||
|
||||
The **Logger** class has been replaced by
|
||||
[several Error utility functions](about-errors).
|
||||
|
||||
The ``checkProperties`` and ``shallowCopy`` have been
|
||||
removed in favor of using ``.map`` and ``Object.assign``.
|
||||
|
||||
@@ -189,11 +189,19 @@ describe("Test Provider Transaction operations", function () {
|
||||
assert_1.default.ok(receipt != null, "receipt != null");
|
||||
// Cloudflare doesn't return the root in legacy receipts; but it isn't
|
||||
// *actually* that important, so we'll give it a pass...
|
||||
if (providerName === "CloudflareProvider") {
|
||||
if (providerName === "CloudflareProvider" || providerName === "AnkrProvider" || providerName === "PocketProvider") {
|
||||
test = Object.assign({}, test, { root: undefined });
|
||||
}
|
||||
//if (providerName === "PocketProvider") {
|
||||
//}
|
||||
assertReceipt(receipt, test);
|
||||
};
|
||||
});
|
||||
forEach("test lookupAddress(addr) == null", blockchain_data_js_1.testReceipt, (providerName, test) => {
|
||||
return async (provider) => {
|
||||
const name = await provider.lookupAddress("0x0123456789012345678901234567890123456789");
|
||||
assert_1.default.ok(name == null, "name == null");
|
||||
};
|
||||
});
|
||||
});
|
||||
//# sourceMappingURL=test-providers-data.js.map
|
||||
File diff suppressed because one or more lines are too long
3
lib.commonjs/_version.d.ts
vendored
3
lib.commonjs/_version.d.ts
vendored
@@ -1 +1,4 @@
|
||||
/**
|
||||
* The current version of Ethers.
|
||||
*/
|
||||
export declare const version: string;
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
"use strict";
|
||||
/* Do NOT modify this file; see /src.ts/_admin/update-version.ts */
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = void 0;
|
||||
exports.version = "6.0.3";
|
||||
/**
|
||||
* The current version of Ethers.
|
||||
*/
|
||||
exports.version = "6.0.4";
|
||||
//# sourceMappingURL=_version.js.map
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAW,OAAO,CAAC"}
|
||||
{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":";AAAA,mEAAmE;;;AAEnE;;GAEG;AACU,QAAA,OAAO,GAAW,OAAO,CAAC"}
|
||||
@@ -52,7 +52,11 @@ function getBuiltinCallException(action, tx, data, abiCoder) {
|
||||
message = "execution reverted";
|
||||
const bytes = (0, index_js_3.getBytes)(data);
|
||||
data = (0, index_js_3.hexlify)(data);
|
||||
if (bytes.length % 32 !== 4) {
|
||||
if (bytes.length === 0) {
|
||||
message += " (no data present; likely require(false) occurred";
|
||||
reason = "require(false)";
|
||||
}
|
||||
else if (bytes.length % 32 !== 4) {
|
||||
message += " (could not decode reason; invalid data length)";
|
||||
}
|
||||
else if ((0, index_js_3.hexlify)(bytes.slice(0, 4)) === "0x08c379a0") {
|
||||
@@ -67,8 +71,7 @@ function getBuiltinCallException(action, tx, data, abiCoder) {
|
||||
message += `: ${JSON.stringify(reason)}`;
|
||||
}
|
||||
catch (error) {
|
||||
console.log(error);
|
||||
message += " (could not decode reason; invalid data)";
|
||||
message += " (could not decode reason; invalid string data)";
|
||||
}
|
||||
}
|
||||
else if ((0, index_js_3.hexlify)(bytes.slice(0, 4)) === "0x4e487b71") {
|
||||
@@ -84,8 +87,7 @@ function getBuiltinCallException(action, tx, data, abiCoder) {
|
||||
message += `: ${reason}`;
|
||||
}
|
||||
catch (error) {
|
||||
console.log(error);
|
||||
message += " (could not decode panic reason)";
|
||||
message += " (could not decode panic code)";
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -670,16 +670,15 @@ getSelector(fragment: ErrorFragment | FunctionFragment): string {
|
||||
const data = (0, index_js_3.getBytes)(_data, "data");
|
||||
const error = abi_coder_js_1.AbiCoder.getBuiltinCallException("call", tx, data);
|
||||
// Not a built-in error; try finding a custom error
|
||||
if (!error.message.match(/could not decode/)) {
|
||||
const customPrefix = "execution reverted (unknown custom error)";
|
||||
if (error.message.startsWith(customPrefix)) {
|
||||
const selector = (0, index_js_3.hexlify)(data.slice(0, 4));
|
||||
error.message = "execution reverted (unknown custom error)";
|
||||
const ef = this.getError(selector);
|
||||
if (ef) {
|
||||
try {
|
||||
const args = this.#abiCoder.decode(ef.inputs, data.slice(4));
|
||||
error.revert = {
|
||||
name: ef.name,
|
||||
signature: ef.format(),
|
||||
args: this.#abiCoder.decode(ef.inputs, data.slice(4))
|
||||
name: ef.name, signature: ef.format(), args
|
||||
};
|
||||
error.reason = error.revert.signature;
|
||||
error.message = `execution reverted: ${error.reason}`;
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.dnsEncode = exports.namehash = exports.isValidName = exports.ensNormalize = void 0;
|
||||
const index_js_1 = require("../crypto/index.js");
|
||||
const index_js_2 = require("../utils/index.js");
|
||||
const xnf_1 = require("@adraffy/ens-normalize/xnf");
|
||||
const ens_normalize_1 = require("@adraffy/ens-normalize");
|
||||
const Zeros = new Uint8Array(32);
|
||||
Zeros.fill(0);
|
||||
function checkComponent(comp) {
|
||||
@@ -35,7 +35,7 @@ function ensNameSplit(name) {
|
||||
*/
|
||||
function ensNormalize(name) {
|
||||
try {
|
||||
return (0, xnf_1.ens_normalize)(name);
|
||||
return (0, ens_normalize_1.ens_normalize)(name);
|
||||
}
|
||||
catch (error) {
|
||||
(0, index_js_2.assertArgument)(false, `invalid ENS name (${error.message})`, "name", name);
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"namehash.js","sourceRoot":"","sources":["../../src.ts/hash/namehash.ts"],"names":[],"mappings":";;;AACA,iDAA+C;AAC/C,gDAE2B;AAG3B,oDAA2D;AAE3D,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;AACjC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAEd,SAAS,cAAc,CAAC,IAAgB;IACpC,IAAA,yBAAc,EAAC,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,mCAAmC,EAAE,MAAM,EAAE,IAAI,CAAC,CAAA;IACpF,OAAO,IAAI,CAAC;AAChB,CAAC;AAED,SAAS,YAAY,CAAC,IAAY;IAC9B,MAAM,KAAK,GAAG,IAAA,sBAAW,EAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC;IAC9C,MAAM,KAAK,GAAsB,EAAG,CAAC;IAErC,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;QAAE,OAAO,KAAK,CAAC;KAAE;IAExC,IAAI,IAAI,GAAG,CAAC,CAAC;IACb,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACnC,MAAM,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QAEnB,8CAA8C;QAC9C,I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AAChB,CAAC;AAbD,8BAaC"}
|
||||
@@ -733,14 +733,23 @@ class AbstractProvider {
|
||||
"function name(bytes32) view returns (string)"
|
||||
], this);
|
||||
const name = await resolverContract.name(node);
|
||||
// Failed forward resolution
|
||||
const check = await this.resolveName(name);
|
||||
if (check !== address) {
|
||||
console.log("FAIL", address, check);
|
||||
return null;
|
||||
}
|
||||
return name;
|
||||
}
|
||||
catch (error) {
|
||||
console.log("TEMP", error);
|
||||
// No data was returned from the resolver
|
||||
if ((0, index_js_6.isError)(error, "BAD_DATA") && error.value === "0x") {
|
||||
return null;
|
||||
}
|
||||
// Something reerted
|
||||
if ((0, index_js_6.isError)(error, "CALL_EXCEPTION")) {
|
||||
return null;
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -138,7 +138,7 @@ function getMedian(quorum, results) {
|
||||
}
|
||||
// Get the sorted values
|
||||
values.sort((a, b) => ((a < b) ? -1 : (b > a) ? 1 : 0));
|
||||
const mid = values.length / 2;
|
||||
const mid = Math.floor(values.length / 2);
|
||||
// Odd-length; take the middle value
|
||||
if (values.length % 2) {
|
||||
return values[mid];
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -122,7 +122,7 @@ function makeError(message, code, info) {
|
||||
}
|
||||
(0, properties_js_1.defineProperties)(error, { code });
|
||||
if (info) {
|
||||
(0, properties_js_1.defineProperties)(error, info);
|
||||
Object.assign(error, info);
|
||||
}
|
||||
return error;
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -14,7 +14,7 @@ async function getNpmPackage(name) {
|
||||
return cache[name] || null;
|
||||
}
|
||||
function writeVersion(version) {
|
||||
const content = `export const version: string = "${version}";\n`;
|
||||
const content = `/* Do NOT modify this file; see /src.ts/_admin/update-version.ts */\n\n/**\n * The current version of Ethers.\n */\nexport const version: string = "${version}";\n`;
|
||||
atomicWrite(resolve("src.ts/_version.ts"), content);
|
||||
}
|
||||
(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,IAAI,OAAO,KAAK,aAAa,EAAE;QAE5B,2CAA2C;QAC3C,IAAI,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE;YACzB,gDAAgD;YAChD,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;YACpD,IAAI,UAAU,IAAI,IAAI,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE;gBAC/C,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;aAC1C;YACD,OAAO,CAAC,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC,aAAa,EAAE,YAAY,EAAE,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;SACpF;aAAM,IAAI,MAAM,CAAC,KAAK,CAAC,aAAa,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;YACrE,0EAA0E;YAC1E,OAAO,CAAC,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;SACxD;QAED,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC;QAE1B,wBAAwB;QACxB,QAAQ,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;QAEjC,8BAA8B;QAC9B,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;KACjC;AAEL,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACjB,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACrB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACnB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AACnB,CAAC,CAAC,CAAC"}
|
||||
@@ -184,11 +184,19 @@ describe("Test Provider Transaction operations", function () {
|
||||
assert.ok(receipt != null, "receipt != null");
|
||||
// Cloudflare doesn't return the root in legacy receipts; but it isn't
|
||||
// *actually* that important, so we'll give it a pass...
|
||||
if (providerName === "CloudflareProvider") {
|
||||
if (providerName === "CloudflareProvider" || providerName === "AnkrProvider" || providerName === "PocketProvider") {
|
||||
test = Object.assign({}, test, { root: undefined });
|
||||
}
|
||||
//if (providerName === "PocketProvider") {
|
||||
//}
|
||||
assertReceipt(receipt, test);
|
||||
};
|
||||
});
|
||||
forEach("test lookupAddress(addr) == null", testReceipt, (providerName, test) => {
|
||||
return async (provider) => {
|
||||
const name = await provider.lookupAddress("0x0123456789012345678901234567890123456789");
|
||||
assert.ok(name == null, "name == null");
|
||||
};
|
||||
});
|
||||
});
|
||||
//# sourceMappingURL=test-providers-data.js.map
|
||||
File diff suppressed because one or more lines are too long
@@ -1,2 +1,6 @@
|
||||
export const version = "6.0.3";
|
||||
/* Do NOT modify this file; see /src.ts/_admin/update-version.ts */
|
||||
/**
|
||||
* The current version of Ethers.
|
||||
*/
|
||||
export const version = "6.0.4";
|
||||
//# sourceMappingURL=_version.js.map
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAW,OAAO,CAAC"}
|
||||
{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,mEAAmE;AAEnE;;GAEG;AACH,MAAM,CAAC,MAAM,OAAO,GAAW,OAAO,CAAC"}
|
||||
@@ -49,7 +49,11 @@ function getBuiltinCallException(action, tx, data, abiCoder) {
|
||||
message = "execution reverted";
|
||||
const bytes = getBytes(data);
|
||||
data = hexlify(data);
|
||||
if (bytes.length % 32 !== 4) {
|
||||
if (bytes.length === 0) {
|
||||
message += " (no data present; likely require(false) occurred";
|
||||
reason = "require(false)";
|
||||
}
|
||||
else if (bytes.length % 32 !== 4) {
|
||||
message += " (could not decode reason; invalid data length)";
|
||||
}
|
||||
else if (hexlify(bytes.slice(0, 4)) === "0x08c379a0") {
|
||||
@@ -64,8 +68,7 @@ function getBuiltinCallException(action, tx, data, abiCoder) {
|
||||
message += `: ${JSON.stringify(reason)}`;
|
||||
}
|
||||
catch (error) {
|
||||
console.log(error);
|
||||
message += " (could not decode reason; invalid data)";
|
||||
message += " (could not decode reason; invalid string data)";
|
||||
}
|
||||
}
|
||||
else if (hexlify(bytes.slice(0, 4)) === "0x4e487b71") {
|
||||
@@ -81,8 +84,7 @@ function getBuiltinCallException(action, tx, data, abiCoder) {
|
||||
message += `: ${reason}`;
|
||||
}
|
||||
catch (error) {
|
||||
console.log(error);
|
||||
message += " (could not decode panic reason)";
|
||||
message += " (could not decode panic code)";
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -662,16 +662,15 @@ getSelector(fragment: ErrorFragment | FunctionFragment): string {
|
||||
const data = getBytes(_data, "data");
|
||||
const error = AbiCoder.getBuiltinCallException("call", tx, data);
|
||||
// Not a built-in error; try finding a custom error
|
||||
if (!error.message.match(/could not decode/)) {
|
||||
const customPrefix = "execution reverted (unknown custom error)";
|
||||
if (error.message.startsWith(customPrefix)) {
|
||||
const selector = hexlify(data.slice(0, 4));
|
||||
error.message = "execution reverted (unknown custom error)";
|
||||
const ef = this.getError(selector);
|
||||
if (ef) {
|
||||
try {
|
||||
const args = this.#abiCoder.decode(ef.inputs, data.slice(4));
|
||||
error.revert = {
|
||||
name: ef.name,
|
||||
signature: ef.format(),
|
||||
args: this.#abiCoder.decode(ef.inputs, data.slice(4))
|
||||
name: ef.name, signature: ef.format(), args
|
||||
};
|
||||
error.reason = error.revert.signature;
|
||||
error.message = `execution reverted: ${error.reason}`;
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,6 +1,6 @@
|
||||
import { keccak256 } from "../crypto/index.js";
|
||||
import { concat, hexlify, assertArgument, toUtf8Bytes } from "../utils/index.js";
|
||||
import { ens_normalize } from "@adraffy/ens-normalize/xnf";
|
||||
import { ens_normalize } from "@adraffy/ens-normalize";
|
||||
const Zeros = new Uint8Array(32);
|
||||
Zeros.fill(0);
|
||||
function checkComponent(comp) {
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"namehash.js","sourceRoot":"","sources":["../../src.ts/hash/namehash.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EACH,MAAM,EAAE,OAAO,EAAE,cAAc,EAAE,WAAW,EAC/C,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAE3D,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;AACjC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAEd,SAAS,cAAc,CAAC,IAAgB;IACpC,cAAc,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,mCAAmC,EAAE,MAAM,EAAE,IAAI,CAAC,CAAA;IACpF,OAAO,IAAI,CAAC;AAChB,CAAC;AAED,SAAS,YAAY,CAAC,IAAY;IAC9B,MAAM,KAAK,GAAG,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC;IAC9C,MAAM,KAAK,GAAsB,EAAG,CAAC;IAErC,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;QAAE,OAAO,KAAK,CAAC;KAAE;IAExC,IAAI,IAAI,GAAG,CAAC,CAAC;IACb,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACnC,MAAM,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QAEnB,8CAA8C;QAC9C,IAAI,CAAC,KAAK,IAAI,EAAE;YACZ,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;YACjD,IAAI,GAAG,CAAC,GAAG,CAAC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jC,cAAc,CAAC,OAAM,CAAC,IAAI,CAAC,KAAK,QAAQ,EAAE,gCAAgC,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;IAE1F,IAAI,MAAM,GAAwB,KAAK,CAAC;IAExC,MAAM,KAAK,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IACjC,OAAO,KAAK,CAAC,MAAM,EAAE;QACjB,MAAM,GAAG,SAAS,CAAC,MAAM,CAAC,CAAE,MAAM,EAAE,SAAS,CAAa,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAE,CAAC,CAAC;KAChF;IAED,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC;AAC3B,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,SAAS,CAAC,IAAY;IAClC,OAAO,OAAO,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QAClD,wDAAwD;QACxD,IAAI,IAAI,CAAC,MAAM,GAAG,EAAE,EAAE;YAClB,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;SACzE;QAED,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QAC9C,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;QACnB,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;QAC5B,OAAO,KAAK,CAAC;IAEjB,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;AAChB,CAAC"}
|
||||
@@ -15,7 +15,7 @@ import { ZeroHash } from "../constants/index.js";
|
||||
import { Contract } from "../contract/index.js";
|
||||
import { namehash } from "../hash/index.js";
|
||||
import { Transaction } from "../transaction/index.js";
|
||||
import { concat, dataLength, dataSlice, hexlify, isHexString, getBigInt, getBytes, getNumber, isCallException, makeError, assert, assertArgument, FetchRequest, toBeArray, toQuantity, defineProperties, EventPayload, resolveProperties, toUtf8String } from "../utils/index.js";
|
||||
import { concat, dataLength, dataSlice, hexlify, isHexString, getBigInt, getBytes, getNumber, isCallException, isError, makeError, assert, assertArgument, FetchRequest, toBeArray, toQuantity, defineProperties, EventPayload, resolveProperties, toUtf8String } from "../utils/index.js";
|
||||
import { EnsResolver } from "./ens-resolver.js";
|
||||
import { formatBlock, formatLog, formatTransactionReceipt, formatTransactionResponse } from "./format.js";
|
||||
import { Network } from "./network.js";
|
||||
@@ -729,14 +729,23 @@ export class AbstractProvider {
|
||||
"function name(bytes32) view returns (string)"
|
||||
], this);
|
||||
const name = await resolverContract.name(node);
|
||||
// Failed forward resolution
|
||||
const check = await this.resolveName(name);
|
||||
if (check !== address) {
|
||||
console.log("FAIL", address, check);
|
||||
return null;
|
||||
}
|
||||
return name;
|
||||
}
|
||||
catch (error) {
|
||||
console.log("TEMP", error);
|
||||
// No data was returned from the resolver
|
||||
if (isError(error, "BAD_DATA") && error.value === "0x") {
|
||||
return null;
|
||||
}
|
||||
// Something reerted
|
||||
if (isError(error, "CALL_EXCEPTION")) {
|
||||
return null;
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -135,7 +135,7 @@ function getMedian(quorum, results) {
|
||||
}
|
||||
// Get the sorted values
|
||||
values.sort((a, b) => ((a < b) ? -1 : (b > a) ? 1 : 0));
|
||||
const mid = values.length / 2;
|
||||
const mid = Math.floor(values.length / 2);
|
||||
// Odd-length; take the middle value
|
||||
if (values.length % 2) {
|
||||
return values[mid];
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -117,7 +117,7 @@ export function makeError(message, code, info) {
|
||||
}
|
||||
defineProperties(error, { code });
|
||||
if (info) {
|
||||
defineProperties(error, info);
|
||||
Object.assign(error, info);
|
||||
}
|
||||
return error;
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -105,7 +105,7 @@
|
||||
"url": "https://www.buymeacoffee.com/ricmoo"
|
||||
}
|
||||
],
|
||||
"gitHead": "2a30facb2bda5c79aefd82efa4c439ffc9fa6b5a",
|
||||
"gitHead": "4d9b29de751e2387c143e474bb96d271da892ea6",
|
||||
"homepage": "https://ethers.org",
|
||||
"keywords": [
|
||||
"ethereum",
|
||||
|
||||
@@ -67,7 +67,14 @@ function writeVersion(version: string): void {
|
||||
pkgInfo.gitHead = gitHead;
|
||||
|
||||
// Save the package.json
|
||||
saveJson(pkgPath, pkgInfo, true);
|
||||
const check: Record<string, number> = { "require": 1, "import": 1, "types": 1 };
|
||||
saveJson(pkgPath, pkgInfo, (path: string, a: string, b: string) => {
|
||||
if (path.startsWith("./") && check[a] && check[b]) {
|
||||
if (a === "types") { return -1; }
|
||||
if (b === "types") { return 1; }
|
||||
}
|
||||
return a.localeCompare(b);
|
||||
});
|
||||
|
||||
// Save the src.ts/_version.ts
|
||||
writeVersion(pkgInfo.version);
|
||||
|
||||
@@ -9,7 +9,9 @@ export function loadJson(path: string): any {
|
||||
|
||||
type Replacer = (key: string, value: any) => any;
|
||||
|
||||
export function saveJson(filename: string, data: any, sort?: boolean): any {
|
||||
export type SortFunc = (parent: string, a: string, b: string) => number;
|
||||
|
||||
export function saveJson(filename: string, data: any, sort?: boolean | SortFunc): any {
|
||||
|
||||
let replacer: (Replacer | undefined) = undefined;
|
||||
if (sort) {
|
||||
@@ -18,7 +20,13 @@ export function saveJson(filename: string, data: any, sort?: boolean): any {
|
||||
// pass
|
||||
} else if (value && typeof(value) === "object") {
|
||||
const keys = Object.keys(value);
|
||||
keys.sort();
|
||||
let sortFunc: undefined | ((a: string, b: string) => number);
|
||||
if (typeof(sort) === "function") {
|
||||
sortFunc = function(a: string, b: string) {
|
||||
return sort(key, a, b);
|
||||
}
|
||||
}
|
||||
keys.sort(sortFunc);
|
||||
return keys.reduce((accum, key) => {
|
||||
accum[key] = value[key];
|
||||
return accum;
|
||||
|
||||
@@ -1 +1,6 @@
|
||||
export const version: string = "6.0.3";
|
||||
/* Do NOT modify this file; see /src.ts/_admin/update-version.ts */
|
||||
|
||||
/**
|
||||
* The current version of Ethers.
|
||||
*/
|
||||
export const version: string = "6.0.4";
|
||||
|
||||
@@ -136,12 +136,12 @@ export class Result extends Array<any> {
|
||||
* errors.
|
||||
*/
|
||||
toArray(): Array<any> {
|
||||
const result: Array<any> = [ ];
|
||||
this.forEach((item, index) => {
|
||||
if (item instanceof Error) {
|
||||
throwError(`index ${ index }`, item);
|
||||
}
|
||||
if (item instanceof Error) { throwError(`index ${ index }`, item); }
|
||||
result.push(item);
|
||||
});
|
||||
return Array.of(this);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -170,7 +170,17 @@ export class Result extends Array<any> {
|
||||
*/
|
||||
slice(start?: number | undefined, end?: number | undefined): Result {
|
||||
if (start == null) { start = 0; }
|
||||
if (start < 0) {
|
||||
start += this.length;
|
||||
if (start < 0) { start = 0; }
|
||||
}
|
||||
|
||||
if (end == null) { end = this.length; }
|
||||
if (end < 0) {
|
||||
end += this.length;
|
||||
if (end < 0) { end = 0; }
|
||||
}
|
||||
if (end > this.length) { end = this.length; }
|
||||
|
||||
const result = [ ], names = [ ];
|
||||
for (let i = start; i < end; i++) {
|
||||
|
||||
@@ -26,7 +26,7 @@ export function pack(writer: Writer, coders: ReadonlyArray<Coder>, values: Array
|
||||
assert(name, "cannot encode object for signature with missing names",
|
||||
"INVALID_ARGUMENT", { argument: "values", info: { coder }, value: values });
|
||||
|
||||
assert(unique[name], "cannot encode object for signature with duplicate names",
|
||||
assert(!unique[name], "cannot encode object for signature with duplicate names",
|
||||
"INVALID_ARGUMENT", { argument: "values", info: { coder }, value: values });
|
||||
|
||||
unique[name] = true;
|
||||
|
||||
@@ -865,7 +865,7 @@ export class ParamType {
|
||||
return new ParamType(_guard, name || "", type, "array", indexed, null, arrayLength, arrayChildren);
|
||||
}
|
||||
|
||||
if (type === "tuple" || type.substring(0, 5) === "tuple(" || type[0] === "(") {
|
||||
if (type === "tuple" || type.startsWith("tuple("/* fix: ) */) || type.startsWith("(" /* fix: ) */)) {
|
||||
const comps = (obj.components != null) ? obj.components.map((c: any) => ParamType.from(c)): null;
|
||||
const tuple = new ParamType(_guard, name || "", type, "tuple", indexed, comps, null, null);
|
||||
// @TODO: use lexer to validate and normalize type
|
||||
|
||||
@@ -102,7 +102,7 @@ export class Typed {
|
||||
}
|
||||
|
||||
isData(): this is TypedData {
|
||||
return (this.type.substring(0, 5) === "bytes");
|
||||
return this.type.startsWith("bytes");
|
||||
}
|
||||
|
||||
isString(): this is TypedString {
|
||||
|
||||
@@ -123,7 +123,7 @@ export function getAddress(address: string): string {
|
||||
if (address.match(/^(0x)?[0-9a-fA-F]{40}$/)) {
|
||||
|
||||
// Missing the 0x prefix
|
||||
if (address.substring(0, 2) !== "0x") { address = "0x" + address; }
|
||||
if (!address.startsWith("0x")) { address = "0x" + address; }
|
||||
|
||||
const result = getChecksumAddress(address);
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ export class ContractFactory<A extends Array<any> = Array<any>, I = BaseContract
|
||||
bytecode = hexlify(getBytes(bytecode));
|
||||
} else {
|
||||
if (typeof(bytecode) === "object") { bytecode = bytecode.object; }
|
||||
if (bytecode.substring(0, 2) !== "0x") { bytecode = "0x" + bytecode; }
|
||||
if (!bytecode.startsWith("0x")) { bytecode = "0x" + bytecode; }
|
||||
bytecode = hexlify(getBytes(bytecode));
|
||||
}
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ export function getDefaultProvider(network: string | Networkish | WebSocketLike,
|
||||
*/
|
||||
if (options.quicknode !== "-") {
|
||||
try {
|
||||
let token = options.qquicknode;
|
||||
let token = options.quicknode;
|
||||
providers.push(new QuickNodeProvider(network, token));
|
||||
} catch (error) { console.log(error); }
|
||||
}
|
||||
|
||||
@@ -166,7 +166,7 @@ export function copyRequest(req: TransactionRequest): PreparedTransactionRequest
|
||||
|
||||
if (req.data) { result.data = hexlify(req.data); }
|
||||
|
||||
const bigIntKeys = "chainId,gasLimit,gasPrice,maxFeePerGas, maxPriorityFeePerGas,value".split(/,/);
|
||||
const bigIntKeys = "chainId,gasLimit,gasPrice,maxFeePerGas,maxPriorityFeePerGas,value".split(/,/);
|
||||
for (const key of bigIntKeys) {
|
||||
if (!(key in req) || (<any>req)[key] == null) { continue; }
|
||||
result[key] = getBigInt((<any>req)[key], `request.${ key }`);
|
||||
|
||||
@@ -147,7 +147,7 @@ export function dataSlice(data: BytesLike, start?: number, end?: number): string
|
||||
*/
|
||||
export function stripZerosLeft(data: BytesLike): string {
|
||||
let bytes = hexlify(data).substring(2);
|
||||
while (bytes.substring(0, 2) == "00") { bytes = bytes.substring(2); }
|
||||
while (bytes.startsWith("00")) { bytes = bytes.substring(2); }
|
||||
return "0x" + bytes;
|
||||
}
|
||||
|
||||
|
||||
@@ -230,7 +230,7 @@ export function toBeArray(_value: BigNumberish): Uint8Array {
|
||||
*/
|
||||
export function toQuantity(value: BytesLike | BigNumberish): string {
|
||||
let result = hexlify(isBytesLike(value) ? value: toBeArray(value)).substring(2);
|
||||
while (result.substring(0, 1) === "0") { result = result.substring(1); }
|
||||
while (result.startsWith("0")) { result = result.substring(1); }
|
||||
if (result === "") { result = "0"; }
|
||||
return "0x" + result;
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ function getAccount(data: any, _key: string): KeystoreAccount {
|
||||
const address = computeAddress(privateKey);
|
||||
if (data.address) {
|
||||
let check = data.address.toLowerCase();
|
||||
if (check.substring(0, 2) !== "0x") { check = "0x" + check; }
|
||||
if (!check.startsWith("0x")) { check = "0x" + check; }
|
||||
|
||||
assertArgument(getAddress(check) === address, "keystore address/privateKey mismatch", "address", data.address);
|
||||
}
|
||||
|
||||
@@ -7,8 +7,8 @@ import {
|
||||
} from "../utils/index.js";
|
||||
|
||||
export function looseArrayify(hexString: string): Uint8Array {
|
||||
if (typeof(hexString) === 'string' && hexString.substring(0, 2) !== '0x') {
|
||||
hexString = '0x' + hexString;
|
||||
if (typeof(hexString) === "string" && !hexString.startsWith("0x")) {
|
||||
hexString = "0x" + hexString;
|
||||
}
|
||||
return getBytesCopy(hexString);
|
||||
}
|
||||
|
||||
@@ -39,6 +39,10 @@ export class Wallet extends BaseWallet {
|
||||
* to %%provider%%.
|
||||
*/
|
||||
constructor(key: string | SigningKey, provider?: null | Provider) {
|
||||
if (typeof(key) === "string" && !key.startsWith("0x")) {
|
||||
key = "0x" + key;
|
||||
}
|
||||
|
||||
let signingKey = (typeof(key) === "string") ? new SigningKey(key): key;
|
||||
super(signingKey, provider);
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
],
|
||||
"extends": "./tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"declaration": true,
|
||||
"module": "commonjs",
|
||||
"outDir": "./lib.commonjs"
|
||||
}
|
||||
|
||||
3
types/_version.d.ts
vendored
3
types/_version.d.ts
vendored
@@ -1,2 +1,5 @@
|
||||
/**
|
||||
* The current version of Ethers.
|
||||
*/
|
||||
export declare const version: string;
|
||||
//# sourceMappingURL=_version.d.ts.map
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,EAAE,MAAgB,CAAC"}
|
||||
{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,MAAM,OAAO,EAAE,MAAgB,CAAC"}
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"abi-coder.d.ts","sourceRoot":"","sources":["../../src.ts/abi/abi-coder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAMH,OAAO,EAAiB,MAAM,EAAU,MAAM,4BAA4B,CAAC;AAU3E,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAK3C,OAAO,KAAK,EACR,SAAS,EACT,mBAAmB,EAAE,kBAAkB,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