Change polygon cfg
This commit is contained in:
parent
da2fc8b4c6
commit
1630b18b47
|
@ -1,7 +1,6 @@
|
|||
const HDWalletProvider = require('@truffle/hdwallet-provider');
|
||||
const HDWalletProvider = require("@truffle/hdwallet-provider");
|
||||
|
||||
|
||||
require('dotenv').config({path:'.env'});
|
||||
require("dotenv").config({ path: ".env" });
|
||||
|
||||
/**
|
||||
* Use this file to configure your truffle project. It's seeded with some
|
||||
|
@ -29,9 +28,9 @@ require('dotenv').config({path:'.env'});
|
|||
// const mnemonic = fs.readFileSync('.secret').toString().trim();
|
||||
|
||||
module.exports = {
|
||||
contracts_directory: './contracts',
|
||||
contracts_build_directory: './build/contracts',
|
||||
migrations_directory: './migrations/polygon',
|
||||
contracts_directory: "./contracts",
|
||||
contracts_build_directory: "./build/contracts",
|
||||
migrations_directory: "./migrations/polygon",
|
||||
/**
|
||||
* Networks define how you connect to your ethereum client and let you set the
|
||||
* defaults web3 uses to send transactions. If you don't specify one truffle
|
||||
|
@ -42,18 +41,18 @@ module.exports = {
|
|||
* $ truffle test --network <network-name>
|
||||
*/
|
||||
|
||||
networks: {
|
||||
networks: {
|
||||
// Useful for testing. The `development` name is special - truffle uses it by default
|
||||
// if it's defined here and no other network is specified at the command line.
|
||||
// You should run a client (like ganache-cli, geth or parity) in a separate terminal
|
||||
// tab if you use this network and you must also set the `host`, `port` and `network_id`
|
||||
// options below to some value.
|
||||
//
|
||||
development: {
|
||||
host: '127.0.0.1', // Localhost (default: none)
|
||||
port: 8545, // Standard Ethereum port (default: none)
|
||||
network_id: '*', // Any network (default: none)
|
||||
},
|
||||
development: {
|
||||
host: "127.0.0.1", // Localhost (default: none)
|
||||
port: 8545, // Standard Ethereum port (default: none)
|
||||
network_id: "*", // Any network (default: none)
|
||||
},
|
||||
// Another network with more advanced options...
|
||||
// advanced: {
|
||||
// port: 8777, // Custom port
|
||||
|
@ -65,14 +64,15 @@ module.exports = {
|
|||
// },
|
||||
// Useful for deploying to a public network.
|
||||
// NB: It's important to wrap the provider as a function.
|
||||
mumbai: {
|
||||
provider: () => new HDWalletProvider(process.env.ETH_PRIVATE_KEY, process.env.MUMBAI_PROVIDER),
|
||||
network_id: 80001,
|
||||
//gas: 4465030,
|
||||
//confirmations: 2, // # of confs to wait between deployments. (default: 0)
|
||||
//timeoutBlocks: 200, // # of blocks before a deployment times out (minimum/default: 50)
|
||||
//skipDryRun: true // Skip dry run before migrations? (default: false for public nets )
|
||||
},
|
||||
mumbai: {
|
||||
provider: () => new HDWalletProvider(process.env.ETH_PRIVATE_KEY, process.env.MUMBAI_PROVIDER),
|
||||
network_id: 80001,
|
||||
gasPrice: 80000000000,
|
||||
gas: 7000000,
|
||||
//confirmations: 2, // # of confs to wait between deployments. (default: 0)
|
||||
timeoutBlocks: 50, // # of blocks before a deployment times out (minimum/default: 50)
|
||||
skipDryRun: true, // Skip dry run before migrations? (default: false for public nets )
|
||||
},
|
||||
// Useful for private networks
|
||||
// private: {
|
||||
// provider: () => new HDWalletProvider(mnemonic, `https://network.io`),
|
||||
|
@ -89,16 +89,16 @@ module.exports = {
|
|||
// Configure your compilers
|
||||
compilers: {
|
||||
solc: {
|
||||
version: '0.7.6', // Fetch exact version from solc-bin (default: truffle's version)
|
||||
version: "0.7.6", // Fetch exact version from solc-bin (default: truffle's version)
|
||||
// docker: true, // Use '0.5.1' you've installed locally with docker (default: false)
|
||||
// settings: { // See the solidity docs for advice about optimization and evmVersion
|
||||
optimizer: {
|
||||
enabled: false,
|
||||
runs: 200
|
||||
enabled: false,
|
||||
runs: 200,
|
||||
},
|
||||
// evmVersion: 'byzantium'
|
||||
// }
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
// Truffle DB is currently disabled by default; to enable it, change enabled:
|
||||
|
@ -108,17 +108,17 @@ module.exports = {
|
|||
// NOTE: It is not possible to migrate your contracts to truffle DB and you should
|
||||
// make a backup of your artifacts to a safe location before enabling this feature.
|
||||
//
|
||||
// After you backed up your artifacts you can utilize db by running migrate as follows:
|
||||
// After you backed up your artifacts you can utilize db by running migrate as follows:
|
||||
// $ truffle migrate --reset --compile-all
|
||||
//
|
||||
// db: {
|
||||
// enabled: false,
|
||||
// host: '127.0.0.1',
|
||||
// adapter: {
|
||||
// name: 'sqlite',
|
||||
// settings: {
|
||||
// directory: '.db'
|
||||
// }
|
||||
// }
|
||||
// enabled: false,
|
||||
// host: '127.0.0.1',
|
||||
// adapter: {
|
||||
// name: 'sqlite',
|
||||
// settings: {
|
||||
// directory: '.db'
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue