UNPKG

@cheethas/splits-sdk

Version:

Fork of the splits SDK for the 0xSplits protocol, testing experimental features

920 lines (805 loc) 27.4 kB
/* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ import { ethers, EventFilter, Signer, BigNumber, BigNumberish, PopulatedTransaction, BaseContract, ContractTransaction, Overrides, CallOverrides, } from "ethers"; import { BytesLike } from "@ethersproject/bytes"; import { Listener, Provider } from "@ethersproject/providers"; import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; import { TypedEventFilter, TypedEvent, TypedListener } from "../../commons"; interface SplitMainInterface extends ethers.utils.Interface { functions: { "PERCENTAGE_SCALE()": FunctionFragment; "acceptControl(address)": FunctionFragment; "cancelControlTransfer(address)": FunctionFragment; "createSplit(address[],uint32[],uint32,address)": FunctionFragment; "distributeERC20(address,address,address[],uint32[],uint32,address)": FunctionFragment; "distributeETH(address,address[],uint32[],uint32,address)": FunctionFragment; "getController(address)": FunctionFragment; "getERC20Balance(address,address)": FunctionFragment; "getETHBalance(address)": FunctionFragment; "getHash(address)": FunctionFragment; "getNewPotentialController(address)": FunctionFragment; "makeSplitImmutable(address)": FunctionFragment; "predictImmutableSplitAddress(address[],uint32[],uint32)": FunctionFragment; "transferControl(address,address)": FunctionFragment; "updateAndDistributeERC20(address,address,address[],uint32[],uint32,address)": FunctionFragment; "updateAndDistributeETH(address,address[],uint32[],uint32,address)": FunctionFragment; "updateSplit(address,address[],uint32[],uint32)": FunctionFragment; "walletImplementation()": FunctionFragment; "withdraw(address,uint256,address[])": FunctionFragment; }; encodeFunctionData( functionFragment: "PERCENTAGE_SCALE", values?: undefined ): string; encodeFunctionData( functionFragment: "acceptControl", values: [string] ): string; encodeFunctionData( functionFragment: "cancelControlTransfer", values: [string] ): string; encodeFunctionData( functionFragment: "createSplit", values: [string[], BigNumberish[], BigNumberish, string] ): string; encodeFunctionData( functionFragment: "distributeERC20", values: [string, string, string[], BigNumberish[], BigNumberish, string] ): string; encodeFunctionData( functionFragment: "distributeETH", values: [string, string[], BigNumberish[], BigNumberish, string] ): string; encodeFunctionData( functionFragment: "getController", values: [string] ): string; encodeFunctionData( functionFragment: "getERC20Balance", values: [string, string] ): string; encodeFunctionData( functionFragment: "getETHBalance", values: [string] ): string; encodeFunctionData(functionFragment: "getHash", values: [string]): string; encodeFunctionData( functionFragment: "getNewPotentialController", values: [string] ): string; encodeFunctionData( functionFragment: "makeSplitImmutable", values: [string] ): string; encodeFunctionData( functionFragment: "predictImmutableSplitAddress", values: [string[], BigNumberish[], BigNumberish] ): string; encodeFunctionData( functionFragment: "transferControl", values: [string, string] ): string; encodeFunctionData( functionFragment: "updateAndDistributeERC20", values: [string, string, string[], BigNumberish[], BigNumberish, string] ): string; encodeFunctionData( functionFragment: "updateAndDistributeETH", values: [string, string[], BigNumberish[], BigNumberish, string] ): string; encodeFunctionData( functionFragment: "updateSplit", values: [string, string[], BigNumberish[], BigNumberish] ): string; encodeFunctionData( functionFragment: "walletImplementation", values?: undefined ): string; encodeFunctionData( functionFragment: "withdraw", values: [string, BigNumberish, string[]] ): string; decodeFunctionResult( functionFragment: "PERCENTAGE_SCALE", data: BytesLike ): Result; decodeFunctionResult( functionFragment: "acceptControl", data: BytesLike ): Result; decodeFunctionResult( functionFragment: "cancelControlTransfer", data: BytesLike ): Result; decodeFunctionResult( functionFragment: "createSplit", data: BytesLike ): Result; decodeFunctionResult( functionFragment: "distributeERC20", data: BytesLike ): Result; decodeFunctionResult( functionFragment: "distributeETH", data: BytesLike ): Result; decodeFunctionResult( functionFragment: "getController", data: BytesLike ): Result; decodeFunctionResult( functionFragment: "getERC20Balance", data: BytesLike ): Result; decodeFunctionResult( functionFragment: "getETHBalance", data: BytesLike ): Result; decodeFunctionResult(functionFragment: "getHash", data: BytesLike): Result; decodeFunctionResult( functionFragment: "getNewPotentialController", data: BytesLike ): Result; decodeFunctionResult( functionFragment: "makeSplitImmutable", data: BytesLike ): Result; decodeFunctionResult( functionFragment: "predictImmutableSplitAddress", data: BytesLike ): Result; decodeFunctionResult( functionFragment: "transferControl", data: BytesLike ): Result; decodeFunctionResult( functionFragment: "updateAndDistributeERC20", data: BytesLike ): Result; decodeFunctionResult( functionFragment: "updateAndDistributeETH", data: BytesLike ): Result; decodeFunctionResult( functionFragment: "updateSplit", data: BytesLike ): Result; decodeFunctionResult( functionFragment: "walletImplementation", data: BytesLike ): Result; decodeFunctionResult(functionFragment: "withdraw", data: BytesLike): Result; events: { "CancelControlTransfer(address)": EventFragment; "ControlTransfer(address,address,address)": EventFragment; "CreateSplit(address,address[],uint32[],uint32,address)": EventFragment; "DistributeERC20(address,address,uint256,address)": EventFragment; "DistributeETH(address,uint256,address)": EventFragment; "InitiateControlTransfer(address,address)": EventFragment; "UpdateSplit(address,address[],uint32[],uint32)": EventFragment; "Withdrawal(address,uint256,address[],uint256[])": EventFragment; }; getEvent(nameOrSignatureOrTopic: "CancelControlTransfer"): EventFragment; getEvent(nameOrSignatureOrTopic: "ControlTransfer"): EventFragment; getEvent(nameOrSignatureOrTopic: "CreateSplit"): EventFragment; getEvent(nameOrSignatureOrTopic: "DistributeERC20"): EventFragment; getEvent(nameOrSignatureOrTopic: "DistributeETH"): EventFragment; getEvent(nameOrSignatureOrTopic: "InitiateControlTransfer"): EventFragment; getEvent(nameOrSignatureOrTopic: "UpdateSplit"): EventFragment; getEvent(nameOrSignatureOrTopic: "Withdrawal"): EventFragment; } export class SplitMain extends BaseContract { connect(signerOrProvider: Signer | Provider | string): this; attach(addressOrName: string): this; deployed(): Promise<this>; listeners<EventArgsArray extends Array<any>, EventArgsObject>( eventFilter?: TypedEventFilter<EventArgsArray, EventArgsObject> ): Array<TypedListener<EventArgsArray, EventArgsObject>>; off<EventArgsArray extends Array<any>, EventArgsObject>( eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>, listener: TypedListener<EventArgsArray, EventArgsObject> ): this; on<EventArgsArray extends Array<any>, EventArgsObject>( eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>, listener: TypedListener<EventArgsArray, EventArgsObject> ): this; once<EventArgsArray extends Array<any>, EventArgsObject>( eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>, listener: TypedListener<EventArgsArray, EventArgsObject> ): this; removeListener<EventArgsArray extends Array<any>, EventArgsObject>( eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>, listener: TypedListener<EventArgsArray, EventArgsObject> ): this; removeAllListeners<EventArgsArray extends Array<any>, EventArgsObject>( eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject> ): this; listeners(eventName?: string): Array<Listener>; off(eventName: string, listener: Listener): this; on(eventName: string, listener: Listener): this; once(eventName: string, listener: Listener): this; removeListener(eventName: string, listener: Listener): this; removeAllListeners(eventName?: string): this; queryFilter<EventArgsArray extends Array<any>, EventArgsObject>( event: TypedEventFilter<EventArgsArray, EventArgsObject>, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined ): Promise<Array<TypedEvent<EventArgsArray & EventArgsObject>>>; interface: SplitMainInterface; functions: { PERCENTAGE_SCALE(overrides?: CallOverrides): Promise<[BigNumber]>; acceptControl( split: string, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<ContractTransaction>; cancelControlTransfer( split: string, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<ContractTransaction>; createSplit( accounts: string[], percentAllocations: BigNumberish[], distributorFee: BigNumberish, controller: string, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<ContractTransaction>; distributeERC20( split: string, token: string, accounts: string[], percentAllocations: BigNumberish[], distributorFee: BigNumberish, distributorAddress: string, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<ContractTransaction>; distributeETH( split: string, accounts: string[], percentAllocations: BigNumberish[], distributorFee: BigNumberish, distributorAddress: string, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<ContractTransaction>; getController(split: string, overrides?: CallOverrides): Promise<[string]>; getERC20Balance( account: string, token: string, overrides?: CallOverrides ): Promise<[BigNumber]>; getETHBalance( account: string, overrides?: CallOverrides ): Promise<[BigNumber]>; getHash(split: string, overrides?: CallOverrides): Promise<[string]>; getNewPotentialController( split: string, overrides?: CallOverrides ): Promise<[string]>; makeSplitImmutable( split: string, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<ContractTransaction>; predictImmutableSplitAddress( accounts: string[], percentAllocations: BigNumberish[], distributorFee: BigNumberish, overrides?: CallOverrides ): Promise<[string] & { split: string }>; transferControl( split: string, newController: string, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<ContractTransaction>; updateAndDistributeERC20( split: string, token: string, accounts: string[], percentAllocations: BigNumberish[], distributorFee: BigNumberish, distributorAddress: string, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<ContractTransaction>; updateAndDistributeETH( split: string, accounts: string[], percentAllocations: BigNumberish[], distributorFee: BigNumberish, distributorAddress: string, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<ContractTransaction>; updateSplit( split: string, accounts: string[], percentAllocations: BigNumberish[], distributorFee: BigNumberish, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<ContractTransaction>; walletImplementation(overrides?: CallOverrides): Promise<[string]>; withdraw( account: string, withdrawETH: BigNumberish, tokens: string[], overrides?: Overrides & { from?: string | Promise<string> } ): Promise<ContractTransaction>; }; PERCENTAGE_SCALE(overrides?: CallOverrides): Promise<BigNumber>; acceptControl( split: string, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<ContractTransaction>; cancelControlTransfer( split: string, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<ContractTransaction>; createSplit( accounts: string[], percentAllocations: BigNumberish[], distributorFee: BigNumberish, controller: string, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<ContractTransaction>; distributeERC20( split: string, token: string, accounts: string[], percentAllocations: BigNumberish[], distributorFee: BigNumberish, distributorAddress: string, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<ContractTransaction>; distributeETH( split: string, accounts: string[], percentAllocations: BigNumberish[], distributorFee: BigNumberish, distributorAddress: string, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<ContractTransaction>; getController(split: string, overrides?: CallOverrides): Promise<string>; getERC20Balance( account: string, token: string, overrides?: CallOverrides ): Promise<BigNumber>; getETHBalance(account: string, overrides?: CallOverrides): Promise<BigNumber>; getHash(split: string, overrides?: CallOverrides): Promise<string>; getNewPotentialController( split: string, overrides?: CallOverrides ): Promise<string>; makeSplitImmutable( split: string, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<ContractTransaction>; predictImmutableSplitAddress( accounts: string[], percentAllocations: BigNumberish[], distributorFee: BigNumberish, overrides?: CallOverrides ): Promise<string>; transferControl( split: string, newController: string, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<ContractTransaction>; updateAndDistributeERC20( split: string, token: string, accounts: string[], percentAllocations: BigNumberish[], distributorFee: BigNumberish, distributorAddress: string, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<ContractTransaction>; updateAndDistributeETH( split: string, accounts: string[], percentAllocations: BigNumberish[], distributorFee: BigNumberish, distributorAddress: string, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<ContractTransaction>; updateSplit( split: string, accounts: string[], percentAllocations: BigNumberish[], distributorFee: BigNumberish, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<ContractTransaction>; walletImplementation(overrides?: CallOverrides): Promise<string>; withdraw( account: string, withdrawETH: BigNumberish, tokens: string[], overrides?: Overrides & { from?: string | Promise<string> } ): Promise<ContractTransaction>; callStatic: { PERCENTAGE_SCALE(overrides?: CallOverrides): Promise<BigNumber>; acceptControl(split: string, overrides?: CallOverrides): Promise<void>; cancelControlTransfer( split: string, overrides?: CallOverrides ): Promise<void>; createSplit( accounts: string[], percentAllocations: BigNumberish[], distributorFee: BigNumberish, controller: string, overrides?: CallOverrides ): Promise<string>; distributeERC20( split: string, token: string, accounts: string[], percentAllocations: BigNumberish[], distributorFee: BigNumberish, distributorAddress: string, overrides?: CallOverrides ): Promise<void>; distributeETH( split: string, accounts: string[], percentAllocations: BigNumberish[], distributorFee: BigNumberish, distributorAddress: string, overrides?: CallOverrides ): Promise<void>; getController(split: string, overrides?: CallOverrides): Promise<string>; getERC20Balance( account: string, token: string, overrides?: CallOverrides ): Promise<BigNumber>; getETHBalance( account: string, overrides?: CallOverrides ): Promise<BigNumber>; getHash(split: string, overrides?: CallOverrides): Promise<string>; getNewPotentialController( split: string, overrides?: CallOverrides ): Promise<string>; makeSplitImmutable(split: string, overrides?: CallOverrides): Promise<void>; predictImmutableSplitAddress( accounts: string[], percentAllocations: BigNumberish[], distributorFee: BigNumberish, overrides?: CallOverrides ): Promise<string>; transferControl( split: string, newController: string, overrides?: CallOverrides ): Promise<void>; updateAndDistributeERC20( split: string, token: string, accounts: string[], percentAllocations: BigNumberish[], distributorFee: BigNumberish, distributorAddress: string, overrides?: CallOverrides ): Promise<void>; updateAndDistributeETH( split: string, accounts: string[], percentAllocations: BigNumberish[], distributorFee: BigNumberish, distributorAddress: string, overrides?: CallOverrides ): Promise<void>; updateSplit( split: string, accounts: string[], percentAllocations: BigNumberish[], distributorFee: BigNumberish, overrides?: CallOverrides ): Promise<void>; walletImplementation(overrides?: CallOverrides): Promise<string>; withdraw( account: string, withdrawETH: BigNumberish, tokens: string[], overrides?: CallOverrides ): Promise<void>; }; filters: { CancelControlTransfer( split?: string | null ): TypedEventFilter<[string], { split: string }>; ControlTransfer( split?: string | null, previousController?: string | null, newController?: string | null ): TypedEventFilter< [string, string, string], { split: string; previousController: string; newController: string } >; CreateSplit( split?: string | null, accounts?: null, percentAllocations?: null, distributorFee?: null, controller?: null ): TypedEventFilter< [string, string[], number[], number, string], { split: string; accounts: string[]; percentAllocations: number[]; distributorFee: number; controller: string; } >; DistributeERC20( split?: string | null, token?: string | null, amount?: null, distributorAddress?: string | null ): TypedEventFilter< [string, string, BigNumber, string], { split: string; token: string; amount: BigNumber; distributorAddress: string; } >; DistributeETH( split?: string | null, amount?: null, distributorAddress?: string | null ): TypedEventFilter< [string, BigNumber, string], { split: string; amount: BigNumber; distributorAddress: string } >; InitiateControlTransfer( split?: string | null, newPotentialController?: string | null ): TypedEventFilter< [string, string], { split: string; newPotentialController: string } >; UpdateSplit( split?: string | null, accounts?: null, percentAllocations?: null, distributorFee?: null ): TypedEventFilter< [string, string[], number[], number], { split: string; accounts: string[]; percentAllocations: number[]; distributorFee: number; } >; Withdrawal( account?: string | null, ethAmount?: null, tokens?: null, tokenAmounts?: null ): TypedEventFilter< [string, BigNumber, string[], BigNumber[]], { account: string; ethAmount: BigNumber; tokens: string[]; tokenAmounts: BigNumber[]; } >; }; estimateGas: { PERCENTAGE_SCALE(overrides?: CallOverrides): Promise<BigNumber>; acceptControl( split: string, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<BigNumber>; cancelControlTransfer( split: string, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<BigNumber>; createSplit( accounts: string[], percentAllocations: BigNumberish[], distributorFee: BigNumberish, controller: string, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<BigNumber>; distributeERC20( split: string, token: string, accounts: string[], percentAllocations: BigNumberish[], distributorFee: BigNumberish, distributorAddress: string, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<BigNumber>; distributeETH( split: string, accounts: string[], percentAllocations: BigNumberish[], distributorFee: BigNumberish, distributorAddress: string, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<BigNumber>; getController(split: string, overrides?: CallOverrides): Promise<BigNumber>; getERC20Balance( account: string, token: string, overrides?: CallOverrides ): Promise<BigNumber>; getETHBalance( account: string, overrides?: CallOverrides ): Promise<BigNumber>; getHash(split: string, overrides?: CallOverrides): Promise<BigNumber>; getNewPotentialController( split: string, overrides?: CallOverrides ): Promise<BigNumber>; makeSplitImmutable( split: string, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<BigNumber>; predictImmutableSplitAddress( accounts: string[], percentAllocations: BigNumberish[], distributorFee: BigNumberish, overrides?: CallOverrides ): Promise<BigNumber>; transferControl( split: string, newController: string, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<BigNumber>; updateAndDistributeERC20( split: string, token: string, accounts: string[], percentAllocations: BigNumberish[], distributorFee: BigNumberish, distributorAddress: string, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<BigNumber>; updateAndDistributeETH( split: string, accounts: string[], percentAllocations: BigNumberish[], distributorFee: BigNumberish, distributorAddress: string, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<BigNumber>; updateSplit( split: string, accounts: string[], percentAllocations: BigNumberish[], distributorFee: BigNumberish, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<BigNumber>; walletImplementation(overrides?: CallOverrides): Promise<BigNumber>; withdraw( account: string, withdrawETH: BigNumberish, tokens: string[], overrides?: Overrides & { from?: string | Promise<string> } ): Promise<BigNumber>; }; populateTransaction: { PERCENTAGE_SCALE(overrides?: CallOverrides): Promise<PopulatedTransaction>; acceptControl( split: string, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<PopulatedTransaction>; cancelControlTransfer( split: string, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<PopulatedTransaction>; createSplit( accounts: string[], percentAllocations: BigNumberish[], distributorFee: BigNumberish, controller: string, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<PopulatedTransaction>; distributeERC20( split: string, token: string, accounts: string[], percentAllocations: BigNumberish[], distributorFee: BigNumberish, distributorAddress: string, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<PopulatedTransaction>; distributeETH( split: string, accounts: string[], percentAllocations: BigNumberish[], distributorFee: BigNumberish, distributorAddress: string, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<PopulatedTransaction>; getController( split: string, overrides?: CallOverrides ): Promise<PopulatedTransaction>; getERC20Balance( account: string, token: string, overrides?: CallOverrides ): Promise<PopulatedTransaction>; getETHBalance( account: string, overrides?: CallOverrides ): Promise<PopulatedTransaction>; getHash( split: string, overrides?: CallOverrides ): Promise<PopulatedTransaction>; getNewPotentialController( split: string, overrides?: CallOverrides ): Promise<PopulatedTransaction>; makeSplitImmutable( split: string, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<PopulatedTransaction>; predictImmutableSplitAddress( accounts: string[], percentAllocations: BigNumberish[], distributorFee: BigNumberish, overrides?: CallOverrides ): Promise<PopulatedTransaction>; transferControl( split: string, newController: string, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<PopulatedTransaction>; updateAndDistributeERC20( split: string, token: string, accounts: string[], percentAllocations: BigNumberish[], distributorFee: BigNumberish, distributorAddress: string, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<PopulatedTransaction>; updateAndDistributeETH( split: string, accounts: string[], percentAllocations: BigNumberish[], distributorFee: BigNumberish, distributorAddress: string, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<PopulatedTransaction>; updateSplit( split: string, accounts: string[], percentAllocations: BigNumberish[], distributorFee: BigNumberish, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<PopulatedTransaction>; walletImplementation( overrides?: CallOverrides ): Promise<PopulatedTransaction>; withdraw( account: string, withdrawETH: BigNumberish, tokens: string[], overrides?: Overrides & { from?: string | Promise<string> } ): Promise<PopulatedTransaction>; }; }