From e3f7b18debdcaee3a9120bde6e0337994f85f4ba Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 23 Aug 2017 17:01:45 +0200 Subject: Add getContractAddressAsync public method to proxy instance --- src/contract_wrappers/token_transfer_proxy_wrapper.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/contract_wrappers/token_transfer_proxy_wrapper.ts b/src/contract_wrappers/token_transfer_proxy_wrapper.ts index 39263efac..758c07f18 100644 --- a/src/contract_wrappers/token_transfer_proxy_wrapper.ts +++ b/src/contract_wrappers/token_transfer_proxy_wrapper.ts @@ -27,6 +27,15 @@ export class TokenTransferProxyWrapper extends ContractWrapper { const authorizedAddresses = await tokenTransferProxyContractInstance.getAuthorizedAddresses.call(); return authorizedAddresses; } + /** + * Retrieves the Ethereum address of the TokenTransferProxy contract deployed on the network + * that the user-passed web3 provider is connected to. + * @returns The Ethereum address of the TokenTransferProxy contract being used. + */ + public async getContractAddressAsync(): Promise { + const proxyInstance = await this._getTokenTransferProxyContractAsync(); + return proxyInstance.address; + } private _invalidateContractInstance(): void { delete this._tokenTransferProxyContractIfExists; } -- cgit v1.2.3