Skip to main content

L1AviBridge.sol

Read

  1. DEFAULT_ADMIN_ROLE
    • Returns the default admin role bytes32
  2. L1AviToken
    • Returns the address of Aviator (AVI) on Layer-1
  3. LIQUIDITY_POOL
    • Returns the LiquidityPool address
  4. MESSENGER
    • Returns the Base messenger address
  5. OTHER_BRIDGE
    • Returns the address of L2AviBridge on Base
  6. PAUSER_ROLE
    • Returns the pauser role bytes32
  7. backendUser
    • Returns the backend user address
  8. bridgingFee
    • Returns the current liquidity fee uint256
  9. deposits
    • Enumerates a list of deposits for a wallet address and token address
  10. eip712Domain
    • Returns fields bytes1, name string, version string, chainId uint256, verifyingContract address, salt bytes32, extensions uint256[], as defined by ERC-5267
  11. flatFee
    • Returns the current ETH protocol fee uint256
  12. flatFeeReceipeit
    • Returns the address that receives the ETH protocol fee
  13. getNonce
    • Return the current nonce uint256
  14. getRoleAdmin
    • Reutn the current admin role bytes32
  15. hasRole
    • Returns true if the input address has the specified role bool
      • role bytes32
      • account address
  16. optimismPortal
    • Returns the Optimism portal address
  17. paused
    • Returns the current paused state bool. The default state is true
  18. renounceRole
    • Removes a role bytes32 from a user address
  19. supportsInterface
    • Returns a bool if a bytes4 interface ID is supported
  20. 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. addPauser
    • Adds the input address as a pauser Required role: admin
  4. bridgeERC20
    • Deposits ERC20 tokens to the same address on Base
      • bridgeERC20 ether
      • _l1Token address
      • _l2Token address
      • _amount uint256
      • _minGasLimit uint32
      • _extraData bytes
  5. bridgeERC20To
    • Deposits ERC20 tokens to a different address on Base
      • bridgeERC20To ether
      • _l1Token address
      • _l2Token address
      • _to address
      • _amount uint256
      • _minGasLimit uint32
      • _extraData bytes
  6. bridgeETH
    • Deposits ETH to the same address on Base
      • bridgeETHTo ether
      • _minGasLimit uint32
      • _extraData bytes
  7. bridgeETHTo
    • Deposits ETH to a different address on Base
      • bridgeETHTo ether
      • _to address
      • _minGasLimit uint32
      • _extraData bytes
  8. fastWithdraw
    • Finalizes a Supersonic withdrawal
      • fastWithdraw ether
      • _txn (tuple)
        • l1_token address
        • l2_token address
        • from address
        • to address
        • amount uint256
        • nonce uint256
        • proof_transaction bytes
      • _signature bytes
  9. finalizeBridgeERC20
    • Finalizes an ERC20 deposit
      • _localToken address
      • _remoteToken address
      • _from address
      • _to address
      • _amount uint256
      • _extraData bytes
  10. finalizeBridgeETH
    • Finalizes an ETH deposit
      • finalizeBridgeETH ether
      • _from address
      • _to address
      • _amount uint256
      • _extraData bytes
  11. finalizeERC20Withdrawal
    • Finalizes an ERC20 withdrawal
      • _l1Token address
      • _l2Token address
      • _from address
      • _to address
      • _amount uint256
      • _extraData bytes
  12. finalizeETHWithdrawal
    • Finalizes an ETH withdrawal
      • finalizeETHWithdrawal ether
      • _from address
      • _to address
      • _amount uint256
      • _extraData bytes
  13. grantRole
    • Grant a role bytes32 to an address Required role: admin
  14. initialize
    • Initializes SkyBridge Liquidity Pool, portal, and token address Can only be called on deployment
  15. removeAdmin
    • Remove admin role from an address Required role: admin
  16. removePauser
    • Remove pauser role from an address Required role: admin
  17. revokeRole
    • Remove a role bytes32 from an address Required role: admin
  18. setAviTokenAddress
    • Sets the Aviator (AVI) token address on Layer-1 Required role: admin
  19. setBackend
    • Changes the backend to a new address Required role: admin
  20. setBridgingFee
    • Sets the liquidity fee uint256 Required role: admin
  21. setFlatFee
    • Sets the protocol fee uint256 Required role: admin
  22. setFlatFeeRecipient
    • Sets the recipient address of the protocol fee Required role: admin
  23. setOtherBridge
    • Sets the address of L2AviBridge on Base Required role: admin
  24. setPaused
    • Sets the paused state bool of the bridge. The default state is true. Required role: pauser