diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-02-06 23:40:25 +0800 |
---|---|---|
committer | Amir Bandeali <abandeali1@gmail.com> | 2018-02-07 09:27:47 +0800 |
commit | 4cc5bbaf19d2388b0be0669a6249bf92f60c712c (patch) | |
tree | 2151ea75dd433d027d35cd12798405c63886f163 /packages/contracts/util/token_registry_wrapper.ts | |
parent | a264c36a48d224a55c2ef883f207692752ca74c7 (diff) | |
download | dexon-0x-contracts-4cc5bbaf19d2388b0be0669a6249bf92f60c712c.tar.gz dexon-0x-contracts-4cc5bbaf19d2388b0be0669a6249bf92f60c712c.tar.zst dexon-0x-contracts-4cc5bbaf19d2388b0be0669a6249bf92f60c712c.zip |
Change utils
Diffstat (limited to 'packages/contracts/util/token_registry_wrapper.ts')
-rw-r--r-- | packages/contracts/util/token_registry_wrapper.ts | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/packages/contracts/util/token_registry_wrapper.ts b/packages/contracts/util/token_registry_wrapper.ts index 033b72d10..6539a6da8 100644 --- a/packages/contracts/util/token_registry_wrapper.ts +++ b/packages/contracts/util/token_registry_wrapper.ts @@ -1,15 +1,17 @@ import * as Web3 from 'web3'; +import { TokenRegistryContract } from '../src/contract_wrappers/generated/token_registry'; + import { Token } from './types'; export class TokenRegWrapper { - private _tokenReg: Web3.ContractInstance; - constructor(tokenRegContractInstance: Web3.ContractInstance) { - this._tokenReg = tokenRegContractInstance; + private _tokenReg: TokenRegistryContract; + constructor(tokenRegContract: TokenRegistryContract) { + this._tokenReg = tokenRegContract; } public addTokenAsync(token: Token, from: string) { - const tx = this._tokenReg.addToken( - token.address, + const tx = this._tokenReg.addToken.sendTransactionAsync( + token.address as string, token.name, token.symbol, token.decimals, |