Ax Protocol
  • 📚Overview
    • Ax Protocol
    • USX
    • Product Roadmap
  • 💻Developers
    • Smart Contracts
      • USX
      • Treasury
      • WormholeBridge
      • LayerZeroBridge
    • USX Transfer Widget
      • Usage
  • 🔍References
    • Glossary
    • Deployed Contracts
    • Estimated Transfer Times
    • Audit Reports
    • AxScan
    • Wormhole Docs
    • LayerZero Docs
    • Terms of Service
    • Privacy Policy
    • Risk Disclosure
    • Trademark Guidelines
  • 💬Community
    • GitHub
    • Discord
    • Telegram
    • Twitter
Powered by GitBook
On this page
  • View Methods
  • estimateSendFee

Was this helpful?

  1. Developers
  2. Smart Contracts

LayerZeroBridge

The following describes relevant, public functions on the LayerZeroBridge smart contract.

PreviousWormholeBridgeNextUSX Transfer Widget

Last updated 1 year ago

Was this helpful?

View Methods

estimateSendFee

This function allows users to get the fee required to deliver a LayerZero message on a specified destination chain.

function estimateSendFee(
    uint16 _dstChainId, 
    bytes memory _toAddress,
    uint256 _amount
) public view virtual returns (uint256 nativeFee, uint256 zroFee) {}
Parameter Name
Type
Description

_dstChainId

uint16

The LayerZero chain ID of the destination chain. Please refer to the page to see a list of chain IDs.

_toAddress

bytes

The abi-encoded recipient address on the destination chain: the account USX will get transferred to.

_amount

uint256

The amount of USX token to be transferred, in Wei units (18 decimals).

Return Value
Type
Description

nativeFee

uint256

The amount, in terms of source chain native, required to pay for destination chain gas fees. The amount must be included as msg.value when calling on the source chain USX contract.

zroFee

uint256

At present, this value is not used by Ax Protocol.

💻
Deployed Contracts
sendFrom