GithubHelp home page GithubHelp logo

Comments (5)

ylv-io avatar ylv-io commented on May 28, 2024 1

I think we should provide utility function with defaults and other option as a comment:

const configTestNetwok = (network, path = "m/44'/60'/0'/0/", gas = 4465030, gasPrice = 10000000000) => ({
  provider: () => new HDWalletProvider(
    process.env.DEV_MNEMONIC, `https://${network}.infura.io/v3/` + infuraProjectId, 
        0, 1, true, path
    ),
  networkId: 3,
  gas: gas,
  gasPrice: gasPrice,
});

ropsten: configTestNetwok('ropsten'),
// support MyEtherWallet
// ropsten: configTestNetwok('ropsten', "m/44'/1'/0'/0/"),

Something like this.

from starter-kit.

itinance avatar itinance commented on May 28, 2024 1

Sounds good. We still need to take into account the networkId as well as parameter because it has an own value for each network (as you certainly know). I will give it a try tomorrow (CET)

from starter-kit.

ylv-io avatar ylv-io commented on May 28, 2024

Hey @itinance. Thanks again for the contribution. One thing I've spotted that metamask is also using a m/44'/60'/0'/0/ derivation path. And a lot of users do use metamask for testnet. I think we should give users options here. What do you think?

from starter-kit.

itinance avatar itinance commented on May 28, 2024

Whew... that's really a pitty from Metamask. Seems to be more helpful if we leave the code as is and just add a note about it describing the right derivation path for MyCrypto users as a comment.

Or add more records network-config for "ropsten_mycrypto", "kovan_mycrypto"? What would you prefer? I will add these changes then into this PR

from starter-kit.

ylv-io avatar ylv-io commented on May 28, 2024

I've refactored truffle-config so it is easy to config it.

from starter-kit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.