diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-01-26 18:39:31 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-01-30 23:01:37 +0800 |
commit | 9d62e5fb6f0dc6dc451604f02fb4374a36fcac3c (patch) | |
tree | b8c0c1efc2558b750a4ccfead3bd5d4e19bf0d08 /packages/contracts/util | |
parent | 6f13d107c4ca90049249e44a90b45cac2b490762 (diff) | |
download | dexon-sol-tools-9d62e5fb6f0dc6dc451604f02fb4374a36fcac3c.tar.gz dexon-sol-tools-9d62e5fb6f0dc6dc451604f02fb4374a36fcac3c.tar.zst dexon-sol-tools-9d62e5fb6f0dc6dc451604f02fb4374a36fcac3c.zip |
Use an enum for contract name
Diffstat (limited to 'packages/contracts/util')
-rw-r--r-- | packages/contracts/util/types.ts | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/packages/contracts/util/types.ts b/packages/contracts/util/types.ts index baeb15577..0db04cd76 100644 --- a/packages/contracts/util/types.ts +++ b/packages/contracts/util/types.ts @@ -119,20 +119,21 @@ export enum ExchangeContractErrs { ERROR_INSUFFICIENT_BALANCE_OR_ALLOWANCE, } -export type ArtifactContractName = - | 'TokenTransferProxy' - | 'TokenRegistry' - | 'MultiSigWalletWithTimeLock' - | 'Exchange' - | 'ZRXToken' - | 'DummyToken' - | 'DummyToken_v2' - | 'WETH9' - | 'MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress' - | 'MaliciousToken'; +export enum ContractName { + TokenTransferProxy = 'TokenTransferProxy', + TokenRegistry = 'TokenRegistry', + MultiSigWalletWithTimeLock = 'MultiSigWalletWithTimeLock', + Exchange = 'Exchange', + ZRXToken = 'ZRXToken', + DummyToken = 'DummyToken', + DummyToken_v2 = 'DummyToken_v2', + EtherToken = 'WETH9', + MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress = 'MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress', + MaliciousToken = 'MaliciousToken', +} export interface Artifact { - contract_name: ArtifactContractName; + contract_name: ContractName; networks: { [networkId: number]: { abi: Web3.ContractAbi; |