Ethereum Boilerplate Questions

Hey @bogdabart, I just checked the ethereum nft marketplace boilerplate and seems like you are missing these props on NFTTokenIds component

<Route path="/nftMarket">
   <NFTTokenIds inputValue={inputValue} setInputValue={setInputValue}/>
</Route>

Mysteriously started working lol. Just the Fiat on-ramp to figure out now.

Have you added your key to the plugin settings? Also please provide error message screenshots :man_mechanic:

Thanks. Where is the code for the smart contracts?

in the truffle folder

Thank you.

Now I am getting this error:

Error: A cross-origin error was thrown. React doesn’t have access to the actual error object in development. See https://reactjs.org/link/crossorigin-error for more information.

:arrow_forward: 13 stack frames were collapsed.

Module.

C:/Users/yonat/Downloads/ethereum-nft-marketplace-boilerplate-main/ethereum-nft-marketplace-boilerplate-main/src/index.js:33

  30 |   }  31 | };  32 | > 33 | ReactDOM.render(  34 |   // <React.StrictMode>  35 |   <Application />,  36 |   // </React.StrictMode>,

View compiled

Module…/src/index.js

http://localhost:3000/static/js/main.chunk.js:5728:30

webpack_require

C:/Users/yonat/Downloads/ethereum-nft-marketplace-boilerplate-main/ethereum-nft-marketplace-boilerplate-main/webpack/bootstrap:851

  848 |   849 | __webpack_require__.$Refresh$.init();  850 | try {> 851 | 	modules[moduleId].call(module.exports, module, module.exports, hotCreateRequire(moduleId));      | ^  852 | } finally {  853 | 	__webpack_require__.$Refresh$.cleanup(moduleId);  854 | }

View compiled

fn

C:/Users/yonat/Downloads/ethereum-nft-marketplace-boilerplate-main/ethereum-nft-marketplace-boilerplate-main/webpack/bootstrap:150

  147 | 		);  148 | 		hotCurrentParents = [];  149 | 	}> 150 | 	return __webpack_require__(request);      | ^  151 | };  152 | var ObjectFactory = function ObjectFactory(name) {  153 | 	return {

View compiled

1

http://localhost:3000/static/js/main.chunk.js:6254:18

webpack_require

C:/Users/yonat/Downloads/ethereum-nft-marketplace-boilerplate-main/ethereum-nft-marketplace-boilerplate-main/webpack/bootstrap:851

  848 |   849 | __webpack_require__.$Refresh$.init();  850 | try {> 851 | 	modules[moduleId].call(module.exports, module, module.exports, hotCreateRequire(moduleId));      | ^  852 | } finally {  853 | 	__webpack_require__.$Refresh$.cleanup(moduleId);  854 | }

View compiled

checkDeferredModules

C:/Users/yonat/Downloads/ethereum-nft-marketplace-boilerplate-main/ethereum-nft-marketplace-boilerplate-main/webpack/bootstrap:45

  42 | 	}  43 | 	if(fulfilled) {  44 | 		deferredModules.splice(i--, 1);> 45 | 		result = __webpack_require__(__webpack_require__.s = deferredModule[0]);     | ^  46 | 	}  47 | }  48 | 

View compiled

Array.webpackJsonpCallback [as push]

C:/Users/yonat/Downloads/ethereum-nft-marketplace-boilerplate-main/ethereum-nft-marketplace-boilerplate-main/webpack/bootstrap:32

  29 | 	deferredModules.push.apply(deferredModules, executeModules || []);  30 |   31 | 	// run deferred modules when all chunks ready> 32 | 	return checkDeferredModules();     | ^  33 | };  34 | function checkDeferredModules() {  35 | 	var result;

View compiled

(anonymous function)

http://localhost:3000/static/js/main.chunk.js:1:93

Help please, i added uniswapv3core and periphery to the boilerplate and i tried yarn start but i’m prompt to install typescript. should i go on?

Hi @mejmerlin

You can install typescript, but you also should allow js, jsx in the typescript config. So your tsconfig.json will be like this:

{
  "compilerOptions": {
    "allowJs": true,
    "jsx": "react-jsx",
     // other settings
  },
}

Hi @John

You should ask questions about nft-marketplace here: https://forum.moralis.io/t/cloning-opensea-nft-boilerplate-questions

Please follow the quickstart steps. You need to add your contract ABI and contract address like this:

const [contractABI, setContractABI] = useState([abi: "abi"]);
const [marketAddress, setMarketAddress] = useState("0x12...ssdgf");

Hi!
is it possible to upload this to my own hosting and domain?
Thx!

Hi @Baldal

Yes, you can upload it to your own hosting. It’s better to find instructions how to upload app on your hosting site

localhost works perfectly. So isn’t it all I have to do to put the files in storage? will it work that way?

Hello @Baldal yes it is, but keep in mind you need to host the production version of your app by running npm run build or yarn build and run the build version instead of the dev version you use in npm run start or yarn start.

Hi guys,
The setup Moralis/Ganache/Boilerplate works in the background (I can do contracts through terminal) but I have issues with the Boilerplate. see attached
Metamask is connected.
When I use the local chain ‘Token Balances’ doesn’t have a table and with the Ethereum network it does show a table but without any tokens.
Any help is appreciated.

Seems a chain reference is missing on the local network. Any idea what the chain reference must be and where to set in the VS code project?
Screenshot 3

Has the instructions been created? It would be great if this was a YouTube training like your others!

I would also like to know the answer to this. Please help :slight_smile:

What is the status of this? Thank you!

Hi @cstanleyhns @BooneBergsma

Please update your boilerplate version and follow instructions https://github.com/ethereum-boilerplate/ethereum-boilerplate/blob/main/README.md#dex-

For example you can create an object customTokens in App.jsx with custom tokens and provide them as props to <DEX customTokens={customTokens} /> component

1 Like

I believe today/tomorrow this feature will be finally released :raised_hands:

1 Like

Great questions! I am learning JS and Solidity now and coming from a WordPress background. I am trying think about how to reverse engineer the boilerplate for WP. The Moralis DAO should really be thinking about how they can make it easy for one of the largest pool of developers to take part in Web3 by making a WordPress plugin or template. And would also love to see it work well with Elementor. You would see massive growth in your platform if you empower the WP community to build on web3.0