Skip to main content

L2AviBridge.sol

Read

  1. DEFAULT_ADMIN_ROLE
    • Returns the default admin role bytes32
  2. MESSENGER
    • Returns the Base messenger address
  3. OTHER_BRIDGE
    • Returns the address of L2AviBridge on Base
  4. PAUSER_ROLE
    • Returns the pauser role bytes32
  5. allowedTokens
    • Returns bool is a token address is Supersonic-supported
  6. backendUser
    • Returns the backend user address
  7. deposits
    • Enumerates a list of deposits for a wallet address and token address
  8. eip712Domain
    • Returns fields bytes1, name string, version string, chainId uint256, verifyingContract address, salt bytes32, extensions uint256[], as defined by ERC-5267
  9. flatFee
    • Returns the current ETH protocol fee uint256
  10. flatFeeReceipeit
    • Returns the address that receives the ETH protocol fee
  11. getRoleAdmin
    • Reutn the current admin role bytes32
  12. hasRole
    • Returns true if the input address has the specified role bool
      • role bytes32
      • account address
  13. l1TokenBridge
    • Returns the address of AviL1Bridge.sol
  14. liquidityPool
    • Returns the address of LiquidityPool.sol
  15. paused
    • Returns the current paused state bool. The default state is true
  16. renounceRole
    • Removes a role bytes32 from a user address
  17. supportsInterface
    • Returns a bool if a bytes4 interface ID is supported
  18. version
    • Returns the current contract version string

Write

  1. __SkyBridge_init
    • Initializes SkyBridge relay and messenger services: Can only be called on deployment
      • _messenger address
      • _otherBridge address
  2. addAdmin
    • Adds the input address as an admin Required role: admin
  3. addAllowedToken
    • Enables Supersonic for a token address Required role: admin
  4. addPauser
    • Adds the input address as a pauser Required role: admin
  5. fastWithdraw
    • Initiates a fast withdrawal to the same address on Layer-1
      • fastWithdaw ether
      • _l2Token address
      • _amount uint256
      • _minGasLimit uint32
      • _extraData bytes
  6. fastWithdrawTo
    • Initiates a fast withdrawal to the input address on Layer-1
      • fastWithdawTo ether
      • _l2Token address
      • _to address
      • _amount uint256
      • _minGasLimit uint32
      • _extraData bytes
  7. finalizeBridgeERC20
    • Finalizes an ERC20 deposit
      • _localToken address
      • _remoteToken address
      • _from address
      • _to address
      • _amount uint256
      • _extraData bytes
  8. finalizeBridgeETH
    • Finalizes an ETH deposit
      • payableAmount ether
      • _remoteToken address
      • _from address
      • _to address
      • _amount uint256
      • _extraData bytes
  9. finalizeDeposit
    • Finalizes a deposit
      • payableAmount ether
      • _l1Token address
      • _l2Token address
      • _from address
      • _to address
      • _amount uint256
      • _extraData bytes
  10. grantRole
    • Grant a role bytes32 to an address Required role: admin
  11. initialize
    • Initializes SkyBridge Liquidity Pool, portal, and token address Can only be called on deployment
      • _l2CrossDomainMessenger address
      • _otherBridge address
      • _liquidityPool address
      • _l1FeeRecipient address
  12. removeAdmin
    • Remove admin role from an address Required role: admin
  13. removeAllowedToken
    • Disables Supersonic support for a token address Required role: admin
  14. removePauser
    • Remove pauser role from an address Required role: admin
  15. revokeRole
    • Removes the selected role bytes32 from an address Required role: admin
  16. setBackend
    • Sets the backend address Required role: admin
  17. setFlatFee
    • Sets the protocol fee Required role: admin
      • _fee uint256
  18. setFlatFeeRecipient
    • Sets the deposit address for the flatFee Required role: admin
      • _recipient address
  19. withdraw
    • Withdraws ETH or ERC20 to the same address on Layer-1
      • withdraw ether
      • _l2Token address
      • _amount uint256
      • _minGasLimit uint32
      • _extraData bytes
  20. withdrawTo
    • Withdraws ETH or ERC20 to a different address on Layer-1
      • withdrawTo ether
      • _l2Token address
      • _to address
      • _amount uint256
      • _minGasLimit uint32
      • _extraData bytes