@coti-io/coti-contracts-examples
Version:
Example smart contracts demonstrating the use of COTI's GC technology, including integrations with MPC, private ERC20, and ERC721 contracts.
316 lines (281 loc) • 9.55 kB
text/typescript
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
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 type ItUint64Struct = { ciphertext: BigNumberish; signature: BytesLike };
export type ItUint64StructOutput = [ciphertext: bigint, signature: string] & {
ciphertext: bigint;
signature: string;
};
export interface PrivateAuctionInterface extends Interface {
getFunction(
nameOrSignature:
| "auctionEnd"
| "beneficiary"
| "bid"
| "bidCounter"
| "claim"
| "contractOwner"
| "doIHaveHighestBid"
| "endTime"
| "getBid"
| "manuallyStopped"
| "stop"
| "stoppable"
| "tokenContract"
| "tokenTransferred"
| "withdraw"
): FunctionFragment;
getEvent(nameOrSignatureOrTopic: "HighestBid" | "Winner"): EventFragment;
encodeFunctionData(
functionFragment: "auctionEnd",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "beneficiary",
values?: undefined
): string;
encodeFunctionData(functionFragment: "bid", values: [ItUint64Struct]): string;
encodeFunctionData(
functionFragment: "bidCounter",
values?: undefined
): string;
encodeFunctionData(functionFragment: "claim", values?: undefined): string;
encodeFunctionData(
functionFragment: "contractOwner",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "doIHaveHighestBid",
values?: undefined
): string;
encodeFunctionData(functionFragment: "endTime", values?: undefined): string;
encodeFunctionData(functionFragment: "getBid", values?: undefined): string;
encodeFunctionData(
functionFragment: "manuallyStopped",
values?: undefined
): string;
encodeFunctionData(functionFragment: "stop", values?: undefined): string;
encodeFunctionData(functionFragment: "stoppable", values?: undefined): string;
encodeFunctionData(
functionFragment: "tokenContract",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "tokenTransferred",
values?: undefined
): string;
encodeFunctionData(functionFragment: "withdraw", values?: undefined): string;
decodeFunctionResult(functionFragment: "auctionEnd", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "beneficiary",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "bid", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "bidCounter", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "claim", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "contractOwner",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "doIHaveHighestBid",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "endTime", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "getBid", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "manuallyStopped",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "stop", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "stoppable", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "tokenContract",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "tokenTransferred",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "withdraw", data: BytesLike): Result;
}
export namespace HighestBidEvent {
export type InputTuple = [isHighestBid: BigNumberish];
export type OutputTuple = [isHighestBid: bigint];
export interface OutputObject {
isHighestBid: bigint;
}
export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
export type Filter = TypedDeferredTopicFilter<Event>;
export type Log = TypedEventLog<Event>;
export type LogDescription = TypedLogDescription<Event>;
}
export namespace WinnerEvent {
export type InputTuple = [who: AddressLike];
export type OutputTuple = [who: string];
export interface OutputObject {
who: string;
}
export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
export type Filter = TypedDeferredTopicFilter<Event>;
export type Log = TypedEventLog<Event>;
export type LogDescription = TypedLogDescription<Event>;
}
export interface PrivateAuction extends BaseContract {
connect(runner?: ContractRunner | null): PrivateAuction;
waitForDeployment(): Promise<this>;
interface: PrivateAuctionInterface;
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>;
auctionEnd: TypedContractMethod<[], [void], "nonpayable">;
beneficiary: TypedContractMethod<[], [string], "view">;
bid: TypedContractMethod<[itBid: ItUint64Struct], [void], "nonpayable">;
bidCounter: TypedContractMethod<[], [bigint], "view">;
claim: TypedContractMethod<[], [void], "nonpayable">;
contractOwner: TypedContractMethod<[], [string], "view">;
doIHaveHighestBid: TypedContractMethod<[], [void], "nonpayable">;
endTime: TypedContractMethod<[], [bigint], "view">;
getBid: TypedContractMethod<[], [bigint], "nonpayable">;
manuallyStopped: TypedContractMethod<[], [boolean], "view">;
stop: TypedContractMethod<[], [void], "nonpayable">;
stoppable: TypedContractMethod<[], [boolean], "view">;
tokenContract: TypedContractMethod<[], [string], "view">;
tokenTransferred: TypedContractMethod<[], [boolean], "view">;
withdraw: TypedContractMethod<[], [void], "nonpayable">;
getFunction<T extends ContractMethod = ContractMethod>(
key: string | FunctionFragment
): T;
getFunction(
nameOrSignature: "auctionEnd"
): TypedContractMethod<[], [void], "nonpayable">;
getFunction(
nameOrSignature: "beneficiary"
): TypedContractMethod<[], [string], "view">;
getFunction(
nameOrSignature: "bid"
): TypedContractMethod<[itBid: ItUint64Struct], [void], "nonpayable">;
getFunction(
nameOrSignature: "bidCounter"
): TypedContractMethod<[], [bigint], "view">;
getFunction(
nameOrSignature: "claim"
): TypedContractMethod<[], [void], "nonpayable">;
getFunction(
nameOrSignature: "contractOwner"
): TypedContractMethod<[], [string], "view">;
getFunction(
nameOrSignature: "doIHaveHighestBid"
): TypedContractMethod<[], [void], "nonpayable">;
getFunction(
nameOrSignature: "endTime"
): TypedContractMethod<[], [bigint], "view">;
getFunction(
nameOrSignature: "getBid"
): TypedContractMethod<[], [bigint], "nonpayable">;
getFunction(
nameOrSignature: "manuallyStopped"
): TypedContractMethod<[], [boolean], "view">;
getFunction(
nameOrSignature: "stop"
): TypedContractMethod<[], [void], "nonpayable">;
getFunction(
nameOrSignature: "stoppable"
): TypedContractMethod<[], [boolean], "view">;
getFunction(
nameOrSignature: "tokenContract"
): TypedContractMethod<[], [string], "view">;
getFunction(
nameOrSignature: "tokenTransferred"
): TypedContractMethod<[], [boolean], "view">;
getFunction(
nameOrSignature: "withdraw"
): TypedContractMethod<[], [void], "nonpayable">;
getEvent(
key: "HighestBid"
): TypedContractEvent<
HighestBidEvent.InputTuple,
HighestBidEvent.OutputTuple,
HighestBidEvent.OutputObject
>;
getEvent(
key: "Winner"
): TypedContractEvent<
WinnerEvent.InputTuple,
WinnerEvent.OutputTuple,
WinnerEvent.OutputObject
>;
filters: {
"HighestBid(uint256)": TypedContractEvent<
HighestBidEvent.InputTuple,
HighestBidEvent.OutputTuple,
HighestBidEvent.OutputObject
>;
HighestBid: TypedContractEvent<
HighestBidEvent.InputTuple,
HighestBidEvent.OutputTuple,
HighestBidEvent.OutputObject
>;
"Winner(address)": TypedContractEvent<
WinnerEvent.InputTuple,
WinnerEvent.OutputTuple,
WinnerEvent.OutputObject
>;
Winner: TypedContractEvent<
WinnerEvent.InputTuple,
WinnerEvent.OutputTuple,
WinnerEvent.OutputObject
>;
};
}