admin: updated dist files
This commit is contained in:
parent
203a759efc
commit
31cc4edf2c
@ -3,6 +3,15 @@ Change Log
|
||||
|
||||
This change log is maintained by `src.ts/_admin/update-changelog.ts` but may also be manually updated.
|
||||
|
||||
ethers/v6.6.0 (2023-06-13 21:42)
|
||||
--------------------------------
|
||||
|
||||
- Add exports for AbstractProviderOptions and for MulticoinProviderPlugin ([203a759](https://github.com/ethers-io/ethers.js/commit/203a759efc65bf6901d3e574a601525ea3936238)).
|
||||
- Add option to adjust perform cache timeout in AbstractProvider ([de0f518](https://github.com/ethers-io/ethers.js/commit/de0f5189f695c181a5fa09100af96a691a338e2b)).
|
||||
- Add full support for MultiCoin plugins and automatic detection for EVM-compatible coin types ([#3888](https://github.com/ethers-io/ethers.js/issues/3888), [#4081](https://github.com/ethers-io/ethers.js/issues/4081); [84375be](https://github.com/ethers-io/ethers.js/commit/84375be92d32a2939cf4a2f713e4c554b5b54a32)).
|
||||
- Allow Interface instances where InterfaceAbi are allowed ([#4142](https://github.com/ethers-io/ethers.js/issues/4142); [2318005](https://github.com/ethers-io/ethers.js/commit/2318005dfd996c8a7c51603d0264ceabe9bb6141)).
|
||||
- Allow Numeric type for decimals in FixedNumber ([#4141](https://github.com/ethers-io/ethers.js/issues/4141); [9055ef6](https://github.com/ethers-io/ethers.js/commit/9055ef6c69291f1a44ea23a2e7b5aaf3140a5577)).
|
||||
|
||||
ethers/v6.5.1 (2023-06-07 20:19)
|
||||
--------------------------------
|
||||
|
||||
|
56
dist/ethers.js
vendored
56
dist/ethers.js
vendored
@ -3,7 +3,7 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
||||
/**
|
||||
* The current version of Ethers.
|
||||
*/
|
||||
const version = "6.5.1";
|
||||
const version = "6.6.0";
|
||||
|
||||
/**
|
||||
* Property helper functions.
|
||||
@ -2263,10 +2263,8 @@ class FixedNumber {
|
||||
* for %%decimals%%) cannot fit in %%format%%, either due to overflow
|
||||
* or underflow (precision loss).
|
||||
*/
|
||||
static fromValue(_value, decimals, _format) {
|
||||
if (decimals == null) {
|
||||
decimals = 0;
|
||||
}
|
||||
static fromValue(_value, _decimals, _format) {
|
||||
const decimals = (_decimals == null) ? 0 : getNumber(_decimals);
|
||||
const format = getFormat(_format);
|
||||
let value = getBigInt(_value, "value");
|
||||
const delta = decimals - format.decimals;
|
||||
@ -14567,6 +14565,13 @@ class BaseContract {
|
||||
connect(runner) {
|
||||
return new BaseContract(this.target, this.interface, runner);
|
||||
}
|
||||
/**
|
||||
* Return a new Contract instance with the same ABI and runner, but
|
||||
* a different %%target%%.
|
||||
*/
|
||||
attach(target) {
|
||||
return new BaseContract(target, this.interface, this.runner);
|
||||
}
|
||||
/**
|
||||
* Return the resolved address of this Contract.
|
||||
*/
|
||||
@ -14887,6 +14892,9 @@ class ContractFactory {
|
||||
bytecode, interface: iface, runner: (runner || null)
|
||||
});
|
||||
}
|
||||
attach(target) {
|
||||
return new BaseContract(target, this.interface, this.runner);
|
||||
}
|
||||
/**
|
||||
* Resolves to the transaction to deploy the contract, passing %%args%%
|
||||
* into the constructor.
|
||||
@ -15038,7 +15046,7 @@ class EnsResolver {
|
||||
"function supportsInterface(bytes4) view returns (bool)",
|
||||
"function resolve(bytes, bytes) view returns (bytes)",
|
||||
"function addr(bytes32) view returns (address)",
|
||||
"function addr(bytes32, uint) view returns (address)",
|
||||
"function addr(bytes32, uint) view returns (bytes)",
|
||||
"function text(bytes32, string) view returns (string)",
|
||||
"function contenthash(bytes32) view returns (bytes)",
|
||||
], provider);
|
||||
@ -15124,6 +15132,14 @@ class EnsResolver {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
// Try decoding its EVM canonical chain as an EVM chain address first
|
||||
if (coinType >= 0 && coinType < 0x80000000) {
|
||||
let ethCoinType = coinType + 0x80000000;
|
||||
const data = await this.#fetch("addr(bytes32,uint)", [ethCoinType]);
|
||||
if (isHexString(data, 20)) {
|
||||
return getAddress(data);
|
||||
}
|
||||
}
|
||||
let coinPlugin = null;
|
||||
for (const plugin of this.provider.plugins) {
|
||||
if (!(plugin instanceof MulticoinProviderPlugin)) {
|
||||
@ -15144,7 +15160,7 @@ class EnsResolver {
|
||||
return null;
|
||||
}
|
||||
// Compute the address
|
||||
const address = await coinPlugin.encodeAddress(coinType, data);
|
||||
const address = await coinPlugin.decodeAddress(coinType, data);
|
||||
if (address != null) {
|
||||
return address;
|
||||
}
|
||||
@ -16586,6 +16602,9 @@ async function getSubscription(_event, provider) {
|
||||
assertArgument(false, "unknown ProviderEvent", "event", _event);
|
||||
}
|
||||
function getTime$1() { return (new Date()).getTime(); }
|
||||
const defaultOptions$1 = {
|
||||
cacheTimeout: 250
|
||||
};
|
||||
/**
|
||||
* An **AbstractProvider** provides a base class for other sub-classes to
|
||||
* implement the [[Provider]] API by normalizing input arguments and
|
||||
@ -16606,12 +16625,14 @@ class AbstractProvider {
|
||||
#nextTimer;
|
||||
#timers;
|
||||
#disableCcipRead;
|
||||
#options;
|
||||
/**
|
||||
* Create a new **AbstractProvider** connected to %%network%%, or
|
||||
* use the various network detection capabilities to discover the
|
||||
* [[Network]] if necessary.
|
||||
*/
|
||||
constructor(_network) {
|
||||
constructor(_network, options) {
|
||||
this.#options = Object.assign({}, defaultOptions$1, options || {});
|
||||
if (_network === "any") {
|
||||
this.#anyNetwork = true;
|
||||
this.#networkPromise = null;
|
||||
@ -16671,6 +16692,11 @@ class AbstractProvider {
|
||||
set disableCcipRead(value) { this.#disableCcipRead = !!value; }
|
||||
// Shares multiple identical requests made during the same 250ms
|
||||
async #perform(req) {
|
||||
const timeout = this.#options.cacheTimeout;
|
||||
// Caching disabled
|
||||
if (timeout < 0) {
|
||||
return await this._perform(req);
|
||||
}
|
||||
// Create a tag
|
||||
const tag = getTag(req.method, req);
|
||||
let perform = this.#performCache.get(tag);
|
||||
@ -16681,7 +16707,7 @@ class AbstractProvider {
|
||||
if (this.#performCache.get(tag) === perform) {
|
||||
this.#performCache.delete(tag);
|
||||
}
|
||||
}, 250);
|
||||
}, timeout);
|
||||
}
|
||||
return await perform;
|
||||
}
|
||||
@ -18266,7 +18292,8 @@ const defaultOptions = {
|
||||
staticNetwork: null,
|
||||
batchStallTime: 10,
|
||||
batchMaxSize: (1 << 20),
|
||||
batchMaxCount: 100 // 100 requests
|
||||
batchMaxCount: 100,
|
||||
cacheTimeout: 250
|
||||
};
|
||||
// @TODO: Unchecked Signers
|
||||
class JsonRpcSigner extends AbstractSigner {
|
||||
@ -18484,7 +18511,11 @@ class JsonRpcApiProvider extends AbstractProvider {
|
||||
}, stallTime);
|
||||
}
|
||||
constructor(network, options) {
|
||||
super(network);
|
||||
const superOptions = {};
|
||||
if (options && options.cacheTimeout != null) {
|
||||
superOptions.cacheTimeout = options.cacheTimeout;
|
||||
}
|
||||
super(network, superOptions);
|
||||
this.#nextId = 1;
|
||||
this.#options = Object.assign({}, defaultOptions, options || {});
|
||||
this.#payloads = [];
|
||||
@ -23343,6 +23374,7 @@ var ethers = /*#__PURE__*/Object.freeze({
|
||||
MessagePrefix: MessagePrefix,
|
||||
MinInt256: MinInt256,
|
||||
Mnemonic: Mnemonic,
|
||||
MulticoinProviderPlugin: MulticoinProviderPlugin,
|
||||
N: N$1,
|
||||
NamedFragment: NamedFragment,
|
||||
Network: Network,
|
||||
@ -23474,5 +23506,5 @@ var ethers = /*#__PURE__*/Object.freeze({
|
||||
zeroPadValue: zeroPadValue
|
||||
});
|
||||
|
||||
export { AbiCoder, AbstractProvider, AbstractSigner, AlchemyProvider, AnkrProvider, BaseContract, BaseWallet, Block, BrowserProvider, CloudflareProvider, ConstructorFragment, Contract, ContractEventPayload, ContractFactory, ContractTransactionReceipt, ContractTransactionResponse, ContractUnknownEventPayload, EnsPlugin, EnsResolver, ErrorDescription, ErrorFragment, EtherSymbol, EtherscanPlugin, EtherscanProvider, EventFragment, EventLog, EventPayload, FallbackFragment, FallbackProvider, FeeData, FeeDataNetworkPlugin, FetchCancelSignal, FetchRequest, FetchResponse, FixedNumber, Fragment, FunctionFragment, GasCostPlugin, HDNodeVoidWallet, HDNodeWallet, Indexed, InfuraProvider, InfuraWebSocketProvider, Interface, IpcSocketProvider, JsonRpcApiProvider, JsonRpcProvider, JsonRpcSigner, LangEn, Log, LogDescription, MaxInt256, MaxUint256, MessagePrefix, MinInt256, Mnemonic, N$1 as N, NamedFragment, Network, NetworkPlugin, NonceManager, ParamType, PocketProvider, QuickNodeProvider, Result, Signature, SigningKey, SocketBlockSubscriber, SocketEventSubscriber, SocketPendingSubscriber, SocketProvider, SocketSubscriber, StructFragment, Transaction, TransactionDescription, TransactionReceipt, TransactionResponse, Typed, TypedDataEncoder, UnmanagedSubscriber, Utf8ErrorFuncs, VoidSigner, Wallet, WebSocketProvider, WeiPerEther, Wordlist, WordlistOwl, WordlistOwlA, ZeroAddress, ZeroHash, accessListify, assert$1 as assert, assertArgument, assertArgumentCount, assertNormalize, assertPrivate, checkResultErrors, computeAddress, computeHmac, concat, copyRequest, dataLength, dataSlice, decodeBase58, decodeBase64, decodeBytes32String, decodeRlp, decryptCrowdsaleJson, decryptKeystoreJson, decryptKeystoreJsonSync, defaultPath, defineProperties, dnsEncode, encodeBase58, encodeBase64, encodeBytes32String, encodeRlp, encryptKeystoreJson, encryptKeystoreJsonSync, ensNormalize, ethers, formatEther, formatUnits, fromTwos, getAccountPath, getAddress, getBigInt, getBytes, getBytesCopy, getCreate2Address, getCreateAddress, getDefaultProvider, getIcapAddress, getIndexedAccountPath, getNumber, getUint, hashMessage, hexlify, id, isAddress, isAddressable, isBytesLike, isCallException, isCrowdsaleJson, isError, isHexString, isKeystoreJson, isValidName, keccak256, lock, makeError, mask, namehash, parseEther, parseUnits, pbkdf2, randomBytes, recoverAddress, resolveAddress, resolveProperties, ripemd160, scrypt, scryptSync, sha256, sha512, showThrottleMessage, solidityPacked, solidityPackedKeccak256, solidityPackedSha256, stripZerosLeft, toBeArray, toBeHex, toBigInt, toNumber, toQuantity, toTwos, toUtf8Bytes, toUtf8CodePoints, toUtf8String, uuidV4, verifyMessage, verifyTypedData, version, wordlists, zeroPadBytes, zeroPadValue };
|
||||
export { AbiCoder, AbstractProvider, AbstractSigner, AlchemyProvider, AnkrProvider, BaseContract, BaseWallet, Block, BrowserProvider, CloudflareProvider, ConstructorFragment, Contract, ContractEventPayload, ContractFactory, ContractTransactionReceipt, ContractTransactionResponse, ContractUnknownEventPayload, EnsPlugin, EnsResolver, ErrorDescription, ErrorFragment, EtherSymbol, EtherscanPlugin, EtherscanProvider, EventFragment, EventLog, EventPayload, FallbackFragment, FallbackProvider, FeeData, FeeDataNetworkPlugin, FetchCancelSignal, FetchRequest, FetchResponse, FixedNumber, Fragment, FunctionFragment, GasCostPlugin, HDNodeVoidWallet, HDNodeWallet, Indexed, InfuraProvider, InfuraWebSocketProvider, Interface, IpcSocketProvider, JsonRpcApiProvider, JsonRpcProvider, JsonRpcSigner, LangEn, Log, LogDescription, MaxInt256, MaxUint256, MessagePrefix, MinInt256, Mnemonic, MulticoinProviderPlugin, N$1 as N, NamedFragment, Network, NetworkPlugin, NonceManager, ParamType, PocketProvider, QuickNodeProvider, Result, Signature, SigningKey, SocketBlockSubscriber, SocketEventSubscriber, SocketPendingSubscriber, SocketProvider, SocketSubscriber, StructFragment, Transaction, TransactionDescription, TransactionReceipt, TransactionResponse, Typed, TypedDataEncoder, UnmanagedSubscriber, Utf8ErrorFuncs, VoidSigner, Wallet, WebSocketProvider, WeiPerEther, Wordlist, WordlistOwl, WordlistOwlA, ZeroAddress, ZeroHash, accessListify, assert$1 as assert, assertArgument, assertArgumentCount, assertNormalize, assertPrivate, checkResultErrors, computeAddress, computeHmac, concat, copyRequest, dataLength, dataSlice, decodeBase58, decodeBase64, decodeBytes32String, decodeRlp, decryptCrowdsaleJson, decryptKeystoreJson, decryptKeystoreJsonSync, defaultPath, defineProperties, dnsEncode, encodeBase58, encodeBase64, encodeBytes32String, encodeRlp, encryptKeystoreJson, encryptKeystoreJsonSync, ensNormalize, ethers, formatEther, formatUnits, fromTwos, getAccountPath, getAddress, getBigInt, getBytes, getBytesCopy, getCreate2Address, getCreateAddress, getDefaultProvider, getIcapAddress, getIndexedAccountPath, getNumber, getUint, hashMessage, hexlify, id, isAddress, isAddressable, isBytesLike, isCallException, isCrowdsaleJson, isError, isHexString, isKeystoreJson, isValidName, keccak256, lock, makeError, mask, namehash, parseEther, parseUnits, pbkdf2, randomBytes, recoverAddress, resolveAddress, resolveProperties, ripemd160, scrypt, scryptSync, sha256, sha512, showThrottleMessage, solidityPacked, solidityPackedKeccak256, solidityPackedSha256, stripZerosLeft, toBeArray, toBeHex, toBigInt, toNumber, toQuantity, toTwos, toUtf8Bytes, toUtf8CodePoints, toUtf8String, uuidV4, verifyMessage, verifyTypedData, version, wordlists, zeroPadBytes, zeroPadValue };
|
||||
//# sourceMappingURL=ethers.js.map
|
||||
|
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
55
dist/ethers.umd.js
vendored
55
dist/ethers.umd.js
vendored
@ -9,7 +9,7 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
||||
/**
|
||||
* The current version of Ethers.
|
||||
*/
|
||||
const version = "6.5.1";
|
||||
const version = "6.6.0";
|
||||
|
||||
/**
|
||||
* Property helper functions.
|
||||
@ -2269,10 +2269,8 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
||||
* for %%decimals%%) cannot fit in %%format%%, either due to overflow
|
||||
* or underflow (precision loss).
|
||||
*/
|
||||
static fromValue(_value, decimals, _format) {
|
||||
if (decimals == null) {
|
||||
decimals = 0;
|
||||
}
|
||||
static fromValue(_value, _decimals, _format) {
|
||||
const decimals = (_decimals == null) ? 0 : getNumber(_decimals);
|
||||
const format = getFormat(_format);
|
||||
let value = getBigInt(_value, "value");
|
||||
const delta = decimals - format.decimals;
|
||||
@ -14573,6 +14571,13 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
||||
connect(runner) {
|
||||
return new BaseContract(this.target, this.interface, runner);
|
||||
}
|
||||
/**
|
||||
* Return a new Contract instance with the same ABI and runner, but
|
||||
* a different %%target%%.
|
||||
*/
|
||||
attach(target) {
|
||||
return new BaseContract(target, this.interface, this.runner);
|
||||
}
|
||||
/**
|
||||
* Return the resolved address of this Contract.
|
||||
*/
|
||||
@ -14893,6 +14898,9 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
||||
bytecode, interface: iface, runner: (runner || null)
|
||||
});
|
||||
}
|
||||
attach(target) {
|
||||
return new BaseContract(target, this.interface, this.runner);
|
||||
}
|
||||
/**
|
||||
* Resolves to the transaction to deploy the contract, passing %%args%%
|
||||
* into the constructor.
|
||||
@ -15044,7 +15052,7 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
||||
"function supportsInterface(bytes4) view returns (bool)",
|
||||
"function resolve(bytes, bytes) view returns (bytes)",
|
||||
"function addr(bytes32) view returns (address)",
|
||||
"function addr(bytes32, uint) view returns (address)",
|
||||
"function addr(bytes32, uint) view returns (bytes)",
|
||||
"function text(bytes32, string) view returns (string)",
|
||||
"function contenthash(bytes32) view returns (bytes)",
|
||||
], provider);
|
||||
@ -15130,6 +15138,14 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
// Try decoding its EVM canonical chain as an EVM chain address first
|
||||
if (coinType >= 0 && coinType < 0x80000000) {
|
||||
let ethCoinType = coinType + 0x80000000;
|
||||
const data = await this.#fetch("addr(bytes32,uint)", [ethCoinType]);
|
||||
if (isHexString(data, 20)) {
|
||||
return getAddress(data);
|
||||
}
|
||||
}
|
||||
let coinPlugin = null;
|
||||
for (const plugin of this.provider.plugins) {
|
||||
if (!(plugin instanceof MulticoinProviderPlugin)) {
|
||||
@ -15150,7 +15166,7 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
||||
return null;
|
||||
}
|
||||
// Compute the address
|
||||
const address = await coinPlugin.encodeAddress(coinType, data);
|
||||
const address = await coinPlugin.decodeAddress(coinType, data);
|
||||
if (address != null) {
|
||||
return address;
|
||||
}
|
||||
@ -16592,6 +16608,9 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
||||
assertArgument(false, "unknown ProviderEvent", "event", _event);
|
||||
}
|
||||
function getTime$1() { return (new Date()).getTime(); }
|
||||
const defaultOptions$1 = {
|
||||
cacheTimeout: 250
|
||||
};
|
||||
/**
|
||||
* An **AbstractProvider** provides a base class for other sub-classes to
|
||||
* implement the [[Provider]] API by normalizing input arguments and
|
||||
@ -16612,12 +16631,14 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
||||
#nextTimer;
|
||||
#timers;
|
||||
#disableCcipRead;
|
||||
#options;
|
||||
/**
|
||||
* Create a new **AbstractProvider** connected to %%network%%, or
|
||||
* use the various network detection capabilities to discover the
|
||||
* [[Network]] if necessary.
|
||||
*/
|
||||
constructor(_network) {
|
||||
constructor(_network, options) {
|
||||
this.#options = Object.assign({}, defaultOptions$1, options || {});
|
||||
if (_network === "any") {
|
||||
this.#anyNetwork = true;
|
||||
this.#networkPromise = null;
|
||||
@ -16677,6 +16698,11 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
||||
set disableCcipRead(value) { this.#disableCcipRead = !!value; }
|
||||
// Shares multiple identical requests made during the same 250ms
|
||||
async #perform(req) {
|
||||
const timeout = this.#options.cacheTimeout;
|
||||
// Caching disabled
|
||||
if (timeout < 0) {
|
||||
return await this._perform(req);
|
||||
}
|
||||
// Create a tag
|
||||
const tag = getTag(req.method, req);
|
||||
let perform = this.#performCache.get(tag);
|
||||
@ -16687,7 +16713,7 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
||||
if (this.#performCache.get(tag) === perform) {
|
||||
this.#performCache.delete(tag);
|
||||
}
|
||||
}, 250);
|
||||
}, timeout);
|
||||
}
|
||||
return await perform;
|
||||
}
|
||||
@ -18272,7 +18298,8 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
||||
staticNetwork: null,
|
||||
batchStallTime: 10,
|
||||
batchMaxSize: (1 << 20),
|
||||
batchMaxCount: 100 // 100 requests
|
||||
batchMaxCount: 100,
|
||||
cacheTimeout: 250
|
||||
};
|
||||
// @TODO: Unchecked Signers
|
||||
class JsonRpcSigner extends AbstractSigner {
|
||||
@ -18490,7 +18517,11 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
||||
}, stallTime);
|
||||
}
|
||||
constructor(network, options) {
|
||||
super(network);
|
||||
const superOptions = {};
|
||||
if (options && options.cacheTimeout != null) {
|
||||
superOptions.cacheTimeout = options.cacheTimeout;
|
||||
}
|
||||
super(network, superOptions);
|
||||
this.#nextId = 1;
|
||||
this.#options = Object.assign({}, defaultOptions, options || {});
|
||||
this.#payloads = [];
|
||||
@ -23349,6 +23380,7 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
||||
MessagePrefix: MessagePrefix,
|
||||
MinInt256: MinInt256,
|
||||
Mnemonic: Mnemonic,
|
||||
MulticoinProviderPlugin: MulticoinProviderPlugin,
|
||||
N: N$1,
|
||||
NamedFragment: NamedFragment,
|
||||
Network: Network,
|
||||
@ -23536,6 +23568,7 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
||||
exports.MessagePrefix = MessagePrefix;
|
||||
exports.MinInt256 = MinInt256;
|
||||
exports.Mnemonic = Mnemonic;
|
||||
exports.MulticoinProviderPlugin = MulticoinProviderPlugin;
|
||||
exports.N = N$1;
|
||||
exports.NamedFragment = NamedFragment;
|
||||
exports.Network = Network;
|
||||
|
2
dist/ethers.umd.js.map
vendored
2
dist/ethers.umd.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/ethers.umd.min.js
vendored
2
dist/ethers.umd.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/wordlists-extra.js
vendored
2
dist/wordlists-extra.js
vendored
@ -151,7 +151,7 @@ const u64 = {
|
||||
/**
|
||||
* The current version of Ethers.
|
||||
*/
|
||||
const version = "6.5.1";
|
||||
const version = "6.6.0";
|
||||
|
||||
/**
|
||||
* Property helper functions.
|
||||
|
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
@ -5,5 +5,5 @@ exports.version = void 0;
|
||||
/**
|
||||
* The current version of Ethers.
|
||||
*/
|
||||
exports.version = "6.5.1";
|
||||
exports.version = "6.6.0";
|
||||
//# sourceMappingURL=_version.js.map
|
11
lib.commonjs/contract/contract.d.ts
vendored
11
lib.commonjs/contract/contract.d.ts
vendored
@ -59,6 +59,11 @@ export declare class BaseContract implements Addressable, EventEmitterable<Contr
|
||||
* a different %%runner%%.
|
||||
*/
|
||||
connect(runner: null | ContractRunner): BaseContract;
|
||||
/**
|
||||
* Return a new Contract instance with the same ABI and runner, but
|
||||
* a different %%target%%.
|
||||
*/
|
||||
attach(target: string | Addressable): BaseContract;
|
||||
/**
|
||||
* Return the resolved address of this Contract.
|
||||
*/
|
||||
@ -147,13 +152,13 @@ export declare class BaseContract implements Addressable, EventEmitterable<Contr
|
||||
/**
|
||||
* Create a new Class for the %%abi%%.
|
||||
*/
|
||||
static buildClass<T = ContractInterface>(abi: InterfaceAbi): new (target: string, runner?: null | ContractRunner) => BaseContract & Omit<T, keyof BaseContract>;
|
||||
static buildClass<T = ContractInterface>(abi: Interface | InterfaceAbi): new (target: string, runner?: null | ContractRunner) => BaseContract & Omit<T, keyof BaseContract>;
|
||||
/**
|
||||
* Create a new BaseContract with a specified Interface.
|
||||
*/
|
||||
static from<T = ContractInterface>(target: string, abi: InterfaceAbi, runner?: null | ContractRunner): BaseContract & Omit<T, keyof BaseContract>;
|
||||
static from<T = ContractInterface>(target: string, abi: Interface | InterfaceAbi, runner?: null | ContractRunner): BaseContract & Omit<T, keyof BaseContract>;
|
||||
}
|
||||
declare const Contract_base: new (target: string, abi: InterfaceAbi, runner?: ContractRunner | null | undefined) => BaseContract & Omit<ContractInterface, keyof BaseContract>;
|
||||
declare const Contract_base: new (target: string, abi: Interface | InterfaceAbi, runner?: ContractRunner | null | undefined) => BaseContract & Omit<ContractInterface, keyof BaseContract>;
|
||||
/**
|
||||
* A [[BaseContract]] with no type guards on its methods or events.
|
||||
*/
|
||||
|
@ -1 +1 @@
|
||||
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../src.ts/contract/contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAS,MAAM,iBAAiB,CAAC;AAInD,OAAO,EAAe,GAAG,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAMjF,OAAO,EAEH,2BAA2B,EAC3B,QAAQ,EACX,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,YAAY,EAAE,SAAS,EAAU,MAAM,iBAAiB,CAAC;AACxG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,KAAK,EACR,QAAQ,EAAE,cAAc,EAC3B,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EAER,iBAAiB,EACjB,iBAAiB,EAEjB,cAAc,EAEd,aAAa,EACb,mBAAmB,EAEnB,eAAe,EAClB,MAAM,YAAY,CAAC;AA6FpB;;GAEG;AACH,wBAAsB,aAAa,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,mBAA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|
@ -616,6 +616,13 @@ class BaseContract {
|
||||
connect(runner) {
|
||||
return new BaseContract(this.target, this.interface, runner);
|
||||
}
|
||||
/**
|
||||
* Return a new Contract instance with the same ABI and runner, but
|
||||
* a different %%target%%.
|
||||
*/
|
||||
attach(target) {
|
||||
return new BaseContract(target, this.interface, this.runner);
|
||||
}
|
||||
/**
|
||||
* Return the resolved address of this Contract.
|
||||
*/
|
||||
|
File diff suppressed because one or more lines are too long
2
lib.commonjs/contract/factory.d.ts
vendored
2
lib.commonjs/contract/factory.d.ts
vendored
@ -1,6 +1,7 @@
|
||||
import { Interface } from "../abi/index.js";
|
||||
import { BaseContract } from "./contract.js";
|
||||
import type { InterfaceAbi } from "../abi/index.js";
|
||||
import type { Addressable } from "../address/index.js";
|
||||
import type { ContractRunner } from "../providers/index.js";
|
||||
import type { BytesLike } from "../utils/index.js";
|
||||
import type { ContractInterface, ContractMethodArgs, ContractDeployTransaction } from "./types.js";
|
||||
@ -31,6 +32,7 @@ export declare class ContractFactory<A extends Array<any> = Array<any>, I = Base
|
||||
constructor(abi: Interface | InterfaceAbi, bytecode: BytesLike | {
|
||||
object: string;
|
||||
}, runner?: null | ContractRunner);
|
||||
attach(target: string | Addressable): BaseContract & Omit<I, keyof BaseContract>;
|
||||
/**
|
||||
* Resolves to the transaction to deploy the contract, passing %%args%%
|
||||
* into the constructor.
|
||||
|
@ -1 +1 @@
|
||||
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../src.ts/contract/factory.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAO5C,OAAO,EAAE,YAAY,EAA8B,MAAM,eAAe,CAAC;AAEzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD,OAAO,KAAK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AAC,CAAC,CAAC,GAAG,OAAO,CAAC,yBAAyB,CAAC;IAmB9F;;;;;;;OAOG;IACG,MAAM,CAAC,GAAG,IAAI,EAAE,kBAAkB,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,YAAY,GAAG;QAAE,qBAAqB,IAAI,2BAA2B,CAAA;KAAE,GAAG,IAAI,CAAC,CAAC,EAAE,MAAM,YAAY,CAAC,CAAC;IAY5J;;;OAGG;IACH,OAAO,CAAC,MAAM,EAAE,IAAI,GAAG,cAAc,GAAG,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC;IAI7D;;OAEG;IACH,MAAM,CAAC,YAAY,CAAC,CAAC,SAAS,KAAK,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,iBAAiB,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,CAAC,EAAE,cAAc,GAAG,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC;CAgB7I"}
|
@ -49,6 +49,9 @@ class ContractFactory {
|
||||
bytecode, interface: iface, runner: (runner || null)
|
||||
});
|
||||
}
|
||||
attach(target) {
|
||||
return new contract_js_1.BaseContract(target, this.interface, this.runner);
|
||||
}
|
||||
/**
|
||||
* Resolves to the transaction to deploy the contract, passing %%args%%
|
||||
* into the constructor.
|
||||
|
@ -1 +1 @@
|
||||
{"version":3,"file":"factory.js","sourceRoot":"","sources":["../../src.ts/contract/factory.ts"],"names":[],"mappings":";;;AACA,8CAA4C;AAC5C,kDAAuD;AACvD,gDAG2B;AAE3B,+CAAyE;AAYzE,mCAAmC;AACnC,sCAAsC;AAEtC;;GAEG;AACH,MAAa,eAAe;IAExB;;OAEG;IACM,SAAS,CAAa;IAE/B;;OAEG;IACM,QAAQ,CAAU;IAE3B;;OAEG;IACM,MAAM,CAAyB;IAExC;;;;;;OAMG;IACH,YAAY,GAA6B,EAAE,QAAwC,EAAE,MAA8B;QAC/G,MAAM,KAAK,GAAG,oBAAS,CAAC,IAAI,CA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,QAAQ,EAAE;YAC1C,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;SAClC;QAED,OAAO,IAAI,IAAI,CAAC,GAAG,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;IAC3C,CAAC;CACJ;AAnHD,0CAmHC"}
|
4
lib.commonjs/ethers.d.ts
vendored
4
lib.commonjs/ethers.d.ts
vendored
@ -5,7 +5,7 @@ export { ZeroAddress, WeiPerEther, MaxUint256, MinInt256, MaxInt256, N, ZeroHash
|
||||
export { BaseContract, Contract, ContractFactory, ContractEventPayload, ContractTransactionReceipt, ContractTransactionResponse, ContractUnknownEventPayload, EventLog, } from "./contract/index.js";
|
||||
export { computeHmac, randomBytes, keccak256, ripemd160, sha256, sha512, pbkdf2, scrypt, scryptSync, lock, Signature, SigningKey } from "./crypto/index.js";
|
||||
export { id, ensNormalize, isValidName, namehash, dnsEncode, hashMessage, verifyMessage, solidityPacked, solidityPackedKeccak256, solidityPackedSha256, TypedDataEncoder, verifyTypedData } from "./hash/index.js";
|
||||
export { getDefaultProvider, Block, FeeData, Log, TransactionReceipt, TransactionResponse, AbstractSigner, NonceManager, VoidSigner, AbstractProvider, FallbackProvider, JsonRpcApiProvider, JsonRpcProvider, JsonRpcSigner, BrowserProvider, AlchemyProvider, AnkrProvider, CloudflareProvider, EtherscanProvider, InfuraProvider, InfuraWebSocketProvider, PocketProvider, QuickNodeProvider, IpcSocketProvider, SocketProvider, WebSocketProvider, EnsResolver, Network, EnsPlugin, EtherscanPlugin, FeeDataNetworkPlugin, GasCostPlugin, NetworkPlugin, SocketBlockSubscriber, SocketEventSubscriber, SocketPendingSubscriber, SocketSubscriber, UnmanagedSubscriber, copyRequest, showThrottleMessage } from "./providers/index.js";
|
||||
export { getDefaultProvider, Block, FeeData, Log, TransactionReceipt, TransactionResponse, AbstractSigner, NonceManager, VoidSigner, AbstractProvider, FallbackProvider, JsonRpcApiProvider, JsonRpcProvider, JsonRpcSigner, BrowserProvider, AlchemyProvider, AnkrProvider, CloudflareProvider, EtherscanProvider, InfuraProvider, InfuraWebSocketProvider, PocketProvider, QuickNodeProvider, IpcSocketProvider, SocketProvider, WebSocketProvider, EnsResolver, Network, EnsPlugin, EtherscanPlugin, FeeDataNetworkPlugin, GasCostPlugin, NetworkPlugin, MulticoinProviderPlugin, SocketBlockSubscriber, SocketEventSubscriber, SocketPendingSubscriber, SocketSubscriber, UnmanagedSubscriber, copyRequest, showThrottleMessage } from "./providers/index.js";
|
||||
export { accessListify, computeAddress, recoverAddress, Transaction } from "./transaction/index.js";
|
||||
export { decodeBase58, encodeBase58, decodeBase64, encodeBase64, concat, dataLength, dataSlice, getBytes, getBytesCopy, hexlify, isHexString, isBytesLike, stripZerosLeft, zeroPadBytes, zeroPadValue, defineProperties, resolveProperties, assert, assertArgument, assertArgumentCount, assertNormalize, assertPrivate, makeError, isCallException, isError, EventPayload, FetchRequest, FetchResponse, FetchCancelSignal, FixedNumber, getBigInt, getNumber, getUint, toBeArray, toBigInt, toBeHex, toNumber, toQuantity, fromTwos, toTwos, mask, formatEther, parseEther, formatUnits, parseUnits, toUtf8Bytes, toUtf8CodePoints, toUtf8String, Utf8ErrorFuncs, decodeRlp, encodeRlp, uuidV4, } from "./utils/index.js";
|
||||
export { Mnemonic, BaseWallet, HDNodeWallet, HDNodeVoidWallet, Wallet, defaultPath, getAccountPath, getIndexedAccountPath, isCrowdsaleJson, isKeystoreJson, decryptCrowdsaleJson, decryptKeystoreJsonSync, decryptKeystoreJson, encryptKeystoreJson, encryptKeystoreJsonSync, } from "./wallet/index.js";
|
||||
@ -15,7 +15,7 @@ export type { Addressable, AddressLike, NameResolver } from "./address/index.js"
|
||||
export type { ConstantContractMethod, ContractEvent, ContractEventArgs, ContractEventName, ContractInterface, ContractMethod, ContractMethodArgs, ContractTransaction, DeferredTopicFilter, Overrides, BaseContractMethod, ContractDeployTransaction, PostfixOverrides, WrappedFallback } from "./contract/index.js";
|
||||
export type { ProgressCallback, SignatureLike } from "./crypto/index.js";
|
||||
export type { TypedDataDomain, TypedDataField } from "./hash/index.js";
|
||||
export type { Provider, Signer, AbstractProviderPlugin, BlockParams, BlockTag, ContractRunner, DebugEventBrowserProvider, Eip1193Provider, EventFilter, Filter, FilterByBlockHash, GasCostParameters, JsonRpcApiProviderOptions, JsonRpcError, JsonRpcPayload, JsonRpcResult, JsonRpcTransactionRequest, LogParams, MinedBlock, MinedTransactionResponse, Networkish, OrphanFilter, PerformActionFilter, PerformActionRequest, PerformActionTransaction, PreparedTransactionRequest, ProviderEvent, Subscriber, Subscription, TopicFilter, TransactionReceiptParams, TransactionRequest, TransactionResponseParams, WebSocketCreator, WebSocketLike } from "./providers/index.js";
|
||||
export type { Provider, Signer, AbstractProviderOptions, AbstractProviderPlugin, BlockParams, BlockTag, ContractRunner, DebugEventBrowserProvider, Eip1193Provider, EventFilter, Filter, FilterByBlockHash, GasCostParameters, JsonRpcApiProviderOptions, JsonRpcError, JsonRpcPayload, JsonRpcResult, JsonRpcTransactionRequest, LogParams, MinedBlock, MinedTransactionResponse, Networkish, OrphanFilter, PerformActionFilter, PerformActionRequest, PerformActionTransaction, PreparedTransactionRequest, ProviderEvent, Subscriber, Subscription, TopicFilter, TransactionReceiptParams, TransactionRequest, TransactionResponseParams, WebSocketCreator, WebSocketLike } from "./providers/index.js";
|
||||
export type { AccessList, AccessListish, AccessListEntry, TransactionLike } from "./transaction/index.js";
|
||||
export type { BytesLike, BigNumberish, Numeric, ErrorCode, FixedFormat, Utf8ErrorFunc, UnicodeNormalizationForm, Utf8ErrorReason, RlpStructuredData, GetUrlResponse, FetchPreflightFunc, FetchProcessFunc, FetchRetryFunc, FetchGatewayFunc, FetchGetUrlFunc, EthersError, UnknownError, NotImplementedError, UnsupportedOperationError, NetworkError, ServerError, TimeoutError, BadDataError, CancelledError, BufferOverrunError, NumericFaultError, InvalidArgumentError, MissingArgumentError, UnexpectedArgumentError, CallExceptionError, InsufficientFundsError, NonceExpiredError, OffchainFaultError, ReplacementUnderpricedError, TransactionReplacedError, UnconfiguredNameError, ActionRejectedError, CodedEthersError, CallExceptionAction, CallExceptionTransaction, EventEmitterable, Listener } from "./utils/index.js";
|
||||
export type { CrowdsaleAccount, KeystoreAccount, EncryptOptions } from "./wallet/index.js";
|
||||
|
@ -1 +1 @@
|
||||
{"version":3,"file":"ethers.d.ts","sourceRoot":"","sources":["../src.ts/ethers.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,OAAO,EACH,mBAAmB,EAAE,mBAAmB,EAExC,QAAQ,EACR,mBAAmB,EAAE,aAAa,EAAE,aAAa,EAAE,QAAQ,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,aAAa,EAAE,SAAS,EAAE,cAAc,EAEzI,iBAAiB,EAAE,gBAAgB,EAAE,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,EAAE,sBAAsB,EACvG,KAAK,GACR,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACH,UAAU,EAAE,cAAc,EAC1B,gBAAgB,EAAE,iBAAiB,EACnC,aAAa,EAAE,SAAS,EAAE,cAAc,EAC3C,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACH,WAAW,EACX,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC,EAChD,QAAQ,EACR,WAAW,EAAE,aAAa,EAC7B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACH,YAAY,EAAE,QAAQ,EACtB,eAAe,EACf,oBAAoB,EAAE,0BAA0B,EAAE,2BAA2B,EAAE,2BAA2B,EAAE,QAAQ,GACvH,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACH,WAAW,EACX,WAAW,EACX,SAAS,EACT,SAAS,EACT,MAAM,EAAE,MAAM,EACd,MAAM,EACN,MAAM,EAAE,UAAU,EAClB,IAAI,EACJ,SAAS,EAAE,UAAU,EACxB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACH,EAAE,EACF,YA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E,aAAa,EACtE,yBAAyB,EAAE,SAAS,EAAE,UAAU,EAAE,wBAAwB,EAAE,UAAU,EACtF,YAAY,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,wBAAwB,EACjF,0BAA0B,EAAE,aAAa,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAChF,wBAAwB,EAAE,kBAAkB,EAAE,yBAAyB,EACvE,gBAAgB,EAAE,aAAa,EAClC,MAAM,sBAAsB,CAAC;AAE9B,YAAY,EACR,UAAU,EAAE,aAAa,EAAE,eAAe,EAC1C,eAAe,EAClB,MAAM,wBAAwB,CAAC;AAEhC,YAAY,EACR,SAAS,EACT,YAAY,EAAE,OAAO,EACrB,SAAS,EACT,WAAW,EACX,aAAa,EAAE,wBAAwB,EAAE,eAAe,EACxD,iBAAiB,EAEjB,cAAc,EACd,kBAAkB,EAAE,gBAAgB,EAAE,cAAc,EACpD,gBAAgB,EAAE,eAAe,EAEjC,WAAW,EAAE,YAAY,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,YAAY,EACvF,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,kBAAkB,EAC3E,iBAAiB,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,uBAAuB,EACtF,kBAAkB,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,kBAAkB,EACjF,2BAA2B,EAAE,wBAAwB,EAAE,qBAAqB,EAC5E,mBAAmB,EACnB,gBAAgB,EAEhB,mBAAmB,EAAE,wBAAwB,EAC7C,gBAAgB,EAAE,QAAQ,EAC7B,MAAM,kBAAkB,CAAC;AAE1B,YAAY,EACR,gBAAgB,EAAE,eAAe,EAAE,cAAc,EACpD,MAAM,mBAAmB,CAAC"}
|
@ -4,8 +4,8 @@
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.sha256 = exports.ripemd160 = exports.keccak256 = exports.randomBytes = exports.computeHmac = exports.EventLog = exports.ContractUnknownEventPayload = exports.ContractTransactionResponse = exports.ContractTransactionReceipt = exports.ContractEventPayload = exports.ContractFactory = exports.Contract = exports.BaseContract = exports.MessagePrefix = exports.EtherSymbol = exports.ZeroHash = exports.N = exports.MaxInt256 = exports.MinInt256 = exports.MaxUint256 = exports.WeiPerEther = exports.ZeroAddress = exports.resolveAddress = exports.isAddress = exports.isAddressable = exports.getCreate2Address = exports.getCreateAddress = exports.getIcapAddress = exports.getAddress = exports.Typed = exports.TransactionDescription = exports.Result = exports.LogDescription = exports.Interface = exports.Indexed = exports.ErrorDescription = exports.checkResultErrors = exports.StructFragment = exports.ParamType = exports.NamedFragment = exports.FunctionFragment = exports.FallbackFragment = exports.Fragment = exports.EventFragment = exports.ErrorFragment = exports.ConstructorFragment = exports.AbiCoder = exports.encodeBytes32String = exports.decodeBytes32String = exports.version = void 0;
|
||||
exports.FeeDataNetworkPlugin = exports.EtherscanPlugin = exports.EnsPlugin = exports.Network = exports.EnsResolver = exports.WebSocketProvider = exports.SocketProvider = exports.IpcSocketProvider = exports.QuickNodeProvider = exports.PocketProvider = exports.InfuraWebSocketProvider = exports.InfuraProvider = exports.EtherscanProvider = exports.CloudflareProvider = exports.AnkrProvider = exports.AlchemyProvider = exports.BrowserProvider = exports.JsonRpcSigner = exports.JsonRpcProvider = exports.JsonRpcApiProvider = exports.FallbackProvider = exports.AbstractProvider = exports.VoidSigner = exports.NonceManager = exports.AbstractSigner = exports.TransactionResponse = exports.TransactionReceipt = exports.Log = exports.FeeData = exports.Block = exports.getDefaultProvider = exports.verifyTypedData = exports.TypedDataEncoder = exports.solidityPackedSha256 = exports.solidityPackedKeccak256 = exports.solidityPacked = exports.verifyMessage = exports.hashMessage = exports.dnsEncode = exports.namehash = exports.isValidName = exports.ensNormalize = exports.id = exports.SigningKey = exports.Signature = exports.lock = exports.scryptSync = exports.scrypt = exports.pbkdf2 = exports.sha512 = void 0;
|
||||
exports.toNumber = exports.toBeHex = exports.toBigInt = exports.toBeArray = exports.getUint = exports.getNumber = exports.getBigInt = exports.FixedNumber = exports.FetchCancelSignal = exports.FetchResponse = exports.FetchRequest = exports.EventPayload = exports.isError = exports.isCallException = exports.makeError = exports.assertPrivate = exports.assertNormalize = exports.assertArgumentCount = exports.assertArgument = exports.assert = exports.resolveProperties = exports.defineProperties = exports.zeroPadValue = exports.zeroPadBytes = exports.stripZerosLeft = exports.isBytesLike = exports.isHexString = exports.hexlify = exports.getBytesCopy = exports.getBytes = exports.dataSlice = exports.dataLength = exports.concat = exports.encodeBase64 = exports.decodeBase64 = exports.encodeBase58 = exports.decodeBase58 = exports.Transaction = exports.recoverAddress = exports.computeAddress = exports.accessListify = exports.showThrottleMessage = exports.copyRequest = exports.UnmanagedSubscriber = exports.SocketSubscriber = exports.SocketPendingSubscriber = exports.SocketEventSubscriber = exports.SocketBlockSubscriber = exports.NetworkPlugin = exports.GasCostPlugin = void 0;
|
||||
exports.wordlists = exports.WordlistOwlA = exports.WordlistOwl = exports.LangEn = exports.Wordlist = exports.encryptKeystoreJsonSync = exports.encryptKeystoreJson = exports.decryptKeystoreJson = exports.decryptKeystoreJsonSync = exports.decryptCrowdsaleJson = exports.isKeystoreJson = exports.isCrowdsaleJson = exports.getIndexedAccountPath = exports.getAccountPath = exports.defaultPath = exports.Wallet = exports.HDNodeVoidWallet = exports.HDNodeWallet = exports.BaseWallet = exports.Mnemonic = exports.uuidV4 = exports.encodeRlp = exports.decodeRlp = exports.Utf8ErrorFuncs = exports.toUtf8String = exports.toUtf8CodePoints = exports.toUtf8Bytes = exports.parseUnits = exports.formatUnits = exports.parseEther = exports.formatEther = exports.mask = exports.toTwos = exports.fromTwos = exports.toQuantity = void 0;
|
||||
exports.toBeHex = exports.toBigInt = exports.toBeArray = exports.getUint = exports.getNumber = exports.getBigInt = exports.FixedNumber = exports.FetchCancelSignal = exports.FetchResponse = exports.FetchRequest = exports.EventPayload = exports.isError = exports.isCallException = exports.makeError = exports.assertPrivate = exports.assertNormalize = exports.assertArgumentCount = exports.assertArgument = exports.assert = exports.resolveProperties = exports.defineProperties = exports.zeroPadValue = exports.zeroPadBytes = exports.stripZerosLeft = exports.isBytesLike = exports.isHexString = exports.hexlify = exports.getBytesCopy = exports.getBytes = exports.dataSlice = exports.dataLength = exports.concat = exports.encodeBase64 = exports.decodeBase64 = exports.encodeBase58 = exports.decodeBase58 = exports.Transaction = exports.recoverAddress = exports.computeAddress = exports.accessListify = exports.showThrottleMessage = exports.copyRequest = exports.UnmanagedSubscriber = exports.SocketSubscriber = exports.SocketPendingSubscriber = exports.SocketEventSubscriber = exports.SocketBlockSubscriber = exports.MulticoinProviderPlugin = exports.NetworkPlugin = exports.GasCostPlugin = void 0;
|
||||
exports.wordlists = exports.WordlistOwlA = exports.WordlistOwl = exports.LangEn = exports.Wordlist = exports.encryptKeystoreJsonSync = exports.encryptKeystoreJson = exports.decryptKeystoreJson = exports.decryptKeystoreJsonSync = exports.decryptCrowdsaleJson = exports.isKeystoreJson = exports.isCrowdsaleJson = exports.getIndexedAccountPath = exports.getAccountPath = exports.defaultPath = exports.Wallet = exports.HDNodeVoidWallet = exports.HDNodeWallet = exports.BaseWallet = exports.Mnemonic = exports.uuidV4 = exports.encodeRlp = exports.decodeRlp = exports.Utf8ErrorFuncs = exports.toUtf8String = exports.toUtf8CodePoints = exports.toUtf8Bytes = exports.parseUnits = exports.formatUnits = exports.parseEther = exports.formatEther = exports.mask = exports.toTwos = exports.fromTwos = exports.toQuantity = exports.toNumber = void 0;
|
||||
var _version_js_1 = require("./_version.js");
|
||||
Object.defineProperty(exports, "version", { enumerable: true, get: function () { return _version_js_1.version; } });
|
||||
var index_js_1 = require("./abi/index.js");
|
||||
@ -116,6 +116,7 @@ Object.defineProperty(exports, "EtherscanPlugin", { enumerable: true, get: funct
|
||||
Object.defineProperty(exports, "FeeDataNetworkPlugin", { enumerable: true, get: function () { return index_js_7.FeeDataNetworkPlugin; } });
|
||||
Object.defineProperty(exports, "GasCostPlugin", { enumerable: true, get: function () { return index_js_7.GasCostPlugin; } });
|
||||
Object.defineProperty(exports, "NetworkPlugin", { enumerable: true, get: function () { return index_js_7.NetworkPlugin; } });
|
||||
Object.defineProperty(exports, "MulticoinProviderPlugin", { enumerable: true, get: function () { return index_js_7.MulticoinProviderPlugin; } });
|
||||
Object.defineProperty(exports, "SocketBlockSubscriber", { enumerable: true, get: function () { return index_js_7.SocketBlockSubscriber; } });
|
||||
Object.defineProperty(exports, "SocketEventSubscriber", { enumerable: true, get: function () { return index_js_7.SocketEventSubscriber; } });
|
||||
Object.defineProperty(exports, "SocketPendingSubscriber", { enumerable: true, get: function () { return index_js_7.SocketPendingSubscriber; } });
|
||||
|
@ -1 +1 @@
|
||||
{"version":3,"file":"ethers.js","sourceRoot":"","sources":["../src.ts/ethers.ts"],"names":[],"mappings":";AAEA,6BAA6B;AAC7B,EAAE;;;;;;AAEF,6CAAwC;AAA/B,sGAAA,OAAO,OAAA;AAEhB,2CAQwB;AAPpB,+GAAA,mBAAmB,OAAA;AAAE,+GAAA,mBAAmB,OAAA;AAExC,oGAAA,QAAQ,OAAA;AACR,+GAAA,mBAAmB,OAAA;AAAE,yGAAA,aAAa,OAAA;AAAE,yGAAA,aAAa,OAAA;AAAE,oGAAA,QAAQ,OAAA;AAAE,4GAAA,gBAAgB,OAAA;AAAE,4GAAA,gBAAgB,OAAA;AAAE,yGAAA,aAAa,OAAA;AAAE,qGAAA,SAAS,OAAA;AAAE,0GAAA,cAAc,OAAA;AAEzI,6GAAA,iBAAiB,OAAA;AAAE,4GAAA,gBAAgB,OAAA;AAAE,mGAAA,OAAO,OAAA;AAAE,qGAAA,SAAS,OAAA;AAAE,0GAAA,cAAc,OAAA;AAAE,kGAAA,MAAM,OAAA;AAAE,kHAAA,sBAAsB,OAAA;AACvG,iGAAA,KAAK,OAAA;AAGT,+CAI4B;AAHxB,sGAAA,UAAU,OAAA;AAAE,0GAAA,cAAc,OAAA;AAC1B,4GAAA,gBAAgB,OAAA;AAAE,6GAAA,iBAAiB,OAAA;AACnC,yGAAA,aAAa,OAAA;AAAE,qGAAA,SAA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A,WAAW,OAAA;AAAE,sGAAA,UAAU,OAAA;AAChD,uGAAA,WAAW,OAAA;AAAE,4GAAA,gBAAgB,OAAA;AAAE,wGAAA,YAAY,OAAA;AAC3C,0GAAA,cAAc,OAAA;AACd,qGAAA,SAAS,OAAA;AAAE,qGAAA,SAAS,OAAA;AACpB,kGAAA,MAAM,OAAA;AAGV,+CAY2B;AAXvB,qGAAA,QAAQ,OAAA;AACR,uGAAA,UAAU,OAAA;AAAE,yGAAA,YAAY,OAAA;AAAE,6GAAA,gBAAgB,OAAA;AAC1C,mGAAA,MAAM,OAAA;AAEN,wGAAA,WAAW,OAAA;AAEX,2GAAA,cAAc,OAAA;AAAE,kHAAA,qBAAqB,OAAA;AACrC,4GAAA,eAAe,OAAA;AAAE,2GAAA,cAAc,OAAA;AAE/B,iHAAA,oBAAoB,OAAA;AAAE,oHAAA,uBAAuB,OAAA;AAAE,gHAAA,mBAAmB,OAAA;AAClE,gHAAA,mBAAmB,OAAA;AAAE,oHAAA,uBAAuB,OAAA;AAGhD,kDAE8B;AAD1B,qGAAA,QAAQ,OAAA;AAAE,mGAAA,MAAM,OAAA;AAAE,wGAAA,WAAW,OAAA;AAAE,yGAAA,YAAY,OAAA;AAAE,sGAAA,SAAS,OAAA"}
|
15
lib.commonjs/providers/abstract-provider.d.ts
vendored
15
lib.commonjs/providers/abstract-provider.d.ts
vendored
@ -227,6 +227,19 @@ export type PerformActionRequest = {
|
||||
method: "getTransactionResult";
|
||||
hash: string;
|
||||
};
|
||||
/**
|
||||
* Options for configuring some internal aspects of an [[AbstractProvider]].
|
||||
*
|
||||
* **``cacheTimeout``** - how long to cache a low-level ``_perform``
|
||||
* for, based on input parameters. This reduces the number of calls
|
||||
* to getChainId and getBlockNumber, but may break test chains which
|
||||
* can perform operations (internally) synchronously. Use ``-1`` to
|
||||
* disable, ``0`` will only buffer within the same event loop and
|
||||
* any other value is in ms. (default: ``250``)
|
||||
*/
|
||||
export type AbstractProviderOptions = {
|
||||
cacheTimeout?: number;
|
||||
};
|
||||
/**
|
||||
* An **AbstractProvider** provides a base class for other sub-classes to
|
||||
* implement the [[Provider]] API by normalizing input arguments and
|
||||
@ -240,7 +253,7 @@ export declare class AbstractProvider implements Provider {
|
||||
* use the various network detection capabilities to discover the
|
||||
* [[Network]] if necessary.
|
||||
*/
|
||||
constructor(_network?: "any" | Networkish);
|
||||
constructor(_network?: "any" | Networkish, options?: AbstractProviderOptions);
|
||||
/**
|
||||
* Returns ``this``, to allow an **AbstractProvider** to implement
|
||||
* the [[ContractRunner]] interface.
|
||||
|
File diff suppressed because one or more lines are too long
@ -153,6 +153,9 @@ async function getSubscription(_event, provider) {
|
||||
(0, index_js_6.assertArgument)(false, "unknown ProviderEvent", "event", _event);
|
||||
}
|
||||
function getTime() { return (new Date()).getTime(); }
|
||||
const defaultOptions = {
|
||||
cacheTimeout: 250
|
||||
};
|
||||
/**
|
||||
* An **AbstractProvider** provides a base class for other sub-classes to
|
||||
* implement the [[Provider]] API by normalizing input arguments and
|
||||
@ -173,12 +176,14 @@ class AbstractProvider {
|
||||
#nextTimer;
|
||||
#timers;
|
||||
#disableCcipRead;
|
||||
#options;
|
||||
/**
|
||||
* Create a new **AbstractProvider** connected to %%network%%, or
|
||||
* use the various network detection capabilities to discover the
|
||||
* [[Network]] if necessary.
|
||||
*/
|
||||
constructor(_network) {
|
||||
constructor(_network, options) {
|
||||
this.#options = Object.assign({}, defaultOptions, options || {});
|
||||
if (_network === "any") {
|
||||
this.#anyNetwork = true;
|
||||
this.#networkPromise = null;
|
||||
@ -238,6 +243,11 @@ class AbstractProvider {
|
||||
set disableCcipRead(value) { this.#disableCcipRead = !!value; }
|
||||
// Shares multiple identical requests made during the same 250ms
|
||||
async #perform(req) {
|
||||
const timeout = this.#options.cacheTimeout;
|
||||
// Caching disabled
|
||||
if (timeout < 0) {
|
||||
return await this._perform(req);
|
||||
}
|
||||
// Create a tag
|
||||
const tag = getTag(req.method, req);
|
||||
let perform = this.#performCache.get(tag);
|
||||
@ -248,7 +258,7 @@ class AbstractProvider {
|
||||
if (this.#performCache.get(tag) === perform) {
|
||||
this.#performCache.delete(tag);
|
||||
}
|
||||
}, 250);
|
||||
}, timeout);
|
||||
}
|
||||
return await perform;
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
{"version":3,"file":"ens-resolver.d.ts","sourceRoot":"","sources":["../../src.ts/providers/ens-resolver.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAcH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAEvF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAgB9C;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,GACnF,QAAQ,GAAG,SAAS,GAAG,cAAc,GAAG,eAAe,GACvD,QAAQ,GAAG,OAAO,GAAG,UAAU,GAAG,SAAS,GAC3C,mBAAmB,GAAG,uBAAuB,GAAG,cAAc,GAAG,eAAe,GAChF,WAAW,GAAG,UAAU,GACxB,WAAW,GAAG,eAAe,GAAG,UAAU,GAAG,gBAAgB,CAAC;AAElE;;GAEG;AACH,MAAM,WAAW,aAAa;IAC1B;;OAEG;IACH,IAAI,EAAE,iBAAiB,CAAC;IAExB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,YAAY;IACzB;;;OAGG;IACH,OAAO,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC;IAE9B;;;;OAIG;IACH,GAAG,EAAE,IAAI,GAAG,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,8BAAsB,uBAAwB,YAAW,sBAAsB;IAC3E;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAG,MAAM,CAAC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AAC,IAAI,GAAG,WAAW,CAAC;CA2B/F"}
|
@ -7,10 +7,11 @@
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.EnsResolver = exports.BasicMulticoinProviderPlugin = exports.MulticoinProviderPlugin = void 0;
|
||||
const index_js_1 = require("../constants/index.js");
|
||||
const index_js_2 = require("../contract/index.js");
|
||||
const index_js_3 = require("../hash/index.js");
|
||||
const index_js_4 = require("../utils/index.js");
|
||||
const index_js_1 = require("../address/index.js");
|
||||
const index_js_2 = require("../constants/index.js");
|
||||
const index_js_3 = require("../contract/index.js");
|
||||
const index_js_4 = require("../hash/index.js");
|
||||
const index_js_5 = require("../utils/index.js");
|
||||
// @TODO: This should use the fetch-data:ipfs gateway
|
||||
// Trim off the ipfs:// prefix and return the default gateway URL
|
||||
function getIpfsLink(link) {
|
||||
@ -21,7 +22,7 @@ function getIpfsLink(link) {
|
||||
link = link.substring(7);
|
||||
}
|
||||
else {
|
||||
(0, index_js_4.assertArgument)(false, "unsupported IPFS format", "link", link);
|
||||
(0, index_js_5.assertArgument)(false, "unsupported IPFS format", "link", link);
|
||||
}
|
||||
return `https:/\/gateway.ipfs.io/ipfs/${link}`;
|
||||
}
|
||||
@ -39,7 +40,7 @@ class MulticoinProviderPlugin {
|
||||
* Creates a new **MulticoinProviderPluing** for %%name%%.
|
||||
*/
|
||||
constructor(name) {
|
||||
(0, index_js_4.defineProperties)(this, { name });
|
||||
(0, index_js_5.defineProperties)(this, { name });
|
||||
}
|
||||
connect(proivder) {
|
||||
return this;
|
||||
@ -107,13 +108,13 @@ class EnsResolver {
|
||||
#supports2544;
|
||||
#resolver;
|
||||
constructor(provider, address, name) {
|
||||
(0, index_js_4.defineProperties)(this, { provider, address, name });
|
||||
(0, index_js_5.defineProperties)(this, { provider, address, name });
|
||||
this.#supports2544 = null;
|
||||
this.#resolver = new index_js_2.Contract(address, [
|
||||
this.#resolver = new index_js_3.Contract(address, [
|
||||
"function supportsInterface(bytes4) view returns (bool)",
|
||||
"function resolve(bytes, bytes) view returns (bytes)",
|
||||
"function addr(bytes32) view returns (address)",
|
||||
"function addr(bytes32, uint) view returns (address)",
|
||||
"function addr(bytes32, uint) view returns (bytes)",
|
||||
"function text(bytes32, string) view returns (string)",
|
||||
"function contenthash(bytes32) view returns (bytes)",
|
||||
], provider);
|
||||
@ -130,7 +131,7 @@ class EnsResolver {
|
||||
catch (error) {
|
||||
// Wildcard resolvers must understand supportsInterface
|
||||
// and return true.
|
||||
if ((0, index_js_4.isError)(error, "CALL_EXCEPTION")) {
|
||||
if ((0, index_js_5.isError)(error, "CALL_EXCEPTION")) {
|
||||
return false;
|
||||
}
|
||||
// Let future attempts try again...
|
||||
@ -145,15 +146,15 @@ class EnsResolver {
|
||||
params = (params || []).slice();
|
||||
const iface = this.#resolver.interface;
|
||||
// The first parameters is always the nodehash
|
||||
params.unshift((0, index_js_3.namehash)(this.name));
|
||||
params.unshift((0, index_js_4.namehash)(this.name));
|
||||
let fragment = null;
|
||||
if (await this.supportsWildcard()) {
|
||||
fragment = iface.getFunction(funcName);
|
||||
(0, index_js_4.assert)(fragment, "missing fragment", "UNKNOWN_ERROR", {
|
||||
(0, index_js_5.assert)(fragment, "missing fragment", "UNKNOWN_ERROR", {
|
||||
info: { funcName }
|
||||
});
|
||||
params = [
|
||||
(0, index_js_3.dnsEncode)(this.name),
|
||||
(0, index_js_4.dnsEncode)(this.name),
|
||||
iface.encodeFunctionData(fragment, params)
|
||||
];
|
||||
funcName = "resolve(bytes,bytes)";
|
||||
@ -169,7 +170,7 @@ class EnsResolver {
|
||||
return result;
|
||||
}
|
||||
catch (error) {
|
||||
if (!(0, index_js_4.isError)(error, "CALL_EXCEPTION")) {
|
||||
if (!(0, index_js_5.isError)(error, "CALL_EXCEPTION")) {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
@ -187,18 +188,26 @@ class EnsResolver {
|
||||
try {
|
||||
const result = await this.#fetch("addr(bytes32)");
|
||||
// No address
|
||||
if (result == null || result === index_js_1.ZeroAddress) {
|
||||
if (result == null || result === index_js_2.ZeroAddress) {
|
||||
return null;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
catch (error) {
|
||||
if ((0, index_js_4.isError)(error, "CALL_EXCEPTION")) {
|
||||
if ((0, index_js_5.isError)(error, "CALL_EXCEPTION")) {
|
||||
return null;
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
// Try decoding its EVM canonical chain as an EVM chain address first
|
||||
if (coinType >= 0 && coinType < 0x80000000) {
|
||||
let ethCoinType = coinType + 0x80000000;
|
||||
const data = await this.#fetch("addr(bytes32,uint)", [ethCoinType]);
|
||||
if ((0, index_js_5.isHexString)(data, 20)) {
|
||||
return (0, index_js_1.getAddress)(data);
|
||||
}
|
||||
}
|
||||
let coinPlugin = null;
|
||||
for (const plugin of this.provider.plugins) {
|
||||
if (!(plugin instanceof MulticoinProviderPlugin)) {
|
||||
@ -219,11 +228,11 @@ class EnsResolver {
|
||||
return null;
|
||||
}
|
||||
// Compute the address
|
||||
const address = await coinPlugin.encodeAddress(coinType, data);
|
||||
const address = await coinPlugin.decodeAddress(coinType, data);
|
||||
if (address != null) {
|
||||
return address;
|
||||
}
|
||||
(0, index_js_4.assert)(false, `invalid coin data`, "UNSUPPORTED_OPERATION", {
|
||||
(0, index_js_5.assert)(false, `invalid coin data`, "UNSUPPORTED_OPERATION", {
|
||||
operation: `getAddress(${coinType})`,
|
||||
info: { coinType, data }
|
||||
});
|
||||
@ -255,7 +264,7 @@ class EnsResolver {
|
||||
const scheme = (ipfs[1] === "e3010170") ? "ipfs" : "ipns";
|
||||
const length = parseInt(ipfs[4], 16);
|
||||
if (ipfs[5].length === length * 2) {
|
||||
return `${scheme}:/\/${(0, index_js_4.encodeBase58)("0x" + ipfs[2])}`;
|
||||
return `${scheme}:/\/${(0, index_js_5.encodeBase58)("0x" + ipfs[2])}`;
|
||||
}
|
||||
}
|
||||
// Swarm (CID: 1, Type: swarm-manifest; hash/length hard-coded to keccak256/32)
|
||||
@ -263,7 +272,7 @@ class EnsResolver {
|
||||
if (swarm && swarm[1].length === 64) {
|
||||
return `bzz:/\/${swarm[1]}`;
|
||||
}
|
||||
(0, index_js_4.assert)(false, `invalid or unsupported content hash data`, "UNSUPPORTED_OPERATION", {
|
||||
(0, index_js_5.assert)(false, `invalid or unsupported content hash data`, "UNSUPPORTED_OPERATION", {
|
||||
operation: "getContentHash()",
|
||||
info: { data }
|
||||
});
|
||||
@ -333,7 +342,7 @@ class EnsResolver {
|
||||
return { url: null, linkage };
|
||||
}
|
||||
const tokenId = comps[1];
|
||||
const contract = new index_js_2.Contract(comps[0], [
|
||||
const contract = new index_js_3.Contract(comps[0], [
|
||||
// ERC-721
|
||||
"function tokenURI(uint) view returns (string)",
|
||||
"function ownerOf(uint) view returns (address)",
|
||||
@ -367,7 +376,7 @@ class EnsResolver {
|
||||
linkage.push({ type: "metadata-url-base", value: metadataUrl });
|
||||
// ERC-1155 allows a generic {id} in the URL
|
||||
if (scheme === "erc1155") {
|
||||
metadataUrl = metadataUrl.replace("{id}", (0, index_js_4.toBeHex)(tokenId, 32).substring(2));
|
||||
metadataUrl = metadataUrl.replace("{id}", (0, index_js_5.toBeHex)(tokenId, 32).substring(2));
|
||||
linkage.push({ type: "metadata-url-expanded", value: metadataUrl });
|
||||
}
|
||||
// Transform IPFS metadata links
|
||||
@ -377,7 +386,7 @@ class EnsResolver {
|
||||
linkage.push({ type: "metadata-url", value: metadataUrl });
|
||||
// Get the token metadata
|
||||
let metadata = {};
|
||||
const response = await (new index_js_4.FetchRequest(metadataUrl)).send();
|
||||
const response = await (new index_js_5.FetchRequest(metadataUrl)).send();
|
||||
response.assertOk();
|
||||
try {
|
||||
metadata = response.bodyJson;
|
||||
@ -389,7 +398,7 @@ class EnsResolver {
|
||||
catch (error) {
|
||||
const bytes = response.body;
|
||||
if (bytes) {
|
||||
linkage.push({ type: "!metadata", value: (0, index_js_4.hexlify)(bytes) });
|
||||
linkage.push({ type: "!metadata", value: (0, index_js_5.hexlify)(bytes) });
|
||||
}
|
||||
return { url: null, linkage };
|
||||
}
|
||||
@ -432,7 +441,7 @@ class EnsResolver {
|
||||
const network = await provider.getNetwork();
|
||||
const ensPlugin = network.getPlugin("org.ethers.plugins.network.Ens");
|
||||
// No ENS...
|
||||
(0, index_js_4.assert)(ensPlugin, "network does not support ENS", "UNSUPPORTED_OPERATION", {
|
||||
(0, index_js_5.assert)(ensPlugin, "network does not support ENS", "UNSUPPORTED_OPERATION", {
|
||||
operation: "getEnsAddress", info: { network }
|
||||
});
|
||||
return ensPlugin.address;
|
||||
@ -440,13 +449,13 @@ class EnsResolver {
|
||||
static async #getResolver(provider, name) {
|
||||
const ensAddr = await EnsResolver.getEnsAddress(provider);
|
||||
try {
|
||||
const contract = new index_js_2.Contract(ensAddr, [
|
||||
const contract = new index_js_3.Contract(ensAddr, [
|
||||
"function resolver(bytes32) view returns (address)"
|
||||
], provider);
|
||||
const addr = await contract.resolver((0, index_js_3.namehash)(name), {
|
||||
const addr = await contract.resolver((0, index_js_4.namehash)(name), {
|
||||
enableCcipRead: true
|
||||
});
|
||||
if (addr === index_js_1.ZeroAddress) {
|
||||
if (addr === index_js_2.ZeroAddress) {
|
||||
return null;
|
||||
}
|
||||
return addr;
|
||||
|
File diff suppressed because one or more lines are too long
4
lib.commonjs/providers/index.d.ts
vendored
4
lib.commonjs/providers/index.d.ts
vendored
@ -13,7 +13,7 @@ export { AbstractProvider, UnmanagedSubscriber } from "./abstract-provider.js";
|
||||
export { AbstractSigner, VoidSigner, } from "./abstract-signer.js";
|
||||
export { showThrottleMessage } from "./community.js";
|
||||
export { getDefaultProvider } from "./default-provider.js";
|
||||
export { EnsResolver } from "./ens-resolver.js";
|
||||
export { EnsResolver, MulticoinProviderPlugin } from "./ens-resolver.js";
|
||||
export { Network } from "./network.js";
|
||||
export { NonceManager } from "./signer-noncemanager.js";
|
||||
export { NetworkPlugin, GasCostPlugin, EnsPlugin, FeeDataNetworkPlugin, } from "./plugins-network.js";
|
||||
@ -33,7 +33,7 @@ export { IpcSocketProvider };
|
||||
export { SocketProvider } from "./provider-socket.js";
|
||||
export { WebSocketProvider } from "./provider-websocket.js";
|
||||
export { SocketSubscriber, SocketBlockSubscriber, SocketPendingSubscriber, SocketEventSubscriber } from "./provider-socket.js";
|
||||
export type { Subscription, Subscriber, AbstractProviderPlugin, PerformActionFilter, PerformActionTransaction, PerformActionRequest, } from "./abstract-provider.js";
|
||||
export type { AbstractProviderOptions, Subscription, Subscriber, AbstractProviderPlugin, PerformActionFilter, PerformActionTransaction, PerformActionRequest, } from "./abstract-provider.js";
|
||||
export type { ContractRunner } from "./contracts.js";
|
||||
export type { BlockParams, LogParams, TransactionReceiptParams, TransactionResponseParams, } from "./formatting.js";
|
||||
export type { Networkish } from "./network.js";
|
||||
|
@ -1 +1 @@
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src.ts/providers/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EACH,gBAAgB,EAAE,mBAAmB,EACxC,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACH,cAAc,EACd,UAAU,GACb,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACH,mBAAmB,EACtB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAExD,OAAO,EACH,aAAa,EACb,aAAa,EACb,SAAS,EACT,oBAAoB,GACvB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACH,KAAK,EACL,OAAO,EACP,GAAG,EACH,kBAAkB,EAClB,mBAAmB,EAEnB,WAAW,GAEd,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,gBAAgB,EAAE,MA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AM,EAAE,iBAAiB,EAAE,YAAY,EAAE,aAAa,EACnE,WAAW,EACX,QAAQ,EACR,UAAU,EAAE,wBAAwB,EACvC,MAAM,eAAe,CAAC;AAEvB,YAAY,EACR,yBAAyB,EAAE,eAAe,EAC7C,MAAM,uBAAuB,CAAC;AAE/B,YAAY,EACR,cAAc,EAAE,aAAa,EAAE,YAAY,EAC3C,yBAAyB,EACzB,yBAAyB,GAC5B,MAAM,uBAAuB,CAAC;AAE/B,YAAY,EACR,gBAAgB,EAAE,aAAa,EAClC,MAAM,yBAAyB,CAAC;AAEjC,YAAY,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC"}
|
@ -11,7 +11,7 @@
|
||||
* @_section: api/providers:Providers [about-providers]
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.SocketEventSubscriber = exports.SocketPendingSubscriber = exports.SocketBlockSubscriber = exports.SocketSubscriber = exports.WebSocketProvider = exports.SocketProvider = exports.IpcSocketProvider = exports.QuickNodeProvider = exports.PocketProvider = exports.InfuraWebSocketProvider = exports.InfuraProvider = exports.EtherscanPlugin = exports.EtherscanProvider = exports.CloudflareProvider = exports.AnkrProvider = exports.AlchemyProvider = exports.BrowserProvider = exports.JsonRpcSigner = exports.JsonRpcProvider = exports.JsonRpcApiProvider = exports.FallbackProvider = exports.copyRequest = exports.TransactionResponse = exports.TransactionReceipt = exports.Log = exports.FeeData = exports.Block = exports.FeeDataNetworkPlugin = exports.EnsPlugin = exports.GasCostPlugin = exports.NetworkPlugin = exports.NonceManager = exports.Network = exports.EnsResolver = exports.getDefaultProvider = exports.showThrottleMessage = exports.VoidSigner = exports.AbstractSigner = exports.UnmanagedSubscriber = exports.AbstractProvider = void 0;
|
||||
exports.SocketEventSubscriber = exports.SocketPendingSubscriber = exports.SocketBlockSubscriber = exports.SocketSubscriber = exports.WebSocketProvider = exports.SocketProvider = exports.IpcSocketProvider = exports.QuickNodeProvider = exports.PocketProvider = exports.InfuraWebSocketProvider = exports.InfuraProvider = exports.EtherscanPlugin = exports.EtherscanProvider = exports.CloudflareProvider = exports.AnkrProvider = exports.AlchemyProvider = exports.BrowserProvider = exports.JsonRpcSigner = exports.JsonRpcProvider = exports.JsonRpcApiProvider = exports.FallbackProvider = exports.copyRequest = exports.TransactionResponse = exports.TransactionReceipt = exports.Log = exports.FeeData = exports.Block = exports.FeeDataNetworkPlugin = exports.EnsPlugin = exports.GasCostPlugin = exports.NetworkPlugin = exports.NonceManager = exports.Network = exports.MulticoinProviderPlugin = exports.EnsResolver = exports.getDefaultProvider = exports.showThrottleMessage = exports.VoidSigner = exports.AbstractSigner = exports.UnmanagedSubscriber = exports.AbstractProvider = void 0;
|
||||
var abstract_provider_js_1 = require("./abstract-provider.js");
|
||||
Object.defineProperty(exports, "AbstractProvider", { enumerable: true, get: function () { return abstract_provider_js_1.AbstractProvider; } });
|
||||
Object.defineProperty(exports, "UnmanagedSubscriber", { enumerable: true, get: function () { return abstract_provider_js_1.UnmanagedSubscriber; } });
|
||||
@ -24,6 +24,7 @@ var default_provider_js_1 = require("./default-provider.js");
|
||||
Object.defineProperty(exports, "getDefaultProvider", { enumerable: true, get: function () { return default_provider_js_1.getDefaultProvider; } });
|
||||
var ens_resolver_js_1 = require("./ens-resolver.js");
|
||||
Object.defineProperty(exports, "EnsResolver", { enumerable: true, get: function () { return ens_resolver_js_1.EnsResolver; } });
|
||||
Object.defineProperty(exports, "MulticoinProviderPlugin", { enumerable: true, get: function () { return ens_resolver_js_1.MulticoinProviderPlugin; } });
|
||||
var network_js_1 = require("./network.js");
|
||||
Object.defineProperty(exports, "Network", { enumerable: true, get: function () { return network_js_1.Network; } });
|
||||
var signer_noncemanager_js_1 = require("./signer-noncemanager.js");
|
||||
|
@ -1 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src.ts/providers/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;AAGH,+DAEgC;AAD5B,wHAAA,gBAAgB,OAAA;AA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E,0HAAA,iBAAiB,OAAA;AAAE,wHAAA,eAAe,OAAA;AAC3C,2DAA+E;AAAtE,oHAAA,cAAc,OAAA;AAAE,6HAAA,uBAAuB,OAAA;AAChD,2DAAsD;AAA7C,oHAAA,cAAc,OAAA;AACvB,iEAA4D;AAAnD,0HAAA,iBAAiB,OAAA;AAE1B,mEAA4D,CAAC,YAAY;AAChE,kGADA,yCAAiB,OACA;AAC1B,2DAAsD;AAA7C,oHAAA,cAAc,OAAA;AACvB,iEAA4D;AAAnD,0HAAA,iBAAiB,OAAA;AAE1B,2DAG8B;AAF1B,sHAAA,gBAAgB,OAAA;AAAE,2HAAA,qBAAqB,OAAA;AAAE,6HAAA,uBAAuB,OAAA;AAChE,2HAAA,qBAAqB,OAAA"}
|
3
lib.commonjs/providers/provider-jsonrpc.d.ts
vendored
3
lib.commonjs/providers/provider-jsonrpc.d.ts
vendored
@ -112,6 +112,8 @@ export type DebugEventJsonRpcApiProvider = {
|
||||
*
|
||||
* **``batchMaxCount``** - maximum number of requests to allow in a batch.
|
||||
* If ``batchMaxCount = 1``, then batching is disabled. (default: ``100``)
|
||||
*
|
||||
* **``cacheTimeout``** - passed as [[AbstractProviderOptions]].
|
||||
*/
|
||||
export type JsonRpcApiProviderOptions = {
|
||||
polling?: boolean;
|
||||
@ -119,6 +121,7 @@ export type JsonRpcApiProviderOptions = {
|
||||
batchStallTime?: number;
|
||||
batchMaxSize?: number;
|
||||
batchMaxCount?: number;
|
||||
cacheTimeout?: number;
|
||||
};
|
||||
/**
|
||||
* A **JsonRpcTransactionRequest** is formatted as needed by the JSON-RPC
|
||||
|
File diff suppressed because one or more lines are too long
@ -63,7 +63,8 @@ const defaultOptions = {
|
||||
staticNetwork: null,
|
||||
batchStallTime: 10,
|
||||
batchMaxSize: (1 << 20),
|
||||
batchMaxCount: 100 // 100 requests
|
||||
batchMaxCount: 100,
|
||||
cacheTimeout: 250
|
||||
};
|
||||
// @TODO: Unchecked Signers
|
||||
class JsonRpcSigner extends abstract_signer_js_1.AbstractSigner {
|
||||
@ -282,7 +283,11 @@ class JsonRpcApiProvider extends abstract_provider_js_1.AbstractProvider {
|
||||
}, stallTime);
|
||||
}
|
||||
constructor(network, options) {
|
||||
super(network);
|
||||
const superOptions = {};
|
||||
if (options && options.cacheTimeout != null) {
|
||||
superOptions.cacheTimeout = options.cacheTimeout;
|
||||
}
|
||||
super(network, superOptions);
|
||||
this.#nextId = 1;
|
||||
this.#options = Object.assign({}, defaultOptions, options || {});
|
||||
this.#payloads = [];
|
||||
|
File diff suppressed because one or more lines are too long
4
lib.commonjs/utils/fixednumber.d.ts
vendored
4
lib.commonjs/utils/fixednumber.d.ts
vendored
@ -1,4 +1,4 @@
|
||||
import type { BigNumberish, BytesLike } from "./index.js";
|
||||
import type { BigNumberish, BytesLike, Numeric } from "./index.js";
|
||||
/**
|
||||
* A description of a fixed-point arithmetic field.
|
||||
*
|
||||
@ -232,7 +232,7 @@ export declare class FixedNumber {
|
||||
* for %%decimals%%) cannot fit in %%format%%, either due to overflow
|
||||
* or underflow (precision loss).
|
||||
*/
|
||||
static fromValue(_value: BigNumberish, decimals?: number, _format?: FixedFormat): FixedNumber;
|
||||
static fromValue(_value: BigNumberish, _decimals?: Numeric, _format?: FixedFormat): FixedNumber;
|
||||
/**
|
||||
* Creates a new [[FixedNumber]] for %%value%% with %%format%%.
|
||||
*
|
||||
|
@ -1 +1 @@
|
||||
{"version":3,"file":"fixednumber.d.ts","sourceRoot":"","sources":["../../src.ts/utils/fixednumber.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AA2C1D;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG;IACxC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAA;CACpB,CAAC;AAw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||||
static fromValue(_value, decimals, _format) {
|
||||
if (decimals == null) {
|
||||
decimals = 0;
|
||||
}
|
||||
static fromValue(_value, _decimals, _format) {
|
||||
const decimals = (_decimals == null) ? 0 : (0, maths_js_1.getNumber)(_decimals);
|
||||
const format = getFormat(_format);
|
||||
let value = (0, maths_js_1.getBigInt)(_value, "value");
|
||||
const delta = decimals - format.decimals;
|
||||
|
File diff suppressed because one or more lines are too long
@ -2,5 +2,5 @@
|
||||
/**
|
||||
* The current version of Ethers.
|
||||
*/
|
||||
export const version = "6.5.1";
|
||||
export const version = "6.6.0";
|
||||
//# sourceMappingURL=_version.js.map
|
11
lib.esm/contract/contract.d.ts
vendored
11
lib.esm/contract/contract.d.ts
vendored
@ -59,6 +59,11 @@ export declare class BaseContract implements Addressable, EventEmitterable<Contr
|
||||
* a different %%runner%%.
|
||||
*/
|
||||
connect(runner: null | ContractRunner): BaseContract;
|
||||
/**
|
||||
* Return a new Contract instance with the same ABI and runner, but
|
||||
* a different %%target%%.
|
||||
*/
|
||||
attach(target: string | Addressable): BaseContract;
|
||||
/**
|
||||
* Return the resolved address of this Contract.
|
||||
*/
|
||||
@ -147,13 +152,13 @@ export declare class BaseContract implements Addressable, EventEmitterable<Contr
|
||||
/**
|
||||
* Create a new Class for the %%abi%%.
|
||||
*/
|
||||
static buildClass<T = ContractInterface>(abi: InterfaceAbi): new (target: string, runner?: null | ContractRunner) => BaseContract & Omit<T, keyof BaseContract>;
|
||||
static buildClass<T = ContractInterface>(abi: Interface | InterfaceAbi): new (target: string, runner?: null | ContractRunner) => BaseContract & Omit<T, keyof BaseContract>;
|
||||
/**
|
||||
* Create a new BaseContract with a specified Interface.
|
||||
*/
|
||||
static from<T = ContractInterface>(target: string, abi: InterfaceAbi, runner?: null | ContractRunner): BaseContract & Omit<T, keyof BaseContract>;
|
||||
static from<T = ContractInterface>(target: string, abi: Interface | InterfaceAbi, runner?: null | ContractRunner): BaseContract & Omit<T, keyof BaseContract>;
|
||||
}
|
||||
declare const Contract_base: new (target: string, abi: InterfaceAbi, runner?: ContractRunner | null | undefined) => BaseContract & Omit<ContractInterface, keyof BaseContract>;
|
||||
declare const Contract_base: new (target: string, abi: Interface | InterfaceAbi, runner?: ContractRunner | null | undefined) => BaseContract & Omit<ContractInterface, keyof BaseContract>;
|
||||
/**
|
||||
* A [[BaseContract]] with no type guards on its methods or events.
|
||||
*/
|
||||
|
@ -1 +1 @@
|
||||
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../src.ts/contract/contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAS,MAAM,iBAAiB,CAAC;AAInD,OAAO,EAAe,GAAG,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAMjF,OAAO,EAEH,2BAA2B,EAC3B,QAAQ,EACX,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,YAAY,EAAE,SAAS,EAAU,MAAM,iBAAiB,CAAC;AACxG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,KAAK,EACR,QAAQ,EAAE,cAAc,EAC3B,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EAER,iBAAiB,EACjB,iBAAiB,EAEjB,cAAc,EAEd,aAAa,EACb,mBAAmB,EAEnB,eAAe,EAClB,MAAM,YAAY,CAAC;AA6FpB;;GAEG;AACH,wBAAsB,aAAa,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,mBAAmB,EAAE,CAAC,CAAC,CAAC,CAgB9I;AAED;;GAEG;AACH,wBAAsB,WAAW,CAAC,OAAO,EAAE,IAAI,GAAG,cAAc,EAAE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Contract instance with the same ABI and runner, but
|
||||
* a different %%target%%.
|
||||
*/
|
||||
attach(target) {
|
||||
return new BaseContract(target, this.interface, this.runner);
|
||||
}
|
||||
/**
|
||||
* Return the resolved address of this Contract.
|
||||
*/
|
||||
|
File diff suppressed because one or more lines are too long
2
lib.esm/contract/factory.d.ts
vendored
2
lib.esm/contract/factory.d.ts
vendored
@ -1,6 +1,7 @@
|
||||
import { Interface } from "../abi/index.js";
|
||||
import { BaseContract } from "./contract.js";
|
||||
import type { InterfaceAbi } from "../abi/index.js";
|
||||
import type { Addressable } from "../address/index.js";
|
||||
import type { ContractRunner } from "../providers/index.js";
|
||||
import type { BytesLike } from "../utils/index.js";
|
||||
import type { ContractInterface, ContractMethodArgs, ContractDeployTransaction } from "./types.js";
|
||||
@ -31,6 +32,7 @@ export declare class ContractFactory<A extends Array<any> = Array<any>, I = Base
|
||||
constructor(abi: Interface | InterfaceAbi, bytecode: BytesLike | {
|
||||
object: string;
|
||||
}, runner?: null | ContractRunner);
|
||||
attach(target: string | Addressable): BaseContract & Omit<I, keyof BaseContract>;
|
||||
/**
|
||||
* Resolves to the transaction to deploy the contract, passing %%args%%
|
||||
* into the constructor.
|
||||
|
@ -1 +1 @@
|
||||
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../src.ts/contract/factory.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAO5C,OAAO,EAAE,YAAY,EAA8B,MAAM,eAAe,CAAC;AAEzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD,OAAO,KAAK,EACR,iBAAiB,EAAE,kBAAkB,EAAE,yBAAyB,EACnE,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,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B,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,YAAY,GAAG;QAAE,qBAAqB,IAAI,2BAA2B,CAAA;KAAE,GAAG,IAAI,CAAC,CAAC,EAAE,MAAM,YAAY,CAAC,CAAC;IAY5J;;;OAGG;IACH,OAAO,CAAC,MAAM,EAAE,IAAI,GAAG,cAAc,GAAG,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC;IAI7D;;OAEG;IACH,MAAM,CAAC,YAAY,CAAC,CAAC,SAAS,KAAK,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,iBAAiB,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,CAAC,EAAE,cAAc,GAAG,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC;CAgB7I"}
|
@ -46,6 +46,9 @@ export class ContractFactory {
|
||||
bytecode, interface: iface, runner: (runner || null)
|
||||
});
|
||||
}
|
||||
attach(target) {
|
||||
return new BaseContract(target, this.interface, this.runner);
|
||||
}
|
||||
/**
|
||||
* Resolves to the transaction to deploy the contract, passing %%args%%
|
||||
* into the constructor.
|
||||
|
@ -1 +1 @@
|
||||
{"version":3,"file":"factory.js","sourceRoot":"","sources":["../../src.ts/contract/factory.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EACH,MAAM,EAAE,gBAAgB,EAAE,QAAQ,EAAE,OAAO,EAC3C,MAAM,EAAE,cAAc,EACzB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAYzE,mCAAmC;AACnC,sCAAsC;AAEtC;;GAEG;AACH,MAAM,OAAO,eAAe;IAExB;;OAEG;IACM,SAAS,CAAa;IAE/B;;OAEG;IACM,QAAQ,CAAU;IAE3B;;OAEG;IACM,MAAM,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AI,QAAQ,GAAG,EAAE,CAAC;QAClB,IAAI,MAAM,CAAC,QAAQ,EAAE;YACjB,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;SAC9B;aAAM,IAAI,MAAM,CAAC,GAAG,IAAI,MAAM,CAAC,GAAG,CAAC,QAAQ,EAAE;YAC1C,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;SAClC;QAED,OAAO,IAAI,IAAI,CAAC,GAAG,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;IAC3C,CAAC;CACJ"}
|
4
lib.esm/ethers.d.ts
vendored
4
lib.esm/ethers.d.ts
vendored
@ -5,7 +5,7 @@ export { ZeroAddress, WeiPerEther, MaxUint256, MinInt256, MaxInt256, N, ZeroHash
|
||||
export { BaseContract, Contract, ContractFactory, ContractEventPayload, ContractTransactionReceipt, ContractTransactionResponse, ContractUnknownEventPayload, EventLog, } from "./contract/index.js";
|
||||
export { computeHmac, randomBytes, keccak256, ripemd160, sha256, sha512, pbkdf2, scrypt, scryptSync, lock, Signature, SigningKey } from "./crypto/index.js";
|
||||
export { id, ensNormalize, isValidName, namehash, dnsEncode, hashMessage, verifyMessage, solidityPacked, solidityPackedKeccak256, solidityPackedSha256, TypedDataEncoder, verifyTypedData } from "./hash/index.js";
|
||||
export { getDefaultProvider, Block, FeeData, Log, TransactionReceipt, TransactionResponse, AbstractSigner, NonceManager, VoidSigner, AbstractProvider, FallbackProvider, JsonRpcApiProvider, JsonRpcProvider, JsonRpcSigner, BrowserProvider, AlchemyProvider, AnkrProvider, CloudflareProvider, EtherscanProvider, InfuraProvider, InfuraWebSocketProvider, PocketProvider, QuickNodeProvider, IpcSocketProvider, SocketProvider, WebSocketProvider, EnsResolver, Network, EnsPlugin, EtherscanPlugin, FeeDataNetworkPlugin, GasCostPlugin, NetworkPlugin, SocketBlockSubscriber, SocketEventSubscriber, SocketPendingSubscriber, SocketSubscriber, UnmanagedSubscriber, copyRequest, showThrottleMessage } from "./providers/index.js";
|
||||
export { getDefaultProvider, Block, FeeData, Log, TransactionReceipt, TransactionResponse, AbstractSigner, NonceManager, VoidSigner, AbstractProvider, FallbackProvider, JsonRpcApiProvider, JsonRpcProvider, JsonRpcSigner, BrowserProvider, AlchemyProvider, AnkrProvider, CloudflareProvider, EtherscanProvider, InfuraProvider, InfuraWebSocketProvider, PocketProvider, QuickNodeProvider, IpcSocketProvider, SocketProvider, WebSocketProvider, EnsResolver, Network, EnsPlugin, EtherscanPlugin, FeeDataNetworkPlugin, GasCostPlugin, NetworkPlugin, MulticoinProviderPlugin, SocketBlockSubscriber, SocketEventSubscriber, SocketPendingSubscriber, SocketSubscriber, UnmanagedSubscriber, copyRequest, showThrottleMessage } from "./providers/index.js";
|
||||
export { accessListify, computeAddress, recoverAddress, Transaction } from "./transaction/index.js";
|
||||
export { decodeBase58, encodeBase58, decodeBase64, encodeBase64, concat, dataLength, dataSlice, getBytes, getBytesCopy, hexlify, isHexString, isBytesLike, stripZerosLeft, zeroPadBytes, zeroPadValue, defineProperties, resolveProperties, assert, assertArgument, assertArgumentCount, assertNormalize, assertPrivate, makeError, isCallException, isError, EventPayload, FetchRequest, FetchResponse, FetchCancelSignal, FixedNumber, getBigInt, getNumber, getUint, toBeArray, toBigInt, toBeHex, toNumber, toQuantity, fromTwos, toTwos, mask, formatEther, parseEther, formatUnits, parseUnits, toUtf8Bytes, toUtf8CodePoints, toUtf8String, Utf8ErrorFuncs, decodeRlp, encodeRlp, uuidV4, } from "./utils/index.js";
|
||||
export { Mnemonic, BaseWallet, HDNodeWallet, HDNodeVoidWallet, Wallet, defaultPath, getAccountPath, getIndexedAccountPath, isCrowdsaleJson, isKeystoreJson, decryptCrowdsaleJson, decryptKeystoreJsonSync, decryptKeystoreJson, encryptKeystoreJson, encryptKeystoreJsonSync, } from "./wallet/index.js";
|
||||
@ -15,7 +15,7 @@ export type { Addressable, AddressLike, NameResolver } from "./address/index.js"
|
||||
export type { ConstantContractMethod, ContractEvent, ContractEventArgs, ContractEventName, ContractInterface, ContractMethod, ContractMethodArgs, ContractTransaction, DeferredTopicFilter, Overrides, BaseContractMethod, ContractDeployTransaction, PostfixOverrides, WrappedFallback } from "./contract/index.js";
|
||||
export type { ProgressCallback, SignatureLike } from "./crypto/index.js";
|
||||
export type { TypedDataDomain, TypedDataField } from "./hash/index.js";
|
||||
export type { Provider, Signer, AbstractProviderPlugin, BlockParams, BlockTag, ContractRunner, DebugEventBrowserProvider, Eip1193Provider, EventFilter, Filter, FilterByBlockHash, GasCostParameters, JsonRpcApiProviderOptions, JsonRpcError, JsonRpcPayload, JsonRpcResult, JsonRpcTransactionRequest, LogParams, MinedBlock, MinedTransactionResponse, Networkish, OrphanFilter, PerformActionFilter, PerformActionRequest, PerformActionTransaction, PreparedTransactionRequest, ProviderEvent, Subscriber, Subscription, TopicFilter, TransactionReceiptParams, TransactionRequest, TransactionResponseParams, WebSocketCreator, WebSocketLike } from "./providers/index.js";
|
||||
export type { Provider, Signer, AbstractProviderOptions, AbstractProviderPlugin, BlockParams, BlockTag, ContractRunner, DebugEventBrowserProvider, Eip1193Provider, EventFilter, Filter, FilterByBlockHash, GasCostParameters, JsonRpcApiProviderOptions, JsonRpcError, JsonRpcPayload, JsonRpcResult, JsonRpcTransactionRequest, LogParams, MinedBlock, MinedTransactionResponse, Networkish, OrphanFilter, PerformActionFilter, PerformActionRequest, PerformActionTransaction, PreparedTransactionRequest, ProviderEvent, Subscriber, Subscription, TopicFilter, TransactionReceiptParams, TransactionRequest, TransactionResponseParams, WebSocketCreator, WebSocketLike } from "./providers/index.js";
|
||||
export type { AccessList, AccessListish, AccessListEntry, TransactionLike } from "./transaction/index.js";
|
||||
export type { BytesLike, BigNumberish, Numeric, ErrorCode, FixedFormat, Utf8ErrorFunc, UnicodeNormalizationForm, Utf8ErrorReason, RlpStructuredData, GetUrlResponse, FetchPreflightFunc, FetchProcessFunc, FetchRetryFunc, FetchGatewayFunc, FetchGetUrlFunc, EthersError, UnknownError, NotImplementedError, UnsupportedOperationError, NetworkError, ServerError, TimeoutError, BadDataError, CancelledError, BufferOverrunError, NumericFaultError, InvalidArgumentError, MissingArgumentError, UnexpectedArgumentError, CallExceptionError, InsufficientFundsError, NonceExpiredError, OffchainFaultError, ReplacementUnderpricedError, TransactionReplacedError, UnconfiguredNameError, ActionRejectedError, CodedEthersError, CallExceptionAction, CallExceptionTransaction, EventEmitterable, Listener } from "./utils/index.js";
|
||||
export type { CrowdsaleAccount, KeystoreAccount, EncryptOptions } from "./wallet/index.js";
|
||||
|
@ -1 +1 @@
|
||||
{"version":3,"file":"ethers.d.ts","sourceRoot":"","sources":["../src.ts/ethers.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,OAAO,EACH,mBAAmB,EAAE,mBAAmB,EAExC,QAAQ,EACR,mBAAmB,EAAE,aAAa,EAAE,aAAa,EAAE,QAAQ,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,aAAa,EAAE,SAAS,EAAE,cAAc,EAEzI,iBAAiB,EAAE,gBAAgB,EAAE,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,EAAE,sBAAsB,EACvG,KAAK,GACR,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACH,UAAU,EAAE,cAAc,EAC1B,gBAAgB,EAAE,iBAAiB,EACnC,aAAa,EAAE,SAAS,EAAE,cAAc,EAC3C,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACH,WAAW,EACX,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC,EAChD,QAAQ,EACR,WAAW,EAAE,aAAa,EAC7B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACH,YAAY,EAAE,QAAQ,EACtB,eAAe,EACf,oBAAoB,EAAE,0BAA0B,EAAE,2BAA2B,EAAE,2BAA2B,EAAE,QAAQ,GACvH,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACH,WAAW,EACX,WAAW,EACX,SAAS,EACT,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7 @@ export { ZeroAddress, WeiPerEther, MaxUint256, MinInt256, MaxInt256, N, ZeroHash
|
||||
export { BaseContract, Contract, ContractFactory, ContractEventPayload, ContractTransactionReceipt, ContractTransactionResponse, ContractUnknownEventPayload, EventLog, } from "./contract/index.js";
|
||||
export { computeHmac, randomBytes, keccak256, ripemd160, sha256, sha512, pbkdf2, scrypt, scryptSync, lock, Signature, SigningKey } from "./crypto/index.js";
|
||||
export { id, ensNormalize, isValidName, namehash, dnsEncode, hashMessage, verifyMessage, solidityPacked, solidityPackedKeccak256, solidityPackedSha256, TypedDataEncoder, verifyTypedData } from "./hash/index.js";
|
||||
export { getDefaultProvider, Block, FeeData, Log, TransactionReceipt, TransactionResponse, AbstractSigner, NonceManager, VoidSigner, AbstractProvider, FallbackProvider, JsonRpcApiProvider, JsonRpcProvider, JsonRpcSigner, BrowserProvider, AlchemyProvider, AnkrProvider, CloudflareProvider, EtherscanProvider, InfuraProvider, InfuraWebSocketProvider, PocketProvider, QuickNodeProvider, IpcSocketProvider, SocketProvider, WebSocketProvider, EnsResolver, Network, EnsPlugin, EtherscanPlugin, FeeDataNetworkPlugin, GasCostPlugin, NetworkPlugin, SocketBlockSubscriber, SocketEventSubscriber, SocketPendingSubscriber, SocketSubscriber, UnmanagedSubscriber, copyRequest, showThrottleMessage } from "./providers/index.js";
|
||||
export { getDefaultProvider, Block, FeeData, Log, TransactionReceipt, TransactionResponse, AbstractSigner, NonceManager, VoidSigner, AbstractProvider, FallbackProvider, JsonRpcApiProvider, JsonRpcProvider, JsonRpcSigner, BrowserProvider, AlchemyProvider, AnkrProvider, CloudflareProvider, EtherscanProvider, InfuraProvider, InfuraWebSocketProvider, PocketProvider, QuickNodeProvider, IpcSocketProvider, SocketProvider, WebSocketProvider, EnsResolver, Network, EnsPlugin, EtherscanPlugin, FeeDataNetworkPlugin, GasCostPlugin, NetworkPlugin, MulticoinProviderPlugin, SocketBlockSubscriber, SocketEventSubscriber, SocketPendingSubscriber, SocketSubscriber, UnmanagedSubscriber, copyRequest, showThrottleMessage } from "./providers/index.js";
|
||||
export { accessListify, computeAddress, recoverAddress, Transaction } from "./transaction/index.js";
|
||||
export { decodeBase58, encodeBase58, decodeBase64, encodeBase64, concat, dataLength, dataSlice, getBytes, getBytesCopy, hexlify, isHexString, isBytesLike, stripZerosLeft, zeroPadBytes, zeroPadValue, defineProperties, resolveProperties, assert, assertArgument, assertArgumentCount, assertNormalize, assertPrivate, makeError, isCallException, isError, EventPayload, FetchRequest, FetchResponse, FetchCancelSignal, FixedNumber, getBigInt, getNumber, getUint, toBeArray, toBigInt, toBeHex, toNumber, toQuantity, fromTwos, toTwos, mask, formatEther, parseEther, formatUnits, parseUnits, toUtf8Bytes, toUtf8CodePoints, toUtf8String, Utf8ErrorFuncs, decodeRlp, encodeRlp, uuidV4, } from "./utils/index.js";
|
||||
export { Mnemonic, BaseWallet, HDNodeWallet, HDNodeVoidWallet, Wallet, defaultPath, getAccountPath, getIndexedAccountPath, isCrowdsaleJson, isKeystoreJson, decryptCrowdsaleJson, decryptKeystoreJsonSync, decryptKeystoreJson, encryptKeystoreJson, encryptKeystoreJsonSync, } from "./wallet/index.js";
|
||||
|
@ -1 +1 @@
|
||||
{"version":3,"file":"ethers.js","sourceRoot":"","sources":["../src.ts/ethers.ts"],"names":[],"mappings":"AAEA,6BAA6B;AAC7B,EAAE;AAEF,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,OAAO,EACH,mBAAmB,EAAE,mBAAmB,EAExC,QAAQ,EACR,mBAAmB,EAAE,aAAa,EAAE,aAAa,EAAE,QAAQ,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,aAAa,EAAE,SAAS,EAAE,cAAc,EAEzI,iBAAiB,EAAE,gBAAgB,EAAE,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,EAAE,sBAAsB,EACvG,KAAK,GACR,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACH,UAAU,EAAE,cAAc,EAC1B,gBAAg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EAAE,YAAY,EAC3C,cAAc,EACd,SAAS,EAAE,SAAS,EACpB,MAAM,GACT,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACH,QAAQ,EACR,UAAU,EAAE,YAAY,EAAE,gBAAgB,EAC1C,MAAM,EAEN,WAAW,EAEX,cAAc,EAAE,qBAAqB,EACrC,eAAe,EAAE,cAAc,EAE/B,oBAAoB,EAAE,uBAAuB,EAAE,mBAAmB,EAClE,mBAAmB,EAAE,uBAAuB,GAC/C,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACH,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,YAAY,EAAE,SAAS,EACzD,MAAM,sBAAsB,CAAC"}
|
15
lib.esm/providers/abstract-provider.d.ts
vendored
15
lib.esm/providers/abstract-provider.d.ts
vendored
@ -227,6 +227,19 @@ export type PerformActionRequest = {
|
||||
method: "getTransactionResult";
|
||||
hash: string;
|
||||
};
|
||||
/**
|
||||
* Options for configuring some internal aspects of an [[AbstractProvider]].
|
||||
*
|
||||
* **``cacheTimeout``** - how long to cache a low-level ``_perform``
|
||||
* for, based on input parameters. This reduces the number of calls
|
||||
* to getChainId and getBlockNumber, but may break test chains which
|
||||
* can perform operations (internally) synchronously. Use ``-1`` to
|
||||
* disable, ``0`` will only buffer within the same event loop and
|
||||
* any other value is in ms. (default: ``250``)
|
||||
*/
|
||||
export type AbstractProviderOptions = {
|
||||
cacheTimeout?: number;
|
||||
};
|
||||
/**
|
||||
* An **AbstractProvider** provides a base class for other sub-classes to
|
||||
* implement the [[Provider]] API by normalizing input arguments and
|
||||
@ -240,7 +253,7 @@ export declare class AbstractProvider implements Provider {
|
||||
* use the various network detection capabilities to discover the
|
||||
* [[Network]] if necessary.
|
||||
*/
|
||||
constructor(_network?: "any" | Networkish);
|
||||
constructor(_network?: "any" | Networkish, options?: AbstractProviderOptions);
|
||||
/**
|
||||
* Returns ``this``, to allow an **AbstractProvider** to implement
|
||||
* the [[ContractRunner]] interface.
|
||||
|
File diff suppressed because one or more lines are too long
@ -149,6 +149,9 @@ async function getSubscription(_event, provider) {
|
||||
assertArgument(false, "unknown ProviderEvent", "event", _event);
|
||||
}
|
||||
function getTime() { return (new Date()).getTime(); }
|
||||
const defaultOptions = {
|
||||
cacheTimeout: 250
|
||||
};
|
||||
/**
|
||||
* An **AbstractProvider** provides a base class for other sub-classes to
|
||||
* implement the [[Provider]] API by normalizing input arguments and
|
||||
@ -169,12 +172,14 @@ export class AbstractProvider {
|
||||
#nextTimer;
|
||||
#timers;
|
||||
#disableCcipRead;
|
||||
#options;
|
||||
/**
|
||||
* Create a new **AbstractProvider** connected to %%network%%, or
|
||||
* use the various network detection capabilities to discover the
|
||||
* [[Network]] if necessary.
|
||||
*/
|
||||
constructor(_network) {
|
||||
constructor(_network, options) {
|
||||
this.#options = Object.assign({}, defaultOptions, options || {});
|
||||
if (_network === "any") {
|
||||
this.#anyNetwork = true;
|
||||
this.#networkPromise = null;
|
||||
@ -234,6 +239,11 @@ export class AbstractProvider {
|
||||
set disableCcipRead(value) { this.#disableCcipRead = !!value; }
|
||||
// Shares multiple identical requests made during the same 250ms
|
||||
async #perform(req) {
|
||||
const timeout = this.#options.cacheTimeout;
|
||||
// Caching disabled
|
||||
if (timeout < 0) {
|
||||
return await this._perform(req);
|
||||
}
|
||||
// Create a tag
|
||||
const tag = getTag(req.method, req);
|
||||
let perform = this.#performCache.get(tag);
|
||||
@ -244,7 +254,7 @@ export class AbstractProvider {
|
||||
if (this.#performCache.get(tag) === perform) {
|
||||
this.#performCache.delete(tag);
|
||||
}
|
||||
}, 250);
|
||||
}, timeout);
|
||||
}
|
||||
return await perform;
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
{"version":3,"file":"ens-resolver.d.ts","sourceRoot":"","sources":["../../src.ts/providers/ens-resolver.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAcH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD,OAAO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IN;AAUD;;;GAGG;AACH,qBAAa,WAAW;;IACpB;;OAEG;IACH,QAAQ,EAAG,gBAAgB,CAAC;IAE5B;;OAEG;IACH,OAAO,EAAG,MAAM,CAAC;IAEjB;;OAEG;IACH,IAAI,EAAG,MAAM,CAAC;gBAOF,QAAQ,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;IAerE;;OAEG;IACG,gBAAgB,IAAI,OAAO,CAAC,OAAO,CAAC;IA8D1C;;;OAGG;IACG,UAAU,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,GAAG,MAAM,CAAC;IAoD3D;;;OAGG;IACG,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,GAAG,MAAM,CAAC;IAMlD;;OAEG;IACG,cAAc,IAAI,OAAO,CAAC,IAAI,GAAG,MAAM,CAAC;IA6B9C;;;;;;;OAOG;IACG,SAAS,IAAI,OAAO,CAAC,IAAI,GAAG,MAAM,CAAC;IAKzC;;;;;;;OAOG;IACG,UAAU,IAAI,OAAO,CAAC,YAAY,CAAC;WAgK5B,aAAa,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC;IAoC/D;;;OAGG;WACU,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,GAAG,WAAW,CAAC;CA2B/F"}
|
@ -4,10 +4,11 @@
|
||||
*
|
||||
* @_section: api/providers/ens-resolver:ENS Resolver [about-ens-rsolver]
|
||||
*/
|
||||
import { getAddress } from "../address/index.js";
|
||||
import { ZeroAddress } from "../constants/index.js";
|
||||
import { Contract } from "../contract/index.js";
|
||||
import { dnsEncode, namehash } from "../hash/index.js";
|
||||
import { hexlify, toBeHex, defineProperties, encodeBase58, assert, assertArgument, isError, FetchRequest } from "../utils/index.js";
|
||||
import { hexlify, isHexString, toBeHex, defineProperties, encodeBase58, assert, assertArgument, isError, FetchRequest } from "../utils/index.js";
|
||||
// @TODO: This should use the fetch-data:ipfs gateway
|
||||
// Trim off the ipfs:// prefix and return the default gateway URL
|
||||
function getIpfsLink(link) {
|
||||
@ -108,7 +109,7 @@ export class EnsResolver {
|
||||
"function supportsInterface(bytes4) view returns (bool)",
|
||||
"function resolve(bytes, bytes) view returns (bytes)",
|
||||
"function addr(bytes32) view returns (address)",
|
||||
"function addr(bytes32, uint) view returns (address)",
|
||||
"function addr(bytes32, uint) view returns (bytes)",
|
||||
"function text(bytes32, string) view returns (string)",
|
||||
"function contenthash(bytes32) view returns (bytes)",
|
||||
], provider);
|
||||
@ -194,6 +195,14 @@ export class EnsResolver {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
// Try decoding its EVM canonical chain as an EVM chain address first
|
||||
if (coinType >= 0 && coinType < 0x80000000) {
|
||||
let ethCoinType = coinType + 0x80000000;
|
||||
const data = await this.#fetch("addr(bytes32,uint)", [ethCoinType]);
|
||||
if (isHexString(data, 20)) {
|
||||
return getAddress(data);
|
||||
}
|
||||
}
|
||||
let coinPlugin = null;
|
||||
for (const plugin of this.provider.plugins) {
|
||||
if (!(plugin instanceof MulticoinProviderPlugin)) {
|
||||
@ -214,7 +223,7 @@ export class EnsResolver {
|
||||
return null;
|
||||
}
|
||||
// Compute the address
|
||||
const address = await coinPlugin.encodeAddress(coinType, data);
|
||||
const address = await coinPlugin.decodeAddress(coinType, data);
|
||||
if (address != null) {
|
||||
return address;
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
4
lib.esm/providers/index.d.ts
vendored
4
lib.esm/providers/index.d.ts
vendored
@ -13,7 +13,7 @@ export { AbstractProvider, UnmanagedSubscriber } from "./abstract-provider.js";
|
||||
export { AbstractSigner, VoidSigner, } from "./abstract-signer.js";
|
||||
export { showThrottleMessage } from "./community.js";
|
||||
export { getDefaultProvider } from "./default-provider.js";
|
||||
export { EnsResolver } from "./ens-resolver.js";
|
||||
export { EnsResolver, MulticoinProviderPlugin } from "./ens-resolver.js";
|
||||
export { Network } from "./network.js";
|
||||
export { NonceManager } from "./signer-noncemanager.js";
|
||||
export { NetworkPlugin, GasCostPlugin, EnsPlugin, FeeDataNetworkPlugin, } from "./plugins-network.js";
|
||||
@ -33,7 +33,7 @@ export { IpcSocketProvider };
|
||||
export { SocketProvider } from "./provider-socket.js";
|
||||
export { WebSocketProvider } from "./provider-websocket.js";
|
||||
export { SocketSubscriber, SocketBlockSubscriber, SocketPendingSubscriber, SocketEventSubscriber } from "./provider-socket.js";
|
||||
export type { Subscription, Subscriber, AbstractProviderPlugin, PerformActionFilter, PerformActionTransaction, PerformActionRequest, } from "./abstract-provider.js";
|
||||
export type { AbstractProviderOptions, Subscription, Subscriber, AbstractProviderPlugin, PerformActionFilter, PerformActionTransaction, PerformActionRequest, } from "./abstract-provider.js";
|
||||
export type { ContractRunner } from "./contracts.js";
|
||||
export type { BlockParams, LogParams, TransactionReceiptParams, TransactionResponseParams, } from "./formatting.js";
|
||||
export type { Networkish } from "./network.js";
|
||||
|
@ -1 +1 @@
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src.ts/providers/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EACH,gBAAgB,EAAE,mBAAmB,EACxC,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACH,cAAc,EACd,UAAU,GACb,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACH,mBAAmB,EACtB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAExD,OAAO,EACH,aAAa,EACb,aAAa,EACb,SAAS,EACT,oBAAoB,GACvB,MAAM,sBAAsB,CAAC;AAE9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,cAAc,CAAC;AAE/C,YAAY,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE9D,YAAY,EACR,QAAQ,EACR,kBAAkB,EAAE,0BAA0B,EAC9C,WAAW,EAAE,MAAM,EAAE,iBAAiB,EAAE,YAAY,EAAE,aAAa,EACnE,WAAW,EACX,QAAQ,EACR,UAAU,EAAE,wBAAwB,EACvC,MAAM,eAAe,CAAC;AAEvB,YAAY,EACR,yBAAyB,EAAE,eAAe,EAC7C,MAAM,uBAAuB,CAAC;AAE/B,YAAY,EACR,cAAc,EAAE,aAAa,EAAE,YAAY,EAC3C,yBAAyB,EACzB,yBAAyB,GAC5B,MAAM,uBAAuB,CAAC;AAE/B,YAAY,EACR,gBAAgB,EAAE,aAAa,EAClC,MAAM,yBAAyB,CAAC;AAEjC,YAAY,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC"}
|
@ -13,7 +13,7 @@ export { AbstractProvider, UnmanagedSubscriber } from "./abstract-provider.js";
|
||||
export { AbstractSigner, VoidSigner, } from "./abstract-signer.js";
|
||||
export { showThrottleMessage } from "./community.js";
|
||||
export { getDefaultProvider } from "./default-provider.js";
|
||||
export { EnsResolver } from "./ens-resolver.js";
|
||||
export { EnsResolver, MulticoinProviderPlugin } from "./ens-resolver.js";
|
||||
export { Network } from "./network.js";
|
||||
export { NonceManager } from "./signer-noncemanager.js";
|
||||
export { NetworkPlugin, GasCostPlugin, EnsPlugin, FeeDataNetworkPlugin, } from "./plugins-network.js";
|
||||
|
@ -1 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src.ts/providers/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EACH,gBAAgB,EAAE,mBAAmB,EACxC,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACH,cAAc,EACd,UAAU,GACb,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACH,mBAAmB,EACtB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAA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AO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC,CAAC,YAAY;AACzE,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE5D,OAAO,EACH,gBAAgB,EAAE,qBAAqB,EAAE,uBAAuB,EAChE,qBAAqB,EACxB,MAAM,sBAAsB,CAAC"}
|
3
lib.esm/providers/provider-jsonrpc.d.ts
vendored
3
lib.esm/providers/provider-jsonrpc.d.ts
vendored
@ -112,6 +112,8 @@ export type DebugEventJsonRpcApiProvider = {
|
||||
*
|
||||
* **``batchMaxCount``** - maximum number of requests to allow in a batch.
|
||||
* If ``batchMaxCount = 1``, then batching is disabled. (default: ``100``)
|
||||
*
|
||||
* **``cacheTimeout``** - passed as [[AbstractProviderOptions]].
|
||||
*/
|
||||
export type JsonRpcApiProviderOptions = {
|
||||
polling?: boolean;
|
||||
@ -119,6 +121,7 @@ export type JsonRpcApiProviderOptions = {
|
||||
batchStallTime?: number;
|
||||
batchMaxSize?: number;
|
||||
batchMaxCount?: number;
|
||||
cacheTimeout?: number;
|
||||
};
|
||||
/**
|
||||
* A **JsonRpcTransactionRequest** is formatted as needed by the JSON-RPC
|
||||
|
File diff suppressed because one or more lines are too long
@ -60,7 +60,8 @@ const defaultOptions = {
|
||||
staticNetwork: null,
|
||||
batchStallTime: 10,
|
||||
batchMaxSize: (1 << 20),
|
||||
batchMaxCount: 100 // 100 requests
|
||||
batchMaxCount: 100,
|
||||
cacheTimeout: 250
|
||||
};
|
||||
// @TODO: Unchecked Signers
|
||||
export class JsonRpcSigner extends AbstractSigner {
|
||||
@ -278,7 +279,11 @@ export class JsonRpcApiProvider extends AbstractProvider {
|
||||
}, stallTime);
|
||||
}
|
||||
constructor(network, options) {
|
||||
super(network);
|
||||
const superOptions = {};
|
||||
if (options && options.cacheTimeout != null) {
|
||||
superOptions.cacheTimeout = options.cacheTimeout;
|
||||
}
|
||||
super(network, superOptions);
|
||||
this.#nextId = 1;
|
||||
this.#options = Object.assign({}, defaultOptions, options || {});
|
||||
this.#payloads = [];
|
||||
|
File diff suppressed because one or more lines are too long
4
lib.esm/utils/fixednumber.d.ts
vendored
4
lib.esm/utils/fixednumber.d.ts
vendored
@ -1,4 +1,4 @@
|
||||
import type { BigNumberish, BytesLike } from "./index.js";
|
||||
import type { BigNumberish, BytesLike, Numeric } from "./index.js";
|
||||
/**
|
||||
* A description of a fixed-point arithmetic field.
|
||||
*
|
||||
@ -232,7 +232,7 @@ export declare class FixedNumber {
|
||||
* for %%decimals%%) cannot fit in %%format%%, either due to overflow
|
||||
* or underflow (precision loss).
|
||||
*/
|
||||
static fromValue(_value: BigNumberish, decimals?: number, _format?: FixedFormat): FixedNumber;
|
||||
static fromValue(_value: BigNumberish, _decimals?: Numeric, _format?: FixedFormat): FixedNumber;
|
||||
/**
|
||||
* Creates a new [[FixedNumber]] for %%value%% with %%format%%.
|
||||
*
|
||||
|
@ -1 +1 @@
|
||||
{"version":3,"file":"fixednumber.d.ts","sourceRoot":"","sources":["../../src.ts/utils/fixednumber.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AA2C1D;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG;IACxC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAA;CACpB,CAAC;AAwGF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,qBAAa,WAAW;;IAEpB;;OAEG;IACH,QAAQ,CAAC,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AAE,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO;IAEhC;;OAEG;IACF,EAAE,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO;IAEhC;;OAEG;IACF,GAAG,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO;IAEjC;;OAEG;IACF,EAAE,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO;IAEhC;;OAEG;IACF,GAAG,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO;IAEjC;;;;;OAKG;IACH,KAAK,IAAI,WAAW;IAOpB;;;;;OAKG;IACH,OAAO,IAAI,WAAW;IAOtB;;;OAGG;IACH,KAAK,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,WAAW;IAkBrC;;OAEG;IACH,MAAM,IAAI,OAAO;IAEjB;;OAEG;IACH,UAAU,IAAI,OAAO;IAErB;;OAEG;IACH,QAAQ,IAAI,MAAM;IAElB;;;;;;OAMG;IACH,aAAa,IAAI,MAAM;IAEvB;;;;;OAKG;IACH,QAAQ,CAAC,MAAM,EAAE,WAAW,GAAG,WAAW;IAI1C;;;;;;;OAOG;IACH,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,YAAY,EAAE,SAAS,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,WAAW;IAqB/F;;;;;OAKG;IACH,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,WAAW;IA0BrE;;;;;;OAMG;IACH,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,WAAW;CAU1E"}
|
@ -10,7 +10,7 @@
|
||||
*/
|
||||
import { getBytes } from "./data.js";
|
||||
import { assert, assertArgument, assertPrivate } from "./errors.js";
|
||||
import { getBigInt, fromTwos, mask, toBigInt } from "./maths.js";
|
||||
import { getBigInt, getNumber, fromTwos, mask, toBigInt } from "./maths.js";
|
||||
import { defineProperties } from "./properties.js";
|
||||
const BN_N1 = BigInt(-1);
|
||||
const BN_0 = BigInt(0);
|
||||
@ -459,10 +459,8 @@ export class FixedNumber {
|
||||
* for %%decimals%%) cannot fit in %%format%%, either due to overflow
|
||||
* or underflow (precision loss).
|
||||
*/
|
||||
static fromValue(_value, decimals, _format) {
|
||||
if (decimals == null) {
|
||||
decimals = 0;
|
||||
}
|
||||
static fromValue(_value, _decimals, _format) {
|
||||
const decimals = (_decimals == null) ? 0 : getNumber(_decimals);
|
||||
const format = getFormat(_format);
|
||||
let value = getBigInt(_value, "value");
|
||||
const delta = decimals - format.decimals;
|
||||
|
File diff suppressed because one or more lines are too long
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "ethers",
|
||||
"version": "6.4.2",
|
||||
"version": "6.5.1",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "ethers",
|
||||
"version": "6.4.2",
|
||||
"version": "6.5.1",
|
||||
"funding": [
|
||||
{
|
||||
"type": "individual",
|
||||
|
@ -93,7 +93,7 @@
|
||||
"url": "https://www.buymeacoffee.com/ricmoo"
|
||||
}
|
||||
],
|
||||
"gitHead": "8dd21f03334ffd3cdb7ac532376d51fd4130c7ab",
|
||||
"gitHead": "203a759efc65bf6901d3e574a601525ea3936238",
|
||||
"homepage": "https://ethers.org",
|
||||
"keywords": [
|
||||
"ethereum",
|
||||
@ -131,5 +131,5 @@
|
||||
"test-esm": "mocha --reporter ./reporter.cjs ./lib.esm/_tests/test-*.js"
|
||||
},
|
||||
"sideEffects": false,
|
||||
"version": "6.5.1"
|
||||
"version": "6.6.0"
|
||||
}
|
||||
|
@ -3,4 +3,4 @@
|
||||
/**
|
||||
* The current version of Ethers.
|
||||
*/
|
||||
export const version: string = "6.5.1";
|
||||
export const version: string = "6.6.0";
|
||||
|
Loading…
Reference in New Issue
Block a user