github.com/aigarnetwork/aigar@v0.0.0-20191115204914-d59a6eb70f8e/tests/solidity/truffle-config.js (about) 1 /* 2 * // Copyright 2018 The go-ethereum Authors 3 * // Copyright 2019 The go-aigar Authors 4 * // This file is part of the go-aigar library. 5 * // 6 * // The go-aigar library is free software: you can redistribute it and/or modify 7 * // it under the terms of the GNU Lesser General Public License as published by 8 * // the Free Software Foundation, either version 3 of the License, or 9 * // (at your option) any later version. 10 * // 11 * // The go-aigar library is distributed in the hope that it will be useful, 12 * // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * // GNU Lesser General Public License for more details. 15 * // 16 * // You should have received a copy of the GNU Lesser General Public License 17 * // along with the go-aigar library. If not, see <http://www.gnu.org/licenses/>. 18 */ 19 20 /** 21 * Use this file to configure your truffle project. It's seeded with some 22 * common settings for different networks and features like migrations, 23 * compilation and testing. Uncomment the ones you need or modify 24 * them to suit your project as necessary. 25 * 26 * More information about configuration can be found at: 27 * 28 * truffleframework.com/docs/advanced/configuration 29 * 30 * To deploy via Infura you'll need a wallet provider (like truffle-hdwallet-provider) 31 * to sign your transactions before they're sent to a remote public node. Infura API 32 * keys are available for free at: infura.io/register 33 * 34 * You'll also need a mnemonic - the twelve word phrase the wallet uses to generate 35 * public/private key pairs. If you're publishing your code to GitHub make sure you load this 36 * phrase from a file you've .gitignored so it doesn't accidentally become public. 37 * 38 */ 39 40 // const HDWalletProvider = require('truffle-hdwallet-provider'); 41 // const infuraKey = "fj4jll3k....."; 42 // 43 // const fs = require('fs'); 44 // const mnemonic = fs.readFileSync(".secret").toString().trim(); 45 46 // module.exports = { 47 // /** 48 // * Networks define how you connect to your ethereum client and let you set the 49 // * defaults web3 uses to send transactions. If you don't specify one truffle 50 // * will spin up a development blockchain for you on port 9545 when you 51 // * run `develop` or `test`. You can ask a truffle command to use a specific 52 // * network from the command line, e.g 53 // * 54 // * $ truffle test --network <network-name> 55 // */ 56 // 57 // networks: { 58 // // Useful for testing. The `development` name is special - truffle uses it by default 59 // // if it's defined here and no other network is specified at the command line. 60 // // You should run a client (like ganache-cli, geth or parity) in a separate terminal 61 // // tab if you use this network and you must also set the `host`, `port` and `network_id` 62 // // options below to some value. 63 // // 64 // // development: { 65 // // host: "127.0.0.1", // Localhost (default: none) 66 // // port: 8545, // Standard Ethereum port (default: none) 67 // // network_id: "*", // Any network (default: none) 68 // // }, 69 // 70 // // Another network with more advanced options... 71 // // advanced: { 72 // // port: 8777, // Custom port 73 // // network_id: 1342, // Custom network 74 // // gas: 8500000, // Gas sent with each transaction (default: ~6700000) 75 // // gasPrice: 20000000000, // 20 gwei (in wei) (default: 100 gwei) 76 // // from: <address>, // Account to send txs from (default: accounts[0]) 77 // // websockets: true // Enable EventEmitter interface for web3 (default: false) 78 // // }, 79 // 80 // // Useful for deploying to a public network. 81 // // NB: It's important to wrap the provider as a function. 82 // // ropsten: { 83 // // provider: () => new HDWalletProvider(mnemonic, `https://ropsten.infura.io/${infuraKey}`), 84 // // network_id: 3, // Ropsten's id 85 // // gas: 5500000, // Ropsten has a lower block limit than mainnet 86 // // confirmations: 2, // # of confs to wait between deployments. (default: 0) 87 // // timeoutBlocks: 200, // # of blocks before a deployment times out (minimum/default: 50) 88 // // skipDryRun: true // Skip dry run before migrations? (default: false for public nets ) 89 // // }, 90 // 91 // // Useful for private networks 92 // // private: { 93 // // provider: () => new HDWalletProvider(mnemonic, `https://network.io`), 94 // // network_id: 2111, // This network is yours, in the cloud. 95 // // production: true // Treats this network as if it was a public net. (default: false) 96 // // } 97 // }, 98 // 99 // // Set default mocha options here, use special reporters etc. 100 // mocha: { 101 // // timeout: 100000 102 // }, 103 // 104 // // Configure your compilers 105 // compilers: { 106 // solc: { 107 // // version: "0.5.1", // Fetch exact version from solc-bin (default: truffle's version) 108 // // docker: true, // Use "0.5.1" you've installed locally with docker (default: false) 109 // // settings: { // See the solidity docs for advice about optimization and evmVersion 110 // // optimizer: { 111 // // enabled: false, 112 // // runs: 200 113 // // }, 114 // // evmVersion: "byzantium" 115 // // } 116 // } 117 // } 118 // } 119 module.exports = { 120 networks: { 121 development: { 122 host: 'localhost', 123 port: 8545, 124 network_id: '*' 125 } 126 } 127 }