Skip to content

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.

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.

When adopting a GovernedToken_MintEncodedToken instance, the following parameter is required:

  1. governedToken (address): The address of the Governed721 token contract.

When calling the mandate, one parameter must be provided:

  1. To (address): The recipient address for the minted token.
  1. 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.
  2. Mint

    • Calls mint(to, tokenId) on the Governed721 contract.
function handleRequest(...) public view override returns (...)
  • Constructs the encoded token ID from the caller address and current block number.
  • Returns a mint call targeting the Governed721 contract.

This mandate has no explicit error conditions. Failures will occur at the Governed721 contract level if minting is not permitted.

Chain IDChain NameAddress