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
      • VEO Creation Flow
      • VEO Removal Flow
      • Claiming Vested Tokens
    • Wizard | Protocol Upgrades
  • Developer Reference
    • VEOs
      • Vesting Options
      • Price Models
      • Debt Buffer
      • Deposit Interval
    • 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
  • Fees
  • Interfaces
  1. Developer Reference
  2. Adapters

Polymer Adapter

Lucid has developed an adapter that integrates with Polymer Labs' Interoperability solution to send and receive cross-chain messages.

Fees

Polymer currently does not charge any fees. When using the Polymer Adapter, you’ll only pay Lucid’s standard protocol fee. Lucid takes care of calling the Polymer Adapter contract on the destination chain to execute and relay your message to your Controller contract—something you would typically need to handle manually when using Polymer.

Since Lucid’s fee is consistent across all bridge adapters, Polymer becomes the cheapest option available.

When sending or exporting a transaction through the Lucid App, Lucid automatically calculates the fee protocol fee.

Any excess gas fees sent are refunded to the refundAddress specified in the options field.

Interfaces

Each adapter implements the following public functions:

relayMessage

function relayMessage( uint256 destChainId, address destination, bytes memory options, bytes calldata message ) external payable returns (bytes32)

Sends a message, deducts the protocol fee, and pays the required protocol fee.

  • Any excess fees are refunded to the refundAddress, which must be an ABI-encoded address in the options bytes.

  • The Ether value sent by the calling contract must include the Lucid protocol fee.

  • The Polymer Lucid Adapter assigns transfer IDs to relayed messages, which is returned as a bytes32 value.

Input Params:

Type
Name
Description

uint256

destChainId

The destination chain ID.

address

destination

The destination address.

bytes

options

Additional params to be used by each adapter. In Polymer, it's the ABI-encoded refund address.

bytes

message

The message to be relayed.

The following event is also emitted, containing the transfer ID:

event RelayViaPolymer(uint256 indexed destChainId, address indexed destAdapter, bytes32 indexed transferId, bytes message);

Get fee

function minGas() public view returns (uint256)

Returns the Lucid protocol fee in ether in wei. The calculateFee(uint256 amount) function should not be used in this case.

PreviousLayerZero AdapterNextWormhole Adapter

Last updated 27 days ago