aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts
diff options
context:
space:
mode:
authorAmir Bandeali <abandeali1@gmail.com>2018-05-21 10:14:06 +0800
committerAmir Bandeali <abandeali1@gmail.com>2018-05-25 06:39:19 +0800
commit326a566db29031edf21320923e67dde309573efd (patch)
treeab6f6d1964f407dc8b4e00ca5440fbb748941485 /packages/contracts
parent84257dac2be92192d5b99dd31617aaebeddb285b (diff)
downloaddexon-0x-contracts-326a566db29031edf21320923e67dde309573efd.tar.gz
dexon-0x-contracts-326a566db29031edf21320923e67dde309573efd.tar.zst
dexon-0x-contracts-326a566db29031edf21320923e67dde309573efd.zip
Add old MultiSig to previous contracts, cleanup file structure
Diffstat (limited to 'packages/contracts')
-rw-r--r--packages/contracts/src/contracts/current/multisig/MultiSigWallet.sol (renamed from packages/contracts/src/contracts/current/multisig/MultiSigWallet/MultiSigWallet.sol)0
-rw-r--r--packages/contracts/src/contracts/current/multisig/MultiSigWalletWithTimeLock.sol (renamed from packages/contracts/src/contracts/current/multisig/MultiSigWalletWithTimeLock/MultiSigWalletWithTimeLock.sol)2
-rw-r--r--packages/contracts/src/contracts/current/protocol/AssetProxyOwner/AssetProxyOwner.sol2
-rw-r--r--packages/contracts/src/contracts/previous/MultiSigWalletWithTImeLockExceptRemoveAuthorizedAddress/MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress.sol4
-rw-r--r--packages/contracts/src/utils/multi_sig_wrapper.ts10
-rw-r--r--packages/contracts/test/asset_proxy_owner.ts8
-rw-r--r--packages/contracts/test/multi_sig_with_time_lock.ts6
7 files changed, 16 insertions, 16 deletions
diff --git a/packages/contracts/src/contracts/current/multisig/MultiSigWallet/MultiSigWallet.sol b/packages/contracts/src/contracts/current/multisig/MultiSigWallet.sol
index 79fd92029..79fd92029 100644
--- a/packages/contracts/src/contracts/current/multisig/MultiSigWallet/MultiSigWallet.sol
+++ b/packages/contracts/src/contracts/current/multisig/MultiSigWallet.sol
diff --git a/packages/contracts/src/contracts/current/multisig/MultiSigWalletWithTimeLock/MultiSigWalletWithTimeLock.sol b/packages/contracts/src/contracts/current/multisig/MultiSigWalletWithTimeLock.sol
index e393b565f..9766c2158 100644
--- a/packages/contracts/src/contracts/current/multisig/MultiSigWalletWithTimeLock/MultiSigWalletWithTimeLock.sol
+++ b/packages/contracts/src/contracts/current/multisig/MultiSigWalletWithTimeLock.sol
@@ -18,7 +18,7 @@
pragma solidity ^0.4.10;
-import { MultiSigWallet } from "../MultiSigWallet/MultiSigWallet.sol";
+import "./MultiSigWallet.sol";
/// @title Multisignature wallet with time lock- Allows multiple parties to execute a transaction after a time lock has passed.
/// @author Amir Bandeali - <amir@0xProject.com>
diff --git a/packages/contracts/src/contracts/current/protocol/AssetProxyOwner/AssetProxyOwner.sol b/packages/contracts/src/contracts/current/protocol/AssetProxyOwner/AssetProxyOwner.sol
index 1b0f9c34f..1061d0b9a 100644
--- a/packages/contracts/src/contracts/current/protocol/AssetProxyOwner/AssetProxyOwner.sol
+++ b/packages/contracts/src/contracts/current/protocol/AssetProxyOwner/AssetProxyOwner.sol
@@ -18,7 +18,7 @@
pragma solidity ^0.4.10;
-import "../../multisig/MultiSigWalletWithTimeLock/MultiSigWalletWithTimeLock.sol";
+import "../../multisig/MultiSigWalletWithTimeLock.sol";
contract AssetProxyOwner is
MultiSigWalletWithTimeLock
diff --git a/packages/contracts/src/contracts/previous/MultiSigWalletWithTImeLockExceptRemoveAuthorizedAddress/MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress.sol b/packages/contracts/src/contracts/previous/MultiSigWalletWithTImeLockExceptRemoveAuthorizedAddress/MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress.sol
index 8d7d64a75..241e02d4a 100644
--- a/packages/contracts/src/contracts/previous/MultiSigWalletWithTImeLockExceptRemoveAuthorizedAddress/MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress.sol
+++ b/packages/contracts/src/contracts/previous/MultiSigWalletWithTImeLockExceptRemoveAuthorizedAddress/MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress.sol
@@ -1,6 +1,6 @@
/*
- Copyright 2017 ZeroEx Intl.
+ Copyright 2018 ZeroEx Intl.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@
pragma solidity ^0.4.10;
-import "../../current/multisig/MultiSigWalletWithTimeLock/MultiSigWalletWithTimeLock.sol";
+import "../../current/multisig/MultiSigWalletWithTimeLock.sol";
contract MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress is MultiSigWalletWithTimeLock {
diff --git a/packages/contracts/src/utils/multi_sig_wrapper.ts b/packages/contracts/src/utils/multi_sig_wrapper.ts
index c33e7bb47..730cdcbef 100644
--- a/packages/contracts/src/utils/multi_sig_wrapper.ts
+++ b/packages/contracts/src/utils/multi_sig_wrapper.ts
@@ -27,17 +27,17 @@ export class MultiSigWrapper {
const txHash = await this._multiSig.submitTransaction.sendTransactionAsync(destination, value, data, {
from,
});
- const tx = await this._getTxWithDecodedMultiSigLogs(txHash);
+ const tx = await this._getTxWithDecodedMultiSigLogsAsync(txHash);
return tx;
}
public async confirmTransactionAsync(txId: BigNumber, from: string): Promise<TransactionReceiptWithDecodedLogs> {
const txHash = await this._multiSig.confirmTransaction.sendTransactionAsync(txId, { from });
- const tx = await this._getTxWithDecodedMultiSigLogs(txHash);
+ const tx = await this._getTxWithDecodedMultiSigLogsAsync(txHash);
return tx;
}
public async executeTransactionAsync(txId: BigNumber, from: string): Promise<TransactionReceiptWithDecodedLogs> {
const txHash = await this._multiSig.executeTransaction.sendTransactionAsync(txId, { from });
- const tx = await this._getTxWithDecodedMultiSigLogs(txHash);
+ const tx = await this._getTxWithDecodedMultiSigLogsAsync(txHash);
return tx;
}
public async executeRemoveAuthorizedAddressAsync(
@@ -46,10 +46,10 @@ export class MultiSigWrapper {
): Promise<TransactionReceiptWithDecodedLogs> {
const txHash = await (this
._multiSig as AssetProxyOwnerContract).executeRemoveAuthorizedAddress.sendTransactionAsync(txId, { from });
- const tx = await this._getTxWithDecodedMultiSigLogs(txHash);
+ const tx = await this._getTxWithDecodedMultiSigLogsAsync(txHash);
return tx;
}
- private async _getTxWithDecodedMultiSigLogs(txHash: string) {
+ private async _getTxWithDecodedMultiSigLogsAsync(txHash: string): Promise<TransactionReceiptWithDecodedLogs> {
const tx = await this._zeroEx.awaitTransactionMinedAsync(txHash);
tx.logs = _.filter(tx.logs, log => log.address === this._multiSig.address);
tx.logs = _.map(tx.logs, log => this._logDecoder.decodeLogOrThrow(log));
diff --git a/packages/contracts/test/asset_proxy_owner.ts b/packages/contracts/test/asset_proxy_owner.ts
index 2e8e9373a..6e999dd99 100644
--- a/packages/contracts/test/asset_proxy_owner.ts
+++ b/packages/contracts/test/asset_proxy_owner.ts
@@ -28,7 +28,7 @@ const zeroEx = new ZeroEx(provider, { networkId: constants.TESTRPC_NETWORK_ID })
describe('AssetProxyOwner', () => {
let owners: string[];
let authorized: string;
- const requiredApprovals = new BigNumber(2);
+ const REQUIRED_APPROVALS = new BigNumber(2);
const SECONDS_TIME_LOCKED = new BigNumber(1000000);
let erc20Proxy: MixinAuthorizableContract;
@@ -56,7 +56,7 @@ describe('AssetProxyOwner', () => {
provider,
txDefaults,
owners,
- requiredApprovals,
+ REQUIRED_APPROVALS,
SECONDS_TIME_LOCKED,
defaultAssetProxyContractAddresses,
);
@@ -79,7 +79,7 @@ describe('AssetProxyOwner', () => {
provider,
txDefaults,
owners,
- requiredApprovals,
+ REQUIRED_APPROVALS,
SECONDS_TIME_LOCKED,
assetProxyContractAddresses,
);
@@ -96,7 +96,7 @@ describe('AssetProxyOwner', () => {
provider,
txDefaults,
owners,
- requiredApprovals,
+ REQUIRED_APPROVALS,
SECONDS_TIME_LOCKED,
assetProxyContractAddresses,
),
diff --git a/packages/contracts/test/multi_sig_with_time_lock.ts b/packages/contracts/test/multi_sig_with_time_lock.ts
index c369ca63a..ace0f0045 100644
--- a/packages/contracts/test/multi_sig_with_time_lock.ts
+++ b/packages/contracts/test/multi_sig_with_time_lock.ts
@@ -23,7 +23,7 @@ const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
describe('MultiSigWalletWithTimeLock', () => {
let owners: string[];
- const requiredApprovals = new BigNumber(2);
+ const REQUIRED_APPROVALS = new BigNumber(2);
const SECONDS_TIME_LOCKED = new BigNumber(1000000);
before(async () => {
@@ -56,7 +56,7 @@ describe('MultiSigWalletWithTimeLock', () => {
provider,
txDefaults,
owners,
- requiredApprovals,
+ REQUIRED_APPROVALS,
secondsTimeLocked,
);
multiSigWrapper = new MultiSigWrapper(multiSig, provider);
@@ -127,7 +127,7 @@ describe('MultiSigWalletWithTimeLock', () => {
provider,
txDefaults,
owners,
- requiredApprovals,
+ REQUIRED_APPROVALS,
SECONDS_TIME_LOCKED,
);
multiSigWrapper = new MultiSigWrapper(multiSig, provider);