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 ERC20BridgeProxyEventArgs = ERC20BridgeProxyAuthorizedAddressAddedEventArgs | ERC20BridgeProxyAuthorizedAddressRemovedEventArgs | ERC20BridgeProxyOwnershipTransferredEventArgs; export declare enum ERC20BridgeProxyEvents { AuthorizedAddressAdded = "AuthorizedAddressAdded", AuthorizedAddressRemoved = "AuthorizedAddressRemoved", OwnershipTransferred = "OwnershipTransferred" } export interface ERC20BridgeProxyAuthorizedAddressAddedEventArgs extends DecodedLogArgs { target: string; caller: string; } export interface ERC20BridgeProxyAuthorizedAddressRemovedEventArgs extends DecodedLogArgs { target: string; caller: string; } export interface ERC20BridgeProxyOwnershipTransferredEventArgs extends DecodedLogArgs { previousOwner: string; newOwner: string; } export declare class ERC20BridgeProxyContract extends BaseContract { /** * @ignore */ static deployedBytecode: string; 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; /** * Authorizes an address. * @param target Address to authorize. */ addAuthorizedAddress(target: string): ContractTxFunctionObj; authorities(index_0: BigNumber): ContractFunctionObj; authorized(index_0: string): ContractFunctionObj; /** * Retrieves the balance of `owner` for this asset. * @returns balance The balance of the ERC20 token being transferred by this asset proxy. */ balanceOf(assetData: string, owner: string): ContractFunctionObj; /** * Gets all authorized addresses. * @returns Array of authorized addresses. */ getAuthorizedAddresses(): ContractFunctionObj; /** * Gets the proxy id associated with this asset proxy. * @returns proxyId The proxy id. */ getProxyId(): ContractFunctionObj; owner(): ContractFunctionObj; /** * Removes authorizion of an address. * @param target Address to remove authorization from. */ removeAuthorizedAddress(target: string): ContractTxFunctionObj; /** * Removes authorizion of an address. * @param target Address to remove authorization from. * @param index Index of target in authorities array. */ removeAuthorizedAddressAtIndex(target: string, index: BigNumber): ContractTxFunctionObj; /** * Calls a bridge contract to transfer `amount` of ERC20 from `from` * to `to`. Asserts that the balance of `to` has increased by `amount`. * @param assetData Abi-encoded data for this asset proxy encoded as: * abi.encodeWithSelector( bytes4 PROXY_ID, address * tokenAddress, address bridgeAddress, bytes * bridgeData ) * @param from Address to transfer asset from. * @param to Address to transfer asset to. * @param amount Amount of asset to transfer. */ transferFrom(assetData: string, from: string, to: string, amount: BigNumber): ContractTxFunctionObj; /** * Change the owner of this contract. * @param newOwner New owner address. */ transferOwnership(newOwner: string): ContractTxFunctionObj; /** * Subscribe to an event type emitted by the ERC20BridgeProxy contract. * @param eventName The ERC20BridgeProxy 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: ERC20BridgeProxyEvents, 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 ERC20BridgeProxy 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: ERC20BridgeProxyEvents, blockRange: BlockRange, indexFilterValues: IndexedFilterValues): Promise>>; constructor(address: string, supportedProvider: SupportedProvider, txDefaults?: Partial, logDecodeDependencies?: { [contractName: string]: ContractAbi; }, deployedBytecode?: string | undefined, encoderOverrides?: Partial); } //# sourceMappingURL=erc20_bridge_proxy.d.ts.map