admin: updated dist files

This commit is contained in:
Richard Moore 2023-01-26 23:36:26 -05:00
parent 360835e301
commit 4f257279ab
57 changed files with 1764 additions and 301 deletions

1349
dist/ethers.js vendored

File diff suppressed because one or more lines are too long

2
dist/ethers.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/ethers.min.js vendored

File diff suppressed because one or more lines are too long

@ -145,7 +145,7 @@ const u64 = {
add, add3L, add3H, add4L, add4H, add5H, add5L,
};
const version = "6.0.0-beta-exports.11";
const version = "6.0.0-beta-exports.12";
/**
* Property helper functions.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -6,26 +6,25 @@ Object.defineProperty(exports, "__esModule", { value: true });
const assert_1 = __importDefault(require("assert"));
const index_js_1 = require("../index.js");
const utils_js_1 = require("./utils.js");
/*
import { dnsEncode, isValidName, namehash } from "../index.js";
describe("Tests Namehash", function() {
const tests = loadTests<TestCaseNamehash>("namehash");
//import { dnsEncode, isValidName, namehash } from "../index.js";
describe("Tests Namehash", function () {
const tests = (0, utils_js_1.loadTests)("namehash");
for (const test of tests) {
it(`hashes ENS names: ${ JSON.stringify(test.ensName) }`, function() {
const actual = namehash(test.ensName);
assert.equal(actual, test.namehash, "namehash");
if (test.error) {
}
else {
it(`hashes ENS name: ${JSON.stringify(test.name)}`, function () {
const actual = (0, index_js_1.namehash)(test.ensName);
assert_1.default.equal(actual, test.namehash, "namehash");
// The empty string is not a valid ENS name
if (test.ensName) {
assert.ok(isValidName(test.ensName), "isValidName");
assert_1.default.ok((0, index_js_1.isValidName)(test.ensName), "isValidName");
}
});
}
}
});
/*
describe("Tests Bad ENS Names", function() {
const badTests: Array<{ ensName: any, prefix: string }> = [
{ ensName: ".", prefix: "missing component" },

@ -1 +1 @@
{"version":3,"file":"test-hash.js","sourceRoot":"","sources":["../../src.ts/_tests/test-hash.ts"],"names":[],"mappings":";;;;;AAAA,oDAA4B;AAE5B,0CAIqB;AAErB,yCAAsC;AAItC;;;;;;;;;;;;;;;;;;;;;;;;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AO,EAAC,KAAK,EAAE,kBAAkB,CAAC,IAAI,KAAK,CAAC,QAAQ,KAAK,MAAM,CAAC,CAAC;YAC7E,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;KACN;AACL,CAAC,CAAC,CAAC"}

@ -1 +1 @@
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src.ts/_tests/types.ts"],"names":[],"mappings":";;AA2PC,CAAC"}
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src.ts/_tests/types.ts"],"names":[],"mappings":";;AA4PC,CAAC"}

@ -1,5 +1,5 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = void 0;
exports.version = "6.0.0-beta-exports.11";
exports.version = "6.0.0-beta-exports.12";
//# sourceMappingURL=_version.js.map

@ -2,12 +2,20 @@
Object.defineProperty(exports, "__esModule", { value: true });
exports.Reader = exports.Writer = exports.Coder = exports.checkResultErrors = exports.Result = exports.WordSize = void 0;
const index_js_1 = require("../../utils/index.js");
/**
* @_ignore:
*/
exports.WordSize = 32;
const Padding = new Uint8Array(exports.WordSize);
// Properties used to immediate pass through to the underlying object
// - `then` is used to detect if an object is a Promise for await
const passProperties = ["then"];
const _guard = {};
function throwError(name, error) {
const wrapped = new Error(`deferred error during ABI decoding triggered accessing ${name}`);
wrapped.error = error;
throw wrapped;
}
/**
* A [[Result]] is a sub-class of Array, which allows accessing any
* of its values either positionally by its index or, if keys are
@ -16,32 +24,55 @@ const _guard = {};
* @_docloc: api/abi
*/
class Result extends Array {
#indices;
#names;
/**
* @private
*/
constructor(guard, items, keys) {
(0, index_js_1.assertPrivate)(guard, _guard, "Result");
super(...items);
// Name lookup table
this.#indices = new Map();
if (keys) {
keys.forEach((key, index) => {
if (key == null) {
constructor(...args) {
// To properly sub-class Array so the other built-in
// functions work, the constructor has to behave fairly
// well. So, in the event we are created via fromItems()
// we build the read-only Result object we want, but on
// any other input, we use the default constructor
// constructor(guard: any, items: Array<any>, keys?: Array<null | string>);
const guard = args[0];
let items = args[1];
let names = (args[2] || []).slice();
let wrap = true;
if (guard !== _guard) {
items = args;
names = [];
wrap = false;
}
// Can't just pass in ...items since an array of length 1
// is a special case in the super.
super(items.length);
items.forEach((item, index) => { this[index] = item; });
// Find all unique keys
const nameCounts = names.reduce((accum, name) => {
if (typeof (name) === "string") {
accum.set(name, (accum.get(name) || 0) + 1);
}
return accum;
}, (new Map()));
// Remove any key thats not unique
this.#names = Object.freeze(items.map((item, index) => {
const name = names[index];
if (name != null && nameCounts.get(name) === 1) {
return name;
}
return null;
}));
if (!wrap) {
return;
}
if (this.#indices.has(key)) {
(this.#indices.get(key)).push(index);
}
else {
this.#indices.set(key, [index]);
}
});
}
// A wrapped Result is immutable
Object.freeze(this);
// Proxy indices and names so we can trap deferred errors
return new Proxy(this, {
get: (target, prop, receiver) => {
if (typeof (prop) === "string") {
// Index accessor
if (prop.match(/^[0-9]+$/)) {
const index = (0, index_js_1.getNumber)(prop, "%index");
if (index < 0 || index >= this.length) {
@ -49,35 +80,63 @@ class Result extends Array {
}
const item = target[index];
if (item instanceof Error) {
this.#throwError(`index ${index}`, item);
throwError(`index ${index}`, item);
}
return item;
}
// Pass important checks (like `then` for Promise) through
if (prop in target || passProperties.indexOf(prop) >= 0) {
if (passProperties.indexOf(prop) >= 0) {
return Reflect.get(target, prop, receiver);
}
// Something that could be a result keyword value
if (!(prop in target)) {
return target.getValue(prop);
const value = target[prop];
if (value instanceof Function) {
// Make sure functions work with private variables
// See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy#no_private_property_forwarding
return function (...args) {
return value.apply((this === receiver) ? target : this, args);
};
}
else if (!(prop in target)) {
// Possible name accessor
return target.getValue.apply((this === receiver) ? target : this, [prop]);
}
}
return Reflect.get(target, prop, receiver);
}
});
}
/*
toJSON(): any {
if (this.#indices.length === this.length) {
const result: Record<string, any> = { };
for (const key of this.#indices.keys()) {
result[key] = ths.getValue(key);
}
return result;
}
return this;
}
/**
* Returns the Result as a normal Array.
*
* This will throw if there are any outstanding deferred
* errors.
*/
toArray() {
this.forEach((item, index) => {
if (item instanceof Error) {
throwError(`index ${index}`, item);
}
});
return Array.of(this);
}
/**
* Returns the Result as an Object with each name-value pair.
*
* This will throw if any value is unnamed, or if there are
* any outstanding deferred errors.
*/
toObject() {
return this.#names.reduce((accum, name, index) => {
(0, index_js_1.assert)(name != null, "value at index ${ index } unnamed", "UNSUPPORTED_OPERATION", {
operation: "toObject()"
});
// Add values for names that don't conflict
if (!(name in accum)) {
accum[name] = this.getValue(name);
}
return accum;
}, {});
}
/**
* @_ignore
*/
@ -88,23 +147,29 @@ class Result extends Array {
if (end == null) {
end = this.length;
}
const result = [];
const result = [], names = [];
for (let i = start; i < end; i++) {
let value;
try {
value = this[i];
result.push(this[i]);
names.push(this.#names[i]);
}
catch (error) {
value = error.error;
return new Result(_guard, result, names);
}
result.push(value);
/**
* @_ignore
*/
filter(callback, thisArg) {
const result = [], names = [];
for (let i = 0; i < this.length; i++) {
const item = this[i];
if (item instanceof Error) {
throwError(`index ${i}`, item);
}
return result;
if (callback.call(thisArg, item, i, this)) {
result.push(item);
names.push(this.#names[i]);
}
#throwError(name, error) {
const wrapped = new Error(`deferred error during ABI decoding triggered accessing ${name}`);
wrapped.error = error;
throw wrapped;
}
return new Result(_guard, result, names);
}
/**
* Returns the value for %%name%%.
@ -115,15 +180,15 @@ class Result extends Array {
* accessible by name.
*/
getValue(name) {
const index = this.#indices.get(name);
if (index != null && index.length === 1) {
const item = this[index[0]];
if (item instanceof Error) {
this.#throwError(`property ${JSON.stringify(name)}`, item);
const index = this.#names.indexOf(name);
if (index === -1) {
return undefined;
}
return item;
const value = this[index];
if (value instanceof Error) {
throwError(`property ${JSON.stringify(name)}`, value.error);
}
throw new Error(`no named parameter: ${JSON.stringify(name)}`);
return value;
}
/**
* Creates a new [[Result]] for %%items%% with each entry

File diff suppressed because one or more lines are too long

@ -662,7 +662,7 @@ class ParamType {
let type = obj.type;
let arrayMatch = type.match(regexArrayType);
if (arrayMatch) {
const arrayLength = parseInt(arrayMatch[2]);
const arrayLength = parseInt(arrayMatch[2] || "-1");
const arrayChildren = ParamType.from({
type: arrayMatch[1],
components: obj.components

File diff suppressed because one or more lines are too long

@ -78,6 +78,9 @@ function getProvider(value) {
}
return value.provider || null;
}
/**
* @_ignore:
*/
async function copyOverrides(arg) {
// Create a shallow copy (we'll deep-ify anything needed during normalizing)
const overrides = (0, provider_js_1.copyRequest)(index_js_1.Typed.dereference(arg, "overrides"));
@ -96,6 +99,9 @@ async function copyOverrides(arg) {
return overrides;
}
exports.copyOverrides = copyOverrides;
/**
* @_ignore:
*/
async function resolveArgs(_runner, inputs, args) {
// Recursively descend into args and resolve any addresses
const runner = getRunner(_runner, "resolveName");

File diff suppressed because one or more lines are too long

@ -1,6 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.EventLog = exports.ContractTransactionResponse = exports.ContractTransactionReceipt = exports.ContractEventPayload = exports.ContractFactory = exports.Contract = exports.BaseContract = void 0;
exports.EventLog = exports.ContractTransactionResponse = exports.ContractTransactionReceipt = exports.ContractUnknownEventPayload = exports.ContractEventPayload = exports.ContractFactory = exports.Contract = exports.BaseContract = void 0;
/**
* About contracts...
*
@ -13,6 +13,7 @@ var factory_js_1 = require("./factory.js");
Object.defineProperty(exports, "ContractFactory", { enumerable: true, get: function () { return factory_js_1.ContractFactory; } });
var wrappers_js_1 = require("./wrappers.js");
Object.defineProperty(exports, "ContractEventPayload", { enumerable: true, get: function () { return wrappers_js_1.ContractEventPayload; } });
Object.defineProperty(exports, "ContractUnknownEventPayload", { enumerable: true, get: function () { return wrappers_js_1.ContractUnknownEventPayload; } });
Object.defineProperty(exports, "ContractTransactionReceipt", { enumerable: true, get: function () { return wrappers_js_1.ContractTransactionReceipt; } });
Object.defineProperty(exports, "ContractTransactionResponse", { enumerable: true, get: function () { return wrappers_js_1.ContractTransactionResponse; } });
Object.defineProperty(exports, "EventLog", { enumerable: true, get: function () { return wrappers_js_1.EventLog; } });

@ -1 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src.ts/contract/index.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACH,6CAEuB;AADnB,2GAAA,YAAY,OAAA;AAAE,uGAAA,QAAQ,OAAA;AAG1B,2CAEsB;AADlB,6GAAA,eAAe,OAAA;AAGnB,6CAGuB;AAFnB,mHAAA,oBAAoB,OAAA;AAAE,yHAAA,0BAA0B,OAAA;AAAE,0HAAA,2BAA2B,OAAA;AAC7E,uGAAA,QAAQ,OAAA"}
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src.ts/contract/index.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACH,6CAEuB;AADnB,2GAAA,YAAY,OAAA;AAAE,uGAAA,QAAQ,OAAA;AAG1B,2CAEsB;AADlB,6GAAA,eAAe,OAAA;AAGnB,6CAIuB;AAHnB,mHAAA,oBAAoB,OAAA;AAAE,0HAAA,2BAA2B,OAAA;AACjD,yHAAA,0BAA0B,OAAA;AAAE,0HAAA,2BAA2B,OAAA;AACvD,uGAAA,QAAQ,OAAA"}

@ -3,21 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
exports.dnsEncode = exports.namehash = exports.isValidName = exports.ensNormalize = void 0;
const index_js_1 = require("../crypto/index.js");
const index_js_2 = require("../utils/index.js");
//import { ens_normalize } from "./ens-normalize/lib";
// @TOOD:
function ens_normalize(name) {
return name;
}
const ens_normalize_1 = require("@adraffy/ens-normalize");
const Zeros = new Uint8Array(32);
Zeros.fill(0);
function checkComponent(comp) {
if (comp.length === 0) {
throw new Error("invalid ENS name; empty component");
}
(0, index_js_2.assertArgument)(comp.length !== 0, "invalid ENS name; empty component", "comp", comp);
return comp;
}
function ensNameSplit(name) {
const bytes = (0, index_js_2.toUtf8Bytes)(ens_normalize(name));
const bytes = (0, index_js_2.toUtf8Bytes)((0, ens_normalize_1.ens_normalize)(name));
const comps = [];
if (name.length === 0) {
return comps;
@ -32,9 +26,7 @@ function ensNameSplit(name) {
}
}
// There was a stray separator at the end of the name
if (last >= bytes.length) {
throw new Error("invalid ENS name; empty component");
}
(0, index_js_2.assertArgument)(last < bytes.length, "invalid ENS name; empty component", "name", name);
comps.push(checkComponent(bytes.slice(last)));
return comps;
}
@ -51,7 +43,6 @@ function isValidName(name) {
}
exports.isValidName = isValidName;
function namehash(name) {
/* istanbul ignore if */
(0, index_js_2.assertArgument)(typeof (name) === "string", "invalid ENS name; not a string", "name", name);
let result = Zeros;
const comps = ensNameSplit(name);

@ -1 +1 @@
{"version":3,"file":"namehash.js","sourceRoot":"","sources":["../../src.ts/hash/namehash.ts"],"names":[],"mappings":";;;AACA,iDAA+C;AAC/C,gDAE2B;AAG3B,sDAAsD;AACtD,SAAS;AACT,SAAS,aAAa,CAAC,IAAY;IAC/B,OAAO,IAAI,CAAC;AAChB,CAAC;AAED,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;AACjC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAEd,SAAS,cAAc,CAAC,IAAgB;IACpC,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;QAAE,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;KAAE;IAChF,OAAO,IAAI,CAAC;AAChB,CAAC;AAED,SAAS,YAAY,CAAC,IAAY;IAC9B,MAAM,KAAK,GAAG,IAAA,sBAAW,EAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC;IAC/C,MAAM,KAAK,GAAsB,EAAG,CAAC;IAErC,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;QAAE,OAAO,KAAK,CAAC;KAAE;IAExC,IAAI,IAAI,GAAG,CAAC,CAAC;IACb,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACnC,MAAM,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;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D,kCAKC;AAED,SAAgB,QAAQ,CAAC,IAAY;IACjC,IAAA,yBAAc,EAAC,OAAM,CAAC,IAAI,CAAC,KAAK,QAAQ,EAAE,gCAAgC,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;IAE1F,IAAI,MAAM,GAAwB,KAAK,CAAC;IAExC,MAAM,KAAK,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IACjC,OAAO,KAAK,CAAC,MAAM,EAAE;QACjB,MAAM,GAAG,IAAA,oBAAS,EAAC,IAAA,iBAAM,EAAC,CAAE,MAAM,EAAE,IAAA,oBAAS,EAAa,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAE,CAAC,CAAC;KAChF;IAED,OAAO,IAAA,kBAAO,EAAC,MAAM,CAAC,CAAC;AAC3B,CAAC;AAXD,4BAWC;AAED,SAAgB,SAAS,CAAC,IAAY;IAClC,OAAO,IAAA,kBAAO,EAAC,IAAA,iBAAM,EAAC,YAAY,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QAClD,wDAAwD;QACxD,IAAI,IAAI,CAAC,MAAM,GAAG,EAAE,EAAE;YAClB,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;SACzE;QAED,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QAC9C,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;QACnB,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;QAC5B,OAAO,KAAK,CAAC;IAEjB,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;AAChB,CAAC;AAbD,8BAaC"}

@ -5,7 +5,7 @@
* @_section: api/providers:Providers [providers]
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.SocketEventSubscriber = exports.SocketPendingSubscriber = exports.SocketBlockSubscriber = exports.SocketSubscriber = exports.WebSocketProvider = exports.SocketProvider = exports.IpcSocketProvider = exports.QuickNodeProvider = exports.InfuraWebSocketProvider = exports.InfuraProvider = exports.EtherscanProvider = exports.EtherscanPlugin = exports.BaseEtherscanProvider = 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.EnsPlugin = exports.GasCostPlugin = exports.NetworkPlugin = exports.Network = exports.EnsResolver = exports.getDefaultProvider = exports.showThrottleMessage = exports.WrappedSigner = 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.InfuraWebSocketProvider = exports.InfuraProvider = exports.EtherscanProvider = exports.EtherscanPlugin = exports.BaseEtherscanProvider = 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.Network = exports.EnsResolver = exports.getDefaultProvider = exports.showThrottleMessage = exports.WrappedSigner = 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; } });
@ -25,6 +25,8 @@ var plugins_network_js_1 = require("./plugins-network.js");
Object.defineProperty(exports, "NetworkPlugin", { enumerable: true, get: function () { return plugins_network_js_1.NetworkPlugin; } });
Object.defineProperty(exports, "GasCostPlugin", { enumerable: true, get: function () { return plugins_network_js_1.GasCostPlugin; } });
Object.defineProperty(exports, "EnsPlugin", { enumerable: true, get: function () { return plugins_network_js_1.EnsPlugin; } });
//MaxPriorityFeePlugin,
Object.defineProperty(exports, "FeeDataNetworkPlugin", { enumerable: true, get: function () { return plugins_network_js_1.FeeDataNetworkPlugin; } });
var provider_js_1 = require("./provider.js");
Object.defineProperty(exports, "Block", { enumerable: true, get: function () { return provider_js_1.Block; } });
Object.defineProperty(exports, "FeeData", { enumerable: true, get: function () { return provider_js_1.FeeData; } });

@ -1 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src.ts/providers/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAIH,+DAEgC;AAD5B,wHAAA,gBAAgB,OAAA;AAAE,2HAAA,mBAAmB,OAAA;AAGzC,2DAI8B;AAH1B,oHAAA,cAAc,OAAA;AACd,gHAAA,UAAU,OAAA;AACV,mHAAA,aAAa,OAAA;AAGjB,+CAEwB;AADpB,mHAAA,mBAAmB,OAAA;AAGvB,6DAA2D;AAAlD,yHAAA,kBAAkB,OAAA;AAE3B,qDAAgD;AAAvC,8GAAA,WAAW,OAAA;AAEpB,2CAAuC;AAA9B,qGAAA,OAAO,OAAA;AAEhB,2DAO8B;AAN1B,mHAAA,aAAa,OAAA;AACb,mHAAA,aAAa,OAAA;AACb,+GAAA,SAAS,OAAA;AAMb,6CASuB;AARnB,oGAAA,KAAK,OAAA;AACL,sGAAA,OAAO,OAAA;AACP,kGAAA,GAAG,OAAA;AACH,iHAAA,kBAAkB,OAAA;AAClB,kHAAA,mBAAmB,OAAA;AAEnB,0GAAA,WAAW,OAAA;AAIf,+DAA0D;AAAjD,wHAAA,gBAAgB,OAA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a,OAAA;AACb,+GAAA,SAAS,OAAA;AACT,uBAAuB;AACvB,0HAAA,oBAAoB,OAAA;AAIxB,6CASuB;AARnB,oGAAA,KAAK,OAAA;AACL,sGAAA,OAAO,OAAA;AACP,kGAAA,GAAG,OAAA;AACH,iHAAA,kBAAkB,OAAA;AAClB,kHAAA,mBAAmB,OAAA;AAEnB,0GAAA,WAAW,OAAA;AAIf,+DAA0D;AAAjD,wHAAA,gBAAgB,OAAA;AACzB,6DAA0F;AAAjF,yHAAA,kBAAkB,OAAA;AAAE,sHAAA,eAAe,OAAA;AAAE,oHAAA,aAAa,OAAA;AAE3D,6DAAwD;AAA/C,sHAAA,eAAe,OAAA;AAExB,6DAAwD;AAA/C,sHAAA,eAAe,OAAA;AACxB,uDAAkD;AAAzC,gHAAA,YAAY,OAAA;AACrB,mEAA8D;AAArD,4HAAA,kBAAkB,OAAA;AAC3B,2EAAsF;AAA7E,mIAAA,qBAAqB,OAAA;AAAE,6HAAA,eAAe,OAAA;AAC/C,iEAA4D;AAAnD,0HAAA,iBAAiB,OAAA;AAC1B,2DAA+E;AAAtE,oHAAA,cAAc,OAAA;AAAE,6HAAA,uBAAuB,OAAA;AAChD,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"}

@ -228,6 +228,23 @@ class Block {
return tx.hash;
});
}
/**
* Returns the complete transactions for blocks which
* prefetched them, by passing ``true`` to %%prefetchTxs%%
* into [[provider_getBlock]].
*/
get transactionResponses() {
const txs = this.#transactions.slice();
// Doesn't matter...
if (txs.length === 0) {
return [];
}
// Make sure we prefetched the transactions
(0, index_js_1.assert)(typeof (txs[0]) === "object", "transactions were not prefetched with block request", "UNSUPPORTED_OPERATION", {
operation: "transactionResponses()"
});
return txs;
}
/**
* Returns a JSON-friendly value.
*/
@ -309,6 +326,19 @@ class Block {
return tx;
}
}
getTransactionResponse(indexOrHash) {
const txs = this.transactionResponses;
if (typeof (indexOrHash) === "number") {
return txs[indexOrHash];
}
indexOrHash = indexOrHash.toLowerCase();
for (const tx of txs) {
if (tx.hash === indexOrHash) {
return tx;
}
}
throw new Error("no such tx");
}
/**
* Has this block been mined.
*
@ -551,6 +581,16 @@ class TransactionReceipt {
}
}
exports.TransactionReceipt = TransactionReceipt;
/*
export type ReplacementDetectionSetup = {
to: string;
from: string;
value: bigint;
data: string;
nonce: number;
block: number;
};
*/
class TransactionResponse {
provider;
blockNumber;

File diff suppressed because one or more lines are too long

@ -1,26 +1,25 @@
import assert from "assert";
import { hashMessage, solidityPacked, solidityPackedKeccak256, solidityPackedSha256, isError } from "../index.js";
import { hashMessage, namehash, isValidName, solidityPacked, solidityPackedKeccak256, solidityPackedSha256, isError } from "../index.js";
import { loadTests } from "./utils.js";
/*
import { dnsEncode, isValidName, namehash } from "../index.js";
describe("Tests Namehash", function() {
const tests = loadTests<TestCaseNamehash>("namehash");
//import { dnsEncode, isValidName, namehash } from "../index.js";
describe("Tests Namehash", function () {
const tests = loadTests("namehash");
for (const test of tests) {
it(`hashes ENS names: ${ JSON.stringify(test.ensName) }`, function() {
if (test.error) {
}
else {
it(`hashes ENS name: ${JSON.stringify(test.name)}`, function () {
const actual = namehash(test.ensName);
assert.equal(actual, test.namehash, "namehash");
// The empty string is not a valid ENS name
if (test.ensName) {
assert.ok(isValidName(test.ensName), "isValidName");
}
});
}
}
});
/*
describe("Tests Bad ENS Names", function() {
const badTests: Array<{ ensName: any, prefix: string }> = [
{ ensName: ".", prefix: "missing component" },

@ -1 +1 @@
{"version":3,"file":"test-hash.js","sourceRoot":"","sources":["../../src.ts/_tests/test-hash.ts"],"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AE,KAAK,EAAE,MAAM,EAAE,IAAI,QAAQ,EAAE;QACtC,EAAE,CAAC,iCAAiC,EAAE;YAClC,MAAM,CAAC,MAAM,CAAC;gBACV,MAAM,MAAM,GAAG,cAAc,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;gBAC7C,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;YACxB,CAAC,EAAE,UAAU,KAAK;gBACd,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,kBAAkB,CAAC,IAAI,KAAK,CAAC,QAAQ,KAAK,MAAM,CAAC,CAAC;YAC7E,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;KACN;AACL,CAAC,CAAC,CAAC"}

@ -1 +1 @@
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src.ts/_tests/types.ts"],"names":[],"mappings":"AA2PC,CAAC"}
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src.ts/_tests/types.ts"],"names":[],"mappings":"AA4PC,CAAC"}

@ -1,2 +1,2 @@
export const version = "6.0.0-beta-exports.11";
export const version = "6.0.0-beta-exports.12";
//# sourceMappingURL=_version.js.map

@ -1,10 +1,18 @@
import { defineProperties, concat, getBytesCopy, getNumber, hexlify, toBeArray, toBigInt, toNumber, assert, assertPrivate, assertArgument } from "../../utils/index.js";
import { defineProperties, concat, getBytesCopy, getNumber, hexlify, toBeArray, toBigInt, toNumber, assert, assertArgument } from "../../utils/index.js";
/**
* @_ignore:
*/
export const WordSize = 32;
const Padding = new Uint8Array(WordSize);
// Properties used to immediate pass through to the underlying object
// - `then` is used to detect if an object is a Promise for await
const passProperties = ["then"];
const _guard = {};
function throwError(name, error) {
const wrapped = new Error(`deferred error during ABI decoding triggered accessing ${name}`);
wrapped.error = error;
throw wrapped;
}
/**
* A [[Result]] is a sub-class of Array, which allows accessing any
* of its values either positionally by its index or, if keys are
@ -13,32 +21,55 @@ const _guard = {};
* @_docloc: api/abi
*/
export class Result extends Array {
#indices;
#names;
/**
* @private
*/
constructor(guard, items, keys) {
assertPrivate(guard, _guard, "Result");
super(...items);
// Name lookup table
this.#indices = new Map();
if (keys) {
keys.forEach((key, index) => {
if (key == null) {
constructor(...args) {
// To properly sub-class Array so the other built-in
// functions work, the constructor has to behave fairly
// well. So, in the event we are created via fromItems()
// we build the read-only Result object we want, but on
// any other input, we use the default constructor
// constructor(guard: any, items: Array<any>, keys?: Array<null | string>);
const guard = args[0];
let items = args[1];
let names = (args[2] || []).slice();
let wrap = true;
if (guard !== _guard) {
items = args;
names = [];
wrap = false;
}
// Can't just pass in ...items since an array of length 1
// is a special case in the super.
super(items.length);
items.forEach((item, index) => { this[index] = item; });
// Find all unique keys
const nameCounts = names.reduce((accum, name) => {
if (typeof (name) === "string") {
accum.set(name, (accum.get(name) || 0) + 1);
}
return accum;
}, (new Map()));
// Remove any key thats not unique
this.#names = Object.freeze(items.map((item, index) => {
const name = names[index];
if (name != null && nameCounts.get(name) === 1) {
return name;
}
return null;
}));
if (!wrap) {
return;
}
if (this.#indices.has(key)) {
(this.#indices.get(key)).push(index);
}
else {
this.#indices.set(key, [index]);
}
});
}
// A wrapped Result is immutable
Object.freeze(this);
// Proxy indices and names so we can trap deferred errors
return new Proxy(this, {
get: (target, prop, receiver) => {
if (typeof (prop) === "string") {
// Index accessor
if (prop.match(/^[0-9]+$/)) {
const index = getNumber(prop, "%index");
if (index < 0 || index >= this.length) {
@ -46,35 +77,63 @@ export class Result extends Array {
}
const item = target[index];
if (item instanceof Error) {
this.#throwError(`index ${index}`, item);
throwError(`index ${index}`, item);
}
return item;
}
// Pass important checks (like `then` for Promise) through
if (prop in target || passProperties.indexOf(prop) >= 0) {
if (passProperties.indexOf(prop) >= 0) {
return Reflect.get(target, prop, receiver);
}
// Something that could be a result keyword value
if (!(prop in target)) {
return target.getValue(prop);
const value = target[prop];
if (value instanceof Function) {
// Make sure functions work with private variables
// See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy#no_private_property_forwarding
return function (...args) {
return value.apply((this === receiver) ? target : this, args);
};
}
else if (!(prop in target)) {
// Possible name accessor
return target.getValue.apply((this === receiver) ? target : this, [prop]);
}
}
return Reflect.get(target, prop, receiver);
}
});
}
/*
toJSON(): any {
if (this.#indices.length === this.length) {
const result: Record<string, any> = { };
for (const key of this.#indices.keys()) {
result[key] = ths.getValue(key);
}
return result;
}
return this;
}
/**
* Returns the Result as a normal Array.
*
* This will throw if there are any outstanding deferred
* errors.
*/
toArray() {
this.forEach((item, index) => {
if (item instanceof Error) {
throwError(`index ${index}`, item);
}
});
return Array.of(this);
}
/**
* Returns the Result as an Object with each name-value pair.
*
* This will throw if any value is unnamed, or if there are
* any outstanding deferred errors.
*/
toObject() {
return this.#names.reduce((accum, name, index) => {
assert(name != null, "value at index ${ index } unnamed", "UNSUPPORTED_OPERATION", {
operation: "toObject()"
});
// Add values for names that don't conflict
if (!(name in accum)) {
accum[name] = this.getValue(name);
}
return accum;
}, {});
}
/**
* @_ignore
*/
@ -85,23 +144,29 @@ export class Result extends Array {
if (end == null) {
end = this.length;
}
const result = [];
const result = [], names = [];
for (let i = start; i < end; i++) {
let value;
try {
value = this[i];
result.push(this[i]);
names.push(this.#names[i]);
}
catch (error) {
value = error.error;
return new Result(_guard, result, names);
}
result.push(value);
/**
* @_ignore
*/
filter(callback, thisArg) {
const result = [], names = [];
for (let i = 0; i < this.length; i++) {
const item = this[i];
if (item instanceof Error) {
throwError(`index ${i}`, item);
}
return result;
if (callback.call(thisArg, item, i, this)) {
result.push(item);
names.push(this.#names[i]);
}
#throwError(name, error) {
const wrapped = new Error(`deferred error during ABI decoding triggered accessing ${name}`);
wrapped.error = error;
throw wrapped;
}
return new Result(_guard, result, names);
}
/**
* Returns the value for %%name%%.
@ -112,15 +177,15 @@ export class Result extends Array {
* accessible by name.
*/
getValue(name) {
const index = this.#indices.get(name);
if (index != null && index.length === 1) {
const item = this[index[0]];
if (item instanceof Error) {
this.#throwError(`property ${JSON.stringify(name)}`, item);
const index = this.#names.indexOf(name);
if (index === -1) {
return undefined;
}
return item;
const value = this[index];
if (value instanceof Error) {
throwError(`property ${JSON.stringify(name)}`, value.error);
}
throw new Error(`no named parameter: ${JSON.stringify(name)}`);
return value;
}
/**
* Creates a new [[Result]] for %%items%% with each entry

File diff suppressed because one or more lines are too long

@ -659,7 +659,7 @@ export class ParamType {
let type = obj.type;
let arrayMatch = type.match(regexArrayType);
if (arrayMatch) {
const arrayLength = parseInt(arrayMatch[2]);
const arrayLength = parseInt(arrayMatch[2] || "-1");
const arrayChildren = ParamType.from({
type: arrayMatch[1],
components: obj.components

File diff suppressed because one or more lines are too long

@ -75,6 +75,9 @@ function getProvider(value) {
}
return value.provider || null;
}
/**
* @_ignore:
*/
export async function copyOverrides(arg) {
// Create a shallow copy (we'll deep-ify anything needed during normalizing)
const overrides = copyRequest(Typed.dereference(arg, "overrides"));
@ -92,6 +95,9 @@ export async function copyOverrides(arg) {
}
return overrides;
}
/**
* @_ignore:
*/
export async function resolveArgs(_runner, inputs, args) {
// Recursively descend into args and resolve any addresses
const runner = getRunner(_runner, "resolveName");

File diff suppressed because one or more lines are too long

@ -5,5 +5,5 @@
*/
export { BaseContract, Contract } from "./contract.js";
export { ContractFactory } from "./factory.js";
export { ContractEventPayload, ContractTransactionReceipt, ContractTransactionResponse, EventLog } from "./wrappers.js";
export { ContractEventPayload, ContractUnknownEventPayload, ContractTransactionReceipt, ContractTransactionResponse, EventLog, } from "./wrappers.js";
//# sourceMappingURL=index.js.map

@ -1 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src.ts/contract/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EACH,YAAY,EAAE,QAAQ,EACzB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACH,eAAe,EAClB,MAAM,cAAc,CAAC;AAEtB,OAAO,EACH,oBAAoB,EAAE,0BAA0B,EAAE,2BAA2B,EAC7E,QAAQ,EACX,MAAM,eAAe,CAAC"}
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src.ts/contract/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EACH,YAAY,EAAE,QAAQ,EACzB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACH,eAAe,EAClB,MAAM,cAAc,CAAC;AAEtB,OAAO,EACH,oBAAoB,EAAE,2BAA2B,EACjD,0BAA0B,EAAE,2BAA2B,EACvD,QAAQ,GACX,MAAM,eAAe,CAAC"}

@ -1,16 +1,10 @@
import { keccak256 } from "../crypto/index.js";
import { concat, hexlify, assertArgument, toUtf8Bytes, toUtf8String } from "../utils/index.js";
//import { ens_normalize } from "./ens-normalize/lib";
// @TOOD:
function ens_normalize(name) {
return name;
}
import { ens_normalize } from "@adraffy/ens-normalize";
const Zeros = new Uint8Array(32);
Zeros.fill(0);
function checkComponent(comp) {
if (comp.length === 0) {
throw new Error("invalid ENS name; empty component");
}
assertArgument(comp.length !== 0, "invalid ENS name; empty component", "comp", comp);
return comp;
}
function ensNameSplit(name) {
@ -29,9 +23,7 @@ function ensNameSplit(name) {
}
}
// There was a stray separator at the end of the name
if (last >= bytes.length) {
throw new Error("invalid ENS name; empty component");
}
assertArgument(last < bytes.length, "invalid ENS name; empty component", "name", name);
comps.push(checkComponent(bytes.slice(last)));
return comps;
}
@ -46,7 +38,6 @@ export function isValidName(name) {
return false;
}
export function namehash(name) {
/* istanbul ignore if */
assertArgument(typeof (name) === "string", "invalid ENS name; not a string", "name", name);
let result = Zeros;
const comps = ensNameSplit(name);

@ -1 +1 @@
{"version":3,"file":"namehash.js","sourceRoot":"","sources":["../../src.ts/hash/namehash.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EACH,MAAM,EAAE,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,YAAY,EAC7D,MAAM,mBAAmB,CAAC;AAG3B,sDAAsD;AACtD,SAAS;AACT,SAAS,aAAa,CAAC,IAAY;IAC/B,OAAO,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;IAClC,OAAO,OAAO,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QAClD,wDAAwD;QACxD,IAAI,IAAI,CAAC,MAAM,GAAG,EAAE,EAAE;YAClB,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;SACzE;QAED,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QAC9C,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;QACnB,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;QAC5B,OAAO,KAAK,CAAC;IAEjB,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;AAChB,CAAC"}

@ -10,9 +10,9 @@ export { getDefaultProvider } from "./default-provider.js";
export { EnsResolver } from "./ens-resolver.js";
export { Network } from "./network.js";
export { NetworkPlugin, GasCostPlugin, EnsPlugin,
//LayerOneConnectionPlugin,
//MaxPriorityFeePlugin,
//PriceOraclePlugin,
FeeDataNetworkPlugin,
//CustomBlockNetworkPlugin
} from "./plugins-network.js";
export { Block, FeeData, Log, TransactionReceipt, TransactionResponse, copyRequest,
//resolveTransactionRequest,

@ -1 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src.ts/providers/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EACH,gBAAgB,EAAE,mBAAmB,EACxC,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACH,cAAc,EACd,UAAU,EACV,aAAa,EAChB,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,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E,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"}

@ -223,6 +223,23 @@ export class Block {
return tx.hash;
});
}
/**
* Returns the complete transactions for blocks which
* prefetched them, by passing ``true`` to %%prefetchTxs%%
* into [[provider_getBlock]].
*/
get transactionResponses() {
const txs = this.#transactions.slice();
// Doesn't matter...
if (txs.length === 0) {
return [];
}
// Make sure we prefetched the transactions
assert(typeof (txs[0]) === "object", "transactions were not prefetched with block request", "UNSUPPORTED_OPERATION", {
operation: "transactionResponses()"
});
return txs;
}
/**
* Returns a JSON-friendly value.
*/
@ -304,6 +321,19 @@ export class Block {
return tx;
}
}
getTransactionResponse(indexOrHash) {
const txs = this.transactionResponses;
if (typeof (indexOrHash) === "number") {
return txs[indexOrHash];
}
indexOrHash = indexOrHash.toLowerCase();
for (const tx of txs) {
if (tx.hash === indexOrHash) {
return tx;
}
}
throw new Error("no such tx");
}
/**
* Has this block been mined.
*
@ -543,6 +573,16 @@ export class TransactionReceipt {
return createReorderedTransactionFilter(this, other);
}
}
/*
export type ReplacementDetectionSetup = {
to: string;
from: string;
value: bigint;
data: string;
nonce: number;
block: number;
};
*/
export class TransactionResponse {
provider;
blockNumber;

File diff suppressed because one or more lines are too long

15
package-lock.json generated

@ -1,14 +1,15 @@
{
"name": "ethers",
"version": "6.0.0-beta-exports.9",
"version": "6.0.0-beta-exports.11",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "ethers",
"version": "6.0.0-beta-exports.9",
"version": "6.0.0-beta-exports.11",
"license": "MIT",
"dependencies": {
"@adraffy/ens-normalize": "^1.8.8",
"@noble/hashes": "1.1.2",
"@noble/secp256k1": "1.6.3",
"aes-js": "4.0.0-beta.3",
@ -30,6 +31,11 @@
"node": ">=14.0.0"
}
},
"node_modules/@adraffy/ens-normalize": {
"version": "1.8.8",
"resolved": "https://registry.npmjs.org/@adraffy/ens-normalize/-/ens-normalize-1.8.8.tgz",
"integrity": "sha512-QbJczL+zOCNUBkfjCww1DfhL+KNYgC/yCBApqT3d8b9BHg7CFw4O3bTY0BOogiMhw/vGnV2FD17bstxXWn61EA=="
},
"node_modules/@bcoe/v8-coverage": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz",
@ -1558,6 +1564,11 @@
}
},
"dependencies": {
"@adraffy/ens-normalize": {
"version": "1.8.8",
"resolved": "https://registry.npmjs.org/@adraffy/ens-normalize/-/ens-normalize-1.8.8.tgz",
"integrity": "sha512-QbJczL+zOCNUBkfjCww1DfhL+KNYgC/yCBApqT3d8b9BHg7CFw4O3bTY0BOogiMhw/vGnV2FD17bstxXWn61EA=="
},
"@bcoe/v8-coverage": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz",

@ -9,6 +9,7 @@
"./lib.esm/wordlists/wordlists.js": "./lib.esm/wordlists/wordlists-browser.js"
},
"dependencies": {
"@adraffy/ens-normalize": "1.8.8",
"@noble/hashes": "1.1.2",
"@noble/secp256k1": "1.6.3",
"aes-js": "4.0.0-beta.3",
@ -92,7 +93,7 @@
"types": "./types/wordlistsindex.d.ts"
}
},
"gitHead": "530efeb885c0b92699e0f13fbf2ba49094272d33",
"gitHead": "360835e301bec25d70aa4840b1df98c3fa3b616f",
"keywords": [
"ethereum",
"ethers",
@ -132,5 +133,5 @@
"sideEffects": false,
"type": "module",
"types": "./types/index.d.ts",
"version": "6.0.0-beta-exports.11"
"version": "6.0.0-beta-exports.12"
}

@ -1 +1 @@
export const version: string = "6.0.0-beta-exports.11";
export const version: string = "6.0.0-beta-exports.12";

@ -1,4 +1,7 @@
import type { BigNumberish, BytesLike } from "../../utils/index.js";
/**
* @_ignore:
*/
export declare const WordSize: number;
/**
* A [[Result]] is a sub-class of Array, which allows accessing any
@ -13,11 +16,29 @@ export declare class Result extends Array<any> {
/**
* @private
*/
constructor(guard: any, items: Array<any>, keys?: Array<null | string>);
constructor(...args: Array<any>);
/**
* Returns the Result as a normal Array.
*
* This will throw if there are any outstanding deferred
* errors.
*/
toArray(): Array<any>;
/**
* Returns the Result as an Object with each name-value pair.
*
* This will throw if any value is unnamed, or if there are
* any outstanding deferred errors.
*/
toObject(): Record<string, any>;
/**
* @_ignore
*/
slice(start?: number | undefined, end?: number | undefined): Array<any>;
slice(start?: number | undefined, end?: number | undefined): Result;
/**
* @_ignore
*/
filter(callback: (el: any, index: number, array: Result) => boolean, thisArg?: any): Result;
/**
* Returns the value for %%name%%.
*

@ -1 +1 @@
{"version":3,"file":"abstract-coder.d.ts","sourceRoot":"","sources":["../../../src.ts/abi/coders/abstract-coder.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEpE,eAAO,MAAM,QAAQ,EAAE,MAAW,CAAC;AASnC;;;;;;GAMG;AACH,qBAAa,MAAO,SAAQ,KAAK,CAAC,GAAG,CAAC;;IAGlC,CAAE,CAAC,EAAE,MAAM,GAAG,MAAM,GAAI,GAAG,CAAA;IAE3B;;OAEG;gBACS,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,EAAE,KAAK,CAAC,IAAI,GAAG,MAAM,CAAC;IAgEtE;;OAEG;IACH,KAAK,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,KAAK,CAAC,GAAG,CAAC;IAuBvE;;;;;;;OAOG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG;IAa3B;;;OAGG;IACH,MAAM,CAAC,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KAAK,EAAE,SAAS,GAAG,MAAM;IAUpC,UAAU,CAAC,KAAK,EAAE,YAAY,GAAG,MAAM;IAMvC,mBAAmB,IAAI,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI;CAQvD;AAED;;GAEG;AACH,qBAAa,MAAM;;IAKf,QAAQ,CAAC,UAAU,EAAG,OAAO,CAAC;gBAKlB,IAAI,EAAE,SAAS,EAAE,UAAU,CAAC,EAAE,OAAO;IAQjD,IAAI,IAAI,IAAI,MAAM,CAAgC;IAClD,IAAI,UAAU,IAAI,MAAM,CAA8B;IACtD,IAAI,QAAQ,IAAI,MAAM,CAAyB;IAC/C,IAAI,KAAK,IAAI,UAAU,CAAuC;IAmB9D,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IAKjC,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,GAAG,UAAU;IAQtD,SAAS,IAAI,MAAM;IAInB,SAAS,IAAI,MAAM;CAGtB"}

@ -6,7 +6,13 @@ import type { Addressable } from "../address/index.js";
import type { EventEmitterable, Listener } from "../utils/index.js";
import type { BlockTag, ContractRunner } from "../providers/index.js";
import type { ContractEventName, ContractInterface, ContractMethod, ContractEvent, ContractTransaction } from "./types.js";
/**
* @_ignore:
*/
export declare function copyOverrides(arg: any): Promise<Omit<ContractTransaction, "data" | "to">>;
/**
* @_ignore:
*/
export declare function resolveArgs(_runner: null | ContractRunner, inputs: ReadonlyArray<ParamType>, args: Array<any>): Promise<Array<any>>;
declare const internal: unique symbol;
export declare class BaseContract implements Addressable, EventEmitterable<ContractEventName> {

@ -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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AAG,OAAO,CAAC,IAAI,CAAC;IAkB5D,WAAW,CAAC,KAAK,EAAE,iBAAiB,EAAE,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IAKxE,cAAc,CAAC,KAAK,EAAE,iBAAiB,EAAE,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IAIjF,MAAM,CAAC,UAAU,CAAC,CAAC,GAAG,iBAAiB,EAAE,GAAG,EAAE,YAAY,GAAG,KAAK,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,IAAI,GAAG,cAAc,KAAK,YAAY,GAAG,IAAI,CAAC,CAAC,EAAE,MAAM,YAAY,CAAC;IAS/J,MAAM,CAAC,IAAI,CAAC,CAAC,GAAG,iBAAiB,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,CAAC,EAAE,IAAI,GAAG,cAAc,GAAG,YAAY,GAAG,IAAI,CAAC,CAAC,EAAE,MAAM,YAAY,CAAC;CAKpJ;;AAMD,qBAAa,QAAS,SAAQ,aAAe;CAAI"}

@ -5,6 +5,6 @@
*/
export { BaseContract, Contract } from "./contract.js";
export { ContractFactory } from "./factory.js";
export { ContractEventPayload, ContractTransactionReceipt, ContractTransactionResponse, EventLog } from "./wrappers.js";
export type { ConstantContractMethod, ContractEvent, ContractEventArgs, ContractEventName, ContractInterface, ContractMethod, ContractMethodArgs, ContractTransaction, DeferredTopicFilter, Overrides } from "./types.js";
export { ContractEventPayload, ContractUnknownEventPayload, ContractTransactionReceipt, ContractTransactionResponse, EventLog, } from "./wrappers.js";
export type { BaseContractMethod, ConstantContractMethod, PostfixOverrides, ContractEvent, ContractEventArgs, ContractEventName, ContractDeployTransaction, ContractInterface, ContractMethod, ContractMethodArgs, ContractTransaction, DeferredTopicFilter, Overrides } from "./types.js";
//# sourceMappingURL=index.d.ts.map

@ -1 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src.ts/contract/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EACH,YAAY,EAAE,QAAQ,EACzB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACH,eAAe,EAClB,MAAM,cAAc,CAAC;AAEtB,OAAO,EACH,oBAAoB,EAAE,0BAA0B,EAAE,2BAA2B,EAC7E,QAAQ,EACX,MAAM,eAAe,CAAC;AAEvB,YAAY,EACR,sBAAsB,EAAE,aAAa,EAAE,iBAAiB,EAAE,iBAAiB,EAC3E,iBAAiB,EAAE,cAAc,EAAE,kBAAkB,EAAE,mBAAmB,EAC1E,mBAAmB,EAAE,SAAS,EACjC,MAAM,YAAY,CAAC"}
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src.ts/contract/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EACH,YAAY,EAAE,QAAQ,EACzB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACH,eAAe,EAClB,MAAM,cAAc,CAAC;AAEtB,OAAO,EACH,oBAAoB,EAAE,2BAA2B,EACjD,0BAA0B,EAAE,2BAA2B,EACvD,QAAQ,GACX,MAAM,eAAe,CAAC;AAEvB,YAAY,EACR,kBAAkB,EAAE,sBAAsB,EAC1C,gBAAgB,EAChB,aAAa,EAAE,iBAAiB,EAAE,iBAAiB,EACnD,yBAAyB,EACzB,iBAAiB,EAAE,cAAc,EAAE,kBAAkB,EAAE,mBAAmB,EAC1E,mBAAmB,EAAE,SAAS,EACjC,MAAM,YAAY,CAAC"}

@ -1,5 +1,5 @@
export declare function ensNormalize(name: string): string;
export declare function isValidName(name: string): boolean;
export declare function isValidName(name: string): name is string;
export declare function namehash(name: string): string;
export declare function dnsEncode(name: string): string;
//# sourceMappingURL=namehash.d.ts.map

@ -1 +1 @@
{"version":3,"file":"namehash.d.ts","sourceRoot":"","sources":["../../src.ts/hash/namehash.ts"],"names":[],"mappings":"AA6CA,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAKjD;AAED,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAY7C;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAa9C"}
{"version":3,"file":"namehash.d.ts","sourceRoot":"","sources":["../../src.ts/hash/namehash.ts"],"names":[],"mappings":"AAyCA,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,IAAI,MAAM,CAKxD;AAED,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAW7C;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAa9C"}

@ -9,7 +9,7 @@ export { showThrottleMessage } from "./community.js";
export { getDefaultProvider } from "./default-provider.js";
export { EnsResolver } from "./ens-resolver.js";
export { Network } from "./network.js";
export { NetworkPlugin, GasCostPlugin, EnsPlugin, } from "./plugins-network.js";
export { NetworkPlugin, GasCostPlugin, EnsPlugin, FeeDataNetworkPlugin, } from "./plugins-network.js";
export { Block, FeeData, Log, TransactionReceipt, TransactionResponse, copyRequest, } from "./provider.js";
export { FallbackProvider } from "./provider-fallback.js";
export { JsonRpcApiProvider, JsonRpcProvider, JsonRpcSigner } from "./provider-jsonrpc.js";
@ -26,13 +26,14 @@ 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 { 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";
export type { GasCostParameters } from "./plugins-network.js";
export type { BlockParams, LogParams, TransactionReceiptParams, TransactionResponseParams, } from "./formatting.js";
export type { BlockTag, TransactionRequest, PreparedTransactionRequest, EventFilter, Filter, FilterByBlockHash, OrphanFilter, ProviderEvent, TopicFilter, Provider, } from "./provider.js";
export type { BlockTag, TransactionRequest, PreparedTransactionRequest, EventFilter, Filter, FilterByBlockHash, OrphanFilter, ProviderEvent, TopicFilter, Provider, MinedBlock, MinedTransactionResponse } from "./provider.js";
export type { DebugEventBrowserProvider, Eip1193Provider } from "./provider-browser.js";
export type { JsonRpcPayload, JsonRpcResult, JsonRpcError, JsonRpcApiProviderOptions, JsonRpcTransactionRequest, } from "./provider-jsonrpc.js";
export type { WebSocketLike } from "./provider-websocket.js";
export type { WebSocketCreator, WebSocketLike } from "./provider-websocket.js";
export type { Signer } from "./signer.js";
//# sourceMappingURL=index.d.ts.map

@ -1 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src.ts/providers/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EACH,gBAAgB,EAAE,mBAAmB,EACxC,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACH,cAAc,EACd,UAAU,EACV,aAAa,EAChB,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,EACH,aAAa,EACb,aAAa,EACb,SAAS,GAIZ,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACH,KAAK,EACL,OAAO,EACP,GAAG,EACH,kBAAkB,EAClB,mBAA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M,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"}

@ -172,6 +172,12 @@ export declare class Block implements BlockParams, Iterable<string> {
* Returns the list of transaction hashes.
*/
get transactions(): ReadonlyArray<string>;
/**
* Returns the complete transactions for blocks which
* prefetched them, by passing ``true`` to %%prefetchTxs%%
* into [[provider_getBlock]].
*/
get transactionResponses(): Array<TransactionResponse>;
/**
* Returns a JSON-friendly value.
*/
@ -189,6 +195,7 @@ export declare class Block implements BlockParams, Iterable<string> {
* Get the transaction at %%indexe%% within this block.
*/
getTransaction(indexOrHash: number | string): Promise<TransactionResponse>;
getTransactionResponse(indexOrHash: number | string): TransactionResponse;
/**
* Has this block been mined.
*
@ -257,14 +264,6 @@ export interface MinedTransactionResponse extends TransactionResponse {
blockHash: string;
date: Date;
}
export declare type ReplacementDetectionSetup = {
to: string;
from: string;
value: bigint;
data: string;
nonce: number;
block: number;
};
export declare class TransactionResponse implements TransactionLike<string>, TransactionResponseParams {
#private;
readonly provider: Provider;

File diff suppressed because one or more lines are too long