truffle-config.js 5.2 KB

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