GovernedToken_MintEncodedToken
GovernedToken_MintEncodedToken is an integration mandate that mints a Governed721 token to a specified recipient. The token ID is automatically constructed by encoding the caller’s address and the current block number, making each token traceable back to its minter and mint time.
Overview
Section titled “Overview”This mandate is used to issue tokens that carry provenance information in their ID. The encoded token ID makes it possible for downstream mandates (like GovernedToken_GatedAccess) to verify who minted a token and when.
Configuration
Section titled “Configuration”When adopting a GovernedToken_MintEncodedToken instance, the following parameter is required:
governedToken(address): The address of the Governed721 token contract.
Proposing an Action
Section titled “Proposing an Action”When calling the mandate, one parameter must be provided:
To(address): The recipient address for the minted token.
Execution Flow
Section titled “Execution Flow”-
Token ID Construction
- Encodes the token ID as:
(uint256(caller) << 48) | uint256(block.number). - This packs the caller’s address into the upper bits and the block number into the lower 48 bits.
- Encodes the token ID as:
-
Mint
- Calls
mint(to, tokenId)on the Governed721 contract.
- Calls
Technical Specifications
Section titled “Technical Specifications”Functions
Section titled “Functions”handleRequest
Section titled “handleRequest”function handleRequest(...) public view override returns (...)- Constructs the encoded token ID from the caller address and current block number.
- Returns a
mintcall targeting the Governed721 contract.
Error Conditions
Section titled “Error Conditions”This mandate has no explicit error conditions. Failures will occur at the Governed721 contract level if minting is not permitted.
Current Deployments
Section titled “Current Deployments”| Chain ID | Chain Name | Address |
|---|---|---|