aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorJacob Evans <jacob@dekz.net>2018-07-09 12:06:06 +0800
committerJacob Evans <jacob@dekz.net>2018-07-11 18:16:04 +0800
commitdd77a38535230df7ce92c29dbbdd00938ccc1edb (patch)
treee2f7ae38702d7daabe241a9c749ebd1fcd37f533 /packages
parentb9627e14d0b30eb50e9169fb7002f942fa089347 (diff)
downloaddexon-sol-tools-dd77a38535230df7ce92c29dbbdd00938ccc1edb.tar
dexon-sol-tools-dd77a38535230df7ce92c29dbbdd00938ccc1edb.tar.gz
dexon-sol-tools-dd77a38535230df7ce92c29dbbdd00938ccc1edb.tar.bz2
dexon-sol-tools-dd77a38535230df7ce92c29dbbdd00938ccc1edb.tar.lz
dexon-sol-tools-dd77a38535230df7ce92c29dbbdd00938ccc1edb.tar.xz
dexon-sol-tools-dd77a38535230df7ce92c29dbbdd00938ccc1edb.tar.zst
dexon-sol-tools-dd77a38535230df7ce92c29dbbdd00938ccc1edb.zip
Add Migrations for Forwarder
Diffstat (limited to 'packages')
-rw-r--r--packages/contracts/src/1.0.0/MultiSigWalletWithTImeLockExceptRemoveAuthorizedAddress/MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress.sol4
-rw-r--r--packages/migrations/compiler.json2
-rw-r--r--packages/migrations/src/2.0.0/migration.ts16
3 files changed, 19 insertions, 3 deletions
diff --git a/packages/contracts/src/1.0.0/MultiSigWalletWithTImeLockExceptRemoveAuthorizedAddress/MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress.sol b/packages/contracts/src/1.0.0/MultiSigWalletWithTImeLockExceptRemoveAuthorizedAddress/MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress.sol
index 241e02d4a..aee722c53 100644
--- a/packages/contracts/src/1.0.0/MultiSigWalletWithTImeLockExceptRemoveAuthorizedAddress/MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress.sol
+++ b/packages/contracts/src/1.0.0/MultiSigWalletWithTImeLockExceptRemoveAuthorizedAddress/MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress.sol
@@ -18,7 +18,7 @@
pragma solidity ^0.4.10;
-import "../../current/multisig/MultiSigWalletWithTimeLock.sol";
+import "../../2.0.0/multisig/MultiSigWalletWithTimeLock.sol";
contract MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress is MultiSigWalletWithTimeLock {
@@ -79,4 +79,4 @@ contract MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress is MultiSigWall
}
return true;
}
-} \ No newline at end of file
+}
diff --git a/packages/migrations/compiler.json b/packages/migrations/compiler.json
index eae22a73c..493a73d46 100644
--- a/packages/migrations/compiler.json
+++ b/packages/migrations/compiler.json
@@ -1,5 +1,5 @@
{
- "contractsDir": "../contracts/src/contracts",
+ "contractsDir": "../contracts/src/",
"compilerSettings": {
"optimizer": {
"enabled": true,
diff --git a/packages/migrations/src/2.0.0/migration.ts b/packages/migrations/src/2.0.0/migration.ts
index 75e60d3e2..248e86102 100644
--- a/packages/migrations/src/2.0.0/migration.ts
+++ b/packages/migrations/src/2.0.0/migration.ts
@@ -13,6 +13,7 @@ import { DummyERC721TokenContract } from './contract_wrappers/dummy_erc721_token
import { ERC20ProxyContract } from './contract_wrappers/erc20_proxy';
import { ERC721ProxyContract } from './contract_wrappers/erc721_proxy';
import { ExchangeContract } from './contract_wrappers/exchange';
+import { ForwarderContract } from './contract_wrappers/forwarder';
import { WETH9Contract } from './contract_wrappers/weth9';
import { ZRXTokenContract } from './contract_wrappers/zrx_token';
@@ -127,4 +128,19 @@ export const runV2MigrationsAsync = async (provider: Provider, artifactsDir: str
erc721TokenInfo[0].name,
erc721TokenInfo[0].symbol,
);
+
+ // Forwarder
+ const erc20ProxyId = await erc20proxy.getProxyId.callAsync();
+ const forwarder = await ForwarderContract.deployFrom0xArtifactAsync(
+ artifacts.Forwarder,
+ provider,
+ txDefaults,
+ exchange.address,
+ etherToken.address,
+ zrxToken.address,
+ erc20ProxyId,
+ assetProxyUtils.encodeERC20AssetData(zrxToken.address),
+ assetProxyUtils.encodeERC20AssetData(etherToken.address),
+ );
+ artifactsWriter.saveArtifact(forwarder);
};