Have you run āyarn installā?
Thanks Ivan. I re-ran a āyarn installā and then āyarn startā and it opened up in local host but the live server in VSCode doesnāt work. Will you bring any burner wallets and in dapp faucets to the boilerplate like in scaffold eth? would be great to not worry about users/addresses or finding faucets online.
binance smart chain not working in the boilerplate once i connect to binance smart chain the dex disappears how do i fix it
i got this error
PS C:\Users\User\Desktop\wff daps\ethereum-boilerplate-main> npx yarn install
yarn install v1.22.17
[1/4] Resolving packagesā¦
[2/4] Fetching packagesā¦
error Couldnāt find the binary git
Hi @joaoalvesmarrucho. You can ignore the first message, but the second is a problem with Mumbai RPC. I suggest you to edit the src/helpers/networks.js
config and change the Mumbai RPC to Speedy Node:
You need to change:
"0x13881": {
chainId: 80001,
chainName: "Mumbai",
currencyName: "MATIC",
currencySymbol: "MATIC",
rpcUrl: "https://speedy-nodes-nyc.moralis.io/YOURSPEEDYNODE/polygon/mumbai",
blockExplorerUrl: "https://mumbai.polygonscan.com/",
},
Hello,
Iām having this error after I cloned a fork of the Boilerplate:
I did follow all the steps: cloned, npm install, created .env with my app id and server url, npm start.
Whatās weird is that the same project works for one but not for meā¦
Updated the server too, same. Version issue maybeā¦
Hi! It workedā¦
Thanks but why?
src\components\AddressInput.jsx
Line 14:6: React Hook useEffect has missing dependencies: āpropsā and āvalidatedAddressā. Either include them or remove the dependency array. However, āpropsā will change when any prop changes, so the preferred fix is to destructure the āpropsā object outside of the useEffect call and refer to those specific props inside useEffect react-hooks/exhaustive-deps
Search for the keywords to learn more about each warning.
To ignore, add // eslint-disable-next-line to the line before.
Hey @mejmerlin !
You can ignore these warnings. We will remove them in the next update. If you want to do it yourself
add
// eslint-disable-next-line react-hooks/exhaustive-deps
into AddressInput.jsx located in src/components between line 13 and 14.
npm run devchain
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path C:\Users\User\OneDrive\Desktop\dapp/package.json
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, open āC:\Users\User\OneDrive\Desktop\dapp\package.jsonā
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\User\AppData\Local\npm-cache_logs\2021-11-13T17_25_43_525Z-debug.log
What are you trying to dir sir ?
starting a local devchain and i stumble into this
npm run devchain
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path C:\Users\User\OneDrive\Desktop\dapp/package.json
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, open āC:\Users\User\OneDrive\Desktop\dapp\package.jsonā
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\User\AppData\Local\npm-cache_logs\2021-11-13T17_25_43_525Z-debug.log
I see people having issues with npm and the boilerplate .
Clone the repo again and use
yarn install
Then
yarn run start
Web Bundling complete 19183ms
./node_modules/@ui-kitten/components/ui/input/input.component.js 105:38
Module parse failed: Unexpected token (105:38)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| this.webEventResponder = devsupport_1.WebEventResponder.create(this);
| this.focus = () => {
this.textInputRef.current?.focus();
| };
| this.blur = () => {
./node_modules/@ui-kitten/components/ui/tab/tabBar.component.js 137:37
Module parse failed: Unexpected token (137:37)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| }
| scrollToIndex(params) {
this.tabIndicatorRef.current?.scrollToIndex(params);
| }
| scrollToOffset(params) {
./node_modules/@ui-kitten/components/ui/popover/popover.component.js 148:38
Module parse failed: Unexpected token (148:38)
is there any workaround to fix this?
Thank you for the great work
Hi @mrhigh3r
It looks like a problem because of the third-party library @ui-kitten
. If you share your full code repo we will be able to check it
Intro
@MoralisTeam, thanks for creating this boilerplate. Iām working on my first project as part of Chainlink hackathon, and your boilerplate has been most helpful.
Wanted to share an issue I ran into. Maybe it will help others, and wondering whatās the ārightā way to address the issue.
Details
I have a simple ERC1155 contract, and wanted to replace the MetaCoin example in boilerplate -> Contracts with my own. So I created an abi (using hardhat-abi-exporter), and then replicated most of what I saw in src/contracts/contractInfo.json
.
It mostly worked. However I noticed that functions with array inputs didnāt work. For example, the standard balanceOf(address, uint256)
worked, but balanceOfBatch(address[], uint256[])
suffered from 2 errors related to parameters that were arrays:
- The
uint256[]
was causing an āparam.map is not a function errorā - The
address[]
was causing an invalid argugment error
I tracked this down to node_modules/web3-eth-abi/lib/index.js
the function is ABICoder.prototype.formatParam
, and observed that:
- The code has regex to identify integer arrays, and attempts to process them. But it assumes the param IS an array, and calls param.map. The form input from Contracts UI is not an array, itās a string. Here are code snippets:
// I'm snipping relevant code from ABICoder.prototype.formatParam
const paramTypeBytesArray = new RegExp(/^bytes([0-9]*)\[\]$/);
const paramTypeNumberArray = new RegExp(/^(u?int)([0-9]*)\[\]$/);
if (type.match(paramTypeBytesArray) || type.match(paramTypeNumberArray)) {
return param.map(p => this.formatParam(type.replace('[]', ''), p));
}
- The code had no awareness of
address[]
, and was treating these as a string. When the call is evenutally made to the Contract, I suspect this invalid argument is triggered.
End
I temporarily confirmed / got around this issue by making some changes to web3-eth-abi code. I know this isnāt the right solution. But it did allow me to confirm the issue, and I was able to successfully call my contract functions that needed array inputs.
Iām wondering if the Contract.jsx or some other ethereum-boilerplate code changes to better support arrays in Contracts UI. Apologies, Iām new to React as well, and so donāt have an informed comment on this. Still trying to wrap my head around everything.
Thanks again team, Iām really enjoying the Moralis features as I work on my hackathon project!
NFTs arenāt showing anymore. It worked fine until yesterday. I started again from scratch and still doesnāt work. Logs show the array is empty, so it doesnāt get any NFTs to begin with.