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
|
* 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();
|
// const mnemonic = fs.readFileSync('.secret').toString().trim();
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
contracts_directory: './contracts',
|
contracts_directory: "./contracts",
|
||||||
contracts_build_directory: './build/contracts',
|
contracts_build_directory: "./build/contracts",
|
||||||
migrations_directory: './migrations/polygon',
|
migrations_directory: "./migrations/polygon",
|
||||||
/**
|
/**
|
||||||
* Networks define how you connect to your ethereum client and let you set the
|
* 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
|
* defaults web3 uses to send transactions. If you don't specify one truffle
|
||||||
|
@ -42,18 +41,18 @@ module.exports = {
|
||||||
* $ truffle test --network <network-name>
|
* $ truffle test --network <network-name>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
networks: {
|
networks: {
|
||||||
// Useful for testing. The `development` name is special - truffle uses it by default
|
// 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.
|
// 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
|
// 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`
|
// tab if you use this network and you must also set the `host`, `port` and `network_id`
|
||||||
// options below to some value.
|
// options below to some value.
|
||||||
//
|
//
|
||||||
development: {
|
development: {
|
||||||
host: '127.0.0.1', // Localhost (default: none)
|
host: "127.0.0.1", // Localhost (default: none)
|
||||||
port: 8545, // Standard Ethereum port (default: none)
|
port: 8545, // Standard Ethereum port (default: none)
|
||||||
network_id: '*', // Any network (default: none)
|
network_id: "*", // Any network (default: none)
|
||||||
},
|
},
|
||||||
// Another network with more advanced options...
|
// Another network with more advanced options...
|
||||||
// advanced: {
|
// advanced: {
|
||||||
// port: 8777, // Custom port
|
// port: 8777, // Custom port
|
||||||
|
@ -65,14 +64,15 @@ module.exports = {
|
||||||
// },
|
// },
|
||||||
// Useful for deploying to a public network.
|
// Useful for deploying to a public network.
|
||||||
// NB: It's important to wrap the provider as a function.
|
// NB: It's important to wrap the provider as a function.
|
||||||
mumbai: {
|
mumbai: {
|
||||||
provider: () => new HDWalletProvider(process.env.ETH_PRIVATE_KEY, process.env.MUMBAI_PROVIDER),
|
provider: () => new HDWalletProvider(process.env.ETH_PRIVATE_KEY, process.env.MUMBAI_PROVIDER),
|
||||||
network_id: 80001,
|
network_id: 80001,
|
||||||
//gas: 4465030,
|
gasPrice: 80000000000,
|
||||||
//confirmations: 2, // # of confs to wait between deployments. (default: 0)
|
gas: 7000000,
|
||||||
//timeoutBlocks: 200, // # of blocks before a deployment times out (minimum/default: 50)
|
//confirmations: 2, // # of confs to wait between deployments. (default: 0)
|
||||||
//skipDryRun: true // Skip dry run before migrations? (default: false for public nets )
|
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
|
// Useful for private networks
|
||||||
// private: {
|
// private: {
|
||||||
// provider: () => new HDWalletProvider(mnemonic, `https://network.io`),
|
// provider: () => new HDWalletProvider(mnemonic, `https://network.io`),
|
||||||
|
@ -89,16 +89,16 @@ module.exports = {
|
||||||
// Configure your compilers
|
// Configure your compilers
|
||||||
compilers: {
|
compilers: {
|
||||||
solc: {
|
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)
|
// 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
|
// settings: { // See the solidity docs for advice about optimization and evmVersion
|
||||||
optimizer: {
|
optimizer: {
|
||||||
enabled: false,
|
enabled: false,
|
||||||
runs: 200
|
runs: 200,
|
||||||
},
|
},
|
||||||
// evmVersion: 'byzantium'
|
// evmVersion: 'byzantium'
|
||||||
// }
|
// }
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
// Truffle DB is currently disabled by default; to enable it, change enabled:
|
// 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
|
// 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.
|
// 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
|
// $ truffle migrate --reset --compile-all
|
||||||
//
|
//
|
||||||
// db: {
|
// db: {
|
||||||
// enabled: false,
|
// enabled: false,
|
||||||
// host: '127.0.0.1',
|
// host: '127.0.0.1',
|
||||||
// adapter: {
|
// adapter: {
|
||||||
// name: 'sqlite',
|
// name: 'sqlite',
|
||||||
// settings: {
|
// settings: {
|
||||||
// directory: '.db'
|
// directory: '.db'
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue