github.com/codingfuture/orig-energi3@v0.8.4/truffle-config.js (about)

     1  // Copyright 2019 The Energi Core Authors
     2  // This file is part of the Energi Core library.
     3  //
     4  // The Energi Core library is free software: you can redistribute it and/or modify
     5  // it under the terms of the GNU Lesser General Public License as published by
     6  // the Free Software Foundation, either version 3 of the License, or
     7  // (at your option) any later version.
     8  //
     9  // The Energi Core library is distributed in the hope that it will be useful,
    10  // but WITHOUT ANY WARRANTY; without even the implied warranty of
    11  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    12  // GNU Lesser General Public License for more details.
    13  //
    14  // You should have received a copy of the GNU Lesser General Public License
    15  // along with the Energi Core library. If not, see <http://www.gnu.org/licenses/>.
    16  
    17  
    18  const contracts = [
    19      'BackboneRewardV1',
    20      'BlacklistRegistryV1',
    21      'CheckpointRegistryV1',
    22      'Gen2Migration',
    23      'GenericProposal',
    24      'GovernedProxy',
    25      'MasternodeTokenV1',
    26      'MasternodeRegistryV1',
    27      'SporkRegistryV1',
    28      'StakerRewardV1',
    29      'TreasuryV1',
    30  ];
    31  const targets = [];
    32  
    33  for (let c of contracts) {
    34      targets.push({
    35          properties: {
    36              contractName: c,
    37          },
    38          fileProperties: {
    39              abi: `./build/contracts/energi/${c}.abi`,
    40              bytecode: `./build/contracts/energi/${c}_evm.json`,
    41          }
    42      });
    43  }
    44  
    45  module.exports = {
    46      contracts_directory: './energi/contracts/src',
    47      contracts_build_directory: './build/contracts/truffle',
    48      migrations_directory: './energi/contracts/test_deploy',
    49      test_directory: './energi/contracts/test',
    50      test_file_extension_regexp: /.*\.spec\.js$/,
    51      verboseRpc: false,
    52      mocha: {
    53          spec: './energi/contracts/test/*.spec.js',
    54      },
    55      networks: {
    56          development: {
    57              host: "127.0.0.1",
    58              port: 8545,
    59              network_id: "*" // Match any network id
    60          }
    61      },
    62      compilers: {
    63          solc: {
    64              version: '0.5.16',
    65              evmVersion: 'petersburg',
    66              optimizer: {
    67                  enabled: true,
    68                  runs: 9999999999,
    69              }
    70          },
    71          /*external: {
    72              command: "make prebuild",
    73              targets,
    74          }*/
    75      }
    76  }