Skip to content

Commit

Permalink
Fix create native token how-to
Browse files Browse the repository at this point in the history
  • Loading branch information
Dr-Electron committed May 31, 2024
1 parent 17a056b commit 92326f6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ The Foundry lets you specify your native token's maximum supply **once** and cha

### 2. Define the Token Scheme

Define the `NativeTokenScheme` by specifying its `mintedTokens`, `meltedTokens`, and `maximumSupply`. For simplicity, in this guide we mint the whole maximum supply at creation.
Define the `NativeTokenScheme` by specifying the `maximumSupply`.

```solidity
NativeTokenScheme memory nativeTokenScheme = NativeTokenScheme({
mintedTokens: _maximumSupply,
mintedTokens: 0,
meltedTokens: 0,
maximumSupply: _maximumSupply
});
Expand Down Expand Up @@ -73,7 +73,7 @@ contract MyToken {
allowance.baseTokens = _storageDeposit;
NativeTokenScheme memory nativeTokenScheme = NativeTokenScheme({
mintedTokens: _maximumSupply,
mintedTokens: 0,
meltedTokens: 0,
maximumSupply: _maximumSupply
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,10 @@ tags:
- mint
---
import ExampleCodeIntro from '../../../_partials/how-tos/token/_example_code_intro.md';
import ObsoleteTokenCreation from '../../../_partials/how-tos/token/_obsolete_token_creation.md';

# Mint a Native Token using a Foundry

<ObsoleteTokenCreation/>


To mint tokens from a [foundry](/tips/tips/TIP-0018/#foundry-output), you first need to be aware that only the foundry owner can mint token,
so you should execute the `ISC.accounts.mintNativeTokens` function in the same contract that [created the foundry](./create-foundry.md).
To mint tokens from a [foundry](/tips/tips/TIP-0018/#foundry-output), you first need to be aware that only the foundry owner can mint token, so you should execute the `ISC.accounts.mintNativeTokens` function in the same contract where you also [created the native token](./create-native-token.md).

## Example Code

Expand Down
10 changes: 5 additions & 5 deletions docs/build/isc/v1.0.0-rc.6/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,11 @@ module.exports = {
label: 'Create a Native Token',
id: 'how-tos/core-contracts/token/create-native-token',
},
{
type: 'doc',
label: 'Mint Native Tokens',
id: 'how-tos/core-contracts/token/mint-token',
},
{
type: 'doc',
label: 'Custom ERC20 Functions',
Expand All @@ -164,11 +169,6 @@ module.exports = {
label: 'Create a Foundry',
id: 'how-tos/core-contracts/token/create-foundry',
},
{
type: 'doc',
label: 'Mint a Native Token using a Foundry',
id: 'how-tos/core-contracts/token/mint-token',
},
{
type: 'doc',
label: 'Register Token as ERC20',
Expand Down

0 comments on commit 92326f6

Please sign in to comment.