Skip to content

Commit 819b9f7

Browse files
committed
feat(docs): update IMintingTagManager documentation with new functions and details
1 parent a2d24ab commit 819b9f7

1 file changed

Lines changed: 47 additions & 19 deletions

File tree

docs/fassets/reference/IMintingTagManager.mdx

Lines changed: 47 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,14 @@ sidebar_position: 5
77

88
Reference for managing and interacting with FAssets `IMintingTagManager`.
99

10+
Each minting tag is an [ERC721 token](https://ethereum.org/developers/docs/standards/tokens/erc-721/) that authorizes its owner to perform direct mintings.
11+
Tags are reserved by paying [a fee](/fassets/reference/IMintingTagManager#reservationfee) in native currency.
12+
Each tag has a configurable minting recipient (the address that receives minted FAssets) and an optional allowed executor (the only address permitted to execute direct mintings with that tag).
13+
1014
To get the minting tag manager address, use the [getMintingTagManager](/fassets/reference/IAssetManager#getmintingtagmanager) function of the [IAssetManager](/fassets/reference/IAssetManager) contract.
1115

16+
Sourced from `IMintingTagManager.sol` on [GitHub](https://github.com/flare-foundation/fassets/blob/main/contracts/userInterfaces/IMintingTagManager.sol).
17+
1218
## Functions
1319

1420
### `reserve`
@@ -39,6 +45,31 @@ function setMintingRecipient(uint256 _mintingTag, address _recipient) external;
3945
- `_mintingTag`: The minting tag ID.
4046
- `_recipient`: The new minting recipient address (must not be the zero address).
4147

48+
### `setAllowedExecutor`
49+
50+
Set the allowed executor for a tag.
51+
Only callable by the tag owner.
52+
The allowed executor is the only address that can execute direct mintings with this tag.
53+
Setting an allowed executor is optional; if not set, anyone can execute mintings with the tag.
54+
Changes to the allowed executor are subject to a cooldown delay before they become active.
55+
56+
```solidity
57+
function setAllowedExecutor(uint256 _mintingTag, address _executor) external;
58+
```
59+
60+
#### Parameters
61+
62+
- `_mintingTag`: The minting tag ID.
63+
- `_executor`: The new allowed executor address (must not be the zero address).
64+
65+
### `nextAvailableTag`
66+
67+
Return the next minting tag ID that will be assigned on the next reservation.
68+
69+
```solidity
70+
function nextAvailableTag() external view returns (uint256);
71+
```
72+
4273
### `reservationFee`
4374

4475
Return the fee (in native currency) required to reserve a new minting tag.
@@ -69,12 +100,6 @@ Transfer a minting tag to a new owner.
69100
Also updates the minting recipient to the new owner and resets the allowed executor.
70101

71102
```solidity
72-
/**
73-
* Transfer a minting tag to a new owner. Also updates the minting recipient
74-
* to the new owner and resets the allowed executor.
75-
* @param _to The address to transfer the tag to.
76-
* @param _mintingTag The minting tag id to transfer.
77-
*/
78103
function transfer(address _to, uint256 _mintingTag) external;
79104
```
80105

@@ -88,11 +113,6 @@ function transfer(address _to, uint256 _mintingTag) external;
88113
Return the minting recipient for a given tag.
89114

90115
```solidity
91-
/**
92-
* Return the minting recipient for a given tag.
93-
* @param _mintingTag The minting tag id.
94-
* @return The address that receives minted FAsset when this tag is used.
95-
*/
96116
function mintingRecipient(uint256 _mintingTag) external view returns (address);
97117
```
98118

@@ -121,19 +141,27 @@ function allowedExecutor(uint256 _mintingTag) external view returns (address);
121141

122142
- The address of the allowed executor, or `address(0)` if none is set.
123143

124-
### `setAllowedExecutor`
144+
### `pendingAllowedExecutorChange`
125145

126-
Set the allowed executor for a tag.
127-
Only callable by the tag owner.
128-
The allowed executor is the only address that can execute direct mintings with this tag.
129-
Setting an allowed executor is optional; if not set, anyone can execute mintings with the tag.
130-
Changes to the allowed executor are subject to a cooldown delay before they become active.
146+
Return information about a pending allowed executor change for a given tag.
147+
148+
Executor changes are subject to a cooldown delay before they become active.
149+
During the cooldown, `allowedExecutor` continues to return the previous executor.
150+
Use this function to learn when a pending change takes effect so the current executor can avoid starting FDC-backed minting flows they will no longer be allowed to complete.
131151

132152
```solidity
133-
function setAllowedExecutor(uint256 _mintingTag, address _executor) external;
153+
function pendingAllowedExecutorChange(uint256 _mintingTag)
154+
external
155+
view
156+
returns (bool _pending, address _newExecutor, uint256 _activeAfterTs);
134157
```
135158

136159
#### Parameters
137160

138161
- `_mintingTag`: The minting tag ID.
139-
- `_executor`: The new allowed executor address (must not be the zero address).
162+
163+
#### Returns
164+
165+
- `_pending`: `true` if there is a pending executor change that has not activated yet.
166+
- `_newExecutor`: The address of the pending new executor (`address(0)` if there is no pending change).
167+
- `_activeAfterTs`: The timestamp after which the new executor becomes active (`0` if there is no pending change).

0 commit comments

Comments
 (0)