/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
/**
* Globals
*/
///
///
declare type EventEmitter = import("events").EventEmitter;
declare type BN = import("bn.js");
declare type Web3 = import("web3").default;
declare type AbiItem = import("web3-utils").AbiItem;
declare type TransactionConfig = import("web3-core").TransactionConfig;
declare type PromiEvent = import("web3-core").PromiEvent;
declare type TransactionReceipt = import("web3-core").TransactionReceipt;
declare type Web3EventOptions = import("web3-eth-contract").EventOptions;
declare const assert: Chai.AssertStatic;
declare const expect: Chai.ExpectStatic;
declare const web3: Web3;
declare const artifacts: Truffle.Artifacts;
/**
* Global contract function
*/
interface ContractFunction extends Mocha.SuiteFunction {
(
title: string,
fn: (this: Mocha.Suite, accounts: Truffle.Accounts) => void
): Mocha.Suite;
only: ExclusiveContractFunction;
skip: PendingContractFunction;
}
interface ExclusiveContractFunction extends Mocha.ExclusiveSuiteFunction {
(
title: string,
fn: (this: Mocha.Suite, accounts: Truffle.Accounts) => void
): Mocha.Suite;
}
interface PendingContractFunction extends Mocha.PendingSuiteFunction {
(
title: string,
fn: (this: Mocha.Suite, accounts: Truffle.Accounts) => void
): Mocha.Suite | void;
}
declare const contract: ContractFunction;
/**
* Namespace
*/
declare namespace Truffle {
type Accounts = string[];
interface TransactionDetails {
from?: string;
gas?: BN | number | string;
gasPrice?: BN | number | string;
maxPriorityFeePerGas?: BN | number | string;
maxFeePerGas?: BN | number | string;
value?: BN | string;
}
export interface TransactionLog {
address: string;
event: EVENTS["name"];
args: EVENTS["args"];
blockHash: string;
blockNumber: number;
logIndex: number;
transactionHash: string;
transactionIndex: number;
type: string;
}
export interface TransactionResponse {
tx: string;
receipt: any;
logs: TransactionLog[];
}
export interface AnyEvent {
name: string;
args: any;
}
interface Contract extends ContractNew {
deployed(): Promise;
at(address: string): Promise;
link(name: string, address: string): void;
link(contract: Contract): void;
address: string;
contractName: string;
}
interface EventOptions {
filter?: Web3EventOptions["filter"];
fromBlock?: Web3EventOptions["fromBlock"];
topics?: Web3EventOptions["topics"];
}
interface ContractInstance {
address: string;
contract: any;
transactionHash: string;
abi: AbiItem[];
allEvents(params?: EventOptions): EventEmitter;
send(
value: Required["value"],
txParams?: TransactionConfig
): PromiEvent;
sendTransaction(
transactionConfig: TransactionConfig
): PromiEvent;
}
interface ContractNew {
"new"(...args: ARGs): any;
}
interface Deployer {
link(
library: Truffle.Contract,
destination: Truffle.Contract
): Deployer;
link(
library: Truffle.Contract,
destinations: Array>
): Deployer;
deploy(c: ContractNew, ...args: T): Deployer;
}
type Migration = (
deploy: Deployer,
network: string,
accounts: Accounts
) => void;
}