diff --git a/package.json b/package.json index a49a7bf..ec7f7b3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@cowprotocol/cow-sdk", - "version": "5.5.1", + "version": "5.6.0", "license": "(MIT OR Apache-2.0)", "files": [ "/dist" @@ -27,7 +27,7 @@ "prepare": "npm run build", "prepublishOnly": "npm test && npm run lint", "graphql:codegen": "graphql-codegen --config graphql-codegen.yml", - "swagger:codegen": " openapi --input https://raw.githubusercontent.com/cowprotocol/services/v2.272.1/crates/orderbook/openapi.yml --output src/order-book/generated --exportServices false --exportCore false", + "swagger:codegen": " openapi --input https://raw.githubusercontent.com/cowprotocol/services/v2.281.0/crates/orderbook/openapi.yml --output src/order-book/generated --exportServices false --exportCore false", "typechain:codegen": "typechain --target ethers-v5 --out-dir ./src/common/generated './abi/*.json'" }, "dependencies": { diff --git a/src/composable/generated/ComposableCoW.ts b/src/composable/generated/ComposableCoW.ts new file mode 100644 index 0000000..6e60b1c --- /dev/null +++ b/src/composable/generated/ComposableCoW.ts @@ -0,0 +1,763 @@ +/* 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 declare namespace IConditionalOrder { + export type ConditionalOrderParamsStruct = { + handler: string; + salt: BytesLike; + staticInput: BytesLike; + }; + + export type ConditionalOrderParamsStructOutput = [string, string, string] & { + handler: string; + salt: string; + staticInput: string; + }; +} + +export declare namespace ComposableCoW { + export type ProofStruct = { location: BigNumberish; data: BytesLike }; + + export type ProofStructOutput = [BigNumber, string] & { + location: BigNumber; + data: string; + }; +} + +export declare namespace GPv2Order { + export type DataStruct = { + sellToken: string; + buyToken: string; + receiver: string; + sellAmount: BigNumberish; + buyAmount: BigNumberish; + validTo: BigNumberish; + appData: BytesLike; + feeAmount: BigNumberish; + kind: BytesLike; + partiallyFillable: boolean; + sellTokenBalance: BytesLike; + buyTokenBalance: BytesLike; + }; + + export type DataStructOutput = [ + string, + string, + string, + BigNumber, + BigNumber, + number, + string, + BigNumber, + string, + boolean, + string, + string + ] & { + sellToken: string; + buyToken: string; + receiver: string; + sellAmount: BigNumber; + buyAmount: BigNumber; + validTo: number; + appData: string; + feeAmount: BigNumber; + kind: string; + partiallyFillable: boolean; + sellTokenBalance: string; + buyTokenBalance: string; + }; +} + +export interface ComposableCoWInterface extends utils.Interface { + functions: { + "cabinet(address,bytes32)": FunctionFragment; + "create((address,bytes32,bytes),bool)": FunctionFragment; + "createWithContext((address,bytes32,bytes),address,bytes,bool)": FunctionFragment; + "domainSeparator()": FunctionFragment; + "getTradeableOrderWithSignature(address,(address,bytes32,bytes),bytes,bytes32[])": FunctionFragment; + "hash((address,bytes32,bytes))": FunctionFragment; + "isValidSafeSignature(address,address,bytes32,bytes32,bytes32,bytes,bytes)": FunctionFragment; + "remove(bytes32)": FunctionFragment; + "roots(address)": FunctionFragment; + "setRoot(bytes32,(uint256,bytes))": FunctionFragment; + "setRootWithContext(bytes32,(uint256,bytes),address,bytes)": FunctionFragment; + "setSwapGuard(address)": FunctionFragment; + "singleOrders(address,bytes32)": FunctionFragment; + "swapGuards(address)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "cabinet" + | "create" + | "createWithContext" + | "domainSeparator" + | "getTradeableOrderWithSignature" + | "hash" + | "isValidSafeSignature" + | "remove" + | "roots" + | "setRoot" + | "setRootWithContext" + | "setSwapGuard" + | "singleOrders" + | "swapGuards" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "cabinet", + values: [string, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "create", + values: [IConditionalOrder.ConditionalOrderParamsStruct, boolean] + ): string; + encodeFunctionData( + functionFragment: "createWithContext", + values: [ + IConditionalOrder.ConditionalOrderParamsStruct, + string, + BytesLike, + boolean + ] + ): string; + encodeFunctionData( + functionFragment: "domainSeparator", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getTradeableOrderWithSignature", + values: [ + string, + IConditionalOrder.ConditionalOrderParamsStruct, + BytesLike, + BytesLike[] + ] + ): string; + encodeFunctionData( + functionFragment: "hash", + values: [IConditionalOrder.ConditionalOrderParamsStruct] + ): string; + encodeFunctionData( + functionFragment: "isValidSafeSignature", + values: [ + string, + string, + BytesLike, + BytesLike, + BytesLike, + BytesLike, + BytesLike + ] + ): string; + encodeFunctionData(functionFragment: "remove", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "roots", values: [string]): string; + encodeFunctionData( + functionFragment: "setRoot", + values: [BytesLike, ComposableCoW.ProofStruct] + ): string; + encodeFunctionData( + functionFragment: "setRootWithContext", + values: [BytesLike, ComposableCoW.ProofStruct, string, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "setSwapGuard", + values: [string] + ): string; + encodeFunctionData( + functionFragment: "singleOrders", + values: [string, BytesLike] + ): string; + encodeFunctionData(functionFragment: "swapGuards", values: [string]): string; + + decodeFunctionResult(functionFragment: "cabinet", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "create", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "createWithContext", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "domainSeparator", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getTradeableOrderWithSignature", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "hash", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "isValidSafeSignature", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "remove", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "roots", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setRoot", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "setRootWithContext", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setSwapGuard", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "singleOrders", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "swapGuards", data: BytesLike): Result; + + events: { + "ConditionalOrderCreated(address,(address,bytes32,bytes))": EventFragment; + "MerkleRootSet(address,bytes32,(uint256,bytes))": EventFragment; + "SwapGuardSet(address,address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "ConditionalOrderCreated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "MerkleRootSet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "SwapGuardSet"): EventFragment; +} + +export interface ConditionalOrderCreatedEventObject { + owner: string; + params: IConditionalOrder.ConditionalOrderParamsStructOutput; +} +export type ConditionalOrderCreatedEvent = TypedEvent< + [string, IConditionalOrder.ConditionalOrderParamsStructOutput], + ConditionalOrderCreatedEventObject +>; + +export type ConditionalOrderCreatedEventFilter = + TypedEventFilter; + +export interface MerkleRootSetEventObject { + owner: string; + root: string; + proof: ComposableCoW.ProofStructOutput; +} +export type MerkleRootSetEvent = TypedEvent< + [string, string, ComposableCoW.ProofStructOutput], + MerkleRootSetEventObject +>; + +export type MerkleRootSetEventFilter = TypedEventFilter; + +export interface SwapGuardSetEventObject { + owner: string; + swapGuard: string; +} +export type SwapGuardSetEvent = TypedEvent< + [string, string], + SwapGuardSetEventObject +>; + +export type SwapGuardSetEventFilter = TypedEventFilter; + +export interface ComposableCoW extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ComposableCoWInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + cabinet( + arg0: string, + arg1: BytesLike, + overrides?: CallOverrides + ): Promise<[string]>; + + create( + params: IConditionalOrder.ConditionalOrderParamsStruct, + dispatch: boolean, + overrides?: Overrides & { from?: string } + ): Promise; + + createWithContext( + params: IConditionalOrder.ConditionalOrderParamsStruct, + factory: string, + data: BytesLike, + dispatch: boolean, + overrides?: Overrides & { from?: string } + ): Promise; + + domainSeparator(overrides?: CallOverrides): Promise<[string]>; + + getTradeableOrderWithSignature( + owner: string, + params: IConditionalOrder.ConditionalOrderParamsStruct, + offchainInput: BytesLike, + proof: BytesLike[], + overrides?: CallOverrides + ): Promise< + [GPv2Order.DataStructOutput, string] & { + order: GPv2Order.DataStructOutput; + signature: string; + } + >; + + hash( + params: IConditionalOrder.ConditionalOrderParamsStruct, + overrides?: CallOverrides + ): Promise<[string]>; + + isValidSafeSignature( + safe: string, + sender: string, + _hash: BytesLike, + _domainSeparator: BytesLike, + arg4: BytesLike, + encodeData: BytesLike, + payload: BytesLike, + overrides?: CallOverrides + ): Promise<[string] & { magic: string }>; + + remove( + singleOrderHash: BytesLike, + overrides?: Overrides & { from?: string } + ): Promise; + + roots(arg0: string, overrides?: CallOverrides): Promise<[string]>; + + setRoot( + root: BytesLike, + proof: ComposableCoW.ProofStruct, + overrides?: Overrides & { from?: string } + ): Promise; + + setRootWithContext( + root: BytesLike, + proof: ComposableCoW.ProofStruct, + factory: string, + data: BytesLike, + overrides?: Overrides & { from?: string } + ): Promise; + + setSwapGuard( + swapGuard: string, + overrides?: Overrides & { from?: string } + ): Promise; + + singleOrders( + arg0: string, + arg1: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + + swapGuards(arg0: string, overrides?: CallOverrides): Promise<[string]>; + }; + + cabinet( + arg0: string, + arg1: BytesLike, + overrides?: CallOverrides + ): Promise; + + create( + params: IConditionalOrder.ConditionalOrderParamsStruct, + dispatch: boolean, + overrides?: Overrides & { from?: string } + ): Promise; + + createWithContext( + params: IConditionalOrder.ConditionalOrderParamsStruct, + factory: string, + data: BytesLike, + dispatch: boolean, + overrides?: Overrides & { from?: string } + ): Promise; + + domainSeparator(overrides?: CallOverrides): Promise; + + getTradeableOrderWithSignature( + owner: string, + params: IConditionalOrder.ConditionalOrderParamsStruct, + offchainInput: BytesLike, + proof: BytesLike[], + overrides?: CallOverrides + ): Promise< + [GPv2Order.DataStructOutput, string] & { + order: GPv2Order.DataStructOutput; + signature: string; + } + >; + + hash( + params: IConditionalOrder.ConditionalOrderParamsStruct, + overrides?: CallOverrides + ): Promise; + + isValidSafeSignature( + safe: string, + sender: string, + _hash: BytesLike, + _domainSeparator: BytesLike, + arg4: BytesLike, + encodeData: BytesLike, + payload: BytesLike, + overrides?: CallOverrides + ): Promise; + + remove( + singleOrderHash: BytesLike, + overrides?: Overrides & { from?: string } + ): Promise; + + roots(arg0: string, overrides?: CallOverrides): Promise; + + setRoot( + root: BytesLike, + proof: ComposableCoW.ProofStruct, + overrides?: Overrides & { from?: string } + ): Promise; + + setRootWithContext( + root: BytesLike, + proof: ComposableCoW.ProofStruct, + factory: string, + data: BytesLike, + overrides?: Overrides & { from?: string } + ): Promise; + + setSwapGuard( + swapGuard: string, + overrides?: Overrides & { from?: string } + ): Promise; + + singleOrders( + arg0: string, + arg1: BytesLike, + overrides?: CallOverrides + ): Promise; + + swapGuards(arg0: string, overrides?: CallOverrides): Promise; + + callStatic: { + cabinet( + arg0: string, + arg1: BytesLike, + overrides?: CallOverrides + ): Promise; + + create( + params: IConditionalOrder.ConditionalOrderParamsStruct, + dispatch: boolean, + overrides?: CallOverrides + ): Promise; + + createWithContext( + params: IConditionalOrder.ConditionalOrderParamsStruct, + factory: string, + data: BytesLike, + dispatch: boolean, + overrides?: CallOverrides + ): Promise; + + domainSeparator(overrides?: CallOverrides): Promise; + + getTradeableOrderWithSignature( + owner: string, + params: IConditionalOrder.ConditionalOrderParamsStruct, + offchainInput: BytesLike, + proof: BytesLike[], + overrides?: CallOverrides + ): Promise< + [GPv2Order.DataStructOutput, string] & { + order: GPv2Order.DataStructOutput; + signature: string; + } + >; + + hash( + params: IConditionalOrder.ConditionalOrderParamsStruct, + overrides?: CallOverrides + ): Promise; + + isValidSafeSignature( + safe: string, + sender: string, + _hash: BytesLike, + _domainSeparator: BytesLike, + arg4: BytesLike, + encodeData: BytesLike, + payload: BytesLike, + overrides?: CallOverrides + ): Promise; + + remove( + singleOrderHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + roots(arg0: string, overrides?: CallOverrides): Promise; + + setRoot( + root: BytesLike, + proof: ComposableCoW.ProofStruct, + overrides?: CallOverrides + ): Promise; + + setRootWithContext( + root: BytesLike, + proof: ComposableCoW.ProofStruct, + factory: string, + data: BytesLike, + overrides?: CallOverrides + ): Promise; + + setSwapGuard(swapGuard: string, overrides?: CallOverrides): Promise; + + singleOrders( + arg0: string, + arg1: BytesLike, + overrides?: CallOverrides + ): Promise; + + swapGuards(arg0: string, overrides?: CallOverrides): Promise; + }; + + filters: { + "ConditionalOrderCreated(address,(address,bytes32,bytes))"( + owner?: string | null, + params?: null + ): ConditionalOrderCreatedEventFilter; + ConditionalOrderCreated( + owner?: string | null, + params?: null + ): ConditionalOrderCreatedEventFilter; + + "MerkleRootSet(address,bytes32,(uint256,bytes))"( + owner?: string | null, + root?: null, + proof?: null + ): MerkleRootSetEventFilter; + MerkleRootSet( + owner?: string | null, + root?: null, + proof?: null + ): MerkleRootSetEventFilter; + + "SwapGuardSet(address,address)"( + owner?: string | null, + swapGuard?: null + ): SwapGuardSetEventFilter; + SwapGuardSet( + owner?: string | null, + swapGuard?: null + ): SwapGuardSetEventFilter; + }; + + estimateGas: { + cabinet( + arg0: string, + arg1: BytesLike, + overrides?: CallOverrides + ): Promise; + + create( + params: IConditionalOrder.ConditionalOrderParamsStruct, + dispatch: boolean, + overrides?: Overrides & { from?: string } + ): Promise; + + createWithContext( + params: IConditionalOrder.ConditionalOrderParamsStruct, + factory: string, + data: BytesLike, + dispatch: boolean, + overrides?: Overrides & { from?: string } + ): Promise; + + domainSeparator(overrides?: CallOverrides): Promise; + + getTradeableOrderWithSignature( + owner: string, + params: IConditionalOrder.ConditionalOrderParamsStruct, + offchainInput: BytesLike, + proof: BytesLike[], + overrides?: CallOverrides + ): Promise; + + hash( + params: IConditionalOrder.ConditionalOrderParamsStruct, + overrides?: CallOverrides + ): Promise; + + isValidSafeSignature( + safe: string, + sender: string, + _hash: BytesLike, + _domainSeparator: BytesLike, + arg4: BytesLike, + encodeData: BytesLike, + payload: BytesLike, + overrides?: CallOverrides + ): Promise; + + remove( + singleOrderHash: BytesLike, + overrides?: Overrides & { from?: string } + ): Promise; + + roots(arg0: string, overrides?: CallOverrides): Promise; + + setRoot( + root: BytesLike, + proof: ComposableCoW.ProofStruct, + overrides?: Overrides & { from?: string } + ): Promise; + + setRootWithContext( + root: BytesLike, + proof: ComposableCoW.ProofStruct, + factory: string, + data: BytesLike, + overrides?: Overrides & { from?: string } + ): Promise; + + setSwapGuard( + swapGuard: string, + overrides?: Overrides & { from?: string } + ): Promise; + + singleOrders( + arg0: string, + arg1: BytesLike, + overrides?: CallOverrides + ): Promise; + + swapGuards(arg0: string, overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + cabinet( + arg0: string, + arg1: BytesLike, + overrides?: CallOverrides + ): Promise; + + create( + params: IConditionalOrder.ConditionalOrderParamsStruct, + dispatch: boolean, + overrides?: Overrides & { from?: string } + ): Promise; + + createWithContext( + params: IConditionalOrder.ConditionalOrderParamsStruct, + factory: string, + data: BytesLike, + dispatch: boolean, + overrides?: Overrides & { from?: string } + ): Promise; + + domainSeparator(overrides?: CallOverrides): Promise; + + getTradeableOrderWithSignature( + owner: string, + params: IConditionalOrder.ConditionalOrderParamsStruct, + offchainInput: BytesLike, + proof: BytesLike[], + overrides?: CallOverrides + ): Promise; + + hash( + params: IConditionalOrder.ConditionalOrderParamsStruct, + overrides?: CallOverrides + ): Promise; + + isValidSafeSignature( + safe: string, + sender: string, + _hash: BytesLike, + _domainSeparator: BytesLike, + arg4: BytesLike, + encodeData: BytesLike, + payload: BytesLike, + overrides?: CallOverrides + ): Promise; + + remove( + singleOrderHash: BytesLike, + overrides?: Overrides & { from?: string } + ): Promise; + + roots( + arg0: string, + overrides?: CallOverrides + ): Promise; + + setRoot( + root: BytesLike, + proof: ComposableCoW.ProofStruct, + overrides?: Overrides & { from?: string } + ): Promise; + + setRootWithContext( + root: BytesLike, + proof: ComposableCoW.ProofStruct, + factory: string, + data: BytesLike, + overrides?: Overrides & { from?: string } + ): Promise; + + setSwapGuard( + swapGuard: string, + overrides?: Overrides & { from?: string } + ): Promise; + + singleOrders( + arg0: string, + arg1: BytesLike, + overrides?: CallOverrides + ): Promise; + + swapGuards( + arg0: string, + overrides?: CallOverrides + ): Promise; + }; +} diff --git a/src/composable/generated/ExtensibleFallbackHandler.ts b/src/composable/generated/ExtensibleFallbackHandler.ts new file mode 100644 index 0000000..2188156 --- /dev/null +++ b/src/composable/generated/ExtensibleFallbackHandler.ts @@ -0,0 +1,794 @@ +/* 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 ExtensibleFallbackHandlerInterface extends utils.Interface { + functions: { + "domainVerifiers(address,bytes32)": FunctionFragment; + "isValidSignature(bytes32,bytes)": FunctionFragment; + "onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)": FunctionFragment; + "onERC1155Received(address,address,uint256,uint256,bytes)": FunctionFragment; + "onERC721Received(address,address,uint256,bytes)": FunctionFragment; + "safeInterfaces(address,bytes4)": FunctionFragment; + "safeMethods(address,bytes4)": FunctionFragment; + "setDomainVerifier(bytes32,address)": FunctionFragment; + "setSafeMethod(bytes4,bytes32)": FunctionFragment; + "setSupportedInterface(bytes4,bool)": FunctionFragment; + "setSupportedInterfaceBatch(bytes4,bytes32[])": FunctionFragment; + "supportsInterface(bytes4)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "domainVerifiers" + | "isValidSignature" + | "onERC1155BatchReceived" + | "onERC1155Received" + | "onERC721Received" + | "safeInterfaces" + | "safeMethods" + | "setDomainVerifier" + | "setSafeMethod" + | "setSupportedInterface" + | "setSupportedInterfaceBatch" + | "supportsInterface" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "domainVerifiers", + values: [string, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "isValidSignature", + values: [BytesLike, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "onERC1155BatchReceived", + values: [string, string, BigNumberish[], BigNumberish[], BytesLike] + ): string; + encodeFunctionData( + functionFragment: "onERC1155Received", + values: [string, string, BigNumberish, BigNumberish, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "onERC721Received", + values: [string, string, BigNumberish, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "safeInterfaces", + values: [string, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "safeMethods", + values: [string, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "setDomainVerifier", + values: [BytesLike, string] + ): string; + encodeFunctionData( + functionFragment: "setSafeMethod", + values: [BytesLike, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "setSupportedInterface", + values: [BytesLike, boolean] + ): string; + encodeFunctionData( + functionFragment: "setSupportedInterfaceBatch", + values: [BytesLike, BytesLike[]] + ): string; + encodeFunctionData( + functionFragment: "supportsInterface", + values: [BytesLike] + ): string; + + decodeFunctionResult( + functionFragment: "domainVerifiers", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isValidSignature", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "onERC1155BatchReceived", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "onERC1155Received", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "onERC721Received", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "safeInterfaces", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "safeMethods", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setDomainVerifier", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setSafeMethod", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setSupportedInterface", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setSupportedInterfaceBatch", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "supportsInterface", + data: BytesLike + ): Result; + + events: { + "AddedDomainVerifier(address,bytes32,address)": EventFragment; + "AddedInterface(address,bytes4)": EventFragment; + "AddedSafeMethod(address,bytes4,bytes32)": EventFragment; + "ChangedDomainVerifier(address,bytes32,address,address)": EventFragment; + "ChangedSafeMethod(address,bytes4,bytes32,bytes32)": EventFragment; + "RemovedDomainVerifier(address,bytes32)": EventFragment; + "RemovedInterface(address,bytes4)": EventFragment; + "RemovedSafeMethod(address,bytes4)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "AddedDomainVerifier"): EventFragment; + getEvent(nameOrSignatureOrTopic: "AddedInterface"): EventFragment; + getEvent(nameOrSignatureOrTopic: "AddedSafeMethod"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ChangedDomainVerifier"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ChangedSafeMethod"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RemovedDomainVerifier"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RemovedInterface"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RemovedSafeMethod"): EventFragment; +} + +export interface AddedDomainVerifierEventObject { + safe: string; + domainSeparator: string; + verifier: string; +} +export type AddedDomainVerifierEvent = TypedEvent< + [string, string, string], + AddedDomainVerifierEventObject +>; + +export type AddedDomainVerifierEventFilter = + TypedEventFilter; + +export interface AddedInterfaceEventObject { + safe: string; + interfaceId: string; +} +export type AddedInterfaceEvent = TypedEvent< + [string, string], + AddedInterfaceEventObject +>; + +export type AddedInterfaceEventFilter = TypedEventFilter; + +export interface AddedSafeMethodEventObject { + safe: string; + selector: string; + method: string; +} +export type AddedSafeMethodEvent = TypedEvent< + [string, string, string], + AddedSafeMethodEventObject +>; + +export type AddedSafeMethodEventFilter = TypedEventFilter; + +export interface ChangedDomainVerifierEventObject { + safe: string; + domainSeparator: string; + oldVerifier: string; + newVerifier: string; +} +export type ChangedDomainVerifierEvent = TypedEvent< + [string, string, string, string], + ChangedDomainVerifierEventObject +>; + +export type ChangedDomainVerifierEventFilter = + TypedEventFilter; + +export interface ChangedSafeMethodEventObject { + safe: string; + selector: string; + oldMethod: string; + newMethod: string; +} +export type ChangedSafeMethodEvent = TypedEvent< + [string, string, string, string], + ChangedSafeMethodEventObject +>; + +export type ChangedSafeMethodEventFilter = + TypedEventFilter; + +export interface RemovedDomainVerifierEventObject { + safe: string; + domainSeparator: string; +} +export type RemovedDomainVerifierEvent = TypedEvent< + [string, string], + RemovedDomainVerifierEventObject +>; + +export type RemovedDomainVerifierEventFilter = + TypedEventFilter; + +export interface RemovedInterfaceEventObject { + safe: string; + interfaceId: string; +} +export type RemovedInterfaceEvent = TypedEvent< + [string, string], + RemovedInterfaceEventObject +>; + +export type RemovedInterfaceEventFilter = + TypedEventFilter; + +export interface RemovedSafeMethodEventObject { + safe: string; + selector: string; +} +export type RemovedSafeMethodEvent = TypedEvent< + [string, string], + RemovedSafeMethodEventObject +>; + +export type RemovedSafeMethodEventFilter = + TypedEventFilter; + +export interface ExtensibleFallbackHandler extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ExtensibleFallbackHandlerInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + domainVerifiers( + arg0: string, + arg1: BytesLike, + overrides?: CallOverrides + ): Promise<[string]>; + + isValidSignature( + _hash: BytesLike, + signature: BytesLike, + overrides?: CallOverrides + ): Promise<[string] & { magic: string }>; + + onERC1155BatchReceived( + arg0: string, + arg1: string, + arg2: BigNumberish[], + arg3: BigNumberish[], + arg4: BytesLike, + overrides?: CallOverrides + ): Promise<[string]>; + + onERC1155Received( + arg0: string, + arg1: string, + arg2: BigNumberish, + arg3: BigNumberish, + arg4: BytesLike, + overrides?: CallOverrides + ): Promise<[string]>; + + onERC721Received( + arg0: string, + arg1: string, + arg2: BigNumberish, + arg3: BytesLike, + overrides?: CallOverrides + ): Promise<[string]>; + + safeInterfaces( + arg0: string, + arg1: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + + safeMethods( + arg0: string, + arg1: BytesLike, + overrides?: CallOverrides + ): Promise<[string]>; + + setDomainVerifier( + domainSeparator: BytesLike, + newVerifier: string, + overrides?: Overrides & { from?: string } + ): Promise; + + setSafeMethod( + selector: BytesLike, + newMethod: BytesLike, + overrides?: Overrides & { from?: string } + ): Promise; + + setSupportedInterface( + interfaceId: BytesLike, + supported: boolean, + overrides?: Overrides & { from?: string } + ): Promise; + + setSupportedInterfaceBatch( + _interfaceId: BytesLike, + handlerWithSelectors: BytesLike[], + overrides?: Overrides & { from?: string } + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + }; + + domainVerifiers( + arg0: string, + arg1: BytesLike, + overrides?: CallOverrides + ): Promise; + + isValidSignature( + _hash: BytesLike, + signature: BytesLike, + overrides?: CallOverrides + ): Promise; + + onERC1155BatchReceived( + arg0: string, + arg1: string, + arg2: BigNumberish[], + arg3: BigNumberish[], + arg4: BytesLike, + overrides?: CallOverrides + ): Promise; + + onERC1155Received( + arg0: string, + arg1: string, + arg2: BigNumberish, + arg3: BigNumberish, + arg4: BytesLike, + overrides?: CallOverrides + ): Promise; + + onERC721Received( + arg0: string, + arg1: string, + arg2: BigNumberish, + arg3: BytesLike, + overrides?: CallOverrides + ): Promise; + + safeInterfaces( + arg0: string, + arg1: BytesLike, + overrides?: CallOverrides + ): Promise; + + safeMethods( + arg0: string, + arg1: BytesLike, + overrides?: CallOverrides + ): Promise; + + setDomainVerifier( + domainSeparator: BytesLike, + newVerifier: string, + overrides?: Overrides & { from?: string } + ): Promise; + + setSafeMethod( + selector: BytesLike, + newMethod: BytesLike, + overrides?: Overrides & { from?: string } + ): Promise; + + setSupportedInterface( + interfaceId: BytesLike, + supported: boolean, + overrides?: Overrides & { from?: string } + ): Promise; + + setSupportedInterfaceBatch( + _interfaceId: BytesLike, + handlerWithSelectors: BytesLike[], + overrides?: Overrides & { from?: string } + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + callStatic: { + domainVerifiers( + arg0: string, + arg1: BytesLike, + overrides?: CallOverrides + ): Promise; + + isValidSignature( + _hash: BytesLike, + signature: BytesLike, + overrides?: CallOverrides + ): Promise; + + onERC1155BatchReceived( + arg0: string, + arg1: string, + arg2: BigNumberish[], + arg3: BigNumberish[], + arg4: BytesLike, + overrides?: CallOverrides + ): Promise; + + onERC1155Received( + arg0: string, + arg1: string, + arg2: BigNumberish, + arg3: BigNumberish, + arg4: BytesLike, + overrides?: CallOverrides + ): Promise; + + onERC721Received( + arg0: string, + arg1: string, + arg2: BigNumberish, + arg3: BytesLike, + overrides?: CallOverrides + ): Promise; + + safeInterfaces( + arg0: string, + arg1: BytesLike, + overrides?: CallOverrides + ): Promise; + + safeMethods( + arg0: string, + arg1: BytesLike, + overrides?: CallOverrides + ): Promise; + + setDomainVerifier( + domainSeparator: BytesLike, + newVerifier: string, + overrides?: CallOverrides + ): Promise; + + setSafeMethod( + selector: BytesLike, + newMethod: BytesLike, + overrides?: CallOverrides + ): Promise; + + setSupportedInterface( + interfaceId: BytesLike, + supported: boolean, + overrides?: CallOverrides + ): Promise; + + setSupportedInterfaceBatch( + _interfaceId: BytesLike, + handlerWithSelectors: BytesLike[], + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "AddedDomainVerifier(address,bytes32,address)"( + safe?: string | null, + domainSeparator?: null, + verifier?: null + ): AddedDomainVerifierEventFilter; + AddedDomainVerifier( + safe?: string | null, + domainSeparator?: null, + verifier?: null + ): AddedDomainVerifierEventFilter; + + "AddedInterface(address,bytes4)"( + safe?: string | null, + interfaceId?: null + ): AddedInterfaceEventFilter; + AddedInterface( + safe?: string | null, + interfaceId?: null + ): AddedInterfaceEventFilter; + + "AddedSafeMethod(address,bytes4,bytes32)"( + safe?: string | null, + selector?: null, + method?: null + ): AddedSafeMethodEventFilter; + AddedSafeMethod( + safe?: string | null, + selector?: null, + method?: null + ): AddedSafeMethodEventFilter; + + "ChangedDomainVerifier(address,bytes32,address,address)"( + safe?: string | null, + domainSeparator?: null, + oldVerifier?: null, + newVerifier?: null + ): ChangedDomainVerifierEventFilter; + ChangedDomainVerifier( + safe?: string | null, + domainSeparator?: null, + oldVerifier?: null, + newVerifier?: null + ): ChangedDomainVerifierEventFilter; + + "ChangedSafeMethod(address,bytes4,bytes32,bytes32)"( + safe?: string | null, + selector?: null, + oldMethod?: null, + newMethod?: null + ): ChangedSafeMethodEventFilter; + ChangedSafeMethod( + safe?: string | null, + selector?: null, + oldMethod?: null, + newMethod?: null + ): ChangedSafeMethodEventFilter; + + "RemovedDomainVerifier(address,bytes32)"( + safe?: string | null, + domainSeparator?: null + ): RemovedDomainVerifierEventFilter; + RemovedDomainVerifier( + safe?: string | null, + domainSeparator?: null + ): RemovedDomainVerifierEventFilter; + + "RemovedInterface(address,bytes4)"( + safe?: string | null, + interfaceId?: null + ): RemovedInterfaceEventFilter; + RemovedInterface( + safe?: string | null, + interfaceId?: null + ): RemovedInterfaceEventFilter; + + "RemovedSafeMethod(address,bytes4)"( + safe?: string | null, + selector?: null + ): RemovedSafeMethodEventFilter; + RemovedSafeMethod( + safe?: string | null, + selector?: null + ): RemovedSafeMethodEventFilter; + }; + + estimateGas: { + domainVerifiers( + arg0: string, + arg1: BytesLike, + overrides?: CallOverrides + ): Promise; + + isValidSignature( + _hash: BytesLike, + signature: BytesLike, + overrides?: CallOverrides + ): Promise; + + onERC1155BatchReceived( + arg0: string, + arg1: string, + arg2: BigNumberish[], + arg3: BigNumberish[], + arg4: BytesLike, + overrides?: CallOverrides + ): Promise; + + onERC1155Received( + arg0: string, + arg1: string, + arg2: BigNumberish, + arg3: BigNumberish, + arg4: BytesLike, + overrides?: CallOverrides + ): Promise; + + onERC721Received( + arg0: string, + arg1: string, + arg2: BigNumberish, + arg3: BytesLike, + overrides?: CallOverrides + ): Promise; + + safeInterfaces( + arg0: string, + arg1: BytesLike, + overrides?: CallOverrides + ): Promise; + + safeMethods( + arg0: string, + arg1: BytesLike, + overrides?: CallOverrides + ): Promise; + + setDomainVerifier( + domainSeparator: BytesLike, + newVerifier: string, + overrides?: Overrides & { from?: string } + ): Promise; + + setSafeMethod( + selector: BytesLike, + newMethod: BytesLike, + overrides?: Overrides & { from?: string } + ): Promise; + + setSupportedInterface( + interfaceId: BytesLike, + supported: boolean, + overrides?: Overrides & { from?: string } + ): Promise; + + setSupportedInterfaceBatch( + _interfaceId: BytesLike, + handlerWithSelectors: BytesLike[], + overrides?: Overrides & { from?: string } + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + }; + + populateTransaction: { + domainVerifiers( + arg0: string, + arg1: BytesLike, + overrides?: CallOverrides + ): Promise; + + isValidSignature( + _hash: BytesLike, + signature: BytesLike, + overrides?: CallOverrides + ): Promise; + + onERC1155BatchReceived( + arg0: string, + arg1: string, + arg2: BigNumberish[], + arg3: BigNumberish[], + arg4: BytesLike, + overrides?: CallOverrides + ): Promise; + + onERC1155Received( + arg0: string, + arg1: string, + arg2: BigNumberish, + arg3: BigNumberish, + arg4: BytesLike, + overrides?: CallOverrides + ): Promise; + + onERC721Received( + arg0: string, + arg1: string, + arg2: BigNumberish, + arg3: BytesLike, + overrides?: CallOverrides + ): Promise; + + safeInterfaces( + arg0: string, + arg1: BytesLike, + overrides?: CallOverrides + ): Promise; + + safeMethods( + arg0: string, + arg1: BytesLike, + overrides?: CallOverrides + ): Promise; + + setDomainVerifier( + domainSeparator: BytesLike, + newVerifier: string, + overrides?: Overrides & { from?: string } + ): Promise; + + setSafeMethod( + selector: BytesLike, + newMethod: BytesLike, + overrides?: Overrides & { from?: string } + ): Promise; + + setSupportedInterface( + interfaceId: BytesLike, + supported: boolean, + overrides?: Overrides & { from?: string } + ): Promise; + + setSupportedInterfaceBatch( + _interfaceId: BytesLike, + handlerWithSelectors: BytesLike[], + overrides?: Overrides & { from?: string } + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + }; +} diff --git a/src/composable/generated/TWAP.ts b/src/composable/generated/TWAP.ts new file mode 100644 index 0000000..e08c761 --- /dev/null +++ b/src/composable/generated/TWAP.ts @@ -0,0 +1,324 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + 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 declare namespace IConditionalOrder { + export type ConditionalOrderParamsStruct = { + handler: string; + salt: BytesLike; + staticInput: BytesLike; + }; + + export type ConditionalOrderParamsStructOutput = [string, string, string] & { + handler: string; + salt: string; + staticInput: string; + }; +} + +export declare namespace GPv2Order { + export type DataStruct = { + sellToken: string; + buyToken: string; + receiver: string; + sellAmount: BigNumberish; + buyAmount: BigNumberish; + validTo: BigNumberish; + appData: BytesLike; + feeAmount: BigNumberish; + kind: BytesLike; + partiallyFillable: boolean; + sellTokenBalance: BytesLike; + buyTokenBalance: BytesLike; + }; + + export type DataStructOutput = [ + string, + string, + string, + BigNumber, + BigNumber, + number, + string, + BigNumber, + string, + boolean, + string, + string + ] & { + sellToken: string; + buyToken: string; + receiver: string; + sellAmount: BigNumber; + buyAmount: BigNumber; + validTo: number; + appData: string; + feeAmount: BigNumber; + kind: string; + partiallyFillable: boolean; + sellTokenBalance: string; + buyTokenBalance: string; + }; +} + +export interface TWAPInterface extends utils.Interface { + functions: { + "getTradeableOrder(address,address,bytes32,bytes,bytes)": FunctionFragment; + "supportsInterface(bytes4)": FunctionFragment; + "verify(address,address,bytes32,bytes32,bytes32,bytes,bytes,(address,address,address,uint256,uint256,uint32,bytes32,uint256,bytes32,bool,bytes32,bytes32))": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: "getTradeableOrder" | "supportsInterface" | "verify" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "getTradeableOrder", + values: [string, string, BytesLike, BytesLike, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "supportsInterface", + values: [BytesLike] + ): string; + encodeFunctionData( + functionFragment: "verify", + values: [ + string, + string, + BytesLike, + BytesLike, + BytesLike, + BytesLike, + BytesLike, + GPv2Order.DataStruct + ] + ): string; + + decodeFunctionResult( + functionFragment: "getTradeableOrder", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "supportsInterface", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "verify", data: BytesLike): Result; + + events: { + "ConditionalOrderCreated(address,(address,bytes32,bytes))": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "ConditionalOrderCreated"): EventFragment; +} + +export interface ConditionalOrderCreatedEventObject { + owner: string; + params: IConditionalOrder.ConditionalOrderParamsStructOutput; +} +export type ConditionalOrderCreatedEvent = TypedEvent< + [string, IConditionalOrder.ConditionalOrderParamsStructOutput], + ConditionalOrderCreatedEventObject +>; + +export type ConditionalOrderCreatedEventFilter = + TypedEventFilter; + +export interface TWAP extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: TWAPInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + getTradeableOrder( + owner: string, + arg1: string, + ctx: BytesLike, + staticInput: BytesLike, + arg4: BytesLike, + overrides?: CallOverrides + ): Promise< + [GPv2Order.DataStructOutput] & { order: GPv2Order.DataStructOutput } + >; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + + verify( + owner: string, + sender: string, + _hash: BytesLike, + domainSeparator: BytesLike, + ctx: BytesLike, + staticInput: BytesLike, + offchainInput: BytesLike, + arg7: GPv2Order.DataStruct, + overrides?: CallOverrides + ): Promise<[void]>; + }; + + getTradeableOrder( + owner: string, + arg1: string, + ctx: BytesLike, + staticInput: BytesLike, + arg4: BytesLike, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + verify( + owner: string, + sender: string, + _hash: BytesLike, + domainSeparator: BytesLike, + ctx: BytesLike, + staticInput: BytesLike, + offchainInput: BytesLike, + arg7: GPv2Order.DataStruct, + overrides?: CallOverrides + ): Promise; + + callStatic: { + getTradeableOrder( + owner: string, + arg1: string, + ctx: BytesLike, + staticInput: BytesLike, + arg4: BytesLike, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + verify( + owner: string, + sender: string, + _hash: BytesLike, + domainSeparator: BytesLike, + ctx: BytesLike, + staticInput: BytesLike, + offchainInput: BytesLike, + arg7: GPv2Order.DataStruct, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "ConditionalOrderCreated(address,(address,bytes32,bytes))"( + owner?: string | null, + params?: null + ): ConditionalOrderCreatedEventFilter; + ConditionalOrderCreated( + owner?: string | null, + params?: null + ): ConditionalOrderCreatedEventFilter; + }; + + estimateGas: { + getTradeableOrder( + owner: string, + arg1: string, + ctx: BytesLike, + staticInput: BytesLike, + arg4: BytesLike, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + verify( + owner: string, + sender: string, + _hash: BytesLike, + domainSeparator: BytesLike, + ctx: BytesLike, + staticInput: BytesLike, + offchainInput: BytesLike, + arg7: GPv2Order.DataStruct, + overrides?: CallOverrides + ): Promise; + }; + + populateTransaction: { + getTradeableOrder( + owner: string, + arg1: string, + ctx: BytesLike, + staticInput: BytesLike, + arg4: BytesLike, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + verify( + owner: string, + sender: string, + _hash: BytesLike, + domainSeparator: BytesLike, + ctx: BytesLike, + staticInput: BytesLike, + offchainInput: BytesLike, + arg7: GPv2Order.DataStruct, + overrides?: CallOverrides + ): Promise; + }; +} diff --git a/src/composable/generated/common.ts b/src/composable/generated/common.ts new file mode 100644 index 0000000..2fc40c7 --- /dev/null +++ b/src/composable/generated/common.ts @@ -0,0 +1,44 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { Listener } from "@ethersproject/providers"; +import type { Event, EventFilter } from "ethers"; + +export interface TypedEvent< + TArgsArray extends Array = any, + TArgsObject = any +> extends Event { + args: TArgsArray & TArgsObject; +} + +export interface TypedEventFilter<_TEvent extends TypedEvent> + extends EventFilter {} + +export interface TypedListener { + (...listenerArg: [...__TypechainArgsArray, TEvent]): void; +} + +type __TypechainArgsArray = T extends TypedEvent ? U : never; + +export interface OnEvent { + ( + eventFilter: TypedEventFilter, + listener: TypedListener + ): TRes; + (eventName: string, listener: Listener): TRes; +} + +export type MinEthersFactory = { + deploy(...a: ARGS[]): Promise; +}; + +export type GetContractTypeFromFactory = F extends MinEthersFactory< + infer C, + any +> + ? C + : never; + +export type GetARGsTypeFromFactory = F extends MinEthersFactory + ? Parameters + : never; diff --git a/src/composable/generated/factories/ComposableCoW__factory.ts b/src/composable/generated/factories/ComposableCoW__factory.ts new file mode 100644 index 0000000..e942a77 --- /dev/null +++ b/src/composable/generated/factories/ComposableCoW__factory.ts @@ -0,0 +1,629 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { ComposableCoW, ComposableCoWInterface } from "../ComposableCoW"; + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "_settlement", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + inputs: [], + name: "InterfaceNotSupported", + type: "error", + }, + { + inputs: [], + name: "InvalidHandler", + type: "error", + }, + { + inputs: [], + name: "ProofNotAuthed", + type: "error", + }, + { + inputs: [], + name: "SingleOrderNotAuthed", + type: "error", + }, + { + inputs: [], + name: "SwapGuardRestricted", + type: "error", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + components: [ + { + internalType: "contract IConditionalOrder", + name: "handler", + type: "address", + }, + { + internalType: "bytes32", + name: "salt", + type: "bytes32", + }, + { + internalType: "bytes", + name: "staticInput", + type: "bytes", + }, + ], + indexed: false, + internalType: "struct IConditionalOrder.ConditionalOrderParams", + name: "params", + type: "tuple", + }, + ], + name: "ConditionalOrderCreated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: false, + internalType: "bytes32", + name: "root", + type: "bytes32", + }, + { + components: [ + { + internalType: "uint256", + name: "location", + type: "uint256", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + indexed: false, + internalType: "struct ComposableCoW.Proof", + name: "proof", + type: "tuple", + }, + ], + name: "MerkleRootSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: false, + internalType: "contract ISwapGuard", + name: "swapGuard", + type: "address", + }, + ], + name: "SwapGuardSet", + type: "event", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + name: "cabinet", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "contract IConditionalOrder", + name: "handler", + type: "address", + }, + { + internalType: "bytes32", + name: "salt", + type: "bytes32", + }, + { + internalType: "bytes", + name: "staticInput", + type: "bytes", + }, + ], + internalType: "struct IConditionalOrder.ConditionalOrderParams", + name: "params", + type: "tuple", + }, + { + internalType: "bool", + name: "dispatch", + type: "bool", + }, + ], + name: "create", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "contract IConditionalOrder", + name: "handler", + type: "address", + }, + { + internalType: "bytes32", + name: "salt", + type: "bytes32", + }, + { + internalType: "bytes", + name: "staticInput", + type: "bytes", + }, + ], + internalType: "struct IConditionalOrder.ConditionalOrderParams", + name: "params", + type: "tuple", + }, + { + internalType: "contract IValueFactory", + name: "factory", + type: "address", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + { + internalType: "bool", + name: "dispatch", + type: "bool", + }, + ], + name: "createWithContext", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "domainSeparator", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + components: [ + { + internalType: "contract IConditionalOrder", + name: "handler", + type: "address", + }, + { + internalType: "bytes32", + name: "salt", + type: "bytes32", + }, + { + internalType: "bytes", + name: "staticInput", + type: "bytes", + }, + ], + internalType: "struct IConditionalOrder.ConditionalOrderParams", + name: "params", + type: "tuple", + }, + { + internalType: "bytes", + name: "offchainInput", + type: "bytes", + }, + { + internalType: "bytes32[]", + name: "proof", + type: "bytes32[]", + }, + ], + name: "getTradeableOrderWithSignature", + outputs: [ + { + components: [ + { + internalType: "contract IERC20", + name: "sellToken", + type: "address", + }, + { + internalType: "contract IERC20", + name: "buyToken", + type: "address", + }, + { + internalType: "address", + name: "receiver", + type: "address", + }, + { + internalType: "uint256", + name: "sellAmount", + type: "uint256", + }, + { + internalType: "uint256", + name: "buyAmount", + type: "uint256", + }, + { + internalType: "uint32", + name: "validTo", + type: "uint32", + }, + { + internalType: "bytes32", + name: "appData", + type: "bytes32", + }, + { + internalType: "uint256", + name: "feeAmount", + type: "uint256", + }, + { + internalType: "bytes32", + name: "kind", + type: "bytes32", + }, + { + internalType: "bool", + name: "partiallyFillable", + type: "bool", + }, + { + internalType: "bytes32", + name: "sellTokenBalance", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "buyTokenBalance", + type: "bytes32", + }, + ], + internalType: "struct GPv2Order.Data", + name: "order", + type: "tuple", + }, + { + internalType: "bytes", + name: "signature", + type: "bytes", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "contract IConditionalOrder", + name: "handler", + type: "address", + }, + { + internalType: "bytes32", + name: "salt", + type: "bytes32", + }, + { + internalType: "bytes", + name: "staticInput", + type: "bytes", + }, + ], + internalType: "struct IConditionalOrder.ConditionalOrderParams", + name: "params", + type: "tuple", + }, + ], + name: "hash", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "contract Safe", + name: "safe", + type: "address", + }, + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "bytes32", + name: "_hash", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "_domainSeparator", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + { + internalType: "bytes", + name: "encodeData", + type: "bytes", + }, + { + internalType: "bytes", + name: "payload", + type: "bytes", + }, + ], + name: "isValidSafeSignature", + outputs: [ + { + internalType: "bytes4", + name: "magic", + type: "bytes4", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "singleOrderHash", + type: "bytes32", + }, + ], + name: "remove", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + name: "roots", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "root", + type: "bytes32", + }, + { + components: [ + { + internalType: "uint256", + name: "location", + type: "uint256", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + internalType: "struct ComposableCoW.Proof", + name: "proof", + type: "tuple", + }, + ], + name: "setRoot", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "root", + type: "bytes32", + }, + { + components: [ + { + internalType: "uint256", + name: "location", + type: "uint256", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + internalType: "struct ComposableCoW.Proof", + name: "proof", + type: "tuple", + }, + { + internalType: "contract IValueFactory", + name: "factory", + type: "address", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "setRootWithContext", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "contract ISwapGuard", + name: "swapGuard", + type: "address", + }, + ], + name: "setSwapGuard", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + name: "singleOrders", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + name: "swapGuards", + outputs: [ + { + internalType: "contract ISwapGuard", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, +] as const; + +export class ComposableCoW__factory { + static readonly abi = _abi; + static createInterface(): ComposableCoWInterface { + return new utils.Interface(_abi) as ComposableCoWInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): ComposableCoW { + return new Contract(address, _abi, signerOrProvider) as ComposableCoW; + } +} diff --git a/src/composable/generated/factories/ExtensibleFallbackHandler__factory.ts b/src/composable/generated/factories/ExtensibleFallbackHandler__factory.ts new file mode 100644 index 0000000..a5b3684 --- /dev/null +++ b/src/composable/generated/factories/ExtensibleFallbackHandler__factory.ts @@ -0,0 +1,521 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + ExtensibleFallbackHandler, + ExtensibleFallbackHandlerInterface, +} from "../ExtensibleFallbackHandler"; + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "contract Safe", + name: "safe", + type: "address", + }, + { + indexed: false, + internalType: "bytes32", + name: "domainSeparator", + type: "bytes32", + }, + { + indexed: false, + internalType: "contract ISafeSignatureVerifier", + name: "verifier", + type: "address", + }, + ], + name: "AddedDomainVerifier", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "contract Safe", + name: "safe", + type: "address", + }, + { + indexed: false, + internalType: "bytes4", + name: "interfaceId", + type: "bytes4", + }, + ], + name: "AddedInterface", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "contract Safe", + name: "safe", + type: "address", + }, + { + indexed: false, + internalType: "bytes4", + name: "selector", + type: "bytes4", + }, + { + indexed: false, + internalType: "bytes32", + name: "method", + type: "bytes32", + }, + ], + name: "AddedSafeMethod", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "contract Safe", + name: "safe", + type: "address", + }, + { + indexed: false, + internalType: "bytes32", + name: "domainSeparator", + type: "bytes32", + }, + { + indexed: false, + internalType: "contract ISafeSignatureVerifier", + name: "oldVerifier", + type: "address", + }, + { + indexed: false, + internalType: "contract ISafeSignatureVerifier", + name: "newVerifier", + type: "address", + }, + ], + name: "ChangedDomainVerifier", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "contract Safe", + name: "safe", + type: "address", + }, + { + indexed: false, + internalType: "bytes4", + name: "selector", + type: "bytes4", + }, + { + indexed: false, + internalType: "bytes32", + name: "oldMethod", + type: "bytes32", + }, + { + indexed: false, + internalType: "bytes32", + name: "newMethod", + type: "bytes32", + }, + ], + name: "ChangedSafeMethod", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "contract Safe", + name: "safe", + type: "address", + }, + { + indexed: false, + internalType: "bytes32", + name: "domainSeparator", + type: "bytes32", + }, + ], + name: "RemovedDomainVerifier", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "contract Safe", + name: "safe", + type: "address", + }, + { + indexed: false, + internalType: "bytes4", + name: "interfaceId", + type: "bytes4", + }, + ], + name: "RemovedInterface", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "contract Safe", + name: "safe", + type: "address", + }, + { + indexed: false, + internalType: "bytes4", + name: "selector", + type: "bytes4", + }, + ], + name: "RemovedSafeMethod", + type: "event", + }, + { + stateMutability: "nonpayable", + type: "fallback", + }, + { + inputs: [ + { + internalType: "contract Safe", + name: "", + type: "address", + }, + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + name: "domainVerifiers", + outputs: [ + { + internalType: "contract ISafeSignatureVerifier", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "_hash", + type: "bytes32", + }, + { + internalType: "bytes", + name: "signature", + type: "bytes", + }, + ], + name: "isValidSignature", + outputs: [ + { + internalType: "bytes4", + name: "magic", + type: "bytes4", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + { + internalType: "address", + name: "", + type: "address", + }, + { + internalType: "uint256[]", + name: "", + type: "uint256[]", + }, + { + internalType: "uint256[]", + name: "", + type: "uint256[]", + }, + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + name: "onERC1155BatchReceived", + outputs: [ + { + internalType: "bytes4", + name: "", + type: "bytes4", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + { + internalType: "address", + name: "", + type: "address", + }, + { + internalType: "uint256", + name: "", + type: "uint256", + }, + { + internalType: "uint256", + name: "", + type: "uint256", + }, + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + name: "onERC1155Received", + outputs: [ + { + internalType: "bytes4", + name: "", + type: "bytes4", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + { + internalType: "address", + name: "", + type: "address", + }, + { + internalType: "uint256", + name: "", + type: "uint256", + }, + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + name: "onERC721Received", + outputs: [ + { + internalType: "bytes4", + name: "", + type: "bytes4", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "contract Safe", + name: "", + type: "address", + }, + { + internalType: "bytes4", + name: "", + type: "bytes4", + }, + ], + name: "safeInterfaces", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract Safe", + name: "", + type: "address", + }, + { + internalType: "bytes4", + name: "", + type: "bytes4", + }, + ], + name: "safeMethods", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "domainSeparator", + type: "bytes32", + }, + { + internalType: "contract ISafeSignatureVerifier", + name: "newVerifier", + type: "address", + }, + ], + name: "setDomainVerifier", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "selector", + type: "bytes4", + }, + { + internalType: "bytes32", + name: "newMethod", + type: "bytes32", + }, + ], + name: "setSafeMethod", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "interfaceId", + type: "bytes4", + }, + { + internalType: "bool", + name: "supported", + type: "bool", + }, + ], + name: "setSupportedInterface", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "_interfaceId", + type: "bytes4", + }, + { + internalType: "bytes32[]", + name: "handlerWithSelectors", + type: "bytes32[]", + }, + ], + name: "setSupportedInterfaceBatch", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "interfaceId", + type: "bytes4", + }, + ], + name: "supportsInterface", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, +] as const; + +export class ExtensibleFallbackHandler__factory { + static readonly abi = _abi; + static createInterface(): ExtensibleFallbackHandlerInterface { + return new utils.Interface(_abi) as ExtensibleFallbackHandlerInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): ExtensibleFallbackHandler { + return new Contract( + address, + _abi, + signerOrProvider + ) as ExtensibleFallbackHandler; + } +} diff --git a/src/composable/generated/factories/TWAP__factory.ts b/src/composable/generated/factories/TWAP__factory.ts new file mode 100644 index 0000000..f1a0a8a --- /dev/null +++ b/src/composable/generated/factories/TWAP__factory.ts @@ -0,0 +1,342 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { TWAP, TWAPInterface } from "../TWAP"; + +const _abi = [ + { + inputs: [ + { + internalType: "contract ComposableCoW", + name: "_composableCow", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + inputs: [], + name: "InvalidFrequency", + type: "error", + }, + { + inputs: [], + name: "InvalidMinPartLimit", + type: "error", + }, + { + inputs: [], + name: "InvalidNumParts", + type: "error", + }, + { + inputs: [], + name: "InvalidPartSellAmount", + type: "error", + }, + { + inputs: [], + name: "InvalidSameToken", + type: "error", + }, + { + inputs: [], + name: "InvalidSpan", + type: "error", + }, + { + inputs: [], + name: "InvalidStartTime", + type: "error", + }, + { + inputs: [], + name: "InvalidToken", + type: "error", + }, + { + inputs: [], + name: "OrderNotValid", + type: "error", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + components: [ + { + internalType: "contract IConditionalOrder", + name: "handler", + type: "address", + }, + { + internalType: "bytes32", + name: "salt", + type: "bytes32", + }, + { + internalType: "bytes", + name: "staticInput", + type: "bytes", + }, + ], + indexed: false, + internalType: "struct IConditionalOrder.ConditionalOrderParams", + name: "params", + type: "tuple", + }, + ], + name: "ConditionalOrderCreated", + type: "event", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "", + type: "address", + }, + { + internalType: "bytes32", + name: "ctx", + type: "bytes32", + }, + { + internalType: "bytes", + name: "staticInput", + type: "bytes", + }, + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + name: "getTradeableOrder", + outputs: [ + { + components: [ + { + internalType: "contract IERC20", + name: "sellToken", + type: "address", + }, + { + internalType: "contract IERC20", + name: "buyToken", + type: "address", + }, + { + internalType: "address", + name: "receiver", + type: "address", + }, + { + internalType: "uint256", + name: "sellAmount", + type: "uint256", + }, + { + internalType: "uint256", + name: "buyAmount", + type: "uint256", + }, + { + internalType: "uint32", + name: "validTo", + type: "uint32", + }, + { + internalType: "bytes32", + name: "appData", + type: "bytes32", + }, + { + internalType: "uint256", + name: "feeAmount", + type: "uint256", + }, + { + internalType: "bytes32", + name: "kind", + type: "bytes32", + }, + { + internalType: "bool", + name: "partiallyFillable", + type: "bool", + }, + { + internalType: "bytes32", + name: "sellTokenBalance", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "buyTokenBalance", + type: "bytes32", + }, + ], + internalType: "struct GPv2Order.Data", + name: "order", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "interfaceId", + type: "bytes4", + }, + ], + name: "supportsInterface", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "bytes32", + name: "_hash", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "domainSeparator", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "ctx", + type: "bytes32", + }, + { + internalType: "bytes", + name: "staticInput", + type: "bytes", + }, + { + internalType: "bytes", + name: "offchainInput", + type: "bytes", + }, + { + components: [ + { + internalType: "contract IERC20", + name: "sellToken", + type: "address", + }, + { + internalType: "contract IERC20", + name: "buyToken", + type: "address", + }, + { + internalType: "address", + name: "receiver", + type: "address", + }, + { + internalType: "uint256", + name: "sellAmount", + type: "uint256", + }, + { + internalType: "uint256", + name: "buyAmount", + type: "uint256", + }, + { + internalType: "uint32", + name: "validTo", + type: "uint32", + }, + { + internalType: "bytes32", + name: "appData", + type: "bytes32", + }, + { + internalType: "uint256", + name: "feeAmount", + type: "uint256", + }, + { + internalType: "bytes32", + name: "kind", + type: "bytes32", + }, + { + internalType: "bool", + name: "partiallyFillable", + type: "bool", + }, + { + internalType: "bytes32", + name: "sellTokenBalance", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "buyTokenBalance", + type: "bytes32", + }, + ], + internalType: "struct GPv2Order.Data", + name: "", + type: "tuple", + }, + ], + name: "verify", + outputs: [], + stateMutability: "view", + type: "function", + }, +] as const; + +export class TWAP__factory { + static readonly abi = _abi; + static createInterface(): TWAPInterface { + return new utils.Interface(_abi) as TWAPInterface; + } + static connect(address: string, signerOrProvider: Signer | Provider): TWAP { + return new Contract(address, _abi, signerOrProvider) as TWAP; + } +} diff --git a/src/composable/generated/factories/index.ts b/src/composable/generated/factories/index.ts new file mode 100644 index 0000000..1051d12 --- /dev/null +++ b/src/composable/generated/factories/index.ts @@ -0,0 +1,6 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { ComposableCoW__factory } from "./ComposableCoW__factory"; +export { ExtensibleFallbackHandler__factory } from "./ExtensibleFallbackHandler__factory"; +export { TWAP__factory } from "./TWAP__factory"; diff --git a/src/composable/generated/index.ts b/src/composable/generated/index.ts new file mode 100644 index 0000000..0bd58a8 --- /dev/null +++ b/src/composable/generated/index.ts @@ -0,0 +1,10 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { ComposableCoW } from "./ComposableCoW"; +export type { ExtensibleFallbackHandler } from "./ExtensibleFallbackHandler"; +export type { TWAP } from "./TWAP"; +export * as factories from "./factories"; +export { ComposableCoW__factory } from "./factories/ComposableCoW__factory"; +export { ExtensibleFallbackHandler__factory } from "./factories/ExtensibleFallbackHandler__factory"; +export { TWAP__factory } from "./factories/TWAP__factory"; diff --git a/src/order-book/generated/index.ts b/src/order-book/generated/index.ts index 45a3b3b..1889296 100644 --- a/src/order-book/generated/index.ts +++ b/src/order-book/generated/index.ts @@ -18,6 +18,7 @@ export type { EcdsaSignature } from './models/EcdsaSignature'; export { EcdsaSigningScheme } from './models/EcdsaSigningScheme'; export type { EthflowData } from './models/EthflowData'; export type { ExecutedAmounts } from './models/ExecutedAmounts'; +export type { ExecutedProtocolFee } from './models/ExecutedProtocolFee'; export type { FeePolicy } from './models/FeePolicy'; export type { InteractionData } from './models/InteractionData'; export type { NativePriceResponse } from './models/NativePriceResponse'; diff --git a/src/order-book/generated/models/ExecutedProtocolFee.ts b/src/order-book/generated/models/ExecutedProtocolFee.ts new file mode 100644 index 0000000..cbd6547 --- /dev/null +++ b/src/order-book/generated/models/ExecutedProtocolFee.ts @@ -0,0 +1,20 @@ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { Address } from './Address'; +import type { FeePolicy } from './FeePolicy'; +import type { TokenAmount } from './TokenAmount'; + +export type ExecutedProtocolFee = { + policy?: FeePolicy; + /** + * Fee amount taken + */ + amount?: TokenAmount; + /** + * The token in which the fee is taken + */ + token?: Address; +}; + diff --git a/src/order-book/generated/models/SolverSettlement.ts b/src/order-book/generated/models/SolverSettlement.ts index a8b6f13..96070dc 100644 --- a/src/order-book/generated/models/SolverSettlement.ts +++ b/src/order-book/generated/models/SolverSettlement.ts @@ -3,7 +3,6 @@ /* eslint-disable */ import type { BigUint } from './BigUint'; -import type { CallData } from './CallData'; import type { UID } from './UID'; export type SolverSettlement = { @@ -45,19 +44,5 @@ export type SolverSettlement = { id?: UID; executedAmount?: BigUint; }>; - /** - * Transaction `calldata` that is executed on-chain if the settlement is executed. - */ - callData?: CallData; - /** - * Full `calldata` as generated from the original solver output. - * - * It can be different from the executed transaction if part of the settlements are internalised - * (use internal liquidity in lieu of trading against on-chain liquidity). - * - * This field is omitted in case it coincides with `callData`. - * - */ - uninternalizedCallData?: CallData; }; diff --git a/src/order-book/generated/models/Trade.ts b/src/order-book/generated/models/Trade.ts index 3c37661..8c9efac 100644 --- a/src/order-book/generated/models/Trade.ts +++ b/src/order-book/generated/models/Trade.ts @@ -4,7 +4,7 @@ import type { Address } from './Address'; import type { BigUint } from './BigUint'; -import type { FeePolicy } from './FeePolicy'; +import type { ExecutedProtocolFee } from './ExecutedProtocolFee'; import type { TokenAmount } from './TokenAmount'; import type { TransactionHash } from './TransactionHash'; import type { UID } from './UID'; @@ -55,9 +55,9 @@ export type Trade = { */ txHash: TransactionHash | null; /** - * The fee policies that were used to compute the fees for this trade. Listed in the order they got applied. + * Executed protocol fees for this trade, together with the fee policies used. Listed in the order they got applied. * */ - feePolicies?: Array; + executedProtocolFees?: Array; };