tornado-relayer/contracts/SwapAbi.ts
smart_ex 4595085d61 wip
2022-05-10 18:52:07 +10:00

395 lines
11 KiB
TypeScript

/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type {
BaseContract,
BigNumber,
BigNumberish,
BytesLike,
CallOverrides,
ContractTransaction,
Overrides,
PopulatedTransaction,
Signer,
utils,
} from "ethers";
import type {
FunctionFragment,
Result,
EventFragment,
} from "@ethersproject/abi";
import type { Listener, Provider } from "@ethersproject/providers";
import type {
TypedEventFilter,
TypedEvent,
TypedListener,
OnEvent,
} from "./common";
export interface SwapAbiInterface extends utils.Interface {
functions: {
"DURATION()": FunctionFragment;
"initialLiquidity()": FunctionFragment;
"liquidity()": FunctionFragment;
"miner()": FunctionFragment;
"poolWeight()": FunctionFragment;
"resolve(bytes32)": FunctionFragment;
"startTimestamp()": FunctionFragment;
"tokensSold()": FunctionFragment;
"torn()": FunctionFragment;
"swap(address,uint256)": FunctionFragment;
"getExpectedReturn(uint256)": FunctionFragment;
"tornVirtualBalance()": FunctionFragment;
"setPoolWeight(uint256)": FunctionFragment;
};
getFunction(
nameOrSignatureOrTopic:
| "DURATION"
| "initialLiquidity"
| "liquidity"
| "miner"
| "poolWeight"
| "resolve"
| "startTimestamp"
| "tokensSold"
| "torn"
| "swap"
| "getExpectedReturn"
| "tornVirtualBalance"
| "setPoolWeight"
): FunctionFragment;
encodeFunctionData(functionFragment: "DURATION", values?: undefined): string;
encodeFunctionData(
functionFragment: "initialLiquidity",
values?: undefined
): string;
encodeFunctionData(functionFragment: "liquidity", values?: undefined): string;
encodeFunctionData(functionFragment: "miner", values?: undefined): string;
encodeFunctionData(
functionFragment: "poolWeight",
values?: undefined
): string;
encodeFunctionData(functionFragment: "resolve", values: [BytesLike]): string;
encodeFunctionData(
functionFragment: "startTimestamp",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "tokensSold",
values?: undefined
): string;
encodeFunctionData(functionFragment: "torn", values?: undefined): string;
encodeFunctionData(
functionFragment: "swap",
values: [string, BigNumberish]
): string;
encodeFunctionData(
functionFragment: "getExpectedReturn",
values: [BigNumberish]
): string;
encodeFunctionData(
functionFragment: "tornVirtualBalance",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "setPoolWeight",
values: [BigNumberish]
): string;
decodeFunctionResult(functionFragment: "DURATION", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "initialLiquidity",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "liquidity", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "miner", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "poolWeight", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "resolve", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "startTimestamp",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "tokensSold", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "torn", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "swap", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "getExpectedReturn",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "tornVirtualBalance",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "setPoolWeight",
data: BytesLike
): Result;
events: {
"PoolWeightUpdated(uint256)": EventFragment;
"Swap(address,uint256,uint256)": EventFragment;
};
getEvent(nameOrSignatureOrTopic: "PoolWeightUpdated"): EventFragment;
getEvent(nameOrSignatureOrTopic: "Swap"): EventFragment;
}
export interface PoolWeightUpdatedEventObject {
newWeight: BigNumber;
}
export type PoolWeightUpdatedEvent = TypedEvent<
[BigNumber],
PoolWeightUpdatedEventObject
>;
export type PoolWeightUpdatedEventFilter =
TypedEventFilter<PoolWeightUpdatedEvent>;
export interface SwapEventObject {
recipient: string;
pTORN: BigNumber;
TORN: BigNumber;
}
export type SwapEvent = TypedEvent<
[string, BigNumber, BigNumber],
SwapEventObject
>;
export type SwapEventFilter = TypedEventFilter<SwapEvent>;
export interface SwapAbi extends BaseContract {
connect(signerOrProvider: Signer | Provider | string): this;
attach(addressOrName: string): this;
deployed(): Promise<this>;
interface: SwapAbiInterface;
queryFilter<TEvent extends TypedEvent>(
event: TypedEventFilter<TEvent>,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TEvent>>;
listeners<TEvent extends TypedEvent>(
eventFilter?: TypedEventFilter<TEvent>
): Array<TypedListener<TEvent>>;
listeners(eventName?: string): Array<Listener>;
removeAllListeners<TEvent extends TypedEvent>(
eventFilter: TypedEventFilter<TEvent>
): this;
removeAllListeners(eventName?: string): this;
off: OnEvent<this>;
on: OnEvent<this>;
once: OnEvent<this>;
removeListener: OnEvent<this>;
functions: {
DURATION(overrides?: CallOverrides): Promise<[BigNumber]>;
initialLiquidity(overrides?: CallOverrides): Promise<[BigNumber]>;
liquidity(overrides?: CallOverrides): Promise<[BigNumber]>;
miner(overrides?: CallOverrides): Promise<[string]>;
poolWeight(overrides?: CallOverrides): Promise<[BigNumber]>;
resolve(node: BytesLike, overrides?: CallOverrides): Promise<[string]>;
startTimestamp(overrides?: CallOverrides): Promise<[BigNumber]>;
tokensSold(overrides?: CallOverrides): Promise<[BigNumber]>;
torn(overrides?: CallOverrides): Promise<[string]>;
swap(
recipient: string,
amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
getExpectedReturn(
amount: BigNumberish,
overrides?: CallOverrides
): Promise<[BigNumber]>;
tornVirtualBalance(overrides?: CallOverrides): Promise<[BigNumber]>;
setPoolWeight(
newWeight: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
};
DURATION(overrides?: CallOverrides): Promise<BigNumber>;
initialLiquidity(overrides?: CallOverrides): Promise<BigNumber>;
liquidity(overrides?: CallOverrides): Promise<BigNumber>;
miner(overrides?: CallOverrides): Promise<string>;
poolWeight(overrides?: CallOverrides): Promise<BigNumber>;
resolve(node: BytesLike, overrides?: CallOverrides): Promise<string>;
startTimestamp(overrides?: CallOverrides): Promise<BigNumber>;
tokensSold(overrides?: CallOverrides): Promise<BigNumber>;
torn(overrides?: CallOverrides): Promise<string>;
swap(
recipient: string,
amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
getExpectedReturn(
amount: BigNumberish,
overrides?: CallOverrides
): Promise<BigNumber>;
tornVirtualBalance(overrides?: CallOverrides): Promise<BigNumber>;
setPoolWeight(
newWeight: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
callStatic: {
DURATION(overrides?: CallOverrides): Promise<BigNumber>;
initialLiquidity(overrides?: CallOverrides): Promise<BigNumber>;
liquidity(overrides?: CallOverrides): Promise<BigNumber>;
miner(overrides?: CallOverrides): Promise<string>;
poolWeight(overrides?: CallOverrides): Promise<BigNumber>;
resolve(node: BytesLike, overrides?: CallOverrides): Promise<string>;
startTimestamp(overrides?: CallOverrides): Promise<BigNumber>;
tokensSold(overrides?: CallOverrides): Promise<BigNumber>;
torn(overrides?: CallOverrides): Promise<string>;
swap(
recipient: string,
amount: BigNumberish,
overrides?: CallOverrides
): Promise<void>;
getExpectedReturn(
amount: BigNumberish,
overrides?: CallOverrides
): Promise<BigNumber>;
tornVirtualBalance(overrides?: CallOverrides): Promise<BigNumber>;
setPoolWeight(
newWeight: BigNumberish,
overrides?: CallOverrides
): Promise<void>;
};
filters: {
"PoolWeightUpdated(uint256)"(
newWeight?: null
): PoolWeightUpdatedEventFilter;
PoolWeightUpdated(newWeight?: null): PoolWeightUpdatedEventFilter;
"Swap(address,uint256,uint256)"(
recipient?: string | null,
pTORN?: null,
TORN?: null
): SwapEventFilter;
Swap(recipient?: string | null, pTORN?: null, TORN?: null): SwapEventFilter;
};
estimateGas: {
DURATION(overrides?: CallOverrides): Promise<BigNumber>;
initialLiquidity(overrides?: CallOverrides): Promise<BigNumber>;
liquidity(overrides?: CallOverrides): Promise<BigNumber>;
miner(overrides?: CallOverrides): Promise<BigNumber>;
poolWeight(overrides?: CallOverrides): Promise<BigNumber>;
resolve(node: BytesLike, overrides?: CallOverrides): Promise<BigNumber>;
startTimestamp(overrides?: CallOverrides): Promise<BigNumber>;
tokensSold(overrides?: CallOverrides): Promise<BigNumber>;
torn(overrides?: CallOverrides): Promise<BigNumber>;
swap(
recipient: string,
amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
getExpectedReturn(
amount: BigNumberish,
overrides?: CallOverrides
): Promise<BigNumber>;
tornVirtualBalance(overrides?: CallOverrides): Promise<BigNumber>;
setPoolWeight(
newWeight: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
};
populateTransaction: {
DURATION(overrides?: CallOverrides): Promise<PopulatedTransaction>;
initialLiquidity(overrides?: CallOverrides): Promise<PopulatedTransaction>;
liquidity(overrides?: CallOverrides): Promise<PopulatedTransaction>;
miner(overrides?: CallOverrides): Promise<PopulatedTransaction>;
poolWeight(overrides?: CallOverrides): Promise<PopulatedTransaction>;
resolve(
node: BytesLike,
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
startTimestamp(overrides?: CallOverrides): Promise<PopulatedTransaction>;
tokensSold(overrides?: CallOverrides): Promise<PopulatedTransaction>;
torn(overrides?: CallOverrides): Promise<PopulatedTransaction>;
swap(
recipient: string,
amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
getExpectedReturn(
amount: BigNumberish,
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
tornVirtualBalance(
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
setPoolWeight(
newWeight: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
};
}