This serves as a basic example of how a token administrator can mint more tokens on Soroban.
You can explore this dapp at https://scaffold-soroban.stellar.org/ by choosing mint-token from the "select demo" dropdown.
The Mint Token DApp relies on the following dependencies:
-
Node (>=16.14.0 <=18.0.0): https://nodejs.org/en/download/
-
Yarn (v1.22.5 or newer): https://classic.yarnpkg.com/en/docs/install
-
Freighter wallet(v5.0 or newer): https://www.freighter.app/
The Mint Token DApp offers the following features:
-
Freighter Wallet Integration: The Mint Token DApp seamlessly integrates with Freighter/Albedo/XBull, allowing users to connect their wallet to access Soroban token balances and utilize their signing capabilities for secure and integrity-checked transactions.
-
Transaction Construction: Leveraging the Soroban token's contract interface, the DApp constructs transactions that invoke the
mint
method. This method facilitates the minting of new tokens to an address.
To use the Mint Token DApp, follow these steps:
- Install and set up one of the supported wallets.
-
Clone and navigate into the Mint Token DApp repository by trunning the following:
git clone https://github.com/stellar/soroban-react-mint-token.git cd soroban-react-mint-token
-
Install the dependencies by running the following:
yarn
-
If you are using the Freighter wallet, ensure that experimental mode is enabled. You can find this setting in Freighter wallet at:
Settings(⚙️)>Preferences>ENABLE EXPERIMENTAL MODE
.
-
Enable and add Soroban Tokens in Freighter.
-
Connect the dapp to Freighter.
- Add the public key for the account that will receive the newly minted tokens.
- Add the contract ID for the token that you will be minting, and add the quantity of new tokens to mint.
- Set the desired transaction fee & memo.
- Confirm your transaction parameters, and submit it to the network.
- View your transaction's result XDR and optionally start the mint flow over.
yarn && yarn build
yarn && yarn start
Contributions to the Mint Token DApp are welcome. If you encounter any issues, have suggestions for improvements, or would like to contribute to the codebase, please submit an issue, pull request, or reach out to us on Discord.