import { EncoderOverrides, ContractFunctionObj, ContractTxFunctionObj, BaseContract } from '@0x/base-contract'; import { BlockRange, ContractAbi, ContractArtifact, DecodedLogArgs, LogWithDecodedArgs, TxData, SupportedProvider } from 'ethereum-types'; import { BigNumber } from '@0x/utils'; import { EventCallback, IndexedFilterValues, SimpleContractArtifact } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; export declare type IExchangeEventArgs = IExchangeAssetProxyRegisteredEventArgs | IExchangeCancelEventArgs | IExchangeCancelUpToEventArgs | IExchangeFillEventArgs | IExchangeProtocolFeeCollectorAddressEventArgs | IExchangeProtocolFeeMultiplierEventArgs | IExchangeSignatureValidatorApprovalEventArgs | IExchangeTransactionExecutionEventArgs; export declare enum IExchangeEvents { AssetProxyRegistered = "AssetProxyRegistered", Cancel = "Cancel", CancelUpTo = "CancelUpTo", Fill = "Fill", ProtocolFeeCollectorAddress = "ProtocolFeeCollectorAddress", ProtocolFeeMultiplier = "ProtocolFeeMultiplier", SignatureValidatorApproval = "SignatureValidatorApproval", TransactionExecution = "TransactionExecution" } export interface IExchangeAssetProxyRegisteredEventArgs extends DecodedLogArgs { id: string; assetProxy: string; } export interface IExchangeCancelEventArgs extends DecodedLogArgs { makerAddress: string; feeRecipientAddress: string; makerAssetData: string; takerAssetData: string; senderAddress: string; orderHash: string; } export interface IExchangeCancelUpToEventArgs extends DecodedLogArgs { makerAddress: string; orderSenderAddress: string; orderEpoch: BigNumber; } export interface IExchangeFillEventArgs extends DecodedLogArgs { makerAddress: string; feeRecipientAddress: string; makerAssetData: string; takerAssetData: string; makerFeeAssetData: string; takerFeeAssetData: string; orderHash: string; takerAddress: string; senderAddress: string; makerAssetFilledAmount: BigNumber; takerAssetFilledAmount: BigNumber; makerFeePaid: BigNumber; takerFeePaid: BigNumber; protocolFeePaid: BigNumber; } export interface IExchangeProtocolFeeCollectorAddressEventArgs extends DecodedLogArgs { oldProtocolFeeCollector: string; updatedProtocolFeeCollector: string; } export interface IExchangeProtocolFeeMultiplierEventArgs extends DecodedLogArgs { oldProtocolFeeMultiplier: BigNumber; updatedProtocolFeeMultiplier: BigNumber; } export interface IExchangeSignatureValidatorApprovalEventArgs extends DecodedLogArgs { signerAddress: string; validatorAddress: string; isApproved: boolean; } export interface IExchangeTransactionExecutionEventArgs extends DecodedLogArgs { transactionHash: string; } export declare class IExchangeContract extends BaseContract { /** * @ignore */ static deployedBytecode: string | undefined; static contractName: string; private readonly _methodABIIndex; private readonly _subscriptionManager; static deployFrom0xArtifactAsync(artifact: ContractArtifact | SimpleContractArtifact, supportedProvider: SupportedProvider, txDefaults: Partial, logDecodeDependencies: { [contractName: string]: (ContractArtifact | SimpleContractArtifact); }): Promise; static deployWithLibrariesFrom0xArtifactAsync(artifact: ContractArtifact, libraryArtifacts: { [libraryName: string]: ContractArtifact; }, supportedProvider: SupportedProvider, txDefaults: Partial, logDecodeDependencies: { [contractName: string]: (ContractArtifact | SimpleContractArtifact); }): Promise; static deployAsync(bytecode: string, abi: ContractAbi, supportedProvider: SupportedProvider, txDefaults: Partial, logDecodeDependencies: { [contractName: string]: ContractAbi; }): Promise; /** * @returns The contract ABI */ static ABI(): ContractAbi; protected static _deployLibrariesAsync(artifact: ContractArtifact, libraryArtifacts: { [libraryName: string]: ContractArtifact; }, web3Wrapper: Web3Wrapper, txDefaults: Partial, libraryAddresses?: { [libraryName: string]: string; }): Promise<{ [libraryName: string]: string; }>; getFunctionSignature(methodName: string): string; getABIDecodedTransactionData(methodName: string, callData: string): T; getABIDecodedReturnData(methodName: string, callData: string): T; getSelector(methodName: string): string; /** * Executes multiple calls of cancelOrder. * @param orders Array of order specifications. */ batchCancelOrders(orders: Array<{ makerAddress: string; takerAddress: string; feeRecipientAddress: string; senderAddress: string; makerAssetAmount: BigNumber; takerAssetAmount: BigNumber; makerFee: BigNumber; takerFee: BigNumber; expirationTimeSeconds: BigNumber; salt: BigNumber; makerAssetData: string; takerAssetData: string; makerFeeAssetData: string; takerFeeAssetData: string; }>): ContractTxFunctionObj; /** * Executes a batch of Exchange method calls in the context of signer(s). * @param transactions Array of 0x transactions containing salt, signerAddress, * and data. * @param signatures Array of proofs that transactions have been signed by * signer(s). * @returns Array containing ABI encoded return data for each of the underlying Exchange function calls. */ batchExecuteTransactions(transactions: Array<{ salt: BigNumber; expirationTimeSeconds: BigNumber; gasPrice: BigNumber; signerAddress: string; data: string; }>, signatures: string[]): ContractTxFunctionObj; /** * Executes multiple calls of fillOrKillOrder. * @param orders Array of order specifications. * @param takerAssetFillAmounts Array of desired amounts of takerAsset to sell * in orders. * @param signatures Proofs that orders have been created by makers. * @returns Array of amounts filled and fees paid by makers and taker. */ batchFillOrKillOrders(orders: Array<{ makerAddress: string; takerAddress: string; feeRecipientAddress: string; senderAddress: string; makerAssetAmount: BigNumber; takerAssetAmount: BigNumber; makerFee: BigNumber; takerFee: BigNumber; expirationTimeSeconds: BigNumber; salt: BigNumber; makerAssetData: string; takerAssetData: string; makerFeeAssetData: string; takerFeeAssetData: string; }>, takerAssetFillAmounts: BigNumber[], signatures: string[]): ContractTxFunctionObj>; /** * Executes multiple calls of fillOrder. * @param orders Array of order specifications. * @param takerAssetFillAmounts Array of desired amounts of takerAsset to sell * in orders. * @param signatures Proofs that orders have been created by makers. * @returns Array of amounts filled and fees paid by makers and taker. */ batchFillOrders(orders: Array<{ makerAddress: string; takerAddress: string; feeRecipientAddress: string; senderAddress: string; makerAssetAmount: BigNumber; takerAssetAmount: BigNumber; makerFee: BigNumber; takerFee: BigNumber; expirationTimeSeconds: BigNumber; salt: BigNumber; makerAssetData: string; takerAssetData: string; makerFeeAssetData: string; takerFeeAssetData: string; }>, takerAssetFillAmounts: BigNumber[], signatures: string[]): ContractTxFunctionObj>; /** * Executes multiple calls of fillOrder. If any fill reverts, the error is caught and ignored. * @param orders Array of order specifications. * @param takerAssetFillAmounts Array of desired amounts of takerAsset to sell * in orders. * @param signatures Proofs that orders have been created by makers. * @returns Array of amounts filled and fees paid by makers and taker. */ batchFillOrdersNoThrow(orders: Array<{ makerAddress: string; takerAddress: string; feeRecipientAddress: string; senderAddress: string; makerAssetAmount: BigNumber; takerAssetAmount: BigNumber; makerFee: BigNumber; takerFee: BigNumber; expirationTimeSeconds: BigNumber; salt: BigNumber; makerAssetData: string; takerAssetData: string; makerFeeAssetData: string; takerFeeAssetData: string; }>, takerAssetFillAmounts: BigNumber[], signatures: string[]): ContractTxFunctionObj>; /** * Match complementary orders that have a profitable spread. * Each order is filled at their respective price point, and * the matcher receives a profit denominated in the left maker asset. * @param leftOrders Set of orders with the same maker / taker asset. * @param rightOrders Set of orders to match against `leftOrders` * @param leftSignatures Proof that left orders were created by the left * makers. * @param rightSignatures Proof that right orders were created by the right * makers. * @returns batchMatchedFillResults Amounts filled and profit generated. */ batchMatchOrders(leftOrders: Array<{ makerAddress: string; takerAddress: string; feeRecipientAddress: string; senderAddress: string; makerAssetAmount: BigNumber; takerAssetAmount: BigNumber; makerFee: BigNumber; takerFee: BigNumber; expirationTimeSeconds: BigNumber; salt: BigNumber; makerAssetData: string; takerAssetData: string; makerFeeAssetData: string; takerFeeAssetData: string; }>, rightOrders: Array<{ makerAddress: string; takerAddress: string; feeRecipientAddress: string; senderAddress: string; makerAssetAmount: BigNumber; takerAssetAmount: BigNumber; makerFee: BigNumber; takerFee: BigNumber; expirationTimeSeconds: BigNumber; salt: BigNumber; makerAssetData: string; takerAssetData: string; makerFeeAssetData: string; takerFeeAssetData: string; }>, leftSignatures: string[], rightSignatures: string[]): ContractTxFunctionObj<{ left: Array<{ makerAssetFilledAmount: BigNumber; takerAssetFilledAmount: BigNumber; makerFeePaid: BigNumber; takerFeePaid: BigNumber; protocolFeePaid: BigNumber; }>; right: Array<{ makerAssetFilledAmount: BigNumber; takerAssetFilledAmount: BigNumber; makerFeePaid: BigNumber; takerFeePaid: BigNumber; protocolFeePaid: BigNumber; }>; profitInLeftMakerAsset: BigNumber; profitInRightMakerAsset: BigNumber; }>; /** * Match complementary orders that have a profitable spread. * Each order is maximally filled at their respective price point, and * the matcher receives a profit denominated in either the left maker asset, * right maker asset, or a combination of both. * @param leftOrders Set of orders with the same maker / taker asset. * @param rightOrders Set of orders to match against `leftOrders` * @param leftSignatures Proof that left orders were created by the left * makers. * @param rightSignatures Proof that right orders were created by the right * makers. * @returns batchMatchedFillResults Amounts filled and profit generated. */ batchMatchOrdersWithMaximalFill(leftOrders: Array<{ makerAddress: string; takerAddress: string; feeRecipientAddress: string; senderAddress: string; makerAssetAmount: BigNumber; takerAssetAmount: BigNumber; makerFee: BigNumber; takerFee: BigNumber; expirationTimeSeconds: BigNumber; salt: BigNumber; makerAssetData: string; takerAssetData: string; makerFeeAssetData: string; takerFeeAssetData: string; }>, rightOrders: Array<{ makerAddress: string; takerAddress: string; feeRecipientAddress: string; senderAddress: string; makerAssetAmount: BigNumber; takerAssetAmount: BigNumber; makerFee: BigNumber; takerFee: BigNumber; expirationTimeSeconds: BigNumber; salt: BigNumber; makerAssetData: string; takerAssetData: string; makerFeeAssetData: string; takerFeeAssetData: string; }>, leftSignatures: string[], rightSignatures: string[]): ContractTxFunctionObj<{ left: Array<{ makerAssetFilledAmount: BigNumber; takerAssetFilledAmount: BigNumber; makerFeePaid: BigNumber; takerFeePaid: BigNumber; protocolFeePaid: BigNumber; }>; right: Array<{ makerAssetFilledAmount: BigNumber; takerAssetFilledAmount: BigNumber; makerFeePaid: BigNumber; takerFeePaid: BigNumber; protocolFeePaid: BigNumber; }>; profitInLeftMakerAsset: BigNumber; profitInRightMakerAsset: BigNumber; }>; /** * After calling, the order can not be filled anymore. * @param order Order struct containing order specifications. */ cancelOrder(order: { makerAddress: string; takerAddress: string; feeRecipientAddress: string; senderAddress: string; makerAssetAmount: BigNumber; takerAssetAmount: BigNumber; makerFee: BigNumber; takerFee: BigNumber; expirationTimeSeconds: BigNumber; salt: BigNumber; makerAssetData: string; takerAssetData: string; makerFeeAssetData: string; takerFeeAssetData: string; }): ContractTxFunctionObj; /** * Cancels all orders created by makerAddress with a salt less than or equal to the targetOrderEpoch * and senderAddress equal to msg.sender (or null address if msg.sender == makerAddress). * @param targetOrderEpoch Orders created with a salt less or equal to this * value will be cancelled. */ cancelOrdersUpTo(targetOrderEpoch: BigNumber): ContractTxFunctionObj; /** * Executes an Exchange method call in the context of signer. * @param transaction 0x transaction containing salt, signerAddress, and data. * @param signature Proof that transaction has been signed by signer. * @returns ABI encoded return data of the underlying Exchange function call. */ executeTransaction(transaction: { salt: BigNumber; expirationTimeSeconds: BigNumber; gasPrice: BigNumber; signerAddress: string; data: string; }, signature: string): ContractTxFunctionObj; /** * Fills the input order. Reverts if exact takerAssetFillAmount not filled. * @param order Order struct containing order specifications. * @param takerAssetFillAmount Desired amount of takerAsset to sell. * @param signature Proof that order has been created by maker. */ fillOrKillOrder(order: { makerAddress: string; takerAddress: string; feeRecipientAddress: string; senderAddress: string; makerAssetAmount: BigNumber; takerAssetAmount: BigNumber; makerFee: BigNumber; takerFee: BigNumber; expirationTimeSeconds: BigNumber; salt: BigNumber; makerAssetData: string; takerAssetData: string; makerFeeAssetData: string; takerFeeAssetData: string; }, takerAssetFillAmount: BigNumber, signature: string): ContractTxFunctionObj<{ makerAssetFilledAmount: BigNumber; takerAssetFilledAmount: BigNumber; makerFeePaid: BigNumber; takerFeePaid: BigNumber; protocolFeePaid: BigNumber; }>; /** * Fills the input order. * @param order Order struct containing order specifications. * @param takerAssetFillAmount Desired amount of takerAsset to sell. * @param signature Proof that order has been created by maker. * @returns Amounts filled and fees paid by maker and taker. */ fillOrder(order: { makerAddress: string; takerAddress: string; feeRecipientAddress: string; senderAddress: string; makerAssetAmount: BigNumber; takerAssetAmount: BigNumber; makerFee: BigNumber; takerFee: BigNumber; expirationTimeSeconds: BigNumber; salt: BigNumber; makerAssetData: string; takerAssetData: string; makerFeeAssetData: string; takerFeeAssetData: string; }, takerAssetFillAmount: BigNumber, signature: string): ContractTxFunctionObj<{ makerAssetFilledAmount: BigNumber; takerAssetFilledAmount: BigNumber; makerFeePaid: BigNumber; takerFeePaid: BigNumber; protocolFeePaid: BigNumber; }>; /** * Gets an asset proxy. * @param assetProxyId Id of the asset proxy. * @returns The asset proxy registered to assetProxyId. Returns 0x0 if no proxy is registered. */ getAssetProxy(assetProxyId: string): ContractFunctionObj; /** * Gets information about an order: status, hash, and amount filled. * @param order Order to gather information on. * @returns OrderInfo Information about the order and its state. See LibOrder.OrderInfo for a complete description. */ getOrderInfo(order: { makerAddress: string; takerAddress: string; feeRecipientAddress: string; senderAddress: string; makerAssetAmount: BigNumber; takerAssetAmount: BigNumber; makerFee: BigNumber; takerFee: BigNumber; expirationTimeSeconds: BigNumber; salt: BigNumber; makerAssetData: string; takerAssetData: string; makerFeeAssetData: string; takerFeeAssetData: string; }): ContractFunctionObj<{ orderStatus: number; orderHash: string; orderTakerAssetFilledAmount: BigNumber; }>; /** * Verifies that a hash has been signed by the given signer. * @param hash Any 32-byte hash. * @param signature Proof that the hash has been signed by signer. * @returns isValid `true` if the signature is valid for the given hash and signer. */ isValidHashSignature(hash: string, signerAddress: string, signature: string): ContractFunctionObj; /** * Verifies that a signature for an order is valid. * @param order The order. * @param signature Proof that the order has been signed by signer. * @returns isValid true if the signature is valid for the given order and signer. */ isValidOrderSignature(order: { makerAddress: string; takerAddress: string; feeRecipientAddress: string; senderAddress: string; makerAssetAmount: BigNumber; takerAssetAmount: BigNumber; makerFee: BigNumber; takerFee: BigNumber; expirationTimeSeconds: BigNumber; salt: BigNumber; makerAssetData: string; takerAssetData: string; makerFeeAssetData: string; takerFeeAssetData: string; }, signature: string): ContractFunctionObj; /** * Verifies that a signature for a transaction is valid. * @param transaction The transaction. * @param signature Proof that the order has been signed by signer. * @returns isValid true if the signature is valid for the given transaction and signer. */ isValidTransactionSignature(transaction: { salt: BigNumber; expirationTimeSeconds: BigNumber; gasPrice: BigNumber; signerAddress: string; data: string; }, signature: string): ContractFunctionObj; /** * Calls marketBuyOrdersNoThrow then reverts if < makerAssetFillAmount has been bought. * NOTE: This function does not enforce that the makerAsset is the same for each order. * @param orders Array of order specifications. * @param makerAssetFillAmount Minimum amount of makerAsset to buy. * @param signatures Proofs that orders have been signed by makers. * @returns Amounts filled and fees paid by makers and taker. */ marketBuyOrdersFillOrKill(orders: Array<{ makerAddress: string; takerAddress: string; feeRecipientAddress: string; senderAddress: string; makerAssetAmount: BigNumber; takerAssetAmount: BigNumber; makerFee: BigNumber; takerFee: BigNumber; expirationTimeSeconds: BigNumber; salt: BigNumber; makerAssetData: string; takerAssetData: string; makerFeeAssetData: string; takerFeeAssetData: string; }>, makerAssetFillAmount: BigNumber, signatures: string[]): ContractTxFunctionObj<{ makerAssetFilledAmount: BigNumber; takerAssetFilledAmount: BigNumber; makerFeePaid: BigNumber; takerFeePaid: BigNumber; protocolFeePaid: BigNumber; }>; /** * Executes multiple calls of fillOrder until total amount of makerAsset is bought by taker. * If any fill reverts, the error is caught and ignored. * NOTE: This function does not enforce that the makerAsset is the same for each order. * @param orders Array of order specifications. * @param makerAssetFillAmount Desired amount of makerAsset to buy. * @param signatures Proofs that orders have been signed by makers. * @returns Amounts filled and fees paid by makers and taker. */ marketBuyOrdersNoThrow(orders: Array<{ makerAddress: string; takerAddress: string; feeRecipientAddress: string; senderAddress: string; makerAssetAmount: BigNumber; takerAssetAmount: BigNumber; makerFee: BigNumber; takerFee: BigNumber; expirationTimeSeconds: BigNumber; salt: BigNumber; makerAssetData: string; takerAssetData: string; makerFeeAssetData: string; takerFeeAssetData: string; }>, makerAssetFillAmount: BigNumber, signatures: string[]): ContractTxFunctionObj<{ makerAssetFilledAmount: BigNumber; takerAssetFilledAmount: BigNumber; makerFeePaid: BigNumber; takerFeePaid: BigNumber; protocolFeePaid: BigNumber; }>; /** * Calls marketSellOrdersNoThrow then reverts if < takerAssetFillAmount has been sold. * NOTE: This function does not enforce that the takerAsset is the same for each order. * @param orders Array of order specifications. * @param takerAssetFillAmount Minimum amount of takerAsset to sell. * @param signatures Proofs that orders have been signed by makers. * @returns Amounts filled and fees paid by makers and taker. */ marketSellOrdersFillOrKill(orders: Array<{ makerAddress: string; takerAddress: string; feeRecipientAddress: string; senderAddress: string; makerAssetAmount: BigNumber; takerAssetAmount: BigNumber; makerFee: BigNumber; takerFee: BigNumber; expirationTimeSeconds: BigNumber; salt: BigNumber; makerAssetData: string; takerAssetData: string; makerFeeAssetData: string; takerFeeAssetData: string; }>, takerAssetFillAmount: BigNumber, signatures: string[]): ContractTxFunctionObj<{ makerAssetFilledAmount: BigNumber; takerAssetFilledAmount: BigNumber; makerFeePaid: BigNumber; takerFeePaid: BigNumber; protocolFeePaid: BigNumber; }>; /** * Executes multiple calls of fillOrder until total amount of takerAsset is sold by taker. * If any fill reverts, the error is caught and ignored. * NOTE: This function does not enforce that the takerAsset is the same for each order. * @param orders Array of order specifications. * @param takerAssetFillAmount Desired amount of takerAsset to sell. * @param signatures Proofs that orders have been signed by makers. * @returns Amounts filled and fees paid by makers and taker. */ marketSellOrdersNoThrow(orders: Array<{ makerAddress: string; takerAddress: string; feeRecipientAddress: string; senderAddress: string; makerAssetAmount: BigNumber; takerAssetAmount: BigNumber; makerFee: BigNumber; takerFee: BigNumber; expirationTimeSeconds: BigNumber; salt: BigNumber; makerAssetData: string; takerAssetData: string; makerFeeAssetData: string; takerFeeAssetData: string; }>, takerAssetFillAmount: BigNumber, signatures: string[]): ContractTxFunctionObj<{ makerAssetFilledAmount: BigNumber; takerAssetFilledAmount: BigNumber; makerFeePaid: BigNumber; takerFeePaid: BigNumber; protocolFeePaid: BigNumber; }>; /** * Match two complementary orders that have a profitable spread. * Each order is filled at their respective price point. However, the calculations are * carried out as though the orders are both being filled at the right order's price point. * The profit made by the left order goes to the taker (who matched the two orders). * @param leftOrder First order to match. * @param rightOrder Second order to match. * @param leftSignature Proof that order was created by the left maker. * @param rightSignature Proof that order was created by the right maker. * @returns matchedFillResults Amounts filled and fees paid by maker and taker of matched orders. */ matchOrders(leftOrder: { makerAddress: string; takerAddress: string; feeRecipientAddress: string; senderAddress: string; makerAssetAmount: BigNumber; takerAssetAmount: BigNumber; makerFee: BigNumber; takerFee: BigNumber; expirationTimeSeconds: BigNumber; salt: BigNumber; makerAssetData: string; takerAssetData: string; makerFeeAssetData: string; takerFeeAssetData: string; }, rightOrder: { makerAddress: string; takerAddress: string; feeRecipientAddress: string; senderAddress: string; makerAssetAmount: BigNumber; takerAssetAmount: BigNumber; makerFee: BigNumber; takerFee: BigNumber; expirationTimeSeconds: BigNumber; salt: BigNumber; makerAssetData: string; takerAssetData: string; makerFeeAssetData: string; takerFeeAssetData: string; }, leftSignature: string, rightSignature: string): ContractTxFunctionObj<{ left: { makerAssetFilledAmount: BigNumber; takerAssetFilledAmount: BigNumber; makerFeePaid: BigNumber; takerFeePaid: BigNumber; protocolFeePaid: BigNumber; }; right: { makerAssetFilledAmount: BigNumber; takerAssetFilledAmount: BigNumber; makerFeePaid: BigNumber; takerFeePaid: BigNumber; protocolFeePaid: BigNumber; }; profitInLeftMakerAsset: BigNumber; profitInRightMakerAsset: BigNumber; }>; /** * Match two complementary orders that have a profitable spread. * Each order is maximally filled at their respective price point, and * the matcher receives a profit denominated in either the left maker asset, * right maker asset, or a combination of both. * @param leftOrder First order to match. * @param rightOrder Second order to match. * @param leftSignature Proof that order was created by the left maker. * @param rightSignature Proof that order was created by the right maker. * @returns matchedFillResults Amounts filled by maker and taker of matched orders. */ matchOrdersWithMaximalFill(leftOrder: { makerAddress: string; takerAddress: string; feeRecipientAddress: string; senderAddress: string; makerAssetAmount: BigNumber; takerAssetAmount: BigNumber; makerFee: BigNumber; takerFee: BigNumber; expirationTimeSeconds: BigNumber; salt: BigNumber; makerAssetData: string; takerAssetData: string; makerFeeAssetData: string; takerFeeAssetData: string; }, rightOrder: { makerAddress: string; takerAddress: string; feeRecipientAddress: string; senderAddress: string; makerAssetAmount: BigNumber; takerAssetAmount: BigNumber; makerFee: BigNumber; takerFee: BigNumber; expirationTimeSeconds: BigNumber; salt: BigNumber; makerAssetData: string; takerAssetData: string; makerFeeAssetData: string; takerFeeAssetData: string; }, leftSignature: string, rightSignature: string): ContractTxFunctionObj<{ left: { makerAssetFilledAmount: BigNumber; takerAssetFilledAmount: BigNumber; makerFeePaid: BigNumber; takerFeePaid: BigNumber; protocolFeePaid: BigNumber; }; right: { makerAssetFilledAmount: BigNumber; takerAssetFilledAmount: BigNumber; makerFeePaid: BigNumber; takerFeePaid: BigNumber; protocolFeePaid: BigNumber; }; profitInLeftMakerAsset: BigNumber; profitInRightMakerAsset: BigNumber; }>; /** * Approves a hash on-chain. * After presigning a hash, the preSign signature type will become valid for that hash and signer. * @param hash Any 32-byte hash. */ preSign(hash: string): ContractTxFunctionObj; /** * Returns the protocolFeeCollector address */ protocolFeeCollector(): ContractFunctionObj; /** * Returns the protocolFeeMultiplier */ protocolFeeMultiplier(): ContractFunctionObj; /** * Registers an asset proxy to its asset proxy id. * Once an asset proxy is registered, it cannot be unregistered. * @param assetProxy Address of new asset proxy to register. */ registerAssetProxy(assetProxy: string): ContractTxFunctionObj; /** * Allows the owner to update the protocolFeeCollector address. * @param updatedProtocolFeeCollector The updated protocolFeeCollector contract * address. */ setProtocolFeeCollectorAddress(updatedProtocolFeeCollector: string): ContractTxFunctionObj; /** * Allows the owner to update the protocol fee multiplier. * @param updatedProtocolFeeMultiplier The updated protocol fee multiplier. */ setProtocolFeeMultiplier(updatedProtocolFeeMultiplier: BigNumber): ContractTxFunctionObj; /** * Approves/unnapproves a Validator contract to verify signatures on signer's behalf. * @param validatorAddress Address of Validator contract. * @param approval Approval or disapproval of Validator contract. */ setSignatureValidatorApproval(validatorAddress: string, approval: boolean): ContractTxFunctionObj; /** * This function may be used to simulate any amount of transfers As they would occur through the Exchange contract. Note that this function will always revert, even if all transfers are successful. However, it may be used with eth_call or with a try/catch pattern in order to simulate the results of the transfers. * @param assetData Array of asset details, each encoded per the AssetProxy * contract specification. * @param fromAddresses Array containing the `from` addresses that correspond * with each transfer. * @param toAddresses Array containing the `to` addresses that correspond with * each transfer. * @param amounts Array containing the amounts that correspond to each * transfer. * @returns This function does not return a value. However, it will always revert with `Error("TRANSFERS_SUCCESSFUL")` if all of the transfers were successful. */ simulateDispatchTransferFromCalls(assetData: string[], fromAddresses: string[], toAddresses: string[], amounts: BigNumber[]): ContractTxFunctionObj; /** * Subscribe to an event type emitted by the IExchange contract. * @param eventName The IExchange contract event you would like to subscribe to. * @param indexFilterValues An object where the keys are indexed args returned by the event and * the value is the value you are interested in. E.g `{maker: aUserAddressHex}` * @param callback Callback that gets called when a log is added/removed * @param isVerbose Enable verbose subscription warnings (e.g recoverable network issues encountered) * @return Subscription token used later to unsubscribe */ subscribe(eventName: IExchangeEvents, indexFilterValues: IndexedFilterValues, callback: EventCallback, isVerbose?: boolean, blockPollingIntervalMs?: number): string; /** * Cancel a subscription * @param subscriptionToken Subscription token returned by `subscribe()` */ unsubscribe(subscriptionToken: string): void; /** * Cancels all existing subscriptions */ unsubscribeAll(): void; /** * Gets historical logs without creating a subscription * @param eventName The IExchange contract event you would like to subscribe to. * @param blockRange Block range to get logs from. * @param indexFilterValues An object where the keys are indexed args returned by the event and * the value is the value you are interested in. E.g `{_from: aUserAddressHex}` * @return Array of logs that match the parameters */ getLogsAsync(eventName: IExchangeEvents, blockRange: BlockRange, indexFilterValues: IndexedFilterValues): Promise>>; constructor(address: string, supportedProvider: SupportedProvider, txDefaults?: Partial, logDecodeDependencies?: { [contractName: string]: ContractAbi; }, deployedBytecode?: string | undefined, encoderOverrides?: Partial); } //# sourceMappingURL=i_exchange.d.ts.map