aboutsummaryrefslogtreecommitdiffstats
path: root/src/contract_wrappers
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2017-08-23 23:01:45 +0800
committerFabio Berger <me@fabioberger.com>2017-08-23 23:01:45 +0800
commite3f7b18debdcaee3a9120bde6e0337994f85f4ba (patch)
tree231c8506279084643cb1374acaaadb9bcb0ad4a4 /src/contract_wrappers
parent9dca3b76b5e01967674f5c69a88c52430a532e40 (diff)
downloaddexon-sol-tools-e3f7b18debdcaee3a9120bde6e0337994f85f4ba.tar
dexon-sol-tools-e3f7b18debdcaee3a9120bde6e0337994f85f4ba.tar.gz
dexon-sol-tools-e3f7b18debdcaee3a9120bde6e0337994f85f4ba.tar.bz2
dexon-sol-tools-e3f7b18debdcaee3a9120bde6e0337994f85f4ba.tar.lz
dexon-sol-tools-e3f7b18debdcaee3a9120bde6e0337994f85f4ba.tar.xz
dexon-sol-tools-e3f7b18debdcaee3a9120bde6e0337994f85f4ba.tar.zst
dexon-sol-tools-e3f7b18debdcaee3a9120bde6e0337994f85f4ba.zip
Add getContractAddressAsync public method to proxy instance
Diffstat (limited to 'src/contract_wrappers')
-rw-r--r--src/contract_wrappers/token_transfer_proxy_wrapper.ts9
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;
}