Ethereum Boilerplate Questions

This is a thread to discuss the Ethereum Dapp Boilerplate (https://github.com/ethereum-boilerplate/ethereum-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!

15 Likes

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

3 Likes

COMPONENT SUGGESTION:: Crowdsale / Presale / ICO

Hi,

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.

9 Likes

Can you try to use :

npx yarn install

Or:

npm install
4 Likes

great idea it would be great component!

6 Likes

Thanks I appreciate it

1 Like

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

2 Likes

thanks :sweat_smile:

Failed to compile.

./src/components/NFTBalance.jsx
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.

2 Likes

Will be fixed with next commit.

For now please add:


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

to networks.js located in src/helpers

3 Likes

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) 
E:\Projects\MoralisTest\ethereum-boilerplate\node_modules\react-scripts\scripts\start.js:19
  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',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Node.js v17.0.1
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
PS E:\Projects\MoralisTest\ethereum-boilerplate>
1 Like

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

const APP_ID = process.env.REACT_APP_MORALIS_APPLICATION_ID;
const SERVER_URL = process.env.REACT_APP_MORALIS_SERVER_URL;
<MoralisProvider appId={APP_ID} serverUrl={SERVER_URL}>
      <MoralisDappProvider>

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