Ethereum Boilerplate Questions

did you add the appId and serverUrl yet?

Continuing the discussion from Ethereum Boilerplate Questions:

When I try to ‘yarn start’ to start the development server it gives me:
src\components\Wallet\index.js
Line 1:36: Delete prettier/prettier

src\helpers\formatters.js
Line 1:51: Delete prettier/prettier
and so on of the same delete text
How do I fix this?

try to yarn format

open parttierignore and add this line

src/

Awesome Boilerplate, how can you add filter on marketplace page to only show only those NFTs which are on sale

yes i did add them saved the file and still no changes

Hi, I’m not sure if this has already been reported but I think there’s a small bug.

If you authenticate once and then disconnect manually from Metamask (like in this snapshot https://ibb.co/pnHrBRm), then each time you refresh the page appears the Metamask’s connection popup.

As expected, this doesn’t happen if you disconnect using the custom “Disconnect wallet” button (https://ibb.co/V9Zk6NY)

i want to use moralis-sdk on react-native. But it always give me below error:
TypeError: Cannot read properties of undefined (reading ‘useMoralis’)

You can find my code below:
import { useMoralis } from “react-moralis”;


const { isWeb3Enabled, enableWeb3, isAuthenticated, isWeb3EnableLoading, web3, user, chainId } = useMoralis();
let web3Provider;
if (!isWeb3Enabled) {
web3Provider = await enableWeb3();
const web3Js = new Web3(web3Provider);
}

I have the same error, trying to understand why I get it…

    setIsPending(true);
    const txStatus = await Moralis.transfer(options);
    console.log(txStatus)

    txStatus
      .on("transactionHash", (hash) => {
        openNotification({
          message: "🔊 New Transaction",
          description: `${hash}`,
        });
        console.log("🔊 New Transaction", hash);
      })
      .on("receipt", (receipt) => {
        openNotification({
          message: "📃 New Receipt",
          description: `${receipt.transactionHash}`,
        });
        console.log("🔊 New Receipt: ", receipt);
        setIsPending(false);
      })
      .on("error", (error) => {
        openNotification({
          message: "📃 Error",
          description: `${error.message}`,
        });
        console.error(error);
        setIsPending(false);
      });
  }

Moralis - 1.3.2
React-Moralis - 1.3.1
Server Version - 0.0.347

Hi,

I’m also following the boilerplate for a standard javascript app and when I try to log in/out the user I have an error : “TypeError: e is not a function”. It seems to come from jquery but I don’t understand why I have this while it’s working fine with react.

Anyone face this problem ?

Hello , i am getting this error:

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 (C:\DEV\ethereum-boilerplate\node_modules\webpack\lib\util\createHash.js:135:53)
at NormalModule._initBuildHash (C:\DEV\ethereum-boilerplate\node_modules\webpack\lib\NormalModule.js:417:16)
at handleParseError (C:\DEV\ethereum-boilerplate\node_modules\webpack\lib\NormalModule.js:471:10)
at C:\DEV\ethereum-boilerplate\node_modules\webpack\lib\NormalModule.js:503:5
at C:\DEV\ethereum-boilerplate\node_modules\webpack\lib\NormalModule.js:358:12
at C:\DEV\ethereum-boilerplate\node_modules\loader-runner\lib\LoaderRunner.js:373:3
at iterateNormalLoaders (C:\DEV\ethereum-boilerplate\node_modules\loader-runner\lib\LoaderRunner.js:214:10)
at iterateNormalLoaders (C:\DEV\ethereum-boilerplate\node_modules\loader-runner\lib\LoaderRunner.js:221:10)
C:\DEV\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 (C:\DEV\ethereum-boilerplate\node_modules\webpack\lib\util\createHash.js:135:53)
at NormalModule._initBuildHash (C:\DEV\ethereum-boilerplate\node_modules\webpack\lib\NormalModule.js:417:16)
at C:\DEV\ethereum-boilerplate\node_modules\webpack\lib\NormalModule.js:452:10
at C:\DEV\ethereum-boilerplate\node_modules\webpack\lib\NormalModule.js:323:13
at C:\DEV\ethereum-boilerplate\node_modules\loader-runner\lib\LoaderRunner.js:367:11
at C:\DEV\ethereum-boilerplate\node_modules\loader-runner\lib\LoaderRunner.js:233:18
at context.callback (C:\DEV\ethereum-boilerplate\node_modules\loader-runner\lib\LoaderRunner.js:111:13)
at C:\DEV\ethereum-boilerplate\node_modules\react-scripts\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.2.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

for yarn start .

hey, when do you get this error ? is it when you do yarn or when you try to start it ?
and if it is when you try to. do yarn , try it with node v16.13.0

1 Like

See my post in Ethereum React Native Boilerplate Questions

Repeated here:

I found another solution, given in StackOverflow :

I added the following to node_modules\react-scripts\config\webpack.config.js
(i did at line 77…)

const crypto = require("crypto");
const crypto_orig_createHash = crypto.createHash;
crypto.createHash = algorithm => crypto_orig_createHash(algorithm == "md4" ? "sha256" : algorithm);

and then “yarn start” runs without problems

1 Like

https://ethereum-boilerplate.github.io/ethereum-boilerplate/nftBalance I am following this tutorial on youtube https://www.youtube.com/watch?v=WZWCzsB1xUE
However, I can’t seem to find the link to where he got the smartcontract used in the tutorial.
He said he’d drop the link in the description section but didn’t.

Thank you very much for your reply. I have changed the node version and this time it opened the page but it still doesn’t show the platform and it gives me this errors , maybe its something basic but I am really new to this and I appreciate the hellp.

src\hooks\useIPFS.js
Line 1:31: Delete prettier/prettier
Line 2:33: Delete prettier/prettier
Line 3:54: Delete prettier/prettier
Line 4:68: Delete prettier/prettier
Line 5:5: Delete prettier/prettier
Line 6:1: Delete prettier/prettier
Line 7:26: Delete prettier/prettier
Line 8:3: Delete prettier/prettier

src\hooks\useInchDex.js
Line 1:45: Delete prettier/prettier
Line 2:44: Delete prettier/prettier
Line 3:1: Delete prettier/prettier
Line 4:32: Delete prettier/prettier
Line 5:45: Delete prettier/prettier
Line 6:48: Delete prettier/prettier
Line 7:1: Delete prettier/prettier
Line 8:20: Delete prettier/prettier
Line 9:57: Delete prettier/prettier
Line 10:28: Delete prettier/prettier
Line 11:37: Delete prettier/prettier
Line 12:54: Delete prettier/prettier
Line 13:41: Delete prettier/prettier
Line 14:1: Delete prettier/prettier
Line 15:37: Delete prettier/prettier
Line 16:42: Delete prettier/prettier
Line 17:80: Delete prettier/prettier
Line 18:80: Delete prettier/prettier
Line 19:79: Delete prettier/prettier
Line 20:35: Delete prettier/prettier
Line 21:27: Delete prettier/prettier
Line 22:35: Delete prettier/prettier
Line 23:20: Delete prettier/prettier
Line 24:8: Delete prettier/prettier
Line 25:1: Delete prettier/prettier
Line 26:35: Delete prettier/prettier
Line 27:53: Delete prettier/prettier
Line 28:40: Delete prettier/prettier
Line 29:18: Delete prettier/prettier
Line 30:26: Delete prettier/prettier
Line 31:18: Delete prettier/prettier
Line 32:78: Delete prettier/prettier
Line 33:36: Delete prettier/prettier
Line 34:24: Delete prettier/prettier
Line 35:69: Delete prettier/prettier
Line 36:77: Delete prettier/prettier
Line 37:55: Delete prettier/prettier
Line 38:18: Delete prettier/prettier

Thank you.

Try yarn format :raised_hands:

It finally worked thist time :))

but i still can`t see the platform.

Hi

I am doing the JS-DEX course and I installed the boinerplate for my first test project I want to build a react DEX with Wallet using the poilerplate.

I have created a react create app and I just want to copy over the DEX & Wallet from the boilerplate.

Please can someone help understand which files I need to copy over and where so I can give it a go sorry I’m a total newbie.

Hi, I was getting the following errors fresh out of the box after setting up.

Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in a useEffect cleanup function.
    at AssetSelector

and

Uncaught Error: invalid BigNumber value (argument="value", value=undefined, code=INVALID_ARGUMENT, version=bignumber/5.5.0)

Both only happen in the Wallet component (no errors if I disable wallet component) and only show up when I’ve connected using Metamask (on test networks). Browser window goes blank during such times.

Any help would be appreciated, thanks.

1 Like

what do you mean cedro more details