const fs = require ( "fs" ) ; const truffleParams = require ( "../truffle.js" ) ; const tokenDataDir = `${ projectRoot ( ) }/token_registry_data` ; const ERC20_TOKEN_LIST = readJsonSync ( `${ tokenDataDir }/erc20_tokens.json` ) ; const ERC721_CONTRACT_DATA = readJsonSync ( `${ tokenDataDir }/erc721_contracts.json` ) ; const ERC721_KOVAN_CONTRACT_DATA = readJsonSync ( `${ tokenDataDir }/erc721_kovan_contracts.json` ) ; const OWNER_ONE = "0x5d497982326f641e0b374585ff7c1c1be9878560" ; const OWNER_TWO = "0x8f8c5ebde485dfcb64d8e6d1dea833b2d43fb9de" ; const OWNER_THREE = "0xb41411e8cfae259a6494ecdc81833b627f051be4" ; const OWNER_FOUR = "0xfefdde6a490cd4095de204b6fe31ba1607b19e3f" ; const OWNER_FIVE = "0xa32d732ab0096dbf837f3e5d358ac5b597dcbf73" ; const KOVAN_ACCOUNT = truffleParams . networks . kovan . from ; type { number } const TIMELOCK_IN_SECONDS = 60 * 60 * 24 * 7 ; type { number } const THRESHOLD = 1 / 2 ; /**
 * The options by which the multi-signature wallet will be configured, defined per network
 * we deploy to.
 */ const MULTISIG_PARAMS = { live : { threshold : THRESHOLD , timelockInSeconds : TIMELOCK_IN_SECONDS , } , kovan : { threshold : 1 / 6 , timelockInSeconds : 1 , } , } ; const SIGNATORIES = [ OWNER_ONE , OWNER_TWO , OWNER_THREE , OWNER_FOUR , OWNER_FIVE ] ; const TEST_NET_SIGNATORIES = [ OWNER_ONE , OWNER_TWO , OWNER_THREE , OWNER_FOUR , KOVAN_ACCOUNT ] ; const LIVE_NETWORK_ID = "live" ; const KOVAN_NETWORK_ID = "kovan" ; const DUMMY_TOKEN_SUPPLY = 1000 * 10 ** 18 ; const DUMMY_TOKEN_DECIMALS = 18 ; const NUM_INITIAL_BALANCE_HOLDERS = 10 ; type { string } const CRYPTOKITTIES_CONTRACT_ADDRESS = "0x06012c8cf97BEaD5deAe237070F9587f8E7A266d" ; type { string } const TOKEN_URI_OPERATOR = "0x5d497982326f641e0b374585ff7c1c1be9878560" ; type { string [ ] } const NAMES_OF_CONTRACTS_OWNED_BY_MULTISIG = [ "DebtRegistry" , "DebtToken" , "DebtKernel" , "TokenTransferProxy" , "RepaymentRouter" , "Collateralizer" , "TokenRegistry" , "ContractRegistry" , ] ; type { String } const KOVAN_WETH_ADDRESS = "0xd0a1e359811322d97991e03f863a0c30c2cf029c" ; module . exports = { SIGNATORIES , TEST_NET_SIGNATORIES , THRESHOLD , TIMELOCK_IN_SECONDS , LIVE_NETWORK_ID , KOVAN_NETWORK_ID , DUMMY_TOKEN_SUPPLY , DUMMY_TOKEN_DECIMALS , KOVAN_WETH_ADDRESS , NAMES_OF_CONTRACTS_OWNED_BY_MULTISIG , NUM_INITIAL_BALANCE_HOLDERS , TOKEN_URI_OPERATOR , TOKEN_LIST : ERC20_TOKEN_LIST , ERC721_CONTRACT_DATA , CRYPTOKITTIES_CONTRACT : CRYPTOKITTIES_CONTRACT_ADDRESS , MULTISIG_PARAMS , ERC721_KOVAN_CONTRACT_DATA , } ; param path returns { any } function readJsonSync ( path ) { return JSON . parse ( fs . readFileSync ( path , "utf8" ) ) ; } returns { string } function projectRoot ( ) { const currentDir = __dirname ; const firstOption = `${ currentDir }/..` ; const secondOption = `${ currentDir }/../..` ; if ( fs . existsSync ( `${ firstOption }/package.json` ) ) { return firstOption ; } else if ( fs . existsSync ( `${ secondOption }/package.json` ) ) { return secondOption ; } else { throw new Error ( "Could not find root directory." ) ; } }