Lucid
  • USING LUCID
    • Welcome to Lucid
    • Homepage
    • Explore Page
    • Organisation Summary Page
    • Sidebar Navigation
  • Organisation Creation Page
  • Creating an Organisation
    • 1. Setup Organisation Details
    • 2. Module Selection
    • 3. Module Configuration
    • 4. Safe and Protocol Upgrades Configuration
    • 5. Governor Configuration
    • 6. Veto and Multi-Bridge Configuration
    • 7. Token Configuration
    • 8. Asset Transfer Portals Configuration
    • 9. Review and Deploy Organisation
    • 10. Lucid Post-Deployment Integration
  • Editing an Organisation
  • Modules and integrations
    • Multi-Bridge
      • Multi-Bridge Asset Transfers
      • Multi-Bridge Message and Asset Transfers
      • Resend Transaction
    • Bridge Portals
    • Vested Emission Offerings (VEOs)
      • VEO Purchase Flow
        • Purchase Strategic Asset VEOs
        • Purchase Liquidity VEOs
        • Purchase TVL VEOs
      • VEO Creation Flow
      • VEO Removal Flow
      • Claiming Vested Tokens
    • Wizard | Protocol Upgrades
  • Lucid Bridged Stablecoins
    • L-USDC & L-USDT Overview
      • L-USDC Deep Dive
      • L-USDT Deep Dive
  • Points Program
    • Season 1
  • Developer Reference
    • Message Bridging
      • Sending a Message
      • Message Execution
      • Admin Functions
    • Asset Bridging
      • Bridging Assets
      • Admin Functions
    • Adapters
      • Axelar Adapter
      • CCIP Adapter
      • Connext Adapter
      • Hyperlane Adapter
      • LayerZero Adapter
      • Polymer Adapter
      • Wormhole Adapter
    • Deployed Contracts
      • Multibridge Contracts
      • VEO Contracts
  • API Reference
  • RESOURCES
    • About
    • Fees
      • Lucid Pricing and Fee Structure
      • Fee Estimates for Bridges
    • Frequently Asked Questions
    • Key Terms and Explanations
    • Contact
Powered by GitBook
On this page
  • Final Step: Adding Mint Rights to Asset Controller Post-Deployment
  • Step 1: Understand the AccessControl Library
  • Step 2: Use the grantRole() Function
  • Step 3: Determine the Role Hash
  • Step 4: Locate the Address of the Message Controller
  • Step 5: Execute the grantRole() Function
  • Example:
  • Step 6: Verify the Role Assignment
  • Important Notes
  1. Creating an Organisation

10. Lucid Post-Deployment Integration

Previous9. Review and Deploy OrganisationNextEditing an Organisation

Last updated 5 months ago

Final Step: Adding Mint Rights to Asset Controller Post-Deployment

After completing the organisation creation flow and deploying all contracts, the final step is to configure minting rights for the Asset Controller. This step involves using the OpenZeppelin AccessControl library to grant the necessary permissions. Below is a step-by-step guide to complete this process:

Step 1: Understand the AccessControl Library

The AccessControl library from OpenZeppelin is used to manage roles and permissions for smart contract functions. For more details, refer to the .

Step 2: Use the grantRole() Function

The grantRole() function is used to assign a specific role to an address. In this context, the role grants the Message Controller contract permission to interact with functions related to minting.

The function syntax is as follows:

grantRole(bytes32 role, address account)

  • role: The role hash (determined by the project when deploying the contract).

  • account: The address of the Message Controller contract deployed by Lucid (on the same chain).

Step 3: Determine the Role Hash

When your project deployed the contract, a specific role hash would have been configured for minting permissions. This role hash must be provided as the first argument in the grantRole() function.

Step 4: Locate the Address of the Message Controller

Identify the address of the Message Controller contract deployed by Lucid. Ensure this address corresponds to the same chain as the organisation’s deployment.

Step 5: Execute the grantRole() Function

Call the grantRole() function with the appropriate arguments:

1. Role Hash: Use the specific role hash for minting permissions.

2. Message Controller Address: Provide the address of the Message Controller deployed by Lucid.

Example:

grantRole(0x<role-hash>, 0x<message-controller-address>)

Replace <role-hash> and <message-controller-address> with the actual values for your project.

Step 6: Verify the Role Assignment

After executing the grantRole() function, confirm that the Message Controller has been granted the correct role. This can be verified by calling the hasRole() function:

hasRole(bytes32 role, address account)

Ensure the function returns true for the given role and Message Controller address.

Important Notes

  • Ensure that the Message Controller address corresponds to the same chain as the Asset Controller deployment.

  • Be cautious when granting roles to prevent unintended access to critical functions.

  • This configuration step is crucial to enable seamless interaction with the multi-bridge functionality.


By following these steps, you will successfully add minting rights to the Asset Controller, ensuring proper functionality for your organisation’s setup.

OpenZeppelin AccessControl Documentation