diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-09-18 21:55:26 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-09-18 21:55:26 +0800 |
commit | 504e7a25a5ee138941ca35d4aad1b63444e47033 (patch) | |
tree | c60208acd76a53cae30050ebd768d9fa0562f88e /src/contract_wrappers/token_registry_wrapper.ts | |
parent | 8db90538a17a0458fba6d2ed8a8b51bf9edf0fa4 (diff) | |
download | dexon-sol-tools-504e7a25a5ee138941ca35d4aad1b63444e47033.tar dexon-sol-tools-504e7a25a5ee138941ca35d4aad1b63444e47033.tar.gz dexon-sol-tools-504e7a25a5ee138941ca35d4aad1b63444e47033.tar.bz2 dexon-sol-tools-504e7a25a5ee138941ca35d4aad1b63444e47033.tar.lz dexon-sol-tools-504e7a25a5ee138941ca35d4aad1b63444e47033.tar.xz dexon-sol-tools-504e7a25a5ee138941ca35d4aad1b63444e47033.tar.zst dexon-sol-tools-504e7a25a5ee138941ca35d4aad1b63444e47033.zip |
Make contract addresses configurable
Diffstat (limited to 'src/contract_wrappers/token_registry_wrapper.ts')
-rw-r--r-- | src/contract_wrappers/token_registry_wrapper.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/contract_wrappers/token_registry_wrapper.ts b/src/contract_wrappers/token_registry_wrapper.ts index 528a88e06..0807982b1 100644 --- a/src/contract_wrappers/token_registry_wrapper.ts +++ b/src/contract_wrappers/token_registry_wrapper.ts @@ -11,8 +11,10 @@ import {artifacts} from '../artifacts'; */ export class TokenRegistryWrapper extends ContractWrapper { private _tokenRegistryContractIfExists?: TokenRegistryContract; - constructor(web3Wrapper: Web3Wrapper) { + private _contractAddress?: string; + constructor(web3Wrapper: Web3Wrapper, contractAddress?: string) { super(web3Wrapper); + this._contractAddress = contractAddress; } /** * Retrieves all the tokens currently listed in the Token Registry smart contract @@ -102,7 +104,7 @@ export class TokenRegistryWrapper extends ContractWrapper { return this._tokenRegistryContractIfExists; } const contractInstance = await this._instantiateContractIfExistsAsync<TokenRegistryContract>( - artifacts.TokenRegistryArtifact, + artifacts.TokenRegistryArtifact, this._contractAddress, ); this._tokenRegistryContractIfExists = contractInstance as TokenRegistryContract; return this._tokenRegistryContractIfExists; |