@zkp2p/contracts-v2
Version:
ZKP2P V2 smart contract interfaces and utilities
708 lines (623 loc) • 20.7 kB
text/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,
PromiseOrValue,
} from "../../common";
export declare namespace IOrchestrator {
export type FulfillIntentParamsStruct = {
paymentProof: PromiseOrValue<BytesLike>;
intentHash: PromiseOrValue<BytesLike>;
verificationData: PromiseOrValue<BytesLike>;
postIntentHookData: PromiseOrValue<BytesLike>;
};
export type FulfillIntentParamsStructOutput = [
string,
string,
string,
string
] & {
paymentProof: string;
intentHash: string;
verificationData: string;
postIntentHookData: string;
};
export type IntentStruct = {
owner: PromiseOrValue<string>;
to: PromiseOrValue<string>;
escrow: PromiseOrValue<string>;
depositId: PromiseOrValue<BigNumberish>;
amount: PromiseOrValue<BigNumberish>;
timestamp: PromiseOrValue<BigNumberish>;
paymentMethod: PromiseOrValue<BytesLike>;
fiatCurrency: PromiseOrValue<BytesLike>;
conversionRate: PromiseOrValue<BigNumberish>;
payeeId: PromiseOrValue<BytesLike>;
referrer: PromiseOrValue<string>;
referrerFee: PromiseOrValue<BigNumberish>;
postIntentHook: PromiseOrValue<string>;
data: PromiseOrValue<BytesLike>;
};
export type IntentStructOutput = [
string,
string,
string,
BigNumber,
BigNumber,
BigNumber,
string,
string,
BigNumber,
string,
string,
BigNumber,
string,
string
] & {
owner: string;
to: string;
escrow: string;
depositId: BigNumber;
amount: BigNumber;
timestamp: BigNumber;
paymentMethod: string;
fiatCurrency: string;
conversionRate: BigNumber;
payeeId: string;
referrer: string;
referrerFee: BigNumber;
postIntentHook: string;
data: string;
};
export type SignalIntentParamsStruct = {
escrow: PromiseOrValue<string>;
depositId: PromiseOrValue<BigNumberish>;
amount: PromiseOrValue<BigNumberish>;
to: PromiseOrValue<string>;
paymentMethod: PromiseOrValue<BytesLike>;
fiatCurrency: PromiseOrValue<BytesLike>;
conversionRate: PromiseOrValue<BigNumberish>;
referrer: PromiseOrValue<string>;
referrerFee: PromiseOrValue<BigNumberish>;
gatingServiceSignature: PromiseOrValue<BytesLike>;
signatureExpiration: PromiseOrValue<BigNumberish>;
postIntentHook: PromiseOrValue<string>;
data: PromiseOrValue<BytesLike>;
};
export type SignalIntentParamsStructOutput = [
string,
BigNumber,
BigNumber,
string,
string,
string,
BigNumber,
string,
BigNumber,
string,
BigNumber,
string,
string
] & {
escrow: string;
depositId: BigNumber;
amount: BigNumber;
to: string;
paymentMethod: string;
fiatCurrency: string;
conversionRate: BigNumber;
referrer: string;
referrerFee: BigNumber;
gatingServiceSignature: string;
signatureExpiration: BigNumber;
postIntentHook: string;
data: string;
};
}
export interface IOrchestratorInterface extends utils.Interface {
functions: {
"cancelIntent(bytes32)": FunctionFragment;
"fulfillIntent((bytes,bytes32,bytes,bytes))": FunctionFragment;
"getAccountIntents(address)": FunctionFragment;
"getIntent(bytes32)": FunctionFragment;
"pruneIntents(bytes32[])": FunctionFragment;
"releaseFundsToPayer(bytes32)": FunctionFragment;
"signalIntent((address,uint256,uint256,address,bytes32,bytes32,uint256,address,uint256,bytes,uint256,address,bytes))": FunctionFragment;
};
getFunction(
nameOrSignatureOrTopic:
| "cancelIntent"
| "fulfillIntent"
| "getAccountIntents"
| "getIntent"
| "pruneIntents"
| "releaseFundsToPayer"
| "signalIntent"
): FunctionFragment;
encodeFunctionData(
functionFragment: "cancelIntent",
values: [PromiseOrValue<BytesLike>]
): string;
encodeFunctionData(
functionFragment: "fulfillIntent",
values: [IOrchestrator.FulfillIntentParamsStruct]
): string;
encodeFunctionData(
functionFragment: "getAccountIntents",
values: [PromiseOrValue<string>]
): string;
encodeFunctionData(
functionFragment: "getIntent",
values: [PromiseOrValue<BytesLike>]
): string;
encodeFunctionData(
functionFragment: "pruneIntents",
values: [PromiseOrValue<BytesLike>[]]
): string;
encodeFunctionData(
functionFragment: "releaseFundsToPayer",
values: [PromiseOrValue<BytesLike>]
): string;
encodeFunctionData(
functionFragment: "signalIntent",
values: [IOrchestrator.SignalIntentParamsStruct]
): string;
decodeFunctionResult(
functionFragment: "cancelIntent",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "fulfillIntent",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "getAccountIntents",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "getIntent", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "pruneIntents",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "releaseFundsToPayer",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "signalIntent",
data: BytesLike
): Result;
events: {
"AllowMultipleIntentsUpdated(bool)": EventFragment;
"EscrowRegistryUpdated(address)": EventFragment;
"IntentFulfilled(bytes32,address,uint256,bool)": EventFragment;
"IntentPruned(bytes32)": EventFragment;
"IntentSignaled(bytes32,address,uint256,bytes32,address,address,uint256,bytes32,uint256,uint256)": EventFragment;
"PartialManualReleaseDelayUpdated(uint256)": EventFragment;
"PaymentVerifierRegistryUpdated(address)": EventFragment;
"PostIntentHookRegistryUpdated(address)": EventFragment;
"ProtocolFeeRecipientUpdated(address)": EventFragment;
"ProtocolFeeUpdated(uint256)": EventFragment;
"RelayerRegistryUpdated(address)": EventFragment;
};
getEvent(
nameOrSignatureOrTopic: "AllowMultipleIntentsUpdated"
): EventFragment;
getEvent(nameOrSignatureOrTopic: "EscrowRegistryUpdated"): EventFragment;
getEvent(nameOrSignatureOrTopic: "IntentFulfilled"): EventFragment;
getEvent(nameOrSignatureOrTopic: "IntentPruned"): EventFragment;
getEvent(nameOrSignatureOrTopic: "IntentSignaled"): EventFragment;
getEvent(
nameOrSignatureOrTopic: "PartialManualReleaseDelayUpdated"
): EventFragment;
getEvent(
nameOrSignatureOrTopic: "PaymentVerifierRegistryUpdated"
): EventFragment;
getEvent(
nameOrSignatureOrTopic: "PostIntentHookRegistryUpdated"
): EventFragment;
getEvent(
nameOrSignatureOrTopic: "ProtocolFeeRecipientUpdated"
): EventFragment;
getEvent(nameOrSignatureOrTopic: "ProtocolFeeUpdated"): EventFragment;
getEvent(nameOrSignatureOrTopic: "RelayerRegistryUpdated"): EventFragment;
}
export interface AllowMultipleIntentsUpdatedEventObject {
allowMultiple: boolean;
}
export type AllowMultipleIntentsUpdatedEvent = TypedEvent<
[boolean],
AllowMultipleIntentsUpdatedEventObject
>;
export type AllowMultipleIntentsUpdatedEventFilter =
TypedEventFilter<AllowMultipleIntentsUpdatedEvent>;
export interface EscrowRegistryUpdatedEventObject {
escrowRegistry: string;
}
export type EscrowRegistryUpdatedEvent = TypedEvent<
[string],
EscrowRegistryUpdatedEventObject
>;
export type EscrowRegistryUpdatedEventFilter =
TypedEventFilter<EscrowRegistryUpdatedEvent>;
export interface IntentFulfilledEventObject {
intentHash: string;
fundsTransferredTo: string;
amount: BigNumber;
isManualRelease: boolean;
}
export type IntentFulfilledEvent = TypedEvent<
[string, string, BigNumber, boolean],
IntentFulfilledEventObject
>;
export type IntentFulfilledEventFilter = TypedEventFilter<IntentFulfilledEvent>;
export interface IntentPrunedEventObject {
intentHash: string;
}
export type IntentPrunedEvent = TypedEvent<[string], IntentPrunedEventObject>;
export type IntentPrunedEventFilter = TypedEventFilter<IntentPrunedEvent>;
export interface IntentSignaledEventObject {
intentHash: string;
escrow: string;
depositId: BigNumber;
paymentMethod: string;
owner: string;
to: string;
amount: BigNumber;
fiatCurrency: string;
conversionRate: BigNumber;
timestamp: BigNumber;
}
export type IntentSignaledEvent = TypedEvent<
[
string,
string,
BigNumber,
string,
string,
string,
BigNumber,
string,
BigNumber,
BigNumber
],
IntentSignaledEventObject
>;
export type IntentSignaledEventFilter = TypedEventFilter<IntentSignaledEvent>;
export interface PartialManualReleaseDelayUpdatedEventObject {
partialManualReleaseDelay: BigNumber;
}
export type PartialManualReleaseDelayUpdatedEvent = TypedEvent<
[BigNumber],
PartialManualReleaseDelayUpdatedEventObject
>;
export type PartialManualReleaseDelayUpdatedEventFilter =
TypedEventFilter<PartialManualReleaseDelayUpdatedEvent>;
export interface PaymentVerifierRegistryUpdatedEventObject {
paymentVerifierRegistry: string;
}
export type PaymentVerifierRegistryUpdatedEvent = TypedEvent<
[string],
PaymentVerifierRegistryUpdatedEventObject
>;
export type PaymentVerifierRegistryUpdatedEventFilter =
TypedEventFilter<PaymentVerifierRegistryUpdatedEvent>;
export interface PostIntentHookRegistryUpdatedEventObject {
postIntentHookRegistry: string;
}
export type PostIntentHookRegistryUpdatedEvent = TypedEvent<
[string],
PostIntentHookRegistryUpdatedEventObject
>;
export type PostIntentHookRegistryUpdatedEventFilter =
TypedEventFilter<PostIntentHookRegistryUpdatedEvent>;
export interface ProtocolFeeRecipientUpdatedEventObject {
protocolFeeRecipient: string;
}
export type ProtocolFeeRecipientUpdatedEvent = TypedEvent<
[string],
ProtocolFeeRecipientUpdatedEventObject
>;
export type ProtocolFeeRecipientUpdatedEventFilter =
TypedEventFilter<ProtocolFeeRecipientUpdatedEvent>;
export interface ProtocolFeeUpdatedEventObject {
protocolFee: BigNumber;
}
export type ProtocolFeeUpdatedEvent = TypedEvent<
[BigNumber],
ProtocolFeeUpdatedEventObject
>;
export type ProtocolFeeUpdatedEventFilter =
TypedEventFilter<ProtocolFeeUpdatedEvent>;
export interface RelayerRegistryUpdatedEventObject {
relayerRegistry: string;
}
export type RelayerRegistryUpdatedEvent = TypedEvent<
[string],
RelayerRegistryUpdatedEventObject
>;
export type RelayerRegistryUpdatedEventFilter =
TypedEventFilter<RelayerRegistryUpdatedEvent>;
export interface IOrchestrator extends BaseContract {
connect(signerOrProvider: Signer | Provider | string): this;
attach(addressOrName: string): this;
deployed(): Promise<this>;
interface: IOrchestratorInterface;
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: {
cancelIntent(
intentHash: PromiseOrValue<BytesLike>,
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<ContractTransaction>;
fulfillIntent(
params: IOrchestrator.FulfillIntentParamsStruct,
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<ContractTransaction>;
getAccountIntents(
account: PromiseOrValue<string>,
overrides?: CallOverrides
): Promise<[string[]]>;
getIntent(
intentHash: PromiseOrValue<BytesLike>,
overrides?: CallOverrides
): Promise<[IOrchestrator.IntentStructOutput]>;
pruneIntents(
intentIds: PromiseOrValue<BytesLike>[],
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<ContractTransaction>;
releaseFundsToPayer(
intentHash: PromiseOrValue<BytesLike>,
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<ContractTransaction>;
signalIntent(
params: IOrchestrator.SignalIntentParamsStruct,
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<ContractTransaction>;
};
cancelIntent(
intentHash: PromiseOrValue<BytesLike>,
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<ContractTransaction>;
fulfillIntent(
params: IOrchestrator.FulfillIntentParamsStruct,
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<ContractTransaction>;
getAccountIntents(
account: PromiseOrValue<string>,
overrides?: CallOverrides
): Promise<string[]>;
getIntent(
intentHash: PromiseOrValue<BytesLike>,
overrides?: CallOverrides
): Promise<IOrchestrator.IntentStructOutput>;
pruneIntents(
intentIds: PromiseOrValue<BytesLike>[],
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<ContractTransaction>;
releaseFundsToPayer(
intentHash: PromiseOrValue<BytesLike>,
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<ContractTransaction>;
signalIntent(
params: IOrchestrator.SignalIntentParamsStruct,
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<ContractTransaction>;
callStatic: {
cancelIntent(
intentHash: PromiseOrValue<BytesLike>,
overrides?: CallOverrides
): Promise<void>;
fulfillIntent(
params: IOrchestrator.FulfillIntentParamsStruct,
overrides?: CallOverrides
): Promise<void>;
getAccountIntents(
account: PromiseOrValue<string>,
overrides?: CallOverrides
): Promise<string[]>;
getIntent(
intentHash: PromiseOrValue<BytesLike>,
overrides?: CallOverrides
): Promise<IOrchestrator.IntentStructOutput>;
pruneIntents(
intentIds: PromiseOrValue<BytesLike>[],
overrides?: CallOverrides
): Promise<void>;
releaseFundsToPayer(
intentHash: PromiseOrValue<BytesLike>,
overrides?: CallOverrides
): Promise<void>;
signalIntent(
params: IOrchestrator.SignalIntentParamsStruct,
overrides?: CallOverrides
): Promise<void>;
};
filters: {
"AllowMultipleIntentsUpdated(bool)"(
allowMultiple?: null
): AllowMultipleIntentsUpdatedEventFilter;
AllowMultipleIntentsUpdated(
allowMultiple?: null
): AllowMultipleIntentsUpdatedEventFilter;
"EscrowRegistryUpdated(address)"(
escrowRegistry?: PromiseOrValue<string> | null
): EscrowRegistryUpdatedEventFilter;
EscrowRegistryUpdated(
escrowRegistry?: PromiseOrValue<string> | null
): EscrowRegistryUpdatedEventFilter;
"IntentFulfilled(bytes32,address,uint256,bool)"(
intentHash?: PromiseOrValue<BytesLike> | null,
fundsTransferredTo?: PromiseOrValue<string> | null,
amount?: null,
isManualRelease?: null
): IntentFulfilledEventFilter;
IntentFulfilled(
intentHash?: PromiseOrValue<BytesLike> | null,
fundsTransferredTo?: PromiseOrValue<string> | null,
amount?: null,
isManualRelease?: null
): IntentFulfilledEventFilter;
"IntentPruned(bytes32)"(
intentHash?: PromiseOrValue<BytesLike> | null
): IntentPrunedEventFilter;
IntentPruned(
intentHash?: PromiseOrValue<BytesLike> | null
): IntentPrunedEventFilter;
"IntentSignaled(bytes32,address,uint256,bytes32,address,address,uint256,bytes32,uint256,uint256)"(
intentHash?: PromiseOrValue<BytesLike> | null,
escrow?: PromiseOrValue<string> | null,
depositId?: PromiseOrValue<BigNumberish> | null,
paymentMethod?: null,
owner?: null,
to?: null,
amount?: null,
fiatCurrency?: null,
conversionRate?: null,
timestamp?: null
): IntentSignaledEventFilter;
IntentSignaled(
intentHash?: PromiseOrValue<BytesLike> | null,
escrow?: PromiseOrValue<string> | null,
depositId?: PromiseOrValue<BigNumberish> | null,
paymentMethod?: null,
owner?: null,
to?: null,
amount?: null,
fiatCurrency?: null,
conversionRate?: null,
timestamp?: null
): IntentSignaledEventFilter;
"PartialManualReleaseDelayUpdated(uint256)"(
partialManualReleaseDelay?: null
): PartialManualReleaseDelayUpdatedEventFilter;
PartialManualReleaseDelayUpdated(
partialManualReleaseDelay?: null
): PartialManualReleaseDelayUpdatedEventFilter;
"PaymentVerifierRegistryUpdated(address)"(
paymentVerifierRegistry?: PromiseOrValue<string> | null
): PaymentVerifierRegistryUpdatedEventFilter;
PaymentVerifierRegistryUpdated(
paymentVerifierRegistry?: PromiseOrValue<string> | null
): PaymentVerifierRegistryUpdatedEventFilter;
"PostIntentHookRegistryUpdated(address)"(
postIntentHookRegistry?: PromiseOrValue<string> | null
): PostIntentHookRegistryUpdatedEventFilter;
PostIntentHookRegistryUpdated(
postIntentHookRegistry?: PromiseOrValue<string> | null
): PostIntentHookRegistryUpdatedEventFilter;
"ProtocolFeeRecipientUpdated(address)"(
protocolFeeRecipient?: PromiseOrValue<string> | null
): ProtocolFeeRecipientUpdatedEventFilter;
ProtocolFeeRecipientUpdated(
protocolFeeRecipient?: PromiseOrValue<string> | null
): ProtocolFeeRecipientUpdatedEventFilter;
"ProtocolFeeUpdated(uint256)"(
protocolFee?: null
): ProtocolFeeUpdatedEventFilter;
ProtocolFeeUpdated(protocolFee?: null): ProtocolFeeUpdatedEventFilter;
"RelayerRegistryUpdated(address)"(
relayerRegistry?: PromiseOrValue<string> | null
): RelayerRegistryUpdatedEventFilter;
RelayerRegistryUpdated(
relayerRegistry?: PromiseOrValue<string> | null
): RelayerRegistryUpdatedEventFilter;
};
estimateGas: {
cancelIntent(
intentHash: PromiseOrValue<BytesLike>,
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<BigNumber>;
fulfillIntent(
params: IOrchestrator.FulfillIntentParamsStruct,
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<BigNumber>;
getAccountIntents(
account: PromiseOrValue<string>,
overrides?: CallOverrides
): Promise<BigNumber>;
getIntent(
intentHash: PromiseOrValue<BytesLike>,
overrides?: CallOverrides
): Promise<BigNumber>;
pruneIntents(
intentIds: PromiseOrValue<BytesLike>[],
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<BigNumber>;
releaseFundsToPayer(
intentHash: PromiseOrValue<BytesLike>,
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<BigNumber>;
signalIntent(
params: IOrchestrator.SignalIntentParamsStruct,
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<BigNumber>;
};
populateTransaction: {
cancelIntent(
intentHash: PromiseOrValue<BytesLike>,
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<PopulatedTransaction>;
fulfillIntent(
params: IOrchestrator.FulfillIntentParamsStruct,
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<PopulatedTransaction>;
getAccountIntents(
account: PromiseOrValue<string>,
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
getIntent(
intentHash: PromiseOrValue<BytesLike>,
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
pruneIntents(
intentIds: PromiseOrValue<BytesLike>[],
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<PopulatedTransaction>;
releaseFundsToPayer(
intentHash: PromiseOrValue<BytesLike>,
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<PopulatedTransaction>;
signalIntent(
params: IOrchestrator.SignalIntentParamsStruct,
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<PopulatedTransaction>;
};
}