aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/util/multi_sig_wrapper.ts
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2018-01-09 08:35:12 +0800
committerBrandon Millman <brandon.millman@gmail.com>2018-01-09 08:35:12 +0800
commit734cf5819aee5d46719d1ca387666bfda6e475bd (patch)
tree264785cb0666e011b49842b47ac4b2408dddaa28 /packages/contracts/util/multi_sig_wrapper.ts
parent9f3acf8e2888b6105062e47664ecd5adaaf3c889 (diff)
parent35e0b6143ab1405259471e1c9c698bfcd869df5a (diff)
downloaddexon-sol-tools-734cf5819aee5d46719d1ca387666bfda6e475bd.tar
dexon-sol-tools-734cf5819aee5d46719d1ca387666bfda6e475bd.tar.gz
dexon-sol-tools-734cf5819aee5d46719d1ca387666bfda6e475bd.tar.bz2
dexon-sol-tools-734cf5819aee5d46719d1ca387666bfda6e475bd.tar.lz
dexon-sol-tools-734cf5819aee5d46719d1ca387666bfda6e475bd.tar.xz
dexon-sol-tools-734cf5819aee5d46719d1ca387666bfda6e475bd.tar.zst
dexon-sol-tools-734cf5819aee5d46719d1ca387666bfda6e475bd.zip
Merge branch 'development' into fix/mutatedInput
* development: Changes to abi-gen after code review Added constructor ABIs to abi-gen Describe #295 in a CHANGELOG Add #302 description to changelog Fix formatting Apply prettier config Install prettier Remove formatting esilnt rules sendTransactionAsync should return txHash string Added Event generation to abi-gen Publish Add dates to CHANGELOG entries Update subproviders CHANGELOG Support both personal_sign and eth_sign Fix Ledger tests given change from `personal_sign` to `eth_sign` Update subprovider to catch correct RPC method Rename guide Update contribution guide Fix broken links in the abi-gen README Fix typing generation for arrays in which types separated by |s
Diffstat (limited to 'packages/contracts/util/multi_sig_wrapper.ts')
-rw-r--r--packages/contracts/util/multi_sig_wrapper.ts19
1 files changed, 12 insertions, 7 deletions
diff --git a/packages/contracts/util/multi_sig_wrapper.ts b/packages/contracts/util/multi_sig_wrapper.ts
index 2e4174436..0e2e671ec 100644
--- a/packages/contracts/util/multi_sig_wrapper.ts
+++ b/packages/contracts/util/multi_sig_wrapper.ts
@@ -3,12 +3,12 @@ import ethUtil = require('ethereumjs-util');
import * as _ from 'lodash';
import * as Web3 from 'web3';
-import {ContractInstance, TransactionDataParams} from './types';
+import { ContractInstance, TransactionDataParams } from './types';
export class MultiSigWrapper {
private _multiSig: ContractInstance;
public static encodeFnArgs(name: string, abi: Web3.AbiDefinition[], args: any[]) {
- const abiEntity = _.find(abi, {name}) as Web3.MethodAbi;
+ const abiEntity = _.find(abi, { name }) as Web3.MethodAbi;
if (_.isUndefined(abiEntity)) {
throw new Error(`Did not find abi entry for name: ${name}`);
}
@@ -24,11 +24,16 @@ export class MultiSigWrapper {
constructor(multiSigContractInstance: ContractInstance) {
this._multiSig = multiSigContractInstance;
}
- public async submitTransactionAsync(destination: string, from: string,
- dataParams: TransactionDataParams,
- value: number = 0) {
- const {name, abi, args = []} = dataParams;
+ public async submitTransactionAsync(
+ destination: string,
+ from: string,
+ dataParams: TransactionDataParams,
+ value: number = 0,
+ ) {
+ const { name, abi, args = [] } = dataParams;
const encoded = MultiSigWrapper.encodeFnArgs(name, abi, args);
- return this._multiSig.submitTransaction(destination, value, encoded, {from});
+ return this._multiSig.submitTransaction(destination, value, encoded, {
+ from,
+ });
}
}