- Docs: elven.tools/docs/minter-dapp-introduction.html
- Demo: dapp-demo.elven.tools
- Elven Tools intro (including the Dapp): youtu.be/Jou5jn8PFz8
The Dapp is built using Nextjs and a couple of helpful tools. It allows you to interact with the Elrond blockchain, smart contracts, and especially it is prepared for the Elven Tools Smart Contract. But you can always modify it and adjust for your needs.
- Auth with 4 Elrond blockchain providers
- Web Wallet
- Maiar mobile app
- Maiar DeFi browser extension
- Ledger Nano
- React hooks for making transactions
- React hooks for querying smart contracts
- Tools and React hooks for app state synchronization
- API endpoint rewrites and 'guard' middleware
- Preconfigured UI based on Chakra UI
- The template with sections mainly used on minter dapps (it will be developed further)
Login with one of four methods.
const { login, isLoggedIn, error, walletConnectUri, getHWAccounts } = useLogin();
(...)
login(LoginMethodsEnum.ledger)
Custom mint transactions for the Elven Tools Smart Contract. There is also more generic useScTransaction
hook.
const { mint, pending, transaction, error } = useMintTransaction();
(...)
mint(amount)
Query the Elven Tools Smart Contract. There is also more generic useScQuery
hook.
const {
data,
fetch,
isLoading,
} = useElvenScQuery<boolean>({
funcName: 'isAllowlistEnabled',
type: SCQueryType.BOOLEAN,
autoInit: false,
});
(...)
fetch()
For more docs on how to use it check the link above, and for more examples see: elven.tools/docs/dapp-react-hooks-and-components.html
- npm install -g elven-tools
- elven-tools init-dapp
- cd your-dapp-directory
- npm run dev
--- or ---
- clone or download the repo code
- cd elven-tools-dapp
- npm install
- configure .env.local (you can copy the contents of the .env.example)
- npm run dev
Check detailed docs on it here: How to start with the Dapp
- it works on Nextjs
- it uses the newest version of erdjs without the dapp-core library.
- it uses backend side rewrites to hide the API endpoint. The only exposed one is
/api
- it uses .env file - there is an example in the repo
- it uses chakra-ui
More docs on it: Minter Dapp introduction
- Example with auth verification on the backend side: elven-tools-dapp-with-auth thanks to @borispoehland