Built types and transpiles

This commit is contained in:
Tornado Contrib 2024-04-24 17:26:16 +00:00
parent 0bcd74311c
commit f66a622201
Signed by: tornadocontrib
GPG Key ID: 60B4DF1A076C64B1
51 changed files with 223381 additions and 0 deletions

1
dist/cli.d.ts vendored Normal file

@ -0,0 +1 @@
export {};

204422
dist/cli.js vendored Normal file

File diff suppressed because one or more lines are too long

2
dist/fonts/figletStandard.d.ts vendored Normal file

@ -0,0 +1,2 @@
export declare const figletStandard: string;
export default figletStandard;

2
dist/index.d.ts vendored Normal file

@ -0,0 +1,2 @@
export * from './services';
export * from './typechain';

7128
dist/index.js vendored Normal file

File diff suppressed because it is too large Load Diff

6995
dist/index.mjs vendored Normal file

File diff suppressed because it is too large Load Diff

1
dist/merkleTreeWorker.d.ts vendored Normal file

@ -0,0 +1 @@
export {};

51
dist/program.d.ts vendored Normal file

@ -0,0 +1,51 @@
import 'dotenv/config';
import { Command } from 'commander';
import { JsonRpcProvider, Provider, TransactionLike, Wallet, VoidSigner, BigNumberish } from 'ethers';
import { getProviderOptions, TornadoWallet, TornadoVoidSigner, Relayer, RelayerInfo, RelayerError, RelayerClient, fetchDataOptions, Config } from './services';
export type commonProgramOptions = {
rpc?: string;
ethRpc?: string;
graph?: string;
ethGraph?: string;
disableGraph?: boolean;
relayer?: string;
walletWithdrawal?: boolean;
torPort?: number;
token?: string;
viewOnly?: string;
mnemonic?: string;
mnemonicIndex?: number;
privateKey?: string;
nonInteractive?: boolean;
localRpc?: boolean;
};
export declare function promptConfirmation(nonInteractive?: boolean): Promise<void>;
export declare function getIPAddress(fetchDataOptions: fetchDataOptions): Promise<{
ip: any;
isTor: boolean;
}>;
export declare function getProgramOptions(options: commonProgramOptions): Promise<{
options: commonProgramOptions;
fetchDataOptions: fetchDataOptions;
}>;
export declare function getProgramGraphAPI(options: commonProgramOptions, config: Config): string;
export declare function getProgramProvider(netId: BigNumberish, rpcUrl: string | undefined, config: Config, providerOptions?: getProviderOptions): JsonRpcProvider;
export declare function getProgramSigner({ options, provider, }: {
options: commonProgramOptions;
provider: Provider;
}): TornadoVoidSigner | TornadoWallet | undefined;
export declare function getProgramRelayer({ options, fetchDataOptions, netId, }: {
options: commonProgramOptions;
fetchDataOptions?: fetchDataOptions;
netId: number | string;
}): Promise<{
validRelayers?: RelayerInfo[] | Relayer[];
invalidRelayers?: RelayerError[];
relayerClient?: RelayerClient;
}>;
export declare function programSendTransaction({ signer, options, populatedTransaction, }: {
signer: VoidSigner | Wallet;
options: commonProgramOptions;
populatedTransaction: TransactionLike;
}): Promise<void>;
export declare function tornadoProgram(): Command;

86
dist/services/batch.d.ts vendored Normal file

@ -0,0 +1,86 @@
import type { Provider, BlockTag, Block, TransactionResponse, BaseContract, ContractEventName, EventLog } from 'ethers';
export interface BatchBlockServiceConstructor {
provider: Provider;
onProgress?: BatchBlockOnProgress;
concurrencySize?: number;
batchSize?: number;
shouldRetry?: boolean;
retryMax?: number;
retryOn?: number;
}
export type BatchBlockOnProgress = ({ percentage, currentIndex, totalIndex, }: {
percentage: number;
currentIndex?: number;
totalIndex?: number;
}) => void;
/**
* Fetch blocks from web3 provider on batches
*/
export declare class BatchBlockService {
provider: Provider;
onProgress?: BatchBlockOnProgress;
concurrencySize: number;
batchSize: number;
shouldRetry: boolean;
retryMax: number;
retryOn: number;
constructor({ provider, onProgress, concurrencySize, batchSize, shouldRetry, retryMax, retryOn, }: BatchBlockServiceConstructor);
getBlock(blockTag: BlockTag): Promise<Block>;
createBatchRequest(batchArray: BlockTag[][]): Promise<Block[]>[];
getBatchBlocks(blocks: BlockTag[]): Promise<Block[]>;
}
/**
* Fetch transactions from web3 provider on batches
*/
export declare class BatchTransactionService {
provider: Provider;
onProgress?: BatchBlockOnProgress;
concurrencySize: number;
batchSize: number;
shouldRetry: boolean;
retryMax: number;
retryOn: number;
constructor({ provider, onProgress, concurrencySize, batchSize, shouldRetry, retryMax, retryOn, }: BatchBlockServiceConstructor);
getTransaction(txHash: string): Promise<TransactionResponse>;
createBatchRequest(batchArray: string[][]): Promise<TransactionResponse[]>[];
getBatchTransactions(txs: string[]): Promise<TransactionResponse[]>;
}
export interface BatchEventServiceConstructor {
provider: Provider;
contract: BaseContract;
onProgress?: BatchEventOnProgress;
concurrencySize?: number;
blocksPerRequest?: number;
shouldRetry?: boolean;
retryMax?: number;
retryOn?: number;
}
export type BatchEventOnProgress = ({ percentage, type, fromBlock, toBlock, count, }: {
percentage: number;
type?: ContractEventName;
fromBlock?: number;
toBlock?: number;
count?: number;
}) => void;
export type EventInput = {
fromBlock: number;
toBlock: number;
type: ContractEventName;
};
/**
* Fetch events from web3 provider on bulk
*/
export declare class BatchEventsService {
provider: Provider;
contract: BaseContract;
onProgress?: BatchEventOnProgress;
concurrencySize: number;
blocksPerRequest: number;
shouldRetry: boolean;
retryMax: number;
retryOn: number;
constructor({ provider, contract, onProgress, concurrencySize, blocksPerRequest, shouldRetry, retryMax, retryOn, }: BatchEventServiceConstructor);
getPastEvents({ fromBlock, toBlock, type }: EventInput): Promise<EventLog[]>;
createBatchRequest(batchArray: EventInput[]): Promise<EventLog[]>[];
getBatchEvents({ fromBlock, toBlock, type }: EventInput): Promise<EventLog[]>;
}

24
dist/services/data.d.ts vendored Normal file

@ -0,0 +1,24 @@
import { AsyncZippable, Unzipped } from 'fflate';
import { BaseEvents, MinimalEvents } from './events';
export declare function existsAsync(fileOrDir: string): Promise<boolean>;
export declare function zipAsync(file: AsyncZippable): Promise<Uint8Array>;
export declare function unzipAsync(data: Uint8Array): Promise<Unzipped>;
export declare function saveEvents<T extends MinimalEvents>({ name, userDirectory, events, }: {
name: string;
userDirectory: string;
events: T[];
}): Promise<void>;
export declare function loadSavedEvents<T extends MinimalEvents>({ name, userDirectory, deployedBlock, }: {
name: string;
userDirectory: string;
deployedBlock: number;
}): Promise<BaseEvents<T>>;
export declare function download({ name, cacheDirectory }: {
name: string;
cacheDirectory: string;
}): Promise<string>;
export declare function loadCachedEvents<T extends MinimalEvents>({ name, cacheDirectory, deployedBlock, }: {
name: string;
cacheDirectory: string;
deployedBlock: number;
}): Promise<BaseEvents<T>>;

73
dist/services/deposits.d.ts vendored Normal file

@ -0,0 +1,73 @@
export type DepositType = {
currency: string;
amount: string;
netId: string | number;
};
export type createDepositParams = {
nullifier: bigint;
secret: bigint;
};
export type createDepositObject = {
preimage: Uint8Array;
noteHex: string;
commitment: bigint;
commitmentHex: string;
nullifierHash: bigint;
nullifierHex: string;
};
export type createNoteParams = DepositType & {
nullifier?: bigint;
secret?: bigint;
};
export type parsedNoteExec = DepositType & {
note: string;
};
export type depositTx = {
from: string;
transactionHash: string;
};
export type withdrawalTx = {
to: string;
transactionHash: string;
};
export declare function createDeposit({ nullifier, secret }: createDepositParams): Promise<createDepositObject>;
export interface DepositConstructor {
currency: string;
amount: string;
netId: number;
nullifier: bigint;
secret: bigint;
note: string;
noteHex: string;
invoice: string;
commitmentHex: string;
nullifierHex: string;
}
export declare class Deposit {
currency: string;
amount: string;
netId: number;
nullifier: bigint;
secret: bigint;
note: string;
noteHex: string;
invoice: string;
commitmentHex: string;
nullifierHex: string;
constructor({ currency, amount, netId, nullifier, secret, note, noteHex, invoice, commitmentHex, nullifierHex, }: DepositConstructor);
toString(): string;
static createNote({ currency, amount, netId, nullifier, secret }: createNoteParams): Promise<Deposit>;
static parseNote(noteString: string): Promise<Deposit>;
}
export type parsedInvoiceExec = DepositType & {
commitment: string;
};
export declare class Invoice {
currency: string;
amount: string;
netId: number;
commitment: string;
invoice: string;
constructor(invoiceString: string);
toString(): string;
}

172
dist/services/events/base.d.ts vendored Normal file

@ -0,0 +1,172 @@
import { BaseContract, Provider, EventLog, ContractEventName } from 'ethers';
import type { Tornado, TornadoRouter, TornadoProxyLight, Governance, RelayerRegistry } from '@tornado/contracts';
import { BatchEventsService, BatchBlockService, BatchTransactionService, BatchEventOnProgress, BatchBlockOnProgress } from '../batch';
import { fetchDataOptions } from '../providers';
import type { BaseEvents, MinimalEvents, DepositsEvents, WithdrawalsEvents, EncryptedNotesEvents, GovernanceProposalCreatedEvents, GovernanceVotedEvents, GovernanceDelegatedEvents, GovernanceUndelegatedEvents, RegistersEvents } from './types';
export declare const DEPOSIT = "deposit";
export declare const WITHDRAWAL = "withdrawal";
export type BaseEventsServiceConstructor = {
netId: number | string;
provider: Provider;
graphApi?: string;
subgraphName?: string;
contract: BaseContract;
type?: string;
deployedBlock?: number;
fetchDataOptions?: fetchDataOptions;
};
export type BatchGraphOnProgress = ({ type, fromBlock, toBlock, count, }: {
type?: ContractEventName;
fromBlock?: number;
toBlock?: number;
count?: number;
}) => void;
export type BaseGraphParams = {
graphApi: string;
subgraphName: string;
fetchDataOptions?: fetchDataOptions;
onProgress?: BatchGraphOnProgress;
};
export declare class BaseEventsService<EventType extends MinimalEvents> {
netId: number | string;
provider: Provider;
graphApi?: string;
subgraphName?: string;
contract: BaseContract;
type: string;
deployedBlock: number;
batchEventsService: BatchEventsService;
fetchDataOptions?: fetchDataOptions;
constructor({ netId, provider, graphApi, subgraphName, contract, type, deployedBlock, fetchDataOptions, }: BaseEventsServiceConstructor);
getInstanceName(): string;
getType(): string;
getGraphMethod(): string;
getGraphParams(): BaseGraphParams;
updateEventProgress({ percentage, type, fromBlock, toBlock, count }: Parameters<BatchEventOnProgress>[0]): void;
updateBlockProgress({ percentage, currentIndex, totalIndex }: Parameters<BatchBlockOnProgress>[0]): void;
updateTransactionProgress({ percentage, currentIndex, totalIndex }: Parameters<BatchBlockOnProgress>[0]): void;
updateGraphProgress({ type, fromBlock, toBlock, count }: Parameters<BatchGraphOnProgress>[0]): void;
formatEvents(events: EventLog[]): Promise<EventType[]>;
/**
* Get saved or cached events
*/
getEventsFromDB(): Promise<BaseEvents<EventType>>;
getEventsFromCache(): Promise<BaseEvents<EventType>>;
getSavedEvents(): Promise<BaseEvents<EventType>>;
/**
* Get latest events
*/
getEventsFromGraph({ fromBlock, methodName, }: {
fromBlock: number;
methodName?: string;
}): Promise<BaseEvents<EventType>>;
getEventsFromRpc({ fromBlock, toBlock, }: {
fromBlock: number;
toBlock?: number;
}): Promise<BaseEvents<EventType>>;
getLatestEvents({ fromBlock }: {
fromBlock: number;
}): Promise<BaseEvents<EventType>>;
validateEvents({ events, lastBlock }: BaseEvents<EventType>): void;
/**
* Handle saving events
*/
saveEvents({ events, lastBlock }: BaseEvents<EventType>): Promise<void>;
/**
* Trigger saving and receiving latest events
*/
updateEvents(): Promise<{
events: EventType[];
lastBlock: number | null;
}>;
}
export type BaseDepositsServiceConstructor = {
netId: number | string;
provider: Provider;
graphApi?: string;
subgraphName?: string;
Tornado: Tornado;
type: string;
amount: string;
currency: string;
deployedBlock?: number;
fetchDataOptions?: fetchDataOptions;
};
export type DepositsGraphParams = BaseGraphParams & {
amount: string;
currency: string;
};
export declare class BaseDepositsService extends BaseEventsService<DepositsEvents | WithdrawalsEvents> {
amount: string;
currency: string;
batchTransactionService: BatchTransactionService;
batchBlockService: BatchBlockService;
constructor({ netId, provider, graphApi, subgraphName, Tornado, type, amount, currency, deployedBlock, fetchDataOptions, }: BaseDepositsServiceConstructor);
getInstanceName(): string;
getGraphMethod(): string;
getGraphParams(): DepositsGraphParams;
formatEvents(events: EventLog[]): Promise<(DepositsEvents | WithdrawalsEvents)[]>;
validateEvents({ events }: {
events: (DepositsEvents | WithdrawalsEvents)[];
}): void;
}
export type BaseEncryptedNotesServiceConstructor = {
netId: number | string;
provider: Provider;
graphApi?: string;
subgraphName?: string;
Router: TornadoRouter | TornadoProxyLight;
deployedBlock?: number;
fetchDataOptions?: fetchDataOptions;
};
export declare class BaseEncryptedNotesService extends BaseEventsService<EncryptedNotesEvents> {
constructor({ netId, provider, graphApi, subgraphName, Router, deployedBlock, fetchDataOptions, }: BaseEncryptedNotesServiceConstructor);
getInstanceName(): string;
getType(): string;
getGraphMethod(): string;
formatEvents(events: EventLog[]): Promise<EncryptedNotesEvents[]>;
}
export type BaseGovernanceEventTypes = GovernanceProposalCreatedEvents | GovernanceVotedEvents | GovernanceDelegatedEvents | GovernanceUndelegatedEvents;
export type BaseGovernanceServiceConstructor = {
netId: number | string;
provider: Provider;
graphApi?: string;
subgraphName?: string;
Governance: Governance;
deployedBlock?: number;
fetchDataOptions?: fetchDataOptions;
};
export declare class BaseGovernanceService extends BaseEventsService<BaseGovernanceEventTypes> {
batchTransactionService: BatchTransactionService;
constructor({ netId, provider, graphApi, subgraphName, Governance, deployedBlock, fetchDataOptions, }: BaseGovernanceServiceConstructor);
getInstanceName(): string;
getType(): string;
getGraphMethod(): string;
formatEvents(events: EventLog[]): Promise<BaseGovernanceEventTypes[]>;
getEventsFromGraph({ fromBlock }: {
fromBlock: number;
}): Promise<BaseEvents<BaseGovernanceEventTypes>>;
}
export type BaseRegistryServiceConstructor = {
netId: number | string;
provider: Provider;
graphApi?: string;
subgraphName?: string;
RelayerRegistry: RelayerRegistry;
deployedBlock?: number;
fetchDataOptions?: fetchDataOptions;
};
export declare class BaseRegistryService extends BaseEventsService<RegistersEvents> {
constructor({ netId, provider, graphApi, subgraphName, RelayerRegistry, deployedBlock, fetchDataOptions, }: BaseRegistryServiceConstructor);
getInstanceName(): string;
getType(): string;
getGraphMethod(): string;
formatEvents(events: EventLog[]): Promise<{
ensName: any;
relayerAddress: any;
blockNumber: number;
logIndex: number;
transactionHash: string;
}[]>;
fetchRelayers(): Promise<RegistersEvents[]>;
}

3
dist/services/events/index.d.ts vendored Normal file

@ -0,0 +1,3 @@
export * from './types';
export * from './base';
export * from './node';

62
dist/services/events/node.d.ts vendored Normal file

@ -0,0 +1,62 @@
import { BatchBlockOnProgress, BatchEventOnProgress } from '../batch';
import { BaseDepositsService, BaseEncryptedNotesService, BaseGovernanceService, BaseRegistryService, BaseDepositsServiceConstructor, BaseEncryptedNotesServiceConstructor, BaseGovernanceServiceConstructor, BaseRegistryServiceConstructor, BaseGovernanceEventTypes } from './base';
import type { BaseEvents, DepositsEvents, WithdrawalsEvents, EncryptedNotesEvents, RegistersEvents } from './types';
export type NodeDepositsServiceConstructor = BaseDepositsServiceConstructor & {
cacheDirectory?: string;
userDirectory?: string;
};
export declare class NodeDepositsService extends BaseDepositsService {
cacheDirectory?: string;
userDirectory?: string;
constructor({ netId, provider, graphApi, subgraphName, Tornado, type, amount, currency, deployedBlock, fetchDataOptions, cacheDirectory, userDirectory, }: NodeDepositsServiceConstructor);
updateEventProgress({ type, fromBlock, toBlock, count }: Parameters<BatchEventOnProgress>[0]): void;
updateTransactionProgress({ currentIndex, totalIndex }: Parameters<BatchBlockOnProgress>[0]): void;
updateBlockProgress({ currentIndex, totalIndex }: Parameters<BatchBlockOnProgress>[0]): void;
updateGraphProgress({ type, fromBlock, toBlock, count }: Parameters<BatchEventOnProgress>[0]): void;
getEventsFromDB(): Promise<BaseEvents<DepositsEvents | WithdrawalsEvents>>;
getEventsFromCache(): Promise<BaseEvents<DepositsEvents | WithdrawalsEvents>>;
saveEvents({ events, lastBlock }: BaseEvents<DepositsEvents | WithdrawalsEvents>): Promise<void>;
}
export type NodeEncryptedNotesServiceConstructor = BaseEncryptedNotesServiceConstructor & {
cacheDirectory?: string;
userDirectory?: string;
};
export declare class NodeEncryptedNotesService extends BaseEncryptedNotesService {
cacheDirectory?: string;
userDirectory?: string;
constructor({ netId, provider, graphApi, subgraphName, Router, deployedBlock, fetchDataOptions, cacheDirectory, userDirectory, }: NodeEncryptedNotesServiceConstructor);
updateEventProgress({ type, fromBlock, toBlock, count }: Parameters<BatchEventOnProgress>[0]): void;
updateGraphProgress({ type, fromBlock, toBlock, count }: Parameters<BatchEventOnProgress>[0]): void;
getEventsFromDB(): Promise<BaseEvents<EncryptedNotesEvents>>;
getEventsFromCache(): Promise<BaseEvents<EncryptedNotesEvents>>;
saveEvents({ events, lastBlock }: BaseEvents<EncryptedNotesEvents>): Promise<void>;
}
export type NodeGovernanceServiceConstructor = BaseGovernanceServiceConstructor & {
cacheDirectory?: string;
userDirectory?: string;
};
export declare class NodeGovernanceService extends BaseGovernanceService {
cacheDirectory?: string;
userDirectory?: string;
constructor({ netId, provider, graphApi, subgraphName, Governance, deployedBlock, fetchDataOptions, cacheDirectory, userDirectory, }: NodeGovernanceServiceConstructor);
updateEventProgress({ type, fromBlock, toBlock, count }: Parameters<BatchEventOnProgress>[0]): void;
updateGraphProgress({ type, fromBlock, toBlock, count }: Parameters<BatchEventOnProgress>[0]): void;
updateTransactionProgress({ currentIndex, totalIndex }: Parameters<BatchBlockOnProgress>[0]): void;
getEventsFromDB(): Promise<BaseEvents<BaseGovernanceEventTypes>>;
getEventsFromCache(): Promise<BaseEvents<BaseGovernanceEventTypes>>;
saveEvents({ events, lastBlock }: BaseEvents<BaseGovernanceEventTypes>): Promise<void>;
}
export type NodeRegistryServiceConstructor = BaseRegistryServiceConstructor & {
cacheDirectory?: string;
userDirectory?: string;
};
export declare class NodeRegistryService extends BaseRegistryService {
cacheDirectory?: string;
userDirectory?: string;
constructor({ netId, provider, graphApi, subgraphName, RelayerRegistry, deployedBlock, fetchDataOptions, cacheDirectory, userDirectory, }: NodeRegistryServiceConstructor);
updateEventProgress({ type, fromBlock, toBlock, count }: Parameters<BatchEventOnProgress>[0]): void;
updateGraphProgress({ type, fromBlock, toBlock, count }: Parameters<BatchEventOnProgress>[0]): void;
getEventsFromDB(): Promise<BaseEvents<RegistersEvents>>;
getEventsFromCache(): Promise<BaseEvents<RegistersEvents>>;
saveEvents({ events, lastBlock }: BaseEvents<RegistersEvents>): Promise<void>;
}

57
dist/services/events/types.d.ts vendored Normal file

@ -0,0 +1,57 @@
import { RelayerParams } from '../relayerClient';
export interface BaseEvents<T> {
events: T[];
lastBlock: number | null;
}
export interface BaseGraphEvents<T> {
events: T[];
lastSyncBlock: number;
}
export interface MinimalEvents {
blockNumber: number;
logIndex: number;
transactionHash: string;
}
export type GovernanceEvents = MinimalEvents & {
event: string;
};
export type GovernanceProposalCreatedEvents = GovernanceEvents & {
id: number;
proposer: string;
target: string;
startTime: number;
endTime: number;
description: string;
};
export type GovernanceVotedEvents = GovernanceEvents & {
proposalId: number;
voter: string;
support: boolean;
votes: string;
from: string;
input: string;
};
export type GovernanceDelegatedEvents = GovernanceEvents & {
account: string;
delegateTo: string;
};
export type GovernanceUndelegatedEvents = GovernanceEvents & {
account: string;
delegateFrom: string;
};
export type RegistersEvents = MinimalEvents & RelayerParams;
export type DepositsEvents = MinimalEvents & {
commitment: string;
leafIndex: number;
timestamp: number;
from: string;
};
export type WithdrawalsEvents = MinimalEvents & {
nullifierHash: string;
to: string;
fee: string;
timestamp: number;
};
export type EncryptedNotesEvents = MinimalEvents & {
encryptedNote: string;
};

45
dist/services/fees.d.ts vendored Normal file

@ -0,0 +1,45 @@
import type { BigNumberish, TransactionLike } from 'ethers';
import { OvmGasPriceOracle } from '../typechain';
/**
* Example:
*
* amountInWei (0.1 ETH) * tokenDecimals (18) * tokenPriceInWei (0.0008) = 125 TOKEN
*/
export declare function convertETHToTokenAmount(amountInWei: BigNumberish, tokenPriceInWei: BigNumberish, tokenDecimals?: number): bigint;
export interface RelayerFeeParams {
gasPrice: BigNumberish;
gasLimit?: BigNumberish;
l1Fee?: BigNumberish;
denomination: BigNumberish;
ethRefund: BigNumberish;
tokenPriceInWei: BigNumberish;
tokenDecimals: number;
relayerFeePercent?: number;
isEth?: boolean;
premiumPercent?: number;
}
export declare class TornadoFeeOracle {
ovmGasPriceOracle?: OvmGasPriceOracle;
constructor(ovmGasPriceOracle?: OvmGasPriceOracle);
/**
* Calculate L1 fee for op-stack chains
*
* This is required since relayers would pay the full transaction fees for users
*/
fetchL1OptimismFee(tx?: TransactionLike): Promise<bigint>;
/**
* We don't need to distinguish default refunds by tokens since most users interact with other defi protocols after withdrawal
* So we default with 1M gas which is enough for two or three swaps
* Using 30 gwei for default but it is recommended to supply cached gasPrice value from the UI
*/
defaultEthRefund(gasPrice?: BigNumberish, gasLimit?: BigNumberish): bigint;
/**
* Calculates token amount for required ethRefund purchases required to calculate fees
*/
calculateTokenAmount(ethRefund: BigNumberish, tokenPriceInEth: BigNumberish, tokenDecimals?: number): bigint;
/**
* Warning: For tokens you need to check if the fees are above denomination
* (Usually happens for small denomination pool or if the gas price is high)
*/
calculateRelayerFee({ gasPrice, gasLimit, l1Fee, denomination, ethRefund, tokenPriceInWei, tokenDecimals, relayerFeePercent, isEth, premiumPercent, }: RelayerFeeParams): bigint;
}

190
dist/services/graphql/index.d.ts vendored Normal file

@ -0,0 +1,190 @@
import { fetchDataOptions } from '../providers';
import type { BaseGraphEvents, RegistersEvents, DepositsEvents, WithdrawalsEvents, EncryptedNotesEvents, BatchGraphOnProgress } from '../events';
export * from './queries';
export type queryGraphParams = {
graphApi: string;
subgraphName: string;
query: string;
variables?: {
[key: string]: string | number;
};
fetchDataOptions?: fetchDataOptions;
};
export declare function queryGraph<T>({ graphApi, subgraphName, query, variables, fetchDataOptions, }: queryGraphParams): Promise<T>;
export interface GraphStatistic {
deposits: {
index: string;
timestamp: string;
blockNumber: string;
}[];
_meta: {
block: {
number: number;
};
hasIndexingErrors: boolean;
};
}
export interface getStatisticParams {
graphApi: string;
subgraphName: string;
currency: string;
amount: string;
fetchDataOptions?: fetchDataOptions;
}
export interface getStatisticReturns {
events: {
timestamp: number;
leafIndex: number;
blockNumber: number;
}[];
lastSyncBlock: null | number;
}
export declare function getStatistic({ graphApi, subgraphName, currency, amount, fetchDataOptions, }: getStatisticParams): Promise<getStatisticReturns>;
export interface GraphMeta {
_meta: {
block: {
number: number;
};
hasIndexingErrors: boolean;
};
}
export interface getMetaParams {
graphApi: string;
subgraphName: string;
fetchDataOptions?: fetchDataOptions;
}
export interface getMetaReturns {
lastSyncBlock: null | number;
hasIndexingErrors: null | boolean;
}
export declare function getMeta({ graphApi, subgraphName, fetchDataOptions }: getMetaParams): Promise<getMetaReturns>;
export interface GraphRegisters {
relayers: {
id: string;
address: string;
ensName: string;
blockRegistration: string;
}[];
_meta: {
block: {
number: number;
};
hasIndexingErrors: boolean;
};
}
export interface getRegistersParams {
graphApi: string;
subgraphName: string;
fromBlock: number;
fetchDataOptions?: fetchDataOptions;
onProgress?: BatchGraphOnProgress;
}
export declare function getRegisters({ graphApi, subgraphName, fromBlock, fetchDataOptions, }: getRegistersParams): Promise<GraphRegisters>;
export declare function getAllRegisters({ graphApi, subgraphName, fromBlock, fetchDataOptions, onProgress, }: getRegistersParams): Promise<BaseGraphEvents<RegistersEvents>>;
export interface GraphDeposits {
deposits: {
id: string;
blockNumber: string;
commitment: string;
index: string;
timestamp: string;
from: string;
}[];
_meta: {
block: {
number: number;
};
hasIndexingErrors: boolean;
};
}
export interface getDepositsParams {
graphApi: string;
subgraphName: string;
currency: string;
amount: string;
fromBlock: number;
fetchDataOptions?: fetchDataOptions;
onProgress?: BatchGraphOnProgress;
}
export declare function getDeposits({ graphApi, subgraphName, currency, amount, fromBlock, fetchDataOptions, }: getDepositsParams): Promise<GraphDeposits>;
export declare function getAllDeposits({ graphApi, subgraphName, currency, amount, fromBlock, fetchDataOptions, onProgress, }: getDepositsParams): Promise<BaseGraphEvents<DepositsEvents>>;
export interface GraphWithdrawals {
withdrawals: {
id: string;
blockNumber: string;
nullifier: string;
to: string;
fee: string;
timestamp: string;
}[];
_meta: {
block: {
number: number;
};
hasIndexingErrors: boolean;
};
}
export interface getWithdrawalParams {
graphApi: string;
subgraphName: string;
currency: string;
amount: string;
fromBlock: number;
fetchDataOptions?: fetchDataOptions;
onProgress?: BatchGraphOnProgress;
}
export declare function getWithdrawals({ graphApi, subgraphName, currency, amount, fromBlock, fetchDataOptions, }: getWithdrawalParams): Promise<GraphWithdrawals>;
export declare function getAllWithdrawals({ graphApi, subgraphName, currency, amount, fromBlock, fetchDataOptions, onProgress, }: getWithdrawalParams): Promise<BaseGraphEvents<WithdrawalsEvents>>;
export interface GraphNoteAccounts {
noteAccounts: {
id: string;
index: string;
address: string;
encryptedAccount: string;
}[];
_meta: {
block: {
number: number;
};
hasIndexingErrors: boolean;
};
}
export interface getNoteAccountsParams {
graphApi: string;
subgraphName: string;
address: string;
fetchDataOptions?: fetchDataOptions;
}
export interface getNoteAccountsReturns {
events: {
id: string;
index: string;
address: string;
encryptedAccount: string;
}[];
lastSyncBlock: null | number;
}
export declare function getNoteAccounts({ graphApi, subgraphName, address, fetchDataOptions, }: getNoteAccountsParams): Promise<getNoteAccountsReturns>;
export interface GraphEncryptedNotes {
encryptedNotes: {
blockNumber: string;
index: string;
transactionHash: string;
encryptedNote: string;
}[];
_meta: {
block: {
number: number;
};
hasIndexingErrors: boolean;
};
}
export interface getEncryptedNotesParams {
graphApi: string;
subgraphName: string;
fromBlock: number;
fetchDataOptions?: fetchDataOptions;
onProgress?: BatchGraphOnProgress;
}
export declare function getEncryptedNotes({ graphApi, subgraphName, fromBlock, fetchDataOptions, }: getEncryptedNotesParams): Promise<GraphEncryptedNotes>;
export declare function getAllEncryptedNotes({ graphApi, subgraphName, fromBlock, fetchDataOptions, onProgress, }: getEncryptedNotesParams): Promise<BaseGraphEvents<EncryptedNotesEvents>>;

7
dist/services/graphql/queries.d.ts vendored Normal file

@ -0,0 +1,7 @@
export declare const GET_STATISTIC = "\n query getStatistic($currency: String!, $amount: String!, $first: Int, $orderBy: BigInt, $orderDirection: String) {\n deposits(first: $first, orderBy: $orderBy, orderDirection: $orderDirection, where: { currency: $currency, amount: $amount }) {\n index\n timestamp\n blockNumber\n }\n _meta {\n block {\n number\n }\n hasIndexingErrors\n }\n }\n";
export declare const _META = "\n query getMeta {\n _meta {\n block {\n number\n }\n hasIndexingErrors\n }\n }\n";
export declare const GET_REGISTERED = "\n query getRegistered($first: Int, $fromBlock: Int) {\n relayers(first: $first, orderBy: blockRegistration, orderDirection: asc, where: {\n blockRegistration_gte: $fromBlock\n }) {\n id\n address\n ensName\n blockRegistration\n }\n _meta {\n block {\n number\n }\n hasIndexingErrors\n }\n }\n";
export declare const GET_DEPOSITS = "\n query getDeposits($currency: String!, $amount: String!, $first: Int, $fromBlock: Int) {\n deposits(first: $first, orderBy: index, orderDirection: asc, where: { \n amount: $amount,\n currency: $currency,\n blockNumber_gte: $fromBlock\n }) {\n id\n blockNumber\n commitment\n index\n timestamp\n from\n }\n _meta {\n block {\n number\n }\n hasIndexingErrors\n }\n }\n";
export declare const GET_WITHDRAWALS = "\n query getWithdrawals($currency: String!, $amount: String!, $first: Int, $fromBlock: Int!) {\n withdrawals(first: $first, orderBy: blockNumber, orderDirection: asc, where: { \n currency: $currency,\n amount: $amount,\n blockNumber_gte: $fromBlock\n }) {\n id\n blockNumber\n nullifier\n to\n fee\n timestamp\n }\n _meta {\n block {\n number\n }\n hasIndexingErrors\n }\n }\n";
export declare const GET_NOTE_ACCOUNTS = "\n query getNoteAccount($address: String!) {\n noteAccounts(where: { address: $address }) {\n id\n index\n address\n encryptedAccount\n }\n _meta {\n block {\n number\n }\n hasIndexingErrors\n }\n }\n";
export declare const GET_ENCRYPTED_NOTES = "\n query getEncryptedNotes($first: Int, $fromBlock: Int) {\n encryptedNotes(first: $first, orderBy: blockNumber, orderDirection: asc, where: { blockNumber_gte: $fromBlock }) {\n blockNumber\n index\n transactionHash\n encryptedNote\n }\n _meta {\n block {\n number\n }\n hasIndexingErrors\n }\n }\n";

19
dist/services/index.d.ts vendored Normal file

@ -0,0 +1,19 @@
export * from './events';
export * from './graphql';
export * from './schemas';
export * from './batch';
export * from './data';
export * from './deposits';
export * from './fees';
export * from './merkleTree';
export * from './mimc';
export * from './multicall';
export * from './networkConfig';
export * from './parser';
export * from './pedersen';
export * from './prices';
export * from './providers';
export * from './relayerClient';
export * from './tokens';
export * from './utils';
export * from './websnark';

29
dist/services/merkleTree.d.ts vendored Normal file

@ -0,0 +1,29 @@
import { MerkleTree, Element } from '@tornado/fixed-merkle-tree';
import type { Tornado } from '@tornado/contracts';
import type { DepositType } from './deposits';
import type { DepositsEvents } from './events';
export type MerkleTreeConstructor = DepositType & {
Tornado: Tornado;
commitment?: string;
merkleTreeHeight?: number;
emptyElement?: string;
merkleWorkerPath?: string;
};
export declare class MerkleTreeService {
currency: string;
amount: string;
netId: number;
Tornado: Tornado;
commitment?: string;
instanceName: string;
merkleTreeHeight: number;
emptyElement: string;
merkleWorkerPath?: string;
constructor({ netId, amount, currency, Tornado, commitment, merkleTreeHeight, emptyElement, merkleWorkerPath, }: MerkleTreeConstructor);
createTree({ events }: {
events: Element[];
}): Promise<MerkleTree>;
verifyTree({ events }: {
events: DepositsEvents[];
}): Promise<MerkleTree>;
}

14
dist/services/mimc.d.ts vendored Normal file

@ -0,0 +1,14 @@
import { MimcSponge } from 'circomlibjs';
import type { Element, HashFunction } from '@tornado/fixed-merkle-tree';
export declare class Mimc {
sponge?: MimcSponge;
hash?: HashFunction<Element>;
mimcPromise: Promise<void>;
constructor();
initMimc(): Promise<void>;
getHash(): Promise<{
sponge: MimcSponge | undefined;
hash: HashFunction<Element> | undefined;
}>;
}
export declare const mimc: Mimc;

11
dist/services/multicall.d.ts vendored Normal file

@ -0,0 +1,11 @@
import { BaseContract, Interface } from 'ethers';
import { Multicall } from '../typechain';
export interface Call3 {
contract?: BaseContract;
address?: string;
interface?: Interface;
name: string;
params?: any[];
allowFailure?: boolean;
}
export declare function multicall(Multicall: Multicall, calls: Call3[]): Promise<any[]>;

86
dist/services/networkConfig.d.ts vendored Normal file

@ -0,0 +1,86 @@
export interface RpcUrl {
name: string;
url: string;
}
export type RpcUrls = {
[key in string]: RpcUrl;
};
export interface SubgraphUrl {
name: string;
url: string;
}
export type SubgraphUrls = {
[key in string]: SubgraphUrl;
};
export type TornadoInstance = {
instanceAddress: {
[key in string]: string;
};
optionalInstances?: string[];
tokenAddress?: string;
tokenGasLimit?: number;
symbol: string;
decimals: number;
gasLimit?: number;
};
export type TokenInstances = {
[key in string]: TornadoInstance;
};
export type Config = {
rpcCallRetryAttempt?: number;
gasPrices: {
instant: number;
fast?: number;
standard?: number;
low?: number;
maxPriorityFeePerGas?: number;
};
nativeCurrency: string;
currencyName: string;
explorerUrl: {
tx: string;
address: string;
block: string;
};
merkleTreeHeight: number;
emptyElement: string;
networkName: string;
deployedBlock: number;
rpcUrls: RpcUrls;
multicall: string;
routerContract: string;
registryContract?: string;
echoContract: string;
aggregatorContract?: string;
reverseRecordsContract?: string;
gasPriceOracleContract?: string;
gasStationApi?: string;
ovmGasPriceOracleContract?: string;
tornadoSubgraph: string;
registrySubgraph?: string;
subgraphs: SubgraphUrls;
tokens: TokenInstances;
optionalTokens?: string[];
ensSubdomainKey: string;
pollInterval: number;
constants: {
GOVERNANCE_BLOCK?: number;
NOTE_ACCOUNT_BLOCK?: number;
ENCRYPTED_NOTES_BLOCK?: number;
REGISTRY_BLOCK?: number;
MINING_BLOCK_TIME?: number;
};
'torn.contract.tornadocash.eth'?: string;
'governance.contract.tornadocash.eth'?: string;
'staking-rewards.contract.tornadocash.eth'?: string;
'tornado-router.contract.tornadocash.eth'?: string;
'tornado-proxy-light.contract.tornadocash.eth'?: string;
};
export type networkConfig = {
[key in string]: Config;
};
export declare const blockSyncInterval = 10000;
export declare const enabledChains: string[];
export declare const networkConfig: networkConfig;
export declare const subdomains: string[];
export default networkConfig;

6
dist/services/parser.d.ts vendored Normal file

@ -0,0 +1,6 @@
export declare function parseNumber(value?: string | number): number;
export declare function parseUrl(value?: string): string;
export declare function parseRelayer(value?: string): string;
export declare function parseAddress(value?: string): string;
export declare function parseMnemonic(value?: string): string;
export declare function parseKey(value?: string): string;

12
dist/services/pedersen.d.ts vendored Normal file

@ -0,0 +1,12 @@
import { BabyJub, PedersenHash, Point } from 'circomlibjs';
export declare class Pedersen {
pedersenHash?: PedersenHash;
babyJub?: BabyJub;
pedersenPromise: Promise<void>;
constructor();
initPedersen(): Promise<void>;
unpackPoint(buffer: Uint8Array): Promise<Point | undefined>;
toStringBuffer(buffer: Uint8Array): string;
}
export declare const pedersen: Pedersen;
export declare function buffPedersenHash(buffer: Uint8Array): Promise<string>;

9
dist/services/prices.d.ts vendored Normal file

@ -0,0 +1,9 @@
import { type Provider } from 'ethers';
import type { OffchainOracle, Multicall } from '../typechain';
export declare class TokenPriceOracle {
oracle?: OffchainOracle;
multicall: Multicall;
provider: Provider;
constructor(provider: Provider, multicall: Multicall, oracle?: OffchainOracle);
fetchPrices(tokens: string[]): Promise<bigint[]>;
}

93
dist/services/providers.d.ts vendored Normal file

@ -0,0 +1,93 @@
/// <reference types="node" />
/// <reference types="node" />
/// <reference types="node" />
import type { EventEmitter } from 'stream';
import type { RequestOptions } from 'http';
import { JsonRpcApiProvider, JsonRpcProvider, Wallet, FetchGetUrlFunc, Provider, SigningKey, TransactionRequest, JsonRpcSigner, BrowserProvider, Networkish, Eip1193Provider, VoidSigner, FetchUrlFeeDataNetworkPlugin, BigNumberish } from 'ethers';
import type { RequestInfo, RequestInit, Response, HeadersInit } from 'node-fetch';
import type { Config } from './networkConfig';
declare global {
interface Window {
ethereum?: Eip1193Provider & EventEmitter;
}
}
export declare const defaultUserAgent = "Mozilla/5.0 (Windows NT 10.0; rv:109.0) Gecko/20100101 Firefox/115.0";
export declare const fetch: nodeFetch;
export type nodeFetch = (url: RequestInfo, init?: RequestInit) => Promise<Response>;
export type fetchDataOptions = RequestInit & {
headers?: HeadersInit | any;
maxRetry?: number;
retryOn?: number;
userAgent?: string;
timeout?: number;
proxy?: string;
torPort?: number;
debug?: Function;
returnResponse?: boolean;
};
export type NodeAgent = RequestOptions['agent'] | ((parsedUrl: URL) => RequestOptions['agent']);
export declare function getHttpAgent({ fetchUrl, proxyUrl, torPort, retry, }: {
fetchUrl: string;
proxyUrl?: string;
torPort?: number;
retry: number;
}): NodeAgent | undefined;
export declare function fetchData(url: string, options?: fetchDataOptions): Promise<any>;
export declare const fetchGetUrlFunc: (options?: fetchDataOptions) => FetchGetUrlFunc;
export type getProviderOptions = fetchDataOptions & {
pollingInterval?: number;
gasPriceOracle?: string;
gasStationApi?: string;
};
export declare function getGasOraclePlugin(networkKey: string, fetchOptions?: getProviderOptions): FetchUrlFeeDataNetworkPlugin;
export declare function getProvider(rpcUrl: string, fetchOptions?: getProviderOptions): Promise<JsonRpcProvider>;
export declare function getProviderWithNetId(netId: BigNumberish, rpcUrl: string, config: Config, fetchOptions?: getProviderOptions): JsonRpcProvider;
export declare const populateTransaction: (signer: TornadoWallet | TornadoVoidSigner | TornadoRpcSigner, tx: TransactionRequest) => Promise<TransactionRequest>;
export type TornadoWalletOptions = {
gasPriceBump?: number;
gasLimitBump?: number;
gasFailover?: boolean;
bumpNonce?: boolean;
};
export declare class TornadoWallet extends Wallet {
nonce?: number | null;
gasPriceBump: number;
gasLimitBump: number;
gasFailover: boolean;
bumpNonce: boolean;
constructor(key: string | SigningKey, provider?: null | Provider, { gasPriceBump, gasLimitBump, gasFailover, bumpNonce }?: TornadoWalletOptions);
static fromMnemonic(mneomnic: string, provider: Provider, index?: number, options?: TornadoWalletOptions): TornadoWallet;
populateTransaction(tx: TransactionRequest): Promise<import("ethers").TransactionLike<string>>;
}
export declare class TornadoVoidSigner extends VoidSigner {
nonce?: number | null;
gasPriceBump: number;
gasLimitBump: number;
gasFailover: boolean;
bumpNonce: boolean;
constructor(address: string, provider?: null | Provider, { gasPriceBump, gasLimitBump, gasFailover, bumpNonce }?: TornadoWalletOptions);
populateTransaction(tx: TransactionRequest): Promise<import("ethers").TransactionLike<string>>;
}
export declare class TornadoRpcSigner extends JsonRpcSigner {
nonce?: number | null;
gasPriceBump: number;
gasLimitBump: number;
gasFailover: boolean;
bumpNonce: boolean;
constructor(provider: JsonRpcApiProvider, address: string, { gasPriceBump, gasLimitBump, gasFailover, bumpNonce }?: TornadoWalletOptions);
sendUncheckedTransaction(tx: TransactionRequest): Promise<string>;
}
export type connectWalletFunc = (...args: any[]) => Promise<void>;
export type handleWalletFunc = (...args: any[]) => void;
export type TornadoBrowserProviderOptions = TornadoWalletOptions & {
webChainId?: BigNumberish;
connectWallet?: connectWalletFunc;
handleNetworkChanges?: handleWalletFunc;
handleAccountChanges?: handleWalletFunc;
handleAccountDisconnect?: handleWalletFunc;
};
export declare class TornadoBrowserProvider extends BrowserProvider {
options?: TornadoBrowserProviderOptions;
constructor(ethereum: Eip1193Provider, network?: Networkish, options?: TornadoBrowserProviderOptions);
getSigner(address: string): Promise<TornadoRpcSigner>;
}

118
dist/services/relayerClient.d.ts vendored Normal file

@ -0,0 +1,118 @@
import type { Aggregator } from '@tornado/contracts';
import type { RelayerStructOutput } from '@tornado/contracts/dist/contracts/Governance/Aggregator/Aggregator';
import type { Config } from './networkConfig';
import { fetchDataOptions } from './providers';
import type { snarkProofs } from './websnark';
export declare const MIN_STAKE_BALANCE: bigint;
export interface RelayerParams {
ensName: string;
relayerAddress?: string;
}
export interface Relayer {
netId: number;
url: string;
rewardAccount: string;
currentQueue: number;
tornadoServiceFee: number;
}
export type RelayerInfo = Relayer & {
hostname: string;
ensName: string;
stakeBalance: bigint;
relayerAddress: string;
ethPrices?: {
[key in string]: string;
};
};
export type RelayerError = {
hostname: string;
relayerAddress?: string;
errorMessage?: string;
};
export interface RelayerStatus {
url: string;
rewardAccount: string;
instances: {
[key in string]: {
instanceAddress: {
[key in string]: string;
};
tokenAddress?: string;
symbol: string;
decimals: number;
};
};
gasPrices?: {
fast: number;
additionalProperties?: number;
};
netId: number;
ethPrices?: {
[key in string]: string;
};
tornadoServiceFee: number;
latestBlock?: number;
version: string;
health: {
status: string;
error: string;
errorsLog: any[];
};
currentQueue: number;
}
export interface RelayerTornadoWithdraw {
id?: string;
error?: string;
}
export interface RelayerTornadoJobs {
error?: string;
id: string;
type?: string;
status: string;
contract?: string;
proof?: string;
args?: string[];
txHash?: string;
confirmations?: number;
failedReason?: string;
}
export interface semanticVersion {
major: string;
minor: string;
patch: string;
prerelease?: string;
buildmetadata?: string;
}
export declare function parseSemanticVersion(version: string): semanticVersion;
export declare function isRelayerUpdated(relayerVersion: string, netId: number | string): boolean;
export declare function calculateScore({ stakeBalance, tornadoServiceFee }: RelayerInfo, minFee?: number, maxFee?: number): bigint;
export declare function getWeightRandom(weightsScores: bigint[], random: bigint): number;
export declare function pickWeightedRandomRelayer(relayers: RelayerInfo[], netId: string | number): RelayerInfo;
export interface RelayerClientConstructor {
netId: number | string;
config: Config;
Aggregator: Aggregator;
fetchDataOptions?: fetchDataOptions;
}
export type RelayerClientWithdraw = snarkProofs & {
contract: string;
};
export declare class RelayerClient {
netId: number;
config: Config;
Aggregator: Aggregator;
selectedRelayer?: Relayer;
fetchDataOptions?: fetchDataOptions;
constructor({ netId, config, Aggregator, fetchDataOptions }: RelayerClientConstructor);
askRelayerStatus({ hostname, relayerAddress, }: {
hostname: string;
relayerAddress?: string;
}): Promise<RelayerStatus>;
filterRelayer(curr: RelayerStructOutput, relayer: RelayerParams, subdomains: string[], debugRelayer?: boolean): Promise<RelayerInfo | RelayerError>;
getValidRelayers(relayers: RelayerParams[], subdomains: string[], debugRelayer?: boolean): Promise<{
validRelayers: RelayerInfo[];
invalidRelayers: RelayerError[];
}>;
pickWeightedRandomRelayer(relayers: RelayerInfo[]): RelayerInfo;
tornadoWithdraw({ contract, proof, args }: RelayerClientWithdraw): Promise<void>;
}

4
dist/services/schemas/index.d.ts vendored Normal file

@ -0,0 +1,4 @@
import Ajv from 'ajv';
export declare const ajv: Ajv;
export * from './status';
export * from './jobs';

40
dist/services/schemas/jobs.d.ts vendored Normal file

@ -0,0 +1,40 @@
export type jobsSchema = {
type: string;
properties: {
error: {
type: string;
};
id: {
type: string;
};
type: {
type: string;
};
status: {
type: string;
};
contract: {
type: string;
};
proof: {
type: string;
};
args: {
type: string;
items: {
type: string;
};
};
txHash: {
type: string;
};
confirmations: {
type: string;
};
failedReason: {
type: string;
};
};
required: string[];
};
export declare const jobsSchema: jobsSchema;

92
dist/services/schemas/status.d.ts vendored Normal file

@ -0,0 +1,92 @@
import type { Config } from '../networkConfig';
export type statusInstanceType = {
type: string;
properties: {
instanceAddress: {
type: string;
properties: {
[key in string]: typeof addressType;
};
required: string[];
};
tokenAddress?: typeof addressType;
symbol?: {
enum: string[];
};
decimals: {
enum: number[];
};
};
required: string[];
};
export type statusInstancesType = {
type: string;
properties: {
[key in string]: statusInstanceType;
};
required: string[];
};
export type statusEthPricesType = {
type: string;
properties: {
[key in string]: typeof bnType;
};
required?: string[];
};
export type statusSchema = {
type: string;
properties: {
rewardAccount: typeof addressType;
instances?: statusInstancesType;
gasPrices: {
type: string;
properties: {
[key in string]: {
type: string;
};
};
required: string[];
};
netId: {
type: string;
};
ethPrices?: statusEthPricesType;
tornadoServiceFee?: {
type: string;
maximum: number;
minimum: number;
};
latestBlock?: {
type: string;
};
version: {
type: string;
};
health: {
type: string;
properties: {
status: {
const: string;
};
error: {
type: string;
};
};
required: string[];
};
currentQueue: {
type: string;
};
};
required: string[];
};
declare const addressType: {
type: string;
pattern: string;
};
declare const bnType: {
type: string;
BN: boolean;
};
export declare function getStatusSchema(netId: number | string, config: Config): statusSchema;
export {};

16
dist/services/tokens.d.ts vendored Normal file

@ -0,0 +1,16 @@
import { Provider } from 'ethers';
import { Multicall } from '../typechain';
export interface tokenBalances {
address: string;
name: string;
symbol: string;
decimals: number;
balance: bigint;
}
export declare function getTokenBalances({ provider, Multicall, currencyName, userAddress, tokenAddresses, }: {
provider: Provider;
Multicall: Multicall;
currencyName: string;
userAddress: string;
tokenAddresses: string[];
}): Promise<tokenBalances[]>;

22
dist/services/utils.d.ts vendored Normal file

@ -0,0 +1,22 @@
/// <reference types="node" />
import BN from 'bn.js';
import type { BigNumberish } from 'ethers';
type bnInput = number | string | number[] | Uint8Array | Buffer | BN;
export declare const isNode: boolean;
export declare const chunk: <T>(arr: T[], size: number) => T[][];
export declare function sleep(ms: number): Promise<unknown>;
export declare function validateUrl(url: string, protocols?: string[]): boolean;
export declare function bufferToBytes(b: Buffer): Uint8Array;
export declare function bytesToBase64(bytes: Uint8Array): string;
export declare function base64ToBytes(base64: string): Uint8Array;
export declare function bytesToHex(bytes: Uint8Array): string;
export declare function bytesToBN(bytes: Uint8Array): bigint;
export declare function bnToBytes(bigint: bigint | string): Uint8Array;
export declare function leBuff2Int(bytes: Uint8Array): BN;
export declare function leInt2Buff(bigint: bnInput | bigint): Uint8Array;
export declare function toFixedHex(numberish: BigNumberish, length?: number): string;
export declare function toFixedLength(string: string, length?: number): string;
export declare function rBigInt(nbytes?: number): bigint;
export declare function bigIntReplacer(key: any, value: any): any;
export declare function substring(str: string, length?: number): string;
export {};

27
dist/services/websnark.d.ts vendored Normal file

@ -0,0 +1,27 @@
import type { Element } from '@tornado/fixed-merkle-tree';
import type { AddressLike, BytesLike, BigNumberish } from 'ethers';
export type snarkInputs = {
root: Element;
nullifierHex: string;
recipient: AddressLike;
relayer: AddressLike;
fee: bigint;
refund: bigint;
nullifier: bigint;
secret: bigint;
pathElements: Element[];
pathIndices: Element[];
};
export type snarkArgs = [
_root: BytesLike,
_nullifierHash: BytesLike,
_recipient: AddressLike,
_relayer: AddressLike,
_fee: BigNumberish,
_refund: BigNumberish
];
export type snarkProofs = {
proof: BytesLike;
args: snarkArgs;
};
export declare function calculateSnarkProof(input: snarkInputs, circuit: object, provingKey: ArrayBuffer): Promise<snarkProofs>;

423
dist/typechain/ENS.d.ts vendored Normal file

@ -0,0 +1,423 @@
import type { BaseContract, BigNumberish, BytesLike, FunctionFragment, Result, Interface, EventFragment, AddressLike, ContractRunner, ContractMethod, Listener } from "ethers";
import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedLogDescription, TypedListener, TypedContractMethod } from "./common";
export interface ENSInterface extends Interface {
getFunction(nameOrSignature: "supportsInterface" | "setText" | "interfaceImplementer" | "ABI" | "setPubkey" | "setContenthash" | "addr(bytes32)" | "addr(bytes32,uint256)" | "setAuthorisation" | "text" | "setABI" | "name" | "setName" | "setAddr(bytes32,uint256,bytes)" | "setAddr(bytes32,address)" | "contenthash" | "pubkey" | "setInterface" | "authorisations"): FunctionFragment;
getEvent(nameOrSignatureOrTopic: "AuthorisationChanged" | "TextChanged" | "PubkeyChanged" | "NameChanged" | "InterfaceChanged" | "ContenthashChanged" | "AddrChanged" | "AddressChanged" | "ABIChanged"): EventFragment;
encodeFunctionData(functionFragment: "supportsInterface", values: [BytesLike]): string;
encodeFunctionData(functionFragment: "setText", values: [BytesLike, string, string]): string;
encodeFunctionData(functionFragment: "interfaceImplementer", values: [BytesLike, BytesLike]): string;
encodeFunctionData(functionFragment: "ABI", values: [BytesLike, BigNumberish]): string;
encodeFunctionData(functionFragment: "setPubkey", values: [BytesLike, BytesLike, BytesLike]): string;
encodeFunctionData(functionFragment: "setContenthash", values: [BytesLike, BytesLike]): string;
encodeFunctionData(functionFragment: "addr(bytes32)", values: [BytesLike]): string;
encodeFunctionData(functionFragment: "addr(bytes32,uint256)", values: [BytesLike, BigNumberish]): string;
encodeFunctionData(functionFragment: "setAuthorisation", values: [BytesLike, AddressLike, boolean]): string;
encodeFunctionData(functionFragment: "text", values: [BytesLike, string]): string;
encodeFunctionData(functionFragment: "setABI", values: [BytesLike, BigNumberish, BytesLike]): string;
encodeFunctionData(functionFragment: "name", values: [BytesLike]): string;
encodeFunctionData(functionFragment: "setName", values: [BytesLike, string]): string;
encodeFunctionData(functionFragment: "setAddr(bytes32,uint256,bytes)", values: [BytesLike, BigNumberish, BytesLike]): string;
encodeFunctionData(functionFragment: "setAddr(bytes32,address)", values: [BytesLike, AddressLike]): string;
encodeFunctionData(functionFragment: "contenthash", values: [BytesLike]): string;
encodeFunctionData(functionFragment: "pubkey", values: [BytesLike]): string;
encodeFunctionData(functionFragment: "setInterface", values: [BytesLike, BytesLike, AddressLike]): string;
encodeFunctionData(functionFragment: "authorisations", values: [BytesLike, AddressLike, AddressLike]): string;
decodeFunctionResult(functionFragment: "supportsInterface", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "setText", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "interfaceImplementer", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "ABI", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "setPubkey", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "setContenthash", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "addr(bytes32)", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "addr(bytes32,uint256)", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "setAuthorisation", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "text", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "setABI", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "name", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "setName", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "setAddr(bytes32,uint256,bytes)", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "setAddr(bytes32,address)", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "contenthash", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "pubkey", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "setInterface", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "authorisations", data: BytesLike): Result;
}
export declare namespace AuthorisationChangedEvent {
type InputTuple = [
node: BytesLike,
owner: AddressLike,
target: AddressLike,
isAuthorised: boolean
];
type OutputTuple = [
node: string,
owner: string,
target: string,
isAuthorised: boolean
];
interface OutputObject {
node: string;
owner: string;
target: string;
isAuthorised: boolean;
}
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
type Filter = TypedDeferredTopicFilter<Event>;
type Log = TypedEventLog<Event>;
type LogDescription = TypedLogDescription<Event>;
}
export declare namespace TextChangedEvent {
type InputTuple = [node: BytesLike, indexedKey: string, key: string];
type OutputTuple = [node: string, indexedKey: string, key: string];
interface OutputObject {
node: string;
indexedKey: string;
key: string;
}
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
type Filter = TypedDeferredTopicFilter<Event>;
type Log = TypedEventLog<Event>;
type LogDescription = TypedLogDescription<Event>;
}
export declare namespace PubkeyChangedEvent {
type InputTuple = [node: BytesLike, x: BytesLike, y: BytesLike];
type OutputTuple = [node: string, x: string, y: string];
interface OutputObject {
node: string;
x: string;
y: string;
}
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
type Filter = TypedDeferredTopicFilter<Event>;
type Log = TypedEventLog<Event>;
type LogDescription = TypedLogDescription<Event>;
}
export declare namespace NameChangedEvent {
type InputTuple = [node: BytesLike, name: string];
type OutputTuple = [node: string, name: string];
interface OutputObject {
node: string;
name: string;
}
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
type Filter = TypedDeferredTopicFilter<Event>;
type Log = TypedEventLog<Event>;
type LogDescription = TypedLogDescription<Event>;
}
export declare namespace InterfaceChangedEvent {
type InputTuple = [
node: BytesLike,
interfaceID: BytesLike,
implementer: AddressLike
];
type OutputTuple = [
node: string,
interfaceID: string,
implementer: string
];
interface OutputObject {
node: string;
interfaceID: string;
implementer: string;
}
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
type Filter = TypedDeferredTopicFilter<Event>;
type Log = TypedEventLog<Event>;
type LogDescription = TypedLogDescription<Event>;
}
export declare namespace ContenthashChangedEvent {
type InputTuple = [node: BytesLike, hash: BytesLike];
type OutputTuple = [node: string, hash: string];
interface OutputObject {
node: string;
hash: string;
}
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
type Filter = TypedDeferredTopicFilter<Event>;
type Log = TypedEventLog<Event>;
type LogDescription = TypedLogDescription<Event>;
}
export declare namespace AddrChangedEvent {
type InputTuple = [node: BytesLike, a: AddressLike];
type OutputTuple = [node: string, a: string];
interface OutputObject {
node: string;
a: string;
}
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
type Filter = TypedDeferredTopicFilter<Event>;
type Log = TypedEventLog<Event>;
type LogDescription = TypedLogDescription<Event>;
}
export declare namespace AddressChangedEvent {
type InputTuple = [
node: BytesLike,
coinType: BigNumberish,
newAddress: BytesLike
];
type OutputTuple = [
node: string,
coinType: bigint,
newAddress: string
];
interface OutputObject {
node: string;
coinType: bigint;
newAddress: string;
}
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
type Filter = TypedDeferredTopicFilter<Event>;
type Log = TypedEventLog<Event>;
type LogDescription = TypedLogDescription<Event>;
}
export declare namespace ABIChangedEvent {
type InputTuple = [node: BytesLike, contentType: BigNumberish];
type OutputTuple = [node: string, contentType: bigint];
interface OutputObject {
node: string;
contentType: bigint;
}
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
type Filter = TypedDeferredTopicFilter<Event>;
type Log = TypedEventLog<Event>;
type LogDescription = TypedLogDescription<Event>;
}
export interface ENS extends BaseContract {
connect(runner?: ContractRunner | null): ENS;
waitForDeployment(): Promise<this>;
interface: ENSInterface;
queryFilter<TCEvent extends TypedContractEvent>(event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TypedEventLog<TCEvent>>>;
queryFilter<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TypedEventLog<TCEvent>>>;
on<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>;
on<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, listener: TypedListener<TCEvent>): Promise<this>;
once<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>;
once<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, listener: TypedListener<TCEvent>): Promise<this>;
listeners<TCEvent extends TypedContractEvent>(event: TCEvent): Promise<Array<TypedListener<TCEvent>>>;
listeners(eventName?: string): Promise<Array<Listener>>;
removeAllListeners<TCEvent extends TypedContractEvent>(event?: TCEvent): Promise<this>;
supportsInterface: TypedContractMethod<[
interfaceID: BytesLike
], [
boolean
], "view">;
setText: TypedContractMethod<[
node: BytesLike,
key: string,
value: string
], [
void
], "nonpayable">;
interfaceImplementer: TypedContractMethod<[
node: BytesLike,
interfaceID: BytesLike
], [
string
], "view">;
ABI: TypedContractMethod<[
node: BytesLike,
contentTypes: BigNumberish
], [
[bigint, string]
], "view">;
setPubkey: TypedContractMethod<[
node: BytesLike,
x: BytesLike,
y: BytesLike
], [
void
], "nonpayable">;
setContenthash: TypedContractMethod<[
node: BytesLike,
hash: BytesLike
], [
void
], "nonpayable">;
"addr(bytes32)": TypedContractMethod<[node: BytesLike], [string], "view">;
"addr(bytes32,uint256)": TypedContractMethod<[
node: BytesLike,
coinType: BigNumberish
], [
string
], "view">;
setAuthorisation: TypedContractMethod<[
node: BytesLike,
target: AddressLike,
isAuthorised: boolean
], [
void
], "nonpayable">;
text: TypedContractMethod<[node: BytesLike, key: string], [string], "view">;
setABI: TypedContractMethod<[
node: BytesLike,
contentType: BigNumberish,
data: BytesLike
], [
void
], "nonpayable">;
name: TypedContractMethod<[node: BytesLike], [string], "view">;
setName: TypedContractMethod<[
node: BytesLike,
name: string
], [
void
], "nonpayable">;
"setAddr(bytes32,uint256,bytes)": TypedContractMethod<[
node: BytesLike,
coinType: BigNumberish,
a: BytesLike
], [
void
], "nonpayable">;
"setAddr(bytes32,address)": TypedContractMethod<[
node: BytesLike,
a: AddressLike
], [
void
], "nonpayable">;
contenthash: TypedContractMethod<[node: BytesLike], [string], "view">;
pubkey: TypedContractMethod<[
node: BytesLike
], [
[string, string] & {
x: string;
y: string;
}
], "view">;
setInterface: TypedContractMethod<[
node: BytesLike,
interfaceID: BytesLike,
implementer: AddressLike
], [
void
], "nonpayable">;
authorisations: TypedContractMethod<[
arg0: BytesLike,
arg1: AddressLike,
arg2: AddressLike
], [
boolean
], "view">;
getFunction<T extends ContractMethod = ContractMethod>(key: string | FunctionFragment): T;
getFunction(nameOrSignature: "supportsInterface"): TypedContractMethod<[interfaceID: BytesLike], [boolean], "view">;
getFunction(nameOrSignature: "setText"): TypedContractMethod<[
node: BytesLike,
key: string,
value: string
], [
void
], "nonpayable">;
getFunction(nameOrSignature: "interfaceImplementer"): TypedContractMethod<[
node: BytesLike,
interfaceID: BytesLike
], [
string
], "view">;
getFunction(nameOrSignature: "ABI"): TypedContractMethod<[
node: BytesLike,
contentTypes: BigNumberish
], [
[bigint, string]
], "view">;
getFunction(nameOrSignature: "setPubkey"): TypedContractMethod<[
node: BytesLike,
x: BytesLike,
y: BytesLike
], [
void
], "nonpayable">;
getFunction(nameOrSignature: "setContenthash"): TypedContractMethod<[
node: BytesLike,
hash: BytesLike
], [
void
], "nonpayable">;
getFunction(nameOrSignature: "addr(bytes32)"): TypedContractMethod<[node: BytesLike], [string], "view">;
getFunction(nameOrSignature: "addr(bytes32,uint256)"): TypedContractMethod<[
node: BytesLike,
coinType: BigNumberish
], [
string
], "view">;
getFunction(nameOrSignature: "setAuthorisation"): TypedContractMethod<[
node: BytesLike,
target: AddressLike,
isAuthorised: boolean
], [
void
], "nonpayable">;
getFunction(nameOrSignature: "text"): TypedContractMethod<[node: BytesLike, key: string], [string], "view">;
getFunction(nameOrSignature: "setABI"): TypedContractMethod<[
node: BytesLike,
contentType: BigNumberish,
data: BytesLike
], [
void
], "nonpayable">;
getFunction(nameOrSignature: "name"): TypedContractMethod<[node: BytesLike], [string], "view">;
getFunction(nameOrSignature: "setName"): TypedContractMethod<[node: BytesLike, name: string], [void], "nonpayable">;
getFunction(nameOrSignature: "setAddr(bytes32,uint256,bytes)"): TypedContractMethod<[
node: BytesLike,
coinType: BigNumberish,
a: BytesLike
], [
void
], "nonpayable">;
getFunction(nameOrSignature: "setAddr(bytes32,address)"): TypedContractMethod<[
node: BytesLike,
a: AddressLike
], [
void
], "nonpayable">;
getFunction(nameOrSignature: "contenthash"): TypedContractMethod<[node: BytesLike], [string], "view">;
getFunction(nameOrSignature: "pubkey"): TypedContractMethod<[
node: BytesLike
], [
[string, string] & {
x: string;
y: string;
}
], "view">;
getFunction(nameOrSignature: "setInterface"): TypedContractMethod<[
node: BytesLike,
interfaceID: BytesLike,
implementer: AddressLike
], [
void
], "nonpayable">;
getFunction(nameOrSignature: "authorisations"): TypedContractMethod<[
arg0: BytesLike,
arg1: AddressLike,
arg2: AddressLike
], [
boolean
], "view">;
getEvent(key: "AuthorisationChanged"): TypedContractEvent<AuthorisationChangedEvent.InputTuple, AuthorisationChangedEvent.OutputTuple, AuthorisationChangedEvent.OutputObject>;
getEvent(key: "TextChanged"): TypedContractEvent<TextChangedEvent.InputTuple, TextChangedEvent.OutputTuple, TextChangedEvent.OutputObject>;
getEvent(key: "PubkeyChanged"): TypedContractEvent<PubkeyChangedEvent.InputTuple, PubkeyChangedEvent.OutputTuple, PubkeyChangedEvent.OutputObject>;
getEvent(key: "NameChanged"): TypedContractEvent<NameChangedEvent.InputTuple, NameChangedEvent.OutputTuple, NameChangedEvent.OutputObject>;
getEvent(key: "InterfaceChanged"): TypedContractEvent<InterfaceChangedEvent.InputTuple, InterfaceChangedEvent.OutputTuple, InterfaceChangedEvent.OutputObject>;
getEvent(key: "ContenthashChanged"): TypedContractEvent<ContenthashChangedEvent.InputTuple, ContenthashChangedEvent.OutputTuple, ContenthashChangedEvent.OutputObject>;
getEvent(key: "AddrChanged"): TypedContractEvent<AddrChangedEvent.InputTuple, AddrChangedEvent.OutputTuple, AddrChangedEvent.OutputObject>;
getEvent(key: "AddressChanged"): TypedContractEvent<AddressChangedEvent.InputTuple, AddressChangedEvent.OutputTuple, AddressChangedEvent.OutputObject>;
getEvent(key: "ABIChanged"): TypedContractEvent<ABIChangedEvent.InputTuple, ABIChangedEvent.OutputTuple, ABIChangedEvent.OutputObject>;
filters: {
"AuthorisationChanged(bytes32,address,address,bool)": TypedContractEvent<AuthorisationChangedEvent.InputTuple, AuthorisationChangedEvent.OutputTuple, AuthorisationChangedEvent.OutputObject>;
AuthorisationChanged: TypedContractEvent<AuthorisationChangedEvent.InputTuple, AuthorisationChangedEvent.OutputTuple, AuthorisationChangedEvent.OutputObject>;
"TextChanged(bytes32,string,string)": TypedContractEvent<TextChangedEvent.InputTuple, TextChangedEvent.OutputTuple, TextChangedEvent.OutputObject>;
TextChanged: TypedContractEvent<TextChangedEvent.InputTuple, TextChangedEvent.OutputTuple, TextChangedEvent.OutputObject>;
"PubkeyChanged(bytes32,bytes32,bytes32)": TypedContractEvent<PubkeyChangedEvent.InputTuple, PubkeyChangedEvent.OutputTuple, PubkeyChangedEvent.OutputObject>;
PubkeyChanged: TypedContractEvent<PubkeyChangedEvent.InputTuple, PubkeyChangedEvent.OutputTuple, PubkeyChangedEvent.OutputObject>;
"NameChanged(bytes32,string)": TypedContractEvent<NameChangedEvent.InputTuple, NameChangedEvent.OutputTuple, NameChangedEvent.OutputObject>;
NameChanged: TypedContractEvent<NameChangedEvent.InputTuple, NameChangedEvent.OutputTuple, NameChangedEvent.OutputObject>;
"InterfaceChanged(bytes32,bytes4,address)": TypedContractEvent<InterfaceChangedEvent.InputTuple, InterfaceChangedEvent.OutputTuple, InterfaceChangedEvent.OutputObject>;
InterfaceChanged: TypedContractEvent<InterfaceChangedEvent.InputTuple, InterfaceChangedEvent.OutputTuple, InterfaceChangedEvent.OutputObject>;
"ContenthashChanged(bytes32,bytes)": TypedContractEvent<ContenthashChangedEvent.InputTuple, ContenthashChangedEvent.OutputTuple, ContenthashChangedEvent.OutputObject>;
ContenthashChanged: TypedContractEvent<ContenthashChangedEvent.InputTuple, ContenthashChangedEvent.OutputTuple, ContenthashChangedEvent.OutputObject>;
"AddrChanged(bytes32,address)": TypedContractEvent<AddrChangedEvent.InputTuple, AddrChangedEvent.OutputTuple, AddrChangedEvent.OutputObject>;
AddrChanged: TypedContractEvent<AddrChangedEvent.InputTuple, AddrChangedEvent.OutputTuple, AddrChangedEvent.OutputObject>;
"AddressChanged(bytes32,uint256,bytes)": TypedContractEvent<AddressChangedEvent.InputTuple, AddressChangedEvent.OutputTuple, AddressChangedEvent.OutputObject>;
AddressChanged: TypedContractEvent<AddressChangedEvent.InputTuple, AddressChangedEvent.OutputTuple, AddressChangedEvent.OutputObject>;
"ABIChanged(bytes32,uint256)": TypedContractEvent<ABIChangedEvent.InputTuple, ABIChangedEvent.OutputTuple, ABIChangedEvent.OutputObject>;
ABIChanged: TypedContractEvent<ABIChangedEvent.InputTuple, ABIChangedEvent.OutputTuple, ABIChangedEvent.OutputObject>;
};
}

181
dist/typechain/ERC20.d.ts vendored Normal file

@ -0,0 +1,181 @@
import type { BaseContract, BigNumberish, BytesLike, FunctionFragment, Result, Interface, EventFragment, AddressLike, ContractRunner, ContractMethod, Listener } from "ethers";
import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedLogDescription, TypedListener, TypedContractMethod } from "./common";
export interface ERC20Interface extends Interface {
getFunction(nameOrSignature: "totalSupply" | "_totalSupply" | "balanceOf" | "name" | "symbol" | "decimals" | "transfer" | "allowance" | "transferFrom" | "approve" | "nonces" | "permit"): FunctionFragment;
getEvent(nameOrSignatureOrTopic: "Approval" | "Transfer"): EventFragment;
encodeFunctionData(functionFragment: "totalSupply", values?: undefined): string;
encodeFunctionData(functionFragment: "_totalSupply", values?: undefined): string;
encodeFunctionData(functionFragment: "balanceOf", values: [AddressLike]): string;
encodeFunctionData(functionFragment: "name", values?: undefined): string;
encodeFunctionData(functionFragment: "symbol", values?: undefined): string;
encodeFunctionData(functionFragment: "decimals", values?: undefined): string;
encodeFunctionData(functionFragment: "transfer", values: [AddressLike, BigNumberish]): string;
encodeFunctionData(functionFragment: "allowance", values: [AddressLike, AddressLike]): string;
encodeFunctionData(functionFragment: "transferFrom", values: [AddressLike, AddressLike, BigNumberish]): string;
encodeFunctionData(functionFragment: "approve", values: [AddressLike, BigNumberish]): string;
encodeFunctionData(functionFragment: "nonces", values: [AddressLike]): string;
encodeFunctionData(functionFragment: "permit", values: [
AddressLike,
AddressLike,
BigNumberish,
BigNumberish,
BigNumberish,
BytesLike,
BytesLike
]): string;
decodeFunctionResult(functionFragment: "totalSupply", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "_totalSupply", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "name", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "transferFrom", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result;
}
export declare namespace ApprovalEvent {
type InputTuple = [
owner: AddressLike,
spender: AddressLike,
value: BigNumberish
];
type OutputTuple = [owner: string, spender: string, value: bigint];
interface OutputObject {
owner: string;
spender: string;
value: bigint;
}
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
type Filter = TypedDeferredTopicFilter<Event>;
type Log = TypedEventLog<Event>;
type LogDescription = TypedLogDescription<Event>;
}
export declare namespace TransferEvent {
type InputTuple = [
from: AddressLike,
to: AddressLike,
value: BigNumberish
];
type OutputTuple = [from: string, to: string, value: bigint];
interface OutputObject {
from: string;
to: string;
value: bigint;
}
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
type Filter = TypedDeferredTopicFilter<Event>;
type Log = TypedEventLog<Event>;
type LogDescription = TypedLogDescription<Event>;
}
export interface ERC20 extends BaseContract {
connect(runner?: ContractRunner | null): ERC20;
waitForDeployment(): Promise<this>;
interface: ERC20Interface;
queryFilter<TCEvent extends TypedContractEvent>(event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TypedEventLog<TCEvent>>>;
queryFilter<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TypedEventLog<TCEvent>>>;
on<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>;
on<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, listener: TypedListener<TCEvent>): Promise<this>;
once<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>;
once<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, listener: TypedListener<TCEvent>): Promise<this>;
listeners<TCEvent extends TypedContractEvent>(event: TCEvent): Promise<Array<TypedListener<TCEvent>>>;
listeners(eventName?: string): Promise<Array<Listener>>;
removeAllListeners<TCEvent extends TypedContractEvent>(event?: TCEvent): Promise<this>;
totalSupply: TypedContractMethod<[], [bigint], "view">;
_totalSupply: TypedContractMethod<[], [bigint], "view">;
balanceOf: TypedContractMethod<[who: AddressLike], [bigint], "view">;
name: TypedContractMethod<[], [string], "view">;
symbol: TypedContractMethod<[], [string], "view">;
decimals: TypedContractMethod<[], [bigint], "view">;
transfer: TypedContractMethod<[
to: AddressLike,
value: BigNumberish
], [
void
], "nonpayable">;
allowance: TypedContractMethod<[
owner: AddressLike,
spender: AddressLike
], [
bigint
], "view">;
transferFrom: TypedContractMethod<[
from: AddressLike,
to: AddressLike,
value: BigNumberish
], [
void
], "nonpayable">;
approve: TypedContractMethod<[
spender: AddressLike,
value: BigNumberish
], [
void
], "nonpayable">;
nonces: TypedContractMethod<[owner: AddressLike], [bigint], "view">;
permit: TypedContractMethod<[
owner: AddressLike,
spender: AddressLike,
amount: BigNumberish,
deadline: BigNumberish,
v: BigNumberish,
r: BytesLike,
s: BytesLike
], [
void
], "nonpayable">;
getFunction<T extends ContractMethod = ContractMethod>(key: string | FunctionFragment): T;
getFunction(nameOrSignature: "totalSupply"): TypedContractMethod<[], [bigint], "view">;
getFunction(nameOrSignature: "_totalSupply"): TypedContractMethod<[], [bigint], "view">;
getFunction(nameOrSignature: "balanceOf"): TypedContractMethod<[who: AddressLike], [bigint], "view">;
getFunction(nameOrSignature: "name"): TypedContractMethod<[], [string], "view">;
getFunction(nameOrSignature: "symbol"): TypedContractMethod<[], [string], "view">;
getFunction(nameOrSignature: "decimals"): TypedContractMethod<[], [bigint], "view">;
getFunction(nameOrSignature: "transfer"): TypedContractMethod<[
to: AddressLike,
value: BigNumberish
], [
void
], "nonpayable">;
getFunction(nameOrSignature: "allowance"): TypedContractMethod<[
owner: AddressLike,
spender: AddressLike
], [
bigint
], "view">;
getFunction(nameOrSignature: "transferFrom"): TypedContractMethod<[
from: AddressLike,
to: AddressLike,
value: BigNumberish
], [
void
], "nonpayable">;
getFunction(nameOrSignature: "approve"): TypedContractMethod<[
spender: AddressLike,
value: BigNumberish
], [
void
], "nonpayable">;
getFunction(nameOrSignature: "nonces"): TypedContractMethod<[owner: AddressLike], [bigint], "view">;
getFunction(nameOrSignature: "permit"): TypedContractMethod<[
owner: AddressLike,
spender: AddressLike,
amount: BigNumberish,
deadline: BigNumberish,
v: BigNumberish,
r: BytesLike,
s: BytesLike
], [
void
], "nonpayable">;
getEvent(key: "Approval"): TypedContractEvent<ApprovalEvent.InputTuple, ApprovalEvent.OutputTuple, ApprovalEvent.OutputObject>;
getEvent(key: "Transfer"): TypedContractEvent<TransferEvent.InputTuple, TransferEvent.OutputTuple, TransferEvent.OutputObject>;
filters: {
"Approval(address,address,uint256)": TypedContractEvent<ApprovalEvent.InputTuple, ApprovalEvent.OutputTuple, ApprovalEvent.OutputObject>;
Approval: TypedContractEvent<ApprovalEvent.InputTuple, ApprovalEvent.OutputTuple, ApprovalEvent.OutputObject>;
"Transfer(address,address,uint256)": TypedContractEvent<TransferEvent.InputTuple, TransferEvent.OutputTuple, TransferEvent.OutputObject>;
Transfer: TypedContractEvent<TransferEvent.InputTuple, TransferEvent.OutputTuple, TransferEvent.OutputObject>;
};
}

101
dist/typechain/GasPriceOracle.d.ts vendored Normal file

@ -0,0 +1,101 @@
import type { BaseContract, BigNumberish, BytesLike, FunctionFragment, Result, Interface, AddressLike, ContractRunner, ContractMethod, Listener } from "ethers";
import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedListener, TypedContractMethod } from "./common";
export interface GasPriceOracleInterface extends Interface {
getFunction(nameOrSignature: "GAS_UNIT" | "changeDerivationThresold" | "changeGasUnit" | "changeHeartbeat" | "changeOwnership" | "derivationThresold" | "gasPrice" | "heartbeat" | "maxFeePerGas" | "maxPriorityFeePerGas" | "owner" | "pastGasPrice" | "setGasPrice" | "timestamp"): FunctionFragment;
encodeFunctionData(functionFragment: "GAS_UNIT", values?: undefined): string;
encodeFunctionData(functionFragment: "changeDerivationThresold", values: [BigNumberish]): string;
encodeFunctionData(functionFragment: "changeGasUnit", values: [BigNumberish]): string;
encodeFunctionData(functionFragment: "changeHeartbeat", values: [BigNumberish]): string;
encodeFunctionData(functionFragment: "changeOwnership", values: [AddressLike]): string;
encodeFunctionData(functionFragment: "derivationThresold", values?: undefined): string;
encodeFunctionData(functionFragment: "gasPrice", values?: undefined): string;
encodeFunctionData(functionFragment: "heartbeat", values?: undefined): string;
encodeFunctionData(functionFragment: "maxFeePerGas", values?: undefined): string;
encodeFunctionData(functionFragment: "maxPriorityFeePerGas", values?: undefined): string;
encodeFunctionData(functionFragment: "owner", values?: undefined): string;
encodeFunctionData(functionFragment: "pastGasPrice", values?: undefined): string;
encodeFunctionData(functionFragment: "setGasPrice", values: [BigNumberish]): string;
encodeFunctionData(functionFragment: "timestamp", values?: undefined): string;
decodeFunctionResult(functionFragment: "GAS_UNIT", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "changeDerivationThresold", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "changeGasUnit", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "changeHeartbeat", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "changeOwnership", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "derivationThresold", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "gasPrice", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "heartbeat", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "maxFeePerGas", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "maxPriorityFeePerGas", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "pastGasPrice", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "setGasPrice", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "timestamp", data: BytesLike): Result;
}
export interface GasPriceOracle extends BaseContract {
connect(runner?: ContractRunner | null): GasPriceOracle;
waitForDeployment(): Promise<this>;
interface: GasPriceOracleInterface;
queryFilter<TCEvent extends TypedContractEvent>(event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TypedEventLog<TCEvent>>>;
queryFilter<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TypedEventLog<TCEvent>>>;
on<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>;
on<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, listener: TypedListener<TCEvent>): Promise<this>;
once<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>;
once<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, listener: TypedListener<TCEvent>): Promise<this>;
listeners<TCEvent extends TypedContractEvent>(event: TCEvent): Promise<Array<TypedListener<TCEvent>>>;
listeners(eventName?: string): Promise<Array<Listener>>;
removeAllListeners<TCEvent extends TypedContractEvent>(event?: TCEvent): Promise<this>;
GAS_UNIT: TypedContractMethod<[], [bigint], "view">;
changeDerivationThresold: TypedContractMethod<[
_derivationThresold: BigNumberish
], [
void
], "nonpayable">;
changeGasUnit: TypedContractMethod<[
_gasUnit: BigNumberish
], [
void
], "nonpayable">;
changeHeartbeat: TypedContractMethod<[
_heartbeat: BigNumberish
], [
void
], "nonpayable">;
changeOwnership: TypedContractMethod<[
_owner: AddressLike
], [
void
], "nonpayable">;
derivationThresold: TypedContractMethod<[], [bigint], "view">;
gasPrice: TypedContractMethod<[], [bigint], "view">;
heartbeat: TypedContractMethod<[], [bigint], "view">;
maxFeePerGas: TypedContractMethod<[], [bigint], "view">;
maxPriorityFeePerGas: TypedContractMethod<[], [bigint], "view">;
owner: TypedContractMethod<[], [string], "view">;
pastGasPrice: TypedContractMethod<[], [bigint], "view">;
setGasPrice: TypedContractMethod<[
_gasPrice: BigNumberish
], [
void
], "nonpayable">;
timestamp: TypedContractMethod<[], [bigint], "view">;
getFunction<T extends ContractMethod = ContractMethod>(key: string | FunctionFragment): T;
getFunction(nameOrSignature: "GAS_UNIT"): TypedContractMethod<[], [bigint], "view">;
getFunction(nameOrSignature: "changeDerivationThresold"): TypedContractMethod<[
_derivationThresold: BigNumberish
], [
void
], "nonpayable">;
getFunction(nameOrSignature: "changeGasUnit"): TypedContractMethod<[_gasUnit: BigNumberish], [void], "nonpayable">;
getFunction(nameOrSignature: "changeHeartbeat"): TypedContractMethod<[_heartbeat: BigNumberish], [void], "nonpayable">;
getFunction(nameOrSignature: "changeOwnership"): TypedContractMethod<[_owner: AddressLike], [void], "nonpayable">;
getFunction(nameOrSignature: "derivationThresold"): TypedContractMethod<[], [bigint], "view">;
getFunction(nameOrSignature: "gasPrice"): TypedContractMethod<[], [bigint], "view">;
getFunction(nameOrSignature: "heartbeat"): TypedContractMethod<[], [bigint], "view">;
getFunction(nameOrSignature: "maxFeePerGas"): TypedContractMethod<[], [bigint], "view">;
getFunction(nameOrSignature: "maxPriorityFeePerGas"): TypedContractMethod<[], [bigint], "view">;
getFunction(nameOrSignature: "owner"): TypedContractMethod<[], [string], "view">;
getFunction(nameOrSignature: "pastGasPrice"): TypedContractMethod<[], [bigint], "view">;
getFunction(nameOrSignature: "setGasPrice"): TypedContractMethod<[_gasPrice: BigNumberish], [void], "nonpayable">;
getFunction(nameOrSignature: "timestamp"): TypedContractMethod<[], [bigint], "view">;
filters: {};
}

228
dist/typechain/Multicall.d.ts vendored Normal file

@ -0,0 +1,228 @@
import type { BaseContract, BigNumberish, BytesLike, FunctionFragment, Result, Interface, AddressLike, ContractRunner, ContractMethod, Listener } from "ethers";
import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedListener, TypedContractMethod } from "./common";
export declare namespace Multicall3 {
type CallStruct = {
target: AddressLike;
callData: BytesLike;
};
type CallStructOutput = [target: string, callData: string] & {
target: string;
callData: string;
};
type Call3Struct = {
target: AddressLike;
allowFailure: boolean;
callData: BytesLike;
};
type Call3StructOutput = [
target: string,
allowFailure: boolean,
callData: string
] & {
target: string;
allowFailure: boolean;
callData: string;
};
type ResultStruct = {
success: boolean;
returnData: BytesLike;
};
type ResultStructOutput = [success: boolean, returnData: string] & {
success: boolean;
returnData: string;
};
type Call3ValueStruct = {
target: AddressLike;
allowFailure: boolean;
value: BigNumberish;
callData: BytesLike;
};
type Call3ValueStructOutput = [
target: string,
allowFailure: boolean,
value: bigint,
callData: string
] & {
target: string;
allowFailure: boolean;
value: bigint;
callData: string;
};
}
export interface MulticallInterface extends Interface {
getFunction(nameOrSignature: "aggregate" | "aggregate3" | "aggregate3Value" | "blockAndAggregate" | "getBasefee" | "getBlockHash" | "getBlockNumber" | "getChainId" | "getCurrentBlockCoinbase" | "getCurrentBlockDifficulty" | "getCurrentBlockGasLimit" | "getCurrentBlockTimestamp" | "getEthBalance" | "getLastBlockHash" | "tryAggregate" | "tryBlockAndAggregate"): FunctionFragment;
encodeFunctionData(functionFragment: "aggregate", values: [Multicall3.CallStruct[]]): string;
encodeFunctionData(functionFragment: "aggregate3", values: [Multicall3.Call3Struct[]]): string;
encodeFunctionData(functionFragment: "aggregate3Value", values: [Multicall3.Call3ValueStruct[]]): string;
encodeFunctionData(functionFragment: "blockAndAggregate", values: [Multicall3.CallStruct[]]): string;
encodeFunctionData(functionFragment: "getBasefee", values?: undefined): string;
encodeFunctionData(functionFragment: "getBlockHash", values: [BigNumberish]): string;
encodeFunctionData(functionFragment: "getBlockNumber", values?: undefined): string;
encodeFunctionData(functionFragment: "getChainId", values?: undefined): string;
encodeFunctionData(functionFragment: "getCurrentBlockCoinbase", values?: undefined): string;
encodeFunctionData(functionFragment: "getCurrentBlockDifficulty", values?: undefined): string;
encodeFunctionData(functionFragment: "getCurrentBlockGasLimit", values?: undefined): string;
encodeFunctionData(functionFragment: "getCurrentBlockTimestamp", values?: undefined): string;
encodeFunctionData(functionFragment: "getEthBalance", values: [AddressLike]): string;
encodeFunctionData(functionFragment: "getLastBlockHash", values?: undefined): string;
encodeFunctionData(functionFragment: "tryAggregate", values: [boolean, Multicall3.CallStruct[]]): string;
encodeFunctionData(functionFragment: "tryBlockAndAggregate", values: [boolean, Multicall3.CallStruct[]]): string;
decodeFunctionResult(functionFragment: "aggregate", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "aggregate3", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "aggregate3Value", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "blockAndAggregate", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "getBasefee", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "getBlockHash", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "getBlockNumber", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "getChainId", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "getCurrentBlockCoinbase", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "getCurrentBlockDifficulty", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "getCurrentBlockGasLimit", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "getCurrentBlockTimestamp", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "getEthBalance", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "getLastBlockHash", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "tryAggregate", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "tryBlockAndAggregate", data: BytesLike): Result;
}
export interface Multicall extends BaseContract {
connect(runner?: ContractRunner | null): Multicall;
waitForDeployment(): Promise<this>;
interface: MulticallInterface;
queryFilter<TCEvent extends TypedContractEvent>(event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TypedEventLog<TCEvent>>>;
queryFilter<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TypedEventLog<TCEvent>>>;
on<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>;
on<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, listener: TypedListener<TCEvent>): Promise<this>;
once<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>;
once<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, listener: TypedListener<TCEvent>): Promise<this>;
listeners<TCEvent extends TypedContractEvent>(event: TCEvent): Promise<Array<TypedListener<TCEvent>>>;
listeners(eventName?: string): Promise<Array<Listener>>;
removeAllListeners<TCEvent extends TypedContractEvent>(event?: TCEvent): Promise<this>;
aggregate: TypedContractMethod<[
calls: Multicall3.CallStruct[]
], [
[bigint, string[]] & {
blockNumber: bigint;
returnData: string[];
}
], "payable">;
aggregate3: TypedContractMethod<[
calls: Multicall3.Call3Struct[]
], [
Multicall3.ResultStructOutput[]
], "payable">;
aggregate3Value: TypedContractMethod<[
calls: Multicall3.Call3ValueStruct[]
], [
Multicall3.ResultStructOutput[]
], "payable">;
blockAndAggregate: TypedContractMethod<[
calls: Multicall3.CallStruct[]
], [
[
bigint,
string,
Multicall3.ResultStructOutput[]
] & {
blockNumber: bigint;
blockHash: string;
returnData: Multicall3.ResultStructOutput[];
}
], "payable">;
getBasefee: TypedContractMethod<[], [bigint], "view">;
getBlockHash: TypedContractMethod<[
blockNumber: BigNumberish
], [
string
], "view">;
getBlockNumber: TypedContractMethod<[], [bigint], "view">;
getChainId: TypedContractMethod<[], [bigint], "view">;
getCurrentBlockCoinbase: TypedContractMethod<[], [string], "view">;
getCurrentBlockDifficulty: TypedContractMethod<[], [bigint], "view">;
getCurrentBlockGasLimit: TypedContractMethod<[], [bigint], "view">;
getCurrentBlockTimestamp: TypedContractMethod<[], [bigint], "view">;
getEthBalance: TypedContractMethod<[addr: AddressLike], [bigint], "view">;
getLastBlockHash: TypedContractMethod<[], [string], "view">;
tryAggregate: TypedContractMethod<[
requireSuccess: boolean,
calls: Multicall3.CallStruct[]
], [
Multicall3.ResultStructOutput[]
], "payable">;
tryBlockAndAggregate: TypedContractMethod<[
requireSuccess: boolean,
calls: Multicall3.CallStruct[]
], [
[
bigint,
string,
Multicall3.ResultStructOutput[]
] & {
blockNumber: bigint;
blockHash: string;
returnData: Multicall3.ResultStructOutput[];
}
], "payable">;
getFunction<T extends ContractMethod = ContractMethod>(key: string | FunctionFragment): T;
getFunction(nameOrSignature: "aggregate"): TypedContractMethod<[
calls: Multicall3.CallStruct[]
], [
[bigint, string[]] & {
blockNumber: bigint;
returnData: string[];
}
], "payable">;
getFunction(nameOrSignature: "aggregate3"): TypedContractMethod<[
calls: Multicall3.Call3Struct[]
], [
Multicall3.ResultStructOutput[]
], "payable">;
getFunction(nameOrSignature: "aggregate3Value"): TypedContractMethod<[
calls: Multicall3.Call3ValueStruct[]
], [
Multicall3.ResultStructOutput[]
], "payable">;
getFunction(nameOrSignature: "blockAndAggregate"): TypedContractMethod<[
calls: Multicall3.CallStruct[]
], [
[
bigint,
string,
Multicall3.ResultStructOutput[]
] & {
blockNumber: bigint;
blockHash: string;
returnData: Multicall3.ResultStructOutput[];
}
], "payable">;
getFunction(nameOrSignature: "getBasefee"): TypedContractMethod<[], [bigint], "view">;
getFunction(nameOrSignature: "getBlockHash"): TypedContractMethod<[blockNumber: BigNumberish], [string], "view">;
getFunction(nameOrSignature: "getBlockNumber"): TypedContractMethod<[], [bigint], "view">;
getFunction(nameOrSignature: "getChainId"): TypedContractMethod<[], [bigint], "view">;
getFunction(nameOrSignature: "getCurrentBlockCoinbase"): TypedContractMethod<[], [string], "view">;
getFunction(nameOrSignature: "getCurrentBlockDifficulty"): TypedContractMethod<[], [bigint], "view">;
getFunction(nameOrSignature: "getCurrentBlockGasLimit"): TypedContractMethod<[], [bigint], "view">;
getFunction(nameOrSignature: "getCurrentBlockTimestamp"): TypedContractMethod<[], [bigint], "view">;
getFunction(nameOrSignature: "getEthBalance"): TypedContractMethod<[addr: AddressLike], [bigint], "view">;
getFunction(nameOrSignature: "getLastBlockHash"): TypedContractMethod<[], [string], "view">;
getFunction(nameOrSignature: "tryAggregate"): TypedContractMethod<[
requireSuccess: boolean,
calls: Multicall3.CallStruct[]
], [
Multicall3.ResultStructOutput[]
], "payable">;
getFunction(nameOrSignature: "tryBlockAndAggregate"): TypedContractMethod<[
requireSuccess: boolean,
calls: Multicall3.CallStruct[]
], [
[
bigint,
string,
Multicall3.ResultStructOutput[]
] & {
blockNumber: bigint;
blockHash: string;
returnData: Multicall3.ResultStructOutput[];
}
], "payable">;
filters: {};
}

304
dist/typechain/OffchainOracle.d.ts vendored Normal file

@ -0,0 +1,304 @@
import type { BaseContract, BigNumberish, BytesLike, FunctionFragment, Result, Interface, EventFragment, AddressLike, ContractRunner, ContractMethod, Listener } from "ethers";
import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedLogDescription, TypedListener, TypedContractMethod } from "./common";
export interface OffchainOracleInterface extends Interface {
getFunction(nameOrSignature: "addConnector" | "addOracle" | "connectors" | "getRate" | "getRateToEth" | "getRateToEthWithCustomConnectors" | "getRateToEthWithThreshold" | "getRateWithCustomConnectors" | "getRateWithThreshold" | "multiWrapper" | "oracles" | "owner" | "removeConnector" | "removeOracle" | "renounceOwnership" | "setMultiWrapper" | "transferOwnership"): FunctionFragment;
getEvent(nameOrSignatureOrTopic: "ConnectorAdded" | "ConnectorRemoved" | "MultiWrapperUpdated" | "OracleAdded" | "OracleRemoved" | "OwnershipTransferred"): EventFragment;
encodeFunctionData(functionFragment: "addConnector", values: [AddressLike]): string;
encodeFunctionData(functionFragment: "addOracle", values: [AddressLike, BigNumberish]): string;
encodeFunctionData(functionFragment: "connectors", values?: undefined): string;
encodeFunctionData(functionFragment: "getRate", values: [AddressLike, AddressLike, boolean]): string;
encodeFunctionData(functionFragment: "getRateToEth", values: [AddressLike, boolean]): string;
encodeFunctionData(functionFragment: "getRateToEthWithCustomConnectors", values: [AddressLike, boolean, AddressLike[], BigNumberish]): string;
encodeFunctionData(functionFragment: "getRateToEthWithThreshold", values: [AddressLike, boolean, BigNumberish]): string;
encodeFunctionData(functionFragment: "getRateWithCustomConnectors", values: [AddressLike, AddressLike, boolean, AddressLike[], BigNumberish]): string;
encodeFunctionData(functionFragment: "getRateWithThreshold", values: [AddressLike, AddressLike, boolean, BigNumberish]): string;
encodeFunctionData(functionFragment: "multiWrapper", values?: undefined): string;
encodeFunctionData(functionFragment: "oracles", values?: undefined): string;
encodeFunctionData(functionFragment: "owner", values?: undefined): string;
encodeFunctionData(functionFragment: "removeConnector", values: [AddressLike]): string;
encodeFunctionData(functionFragment: "removeOracle", values: [AddressLike, BigNumberish]): string;
encodeFunctionData(functionFragment: "renounceOwnership", values?: undefined): string;
encodeFunctionData(functionFragment: "setMultiWrapper", values: [AddressLike]): string;
encodeFunctionData(functionFragment: "transferOwnership", values: [AddressLike]): string;
decodeFunctionResult(functionFragment: "addConnector", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "addOracle", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "connectors", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "getRate", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "getRateToEth", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "getRateToEthWithCustomConnectors", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "getRateToEthWithThreshold", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "getRateWithCustomConnectors", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "getRateWithThreshold", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "multiWrapper", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "oracles", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "removeConnector", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "removeOracle", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "renounceOwnership", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "setMultiWrapper", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "transferOwnership", data: BytesLike): Result;
}
export declare namespace ConnectorAddedEvent {
type InputTuple = [connector: AddressLike];
type OutputTuple = [connector: string];
interface OutputObject {
connector: string;
}
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
type Filter = TypedDeferredTopicFilter<Event>;
type Log = TypedEventLog<Event>;
type LogDescription = TypedLogDescription<Event>;
}
export declare namespace ConnectorRemovedEvent {
type InputTuple = [connector: AddressLike];
type OutputTuple = [connector: string];
interface OutputObject {
connector: string;
}
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
type Filter = TypedDeferredTopicFilter<Event>;
type Log = TypedEventLog<Event>;
type LogDescription = TypedLogDescription<Event>;
}
export declare namespace MultiWrapperUpdatedEvent {
type InputTuple = [multiWrapper: AddressLike];
type OutputTuple = [multiWrapper: string];
interface OutputObject {
multiWrapper: string;
}
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
type Filter = TypedDeferredTopicFilter<Event>;
type Log = TypedEventLog<Event>;
type LogDescription = TypedLogDescription<Event>;
}
export declare namespace OracleAddedEvent {
type InputTuple = [oracle: AddressLike, oracleType: BigNumberish];
type OutputTuple = [oracle: string, oracleType: bigint];
interface OutputObject {
oracle: string;
oracleType: bigint;
}
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
type Filter = TypedDeferredTopicFilter<Event>;
type Log = TypedEventLog<Event>;
type LogDescription = TypedLogDescription<Event>;
}
export declare namespace OracleRemovedEvent {
type InputTuple = [oracle: AddressLike, oracleType: BigNumberish];
type OutputTuple = [oracle: string, oracleType: bigint];
interface OutputObject {
oracle: string;
oracleType: bigint;
}
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
type Filter = TypedDeferredTopicFilter<Event>;
type Log = TypedEventLog<Event>;
type LogDescription = TypedLogDescription<Event>;
}
export declare namespace OwnershipTransferredEvent {
type InputTuple = [previousOwner: AddressLike, newOwner: AddressLike];
type OutputTuple = [previousOwner: string, newOwner: string];
interface OutputObject {
previousOwner: string;
newOwner: string;
}
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
type Filter = TypedDeferredTopicFilter<Event>;
type Log = TypedEventLog<Event>;
type LogDescription = TypedLogDescription<Event>;
}
export interface OffchainOracle extends BaseContract {
connect(runner?: ContractRunner | null): OffchainOracle;
waitForDeployment(): Promise<this>;
interface: OffchainOracleInterface;
queryFilter<TCEvent extends TypedContractEvent>(event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TypedEventLog<TCEvent>>>;
queryFilter<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TypedEventLog<TCEvent>>>;
on<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>;
on<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, listener: TypedListener<TCEvent>): Promise<this>;
once<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>;
once<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, listener: TypedListener<TCEvent>): Promise<this>;
listeners<TCEvent extends TypedContractEvent>(event: TCEvent): Promise<Array<TypedListener<TCEvent>>>;
listeners(eventName?: string): Promise<Array<Listener>>;
removeAllListeners<TCEvent extends TypedContractEvent>(event?: TCEvent): Promise<this>;
addConnector: TypedContractMethod<[
connector: AddressLike
], [
void
], "nonpayable">;
addOracle: TypedContractMethod<[
oracle: AddressLike,
oracleKind: BigNumberish
], [
void
], "nonpayable">;
connectors: TypedContractMethod<[], [string[]], "view">;
getRate: TypedContractMethod<[
srcToken: AddressLike,
dstToken: AddressLike,
useWrappers: boolean
], [
bigint
], "view">;
getRateToEth: TypedContractMethod<[
srcToken: AddressLike,
useSrcWrappers: boolean
], [
bigint
], "view">;
getRateToEthWithCustomConnectors: TypedContractMethod<[
srcToken: AddressLike,
useSrcWrappers: boolean,
customConnectors: AddressLike[],
thresholdFilter: BigNumberish
], [
bigint
], "view">;
getRateToEthWithThreshold: TypedContractMethod<[
srcToken: AddressLike,
useSrcWrappers: boolean,
thresholdFilter: BigNumberish
], [
bigint
], "view">;
getRateWithCustomConnectors: TypedContractMethod<[
srcToken: AddressLike,
dstToken: AddressLike,
useWrappers: boolean,
customConnectors: AddressLike[],
thresholdFilter: BigNumberish
], [
bigint
], "view">;
getRateWithThreshold: TypedContractMethod<[
srcToken: AddressLike,
dstToken: AddressLike,
useWrappers: boolean,
thresholdFilter: BigNumberish
], [
bigint
], "view">;
multiWrapper: TypedContractMethod<[], [string], "view">;
oracles: TypedContractMethod<[
], [
[string[], bigint[]] & {
allOracles: string[];
oracleTypes: bigint[];
}
], "view">;
owner: TypedContractMethod<[], [string], "view">;
removeConnector: TypedContractMethod<[
connector: AddressLike
], [
void
], "nonpayable">;
removeOracle: TypedContractMethod<[
oracle: AddressLike,
oracleKind: BigNumberish
], [
void
], "nonpayable">;
renounceOwnership: TypedContractMethod<[], [void], "nonpayable">;
setMultiWrapper: TypedContractMethod<[
_multiWrapper: AddressLike
], [
void
], "nonpayable">;
transferOwnership: TypedContractMethod<[
newOwner: AddressLike
], [
void
], "nonpayable">;
getFunction<T extends ContractMethod = ContractMethod>(key: string | FunctionFragment): T;
getFunction(nameOrSignature: "addConnector"): TypedContractMethod<[connector: AddressLike], [void], "nonpayable">;
getFunction(nameOrSignature: "addOracle"): TypedContractMethod<[
oracle: AddressLike,
oracleKind: BigNumberish
], [
void
], "nonpayable">;
getFunction(nameOrSignature: "connectors"): TypedContractMethod<[], [string[]], "view">;
getFunction(nameOrSignature: "getRate"): TypedContractMethod<[
srcToken: AddressLike,
dstToken: AddressLike,
useWrappers: boolean
], [
bigint
], "view">;
getFunction(nameOrSignature: "getRateToEth"): TypedContractMethod<[
srcToken: AddressLike,
useSrcWrappers: boolean
], [
bigint
], "view">;
getFunction(nameOrSignature: "getRateToEthWithCustomConnectors"): TypedContractMethod<[
srcToken: AddressLike,
useSrcWrappers: boolean,
customConnectors: AddressLike[],
thresholdFilter: BigNumberish
], [
bigint
], "view">;
getFunction(nameOrSignature: "getRateToEthWithThreshold"): TypedContractMethod<[
srcToken: AddressLike,
useSrcWrappers: boolean,
thresholdFilter: BigNumberish
], [
bigint
], "view">;
getFunction(nameOrSignature: "getRateWithCustomConnectors"): TypedContractMethod<[
srcToken: AddressLike,
dstToken: AddressLike,
useWrappers: boolean,
customConnectors: AddressLike[],
thresholdFilter: BigNumberish
], [
bigint
], "view">;
getFunction(nameOrSignature: "getRateWithThreshold"): TypedContractMethod<[
srcToken: AddressLike,
dstToken: AddressLike,
useWrappers: boolean,
thresholdFilter: BigNumberish
], [
bigint
], "view">;
getFunction(nameOrSignature: "multiWrapper"): TypedContractMethod<[], [string], "view">;
getFunction(nameOrSignature: "oracles"): TypedContractMethod<[
], [
[string[], bigint[]] & {
allOracles: string[];
oracleTypes: bigint[];
}
], "view">;
getFunction(nameOrSignature: "owner"): TypedContractMethod<[], [string], "view">;
getFunction(nameOrSignature: "removeConnector"): TypedContractMethod<[connector: AddressLike], [void], "nonpayable">;
getFunction(nameOrSignature: "removeOracle"): TypedContractMethod<[
oracle: AddressLike,
oracleKind: BigNumberish
], [
void
], "nonpayable">;
getFunction(nameOrSignature: "renounceOwnership"): TypedContractMethod<[], [void], "nonpayable">;
getFunction(nameOrSignature: "setMultiWrapper"): TypedContractMethod<[_multiWrapper: AddressLike], [void], "nonpayable">;
getFunction(nameOrSignature: "transferOwnership"): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">;
getEvent(key: "ConnectorAdded"): TypedContractEvent<ConnectorAddedEvent.InputTuple, ConnectorAddedEvent.OutputTuple, ConnectorAddedEvent.OutputObject>;
getEvent(key: "ConnectorRemoved"): TypedContractEvent<ConnectorRemovedEvent.InputTuple, ConnectorRemovedEvent.OutputTuple, ConnectorRemovedEvent.OutputObject>;
getEvent(key: "MultiWrapperUpdated"): TypedContractEvent<MultiWrapperUpdatedEvent.InputTuple, MultiWrapperUpdatedEvent.OutputTuple, MultiWrapperUpdatedEvent.OutputObject>;
getEvent(key: "OracleAdded"): TypedContractEvent<OracleAddedEvent.InputTuple, OracleAddedEvent.OutputTuple, OracleAddedEvent.OutputObject>;
getEvent(key: "OracleRemoved"): TypedContractEvent<OracleRemovedEvent.InputTuple, OracleRemovedEvent.OutputTuple, OracleRemovedEvent.OutputObject>;
getEvent(key: "OwnershipTransferred"): TypedContractEvent<OwnershipTransferredEvent.InputTuple, OwnershipTransferredEvent.OutputTuple, OwnershipTransferredEvent.OutputObject>;
filters: {
"ConnectorAdded(address)": TypedContractEvent<ConnectorAddedEvent.InputTuple, ConnectorAddedEvent.OutputTuple, ConnectorAddedEvent.OutputObject>;
ConnectorAdded: TypedContractEvent<ConnectorAddedEvent.InputTuple, ConnectorAddedEvent.OutputTuple, ConnectorAddedEvent.OutputObject>;
"ConnectorRemoved(address)": TypedContractEvent<ConnectorRemovedEvent.InputTuple, ConnectorRemovedEvent.OutputTuple, ConnectorRemovedEvent.OutputObject>;
ConnectorRemoved: TypedContractEvent<ConnectorRemovedEvent.InputTuple, ConnectorRemovedEvent.OutputTuple, ConnectorRemovedEvent.OutputObject>;
"MultiWrapperUpdated(address)": TypedContractEvent<MultiWrapperUpdatedEvent.InputTuple, MultiWrapperUpdatedEvent.OutputTuple, MultiWrapperUpdatedEvent.OutputObject>;
MultiWrapperUpdated: TypedContractEvent<MultiWrapperUpdatedEvent.InputTuple, MultiWrapperUpdatedEvent.OutputTuple, MultiWrapperUpdatedEvent.OutputObject>;
"OracleAdded(address,uint8)": TypedContractEvent<OracleAddedEvent.InputTuple, OracleAddedEvent.OutputTuple, OracleAddedEvent.OutputObject>;
OracleAdded: TypedContractEvent<OracleAddedEvent.InputTuple, OracleAddedEvent.OutputTuple, OracleAddedEvent.OutputObject>;
"OracleRemoved(address,uint8)": TypedContractEvent<OracleRemovedEvent.InputTuple, OracleRemovedEvent.OutputTuple, OracleRemovedEvent.OutputObject>;
OracleRemoved: TypedContractEvent<OracleRemovedEvent.InputTuple, OracleRemovedEvent.OutputTuple, OracleRemovedEvent.OutputObject>;
"OwnershipTransferred(address,address)": TypedContractEvent<OwnershipTransferredEvent.InputTuple, OwnershipTransferredEvent.OutputTuple, OwnershipTransferredEvent.OutputObject>;
OwnershipTransferred: TypedContractEvent<OwnershipTransferredEvent.InputTuple, OwnershipTransferredEvent.OutputTuple, OwnershipTransferredEvent.OutputObject>;
};
}

188
dist/typechain/OvmGasPriceOracle.d.ts vendored Normal file

@ -0,0 +1,188 @@
import type { BaseContract, BigNumberish, BytesLike, FunctionFragment, Result, Interface, EventFragment, AddressLike, ContractRunner, ContractMethod, Listener } from "ethers";
import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedLogDescription, TypedListener, TypedContractMethod } from "./common";
export interface OvmGasPriceOracleInterface extends Interface {
getFunction(nameOrSignature: "decimals" | "gasPrice" | "getL1Fee" | "getL1GasUsed" | "l1BaseFee" | "overhead" | "owner" | "renounceOwnership" | "scalar" | "setDecimals" | "setGasPrice" | "setL1BaseFee" | "setOverhead" | "setScalar" | "transferOwnership"): FunctionFragment;
getEvent(nameOrSignatureOrTopic: "DecimalsUpdated" | "GasPriceUpdated" | "L1BaseFeeUpdated" | "OverheadUpdated" | "OwnershipTransferred" | "ScalarUpdated"): EventFragment;
encodeFunctionData(functionFragment: "decimals", values?: undefined): string;
encodeFunctionData(functionFragment: "gasPrice", values?: undefined): string;
encodeFunctionData(functionFragment: "getL1Fee", values: [BytesLike]): string;
encodeFunctionData(functionFragment: "getL1GasUsed", values: [BytesLike]): string;
encodeFunctionData(functionFragment: "l1BaseFee", values?: undefined): string;
encodeFunctionData(functionFragment: "overhead", values?: undefined): string;
encodeFunctionData(functionFragment: "owner", values?: undefined): string;
encodeFunctionData(functionFragment: "renounceOwnership", values?: undefined): string;
encodeFunctionData(functionFragment: "scalar", values?: undefined): string;
encodeFunctionData(functionFragment: "setDecimals", values: [BigNumberish]): string;
encodeFunctionData(functionFragment: "setGasPrice", values: [BigNumberish]): string;
encodeFunctionData(functionFragment: "setL1BaseFee", values: [BigNumberish]): string;
encodeFunctionData(functionFragment: "setOverhead", values: [BigNumberish]): string;
encodeFunctionData(functionFragment: "setScalar", values: [BigNumberish]): string;
encodeFunctionData(functionFragment: "transferOwnership", values: [AddressLike]): string;
decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "gasPrice", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "getL1Fee", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "getL1GasUsed", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "l1BaseFee", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "overhead", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "renounceOwnership", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "scalar", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "setDecimals", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "setGasPrice", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "setL1BaseFee", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "setOverhead", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "setScalar", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "transferOwnership", data: BytesLike): Result;
}
export declare namespace DecimalsUpdatedEvent {
type InputTuple = [arg0: BigNumberish];
type OutputTuple = [arg0: bigint];
interface OutputObject {
arg0: bigint;
}
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
type Filter = TypedDeferredTopicFilter<Event>;
type Log = TypedEventLog<Event>;
type LogDescription = TypedLogDescription<Event>;
}
export declare namespace GasPriceUpdatedEvent {
type InputTuple = [arg0: BigNumberish];
type OutputTuple = [arg0: bigint];
interface OutputObject {
arg0: bigint;
}
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
type Filter = TypedDeferredTopicFilter<Event>;
type Log = TypedEventLog<Event>;
type LogDescription = TypedLogDescription<Event>;
}
export declare namespace L1BaseFeeUpdatedEvent {
type InputTuple = [arg0: BigNumberish];
type OutputTuple = [arg0: bigint];
interface OutputObject {
arg0: bigint;
}
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
type Filter = TypedDeferredTopicFilter<Event>;
type Log = TypedEventLog<Event>;
type LogDescription = TypedLogDescription<Event>;
}
export declare namespace OverheadUpdatedEvent {
type InputTuple = [arg0: BigNumberish];
type OutputTuple = [arg0: bigint];
interface OutputObject {
arg0: bigint;
}
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
type Filter = TypedDeferredTopicFilter<Event>;
type Log = TypedEventLog<Event>;
type LogDescription = TypedLogDescription<Event>;
}
export declare namespace OwnershipTransferredEvent {
type InputTuple = [previousOwner: AddressLike, newOwner: AddressLike];
type OutputTuple = [previousOwner: string, newOwner: string];
interface OutputObject {
previousOwner: string;
newOwner: string;
}
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
type Filter = TypedDeferredTopicFilter<Event>;
type Log = TypedEventLog<Event>;
type LogDescription = TypedLogDescription<Event>;
}
export declare namespace ScalarUpdatedEvent {
type InputTuple = [arg0: BigNumberish];
type OutputTuple = [arg0: bigint];
interface OutputObject {
arg0: bigint;
}
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
type Filter = TypedDeferredTopicFilter<Event>;
type Log = TypedEventLog<Event>;
type LogDescription = TypedLogDescription<Event>;
}
export interface OvmGasPriceOracle extends BaseContract {
connect(runner?: ContractRunner | null): OvmGasPriceOracle;
waitForDeployment(): Promise<this>;
interface: OvmGasPriceOracleInterface;
queryFilter<TCEvent extends TypedContractEvent>(event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TypedEventLog<TCEvent>>>;
queryFilter<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TypedEventLog<TCEvent>>>;
on<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>;
on<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, listener: TypedListener<TCEvent>): Promise<this>;
once<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>;
once<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, listener: TypedListener<TCEvent>): Promise<this>;
listeners<TCEvent extends TypedContractEvent>(event: TCEvent): Promise<Array<TypedListener<TCEvent>>>;
listeners(eventName?: string): Promise<Array<Listener>>;
removeAllListeners<TCEvent extends TypedContractEvent>(event?: TCEvent): Promise<this>;
decimals: TypedContractMethod<[], [bigint], "view">;
gasPrice: TypedContractMethod<[], [bigint], "view">;
getL1Fee: TypedContractMethod<[_data: BytesLike], [bigint], "view">;
getL1GasUsed: TypedContractMethod<[_data: BytesLike], [bigint], "view">;
l1BaseFee: TypedContractMethod<[], [bigint], "view">;
overhead: TypedContractMethod<[], [bigint], "view">;
owner: TypedContractMethod<[], [string], "view">;
renounceOwnership: TypedContractMethod<[], [void], "nonpayable">;
scalar: TypedContractMethod<[], [bigint], "view">;
setDecimals: TypedContractMethod<[
_decimals: BigNumberish
], [
void
], "nonpayable">;
setGasPrice: TypedContractMethod<[
_gasPrice: BigNumberish
], [
void
], "nonpayable">;
setL1BaseFee: TypedContractMethod<[
_baseFee: BigNumberish
], [
void
], "nonpayable">;
setOverhead: TypedContractMethod<[
_overhead: BigNumberish
], [
void
], "nonpayable">;
setScalar: TypedContractMethod<[_scalar: BigNumberish], [void], "nonpayable">;
transferOwnership: TypedContractMethod<[
newOwner: AddressLike
], [
void
], "nonpayable">;
getFunction<T extends ContractMethod = ContractMethod>(key: string | FunctionFragment): T;
getFunction(nameOrSignature: "decimals"): TypedContractMethod<[], [bigint], "view">;
getFunction(nameOrSignature: "gasPrice"): TypedContractMethod<[], [bigint], "view">;
getFunction(nameOrSignature: "getL1Fee"): TypedContractMethod<[_data: BytesLike], [bigint], "view">;
getFunction(nameOrSignature: "getL1GasUsed"): TypedContractMethod<[_data: BytesLike], [bigint], "view">;
getFunction(nameOrSignature: "l1BaseFee"): TypedContractMethod<[], [bigint], "view">;
getFunction(nameOrSignature: "overhead"): TypedContractMethod<[], [bigint], "view">;
getFunction(nameOrSignature: "owner"): TypedContractMethod<[], [string], "view">;
getFunction(nameOrSignature: "renounceOwnership"): TypedContractMethod<[], [void], "nonpayable">;
getFunction(nameOrSignature: "scalar"): TypedContractMethod<[], [bigint], "view">;
getFunction(nameOrSignature: "setDecimals"): TypedContractMethod<[_decimals: BigNumberish], [void], "nonpayable">;
getFunction(nameOrSignature: "setGasPrice"): TypedContractMethod<[_gasPrice: BigNumberish], [void], "nonpayable">;
getFunction(nameOrSignature: "setL1BaseFee"): TypedContractMethod<[_baseFee: BigNumberish], [void], "nonpayable">;
getFunction(nameOrSignature: "setOverhead"): TypedContractMethod<[_overhead: BigNumberish], [void], "nonpayable">;
getFunction(nameOrSignature: "setScalar"): TypedContractMethod<[_scalar: BigNumberish], [void], "nonpayable">;
getFunction(nameOrSignature: "transferOwnership"): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">;
getEvent(key: "DecimalsUpdated"): TypedContractEvent<DecimalsUpdatedEvent.InputTuple, DecimalsUpdatedEvent.OutputTuple, DecimalsUpdatedEvent.OutputObject>;
getEvent(key: "GasPriceUpdated"): TypedContractEvent<GasPriceUpdatedEvent.InputTuple, GasPriceUpdatedEvent.OutputTuple, GasPriceUpdatedEvent.OutputObject>;
getEvent(key: "L1BaseFeeUpdated"): TypedContractEvent<L1BaseFeeUpdatedEvent.InputTuple, L1BaseFeeUpdatedEvent.OutputTuple, L1BaseFeeUpdatedEvent.OutputObject>;
getEvent(key: "OverheadUpdated"): TypedContractEvent<OverheadUpdatedEvent.InputTuple, OverheadUpdatedEvent.OutputTuple, OverheadUpdatedEvent.OutputObject>;
getEvent(key: "OwnershipTransferred"): TypedContractEvent<OwnershipTransferredEvent.InputTuple, OwnershipTransferredEvent.OutputTuple, OwnershipTransferredEvent.OutputObject>;
getEvent(key: "ScalarUpdated"): TypedContractEvent<ScalarUpdatedEvent.InputTuple, ScalarUpdatedEvent.OutputTuple, ScalarUpdatedEvent.OutputObject>;
filters: {
"DecimalsUpdated(uint256)": TypedContractEvent<DecimalsUpdatedEvent.InputTuple, DecimalsUpdatedEvent.OutputTuple, DecimalsUpdatedEvent.OutputObject>;
DecimalsUpdated: TypedContractEvent<DecimalsUpdatedEvent.InputTuple, DecimalsUpdatedEvent.OutputTuple, DecimalsUpdatedEvent.OutputObject>;
"GasPriceUpdated(uint256)": TypedContractEvent<GasPriceUpdatedEvent.InputTuple, GasPriceUpdatedEvent.OutputTuple, GasPriceUpdatedEvent.OutputObject>;
GasPriceUpdated: TypedContractEvent<GasPriceUpdatedEvent.InputTuple, GasPriceUpdatedEvent.OutputTuple, GasPriceUpdatedEvent.OutputObject>;
"L1BaseFeeUpdated(uint256)": TypedContractEvent<L1BaseFeeUpdatedEvent.InputTuple, L1BaseFeeUpdatedEvent.OutputTuple, L1BaseFeeUpdatedEvent.OutputObject>;
L1BaseFeeUpdated: TypedContractEvent<L1BaseFeeUpdatedEvent.InputTuple, L1BaseFeeUpdatedEvent.OutputTuple, L1BaseFeeUpdatedEvent.OutputObject>;
"OverheadUpdated(uint256)": TypedContractEvent<OverheadUpdatedEvent.InputTuple, OverheadUpdatedEvent.OutputTuple, OverheadUpdatedEvent.OutputObject>;
OverheadUpdated: TypedContractEvent<OverheadUpdatedEvent.InputTuple, OverheadUpdatedEvent.OutputTuple, OverheadUpdatedEvent.OutputObject>;
"OwnershipTransferred(address,address)": TypedContractEvent<OwnershipTransferredEvent.InputTuple, OwnershipTransferredEvent.OutputTuple, OwnershipTransferredEvent.OutputObject>;
OwnershipTransferred: TypedContractEvent<OwnershipTransferredEvent.InputTuple, OwnershipTransferredEvent.OutputTuple, OwnershipTransferredEvent.OutputObject>;
"ScalarUpdated(uint256)": TypedContractEvent<ScalarUpdatedEvent.InputTuple, ScalarUpdatedEvent.OutputTuple, ScalarUpdatedEvent.OutputObject>;
ScalarUpdated: TypedContractEvent<ScalarUpdatedEvent.InputTuple, ScalarUpdatedEvent.OutputTuple, ScalarUpdatedEvent.OutputObject>;
};
}

25
dist/typechain/ReverseRecords.d.ts vendored Normal file

@ -0,0 +1,25 @@
import type { BaseContract, BytesLike, FunctionFragment, Result, Interface, AddressLike, ContractRunner, ContractMethod, Listener } from "ethers";
import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedListener, TypedContractMethod } from "./common";
export interface ReverseRecordsInterface extends Interface {
getFunction(nameOrSignature: "getNames"): FunctionFragment;
encodeFunctionData(functionFragment: "getNames", values: [AddressLike[]]): string;
decodeFunctionResult(functionFragment: "getNames", data: BytesLike): Result;
}
export interface ReverseRecords extends BaseContract {
connect(runner?: ContractRunner | null): ReverseRecords;
waitForDeployment(): Promise<this>;
interface: ReverseRecordsInterface;
queryFilter<TCEvent extends TypedContractEvent>(event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TypedEventLog<TCEvent>>>;
queryFilter<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TypedEventLog<TCEvent>>>;
on<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>;
on<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, listener: TypedListener<TCEvent>): Promise<this>;
once<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>;
once<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, listener: TypedListener<TCEvent>): Promise<this>;
listeners<TCEvent extends TypedContractEvent>(event: TCEvent): Promise<Array<TypedListener<TCEvent>>>;
listeners(eventName?: string): Promise<Array<Listener>>;
removeAllListeners<TCEvent extends TypedContractEvent>(event?: TCEvent): Promise<this>;
getNames: TypedContractMethod<[addresses: AddressLike[]], [string[]], "view">;
getFunction<T extends ContractMethod = ContractMethod>(key: string | FunctionFragment): T;
getFunction(nameOrSignature: "getNames"): TypedContractMethod<[addresses: AddressLike[]], [string[]], "view">;
filters: {};
}

50
dist/typechain/common.d.ts vendored Normal file

@ -0,0 +1,50 @@
import type { FunctionFragment, Typed, EventFragment, ContractTransaction, ContractTransactionResponse, DeferredTopicFilter, EventLog, TransactionRequest, LogDescription } from "ethers";
export interface TypedDeferredTopicFilter<_TCEvent extends TypedContractEvent> extends DeferredTopicFilter {
}
export interface TypedContractEvent<InputTuple extends Array<any> = any, OutputTuple extends Array<any> = any, OutputObject = any> {
(...args: Partial<InputTuple>): TypedDeferredTopicFilter<TypedContractEvent<InputTuple, OutputTuple, OutputObject>>;
name: string;
fragment: EventFragment;
getFragment(...args: Partial<InputTuple>): EventFragment;
}
type __TypechainAOutputTuple<T> = T extends TypedContractEvent<infer _U, infer W> ? W : never;
type __TypechainOutputObject<T> = T extends TypedContractEvent<infer _U, infer _W, infer V> ? V : never;
export interface TypedEventLog<TCEvent extends TypedContractEvent> extends Omit<EventLog, "args"> {
args: __TypechainAOutputTuple<TCEvent> & __TypechainOutputObject<TCEvent>;
}
export interface TypedLogDescription<TCEvent extends TypedContractEvent> extends Omit<LogDescription, "args"> {
args: __TypechainAOutputTuple<TCEvent> & __TypechainOutputObject<TCEvent>;
}
export type TypedListener<TCEvent extends TypedContractEvent> = (...listenerArg: [
...__TypechainAOutputTuple<TCEvent>,
TypedEventLog<TCEvent>,
...undefined[]
]) => void;
export type MinEthersFactory<C, ARGS> = {
deploy(...a: ARGS[]): Promise<C>;
};
export type GetContractTypeFromFactory<F> = F extends MinEthersFactory<infer C, any> ? C : never;
export type GetARGsTypeFromFactory<F> = F extends MinEthersFactory<any, any> ? Parameters<F["deploy"]> : never;
export type StateMutability = "nonpayable" | "payable" | "view";
export type BaseOverrides = Omit<TransactionRequest, "to" | "data">;
export type NonPayableOverrides = Omit<BaseOverrides, "value" | "blockTag" | "enableCcipRead">;
export type PayableOverrides = Omit<BaseOverrides, "blockTag" | "enableCcipRead">;
export type ViewOverrides = Omit<TransactionRequest, "to" | "data">;
export type Overrides<S extends StateMutability> = S extends "nonpayable" ? NonPayableOverrides : S extends "payable" ? PayableOverrides : ViewOverrides;
export type PostfixOverrides<A extends Array<any>, S extends StateMutability> = A | [...A, Overrides<S>];
export type ContractMethodArgs<A extends Array<any>, S extends StateMutability> = PostfixOverrides<{
[I in keyof A]-?: A[I] | Typed;
}, S>;
export type DefaultReturnType<R> = R extends Array<any> ? R[0] : R;
export interface TypedContractMethod<A extends Array<any> = Array<any>, R = any, S extends StateMutability = "payable"> {
(...args: ContractMethodArgs<A, S>): S extends "view" ? Promise<DefaultReturnType<R>> : Promise<ContractTransactionResponse>;
name: string;
fragment: FunctionFragment;
getFragment(...args: ContractMethodArgs<A, S>): FunctionFragment;
populateTransaction(...args: ContractMethodArgs<A, S>): Promise<ContractTransaction>;
staticCall(...args: ContractMethodArgs<A, "view">): Promise<DefaultReturnType<R>>;
send(...args: ContractMethodArgs<A, S>): Promise<ContractTransactionResponse>;
estimateGas(...args: ContractMethodArgs<A, S>): Promise<bigint>;
staticCallResult(...args: ContractMethodArgs<A, "view">): Promise<R>;
}
export {};

@ -0,0 +1,541 @@
import { type ContractRunner } from "ethers";
import type { ENS, ENSInterface } from "../ENS";
export declare class ENS__factory {
static readonly abi: readonly [{
readonly constant: true;
readonly inputs: readonly [{
readonly internalType: "bytes4";
readonly name: "interfaceID";
readonly type: "bytes4";
}];
readonly name: "supportsInterface";
readonly outputs: readonly [{
readonly internalType: "bool";
readonly name: "";
readonly type: "bool";
}];
readonly payable: false;
readonly stateMutability: "pure";
readonly type: "function";
}, {
readonly constant: false;
readonly inputs: readonly [{
readonly internalType: "bytes32";
readonly name: "node";
readonly type: "bytes32";
}, {
readonly internalType: "string";
readonly name: "key";
readonly type: "string";
}, {
readonly internalType: "string";
readonly name: "value";
readonly type: "string";
}];
readonly name: "setText";
readonly outputs: readonly [];
readonly payable: false;
readonly stateMutability: "nonpayable";
readonly type: "function";
}, {
readonly constant: true;
readonly inputs: readonly [{
readonly internalType: "bytes32";
readonly name: "node";
readonly type: "bytes32";
}, {
readonly internalType: "bytes4";
readonly name: "interfaceID";
readonly type: "bytes4";
}];
readonly name: "interfaceImplementer";
readonly outputs: readonly [{
readonly internalType: "address";
readonly name: "";
readonly type: "address";
}];
readonly payable: false;
readonly stateMutability: "view";
readonly type: "function";
}, {
readonly constant: true;
readonly inputs: readonly [{
readonly internalType: "bytes32";
readonly name: "node";
readonly type: "bytes32";
}, {
readonly internalType: "uint256";
readonly name: "contentTypes";
readonly type: "uint256";
}];
readonly name: "ABI";
readonly outputs: readonly [{
readonly internalType: "uint256";
readonly name: "";
readonly type: "uint256";
}, {
readonly internalType: "bytes";
readonly name: "";
readonly type: "bytes";
}];
readonly payable: false;
readonly stateMutability: "view";
readonly type: "function";
}, {
readonly constant: false;
readonly inputs: readonly [{
readonly internalType: "bytes32";
readonly name: "node";
readonly type: "bytes32";
}, {
readonly internalType: "bytes32";
readonly name: "x";
readonly type: "bytes32";
}, {
readonly internalType: "bytes32";
readonly name: "y";
readonly type: "bytes32";
}];
readonly name: "setPubkey";
readonly outputs: readonly [];
readonly payable: false;
readonly stateMutability: "nonpayable";
readonly type: "function";
}, {
readonly constant: false;
readonly inputs: readonly [{
readonly internalType: "bytes32";
readonly name: "node";
readonly type: "bytes32";
}, {
readonly internalType: "bytes";
readonly name: "hash";
readonly type: "bytes";
}];
readonly name: "setContenthash";
readonly outputs: readonly [];
readonly payable: false;
readonly stateMutability: "nonpayable";
readonly type: "function";
}, {
readonly constant: true;
readonly inputs: readonly [{
readonly internalType: "bytes32";
readonly name: "node";
readonly type: "bytes32";
}];
readonly name: "addr";
readonly outputs: readonly [{
readonly internalType: "address";
readonly name: "";
readonly type: "address";
}];
readonly payable: false;
readonly stateMutability: "view";
readonly type: "function";
}, {
readonly constant: false;
readonly inputs: readonly [{
readonly internalType: "bytes32";
readonly name: "node";
readonly type: "bytes32";
}, {
readonly internalType: "address";
readonly name: "target";
readonly type: "address";
}, {
readonly internalType: "bool";
readonly name: "isAuthorised";
readonly type: "bool";
}];
readonly name: "setAuthorisation";
readonly outputs: readonly [];
readonly payable: false;
readonly stateMutability: "nonpayable";
readonly type: "function";
}, {
readonly constant: true;
readonly inputs: readonly [{
readonly internalType: "bytes32";
readonly name: "node";
readonly type: "bytes32";
}, {
readonly internalType: "string";
readonly name: "key";
readonly type: "string";
}];
readonly name: "text";
readonly outputs: readonly [{
readonly internalType: "string";
readonly name: "";
readonly type: "string";
}];
readonly payable: false;
readonly stateMutability: "view";
readonly type: "function";
}, {
readonly constant: false;
readonly inputs: readonly [{
readonly internalType: "bytes32";
readonly name: "node";
readonly type: "bytes32";
}, {
readonly internalType: "uint256";
readonly name: "contentType";
readonly type: "uint256";
}, {
readonly internalType: "bytes";
readonly name: "data";
readonly type: "bytes";
}];
readonly name: "setABI";
readonly outputs: readonly [];
readonly payable: false;
readonly stateMutability: "nonpayable";
readonly type: "function";
}, {
readonly constant: true;
readonly inputs: readonly [{
readonly internalType: "bytes32";
readonly name: "node";
readonly type: "bytes32";
}];
readonly name: "name";
readonly outputs: readonly [{
readonly internalType: "string";
readonly name: "";
readonly type: "string";
}];
readonly payable: false;
readonly stateMutability: "view";
readonly type: "function";
}, {
readonly constant: false;
readonly inputs: readonly [{
readonly internalType: "bytes32";
readonly name: "node";
readonly type: "bytes32";
}, {
readonly internalType: "string";
readonly name: "name";
readonly type: "string";
}];
readonly name: "setName";
readonly outputs: readonly [];
readonly payable: false;
readonly stateMutability: "nonpayable";
readonly type: "function";
}, {
readonly constant: false;
readonly inputs: readonly [{
readonly internalType: "bytes32";
readonly name: "node";
readonly type: "bytes32";
}, {
readonly internalType: "uint256";
readonly name: "coinType";
readonly type: "uint256";
}, {
readonly internalType: "bytes";
readonly name: "a";
readonly type: "bytes";
}];
readonly name: "setAddr";
readonly outputs: readonly [];
readonly payable: false;
readonly stateMutability: "nonpayable";
readonly type: "function";
}, {
readonly constant: true;
readonly inputs: readonly [{
readonly internalType: "bytes32";
readonly name: "node";
readonly type: "bytes32";
}];
readonly name: "contenthash";
readonly outputs: readonly [{
readonly internalType: "bytes";
readonly name: "";
readonly type: "bytes";
}];
readonly payable: false;
readonly stateMutability: "view";
readonly type: "function";
}, {
readonly constant: true;
readonly inputs: readonly [{
readonly internalType: "bytes32";
readonly name: "node";
readonly type: "bytes32";
}];
readonly name: "pubkey";
readonly outputs: readonly [{
readonly internalType: "bytes32";
readonly name: "x";
readonly type: "bytes32";
}, {
readonly internalType: "bytes32";
readonly name: "y";
readonly type: "bytes32";
}];
readonly payable: false;
readonly stateMutability: "view";
readonly type: "function";
}, {
readonly constant: false;
readonly inputs: readonly [{
readonly internalType: "bytes32";
readonly name: "node";
readonly type: "bytes32";
}, {
readonly internalType: "address";
readonly name: "a";
readonly type: "address";
}];
readonly name: "setAddr";
readonly outputs: readonly [];
readonly payable: false;
readonly stateMutability: "nonpayable";
readonly type: "function";
}, {
readonly constant: false;
readonly inputs: readonly [{
readonly internalType: "bytes32";
readonly name: "node";
readonly type: "bytes32";
}, {
readonly internalType: "bytes4";
readonly name: "interfaceID";
readonly type: "bytes4";
}, {
readonly internalType: "address";
readonly name: "implementer";
readonly type: "address";
}];
readonly name: "setInterface";
readonly outputs: readonly [];
readonly payable: false;
readonly stateMutability: "nonpayable";
readonly type: "function";
}, {
readonly constant: true;
readonly inputs: readonly [{
readonly internalType: "bytes32";
readonly name: "node";
readonly type: "bytes32";
}, {
readonly internalType: "uint256";
readonly name: "coinType";
readonly type: "uint256";
}];
readonly name: "addr";
readonly outputs: readonly [{
readonly internalType: "bytes";
readonly name: "";
readonly type: "bytes";
}];
readonly payable: false;
readonly stateMutability: "view";
readonly type: "function";
}, {
readonly constant: true;
readonly inputs: readonly [{
readonly internalType: "bytes32";
readonly name: "";
readonly type: "bytes32";
}, {
readonly internalType: "address";
readonly name: "";
readonly type: "address";
}, {
readonly internalType: "address";
readonly name: "";
readonly type: "address";
}];
readonly name: "authorisations";
readonly outputs: readonly [{
readonly internalType: "bool";
readonly name: "";
readonly type: "bool";
}];
readonly payable: false;
readonly stateMutability: "view";
readonly type: "function";
}, {
readonly inputs: readonly [{
readonly internalType: "contract ENS";
readonly name: "_ens";
readonly type: "address";
}];
readonly payable: false;
readonly stateMutability: "nonpayable";
readonly type: "constructor";
}, {
readonly anonymous: false;
readonly inputs: readonly [{
readonly indexed: true;
readonly internalType: "bytes32";
readonly name: "node";
readonly type: "bytes32";
}, {
readonly indexed: true;
readonly internalType: "address";
readonly name: "owner";
readonly type: "address";
}, {
readonly indexed: true;
readonly internalType: "address";
readonly name: "target";
readonly type: "address";
}, {
readonly indexed: false;
readonly internalType: "bool";
readonly name: "isAuthorised";
readonly type: "bool";
}];
readonly name: "AuthorisationChanged";
readonly type: "event";
}, {
readonly anonymous: false;
readonly inputs: readonly [{
readonly indexed: true;
readonly internalType: "bytes32";
readonly name: "node";
readonly type: "bytes32";
}, {
readonly indexed: false;
readonly internalType: "string";
readonly name: "indexedKey";
readonly type: "string";
}, {
readonly indexed: false;
readonly internalType: "string";
readonly name: "key";
readonly type: "string";
}];
readonly name: "TextChanged";
readonly type: "event";
}, {
readonly anonymous: false;
readonly inputs: readonly [{
readonly indexed: true;
readonly internalType: "bytes32";
readonly name: "node";
readonly type: "bytes32";
}, {
readonly indexed: false;
readonly internalType: "bytes32";
readonly name: "x";
readonly type: "bytes32";
}, {
readonly indexed: false;
readonly internalType: "bytes32";
readonly name: "y";
readonly type: "bytes32";
}];
readonly name: "PubkeyChanged";
readonly type: "event";
}, {
readonly anonymous: false;
readonly inputs: readonly [{
readonly indexed: true;
readonly internalType: "bytes32";
readonly name: "node";
readonly type: "bytes32";
}, {
readonly indexed: false;
readonly internalType: "string";
readonly name: "name";
readonly type: "string";
}];
readonly name: "NameChanged";
readonly type: "event";
}, {
readonly anonymous: false;
readonly inputs: readonly [{
readonly indexed: true;
readonly internalType: "bytes32";
readonly name: "node";
readonly type: "bytes32";
}, {
readonly indexed: true;
readonly internalType: "bytes4";
readonly name: "interfaceID";
readonly type: "bytes4";
}, {
readonly indexed: false;
readonly internalType: "address";
readonly name: "implementer";
readonly type: "address";
}];
readonly name: "InterfaceChanged";
readonly type: "event";
}, {
readonly anonymous: false;
readonly inputs: readonly [{
readonly indexed: true;
readonly internalType: "bytes32";
readonly name: "node";
readonly type: "bytes32";
}, {
readonly indexed: false;
readonly internalType: "bytes";
readonly name: "hash";
readonly type: "bytes";
}];
readonly name: "ContenthashChanged";
readonly type: "event";
}, {
readonly anonymous: false;
readonly inputs: readonly [{
readonly indexed: true;
readonly internalType: "bytes32";
readonly name: "node";
readonly type: "bytes32";
}, {
readonly indexed: false;
readonly internalType: "address";
readonly name: "a";
readonly type: "address";
}];
readonly name: "AddrChanged";
readonly type: "event";
}, {
readonly anonymous: false;
readonly inputs: readonly [{
readonly indexed: true;
readonly internalType: "bytes32";
readonly name: "node";
readonly type: "bytes32";
}, {
readonly indexed: false;
readonly internalType: "uint256";
readonly name: "coinType";
readonly type: "uint256";
}, {
readonly indexed: false;
readonly internalType: "bytes";
readonly name: "newAddress";
readonly type: "bytes";
}];
readonly name: "AddressChanged";
readonly type: "event";
}, {
readonly anonymous: false;
readonly inputs: readonly [{
readonly indexed: true;
readonly internalType: "bytes32";
readonly name: "node";
readonly type: "bytes32";
}, {
readonly indexed: true;
readonly internalType: "uint256";
readonly name: "contentType";
readonly type: "uint256";
}];
readonly name: "ABIChanged";
readonly type: "event";
}];
static createInterface(): ENSInterface;
static connect(address: string, runner?: ContractRunner | null): ENS;
}

@ -0,0 +1,243 @@
import { type ContractRunner } from "ethers";
import type { ERC20, ERC20Interface } from "../ERC20";
export declare class ERC20__factory {
static readonly abi: readonly [{
readonly constant: true;
readonly inputs: readonly [];
readonly name: "totalSupply";
readonly outputs: readonly [{
readonly internalType: "uint256";
readonly name: "";
readonly type: "uint256";
}];
readonly payable: false;
readonly stateMutability: "view";
readonly type: "function";
}, {
readonly constant: true;
readonly inputs: readonly [];
readonly name: "_totalSupply";
readonly outputs: readonly [{
readonly internalType: "uint256";
readonly name: "";
readonly type: "uint256";
}];
readonly payable: false;
readonly stateMutability: "view";
readonly type: "function";
}, {
readonly constant: true;
readonly inputs: readonly [{
readonly internalType: "address";
readonly name: "who";
readonly type: "address";
}];
readonly name: "balanceOf";
readonly outputs: readonly [{
readonly internalType: "uint256";
readonly name: "";
readonly type: "uint256";
}];
readonly payable: false;
readonly stateMutability: "view";
readonly type: "function";
}, {
readonly constant: true;
readonly inputs: readonly [];
readonly name: "name";
readonly outputs: readonly [{
readonly internalType: "string";
readonly name: "";
readonly type: "string";
}];
readonly payable: false;
readonly stateMutability: "view";
readonly type: "function";
}, {
readonly constant: true;
readonly inputs: readonly [];
readonly name: "symbol";
readonly outputs: readonly [{
readonly internalType: "string";
readonly name: "";
readonly type: "string";
}];
readonly payable: false;
readonly stateMutability: "view";
readonly type: "function";
}, {
readonly constant: true;
readonly inputs: readonly [];
readonly name: "decimals";
readonly outputs: readonly [{
readonly internalType: "uint8";
readonly name: "";
readonly type: "uint8";
}];
readonly payable: false;
readonly stateMutability: "view";
readonly type: "function";
}, {
readonly constant: false;
readonly inputs: readonly [{
readonly internalType: "address";
readonly name: "to";
readonly type: "address";
}, {
readonly internalType: "uint256";
readonly name: "value";
readonly type: "uint256";
}];
readonly name: "transfer";
readonly outputs: readonly [];
readonly payable: false;
readonly stateMutability: "nonpayable";
readonly type: "function";
}, {
readonly anonymous: false;
readonly inputs: readonly [{
readonly indexed: true;
readonly internalType: "address";
readonly name: "owner";
readonly type: "address";
}, {
readonly indexed: true;
readonly internalType: "address";
readonly name: "spender";
readonly type: "address";
}, {
readonly indexed: false;
readonly internalType: "uint256";
readonly name: "value";
readonly type: "uint256";
}];
readonly name: "Approval";
readonly type: "event";
}, {
readonly anonymous: false;
readonly inputs: readonly [{
readonly indexed: true;
readonly internalType: "address";
readonly name: "from";
readonly type: "address";
}, {
readonly indexed: true;
readonly internalType: "address";
readonly name: "to";
readonly type: "address";
}, {
readonly indexed: false;
readonly internalType: "uint256";
readonly name: "value";
readonly type: "uint256";
}];
readonly name: "Transfer";
readonly type: "event";
}, {
readonly constant: true;
readonly inputs: readonly [{
readonly internalType: "address";
readonly name: "owner";
readonly type: "address";
}, {
readonly internalType: "address";
readonly name: "spender";
readonly type: "address";
}];
readonly name: "allowance";
readonly outputs: readonly [{
readonly internalType: "uint256";
readonly name: "";
readonly type: "uint256";
}];
readonly payable: false;
readonly stateMutability: "view";
readonly type: "function";
}, {
readonly constant: false;
readonly inputs: readonly [{
readonly internalType: "address";
readonly name: "from";
readonly type: "address";
}, {
readonly internalType: "address";
readonly name: "to";
readonly type: "address";
}, {
readonly internalType: "uint256";
readonly name: "value";
readonly type: "uint256";
}];
readonly name: "transferFrom";
readonly outputs: readonly [];
readonly payable: false;
readonly stateMutability: "nonpayable";
readonly type: "function";
}, {
readonly constant: false;
readonly inputs: readonly [{
readonly internalType: "address";
readonly name: "spender";
readonly type: "address";
}, {
readonly internalType: "uint256";
readonly name: "value";
readonly type: "uint256";
}];
readonly name: "approve";
readonly outputs: readonly [];
readonly payable: false;
readonly stateMutability: "nonpayable";
readonly type: "function";
}, {
readonly inputs: readonly [{
readonly internalType: "address";
readonly name: "owner";
readonly type: "address";
}];
readonly name: "nonces";
readonly outputs: readonly [{
readonly internalType: "uint256";
readonly name: "";
readonly type: "uint256";
}];
readonly stateMutability: "view";
readonly type: "function";
}, {
readonly inputs: readonly [{
readonly internalType: "address";
readonly name: "owner";
readonly type: "address";
}, {
readonly internalType: "address";
readonly name: "spender";
readonly type: "address";
}, {
readonly internalType: "uint256";
readonly name: "amount";
readonly type: "uint256";
}, {
readonly internalType: "uint256";
readonly name: "deadline";
readonly type: "uint256";
}, {
readonly internalType: "uint8";
readonly name: "v";
readonly type: "uint8";
}, {
readonly internalType: "bytes32";
readonly name: "r";
readonly type: "bytes32";
}, {
readonly internalType: "bytes32";
readonly name: "s";
readonly type: "bytes32";
}];
readonly name: "permit";
readonly outputs: readonly [];
readonly stateMutability: "nonpayable";
readonly type: "function";
}];
static createInterface(): ERC20Interface;
static connect(address: string, runner?: ContractRunner | null): ERC20;
}

@ -0,0 +1,151 @@
import { type ContractRunner } from "ethers";
import type { GasPriceOracle, GasPriceOracleInterface } from "../GasPriceOracle";
export declare class GasPriceOracle__factory {
static readonly abi: readonly [{
readonly inputs: readonly [];
readonly stateMutability: "nonpayable";
readonly type: "constructor";
}, {
readonly inputs: readonly [];
readonly name: "GAS_UNIT";
readonly outputs: readonly [{
readonly internalType: "uint256";
readonly name: "";
readonly type: "uint256";
}];
readonly stateMutability: "view";
readonly type: "function";
}, {
readonly inputs: readonly [{
readonly internalType: "uint32";
readonly name: "_derivationThresold";
readonly type: "uint32";
}];
readonly name: "changeDerivationThresold";
readonly outputs: readonly [];
readonly stateMutability: "nonpayable";
readonly type: "function";
}, {
readonly inputs: readonly [{
readonly internalType: "uint32";
readonly name: "_gasUnit";
readonly type: "uint32";
}];
readonly name: "changeGasUnit";
readonly outputs: readonly [];
readonly stateMutability: "nonpayable";
readonly type: "function";
}, {
readonly inputs: readonly [{
readonly internalType: "uint32";
readonly name: "_heartbeat";
readonly type: "uint32";
}];
readonly name: "changeHeartbeat";
readonly outputs: readonly [];
readonly stateMutability: "nonpayable";
readonly type: "function";
}, {
readonly inputs: readonly [{
readonly internalType: "address";
readonly name: "_owner";
readonly type: "address";
}];
readonly name: "changeOwnership";
readonly outputs: readonly [];
readonly stateMutability: "nonpayable";
readonly type: "function";
}, {
readonly inputs: readonly [];
readonly name: "derivationThresold";
readonly outputs: readonly [{
readonly internalType: "uint32";
readonly name: "";
readonly type: "uint32";
}];
readonly stateMutability: "view";
readonly type: "function";
}, {
readonly inputs: readonly [];
readonly name: "gasPrice";
readonly outputs: readonly [{
readonly internalType: "uint256";
readonly name: "";
readonly type: "uint256";
}];
readonly stateMutability: "view";
readonly type: "function";
}, {
readonly inputs: readonly [];
readonly name: "heartbeat";
readonly outputs: readonly [{
readonly internalType: "uint32";
readonly name: "";
readonly type: "uint32";
}];
readonly stateMutability: "view";
readonly type: "function";
}, {
readonly inputs: readonly [];
readonly name: "maxFeePerGas";
readonly outputs: readonly [{
readonly internalType: "uint256";
readonly name: "";
readonly type: "uint256";
}];
readonly stateMutability: "view";
readonly type: "function";
}, {
readonly inputs: readonly [];
readonly name: "maxPriorityFeePerGas";
readonly outputs: readonly [{
readonly internalType: "uint256";
readonly name: "";
readonly type: "uint256";
}];
readonly stateMutability: "view";
readonly type: "function";
}, {
readonly inputs: readonly [];
readonly name: "owner";
readonly outputs: readonly [{
readonly internalType: "address";
readonly name: "";
readonly type: "address";
}];
readonly stateMutability: "view";
readonly type: "function";
}, {
readonly inputs: readonly [];
readonly name: "pastGasPrice";
readonly outputs: readonly [{
readonly internalType: "uint32";
readonly name: "";
readonly type: "uint32";
}];
readonly stateMutability: "view";
readonly type: "function";
}, {
readonly inputs: readonly [{
readonly internalType: "uint32";
readonly name: "_gasPrice";
readonly type: "uint32";
}];
readonly name: "setGasPrice";
readonly outputs: readonly [];
readonly stateMutability: "nonpayable";
readonly type: "function";
}, {
readonly inputs: readonly [];
readonly name: "timestamp";
readonly outputs: readonly [{
readonly internalType: "uint32";
readonly name: "";
readonly type: "uint32";
}];
readonly stateMutability: "view";
readonly type: "function";
}];
static createInterface(): GasPriceOracleInterface;
static connect(address: string, runner?: ContractRunner | null): GasPriceOracle;
}

@ -0,0 +1,338 @@
import { type ContractRunner } from "ethers";
import type { Multicall, MulticallInterface } from "../Multicall";
export declare class Multicall__factory {
static readonly abi: readonly [{
readonly inputs: readonly [{
readonly components: readonly [{
readonly internalType: "address";
readonly name: "target";
readonly type: "address";
}, {
readonly internalType: "bytes";
readonly name: "callData";
readonly type: "bytes";
}];
readonly internalType: "struct Multicall3.Call[]";
readonly name: "calls";
readonly type: "tuple[]";
}];
readonly name: "aggregate";
readonly outputs: readonly [{
readonly internalType: "uint256";
readonly name: "blockNumber";
readonly type: "uint256";
}, {
readonly internalType: "bytes[]";
readonly name: "returnData";
readonly type: "bytes[]";
}];
readonly stateMutability: "payable";
readonly type: "function";
}, {
readonly inputs: readonly [{
readonly components: readonly [{
readonly internalType: "address";
readonly name: "target";
readonly type: "address";
}, {
readonly internalType: "bool";
readonly name: "allowFailure";
readonly type: "bool";
}, {
readonly internalType: "bytes";
readonly name: "callData";
readonly type: "bytes";
}];
readonly internalType: "struct Multicall3.Call3[]";
readonly name: "calls";
readonly type: "tuple[]";
}];
readonly name: "aggregate3";
readonly outputs: readonly [{
readonly components: readonly [{
readonly internalType: "bool";
readonly name: "success";
readonly type: "bool";
}, {
readonly internalType: "bytes";
readonly name: "returnData";
readonly type: "bytes";
}];
readonly internalType: "struct Multicall3.Result[]";
readonly name: "returnData";
readonly type: "tuple[]";
}];
readonly stateMutability: "payable";
readonly type: "function";
}, {
readonly inputs: readonly [{
readonly components: readonly [{
readonly internalType: "address";
readonly name: "target";
readonly type: "address";
}, {
readonly internalType: "bool";
readonly name: "allowFailure";
readonly type: "bool";
}, {
readonly internalType: "uint256";
readonly name: "value";
readonly type: "uint256";
}, {
readonly internalType: "bytes";
readonly name: "callData";
readonly type: "bytes";
}];
readonly internalType: "struct Multicall3.Call3Value[]";
readonly name: "calls";
readonly type: "tuple[]";
}];
readonly name: "aggregate3Value";
readonly outputs: readonly [{
readonly components: readonly [{
readonly internalType: "bool";
readonly name: "success";
readonly type: "bool";
}, {
readonly internalType: "bytes";
readonly name: "returnData";
readonly type: "bytes";
}];
readonly internalType: "struct Multicall3.Result[]";
readonly name: "returnData";
readonly type: "tuple[]";
}];
readonly stateMutability: "payable";
readonly type: "function";
}, {
readonly inputs: readonly [{
readonly components: readonly [{
readonly internalType: "address";
readonly name: "target";
readonly type: "address";
}, {
readonly internalType: "bytes";
readonly name: "callData";
readonly type: "bytes";
}];
readonly internalType: "struct Multicall3.Call[]";
readonly name: "calls";
readonly type: "tuple[]";
}];
readonly name: "blockAndAggregate";
readonly outputs: readonly [{
readonly internalType: "uint256";
readonly name: "blockNumber";
readonly type: "uint256";
}, {
readonly internalType: "bytes32";
readonly name: "blockHash";
readonly type: "bytes32";
}, {
readonly components: readonly [{
readonly internalType: "bool";
readonly name: "success";
readonly type: "bool";
}, {
readonly internalType: "bytes";
readonly name: "returnData";
readonly type: "bytes";
}];
readonly internalType: "struct Multicall3.Result[]";
readonly name: "returnData";
readonly type: "tuple[]";
}];
readonly stateMutability: "payable";
readonly type: "function";
}, {
readonly inputs: readonly [];
readonly name: "getBasefee";
readonly outputs: readonly [{
readonly internalType: "uint256";
readonly name: "basefee";
readonly type: "uint256";
}];
readonly stateMutability: "view";
readonly type: "function";
}, {
readonly inputs: readonly [{
readonly internalType: "uint256";
readonly name: "blockNumber";
readonly type: "uint256";
}];
readonly name: "getBlockHash";
readonly outputs: readonly [{
readonly internalType: "bytes32";
readonly name: "blockHash";
readonly type: "bytes32";
}];
readonly stateMutability: "view";
readonly type: "function";
}, {
readonly inputs: readonly [];
readonly name: "getBlockNumber";
readonly outputs: readonly [{
readonly internalType: "uint256";
readonly name: "blockNumber";
readonly type: "uint256";
}];
readonly stateMutability: "view";
readonly type: "function";
}, {
readonly inputs: readonly [];
readonly name: "getChainId";
readonly outputs: readonly [{
readonly internalType: "uint256";
readonly name: "chainid";
readonly type: "uint256";
}];
readonly stateMutability: "view";
readonly type: "function";
}, {
readonly inputs: readonly [];
readonly name: "getCurrentBlockCoinbase";
readonly outputs: readonly [{
readonly internalType: "address";
readonly name: "coinbase";
readonly type: "address";
}];
readonly stateMutability: "view";
readonly type: "function";
}, {
readonly inputs: readonly [];
readonly name: "getCurrentBlockDifficulty";
readonly outputs: readonly [{
readonly internalType: "uint256";
readonly name: "difficulty";
readonly type: "uint256";
}];
readonly stateMutability: "view";
readonly type: "function";
}, {
readonly inputs: readonly [];
readonly name: "getCurrentBlockGasLimit";
readonly outputs: readonly [{
readonly internalType: "uint256";
readonly name: "gaslimit";
readonly type: "uint256";
}];
readonly stateMutability: "view";
readonly type: "function";
}, {
readonly inputs: readonly [];
readonly name: "getCurrentBlockTimestamp";
readonly outputs: readonly [{
readonly internalType: "uint256";
readonly name: "timestamp";
readonly type: "uint256";
}];
readonly stateMutability: "view";
readonly type: "function";
}, {
readonly inputs: readonly [{
readonly internalType: "address";
readonly name: "addr";
readonly type: "address";
}];
readonly name: "getEthBalance";
readonly outputs: readonly [{
readonly internalType: "uint256";
readonly name: "balance";
readonly type: "uint256";
}];
readonly stateMutability: "view";
readonly type: "function";
}, {
readonly inputs: readonly [];
readonly name: "getLastBlockHash";
readonly outputs: readonly [{
readonly internalType: "bytes32";
readonly name: "blockHash";
readonly type: "bytes32";
}];
readonly stateMutability: "view";
readonly type: "function";
}, {
readonly inputs: readonly [{
readonly internalType: "bool";
readonly name: "requireSuccess";
readonly type: "bool";
}, {
readonly components: readonly [{
readonly internalType: "address";
readonly name: "target";
readonly type: "address";
}, {
readonly internalType: "bytes";
readonly name: "callData";
readonly type: "bytes";
}];
readonly internalType: "struct Multicall3.Call[]";
readonly name: "calls";
readonly type: "tuple[]";
}];
readonly name: "tryAggregate";
readonly outputs: readonly [{
readonly components: readonly [{
readonly internalType: "bool";
readonly name: "success";
readonly type: "bool";
}, {
readonly internalType: "bytes";
readonly name: "returnData";
readonly type: "bytes";
}];
readonly internalType: "struct Multicall3.Result[]";
readonly name: "returnData";
readonly type: "tuple[]";
}];
readonly stateMutability: "payable";
readonly type: "function";
}, {
readonly inputs: readonly [{
readonly internalType: "bool";
readonly name: "requireSuccess";
readonly type: "bool";
}, {
readonly components: readonly [{
readonly internalType: "address";
readonly name: "target";
readonly type: "address";
}, {
readonly internalType: "bytes";
readonly name: "callData";
readonly type: "bytes";
}];
readonly internalType: "struct Multicall3.Call[]";
readonly name: "calls";
readonly type: "tuple[]";
}];
readonly name: "tryBlockAndAggregate";
readonly outputs: readonly [{
readonly internalType: "uint256";
readonly name: "blockNumber";
readonly type: "uint256";
}, {
readonly internalType: "bytes32";
readonly name: "blockHash";
readonly type: "bytes32";
}, {
readonly components: readonly [{
readonly internalType: "bool";
readonly name: "success";
readonly type: "bool";
}, {
readonly internalType: "bytes";
readonly name: "returnData";
readonly type: "bytes";
}];
readonly internalType: "struct Multicall3.Result[]";
readonly name: "returnData";
readonly type: "tuple[]";
}];
readonly stateMutability: "payable";
readonly type: "function";
}];
static createInterface(): MulticallInterface;
static connect(address: string, runner?: ContractRunner | null): Multicall;
}

@ -0,0 +1,404 @@
import { type ContractRunner } from "ethers";
import type { OffchainOracle, OffchainOracleInterface } from "../OffchainOracle";
export declare class OffchainOracle__factory {
static readonly abi: readonly [{
readonly inputs: readonly [{
readonly internalType: "contract MultiWrapper";
readonly name: "_multiWrapper";
readonly type: "address";
}, {
readonly internalType: "contract IOracle[]";
readonly name: "existingOracles";
readonly type: "address[]";
}, {
readonly internalType: "enum OffchainOracle.OracleType[]";
readonly name: "oracleTypes";
readonly type: "uint8[]";
}, {
readonly internalType: "contract IERC20[]";
readonly name: "existingConnectors";
readonly type: "address[]";
}, {
readonly internalType: "contract IERC20";
readonly name: "wBase";
readonly type: "address";
}, {
readonly internalType: "address";
readonly name: "owner";
readonly type: "address";
}];
readonly stateMutability: "nonpayable";
readonly type: "constructor";
}, {
readonly inputs: readonly [];
readonly name: "ArraysLengthMismatch";
readonly type: "error";
}, {
readonly inputs: readonly [];
readonly name: "ConnectorAlreadyAdded";
readonly type: "error";
}, {
readonly inputs: readonly [];
readonly name: "InvalidOracleTokenKind";
readonly type: "error";
}, {
readonly inputs: readonly [];
readonly name: "OracleAlreadyAdded";
readonly type: "error";
}, {
readonly inputs: readonly [];
readonly name: "SameTokens";
readonly type: "error";
}, {
readonly inputs: readonly [];
readonly name: "TooBigThreshold";
readonly type: "error";
}, {
readonly inputs: readonly [];
readonly name: "UnknownConnector";
readonly type: "error";
}, {
readonly inputs: readonly [];
readonly name: "UnknownOracle";
readonly type: "error";
}, {
readonly anonymous: false;
readonly inputs: readonly [{
readonly indexed: false;
readonly internalType: "contract IERC20";
readonly name: "connector";
readonly type: "address";
}];
readonly name: "ConnectorAdded";
readonly type: "event";
}, {
readonly anonymous: false;
readonly inputs: readonly [{
readonly indexed: false;
readonly internalType: "contract IERC20";
readonly name: "connector";
readonly type: "address";
}];
readonly name: "ConnectorRemoved";
readonly type: "event";
}, {
readonly anonymous: false;
readonly inputs: readonly [{
readonly indexed: false;
readonly internalType: "contract MultiWrapper";
readonly name: "multiWrapper";
readonly type: "address";
}];
readonly name: "MultiWrapperUpdated";
readonly type: "event";
}, {
readonly anonymous: false;
readonly inputs: readonly [{
readonly indexed: false;
readonly internalType: "contract IOracle";
readonly name: "oracle";
readonly type: "address";
}, {
readonly indexed: false;
readonly internalType: "enum OffchainOracle.OracleType";
readonly name: "oracleType";
readonly type: "uint8";
}];
readonly name: "OracleAdded";
readonly type: "event";
}, {
readonly anonymous: false;
readonly inputs: readonly [{
readonly indexed: false;
readonly internalType: "contract IOracle";
readonly name: "oracle";
readonly type: "address";
}, {
readonly indexed: false;
readonly internalType: "enum OffchainOracle.OracleType";
readonly name: "oracleType";
readonly type: "uint8";
}];
readonly name: "OracleRemoved";
readonly type: "event";
}, {
readonly anonymous: false;
readonly inputs: readonly [{
readonly indexed: true;
readonly internalType: "address";
readonly name: "previousOwner";
readonly type: "address";
}, {
readonly indexed: true;
readonly internalType: "address";
readonly name: "newOwner";
readonly type: "address";
}];
readonly name: "OwnershipTransferred";
readonly type: "event";
}, {
readonly inputs: readonly [{
readonly internalType: "contract IERC20";
readonly name: "connector";
readonly type: "address";
}];
readonly name: "addConnector";
readonly outputs: readonly [];
readonly stateMutability: "nonpayable";
readonly type: "function";
}, {
readonly inputs: readonly [{
readonly internalType: "contract IOracle";
readonly name: "oracle";
readonly type: "address";
}, {
readonly internalType: "enum OffchainOracle.OracleType";
readonly name: "oracleKind";
readonly type: "uint8";
}];
readonly name: "addOracle";
readonly outputs: readonly [];
readonly stateMutability: "nonpayable";
readonly type: "function";
}, {
readonly inputs: readonly [];
readonly name: "connectors";
readonly outputs: readonly [{
readonly internalType: "contract IERC20[]";
readonly name: "allConnectors";
readonly type: "address[]";
}];
readonly stateMutability: "view";
readonly type: "function";
}, {
readonly inputs: readonly [{
readonly internalType: "contract IERC20";
readonly name: "srcToken";
readonly type: "address";
}, {
readonly internalType: "contract IERC20";
readonly name: "dstToken";
readonly type: "address";
}, {
readonly internalType: "bool";
readonly name: "useWrappers";
readonly type: "bool";
}];
readonly name: "getRate";
readonly outputs: readonly [{
readonly internalType: "uint256";
readonly name: "weightedRate";
readonly type: "uint256";
}];
readonly stateMutability: "view";
readonly type: "function";
}, {
readonly inputs: readonly [{
readonly internalType: "contract IERC20";
readonly name: "srcToken";
readonly type: "address";
}, {
readonly internalType: "bool";
readonly name: "useSrcWrappers";
readonly type: "bool";
}];
readonly name: "getRateToEth";
readonly outputs: readonly [{
readonly internalType: "uint256";
readonly name: "weightedRate";
readonly type: "uint256";
}];
readonly stateMutability: "view";
readonly type: "function";
}, {
readonly inputs: readonly [{
readonly internalType: "contract IERC20";
readonly name: "srcToken";
readonly type: "address";
}, {
readonly internalType: "bool";
readonly name: "useSrcWrappers";
readonly type: "bool";
}, {
readonly internalType: "contract IERC20[]";
readonly name: "customConnectors";
readonly type: "address[]";
}, {
readonly internalType: "uint256";
readonly name: "thresholdFilter";
readonly type: "uint256";
}];
readonly name: "getRateToEthWithCustomConnectors";
readonly outputs: readonly [{
readonly internalType: "uint256";
readonly name: "weightedRate";
readonly type: "uint256";
}];
readonly stateMutability: "view";
readonly type: "function";
}, {
readonly inputs: readonly [{
readonly internalType: "contract IERC20";
readonly name: "srcToken";
readonly type: "address";
}, {
readonly internalType: "bool";
readonly name: "useSrcWrappers";
readonly type: "bool";
}, {
readonly internalType: "uint256";
readonly name: "thresholdFilter";
readonly type: "uint256";
}];
readonly name: "getRateToEthWithThreshold";
readonly outputs: readonly [{
readonly internalType: "uint256";
readonly name: "weightedRate";
readonly type: "uint256";
}];
readonly stateMutability: "view";
readonly type: "function";
}, {
readonly inputs: readonly [{
readonly internalType: "contract IERC20";
readonly name: "srcToken";
readonly type: "address";
}, {
readonly internalType: "contract IERC20";
readonly name: "dstToken";
readonly type: "address";
}, {
readonly internalType: "bool";
readonly name: "useWrappers";
readonly type: "bool";
}, {
readonly internalType: "contract IERC20[]";
readonly name: "customConnectors";
readonly type: "address[]";
}, {
readonly internalType: "uint256";
readonly name: "thresholdFilter";
readonly type: "uint256";
}];
readonly name: "getRateWithCustomConnectors";
readonly outputs: readonly [{
readonly internalType: "uint256";
readonly name: "weightedRate";
readonly type: "uint256";
}];
readonly stateMutability: "view";
readonly type: "function";
}, {
readonly inputs: readonly [{
readonly internalType: "contract IERC20";
readonly name: "srcToken";
readonly type: "address";
}, {
readonly internalType: "contract IERC20";
readonly name: "dstToken";
readonly type: "address";
}, {
readonly internalType: "bool";
readonly name: "useWrappers";
readonly type: "bool";
}, {
readonly internalType: "uint256";
readonly name: "thresholdFilter";
readonly type: "uint256";
}];
readonly name: "getRateWithThreshold";
readonly outputs: readonly [{
readonly internalType: "uint256";
readonly name: "weightedRate";
readonly type: "uint256";
}];
readonly stateMutability: "view";
readonly type: "function";
}, {
readonly inputs: readonly [];
readonly name: "multiWrapper";
readonly outputs: readonly [{
readonly internalType: "contract MultiWrapper";
readonly name: "";
readonly type: "address";
}];
readonly stateMutability: "view";
readonly type: "function";
}, {
readonly inputs: readonly [];
readonly name: "oracles";
readonly outputs: readonly [{
readonly internalType: "contract IOracle[]";
readonly name: "allOracles";
readonly type: "address[]";
}, {
readonly internalType: "enum OffchainOracle.OracleType[]";
readonly name: "oracleTypes";
readonly type: "uint8[]";
}];
readonly stateMutability: "view";
readonly type: "function";
}, {
readonly inputs: readonly [];
readonly name: "owner";
readonly outputs: readonly [{
readonly internalType: "address";
readonly name: "";
readonly type: "address";
}];
readonly stateMutability: "view";
readonly type: "function";
}, {
readonly inputs: readonly [{
readonly internalType: "contract IERC20";
readonly name: "connector";
readonly type: "address";
}];
readonly name: "removeConnector";
readonly outputs: readonly [];
readonly stateMutability: "nonpayable";
readonly type: "function";
}, {
readonly inputs: readonly [{
readonly internalType: "contract IOracle";
readonly name: "oracle";
readonly type: "address";
}, {
readonly internalType: "enum OffchainOracle.OracleType";
readonly name: "oracleKind";
readonly type: "uint8";
}];
readonly name: "removeOracle";
readonly outputs: readonly [];
readonly stateMutability: "nonpayable";
readonly type: "function";
}, {
readonly inputs: readonly [];
readonly name: "renounceOwnership";
readonly outputs: readonly [];
readonly stateMutability: "nonpayable";
readonly type: "function";
}, {
readonly inputs: readonly [{
readonly internalType: "contract MultiWrapper";
readonly name: "_multiWrapper";
readonly type: "address";
}];
readonly name: "setMultiWrapper";
readonly outputs: readonly [];
readonly stateMutability: "nonpayable";
readonly type: "function";
}, {
readonly inputs: readonly [{
readonly internalType: "address";
readonly name: "newOwner";
readonly type: "address";
}];
readonly name: "transferOwnership";
readonly outputs: readonly [];
readonly stateMutability: "nonpayable";
readonly type: "function";
}];
static createInterface(): OffchainOracleInterface;
static connect(address: string, runner?: ContractRunner | null): OffchainOracle;
}

@ -0,0 +1,234 @@
import { type ContractRunner } from "ethers";
import type { OvmGasPriceOracle, OvmGasPriceOracleInterface } from "../OvmGasPriceOracle";
export declare class OvmGasPriceOracle__factory {
static readonly abi: readonly [{
readonly inputs: readonly [{
readonly internalType: "address";
readonly name: "_owner";
readonly type: "address";
}];
readonly stateMutability: "nonpayable";
readonly type: "constructor";
}, {
readonly anonymous: false;
readonly inputs: readonly [{
readonly indexed: false;
readonly internalType: "uint256";
readonly name: "";
readonly type: "uint256";
}];
readonly name: "DecimalsUpdated";
readonly type: "event";
}, {
readonly anonymous: false;
readonly inputs: readonly [{
readonly indexed: false;
readonly internalType: "uint256";
readonly name: "";
readonly type: "uint256";
}];
readonly name: "GasPriceUpdated";
readonly type: "event";
}, {
readonly anonymous: false;
readonly inputs: readonly [{
readonly indexed: false;
readonly internalType: "uint256";
readonly name: "";
readonly type: "uint256";
}];
readonly name: "L1BaseFeeUpdated";
readonly type: "event";
}, {
readonly anonymous: false;
readonly inputs: readonly [{
readonly indexed: false;
readonly internalType: "uint256";
readonly name: "";
readonly type: "uint256";
}];
readonly name: "OverheadUpdated";
readonly type: "event";
}, {
readonly anonymous: false;
readonly inputs: readonly [{
readonly indexed: true;
readonly internalType: "address";
readonly name: "previousOwner";
readonly type: "address";
}, {
readonly indexed: true;
readonly internalType: "address";
readonly name: "newOwner";
readonly type: "address";
}];
readonly name: "OwnershipTransferred";
readonly type: "event";
}, {
readonly anonymous: false;
readonly inputs: readonly [{
readonly indexed: false;
readonly internalType: "uint256";
readonly name: "";
readonly type: "uint256";
}];
readonly name: "ScalarUpdated";
readonly type: "event";
}, {
readonly inputs: readonly [];
readonly name: "decimals";
readonly outputs: readonly [{
readonly internalType: "uint256";
readonly name: "";
readonly type: "uint256";
}];
readonly stateMutability: "view";
readonly type: "function";
}, {
readonly inputs: readonly [];
readonly name: "gasPrice";
readonly outputs: readonly [{
readonly internalType: "uint256";
readonly name: "";
readonly type: "uint256";
}];
readonly stateMutability: "view";
readonly type: "function";
}, {
readonly inputs: readonly [{
readonly internalType: "bytes";
readonly name: "_data";
readonly type: "bytes";
}];
readonly name: "getL1Fee";
readonly outputs: readonly [{
readonly internalType: "uint256";
readonly name: "";
readonly type: "uint256";
}];
readonly stateMutability: "view";
readonly type: "function";
}, {
readonly inputs: readonly [{
readonly internalType: "bytes";
readonly name: "_data";
readonly type: "bytes";
}];
readonly name: "getL1GasUsed";
readonly outputs: readonly [{
readonly internalType: "uint256";
readonly name: "";
readonly type: "uint256";
}];
readonly stateMutability: "view";
readonly type: "function";
}, {
readonly inputs: readonly [];
readonly name: "l1BaseFee";
readonly outputs: readonly [{
readonly internalType: "uint256";
readonly name: "";
readonly type: "uint256";
}];
readonly stateMutability: "view";
readonly type: "function";
}, {
readonly inputs: readonly [];
readonly name: "overhead";
readonly outputs: readonly [{
readonly internalType: "uint256";
readonly name: "";
readonly type: "uint256";
}];
readonly stateMutability: "view";
readonly type: "function";
}, {
readonly inputs: readonly [];
readonly name: "owner";
readonly outputs: readonly [{
readonly internalType: "address";
readonly name: "";
readonly type: "address";
}];
readonly stateMutability: "view";
readonly type: "function";
}, {
readonly inputs: readonly [];
readonly name: "renounceOwnership";
readonly outputs: readonly [];
readonly stateMutability: "nonpayable";
readonly type: "function";
}, {
readonly inputs: readonly [];
readonly name: "scalar";
readonly outputs: readonly [{
readonly internalType: "uint256";
readonly name: "";
readonly type: "uint256";
}];
readonly stateMutability: "view";
readonly type: "function";
}, {
readonly inputs: readonly [{
readonly internalType: "uint256";
readonly name: "_decimals";
readonly type: "uint256";
}];
readonly name: "setDecimals";
readonly outputs: readonly [];
readonly stateMutability: "nonpayable";
readonly type: "function";
}, {
readonly inputs: readonly [{
readonly internalType: "uint256";
readonly name: "_gasPrice";
readonly type: "uint256";
}];
readonly name: "setGasPrice";
readonly outputs: readonly [];
readonly stateMutability: "nonpayable";
readonly type: "function";
}, {
readonly inputs: readonly [{
readonly internalType: "uint256";
readonly name: "_baseFee";
readonly type: "uint256";
}];
readonly name: "setL1BaseFee";
readonly outputs: readonly [];
readonly stateMutability: "nonpayable";
readonly type: "function";
}, {
readonly inputs: readonly [{
readonly internalType: "uint256";
readonly name: "_overhead";
readonly type: "uint256";
}];
readonly name: "setOverhead";
readonly outputs: readonly [];
readonly stateMutability: "nonpayable";
readonly type: "function";
}, {
readonly inputs: readonly [{
readonly internalType: "uint256";
readonly name: "_scalar";
readonly type: "uint256";
}];
readonly name: "setScalar";
readonly outputs: readonly [];
readonly stateMutability: "nonpayable";
readonly type: "function";
}, {
readonly inputs: readonly [{
readonly internalType: "address";
readonly name: "newOwner";
readonly type: "address";
}];
readonly name: "transferOwnership";
readonly outputs: readonly [];
readonly stateMutability: "nonpayable";
readonly type: "function";
}];
static createInterface(): OvmGasPriceOracleInterface;
static connect(address: string, runner?: ContractRunner | null): OvmGasPriceOracle;
}

@ -0,0 +1,29 @@
import { type ContractRunner } from "ethers";
import type { ReverseRecords, ReverseRecordsInterface } from "../ReverseRecords";
export declare class ReverseRecords__factory {
static readonly abi: readonly [{
readonly inputs: readonly [{
readonly internalType: "contract ENS";
readonly name: "_ens";
readonly type: "address";
}];
readonly stateMutability: "nonpayable";
readonly type: "constructor";
}, {
readonly inputs: readonly [{
readonly internalType: "address[]";
readonly name: "addresses";
readonly type: "address[]";
}];
readonly name: "getNames";
readonly outputs: readonly [{
readonly internalType: "string[]";
readonly name: "r";
readonly type: "string[]";
}];
readonly stateMutability: "view";
readonly type: "function";
}];
static createInterface(): ReverseRecordsInterface;
static connect(address: string, runner?: ContractRunner | null): ReverseRecords;
}

7
dist/typechain/factories/index.d.ts vendored Normal file

@ -0,0 +1,7 @@
export { ENS__factory } from "./ENS__factory";
export { ERC20__factory } from "./ERC20__factory";
export { GasPriceOracle__factory } from "./GasPriceOracle__factory";
export { Multicall__factory } from "./Multicall__factory";
export { OffchainOracle__factory } from "./OffchainOracle__factory";
export { OvmGasPriceOracle__factory } from "./OvmGasPriceOracle__factory";
export { ReverseRecords__factory } from "./ReverseRecords__factory";

15
dist/typechain/index.d.ts vendored Normal file

@ -0,0 +1,15 @@
export type { ENS } from "./ENS";
export type { ERC20 } from "./ERC20";
export type { GasPriceOracle } from "./GasPriceOracle";
export type { Multicall } from "./Multicall";
export type { OffchainOracle } from "./OffchainOracle";
export type { OvmGasPriceOracle } from "./OvmGasPriceOracle";
export type { ReverseRecords } from "./ReverseRecords";
export * as factories from "./factories";
export { ENS__factory } from "./factories/ENS__factory";
export { ERC20__factory } from "./factories/ERC20__factory";
export { GasPriceOracle__factory } from "./factories/GasPriceOracle__factory";
export { Multicall__factory } from "./factories/Multicall__factory";
export { OffchainOracle__factory } from "./factories/OffchainOracle__factory";
export { OvmGasPriceOracle__factory } from "./factories/OvmGasPriceOracle__factory";
export { ReverseRecords__factory } from "./factories/ReverseRecords__factory";