Add getContractAddressAsync public method to proxy instance
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user