Ethereum Boilerplate Questions

This is a thread to discuss the Ethereum Dapp Boilerplate ( we covered on YouTube. This boilerplate is very popular and it’s important that you fully understand how to use it in your projects.

We are here to help! If you have any questions about how to use it or how to set it up you can ask here!


Where do I install dependencies? I’m getting this error

COMPONENT SUGGESTION:: Crowdsale / Presale / ICO


Awesome work you all are doing at Moralis and this Boilerplate is pure genius.

I have a request for a component thus:

A crowdsale mechanism that can be used for token presales or to launch project tokens or raise funds for new (or existing) tokens. Will be very useful for small projects holding ICOs or IDOs.

The component could be Basically a field where an investor can fill in how much they want to pay or how many tokens they want to buy. Then they connect their wallet and the payment is deducted from their wallet while the bought tokens are sent automatically to their wallet.

In the configurations the admin will be able to

  1. specify the wallet address that holds the coins being sold from which they will be sent to buyers

  2. Specify the wallet address to receive the payments from buyers

  3. Specify the currency to be used in buying, the name of the new token being launched and exchange rate e.g 1 BNB to 100,000 MyToken

  4. As the investor types how much they want to pay or how many they want to buy, the exchange rate is automatically calculated and the tokens they will get (or amount they have to pay) is displayed and updated real time.

Hope my explanations are clear enough and hope you consider such a component because it will be very useful for many small teams who are launching projects with limited funding.

Thanks a lot and GO GO GO MORALISSSSSSSSSS. I hope to one day be an expert in Moralis because I think its a game changer.


Can you try to use :

npx yarn install


npm install

great idea it would be great component!


Thanks I appreciate it

Im getting this error. I have git & node.js installed.

did you try npx yarn install?

yes i did, but i got this error

then you can try this first: npm install --global yarn

does this mean i installed node.js incorrectly?

Here is the node version

you should not run those commands after you started node, you should run them directly from terminal

1 Like

thanks :sweat_smile:

Failed to compile.

Attempted import error: ‘getExplorer’ is not exported from ‘helpers/networks’.

Also, could please share how to use the cloud functions setup in the project to get the API calls.

1 Like

Will be fixed with next commit.

For now please add:

export const getExplorer = (chain) => networkConfigs[chain]?.blockExplorerUrl

to networks.js located in src/helpers


Trying to test the dex tool on BSC. It’s saying I need to update my InchDex settings?

Hey there don’t really know what i did wrong but somehow i get this after “yarn start”. Node.js version is 17.0.1 might that be the problem?

Starting the development server...

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:67:19)
    at Object.createHash (node:crypto:130:10)
    at module.exports (E:\Projects\MoralisTest\ethereum-boilerplate\node_modules\webpack\lib\util\createHash.js:135:53)
    at NormalModule._initBuildHash (E:\Projects\MoralisTest\ethereum-boilerplate\node_modules\webpack\lib\NormalModule.js:417:16)
    at handleParseError (E:\Projects\MoralisTest\ethereum-boilerplate\node_modules\webpack\lib\NormalModule.js:471:10)
    at E:\Projects\MoralisTest\ethereum-boilerplate\node_modules\webpack\lib\NormalModule.js:503:5
    at E:\Projects\MoralisTest\ethereum-boilerplate\node_modules\webpack\lib\NormalModule.js:358:12
    at E:\Projects\MoralisTest\ethereum-boilerplate\node_modules\loader-runner\lib\LoaderRunner.js:373:3
    at iterateNormalLoaders (E:\Projects\MoralisTest\ethereum-boilerplate\node_modules\loader-runner\lib\LoaderRunner.js:214:10) 
    at iterateNormalLoaders (E:\Projects\MoralisTest\ethereum-boilerplate\node_modules\loader-runner\lib\LoaderRunner.js:221:10) 
  throw err;

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:67:19)
    at Object.createHash (node:crypto:130:10)
    at module.exports (E:\Projects\MoralisTest\ethereum-boilerplate\node_modules\webpack\lib\util\createHash.js:135:53)
    at NormalModule._initBuildHash (E:\Projects\MoralisTest\ethereum-boilerplate\node_modules\webpack\lib\NormalModule.js:417:16)
    at E:\Projects\MoralisTest\ethereum-boilerplate\node_modules\webpack\lib\NormalModule.js:452:10
    at E:\Projects\MoralisTest\ethereum-boilerplate\node_modules\webpack\lib\NormalModule.js:323:13
    at E:\Projects\MoralisTest\ethereum-boilerplate\node_modules\loader-runner\lib\LoaderRunner.js:367:11
    at E:\Projects\MoralisTest\ethereum-boilerplate\node_modules\loader-runner\lib\LoaderRunner.js:233:18
    at context.callback (E:\Projects\MoralisTest\ethereum-boilerplate\node_modules\loader-runner\lib\LoaderRunner.js:111:13)     
    at E:\Projects\MoralisTest\ethereum-boilerplate\node_modules\babel-loader\lib\index.js:59:103 {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',

Node.js v17.0.1
error Command failed with exit code 1.
info Visit for documentation about this command.
PS E:\Projects\MoralisTest\ethereum-boilerplate>

I´m having the error after “yarn start”:

Failed to compile

./src/components/NFTBalance.jsxAttempted import error: 'getExplorer' is not exported from 'helpers/networks'.

Any idea how to solve this? I´m using Ubuntu 20.04.2 LTS on Windows WSL. Thanks!

Hi could someone help me figure out how to hide the API keys? I have installed dotenv

<MoralisProvider appId={APP_ID} serverUrl={SERVER_URL}>

and I have created a env file with the keys in it. Any help is appreciated thanks.