-
Notifications
You must be signed in to change notification settings - Fork 1
/
truffle-config.js
44 lines (37 loc) · 1.2 KB
/
truffle-config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
const ContractKit = require("@celo/contractkit");
const Web3 = require("web3");
// Connect to the desired network
const web3 = new Web3("https://alfajores-forno.celo-testnet.org");
const kit = ContractKit.newKitFromWeb3(web3);
const getAccount = require("./utils/getAccount").getAccount;
async function awaitWrapper() {
let account = await getAccount();
console.log(`Account address: ${account.address}`);
kit.addAccount(account.privateKey);
}
awaitWrapper();
module.exports = {
// See <http://truffleframework.com/docs/advanced/configuration>
// to customize your Truffle configuration!
// The following line will put the compiled contracts and associated info at ./client/contracts
contracts_directory: "./src/contracts/",
contracts_build_directory: "./src/abis/",
networks: {
// Use the development network if you are using @celo/ganache-cli
// https://www.npmjs.com/package/@celo/ganache-cli
development: {
host: "127.0.0.1",
port: 8545,
network_id: "*",
},
alfajores: {
provider: kit.web3.currentProvider,
network_id: 44787,
gas: 4000000
},
mainnet: {
provider: kit.web3.currentProvider,
network_id: 42220,
},
},
};