diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-07-03 21:00:48 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-07-05 21:56:31 +0800 |
commit | d1d636f1ca2f1b91c7ac16de7315f0e9566a3080 (patch) | |
tree | 30b15de0d66f6d71f4cf59f8ab0ca19555c43c3e /packages | |
parent | ba9d3cbdb84626769bd86cacd234234ada7465e2 (diff) | |
download | dexon-0x-contracts-d1d636f1ca2f1b91c7ac16de7315f0e9566a3080.tar dexon-0x-contracts-d1d636f1ca2f1b91c7ac16de7315f0e9566a3080.tar.gz dexon-0x-contracts-d1d636f1ca2f1b91c7ac16de7315f0e9566a3080.tar.bz2 dexon-0x-contracts-d1d636f1ca2f1b91c7ac16de7315f0e9566a3080.tar.lz dexon-0x-contracts-d1d636f1ca2f1b91c7ac16de7315f0e9566a3080.tar.xz dexon-0x-contracts-d1d636f1ca2f1b91c7ac16de7315f0e9566a3080.tar.zst dexon-0x-contracts-d1d636f1ca2f1b91c7ac16de7315f0e9566a3080.zip |
Add contractWrappers.erc20Proxy.getproxyIdAsync
Diffstat (limited to 'packages')
-rw-r--r-- | packages/contract-wrappers/src/contract_wrappers/erc20_proxy_wrapper.ts | 9 |
1 files changed, 9 insertions, 0 deletions
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 @@ -20,6 +20,15 @@ export class ERC20ProxyWrapper extends ContractWrapper { 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. * @return Whether the exchangeContractAddress is authorized. |