aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/src
diff options
context:
space:
mode:
Diffstat (limited to 'packages/contracts/src')
-rw-r--r--packages/contracts/src/utils/chai_setup.ts2
-rw-r--r--packages/contracts/src/utils/crypto.ts2
-rw-r--r--packages/contracts/src/utils/multi_sig_wrapper.ts4
-rw-r--r--packages/contracts/src/utils/token_registry_wrapper.ts8
4 files changed, 8 insertions, 8 deletions
diff --git a/packages/contracts/src/utils/chai_setup.ts b/packages/contracts/src/utils/chai_setup.ts
index 078edd309..1a8733093 100644
--- a/packages/contracts/src/utils/chai_setup.ts
+++ b/packages/contracts/src/utils/chai_setup.ts
@@ -4,7 +4,7 @@ import ChaiBigNumber = require('chai-bignumber');
import * as dirtyChai from 'dirty-chai';
export const chaiSetup = {
- configure() {
+ configure(): void {
chai.config.includeStack = true;
chai.use(ChaiBigNumber());
chai.use(dirtyChai);
diff --git a/packages/contracts/src/utils/crypto.ts b/packages/contracts/src/utils/crypto.ts
index 222cb7cca..80c5f30a5 100644
--- a/packages/contracts/src/utils/crypto.ts
+++ b/packages/contracts/src/utils/crypto.ts
@@ -18,7 +18,7 @@ export const crypto = {
solSHA256(args: any[]): Buffer {
return crypto._solHash(args, ABI.soliditySHA256);
},
- _solHash(args: any[], hashFunction: (types: string[], values: any[]) => Buffer) {
+ _solHash(args: any[], hashFunction: (types: string[], values: any[]) => Buffer): Buffer {
const argTypes: string[] = [];
_.each(args, (arg, i) => {
const isNumber = _.isFinite(arg);
diff --git a/packages/contracts/src/utils/multi_sig_wrapper.ts b/packages/contracts/src/utils/multi_sig_wrapper.ts
index 84fed7944..41a1dd8d9 100644
--- a/packages/contracts/src/utils/multi_sig_wrapper.ts
+++ b/packages/contracts/src/utils/multi_sig_wrapper.ts
@@ -11,7 +11,7 @@ import { TransactionDataParams } from './types';
export class MultiSigWrapper {
private _multiSig: MultiSigWalletContract;
- public static encodeFnArgs(name: string, abi: AbiDefinition[], args: any[]) {
+ public static encodeFnArgs(name: string, abi: AbiDefinition[], args: any[]): string {
const abiEntity = _.find(abi, { name }) as MethodAbi;
if (_.isUndefined(abiEntity)) {
throw new Error(`Did not find abi entry for name: ${name}`);
@@ -33,7 +33,7 @@ export class MultiSigWrapper {
from: string,
dataParams: TransactionDataParams,
value: BigNumber = new BigNumber(0),
- ) {
+ ): Promise<string> {
const { name, abi, args = [] } = dataParams;
const encoded = MultiSigWrapper.encodeFnArgs(name, abi, args);
return this._multiSig.submitTransaction.sendTransactionAsync(destination, value, encoded, {
diff --git a/packages/contracts/src/utils/token_registry_wrapper.ts b/packages/contracts/src/utils/token_registry_wrapper.ts
index 91bd5503d..86daeca62 100644
--- a/packages/contracts/src/utils/token_registry_wrapper.ts
+++ b/packages/contracts/src/utils/token_registry_wrapper.ts
@@ -9,7 +9,7 @@ export class TokenRegWrapper {
constructor(tokenRegContract: TokenRegistryContract) {
this._tokenReg = tokenRegContract;
}
- public async addTokenAsync(token: Token, from: string) {
+ public async addTokenAsync(token: Token, from: string): Promise<string> {
const tx = this._tokenReg.addToken.sendTransactionAsync(
token.address as string,
token.name,
@@ -21,7 +21,7 @@ export class TokenRegWrapper {
);
return tx;
}
- public async getTokenMetaDataAsync(tokenAddress: string) {
+ public async getTokenMetaDataAsync(tokenAddress: string): Promise<Token> {
const data = await this._tokenReg.getTokenMetaData.callAsync(tokenAddress);
const token: Token = {
address: data[0],
@@ -33,7 +33,7 @@ export class TokenRegWrapper {
};
return token;
}
- public async getTokenByNameAsync(tokenName: string) {
+ public async getTokenByNameAsync(tokenName: string): Promise<Token> {
const data = await this._tokenReg.getTokenByName.callAsync(tokenName);
const token: Token = {
address: data[0],
@@ -45,7 +45,7 @@ export class TokenRegWrapper {
};
return token;
}
- public async getTokenBySymbolAsync(tokenSymbol: string) {
+ public async getTokenBySymbolAsync(tokenSymbol: string): Promise<Token> {
const data = await this._tokenReg.getTokenBySymbol.callAsync(tokenSymbol);
const token: Token = {
address: data[0],