From 8b24e90e9a7efc917459caa89949ec27a3cc8518 Mon Sep 17 00:00:00 2001 From: Dr-Electron Date: Sat, 1 Jun 2024 00:52:44 +0200 Subject: [PATCH] Update core contract references --- .../docs/reference/core-contracts/accounts.md | 40 ++++++++++++++++--- .../docs/reference/core-contracts/accounts.md | 40 ++++++++++++++++--- 2 files changed, 68 insertions(+), 12 deletions(-) diff --git a/docs/build/isc/v1.1/docs/reference/core-contracts/accounts.md b/docs/build/isc/v1.1/docs/reference/core-contracts/accounts.md index e445e0db13a..18a3f77e787 100644 --- a/docs/build/isc/v1.1/docs/reference/core-contracts/accounts.md +++ b/docs/build/isc/v1.1/docs/reference/core-contracts/accounts.md @@ -93,16 +93,19 @@ the target chain to the sender SC's L2 account on the origin chain. ::: -### `foundryCreateNew(t TokenScheme) s SerialNumber` +### `nativeTokenCreate(t TokenScheme, tn TokenName, ts TokenSymbol, td TokenDecimal) s SerialNumber` -Creates a new foundry with the specified token scheme, and assigns the foundry to the sender. +Creates a new foundry and registers it as a ERC20 and IRC30 token. -You can call this end point from the CLI using `wasp-cli chain create-foundry -h` +You can call this end point from the CLI using `wasp-cli chain create-native-token -h` #### Parameters - `t` ([`iotago::TokenScheme`](https://github.com/iotaledger/iota.go/blob/develop/token_scheme.go)): The token scheme for the new foundry. +- `tn` (`string`): The token name +- `ts` (`string`): The token symbol +- `td` (`uint8`): The token decimals The storage deposit for the new foundry must be provided via allowance (only the minimum required will be used). @@ -110,7 +113,7 @@ The storage deposit for the new foundry must be provided via allowance (only the - `s` (`uint32`): The serial number of the newly created foundry -### `foundryModifySupply(s SerialNumber, d SupplyDeltaAbs, y DestroyTokens)` +### `nativeTokenModifySupply(s SerialNumber, d SupplyDeltaAbs, y DestroyTokens)` Mints or destroys tokens for the given foundry, which must be controlled by the caller. @@ -124,7 +127,7 @@ When minting new tokens, the storage deposit for the new output must be provided When destroying tokens, the tokens to be destroyed must be provided via an allowance. -### `foundryDestroy(s SerialNumber)` +### `nativeTokenDestroy(s SerialNumber)` Destroys a given foundry output on L1, reimbursing the storage deposit to the caller. The foundry must be owned by the caller. @@ -139,6 +142,31 @@ This operation cannot be reverted. - `s` (`uint32`): The serial number of the foundry. + +### `foundryCreateNew(t TokenScheme) s SerialNumber` + +:::warning Deprecated + +This function is deprecated, please use [`nativeTokenCreate`](#nativetokencreatet-tokenscheme-s-serialnumber) instead + +::: + +Creates a new foundry with the specified token scheme, and assigns the foundry to the sender. + +You can call this end point from the CLI using `wasp-cli chain create-foundry -h` + +#### Parameters + +- `t` ([`iotago::TokenScheme`](https://github.com/iotaledger/iota.go/blob/develop/token_scheme.go)): The token scheme + for the new foundry. + +The storage deposit for the new foundry must be provided via allowance (only the minimum required will be used). + +#### Returns + +- `s` (`uint32`): The serial number of the newly created foundry + + ### `mintNFT(I ImmutableData, a AgentID, C CollectionID, w WithdrawOnMint)` Mints an NFT with ImmutableData `I` that will be owned by the AgentID `a`. @@ -221,7 +249,7 @@ Returns a list of all native tokenIDs that are owned by the chain. A map of [`TokenID`](#tokenid) => `0x01` -### `foundryOutput(s FoundrySerialNumber)` +### `nativeToken(s FoundrySerialNumber)` #### Parameters diff --git a/docs/build/isc/v1.3-alpha/docs/reference/core-contracts/accounts.md b/docs/build/isc/v1.3-alpha/docs/reference/core-contracts/accounts.md index e445e0db13a..18a3f77e787 100644 --- a/docs/build/isc/v1.3-alpha/docs/reference/core-contracts/accounts.md +++ b/docs/build/isc/v1.3-alpha/docs/reference/core-contracts/accounts.md @@ -93,16 +93,19 @@ the target chain to the sender SC's L2 account on the origin chain. ::: -### `foundryCreateNew(t TokenScheme) s SerialNumber` +### `nativeTokenCreate(t TokenScheme, tn TokenName, ts TokenSymbol, td TokenDecimal) s SerialNumber` -Creates a new foundry with the specified token scheme, and assigns the foundry to the sender. +Creates a new foundry and registers it as a ERC20 and IRC30 token. -You can call this end point from the CLI using `wasp-cli chain create-foundry -h` +You can call this end point from the CLI using `wasp-cli chain create-native-token -h` #### Parameters - `t` ([`iotago::TokenScheme`](https://github.com/iotaledger/iota.go/blob/develop/token_scheme.go)): The token scheme for the new foundry. +- `tn` (`string`): The token name +- `ts` (`string`): The token symbol +- `td` (`uint8`): The token decimals The storage deposit for the new foundry must be provided via allowance (only the minimum required will be used). @@ -110,7 +113,7 @@ The storage deposit for the new foundry must be provided via allowance (only the - `s` (`uint32`): The serial number of the newly created foundry -### `foundryModifySupply(s SerialNumber, d SupplyDeltaAbs, y DestroyTokens)` +### `nativeTokenModifySupply(s SerialNumber, d SupplyDeltaAbs, y DestroyTokens)` Mints or destroys tokens for the given foundry, which must be controlled by the caller. @@ -124,7 +127,7 @@ When minting new tokens, the storage deposit for the new output must be provided When destroying tokens, the tokens to be destroyed must be provided via an allowance. -### `foundryDestroy(s SerialNumber)` +### `nativeTokenDestroy(s SerialNumber)` Destroys a given foundry output on L1, reimbursing the storage deposit to the caller. The foundry must be owned by the caller. @@ -139,6 +142,31 @@ This operation cannot be reverted. - `s` (`uint32`): The serial number of the foundry. + +### `foundryCreateNew(t TokenScheme) s SerialNumber` + +:::warning Deprecated + +This function is deprecated, please use [`nativeTokenCreate`](#nativetokencreatet-tokenscheme-s-serialnumber) instead + +::: + +Creates a new foundry with the specified token scheme, and assigns the foundry to the sender. + +You can call this end point from the CLI using `wasp-cli chain create-foundry -h` + +#### Parameters + +- `t` ([`iotago::TokenScheme`](https://github.com/iotaledger/iota.go/blob/develop/token_scheme.go)): The token scheme + for the new foundry. + +The storage deposit for the new foundry must be provided via allowance (only the minimum required will be used). + +#### Returns + +- `s` (`uint32`): The serial number of the newly created foundry + + ### `mintNFT(I ImmutableData, a AgentID, C CollectionID, w WithdrawOnMint)` Mints an NFT with ImmutableData `I` that will be owned by the AgentID `a`. @@ -221,7 +249,7 @@ Returns a list of all native tokenIDs that are owned by the chain. A map of [`TokenID`](#tokenid) => `0x01` -### `foundryOutput(s FoundrySerialNumber)` +### `nativeToken(s FoundrySerialNumber)` #### Parameters