<commit_before>const MathLib = artifacts.require('./libraries/MathLib.sol');
const CollateralToken = artifacts.require('./tokens/CollateralToken.sol');
const MarketToken = artifacts.require('./tokens/MarketToken.sol');
const MarketContractMPX = artifacts.require('./mpx/MarketContractMPX.sol');
const MarketContractFactory = artifacts.require('./mpx/MarketContractFactoryMPX.sol');
const MarketCollateralPool = artifacts.require('./MarketCollateralPool.sol');
const MarketContractRegistry = artifacts.require('./MarketContractRegistry.sol');

module.exports = function(deployer, network) {
  if (network !== 'live') {
    const marketContractExpiration = Math.floor(Date.now() / 1000) + 60 * 15; // expires in 15 minutes.
    var gasLimit = web3.eth.getBlock('latest').gasLimit;

    return web3.eth.getAccounts().then(function(accounts) {
      return deployer.deploy(MarketToken).then(function() {
        return deployer.deploy(MathLib).then(function() {
          return deployer.deploy(MarketContractRegistry).then(function() {
            return deployer
              .link(MathLib, [MarketContractMPX, MarketCollateralPool, MarketContractFactory])
              .then(function() {
                return deployer
                  .deploy(MarketCollateralPool, MarketContractRegistry.address)
                  .then(function() {
                    var gasLimit = web3.eth.getBlock('latest').gasLimit;
                    return MarketCollateralPool.deployed().then(function() {
                      return deployer
                        .deploy(CollateralToken, 'CollateralToken', 'CTK', 10000, 18, {
                          gas: gasLimit
                        })
                        .then(function() {
                          return deployer
                            .deploy(
                              MarketContractFactory,
                              MarketContractRegistry.address,
                              MarketCollateralPool.address,
                              {
                                gas: gasLimit
                              }
                            )
                            .then(function(factory) {
                              return MarketContractRegistry.deployed().then(function(
                                registryInstance
                              ) {
                                return registryInstance
                                  .addFactoryAddress(factory.address)
                                  .then(function() {
                                    // white list the factory
                                    return factory
                                      .setOracleHubAddress(accounts[8])
                                      .then(function() {
                                        return factory<commit_msg>clean up<commit_after>const MathLib = artifacts.require('./libraries/MathLib.sol');
const CollateralToken = artifacts.require('./tokens/CollateralToken.sol');
const MarketToken = artifacts.require('./tokens/MarketToken.sol');
const MarketContractMPX = artifacts.require('./mpx/MarketContractMPX.sol');
const MarketContractFactory = artifacts.require('./mpx/MarketContractFactoryMPX.sol');
const MarketCollateralPool = artifacts.require('./MarketCollateralPool.sol');
const MarketContractRegistry = artifacts.require('./MarketContractRegistry.sol');

module.exports = function(deployer, network) {
  if (network !== 'live') {
    const marketContractExpiration = Math.floor(Date.now() / 1000) + 60 * 15; // expires in 15 minutes.
    var gasLimit = web3.eth.getBlock('latest').gasLimit;

    return web3.eth.getAccounts().then(function(accounts) {
      return deployer.deploy(MarketToken).then(function() {
        return deployer.deploy(MathLib).then(function() {
          return deployer.deploy(MarketContractRegistry).then(function() {
            return deployer
              .link(MathLib, [MarketContractMPX, MarketCollateralPool, MarketContractFactory])
              .then(function() {
                return deployer
                  .deploy(MarketCollateralPool, MarketContractRegistry.address)
                  .then(function() {
                    return MarketCollateralPool.deployed().then(function() {
                      return deployer
                        .deploy(CollateralToken, 'CollateralToken', 'CTK', 10000, 18, {
                          gas: gasLimit
                        })
                        .then(function() {
                          return deployer
                            .deploy(
                              MarketContractFactory,
                              MarketContractRegistry.address,
                              MarketCollateralPool.address,
                              {
                                gas: gasLimit
                              }
                            )
                            .then(function(factory) {
                              return MarketContractRegistry.deployed().then(function(
                                registryInstance
                              ) {
                                return registryInstance
                                  .addFactoryAddress(factory.address)
                                  .then(function() {
                                    // white list the factory
                                    return factory
                                      .setOracleHubAddress(accounts[8])
                                      .then(function() {
                                        return factory
{'fraction_non_alphanumeric': 0.08910003585514521, 'fraction_numerical': 0.007350304768734313, 'mean_word_length': 1.3933933933933933, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 14, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2625248', 'n_tokens_mistral': 1266, 'n_tokens_neox': 1146, 'n_words': 199}