import { SignedOrder } from '@0xproject/types'; import { BigNumber } from '@0xproject/utils'; import { Web3Wrapper } from '@0xproject/web3-wrapper'; import { ContractAbi } from 'ethereum-types'; import { TransactionOpts } from '../types'; import { ContractWrapper } from './contract_wrapper'; /** * This class includes the functionality related to interacting with the Forwarder contract. */ export declare class ForwarderWrapper extends ContractWrapper { abi: ContractAbi; private _forwarderContractIfExists?; private _contractAddressIfExists?; private _zrxContractAddressIfExists?; constructor(web3Wrapper: Web3Wrapper, networkId: number, contractAddressIfExists?: string, zrxContractAddressIfExists?: string); /** * Purchases as much of orders' makerAssets as possible by selling up to 95% of transaction's ETH value. * Any ZRX required to pay fees for primary orders will automatically be purchased by this contract. * 5% of ETH value is reserved for paying fees to order feeRecipients (in ZRX) and forwarding contract feeRecipient (in ETH). * Any ETH not spent will be refunded to sender. * @param signedOrders An array of objects that conform to the SignedOrder interface. All orders must specify the same makerAsset. * All orders must specify WETH as the takerAsset * @param takerAddress The user Ethereum address who would like to fill this order. Must be available via the supplied * Provider provided at instantiation. * @param ethAmount The amount of eth to send with the transaction (in wei). * @param signedFeeOrders An array of objects that conform to the SignedOrder interface. All orders must specify ZRX as makerAsset and WETH as takerAsset. * Used to purchase ZRX for primary order fees. * @param feePercentage The percentage of WETH sold that will payed as fee to forwarding contract feeRecipient. * Defaults to 0. * @param feeRecipientAddress The address that will receive ETH when signedFeeOrders are filled. * @param txOpts Transaction parameters. * @return Transaction hash. */ marketSellOrdersWithEthAsync(signedOrders: SignedOrder[], takerAddress: string, ethAmount: BigNumber, signedFeeOrders?: SignedOrder[], feePercentage?: number, feeRecipientAddress?: string, txOpts?: TransactionOpts): Promise; /** * Attempt to purchase makerAssetFillAmount of makerAsset by selling ethAmount provided with transaction. * Any ZRX required to pay fees for primary orders will automatically be purchased by the contract. * Any ETH not spent will be refunded to sender. * @param signedOrders An array of objects that conform to the SignedOrder interface. All orders must specify the same makerAsset. * All orders must specify WETH as the takerAsset * @param makerAssetFillAmount The amount of the order (in taker asset baseUnits) that you wish to fill. * @param takerAddress The user Ethereum address who would like to fill this order. Must be available via the supplied * Provider provided at instantiation. * @param ethAmount The amount of eth to send with the transaction (in wei). * @param signedFeeOrders An array of objects that conform to the SignedOrder interface. All orders must specify ZRX as makerAsset and WETH as takerAsset. * Used to purchase ZRX for primary order fees. * @param feePercentage The percentage of WETH sold that will payed as fee to forwarding contract feeRecipient. * Defaults to 0. * @param feeRecipientAddress The address that will receive ETH when signedFeeOrders are filled. * @param txOpts Transaction parameters. * @return Transaction hash. */ marketBuyOrdersWithEthAsync(signedOrders: SignedOrder[], makerAssetFillAmount: BigNumber, takerAddress: string, ethAmount: BigNumber, signedFeeOrders?: SignedOrder[], feePercentage?: number, feeRecipientAddress?: string, txOpts?: TransactionOpts): Promise; /** * Retrieves the Ethereum address of the Forwarder contract deployed on the network * that the user-passed web3 provider is connected to. * @returns The Ethereum address of the Forwarder contract being used. */ getContractAddress(): string; /** * Returns the ZRX token address used by the forwarder contract. * @return Address of ZRX token */ getZRXTokenAddress(): string; /** * Returns the Ether token address used by the forwarder contract. * @return Address of Ether token */ getEtherTokenAddress(): string; private _invalidateContractInstance; private _getForwarderContractAsync; } //# sourceMappingURL=forwarder_wrapper.d.ts.map