aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorJacob Evans <jacob@dekz.net>2019-01-21 12:52:39 +0800
committerJacob Evans <jacob@dekz.net>2019-01-21 12:52:39 +0800
commitbee48d1d4304738afd67c829490f2b90b6ce8677 (patch)
tree8c2d6825f28526ef98cc17e1c656e5dc93649957 /packages
parentebbb4df227d5e290b4bd392322405440dded6e4c (diff)
downloaddexon-0x-contracts-bee48d1d4304738afd67c829490f2b90b6ce8677.tar
dexon-0x-contracts-bee48d1d4304738afd67c829490f2b90b6ce8677.tar.gz
dexon-0x-contracts-bee48d1d4304738afd67c829490f2b90b6ce8677.tar.bz2
dexon-0x-contracts-bee48d1d4304738afd67c829490f2b90b6ce8677.tar.lz
dexon-0x-contracts-bee48d1d4304738afd67c829490f2b90b6ce8677.tar.xz
dexon-0x-contracts-bee48d1d4304738afd67c829490f2b90b6ce8677.tar.zst
dexon-0x-contracts-bee48d1d4304738afd67c829490f2b90b6ce8677.zip
Remove partial type for TxData txDefaults
Diffstat (limited to 'packages')
-rw-r--r--packages/migrations/CHANGELOG.json4
-rw-r--r--packages/migrations/src/migration.ts10
2 files changed, 6 insertions, 8 deletions
diff --git a/packages/migrations/CHANGELOG.json b/packages/migrations/CHANGELOG.json
index 64ae94b14..7938f137f 100644
--- a/packages/migrations/CHANGELOG.json
+++ b/packages/migrations/CHANGELOG.json
@@ -5,6 +5,10 @@
{
"note": "Upgrade the bignumber.js to v8.0.2",
"pr": 1517
+ },
+ {
+ "note": "Removed `owner` in Migrations. `txDefaults` is now a non-Partial type",
+ "pr": 1533
}
]
},
diff --git a/packages/migrations/src/migration.ts b/packages/migrations/src/migration.ts
index f33d6337a..7668ec923 100644
--- a/packages/migrations/src/migration.ts
+++ b/packages/migrations/src/migration.ts
@@ -16,11 +16,8 @@ import { erc20TokenInfo, erc721TokenInfo } from './utils/token_info';
* @param txDefaults Default transaction values to use when deploying contracts (e.g., specify the desired contract creator with the `from` parameter).
* @returns The addresses of the contracts that were deployed.
*/
-export async function runMigrationsAsync(provider: Provider, txDefaults: Partial<TxData>): Promise<ContractAddresses> {
+export async function runMigrationsAsync(provider: Provider, txDefaults: TxData): Promise<ContractAddresses> {
const web3Wrapper = new Web3Wrapper(provider);
- if (_.isUndefined(txDefaults.from)) {
- throw new Error('from address must be specified');
- }
// Proxies
const erc20Proxy = await wrappers.ERC20ProxyContract.deployFrom0xArtifactAsync(
@@ -206,10 +203,7 @@ let _cachedContractAddresses: ContractAddresses;
* @param txDefaults Default transaction values to use when deploying contracts (e.g., specify the desired contract creator with the `from` parameter).
* @returns The addresses of the contracts that were deployed.
*/
-export async function runMigrationsOnceAsync(
- provider: Provider,
- txDefaults: Partial<TxData>,
-): Promise<ContractAddresses> {
+export async function runMigrationsOnceAsync(provider: Provider, txDefaults: TxData): Promise<ContractAddresses> {
if (!_.isUndefined(_cachedContractAddresses)) {
return _cachedContractAddresses;
}