Comments (1)
Most of the minting dapps using Moralis use the MoralisProvider function.
https://github.com/kjmczk/nextjs-nft-mint-dapp/blob/main/pages/_app.tsx#L8
The problem is that the latest version of Moralis doesnt seem to work with react-moralis which provides the useWeb3ExecuteFunction, or at least is an anti pattern by loading 2 versions of the same library.
https://github.com/kjmczk/nextjs-nft-mint-dapp/blob/main/components/Mint.tsx#L43
Further the most recent version of moralis doesn't provide any contract write functions.
So how I got my minting working using this boilerplate is by using an unwrapped Web3 dependency.
import Web3 from 'web3';
const web3 = new Web3(Web3.givenProvider);
const contract = new web3.eth.Contract(nftAbi, contractAddress);
const response = await contract.methods
.mint(mintAmount, autoManifest)
.send({ from: user.address, value: mintPrice });
In conclusion, this repo is basically a readonly boilerplate. It would be nice to provide at least one write function in here for completeness. Otherwise consider renaming the repo: ethereum-readonly-boilerplate.
Closing for now.
from ethereum-boilerplate.
Related Issues (20)
- NX configuration
- [Component] NetworkSelect
- yarn start : command not found: set HOT 1
- [Component] HeaderTab
- [Component] HeaderTabs
- [Component] Header
- [UI] Layout HOT 2
- Add A Refresh Metadata Button. HOT 1
- Integrating with tailwindcss HOT 1
- Error with App.jsx file after compilation HOT 1
- Error 500 on Connect Wallet running on localhost HOT 2
- json parse bug HOT 2
- What's the purpose of the dotenv when you have next.config? HOT 10
- Yarn start ? HOT 6
- The engine "node" is incompatible with this module HOT 2
- Connect Wallet Button returning Connector not found. HOT 4
- Network HOT 2
- Yarn start returns error HOT 2
- Support for Blast network HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ethereum-boilerplate.