From d1d636f1ca2f1b91c7ac16de7315f0e9566a3080 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 3 Jul 2018 16:00:48 +0300 Subject: Add contractWrappers.erc20Proxy.getproxyIdAsync --- .../src/contract_wrappers/erc20_proxy_wrapper.ts | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'packages/contract-wrappers/src/contract_wrappers/erc20_proxy_wrapper.ts') diff --git a/packages/contract-wrappers/src/contract_wrappers/erc20_proxy_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/erc20_proxy_wrapper.ts index 839248754..883d7c4d6 100644 --- a/packages/contract-wrappers/src/contract_wrappers/erc20_proxy_wrapper.ts +++ b/packages/contract-wrappers/src/contract_wrappers/erc20_proxy_wrapper.ts @@ -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 { + 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. -- cgit