refactor: move brother_node development artifact to dev/test-nodes subdirectory
Development Artifact Cleanup: ✅ BROTHER_NODE REORGANIZATION: Moved development test node to appropriate location - dev/test-nodes/brother_node/: Moved from root directory for better organization - Contains development configuration, test logs, and test chain data - No impact on production systems - purely development/testing artifact ✅ DEVELOPMENT ARTIFACTS IDENTIFIED: - Chain ID: aitbc-brother-chain (test/development chain) - Ports: 8010 (P2P) and 8011 (RPC) - different from production - Environment: .env file with test configuration - Logs: rpc.log and node.log from development testing session (March 15, 2026) ✅ ROOT DIRECTORY CLEANUP: Removed development clutter from production directory - brother_node/ moved to dev/test-nodes/brother_node/ - Root directory now contains only production-ready components - Development artifacts properly organized in dev/ subdirectory DIRECTORY STRUCTURE IMPROVEMENT: 📁 dev/test-nodes/: Development and testing node configurations 🏗️ Root Directory: Clean production structure with only essential components 🧪 Development Isolation: Test environments separated from production BENEFITS: ✅ Clean Production Directory: No development artifacts in root ✅ Better Organization: Development nodes grouped in dev/ subdirectory ✅ Clear Separation: Production vs development environments clearly distinguished ✅ Maintainability: Easier to identify and manage development components RESULT: Successfully moved brother_node development artifact to dev/test-nodes/ subdirectory, cleaning up the root directory while preserving development testing environment for future use.
This commit is contained in:
168
dev/env/node_modules/ethers/lib.commonjs/contract/contract.d.ts
generated
vendored
Executable file
168
dev/env/node_modules/ethers/lib.commonjs/contract/contract.d.ts
generated
vendored
Executable file
@@ -0,0 +1,168 @@
|
||||
import { Interface } from "../abi/index.js";
|
||||
import { Log, TransactionResponse } from "../providers/provider.js";
|
||||
import { ContractTransactionResponse, EventLog } from "./wrappers.js";
|
||||
import type { EventFragment, FunctionFragment, InterfaceAbi, ParamType } from "../abi/index.js";
|
||||
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, WrappedFallback } from "./types.js";
|
||||
/**
|
||||
* @_ignore:
|
||||
*/
|
||||
export declare function copyOverrides<O extends string = "data" | "to">(arg: any, allowed?: Array<string>): Promise<Omit<ContractTransaction, O>>;
|
||||
/**
|
||||
* @_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> {
|
||||
/**
|
||||
* The target to connect to.
|
||||
*
|
||||
* This can be an address, ENS name or any [[Addressable]], such as
|
||||
* another contract. To get the resolved address, use the ``getAddress``
|
||||
* method.
|
||||
*/
|
||||
readonly target: string | Addressable;
|
||||
/**
|
||||
* The contract Interface.
|
||||
*/
|
||||
readonly interface: Interface;
|
||||
/**
|
||||
* The connected runner. This is generally a [[Provider]] or a
|
||||
* [[Signer]], which dictates what operations are supported.
|
||||
*
|
||||
* For example, a **Contract** connected to a [[Provider]] may
|
||||
* only execute read-only operations.
|
||||
*/
|
||||
readonly runner: null | ContractRunner;
|
||||
/**
|
||||
* All the Events available on this contract.
|
||||
*/
|
||||
readonly filters: Record<string, ContractEvent>;
|
||||
/**
|
||||
* @_ignore:
|
||||
*/
|
||||
readonly [internal]: any;
|
||||
/**
|
||||
* The fallback or receive function if any.
|
||||
*/
|
||||
readonly fallback: null | WrappedFallback;
|
||||
/**
|
||||
* Creates a new contract connected to %%target%% with the %%abi%% and
|
||||
* optionally connected to a %%runner%% to perform operations on behalf
|
||||
* of.
|
||||
*/
|
||||
constructor(target: string | Addressable, abi: Interface | InterfaceAbi, runner?: null | ContractRunner, _deployTx?: null | TransactionResponse);
|
||||
/**
|
||||
* Return a new Contract instance with the same target and ABI, but
|
||||
* 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.
|
||||
*/
|
||||
getAddress(): Promise<string>;
|
||||
/**
|
||||
* Return the deployed bytecode or null if no bytecode is found.
|
||||
*/
|
||||
getDeployedCode(): Promise<null | string>;
|
||||
/**
|
||||
* Resolve to this Contract once the bytecode has been deployed, or
|
||||
* resolve immediately if already deployed.
|
||||
*/
|
||||
waitForDeployment(): Promise<this>;
|
||||
/**
|
||||
* Return the transaction used to deploy this contract.
|
||||
*
|
||||
* This is only available if this instance was returned from a
|
||||
* [[ContractFactory]].
|
||||
*/
|
||||
deploymentTransaction(): null | ContractTransactionResponse;
|
||||
/**
|
||||
* Return the function for a given name. This is useful when a contract
|
||||
* method name conflicts with a JavaScript name such as ``prototype`` or
|
||||
* when using a Contract programmatically.
|
||||
*/
|
||||
getFunction<T extends ContractMethod = ContractMethod>(key: string | FunctionFragment): T;
|
||||
/**
|
||||
* Return the event for a given name. This is useful when a contract
|
||||
* event name conflicts with a JavaScript name such as ``prototype`` or
|
||||
* when using a Contract programmatically.
|
||||
*/
|
||||
getEvent(key: string | EventFragment): ContractEvent;
|
||||
/**
|
||||
* @_ignore:
|
||||
*/
|
||||
queryTransaction(hash: string): Promise<Array<EventLog>>;
|
||||
/**
|
||||
* Provide historic access to event data for %%event%% in the range
|
||||
* %%fromBlock%% (default: ``0``) to %%toBlock%% (default: ``"latest"``)
|
||||
* inclusive.
|
||||
*/
|
||||
queryFilter(event: ContractEventName, fromBlock?: BlockTag, toBlock?: BlockTag): Promise<Array<EventLog | Log>>;
|
||||
/**
|
||||
* Add an event %%listener%% for the %%event%%.
|
||||
*/
|
||||
on(event: ContractEventName, listener: Listener): Promise<this>;
|
||||
/**
|
||||
* Add an event %%listener%% for the %%event%%, but remove the listener
|
||||
* after it is fired once.
|
||||
*/
|
||||
once(event: ContractEventName, listener: Listener): Promise<this>;
|
||||
/**
|
||||
* Emit an %%event%% calling all listeners with %%args%%.
|
||||
*
|
||||
* Resolves to ``true`` if any listeners were called.
|
||||
*/
|
||||
emit(event: ContractEventName, ...args: Array<any>): Promise<boolean>;
|
||||
/**
|
||||
* Resolves to the number of listeners of %%event%% or the total number
|
||||
* of listeners if unspecified.
|
||||
*/
|
||||
listenerCount(event?: ContractEventName): Promise<number>;
|
||||
/**
|
||||
* Resolves to the listeners subscribed to %%event%% or all listeners
|
||||
* if unspecified.
|
||||
*/
|
||||
listeners(event?: ContractEventName): Promise<Array<Listener>>;
|
||||
/**
|
||||
* Remove the %%listener%% from the listeners for %%event%% or remove
|
||||
* all listeners if unspecified.
|
||||
*/
|
||||
off(event: ContractEventName, listener?: Listener): Promise<this>;
|
||||
/**
|
||||
* Remove all the listeners for %%event%% or remove all listeners if
|
||||
* unspecified.
|
||||
*/
|
||||
removeAllListeners(event?: ContractEventName): Promise<this>;
|
||||
/**
|
||||
* Alias for [on].
|
||||
*/
|
||||
addListener(event: ContractEventName, listener: Listener): Promise<this>;
|
||||
/**
|
||||
* Alias for [off].
|
||||
*/
|
||||
removeListener(event: ContractEventName, listener: Listener): Promise<this>;
|
||||
/**
|
||||
* Create a new Class for the %%abi%%.
|
||||
*/
|
||||
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: Interface | InterfaceAbi, runner?: null | ContractRunner): BaseContract & Omit<T, keyof BaseContract>;
|
||||
}
|
||||
declare const Contract_base: new (target: string | Addressable, abi: Interface | InterfaceAbi, runner?: ContractRunner | null | undefined) => BaseContract & Omit<ContractInterface, keyof BaseContract>;
|
||||
/**
|
||||
* A [[BaseContract]] with no type guards on its methods or events.
|
||||
*/
|
||||
export declare class Contract extends Contract_base {
|
||||
}
|
||||
export {};
|
||||
//# sourceMappingURL=contract.d.ts.map
|
||||
1
dev/env/node_modules/ethers/lib.commonjs/contract/contract.d.ts.map
generated
vendored
Executable file
1
dev/env/node_modules/ethers/lib.commonjs/contract/contract.d.ts.map
generated
vendored
Executable file
@@ -0,0 +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,EAAgB,MAAM,qBAAqB,CAAC;AACrE,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;AAwGpB;;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,CAkB9I;AAED;;GAEG;AACH,wBAAsB,WAAW,CAAC,OAAO,EAAE,IAAI,GAAG,cAAc,EAAE,MAAM,EAAE,aAAa,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAWzI;AAuQD,QAAA,MAAM,QAAQ,eAAyC,CAAC;AA0MxD,qBAAa,YAAa,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,OAAO,CAAC,IAAI,CAAC;IAIjF;;OAEG;IACH,MAAM,CAAC,UAAU,CAAC,CAAC,GAAG,iBAAiB,EAAE,GAAG,EAAE,SAAS,GAAG,YAAY,GAAG,KAAK,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,IAAI,GAAG,cAAc,KAAK,YAAY,GAAG,IAAI,CAAC,CAAC,EAAE,MAAM,YAAY,CAAC;IAS3K;;OAEG;IACH,MAAM,CAAC,IAAI,CAAC,CAAC,GAAG,iBAAiB,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,GAAG,YAAY,EAAE,MAAM,CAAC,EAAE,IAAI,GAAG,cAAc,GAAG,YAAY,GAAG,IAAI,CAAC,CAAC,EAAE,MAAM,YAAY,CAAC;CAKhK;;AAMD;;GAEG;AACH,qBAAa,QAAS,SAAQ,aAAe;CAAI"}
|
||||
960
dev/env/node_modules/ethers/lib.commonjs/contract/contract.js
generated
vendored
Executable file
960
dev/env/node_modules/ethers/lib.commonjs/contract/contract.js
generated
vendored
Executable file
@@ -0,0 +1,960 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Contract = exports.BaseContract = exports.resolveArgs = exports.copyOverrides = void 0;
|
||||
const index_js_1 = require("../abi/index.js");
|
||||
const index_js_2 = require("../address/index.js");
|
||||
// import from provider.ts instead of index.ts to prevent circular dep
|
||||
// from EtherscanProvider
|
||||
const provider_js_1 = require("../providers/provider.js");
|
||||
const index_js_3 = require("../utils/index.js");
|
||||
const wrappers_js_1 = require("./wrappers.js");
|
||||
const BN_0 = BigInt(0);
|
||||
function canCall(value) {
|
||||
return (value && typeof (value.call) === "function");
|
||||
}
|
||||
function canEstimate(value) {
|
||||
return (value && typeof (value.estimateGas) === "function");
|
||||
}
|
||||
function canResolve(value) {
|
||||
return (value && typeof (value.resolveName) === "function");
|
||||
}
|
||||
function canSend(value) {
|
||||
return (value && typeof (value.sendTransaction) === "function");
|
||||
}
|
||||
function getResolver(value) {
|
||||
if (value != null) {
|
||||
if (canResolve(value)) {
|
||||
return value;
|
||||
}
|
||||
if (value.provider) {
|
||||
return value.provider;
|
||||
}
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
class PreparedTopicFilter {
|
||||
#filter;
|
||||
fragment;
|
||||
constructor(contract, fragment, args) {
|
||||
(0, index_js_3.defineProperties)(this, { fragment });
|
||||
if (fragment.inputs.length < args.length) {
|
||||
throw new Error("too many arguments");
|
||||
}
|
||||
// Recursively descend into args and resolve any addresses
|
||||
const runner = getRunner(contract.runner, "resolveName");
|
||||
const resolver = canResolve(runner) ? runner : null;
|
||||
this.#filter = (async function () {
|
||||
const resolvedArgs = await Promise.all(fragment.inputs.map((param, index) => {
|
||||
const arg = args[index];
|
||||
if (arg == null) {
|
||||
return null;
|
||||
}
|
||||
return param.walkAsync(args[index], (type, value) => {
|
||||
if (type === "address") {
|
||||
if (Array.isArray(value)) {
|
||||
return Promise.all(value.map((v) => (0, index_js_2.resolveAddress)(v, resolver)));
|
||||
}
|
||||
return (0, index_js_2.resolveAddress)(value, resolver);
|
||||
}
|
||||
return value;
|
||||
});
|
||||
}));
|
||||
return contract.interface.encodeFilterTopics(fragment, resolvedArgs);
|
||||
})();
|
||||
}
|
||||
getTopicFilter() {
|
||||
return this.#filter;
|
||||
}
|
||||
}
|
||||
// A = Arguments passed in as a tuple
|
||||
// R = The result type of the call (i.e. if only one return type,
|
||||
// the qualified type, otherwise Result)
|
||||
// D = The type the default call will return (i.e. R for view/pure,
|
||||
// TransactionResponse otherwise)
|
||||
//export interface ContractMethod<A extends Array<any> = Array<any>, R = any, D extends R | ContractTransactionResponse = ContractTransactionResponse> {
|
||||
function getRunner(value, feature) {
|
||||
if (value == null) {
|
||||
return null;
|
||||
}
|
||||
if (typeof (value[feature]) === "function") {
|
||||
return value;
|
||||
}
|
||||
if (value.provider && typeof (value.provider[feature]) === "function") {
|
||||
return value.provider;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
function getProvider(value) {
|
||||
if (value == null) {
|
||||
return null;
|
||||
}
|
||||
return value.provider || null;
|
||||
}
|
||||
/**
|
||||
* @_ignore:
|
||||
*/
|
||||
async function copyOverrides(arg, allowed) {
|
||||
// Make sure the overrides passed in are a valid overrides object
|
||||
const _overrides = index_js_1.Typed.dereference(arg, "overrides");
|
||||
(0, index_js_3.assertArgument)(typeof (_overrides) === "object", "invalid overrides parameter", "overrides", arg);
|
||||
// Create a shallow copy (we'll deep-ify anything needed during normalizing)
|
||||
const overrides = (0, provider_js_1.copyRequest)(_overrides);
|
||||
(0, index_js_3.assertArgument)(overrides.to == null || (allowed || []).indexOf("to") >= 0, "cannot override to", "overrides.to", overrides.to);
|
||||
(0, index_js_3.assertArgument)(overrides.data == null || (allowed || []).indexOf("data") >= 0, "cannot override data", "overrides.data", overrides.data);
|
||||
// Resolve any from
|
||||
if (overrides.from) {
|
||||
overrides.from = overrides.from;
|
||||
}
|
||||
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");
|
||||
const resolver = canResolve(runner) ? runner : null;
|
||||
return await Promise.all(inputs.map((param, index) => {
|
||||
return param.walkAsync(args[index], (type, value) => {
|
||||
value = index_js_1.Typed.dereference(value, type);
|
||||
if (type === "address") {
|
||||
return (0, index_js_2.resolveAddress)(value, resolver);
|
||||
}
|
||||
return value;
|
||||
});
|
||||
}));
|
||||
}
|
||||
exports.resolveArgs = resolveArgs;
|
||||
function buildWrappedFallback(contract) {
|
||||
const populateTransaction = async function (overrides) {
|
||||
// If an overrides was passed in, copy it and normalize the values
|
||||
const tx = (await copyOverrides(overrides, ["data"]));
|
||||
tx.to = await contract.getAddress();
|
||||
if (tx.from) {
|
||||
tx.from = await (0, index_js_2.resolveAddress)(tx.from, getResolver(contract.runner));
|
||||
}
|
||||
const iface = contract.interface;
|
||||
const noValue = ((0, index_js_3.getBigInt)((tx.value || BN_0), "overrides.value") === BN_0);
|
||||
const noData = ((tx.data || "0x") === "0x");
|
||||
if (iface.fallback && !iface.fallback.payable && iface.receive && !noData && !noValue) {
|
||||
(0, index_js_3.assertArgument)(false, "cannot send data to receive or send value to non-payable fallback", "overrides", overrides);
|
||||
}
|
||||
(0, index_js_3.assertArgument)(iface.fallback || noData, "cannot send data to receive-only contract", "overrides.data", tx.data);
|
||||
// Only allow payable contracts to set non-zero value
|
||||
const payable = iface.receive || (iface.fallback && iface.fallback.payable);
|
||||
(0, index_js_3.assertArgument)(payable || noValue, "cannot send value to non-payable fallback", "overrides.value", tx.value);
|
||||
// Only allow fallback contracts to set non-empty data
|
||||
(0, index_js_3.assertArgument)(iface.fallback || noData, "cannot send data to receive-only contract", "overrides.data", tx.data);
|
||||
return tx;
|
||||
};
|
||||
const staticCall = async function (overrides) {
|
||||
const runner = getRunner(contract.runner, "call");
|
||||
(0, index_js_3.assert)(canCall(runner), "contract runner does not support calling", "UNSUPPORTED_OPERATION", { operation: "call" });
|
||||
const tx = await populateTransaction(overrides);
|
||||
try {
|
||||
return await runner.call(tx);
|
||||
}
|
||||
catch (error) {
|
||||
if ((0, index_js_3.isCallException)(error) && error.data) {
|
||||
throw contract.interface.makeError(error.data, tx);
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
};
|
||||
const send = async function (overrides) {
|
||||
const runner = contract.runner;
|
||||
(0, index_js_3.assert)(canSend(runner), "contract runner does not support sending transactions", "UNSUPPORTED_OPERATION", { operation: "sendTransaction" });
|
||||
const tx = await runner.sendTransaction(await populateTransaction(overrides));
|
||||
const provider = getProvider(contract.runner);
|
||||
// @TODO: the provider can be null; make a custom dummy provider that will throw a
|
||||
// meaningful error
|
||||
return new wrappers_js_1.ContractTransactionResponse(contract.interface, provider, tx);
|
||||
};
|
||||
const estimateGas = async function (overrides) {
|
||||
const runner = getRunner(contract.runner, "estimateGas");
|
||||
(0, index_js_3.assert)(canEstimate(runner), "contract runner does not support gas estimation", "UNSUPPORTED_OPERATION", { operation: "estimateGas" });
|
||||
return await runner.estimateGas(await populateTransaction(overrides));
|
||||
};
|
||||
const method = async (overrides) => {
|
||||
return await send(overrides);
|
||||
};
|
||||
(0, index_js_3.defineProperties)(method, {
|
||||
_contract: contract,
|
||||
estimateGas,
|
||||
populateTransaction,
|
||||
send, staticCall
|
||||
});
|
||||
return method;
|
||||
}
|
||||
function buildWrappedMethod(contract, key) {
|
||||
const getFragment = function (...args) {
|
||||
const fragment = contract.interface.getFunction(key, args);
|
||||
(0, index_js_3.assert)(fragment, "no matching fragment", "UNSUPPORTED_OPERATION", {
|
||||
operation: "fragment",
|
||||
info: { key, args }
|
||||
});
|
||||
return fragment;
|
||||
};
|
||||
const populateTransaction = async function (...args) {
|
||||
const fragment = getFragment(...args);
|
||||
// If an overrides was passed in, copy it and normalize the values
|
||||
let overrides = {};
|
||||
if (fragment.inputs.length + 1 === args.length) {
|
||||
overrides = await copyOverrides(args.pop());
|
||||
if (overrides.from) {
|
||||
overrides.from = await (0, index_js_2.resolveAddress)(overrides.from, getResolver(contract.runner));
|
||||
}
|
||||
}
|
||||
if (fragment.inputs.length !== args.length) {
|
||||
throw new Error("internal error: fragment inputs doesn't match arguments; should not happen");
|
||||
}
|
||||
const resolvedArgs = await resolveArgs(contract.runner, fragment.inputs, args);
|
||||
return Object.assign({}, overrides, await (0, index_js_3.resolveProperties)({
|
||||
to: contract.getAddress(),
|
||||
data: contract.interface.encodeFunctionData(fragment, resolvedArgs)
|
||||
}));
|
||||
};
|
||||
const staticCall = async function (...args) {
|
||||
const result = await staticCallResult(...args);
|
||||
if (result.length === 1) {
|
||||
return result[0];
|
||||
}
|
||||
return result;
|
||||
};
|
||||
const send = async function (...args) {
|
||||
const runner = contract.runner;
|
||||
(0, index_js_3.assert)(canSend(runner), "contract runner does not support sending transactions", "UNSUPPORTED_OPERATION", { operation: "sendTransaction" });
|
||||
const tx = await runner.sendTransaction(await populateTransaction(...args));
|
||||
const provider = getProvider(contract.runner);
|
||||
// @TODO: the provider can be null; make a custom dummy provider that will throw a
|
||||
// meaningful error
|
||||
return new wrappers_js_1.ContractTransactionResponse(contract.interface, provider, tx);
|
||||
};
|
||||
const estimateGas = async function (...args) {
|
||||
const runner = getRunner(contract.runner, "estimateGas");
|
||||
(0, index_js_3.assert)(canEstimate(runner), "contract runner does not support gas estimation", "UNSUPPORTED_OPERATION", { operation: "estimateGas" });
|
||||
return await runner.estimateGas(await populateTransaction(...args));
|
||||
};
|
||||
const staticCallResult = async function (...args) {
|
||||
const runner = getRunner(contract.runner, "call");
|
||||
(0, index_js_3.assert)(canCall(runner), "contract runner does not support calling", "UNSUPPORTED_OPERATION", { operation: "call" });
|
||||
const tx = await populateTransaction(...args);
|
||||
let result = "0x";
|
||||
try {
|
||||
result = await runner.call(tx);
|
||||
}
|
||||
catch (error) {
|
||||
if ((0, index_js_3.isCallException)(error) && error.data) {
|
||||
throw contract.interface.makeError(error.data, tx);
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
const fragment = getFragment(...args);
|
||||
return contract.interface.decodeFunctionResult(fragment, result);
|
||||
};
|
||||
const method = async (...args) => {
|
||||
const fragment = getFragment(...args);
|
||||
if (fragment.constant) {
|
||||
return await staticCall(...args);
|
||||
}
|
||||
return await send(...args);
|
||||
};
|
||||
(0, index_js_3.defineProperties)(method, {
|
||||
name: contract.interface.getFunctionName(key),
|
||||
_contract: contract, _key: key,
|
||||
getFragment,
|
||||
estimateGas,
|
||||
populateTransaction,
|
||||
send, staticCall, staticCallResult,
|
||||
});
|
||||
// Only works on non-ambiguous keys (refined fragment is always non-ambiguous)
|
||||
Object.defineProperty(method, "fragment", {
|
||||
configurable: false,
|
||||
enumerable: true,
|
||||
get: () => {
|
||||
const fragment = contract.interface.getFunction(key);
|
||||
(0, index_js_3.assert)(fragment, "no matching fragment", "UNSUPPORTED_OPERATION", {
|
||||
operation: "fragment",
|
||||
info: { key }
|
||||
});
|
||||
return fragment;
|
||||
}
|
||||
});
|
||||
return method;
|
||||
}
|
||||
function buildWrappedEvent(contract, key) {
|
||||
const getFragment = function (...args) {
|
||||
const fragment = contract.interface.getEvent(key, args);
|
||||
(0, index_js_3.assert)(fragment, "no matching fragment", "UNSUPPORTED_OPERATION", {
|
||||
operation: "fragment",
|
||||
info: { key, args }
|
||||
});
|
||||
return fragment;
|
||||
};
|
||||
const method = function (...args) {
|
||||
return new PreparedTopicFilter(contract, getFragment(...args), args);
|
||||
};
|
||||
(0, index_js_3.defineProperties)(method, {
|
||||
name: contract.interface.getEventName(key),
|
||||
_contract: contract, _key: key,
|
||||
getFragment
|
||||
});
|
||||
// Only works on non-ambiguous keys (refined fragment is always non-ambiguous)
|
||||
Object.defineProperty(method, "fragment", {
|
||||
configurable: false,
|
||||
enumerable: true,
|
||||
get: () => {
|
||||
const fragment = contract.interface.getEvent(key);
|
||||
(0, index_js_3.assert)(fragment, "no matching fragment", "UNSUPPORTED_OPERATION", {
|
||||
operation: "fragment",
|
||||
info: { key }
|
||||
});
|
||||
return fragment;
|
||||
}
|
||||
});
|
||||
return method;
|
||||
}
|
||||
// The combination of TypeScrype, Private Fields and Proxies makes
|
||||
// the world go boom; so we hide variables with some trickery keeping
|
||||
// a symbol attached to each BaseContract which its sub-class (even
|
||||
// via a Proxy) can reach and use to look up its internal values.
|
||||
const internal = Symbol.for("_ethersInternal_contract");
|
||||
const internalValues = new WeakMap();
|
||||
function setInternal(contract, values) {
|
||||
internalValues.set(contract[internal], values);
|
||||
}
|
||||
function getInternal(contract) {
|
||||
return internalValues.get(contract[internal]);
|
||||
}
|
||||
function isDeferred(value) {
|
||||
return (value && typeof (value) === "object" && ("getTopicFilter" in value) &&
|
||||
(typeof (value.getTopicFilter) === "function") && value.fragment);
|
||||
}
|
||||
async function getSubInfo(contract, event) {
|
||||
let topics;
|
||||
let fragment = null;
|
||||
// Convert named events to topicHash and get the fragment for
|
||||
// events which need deconstructing.
|
||||
if (Array.isArray(event)) {
|
||||
const topicHashify = function (name) {
|
||||
if ((0, index_js_3.isHexString)(name, 32)) {
|
||||
return name;
|
||||
}
|
||||
const fragment = contract.interface.getEvent(name);
|
||||
(0, index_js_3.assertArgument)(fragment, "unknown fragment", "name", name);
|
||||
return fragment.topicHash;
|
||||
};
|
||||
// Array of Topics and Names; e.g. `[ "0x1234...89ab", "Transfer(address)" ]`
|
||||
topics = event.map((e) => {
|
||||
if (e == null) {
|
||||
return null;
|
||||
}
|
||||
if (Array.isArray(e)) {
|
||||
return e.map(topicHashify);
|
||||
}
|
||||
return topicHashify(e);
|
||||
});
|
||||
}
|
||||
else if (event === "*") {
|
||||
topics = [null];
|
||||
}
|
||||
else if (typeof (event) === "string") {
|
||||
if ((0, index_js_3.isHexString)(event, 32)) {
|
||||
// Topic Hash
|
||||
topics = [event];
|
||||
}
|
||||
else {
|
||||
// Name or Signature; e.g. `"Transfer", `"Transfer(address)"`
|
||||
fragment = contract.interface.getEvent(event);
|
||||
(0, index_js_3.assertArgument)(fragment, "unknown fragment", "event", event);
|
||||
topics = [fragment.topicHash];
|
||||
}
|
||||
}
|
||||
else if (isDeferred(event)) {
|
||||
// Deferred Topic Filter; e.g. `contract.filter.Transfer(from)`
|
||||
topics = await event.getTopicFilter();
|
||||
}
|
||||
else if ("fragment" in event) {
|
||||
// ContractEvent; e.g. `contract.filter.Transfer`
|
||||
fragment = event.fragment;
|
||||
topics = [fragment.topicHash];
|
||||
}
|
||||
else {
|
||||
(0, index_js_3.assertArgument)(false, "unknown event name", "event", event);
|
||||
}
|
||||
// Normalize topics and sort TopicSets
|
||||
topics = topics.map((t) => {
|
||||
if (t == null) {
|
||||
return null;
|
||||
}
|
||||
if (Array.isArray(t)) {
|
||||
const items = Array.from(new Set(t.map((t) => t.toLowerCase())).values());
|
||||
if (items.length === 1) {
|
||||
return items[0];
|
||||
}
|
||||
items.sort();
|
||||
return items;
|
||||
}
|
||||
return t.toLowerCase();
|
||||
});
|
||||
const tag = topics.map((t) => {
|
||||
if (t == null) {
|
||||
return "null";
|
||||
}
|
||||
if (Array.isArray(t)) {
|
||||
return t.join("|");
|
||||
}
|
||||
return t;
|
||||
}).join("&");
|
||||
return { fragment, tag, topics };
|
||||
}
|
||||
async function hasSub(contract, event) {
|
||||
const { subs } = getInternal(contract);
|
||||
return subs.get((await getSubInfo(contract, event)).tag) || null;
|
||||
}
|
||||
async function getSub(contract, operation, event) {
|
||||
// Make sure our runner can actually subscribe to events
|
||||
const provider = getProvider(contract.runner);
|
||||
(0, index_js_3.assert)(provider, "contract runner does not support subscribing", "UNSUPPORTED_OPERATION", { operation });
|
||||
const { fragment, tag, topics } = await getSubInfo(contract, event);
|
||||
const { addr, subs } = getInternal(contract);
|
||||
let sub = subs.get(tag);
|
||||
if (!sub) {
|
||||
const address = (addr ? addr : contract);
|
||||
const filter = { address, topics };
|
||||
const listener = (log) => {
|
||||
let foundFragment = fragment;
|
||||
if (foundFragment == null) {
|
||||
try {
|
||||
foundFragment = contract.interface.getEvent(log.topics[0]);
|
||||
}
|
||||
catch (error) { }
|
||||
}
|
||||
// If fragment is null, we do not deconstruct the args to emit
|
||||
if (foundFragment) {
|
||||
const _foundFragment = foundFragment;
|
||||
const args = fragment ? contract.interface.decodeEventLog(fragment, log.data, log.topics) : [];
|
||||
emit(contract, event, args, (listener) => {
|
||||
return new wrappers_js_1.ContractEventPayload(contract, listener, event, _foundFragment, log);
|
||||
});
|
||||
}
|
||||
else {
|
||||
emit(contract, event, [], (listener) => {
|
||||
return new wrappers_js_1.ContractUnknownEventPayload(contract, listener, event, log);
|
||||
});
|
||||
}
|
||||
};
|
||||
let starting = [];
|
||||
const start = () => {
|
||||
if (starting.length) {
|
||||
return;
|
||||
}
|
||||
starting.push(provider.on(filter, listener));
|
||||
};
|
||||
const stop = async () => {
|
||||
if (starting.length == 0) {
|
||||
return;
|
||||
}
|
||||
let started = starting;
|
||||
starting = [];
|
||||
await Promise.all(started);
|
||||
provider.off(filter, listener);
|
||||
};
|
||||
sub = { tag, listeners: [], start, stop };
|
||||
subs.set(tag, sub);
|
||||
}
|
||||
return sub;
|
||||
}
|
||||
// We use this to ensure one emit resolves before firing the next to
|
||||
// ensure correct ordering (note this cannot throw and just adds the
|
||||
// notice to the event queu using setTimeout).
|
||||
let lastEmit = Promise.resolve();
|
||||
async function _emit(contract, event, args, payloadFunc) {
|
||||
await lastEmit;
|
||||
const sub = await hasSub(contract, event);
|
||||
if (!sub) {
|
||||
return false;
|
||||
}
|
||||
const count = sub.listeners.length;
|
||||
sub.listeners = sub.listeners.filter(({ listener, once }) => {
|
||||
const passArgs = Array.from(args);
|
||||
if (payloadFunc) {
|
||||
passArgs.push(payloadFunc(once ? null : listener));
|
||||
}
|
||||
try {
|
||||
listener.call(contract, ...passArgs);
|
||||
}
|
||||
catch (error) { }
|
||||
return !once;
|
||||
});
|
||||
if (sub.listeners.length === 0) {
|
||||
sub.stop();
|
||||
getInternal(contract).subs.delete(sub.tag);
|
||||
}
|
||||
return (count > 0);
|
||||
}
|
||||
async function emit(contract, event, args, payloadFunc) {
|
||||
try {
|
||||
await lastEmit;
|
||||
}
|
||||
catch (error) { }
|
||||
const resultPromise = _emit(contract, event, args, payloadFunc);
|
||||
lastEmit = resultPromise;
|
||||
return await resultPromise;
|
||||
}
|
||||
const passProperties = ["then"];
|
||||
class BaseContract {
|
||||
/**
|
||||
* The target to connect to.
|
||||
*
|
||||
* This can be an address, ENS name or any [[Addressable]], such as
|
||||
* another contract. To get the resolved address, use the ``getAddress``
|
||||
* method.
|
||||
*/
|
||||
target;
|
||||
/**
|
||||
* The contract Interface.
|
||||
*/
|
||||
interface;
|
||||
/**
|
||||
* The connected runner. This is generally a [[Provider]] or a
|
||||
* [[Signer]], which dictates what operations are supported.
|
||||
*
|
||||
* For example, a **Contract** connected to a [[Provider]] may
|
||||
* only execute read-only operations.
|
||||
*/
|
||||
runner;
|
||||
/**
|
||||
* All the Events available on this contract.
|
||||
*/
|
||||
filters;
|
||||
/**
|
||||
* @_ignore:
|
||||
*/
|
||||
[internal];
|
||||
/**
|
||||
* The fallback or receive function if any.
|
||||
*/
|
||||
fallback;
|
||||
/**
|
||||
* Creates a new contract connected to %%target%% with the %%abi%% and
|
||||
* optionally connected to a %%runner%% to perform operations on behalf
|
||||
* of.
|
||||
*/
|
||||
constructor(target, abi, runner, _deployTx) {
|
||||
(0, index_js_3.assertArgument)(typeof (target) === "string" || (0, index_js_2.isAddressable)(target), "invalid value for Contract target", "target", target);
|
||||
if (runner == null) {
|
||||
runner = null;
|
||||
}
|
||||
const iface = index_js_1.Interface.from(abi);
|
||||
(0, index_js_3.defineProperties)(this, { target, runner, interface: iface });
|
||||
Object.defineProperty(this, internal, { value: {} });
|
||||
let addrPromise;
|
||||
let addr = null;
|
||||
let deployTx = null;
|
||||
if (_deployTx) {
|
||||
const provider = getProvider(runner);
|
||||
// @TODO: the provider can be null; make a custom dummy provider that will throw a
|
||||
// meaningful error
|
||||
deployTx = new wrappers_js_1.ContractTransactionResponse(this.interface, provider, _deployTx);
|
||||
}
|
||||
let subs = new Map();
|
||||
// Resolve the target as the address
|
||||
if (typeof (target) === "string") {
|
||||
if ((0, index_js_3.isHexString)(target)) {
|
||||
addr = target;
|
||||
addrPromise = Promise.resolve(target);
|
||||
}
|
||||
else {
|
||||
const resolver = getRunner(runner, "resolveName");
|
||||
if (!canResolve(resolver)) {
|
||||
throw (0, index_js_3.makeError)("contract runner does not support name resolution", "UNSUPPORTED_OPERATION", {
|
||||
operation: "resolveName"
|
||||
});
|
||||
}
|
||||
addrPromise = resolver.resolveName(target).then((addr) => {
|
||||
if (addr == null) {
|
||||
throw (0, index_js_3.makeError)("an ENS name used for a contract target must be correctly configured", "UNCONFIGURED_NAME", {
|
||||
value: target
|
||||
});
|
||||
}
|
||||
getInternal(this).addr = addr;
|
||||
return addr;
|
||||
});
|
||||
}
|
||||
}
|
||||
else {
|
||||
addrPromise = target.getAddress().then((addr) => {
|
||||
if (addr == null) {
|
||||
throw new Error("TODO");
|
||||
}
|
||||
getInternal(this).addr = addr;
|
||||
return addr;
|
||||
});
|
||||
}
|
||||
// Set our private values
|
||||
setInternal(this, { addrPromise, addr, deployTx, subs });
|
||||
// Add the event filters
|
||||
const filters = new Proxy({}, {
|
||||
get: (target, prop, receiver) => {
|
||||
// Pass important checks (like `then` for Promise) through
|
||||
if (typeof (prop) === "symbol" || passProperties.indexOf(prop) >= 0) {
|
||||
return Reflect.get(target, prop, receiver);
|
||||
}
|
||||
try {
|
||||
return this.getEvent(prop);
|
||||
}
|
||||
catch (error) {
|
||||
if (!(0, index_js_3.isError)(error, "INVALID_ARGUMENT") || error.argument !== "key") {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
return undefined;
|
||||
},
|
||||
has: (target, prop) => {
|
||||
// Pass important checks (like `then` for Promise) through
|
||||
if (passProperties.indexOf(prop) >= 0) {
|
||||
return Reflect.has(target, prop);
|
||||
}
|
||||
return Reflect.has(target, prop) || this.interface.hasEvent(String(prop));
|
||||
}
|
||||
});
|
||||
(0, index_js_3.defineProperties)(this, { filters });
|
||||
(0, index_js_3.defineProperties)(this, {
|
||||
fallback: ((iface.receive || iface.fallback) ? (buildWrappedFallback(this)) : null)
|
||||
});
|
||||
// Return a Proxy that will respond to functions
|
||||
return new Proxy(this, {
|
||||
get: (target, prop, receiver) => {
|
||||
if (typeof (prop) === "symbol" || prop in target || passProperties.indexOf(prop) >= 0) {
|
||||
return Reflect.get(target, prop, receiver);
|
||||
}
|
||||
// Undefined properties should return undefined
|
||||
try {
|
||||
return target.getFunction(prop);
|
||||
}
|
||||
catch (error) {
|
||||
if (!(0, index_js_3.isError)(error, "INVALID_ARGUMENT") || error.argument !== "key") {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
return undefined;
|
||||
},
|
||||
has: (target, prop) => {
|
||||
if (typeof (prop) === "symbol" || prop in target || passProperties.indexOf(prop) >= 0) {
|
||||
return Reflect.has(target, prop);
|
||||
}
|
||||
return target.interface.hasFunction(prop);
|
||||
}
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Return a new Contract instance with the same target and ABI, but
|
||||
* a different %%runner%%.
|
||||
*/
|
||||
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.
|
||||
*/
|
||||
async getAddress() { return await getInternal(this).addrPromise; }
|
||||
/**
|
||||
* Return the deployed bytecode or null if no bytecode is found.
|
||||
*/
|
||||
async getDeployedCode() {
|
||||
const provider = getProvider(this.runner);
|
||||
(0, index_js_3.assert)(provider, "runner does not support .provider", "UNSUPPORTED_OPERATION", { operation: "getDeployedCode" });
|
||||
const code = await provider.getCode(await this.getAddress());
|
||||
if (code === "0x") {
|
||||
return null;
|
||||
}
|
||||
return code;
|
||||
}
|
||||
/**
|
||||
* Resolve to this Contract once the bytecode has been deployed, or
|
||||
* resolve immediately if already deployed.
|
||||
*/
|
||||
async waitForDeployment() {
|
||||
// We have the deployment transaction; just use that (throws if deployment fails)
|
||||
const deployTx = this.deploymentTransaction();
|
||||
if (deployTx) {
|
||||
await deployTx.wait();
|
||||
return this;
|
||||
}
|
||||
// Check for code
|
||||
const code = await this.getDeployedCode();
|
||||
if (code != null) {
|
||||
return this;
|
||||
}
|
||||
// Make sure we can subscribe to a provider event
|
||||
const provider = getProvider(this.runner);
|
||||
(0, index_js_3.assert)(provider != null, "contract runner does not support .provider", "UNSUPPORTED_OPERATION", { operation: "waitForDeployment" });
|
||||
return new Promise((resolve, reject) => {
|
||||
const checkCode = async () => {
|
||||
try {
|
||||
const code = await this.getDeployedCode();
|
||||
if (code != null) {
|
||||
return resolve(this);
|
||||
}
|
||||
provider.once("block", checkCode);
|
||||
}
|
||||
catch (error) {
|
||||
reject(error);
|
||||
}
|
||||
};
|
||||
checkCode();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Return the transaction used to deploy this contract.
|
||||
*
|
||||
* This is only available if this instance was returned from a
|
||||
* [[ContractFactory]].
|
||||
*/
|
||||
deploymentTransaction() {
|
||||
return getInternal(this).deployTx;
|
||||
}
|
||||
/**
|
||||
* Return the function for a given name. This is useful when a contract
|
||||
* method name conflicts with a JavaScript name such as ``prototype`` or
|
||||
* when using a Contract programmatically.
|
||||
*/
|
||||
getFunction(key) {
|
||||
if (typeof (key) !== "string") {
|
||||
key = key.format();
|
||||
}
|
||||
const func = buildWrappedMethod(this, key);
|
||||
return func;
|
||||
}
|
||||
/**
|
||||
* Return the event for a given name. This is useful when a contract
|
||||
* event name conflicts with a JavaScript name such as ``prototype`` or
|
||||
* when using a Contract programmatically.
|
||||
*/
|
||||
getEvent(key) {
|
||||
if (typeof (key) !== "string") {
|
||||
key = key.format();
|
||||
}
|
||||
return buildWrappedEvent(this, key);
|
||||
}
|
||||
/**
|
||||
* @_ignore:
|
||||
*/
|
||||
async queryTransaction(hash) {
|
||||
throw new Error("@TODO");
|
||||
}
|
||||
/*
|
||||
// @TODO: this is a non-backwards compatible change, but will be added
|
||||
// in v7 and in a potential SmartContract class in an upcoming
|
||||
// v6 release
|
||||
async getTransactionReceipt(hash: string): Promise<null | ContractTransactionReceipt> {
|
||||
const provider = getProvider(this.runner);
|
||||
assert(provider, "contract runner does not have a provider",
|
||||
"UNSUPPORTED_OPERATION", { operation: "queryTransaction" });
|
||||
|
||||
const receipt = await provider.getTransactionReceipt(hash);
|
||||
if (receipt == null) { return null; }
|
||||
|
||||
return new ContractTransactionReceipt(this.interface, provider, receipt);
|
||||
}
|
||||
*/
|
||||
/**
|
||||
* Provide historic access to event data for %%event%% in the range
|
||||
* %%fromBlock%% (default: ``0``) to %%toBlock%% (default: ``"latest"``)
|
||||
* inclusive.
|
||||
*/
|
||||
async queryFilter(event, fromBlock, toBlock) {
|
||||
if (fromBlock == null) {
|
||||
fromBlock = 0;
|
||||
}
|
||||
if (toBlock == null) {
|
||||
toBlock = "latest";
|
||||
}
|
||||
const { addr, addrPromise } = getInternal(this);
|
||||
const address = (addr ? addr : (await addrPromise));
|
||||
const { fragment, topics } = await getSubInfo(this, event);
|
||||
const filter = { address, topics, fromBlock, toBlock };
|
||||
const provider = getProvider(this.runner);
|
||||
(0, index_js_3.assert)(provider, "contract runner does not have a provider", "UNSUPPORTED_OPERATION", { operation: "queryFilter" });
|
||||
return (await provider.getLogs(filter)).map((log) => {
|
||||
let foundFragment = fragment;
|
||||
if (foundFragment == null) {
|
||||
try {
|
||||
foundFragment = this.interface.getEvent(log.topics[0]);
|
||||
}
|
||||
catch (error) { }
|
||||
}
|
||||
if (foundFragment) {
|
||||
try {
|
||||
return new wrappers_js_1.EventLog(log, this.interface, foundFragment);
|
||||
}
|
||||
catch (error) {
|
||||
return new wrappers_js_1.UndecodedEventLog(log, error);
|
||||
}
|
||||
}
|
||||
return new provider_js_1.Log(log, provider);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Add an event %%listener%% for the %%event%%.
|
||||
*/
|
||||
async on(event, listener) {
|
||||
const sub = await getSub(this, "on", event);
|
||||
sub.listeners.push({ listener, once: false });
|
||||
sub.start();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* Add an event %%listener%% for the %%event%%, but remove the listener
|
||||
* after it is fired once.
|
||||
*/
|
||||
async once(event, listener) {
|
||||
const sub = await getSub(this, "once", event);
|
||||
sub.listeners.push({ listener, once: true });
|
||||
sub.start();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* Emit an %%event%% calling all listeners with %%args%%.
|
||||
*
|
||||
* Resolves to ``true`` if any listeners were called.
|
||||
*/
|
||||
async emit(event, ...args) {
|
||||
return await emit(this, event, args, null);
|
||||
}
|
||||
/**
|
||||
* Resolves to the number of listeners of %%event%% or the total number
|
||||
* of listeners if unspecified.
|
||||
*/
|
||||
async listenerCount(event) {
|
||||
if (event) {
|
||||
const sub = await hasSub(this, event);
|
||||
if (!sub) {
|
||||
return 0;
|
||||
}
|
||||
return sub.listeners.length;
|
||||
}
|
||||
const { subs } = getInternal(this);
|
||||
let total = 0;
|
||||
for (const { listeners } of subs.values()) {
|
||||
total += listeners.length;
|
||||
}
|
||||
return total;
|
||||
}
|
||||
/**
|
||||
* Resolves to the listeners subscribed to %%event%% or all listeners
|
||||
* if unspecified.
|
||||
*/
|
||||
async listeners(event) {
|
||||
if (event) {
|
||||
const sub = await hasSub(this, event);
|
||||
if (!sub) {
|
||||
return [];
|
||||
}
|
||||
return sub.listeners.map(({ listener }) => listener);
|
||||
}
|
||||
const { subs } = getInternal(this);
|
||||
let result = [];
|
||||
for (const { listeners } of subs.values()) {
|
||||
result = result.concat(listeners.map(({ listener }) => listener));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
/**
|
||||
* Remove the %%listener%% from the listeners for %%event%% or remove
|
||||
* all listeners if unspecified.
|
||||
*/
|
||||
async off(event, listener) {
|
||||
const sub = await hasSub(this, event);
|
||||
if (!sub) {
|
||||
return this;
|
||||
}
|
||||
if (listener) {
|
||||
const index = sub.listeners.map(({ listener }) => listener).indexOf(listener);
|
||||
if (index >= 0) {
|
||||
sub.listeners.splice(index, 1);
|
||||
}
|
||||
}
|
||||
if (listener == null || sub.listeners.length === 0) {
|
||||
sub.stop();
|
||||
getInternal(this).subs.delete(sub.tag);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* Remove all the listeners for %%event%% or remove all listeners if
|
||||
* unspecified.
|
||||
*/
|
||||
async removeAllListeners(event) {
|
||||
if (event) {
|
||||
const sub = await hasSub(this, event);
|
||||
if (!sub) {
|
||||
return this;
|
||||
}
|
||||
sub.stop();
|
||||
getInternal(this).subs.delete(sub.tag);
|
||||
}
|
||||
else {
|
||||
const { subs } = getInternal(this);
|
||||
for (const { tag, stop } of subs.values()) {
|
||||
stop();
|
||||
subs.delete(tag);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* Alias for [on].
|
||||
*/
|
||||
async addListener(event, listener) {
|
||||
return await this.on(event, listener);
|
||||
}
|
||||
/**
|
||||
* Alias for [off].
|
||||
*/
|
||||
async removeListener(event, listener) {
|
||||
return await this.off(event, listener);
|
||||
}
|
||||
/**
|
||||
* Create a new Class for the %%abi%%.
|
||||
*/
|
||||
static buildClass(abi) {
|
||||
class CustomContract extends BaseContract {
|
||||
constructor(address, runner = null) {
|
||||
super(address, abi, runner);
|
||||
}
|
||||
}
|
||||
return CustomContract;
|
||||
}
|
||||
;
|
||||
/**
|
||||
* Create a new BaseContract with a specified Interface.
|
||||
*/
|
||||
static from(target, abi, runner) {
|
||||
if (runner == null) {
|
||||
runner = null;
|
||||
}
|
||||
const contract = new this(target, abi, runner);
|
||||
return contract;
|
||||
}
|
||||
}
|
||||
exports.BaseContract = BaseContract;
|
||||
function _ContractBase() {
|
||||
return BaseContract;
|
||||
}
|
||||
/**
|
||||
* A [[BaseContract]] with no type guards on its methods or events.
|
||||
*/
|
||||
class Contract extends _ContractBase() {
|
||||
}
|
||||
exports.Contract = Contract;
|
||||
//# sourceMappingURL=contract.js.map
|
||||
1
dev/env/node_modules/ethers/lib.commonjs/contract/contract.js.map
generated
vendored
Executable file
1
dev/env/node_modules/ethers/lib.commonjs/contract/contract.js.map
generated
vendored
Executable file
File diff suppressed because one or more lines are too long
62
dev/env/node_modules/ethers/lib.commonjs/contract/factory.d.ts
generated
vendored
Executable file
62
dev/env/node_modules/ethers/lib.commonjs/contract/factory.d.ts
generated
vendored
Executable file
@@ -0,0 +1,62 @@
|
||||
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";
|
||||
import type { ContractTransactionResponse } from "./wrappers.js";
|
||||
/**
|
||||
* A **ContractFactory** is used to deploy a Contract to the blockchain.
|
||||
*/
|
||||
export declare class ContractFactory<A extends Array<any> = Array<any>, I = BaseContract> {
|
||||
/**
|
||||
* The Contract Interface.
|
||||
*/
|
||||
readonly interface: Interface;
|
||||
/**
|
||||
* The Contract deployment bytecode. Often called the initcode.
|
||||
*/
|
||||
readonly bytecode: string;
|
||||
/**
|
||||
* The ContractRunner to deploy the Contract as.
|
||||
*/
|
||||
readonly runner: null | ContractRunner;
|
||||
/**
|
||||
* Create a new **ContractFactory** with %%abi%% and %%bytecode%%,
|
||||
* optionally connected to %%runner%%.
|
||||
*
|
||||
* The %%bytecode%% may be the ``bytecode`` property within the
|
||||
* standard Solidity JSON output.
|
||||
*/
|
||||
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.
|
||||
*/
|
||||
getDeployTransaction(...args: ContractMethodArgs<A>): Promise<ContractDeployTransaction>;
|
||||
/**
|
||||
* Resolves to the Contract deployed by passing %%args%% into the
|
||||
* constructor.
|
||||
*
|
||||
* This will resolve to the Contract before it has been deployed to the
|
||||
* network, so the [[BaseContract-waitForDeployment]] should be used before
|
||||
* sending any transactions to it.
|
||||
*/
|
||||
deploy(...args: ContractMethodArgs<A>): Promise<BaseContract & {
|
||||
deploymentTransaction(): ContractTransactionResponse;
|
||||
} & Omit<I, keyof BaseContract>>;
|
||||
/**
|
||||
* Return a new **ContractFactory** with the same ABI and bytecode,
|
||||
* but connected to %%runner%%.
|
||||
*/
|
||||
connect(runner: null | ContractRunner): ContractFactory<A, I>;
|
||||
/**
|
||||
* Create a new **ContractFactory** from the standard Solidity JSON output.
|
||||
*/
|
||||
static fromSolidity<A extends Array<any> = Array<any>, I = ContractInterface>(output: any, runner?: ContractRunner): ContractFactory<A, I>;
|
||||
}
|
||||
//# sourceMappingURL=factory.d.ts.map
|
||||
1
dev/env/node_modules/ethers/lib.commonjs/contract/factory.d.ts.map
generated
vendored
Executable file
1
dev/env/node_modules/ethers/lib.commonjs/contract/factory.d.ts.map
generated
vendored
Executable file
@@ -0,0 +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,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,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,eAAe,CAAC;AAMjE;;GAEG;AACH,qBAAa,eAAe,CAAC,CAAC,SAAS,KAAK,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,YAAY;IAE5E;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAG,SAAS,CAAC;IAE/B;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAG,MAAM,CAAC;IAE3B;;OAEG;IACH,QAAQ,CAAC,MAAM,EAAG,IAAI,GAAG,cAAc,CAAC;IAExC;;;;;;OAMG;gBACS,GAAG,EAAE,SAAS,GAAG,YAAY,EAAE,QAAQ,EAAE,SAAS,GAAG;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,EAAE,MAAM,CAAC,EAAE,IAAI,GAAG,cAAc;IAiBnH,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,WAAW,GAAG,YAAY,GAAG,IAAI,CAAC,CAAC,EAAE,MAAM,YAAY,CAAC;IAIhF;;;OAGG;IACG,oBAAoB,CAAC,GAAG,IAAI,EAAE,kBAAkB,CAAC,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"}
|
||||
116
dev/env/node_modules/ethers/lib.commonjs/contract/factory.js
generated
vendored
Executable file
116
dev/env/node_modules/ethers/lib.commonjs/contract/factory.js
generated
vendored
Executable file
@@ -0,0 +1,116 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ContractFactory = void 0;
|
||||
const index_js_1 = require("../abi/index.js");
|
||||
const index_js_2 = require("../address/index.js");
|
||||
const index_js_3 = require("../utils/index.js");
|
||||
const contract_js_1 = require("./contract.js");
|
||||
// A = Arguments to the constructor
|
||||
// I = Interface of deployed contracts
|
||||
/**
|
||||
* A **ContractFactory** is used to deploy a Contract to the blockchain.
|
||||
*/
|
||||
class ContractFactory {
|
||||
/**
|
||||
* The Contract Interface.
|
||||
*/
|
||||
interface;
|
||||
/**
|
||||
* The Contract deployment bytecode. Often called the initcode.
|
||||
*/
|
||||
bytecode;
|
||||
/**
|
||||
* The ContractRunner to deploy the Contract as.
|
||||
*/
|
||||
runner;
|
||||
/**
|
||||
* Create a new **ContractFactory** with %%abi%% and %%bytecode%%,
|
||||
* optionally connected to %%runner%%.
|
||||
*
|
||||
* The %%bytecode%% may be the ``bytecode`` property within the
|
||||
* standard Solidity JSON output.
|
||||
*/
|
||||
constructor(abi, bytecode, runner) {
|
||||
const iface = index_js_1.Interface.from(abi);
|
||||
// Dereference Solidity bytecode objects and allow a missing `0x`-prefix
|
||||
if (bytecode instanceof Uint8Array) {
|
||||
bytecode = (0, index_js_3.hexlify)((0, index_js_3.getBytes)(bytecode));
|
||||
}
|
||||
else {
|
||||
if (typeof (bytecode) === "object") {
|
||||
bytecode = bytecode.object;
|
||||
}
|
||||
if (!bytecode.startsWith("0x")) {
|
||||
bytecode = "0x" + bytecode;
|
||||
}
|
||||
bytecode = (0, index_js_3.hexlify)((0, index_js_3.getBytes)(bytecode));
|
||||
}
|
||||
(0, index_js_3.defineProperties)(this, {
|
||||
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.
|
||||
*/
|
||||
async getDeployTransaction(...args) {
|
||||
let overrides = {};
|
||||
const fragment = this.interface.deploy;
|
||||
if (fragment.inputs.length + 1 === args.length) {
|
||||
overrides = await (0, contract_js_1.copyOverrides)(args.pop());
|
||||
}
|
||||
if (fragment.inputs.length !== args.length) {
|
||||
throw new Error("incorrect number of arguments to constructor");
|
||||
}
|
||||
const resolvedArgs = await (0, contract_js_1.resolveArgs)(this.runner, fragment.inputs, args);
|
||||
const data = (0, index_js_3.concat)([this.bytecode, this.interface.encodeDeploy(resolvedArgs)]);
|
||||
return Object.assign({}, overrides, { data });
|
||||
}
|
||||
/**
|
||||
* Resolves to the Contract deployed by passing %%args%% into the
|
||||
* constructor.
|
||||
*
|
||||
* This will resolve to the Contract before it has been deployed to the
|
||||
* network, so the [[BaseContract-waitForDeployment]] should be used before
|
||||
* sending any transactions to it.
|
||||
*/
|
||||
async deploy(...args) {
|
||||
const tx = await this.getDeployTransaction(...args);
|
||||
(0, index_js_3.assert)(this.runner && typeof (this.runner.sendTransaction) === "function", "factory runner does not support sending transactions", "UNSUPPORTED_OPERATION", {
|
||||
operation: "sendTransaction"
|
||||
});
|
||||
const sentTx = await this.runner.sendTransaction(tx);
|
||||
const address = (0, index_js_2.getCreateAddress)(sentTx);
|
||||
return new contract_js_1.BaseContract(address, this.interface, this.runner, sentTx);
|
||||
}
|
||||
/**
|
||||
* Return a new **ContractFactory** with the same ABI and bytecode,
|
||||
* but connected to %%runner%%.
|
||||
*/
|
||||
connect(runner) {
|
||||
return new ContractFactory(this.interface, this.bytecode, runner);
|
||||
}
|
||||
/**
|
||||
* Create a new **ContractFactory** from the standard Solidity JSON output.
|
||||
*/
|
||||
static fromSolidity(output, runner) {
|
||||
(0, index_js_3.assertArgument)(output != null, "bad compiler output", "output", output);
|
||||
if (typeof (output) === "string") {
|
||||
output = JSON.parse(output);
|
||||
}
|
||||
const abi = output.abi;
|
||||
let bytecode = "";
|
||||
if (output.bytecode) {
|
||||
bytecode = output.bytecode;
|
||||
}
|
||||
else if (output.evm && output.evm.bytecode) {
|
||||
bytecode = output.evm.bytecode;
|
||||
}
|
||||
return new this(abi, bytecode, runner);
|
||||
}
|
||||
}
|
||||
exports.ContractFactory = ContractFactory;
|
||||
//# sourceMappingURL=factory.js.map
|
||||
1
dev/env/node_modules/ethers/lib.commonjs/contract/factory.js.map
generated
vendored
Executable file
1
dev/env/node_modules/ethers/lib.commonjs/contract/factory.js.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"factory.js","sourceRoot":"","sources":["../../src.ts/contract/factory.ts"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C,SAAS,EAAE,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjF,CAAC;IAED;;;OAGG;IACH,OAAO,CAAC,MAA6B;QACjC,OAAO,IAAI,eAAe,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IACtE,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,YAAY,CAA2D,MAAW,EAAE,MAAuB;QAC9G,IAAA,yBAAc,EAAC,MAAM,IAAI,IAAI,EAAE,qBAAqB,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;QAExE,IAAI,OAAM,CAAC,MAAM,CAAC,KAAK,QAAQ,EAAE;YAAE,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;SAAE;QAEjE,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC;QAEvB,IAAI,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;AAnHD,0CAmHC"}
|
||||
13
dev/env/node_modules/ethers/lib.commonjs/contract/index.d.ts
generated
vendored
Executable file
13
dev/env/node_modules/ethers/lib.commonjs/contract/index.d.ts
generated
vendored
Executable file
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* A **Contract** object is a meta-class (a class whose definition is
|
||||
* defined at runtime), which communicates with a deployed smart contract
|
||||
* on the blockchain and provides a simple JavaScript interface to call
|
||||
* methods, send transaction, query historic logs and listen for its events.
|
||||
*
|
||||
* @_section: api/contract:Contracts [about-contracts]
|
||||
*/
|
||||
export { BaseContract, Contract } from "./contract.js";
|
||||
export { ContractFactory } from "./factory.js";
|
||||
export { ContractEventPayload, ContractUnknownEventPayload, ContractTransactionReceipt, ContractTransactionResponse, EventLog, UndecodedEventLog } from "./wrappers.js";
|
||||
export type { BaseContractMethod, ConstantContractMethod, PostfixOverrides, ContractEvent, ContractEventArgs, ContractEventName, ContractDeployTransaction, ContractInterface, ContractMethod, ContractMethodArgs, ContractTransaction, DeferredTopicFilter, Overrides, WrappedFallback } from "./types.js";
|
||||
//# sourceMappingURL=index.d.ts.map
|
||||
1
dev/env/node_modules/ethers/lib.commonjs/contract/index.d.ts.map
generated
vendored
Executable file
1
dev/env/node_modules/ethers/lib.commonjs/contract/index.d.ts.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src.ts/contract/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;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,EAAE,iBAAiB,EAC9B,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,EAC9B,eAAe,EAClB,MAAM,YAAY,CAAC"}
|
||||
24
dev/env/node_modules/ethers/lib.commonjs/contract/index.js
generated
vendored
Executable file
24
dev/env/node_modules/ethers/lib.commonjs/contract/index.js
generated
vendored
Executable file
@@ -0,0 +1,24 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.UndecodedEventLog = exports.EventLog = exports.ContractTransactionResponse = exports.ContractTransactionReceipt = exports.ContractUnknownEventPayload = exports.ContractEventPayload = exports.ContractFactory = exports.Contract = exports.BaseContract = void 0;
|
||||
/**
|
||||
* A **Contract** object is a meta-class (a class whose definition is
|
||||
* defined at runtime), which communicates with a deployed smart contract
|
||||
* on the blockchain and provides a simple JavaScript interface to call
|
||||
* methods, send transaction, query historic logs and listen for its events.
|
||||
*
|
||||
* @_section: api/contract:Contracts [about-contracts]
|
||||
*/
|
||||
var contract_js_1 = require("./contract.js");
|
||||
Object.defineProperty(exports, "BaseContract", { enumerable: true, get: function () { return contract_js_1.BaseContract; } });
|
||||
Object.defineProperty(exports, "Contract", { enumerable: true, get: function () { return contract_js_1.Contract; } });
|
||||
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; } });
|
||||
Object.defineProperty(exports, "UndecodedEventLog", { enumerable: true, get: function () { return wrappers_js_1.UndecodedEventLog; } });
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
dev/env/node_modules/ethers/lib.commonjs/contract/index.js.map
generated
vendored
Executable file
1
dev/env/node_modules/ethers/lib.commonjs/contract/index.js.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src.ts/contract/index.ts"],"names":[],"mappings":";;;AAAA;;;;;;;GAOG;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;AAAE,gHAAA,iBAAiB,OAAA"}
|
||||
193
dev/env/node_modules/ethers/lib.commonjs/contract/types.d.ts
generated
vendored
Executable file
193
dev/env/node_modules/ethers/lib.commonjs/contract/types.d.ts
generated
vendored
Executable file
@@ -0,0 +1,193 @@
|
||||
import type { EventFragment, FunctionFragment, Result, Typed } from "../abi/index.js";
|
||||
import type { TransactionRequest, PreparedTransactionRequest, TopicFilter } from "../providers/index.js";
|
||||
import type { ContractTransactionResponse } from "./wrappers.js";
|
||||
/**
|
||||
* The name for an event used for subscribing to Contract events.
|
||||
*
|
||||
* **``string``** - An event by name. The event must be non-ambiguous.
|
||||
* The parameters will be dereferenced when passed into the listener.
|
||||
*
|
||||
* [[ContractEvent]] - A filter from the ``contract.filters``, which will
|
||||
* pass only the EventPayload as a single parameter, which includes a
|
||||
* ``.signature`` property that can be used to further filter the event.
|
||||
*
|
||||
* [[TopicFilter]] - A filter defined using the standard Ethereum API
|
||||
* which provides the specific topic hash or topic hashes to watch for along
|
||||
* with any additional values to filter by. This will only pass a single
|
||||
* parameter to the listener, the EventPayload which will include additional
|
||||
* details to refine by, such as the event name and signature.
|
||||
*
|
||||
* [[DeferredTopicFilter]] - A filter created by calling a [[ContractEvent]]
|
||||
* with parameters, which will create a filter for a specific event
|
||||
* signature and dereference each parameter when calling the listener.
|
||||
*/
|
||||
export type ContractEventName = string | ContractEvent | TopicFilter | DeferredTopicFilter;
|
||||
/**
|
||||
* A Contract with no method constraints.
|
||||
*/
|
||||
export interface ContractInterface {
|
||||
[name: string]: BaseContractMethod;
|
||||
}
|
||||
/**
|
||||
* When creating a filter using the ``contract.filters``, this is returned.
|
||||
*/
|
||||
export interface DeferredTopicFilter {
|
||||
getTopicFilter(): Promise<TopicFilter>;
|
||||
fragment: EventFragment;
|
||||
}
|
||||
/**
|
||||
* When populating a transaction this type is returned.
|
||||
*/
|
||||
export interface ContractTransaction extends PreparedTransactionRequest {
|
||||
/**
|
||||
* The target address.
|
||||
*/
|
||||
to: string;
|
||||
/**
|
||||
* The transaction data.
|
||||
*/
|
||||
data: string;
|
||||
/**
|
||||
* The from address, if any.
|
||||
*/
|
||||
from?: string;
|
||||
}
|
||||
/**
|
||||
* A deployment transaction for a contract.
|
||||
*/
|
||||
export interface ContractDeployTransaction extends Omit<ContractTransaction, "to"> {
|
||||
}
|
||||
/**
|
||||
* The overrides for a contract transaction.
|
||||
*/
|
||||
export interface Overrides extends Omit<TransactionRequest, "to" | "data"> {
|
||||
}
|
||||
/**
|
||||
* Arguments to a Contract method can always include an additional and
|
||||
* optional overrides parameter.
|
||||
*
|
||||
* @_ignore:
|
||||
*/
|
||||
export type PostfixOverrides<A extends Array<any>> = A | [...A, Overrides];
|
||||
/**
|
||||
* Arguments to a Contract method can always include an additional and
|
||||
* optional overrides parameter, and each parameter can optionally be
|
||||
* [[Typed]].
|
||||
*
|
||||
* @_ignore:
|
||||
*/
|
||||
export type ContractMethodArgs<A extends Array<any>> = PostfixOverrides<{
|
||||
[I in keyof A]-?: A[I] | Typed;
|
||||
}>;
|
||||
/**
|
||||
* A Contract method can be called directly, or used in various ways.
|
||||
*/
|
||||
export interface BaseContractMethod<A extends Array<any> = Array<any>, R = any, D extends R | ContractTransactionResponse = R | ContractTransactionResponse> {
|
||||
(...args: ContractMethodArgs<A>): Promise<D>;
|
||||
/**
|
||||
* The name of the Contract method.
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* The fragment of the Contract method. This will throw on ambiguous
|
||||
* method names.
|
||||
*/
|
||||
fragment: FunctionFragment;
|
||||
/**
|
||||
* Returns the fragment constrained by %%args%%. This can be used to
|
||||
* resolve ambiguous method names.
|
||||
*/
|
||||
getFragment(...args: ContractMethodArgs<A>): FunctionFragment;
|
||||
/**
|
||||
* Returns a populated transaction that can be used to perform the
|
||||
* contract method with %%args%%.
|
||||
*/
|
||||
populateTransaction(...args: ContractMethodArgs<A>): Promise<ContractTransaction>;
|
||||
/**
|
||||
* Call the contract method with %%args%% and return the value.
|
||||
*
|
||||
* If the return value is a single type, it will be dereferenced and
|
||||
* returned directly, otherwise the full Result will be returned.
|
||||
*/
|
||||
staticCall(...args: ContractMethodArgs<A>): Promise<R>;
|
||||
/**
|
||||
* Send a transaction for the contract method with %%args%%.
|
||||
*/
|
||||
send(...args: ContractMethodArgs<A>): Promise<ContractTransactionResponse>;
|
||||
/**
|
||||
* Estimate the gas to send the contract method with %%args%%.
|
||||
*/
|
||||
estimateGas(...args: ContractMethodArgs<A>): Promise<bigint>;
|
||||
/**
|
||||
* Call the contract method with %%args%% and return the Result
|
||||
* without any dereferencing.
|
||||
*/
|
||||
staticCallResult(...args: ContractMethodArgs<A>): Promise<Result>;
|
||||
}
|
||||
/**
|
||||
* A contract method on a Contract.
|
||||
*/
|
||||
export interface ContractMethod<A extends Array<any> = Array<any>, R = any, D extends R | ContractTransactionResponse = R | ContractTransactionResponse> extends BaseContractMethod<A, R, D> {
|
||||
}
|
||||
/**
|
||||
* A pure of view method on a Contract.
|
||||
*/
|
||||
export interface ConstantContractMethod<A extends Array<any>, R = any> extends ContractMethod<A, R, R> {
|
||||
}
|
||||
/**
|
||||
* Each argument of an event is nullable (to indicate matching //any//.
|
||||
*
|
||||
* @_ignore:
|
||||
*/
|
||||
export type ContractEventArgs<A extends Array<any>> = {
|
||||
[I in keyof A]?: A[I] | Typed | null;
|
||||
};
|
||||
export interface ContractEvent<A extends Array<any> = Array<any>> {
|
||||
(...args: ContractEventArgs<A>): DeferredTopicFilter;
|
||||
/**
|
||||
* The name of the Contract event.
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* The fragment of the Contract event. This will throw on ambiguous
|
||||
* method names.
|
||||
*/
|
||||
fragment: EventFragment;
|
||||
/**
|
||||
* Returns the fragment constrained by %%args%%. This can be used to
|
||||
* resolve ambiguous event names.
|
||||
*/
|
||||
getFragment(...args: ContractEventArgs<A>): EventFragment;
|
||||
}
|
||||
/**
|
||||
* A Fallback or Receive function on a Contract.
|
||||
*/
|
||||
export interface WrappedFallback {
|
||||
(overrides?: Omit<TransactionRequest, "to">): Promise<ContractTransactionResponse>;
|
||||
/**
|
||||
* Returns a populated transaction that can be used to perform the
|
||||
* fallback method.
|
||||
*
|
||||
* For non-receive fallback, ``data`` may be overridden.
|
||||
*/
|
||||
populateTransaction(overrides?: Omit<TransactionRequest, "to">): Promise<ContractTransaction>;
|
||||
/**
|
||||
* Call the contract fallback and return the result.
|
||||
*
|
||||
* For non-receive fallback, ``data`` may be overridden.
|
||||
*/
|
||||
staticCall(overrides?: Omit<TransactionRequest, "to">): Promise<string>;
|
||||
/**
|
||||
* Send a transaction to the contract fallback.
|
||||
*
|
||||
* For non-receive fallback, ``data`` may be overridden.
|
||||
*/
|
||||
send(overrides?: Omit<TransactionRequest, "to">): Promise<ContractTransactionResponse>;
|
||||
/**
|
||||
* Estimate the gas to send a transaction to the contract fallback.
|
||||
*
|
||||
* For non-receive fallback, ``data`` may be overridden.
|
||||
*/
|
||||
estimateGas(overrides?: Omit<TransactionRequest, "to">): Promise<bigint>;
|
||||
}
|
||||
//# sourceMappingURL=types.d.ts.map
|
||||
1
dev/env/node_modules/ethers/lib.commonjs/contract/types.d.ts.map
generated
vendored
Executable file
1
dev/env/node_modules/ethers/lib.commonjs/contract/types.d.ts.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src.ts/contract/types.ts"],"names":[],"mappings":"AAAA,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E,IAAI,CAAC,kBAAkB,EAAE,IAAI,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAExE;;;;OAIG;IACH,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI,CAAC,kBAAkB,EAAE,IAAI,CAAC,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAAC;IAEvF;;;;OAIG;IACH,WAAW,CAAC,SAAS,CAAC,EAAE,IAAI,CAAC,kBAAkB,EAAE,IAAI,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAC5E"}
|
||||
6
dev/env/node_modules/ethers/lib.commonjs/contract/types.js
generated
vendored
Executable file
6
dev/env/node_modules/ethers/lib.commonjs/contract/types.js
generated
vendored
Executable file
@@ -0,0 +1,6 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
;
|
||||
;
|
||||
;
|
||||
//# sourceMappingURL=types.js.map
|
||||
1
dev/env/node_modules/ethers/lib.commonjs/contract/types.js.map
generated
vendored
Executable file
1
dev/env/node_modules/ethers/lib.commonjs/contract/types.js.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src.ts/contract/types.ts"],"names":[],"mappings":";;AAqCC,CAAC;AAsC4E,CAAC;AA4H9E,CAAC"}
|
||||
143
dev/env/node_modules/ethers/lib.commonjs/contract/wrappers.d.ts
generated
vendored
Executable file
143
dev/env/node_modules/ethers/lib.commonjs/contract/wrappers.d.ts
generated
vendored
Executable file
@@ -0,0 +1,143 @@
|
||||
import { Block, Log, TransactionReceipt, TransactionResponse } from "../providers/provider.js";
|
||||
import { EventPayload } from "../utils/index.js";
|
||||
import type { EventFragment, Interface, Result } from "../abi/index.js";
|
||||
import type { Listener } from "../utils/index.js";
|
||||
import type { Provider } from "../providers/index.js";
|
||||
import type { BaseContract } from "./contract.js";
|
||||
import type { ContractEventName } from "./types.js";
|
||||
/**
|
||||
* An **EventLog** contains additional properties parsed from the [[Log]].
|
||||
*/
|
||||
export declare class EventLog extends Log {
|
||||
/**
|
||||
* The Contract Interface.
|
||||
*/
|
||||
readonly interface: Interface;
|
||||
/**
|
||||
* The matching event.
|
||||
*/
|
||||
readonly fragment: EventFragment;
|
||||
/**
|
||||
* The parsed arguments passed to the event by ``emit``.
|
||||
*/
|
||||
readonly args: Result;
|
||||
/**
|
||||
* @_ignore:
|
||||
*/
|
||||
constructor(log: Log, iface: Interface, fragment: EventFragment);
|
||||
/**
|
||||
* The name of the event.
|
||||
*/
|
||||
get eventName(): string;
|
||||
/**
|
||||
* The signature of the event.
|
||||
*/
|
||||
get eventSignature(): string;
|
||||
}
|
||||
/**
|
||||
* An **EventLog** contains additional properties parsed from the [[Log]].
|
||||
*/
|
||||
export declare class UndecodedEventLog extends Log {
|
||||
/**
|
||||
* The error encounted when trying to decode the log.
|
||||
*/
|
||||
readonly error: Error;
|
||||
/**
|
||||
* @_ignore:
|
||||
*/
|
||||
constructor(log: Log, error: Error);
|
||||
}
|
||||
/**
|
||||
* A **ContractTransactionReceipt** includes the parsed logs from a
|
||||
* [[TransactionReceipt]].
|
||||
*/
|
||||
export declare class ContractTransactionReceipt extends TransactionReceipt {
|
||||
#private;
|
||||
/**
|
||||
* @_ignore:
|
||||
*/
|
||||
constructor(iface: Interface, provider: Provider, tx: TransactionReceipt);
|
||||
/**
|
||||
* The parsed logs for any [[Log]] which has a matching event in the
|
||||
* Contract ABI.
|
||||
*/
|
||||
get logs(): Array<EventLog | Log>;
|
||||
}
|
||||
/**
|
||||
* A **ContractTransactionResponse** will return a
|
||||
* [[ContractTransactionReceipt]] when waited on.
|
||||
*/
|
||||
export declare class ContractTransactionResponse extends TransactionResponse {
|
||||
#private;
|
||||
/**
|
||||
* @_ignore:
|
||||
*/
|
||||
constructor(iface: Interface, provider: Provider, tx: TransactionResponse);
|
||||
/**
|
||||
* Resolves once this transaction has been mined and has
|
||||
* %%confirms%% blocks including it (default: ``1``) with an
|
||||
* optional %%timeout%%.
|
||||
*
|
||||
* This can resolve to ``null`` only if %%confirms%% is ``0``
|
||||
* and the transaction has not been mined, otherwise this will
|
||||
* wait until enough confirmations have completed.
|
||||
*/
|
||||
wait(confirms?: number, timeout?: number): Promise<null | ContractTransactionReceipt>;
|
||||
}
|
||||
/**
|
||||
* A **ContractUnknownEventPayload** is included as the last parameter to
|
||||
* Contract Events when the event does not match any events in the ABI.
|
||||
*/
|
||||
export declare class ContractUnknownEventPayload extends EventPayload<ContractEventName> {
|
||||
/**
|
||||
* The log with no matching events.
|
||||
*/
|
||||
readonly log: Log;
|
||||
/**
|
||||
* @_event:
|
||||
*/
|
||||
constructor(contract: BaseContract, listener: null | Listener, filter: ContractEventName, log: Log);
|
||||
/**
|
||||
* Resolves to the block the event occured in.
|
||||
*/
|
||||
getBlock(): Promise<Block>;
|
||||
/**
|
||||
* Resolves to the transaction the event occured in.
|
||||
*/
|
||||
getTransaction(): Promise<TransactionResponse>;
|
||||
/**
|
||||
* Resolves to the transaction receipt the event occured in.
|
||||
*/
|
||||
getTransactionReceipt(): Promise<TransactionReceipt>;
|
||||
}
|
||||
/**
|
||||
* A **ContractEventPayload** is included as the last parameter to
|
||||
* Contract Events when the event is known.
|
||||
*/
|
||||
export declare class ContractEventPayload extends ContractUnknownEventPayload {
|
||||
/**
|
||||
* The matching event.
|
||||
*/
|
||||
readonly fragment: EventFragment;
|
||||
/**
|
||||
* The log, with parsed properties.
|
||||
*/
|
||||
readonly log: EventLog;
|
||||
/**
|
||||
* The parsed arguments passed to the event by ``emit``.
|
||||
*/
|
||||
readonly args: Result;
|
||||
/**
|
||||
* @_ignore:
|
||||
*/
|
||||
constructor(contract: BaseContract, listener: null | Listener, filter: ContractEventName, fragment: EventFragment, _log: Log);
|
||||
/**
|
||||
* The event name.
|
||||
*/
|
||||
get eventName(): string;
|
||||
/**
|
||||
* The event signature.
|
||||
*/
|
||||
get eventSignature(): string;
|
||||
}
|
||||
//# sourceMappingURL=wrappers.d.ts.map
|
||||
1
dev/env/node_modules/ethers/lib.commonjs/contract/wrappers.d.ts.map
generated
vendored
Executable file
1
dev/env/node_modules/ethers/lib.commonjs/contract/wrappers.d.ts.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"wrappers.d.ts","sourceRoot":"","sources":["../../src.ts/contract/wrappers.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,KAAK,EAAE,GAAG,EAAE,kBAAkB,EAAE,mBAAmB,EACtD,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAoB,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEnE,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACxE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,EACR,QAAQ,EACX,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEpD;;GAEG;AACH,qBAAa,QAAS,SAAQ,GAAG;IAC7B;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAG,SAAS,CAAC;IAE/B;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAG,aAAa,CAAC;IAElC;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAG,MAAM,CAAC;IAEvB;;OAEG;gBACS,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,aAAa;IAM/D;;OAEG;IACH,IAAI,SAAS,IAAI,MAAM,CAA+B;IAEtD;;OAEG;IACH,IAAI,cAAc,IAAI,MAAM,CAAmC;CAClE;AAED;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,GAAG;IAEtC;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAG,KAAK,CAAC;IAEvB;;OAEG;gBACS,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,KA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GAAG,QAAQ,EAAE,MAAM,EAAE,iBAAiB,EAAE,QAAQ,EAAE,aAAa,EAAE,IAAI,EAAE,GAAG;IAM5H;;OAEG;IACH,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED;;OAEG;IACH,IAAI,cAAc,IAAI,MAAM,CAE3B;CACJ"}
|
||||
186
dev/env/node_modules/ethers/lib.commonjs/contract/wrappers.js
generated
vendored
Executable file
186
dev/env/node_modules/ethers/lib.commonjs/contract/wrappers.js
generated
vendored
Executable file
@@ -0,0 +1,186 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ContractEventPayload = exports.ContractUnknownEventPayload = exports.ContractTransactionResponse = exports.ContractTransactionReceipt = exports.UndecodedEventLog = exports.EventLog = void 0;
|
||||
// import from provider.ts instead of index.ts to prevent circular dep
|
||||
// from EtherscanProvider
|
||||
const provider_js_1 = require("../providers/provider.js");
|
||||
const index_js_1 = require("../utils/index.js");
|
||||
/**
|
||||
* An **EventLog** contains additional properties parsed from the [[Log]].
|
||||
*/
|
||||
class EventLog extends provider_js_1.Log {
|
||||
/**
|
||||
* The Contract Interface.
|
||||
*/
|
||||
interface;
|
||||
/**
|
||||
* The matching event.
|
||||
*/
|
||||
fragment;
|
||||
/**
|
||||
* The parsed arguments passed to the event by ``emit``.
|
||||
*/
|
||||
args;
|
||||
/**
|
||||
* @_ignore:
|
||||
*/
|
||||
constructor(log, iface, fragment) {
|
||||
super(log, log.provider);
|
||||
const args = iface.decodeEventLog(fragment, log.data, log.topics);
|
||||
(0, index_js_1.defineProperties)(this, { args, fragment, interface: iface });
|
||||
}
|
||||
/**
|
||||
* The name of the event.
|
||||
*/
|
||||
get eventName() { return this.fragment.name; }
|
||||
/**
|
||||
* The signature of the event.
|
||||
*/
|
||||
get eventSignature() { return this.fragment.format(); }
|
||||
}
|
||||
exports.EventLog = EventLog;
|
||||
/**
|
||||
* An **EventLog** contains additional properties parsed from the [[Log]].
|
||||
*/
|
||||
class UndecodedEventLog extends provider_js_1.Log {
|
||||
/**
|
||||
* The error encounted when trying to decode the log.
|
||||
*/
|
||||
error;
|
||||
/**
|
||||
* @_ignore:
|
||||
*/
|
||||
constructor(log, error) {
|
||||
super(log, log.provider);
|
||||
(0, index_js_1.defineProperties)(this, { error });
|
||||
}
|
||||
}
|
||||
exports.UndecodedEventLog = UndecodedEventLog;
|
||||
/**
|
||||
* A **ContractTransactionReceipt** includes the parsed logs from a
|
||||
* [[TransactionReceipt]].
|
||||
*/
|
||||
class ContractTransactionReceipt extends provider_js_1.TransactionReceipt {
|
||||
#iface;
|
||||
/**
|
||||
* @_ignore:
|
||||
*/
|
||||
constructor(iface, provider, tx) {
|
||||
super(tx, provider);
|
||||
this.#iface = iface;
|
||||
}
|
||||
/**
|
||||
* The parsed logs for any [[Log]] which has a matching event in the
|
||||
* Contract ABI.
|
||||
*/
|
||||
get logs() {
|
||||
return super.logs.map((log) => {
|
||||
const fragment = log.topics.length ? this.#iface.getEvent(log.topics[0]) : null;
|
||||
if (fragment) {
|
||||
try {
|
||||
return new EventLog(log, this.#iface, fragment);
|
||||
}
|
||||
catch (error) {
|
||||
return new UndecodedEventLog(log, error);
|
||||
}
|
||||
}
|
||||
return log;
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.ContractTransactionReceipt = ContractTransactionReceipt;
|
||||
/**
|
||||
* A **ContractTransactionResponse** will return a
|
||||
* [[ContractTransactionReceipt]] when waited on.
|
||||
*/
|
||||
class ContractTransactionResponse extends provider_js_1.TransactionResponse {
|
||||
#iface;
|
||||
/**
|
||||
* @_ignore:
|
||||
*/
|
||||
constructor(iface, provider, tx) {
|
||||
super(tx, provider);
|
||||
this.#iface = iface;
|
||||
}
|
||||
/**
|
||||
* Resolves once this transaction has been mined and has
|
||||
* %%confirms%% blocks including it (default: ``1``) with an
|
||||
* optional %%timeout%%.
|
||||
*
|
||||
* This can resolve to ``null`` only if %%confirms%% is ``0``
|
||||
* and the transaction has not been mined, otherwise this will
|
||||
* wait until enough confirmations have completed.
|
||||
*/
|
||||
async wait(confirms, timeout) {
|
||||
const receipt = await super.wait(confirms, timeout);
|
||||
if (receipt == null) {
|
||||
return null;
|
||||
}
|
||||
return new ContractTransactionReceipt(this.#iface, this.provider, receipt);
|
||||
}
|
||||
}
|
||||
exports.ContractTransactionResponse = ContractTransactionResponse;
|
||||
/**
|
||||
* A **ContractUnknownEventPayload** is included as the last parameter to
|
||||
* Contract Events when the event does not match any events in the ABI.
|
||||
*/
|
||||
class ContractUnknownEventPayload extends index_js_1.EventPayload {
|
||||
/**
|
||||
* The log with no matching events.
|
||||
*/
|
||||
log;
|
||||
/**
|
||||
* @_event:
|
||||
*/
|
||||
constructor(contract, listener, filter, log) {
|
||||
super(contract, listener, filter);
|
||||
(0, index_js_1.defineProperties)(this, { log });
|
||||
}
|
||||
/**
|
||||
* Resolves to the block the event occured in.
|
||||
*/
|
||||
async getBlock() {
|
||||
return await this.log.getBlock();
|
||||
}
|
||||
/**
|
||||
* Resolves to the transaction the event occured in.
|
||||
*/
|
||||
async getTransaction() {
|
||||
return await this.log.getTransaction();
|
||||
}
|
||||
/**
|
||||
* Resolves to the transaction receipt the event occured in.
|
||||
*/
|
||||
async getTransactionReceipt() {
|
||||
return await this.log.getTransactionReceipt();
|
||||
}
|
||||
}
|
||||
exports.ContractUnknownEventPayload = ContractUnknownEventPayload;
|
||||
/**
|
||||
* A **ContractEventPayload** is included as the last parameter to
|
||||
* Contract Events when the event is known.
|
||||
*/
|
||||
class ContractEventPayload extends ContractUnknownEventPayload {
|
||||
/**
|
||||
* @_ignore:
|
||||
*/
|
||||
constructor(contract, listener, filter, fragment, _log) {
|
||||
super(contract, listener, filter, new EventLog(_log, contract.interface, fragment));
|
||||
const args = contract.interface.decodeEventLog(fragment, this.log.data, this.log.topics);
|
||||
(0, index_js_1.defineProperties)(this, { args, fragment });
|
||||
}
|
||||
/**
|
||||
* The event name.
|
||||
*/
|
||||
get eventName() {
|
||||
return this.fragment.name;
|
||||
}
|
||||
/**
|
||||
* The event signature.
|
||||
*/
|
||||
get eventSignature() {
|
||||
return this.fragment.format();
|
||||
}
|
||||
}
|
||||
exports.ContractEventPayload = ContractEventPayload;
|
||||
//# sourceMappingURL=wrappers.js.map
|
||||
1
dev/env/node_modules/ethers/lib.commonjs/contract/wrappers.js.map
generated
vendored
Executable file
1
dev/env/node_modules/ethers/lib.commonjs/contract/wrappers.js.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"wrappers.js","sourceRoot":"","sources":["../../src.ts/contract/wrappers.ts"],"names":[],"mappings":";;;AAAA,sEAAsE;AACtE,yBAAyB;AACzB,0DAEkC;AAClC,gDAAmE;AAWnE;;GAEG;AACH,MAAa,QAAS,SAAQ,iBAAG;IAC7B;;OAEG;IACM,SAAS,CAAa;IAE/B;;OAEG;IACM,QAAQ,CAAiB;IAElC;;OAEG;IACM,IAAI,CAAU;IAEvB;;OAEG;IACH,YAAY,GAAQ,EAAE,KAAgB,EAAE,QAAuB;QAC3D,KAAK,CAAC,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC;QACzB,MAAM,IAAI,GAAG,KAAK,CAAC,cAAc,CAAC,QAAQ,EAAE,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;QAClE,IAAA,2BAAgB,EAAW,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,CAAC;IAC3E,CAAC;IAED;;OAEG;IACH,IAAI,SAAS,KAAa,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;IAEtD;;OAEG;IACH,IAAI,cAAc,KAAa,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;CAClE;AAlCD,4BAkCC;AAED;;GAEG;AACH,MAAa,iBAAkB,SAAQ,iBAAG;IAEtC;;OAEG;IACM,KAAK,CAAS;IAEvB;;OAEG;IACH,YA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