Add contractWrappers.erc20Proxy.getproxyIdAsync

This commit is contained in:
Leonid Logvinov
2018-07-03 16:00:48 +03:00
parent ba9d3cbdb8
commit d1d636f1ca

View File

@@ -19,6 +19,15 @@ export class ERC20ProxyWrapper extends ContractWrapper {
super(web3Wrapper, networkId);
this._contractAddressIfExists = contractAddressIfExists;
}
/**
* Get the 4 bytes ID of this asset proxy
* @return Proxy id
*/
public async getProxyIdAsync(): Promise<string> {
const ERC20ProxyContractInstance = await this._getERC20ProxyContractAsync();
const proxyId = await ERC20ProxyContractInstance.getProxyId.callAsync();
return proxyId;
}
/**
* Check if the Exchange contract address is authorized by the ERC20Proxy contract.
* @param exchangeContractAddress The hex encoded address of the Exchange contract to call.