2022-01-13 13:44:32 -08:00
|
|
|
require("dotenv").config({ path: ".env" });
|
|
|
|
const HDWalletProvider = require("@truffle/hdwallet-provider");
|
2020-08-06 14:32:31 -07:00
|
|
|
|
|
|
|
module.exports = {
|
2022-01-13 13:44:32 -08:00
|
|
|
networks: {
|
|
|
|
development: {
|
|
|
|
host: "127.0.0.1",
|
|
|
|
port: 8545,
|
|
|
|
network_id: "*",
|
|
|
|
},
|
2022-03-30 21:32:27 -07:00
|
|
|
// test network is the same as development but allows us to omit certain migrations
|
|
|
|
test: {
|
|
|
|
host: "127.0.0.1",
|
|
|
|
port: 8545,
|
|
|
|
network_id: "*",
|
|
|
|
},
|
2022-01-13 13:44:32 -08:00
|
|
|
mainnet: {
|
|
|
|
provider: () =>
|
|
|
|
new HDWalletProvider(
|
|
|
|
process.env.MNEMONIC,
|
|
|
|
`https://mainnet.infura.io/v3/` + process.env.INFURA_KEY
|
|
|
|
),
|
|
|
|
network_id: 1,
|
|
|
|
gas: 10000000,
|
2022-01-26 08:15:10 -08:00
|
|
|
gasPrice: 191000000000,
|
2022-01-13 13:44:32 -08:00
|
|
|
confirmations: 1,
|
|
|
|
timeoutBlocks: 200,
|
|
|
|
skipDryRun: false,
|
2020-08-14 15:09:48 -07:00
|
|
|
},
|
2022-01-13 13:44:32 -08:00
|
|
|
rinkeby: {
|
|
|
|
provider: () =>
|
|
|
|
new HDWalletProvider(
|
|
|
|
process.env.MNEMONIC,
|
|
|
|
`https://rinkeby.infura.io/v3/` + process.env.INFURA_KEY
|
|
|
|
),
|
|
|
|
network_id: 4,
|
|
|
|
gas: 5500000,
|
|
|
|
confirmations: 2,
|
|
|
|
timeoutBlocks: 200,
|
|
|
|
skipDryRun: true,
|
|
|
|
},
|
|
|
|
goerli: {
|
|
|
|
provider: () => {
|
|
|
|
return new HDWalletProvider(
|
|
|
|
process.env.MNEMONIC,
|
|
|
|
"https://goerli.infura.io/v3/" + process.env.INFURA_KEY
|
|
|
|
);
|
|
|
|
},
|
|
|
|
network_id: "5",
|
|
|
|
gas: 4465030,
|
|
|
|
gasPrice: 10000000000,
|
|
|
|
},
|
|
|
|
binance: {
|
|
|
|
provider: () => {
|
|
|
|
return new HDWalletProvider(
|
|
|
|
process.env.MNEMONIC,
|
|
|
|
"https://bsc-dataseed.binance.org/"
|
|
|
|
);
|
|
|
|
},
|
|
|
|
network_id: "56",
|
|
|
|
gas: 70000000,
|
|
|
|
gasPrice: 8000000000,
|
|
|
|
},
|
2022-01-26 08:15:10 -08:00
|
|
|
binance_testnet: {
|
2022-03-30 21:32:27 -07:00
|
|
|
provider: () =>
|
|
|
|
new HDWalletProvider(
|
|
|
|
process.env.MNEMONIC,
|
|
|
|
"https://data-seed-prebsc-1-s1.binance.org:8545/"
|
|
|
|
),
|
2022-01-26 08:15:10 -08:00
|
|
|
network_id: "97",
|
|
|
|
gas: 70000000,
|
|
|
|
gasPrice: 8000000000,
|
|
|
|
},
|
|
|
|
polygon: {
|
|
|
|
provider: () => {
|
|
|
|
return new HDWalletProvider(
|
|
|
|
process.env.MNEMONIC,
|
|
|
|
"https://polygon-rpc.com"
|
|
|
|
);
|
|
|
|
},
|
|
|
|
network_id: "137",
|
|
|
|
gas: 10000000,
|
|
|
|
gasPrice: 700000000000,
|
|
|
|
},
|
|
|
|
mumbai: {
|
|
|
|
provider: () => {
|
|
|
|
return new HDWalletProvider(
|
|
|
|
process.env.MNEMONIC,
|
2022-03-30 21:32:27 -07:00
|
|
|
"https://polygon-mumbai.infura.io/v3/" + process.env.INFURA_KEY
|
|
|
|
);
|
2022-01-26 08:15:10 -08:00
|
|
|
},
|
|
|
|
network_id: "80001",
|
|
|
|
},
|
|
|
|
avalanche: {
|
|
|
|
provider: () => {
|
|
|
|
return new HDWalletProvider(
|
|
|
|
process.env.MNEMONIC,
|
|
|
|
"https://api.avax.network/ext/bc/C/rpc"
|
|
|
|
);
|
|
|
|
},
|
|
|
|
network_id: "43114",
|
|
|
|
gas: 8000000,
|
|
|
|
gasPrice: 26000000000,
|
|
|
|
},
|
|
|
|
fuji: {
|
2022-03-30 21:32:27 -07:00
|
|
|
provider: () =>
|
|
|
|
new HDWalletProvider(
|
|
|
|
process.env.MNEMONIC,
|
|
|
|
"https://api.avax-test.network/ext/bc/C/rpc"
|
|
|
|
),
|
2022-01-26 08:15:10 -08:00
|
|
|
network_id: "43113",
|
|
|
|
},
|
2022-01-13 13:44:32 -08:00
|
|
|
oasis: {
|
|
|
|
provider: () => {
|
|
|
|
return new HDWalletProvider(
|
|
|
|
process.env.MNEMONIC,
|
|
|
|
"https://emerald.oasis.dev/"
|
|
|
|
);
|
|
|
|
},
|
|
|
|
network_id: 42262,
|
|
|
|
gas: 4465030,
|
|
|
|
gasPrice: 30000000000,
|
|
|
|
},
|
2022-01-31 12:48:37 -08:00
|
|
|
aurora: {
|
|
|
|
provider: () => {
|
|
|
|
return new HDWalletProvider(
|
|
|
|
process.env.MNEMONIC,
|
|
|
|
"https://mainnet.aurora.dev"
|
|
|
|
);
|
|
|
|
},
|
2022-04-09 05:06:10 -07:00
|
|
|
network_id: 0x4e454152,
|
|
|
|
from: "DEPLOYER_PUBLIC_KEY_HERE",
|
2022-01-31 12:48:37 -08:00
|
|
|
},
|
|
|
|
aurora_testnet: {
|
|
|
|
provider: () => {
|
|
|
|
return new HDWalletProvider(
|
|
|
|
process.env.MNEMONIC,
|
|
|
|
"https://testnet.aurora.dev"
|
2022-03-30 21:32:27 -07:00
|
|
|
);
|
2022-01-31 12:48:37 -08:00
|
|
|
},
|
|
|
|
network_id: 0x4e454153,
|
2022-03-15 07:41:10 -07:00
|
|
|
gas: 10000000,
|
|
|
|
from: "0xFFcf8FDEE72ac11b5c542428B35EEF5769C409f0", // public key
|
2022-01-31 12:48:37 -08:00
|
|
|
},
|
2022-02-28 13:32:22 -08:00
|
|
|
fantom: {
|
|
|
|
provider: () => {
|
|
|
|
return new HDWalletProvider(
|
|
|
|
process.env.MNEMONIC,
|
|
|
|
"https://rpc.ftm.tools/"
|
2022-03-30 21:32:27 -07:00
|
|
|
);
|
2022-02-28 13:32:22 -08:00
|
|
|
},
|
|
|
|
network_id: 250,
|
|
|
|
gas: 8000000,
|
|
|
|
gasPrice: 3000000000000,
|
|
|
|
timeoutBlocks: 15000,
|
|
|
|
},
|
2022-01-31 12:48:37 -08:00
|
|
|
fantom_testnet: {
|
|
|
|
provider: () => {
|
|
|
|
return new HDWalletProvider(
|
|
|
|
process.env.MNEMONIC,
|
|
|
|
"https://rpc.testnet.fantom.network/"
|
2022-03-30 21:32:27 -07:00
|
|
|
);
|
2022-01-31 12:48:37 -08:00
|
|
|
},
|
|
|
|
network_id: 0xfa2,
|
|
|
|
gas: 4465030,
|
|
|
|
gasPrice: 300000000000,
|
|
|
|
},
|
2022-05-02 11:28:17 -07:00
|
|
|
karura: {
|
|
|
|
provider: () => {
|
|
|
|
return new HDWalletProvider(
|
|
|
|
process.env.MNEMONIC,
|
|
|
|
// To use this local host, needed to run this: ENDPOINT_URL=wss://karura-rpc-1.aca-api.network npx @acala-network/eth-rpc-adapter@latest
|
|
|
|
"http://localhost:8545"
|
|
|
|
//"https://eth-rpc-karura.aca-api.network/"
|
|
|
|
);
|
|
|
|
},
|
|
|
|
network_id: 686,
|
|
|
|
gasPrice: "0x2f7e8803ea",
|
|
|
|
gasLimit: "0x329b140",
|
|
|
|
gas: "0x329b140",
|
|
|
|
},
|
2022-03-03 13:40:32 -08:00
|
|
|
karura_testnet: {
|
|
|
|
provider: () => {
|
|
|
|
return new HDWalletProvider(
|
|
|
|
process.env.MNEMONIC,
|
|
|
|
"http://103.253.145.222:8545"
|
|
|
|
);
|
|
|
|
},
|
|
|
|
network_id: 686,
|
|
|
|
gasPrice: 202184721385,
|
|
|
|
gasLimit: 117096000,
|
|
|
|
gas: 117096000,
|
|
|
|
},
|
|
|
|
acala_testnet: {
|
|
|
|
provider: () => {
|
|
|
|
return new HDWalletProvider(
|
|
|
|
process.env.MNEMONIC,
|
|
|
|
"http://157.245.252.103:8545"
|
|
|
|
);
|
|
|
|
},
|
|
|
|
network_id: 787,
|
|
|
|
gasPrice: 202184721385,
|
|
|
|
gasLimit: 213192000,
|
|
|
|
gas: 213192000,
|
|
|
|
},
|
2022-04-04 15:11:03 -07:00
|
|
|
klaytn_testnet: { // Note that Klaytn works with version 5.3.14 of truffle, but not some of the newer versions.
|
|
|
|
provider: () => {
|
|
|
|
return new HDWalletProvider(
|
|
|
|
process.env.MNEMONIC,
|
|
|
|
"https://api.baobab.klaytn.net:8651/"
|
|
|
|
);
|
|
|
|
},
|
|
|
|
network_id: '1001',
|
|
|
|
gas: '8500000',
|
|
|
|
gasPrice: null
|
|
|
|
},
|
2022-04-28 09:20:38 -07:00
|
|
|
celo: {
|
|
|
|
provider: () => {
|
|
|
|
return new HDWalletProvider(
|
|
|
|
process.env.MNEMONIC,
|
|
|
|
"https://forno.celo.org"
|
|
|
|
)
|
|
|
|
},
|
|
|
|
network_id: 42220,
|
2022-05-12 09:12:40 -07:00
|
|
|
gas: 8000000,
|
|
|
|
gasPrice: null
|
2022-04-28 09:20:38 -07:00
|
|
|
},
|
|
|
|
celo_alfajores_testnet: {
|
|
|
|
provider: () => {
|
|
|
|
return new HDWalletProvider(
|
|
|
|
process.env.MNEMONIC,
|
|
|
|
"https://alfajores-forno.celo-testnet.org"
|
|
|
|
)
|
|
|
|
},
|
|
|
|
network_id: 44787,
|
|
|
|
},
|
2022-05-10 08:23:07 -07:00
|
|
|
moonbeam_testnet: {
|
|
|
|
provider: () => {
|
|
|
|
return new HDWalletProvider(
|
|
|
|
process.env.MNEMONIC,
|
|
|
|
"https://rpc.api.moonbase.moonbeam.network"
|
|
|
|
);
|
|
|
|
},
|
|
|
|
network_id: 1287,
|
|
|
|
gasPrice: 3000000000, // 3.0 gwei
|
|
|
|
timeoutBlocks: 15000,
|
|
|
|
},
|
2022-01-13 13:44:32 -08:00
|
|
|
},
|
2020-08-06 14:32:31 -07:00
|
|
|
|
2022-01-13 13:44:32 -08:00
|
|
|
compilers: {
|
|
|
|
solc: {
|
|
|
|
version: "0.8.4",
|
|
|
|
settings: {
|
|
|
|
optimizer: {
|
|
|
|
enabled: true,
|
|
|
|
runs: 200,
|
|
|
|
},
|
|
|
|
},
|
2020-08-06 14:32:31 -07:00
|
|
|
},
|
2022-01-13 13:44:32 -08:00
|
|
|
},
|
2020-08-17 14:01:59 -07:00
|
|
|
|
2022-01-13 13:44:32 -08:00
|
|
|
plugins: ["@chainsafe/truffle-plugin-abigen", "truffle-plugin-verify"],
|
2021-07-20 10:59:56 -07:00
|
|
|
|
2022-01-13 13:44:32 -08:00
|
|
|
api_keys: {
|
|
|
|
etherscan: process.env.ETHERSCAN_KEY,
|
|
|
|
},
|
2020-08-06 14:32:31 -07:00
|
|
|
};
|