Skip to content

Commit

Permalink
Update core contract references
Browse files Browse the repository at this point in the history
  • Loading branch information
Dr-Electron authored May 31, 2024
1 parent 6a7466e commit 8b24e90
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 12 deletions.
40 changes: 34 additions & 6 deletions docs/build/isc/v1.1/docs/reference/core-contracts/accounts.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,24 +93,27 @@ 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).

#### Returns

- `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.

Expand All @@ -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.
Expand All @@ -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`.
Expand Down Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,24 +93,27 @@ 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).

#### Returns

- `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.

Expand All @@ -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.
Expand All @@ -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`.
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 8b24e90

Please sign in to comment.