From 92326f6cf0457b9c480f3fc948d651c3b45de4a4 Mon Sep 17 00:00:00 2001 From: Dr-Electron Date: Fri, 31 May 2024 21:00:13 +0200 Subject: [PATCH] Fix create native token how-to --- .../core-contracts/token/create-native-token.md | 6 +++--- .../docs/how-tos/core-contracts/token/mint-token.md | 7 +------ docs/build/isc/v1.0.0-rc.6/sidebars.js | 10 +++++----- 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/docs/build/isc/v1.0.0-rc.6/docs/how-tos/core-contracts/token/create-native-token.md b/docs/build/isc/v1.0.0-rc.6/docs/how-tos/core-contracts/token/create-native-token.md index f816c2f68ae..7f8d4b2b4f6 100644 --- a/docs/build/isc/v1.0.0-rc.6/docs/how-tos/core-contracts/token/create-native-token.md +++ b/docs/build/isc/v1.0.0-rc.6/docs/how-tos/core-contracts/token/create-native-token.md @@ -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 }); @@ -73,7 +73,7 @@ contract MyToken { allowance.baseTokens = _storageDeposit; NativeTokenScheme memory nativeTokenScheme = NativeTokenScheme({ - mintedTokens: _maximumSupply, + mintedTokens: 0, meltedTokens: 0, maximumSupply: _maximumSupply }); diff --git a/docs/build/isc/v1.0.0-rc.6/docs/how-tos/core-contracts/token/mint-token.md b/docs/build/isc/v1.0.0-rc.6/docs/how-tos/core-contracts/token/mint-token.md index 3962a77ade9..28df45d1565 100644 --- a/docs/build/isc/v1.0.0-rc.6/docs/how-tos/core-contracts/token/mint-token.md +++ b/docs/build/isc/v1.0.0-rc.6/docs/how-tos/core-contracts/token/mint-token.md @@ -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 - - - -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 diff --git a/docs/build/isc/v1.0.0-rc.6/sidebars.js b/docs/build/isc/v1.0.0-rc.6/sidebars.js index 3f638c5f7a1..a01017561cc 100644 --- a/docs/build/isc/v1.0.0-rc.6/sidebars.js +++ b/docs/build/isc/v1.0.0-rc.6/sidebars.js @@ -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', @@ -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',