diff options
author | Fabio Berger <me@fabioberger.com> | 2017-08-23 23:01:45 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2017-08-23 23:01:45 +0800 |
commit | e3f7b18debdcaee3a9120bde6e0337994f85f4ba (patch) | |
tree | 231c8506279084643cb1374acaaadb9bcb0ad4a4 /src | |
parent | 9dca3b76b5e01967674f5c69a88c52430a532e40 (diff) | |
download | dexon-0x-contracts-e3f7b18debdcaee3a9120bde6e0337994f85f4ba.tar.gz dexon-0x-contracts-e3f7b18debdcaee3a9120bde6e0337994f85f4ba.tar.zst dexon-0x-contracts-e3f7b18debdcaee3a9120bde6e0337994f85f4ba.zip |
Add getContractAddressAsync public method to proxy instance
Diffstat (limited to 'src')
-rw-r--r-- | src/contract_wrappers/token_transfer_proxy_wrapper.ts | 9 |
1 files changed, 9 insertions, 0 deletions
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<string> { + const proxyInstance = await this._getTokenTransferProxyContractAsync(); + return proxyInstance.address; + } private _invalidateContractInstance(): void { delete this._tokenTransferProxyContractIfExists; } |