Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

METFaucet Deployment #1119

Open
mshearer0 opened this issue Mar 1, 2022 · 0 comments
Open

METFaucet Deployment #1119

mshearer0 opened this issue Mar 1, 2022 · 0 comments

Comments

@mshearer0
Copy link

To deploy to local Ganache I had to modify ethereumbook/code/truffle/METoken_METFaucet/migrations/2_deploy_contracts.js as:

var METoken = artifacts.require("METoken");
var METFaucet = artifacts.require("METFaucet");

module.exports = async function(deployer) {

        var accounts = await web3.eth.getAccounts();
        var owner = accounts[0];
        
        await deployer.deploy(METoken, {from: owner});
        await deployer.deploy(METFaucet, METoken.address, owner);
}

and replace web3.eth.accounts[1] with accounts[1] in the console commands.

truffle-config.js :

module.exports = {
       compilers: {
             solc: {
                   version: "0.4.24"
              }
        },

        networks: {
                ganache: { // Ganache local test RPC blockchain
                        network_id: "5777",
                        host: "localhost",
                        port: 7545,
                        gas: 6721975,
                }
        }
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant