1

I have seen two usages over the internet

1.

const ganache = require("ganache-cli");
web3.setProvider(ganache.provider());

2.

const ganache = require("ganache-core");
web3.setProvider(ganache.provider());

What is the main differene in these two cases. I know that ganache-cli utilizes ganache-core. What is the addon that ganache-cli is providing.

1

Ganache github clearly mentions below statement.

ganache-cli utilizes ganache-core internally, which is distributed with optional native dependencies for increased performance. If these native dependencies fail to install on your system ganache-cli will automatically fallback to ganache-core’s pre-bundled JavaScript build.

You can use ganache-core as well but depending on your system you may get better performance using ganache-cli .

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.