Change utils

This commit is contained in:
Leonid Logvinov
2018-02-06 16:40:25 +01:00
committed by Amir Bandeali
parent a264c36a48
commit 4cc5bbaf19
4 changed files with 41 additions and 32 deletions

View File

@@ -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,