Skip to main content

SkyBridgeERC20.sol

Read

  1. BRIDGE
    • Returns the address of L2AviBridge on this network address
  2. FACTORY
    • Returns the admin ERC-20 factory address
  3. REMOTE_TOKEN
    • Returns the address of the corresponding token on Ethereum
  4. allowance
    • Queries the allowed balance uint256 from a owner user usable by a spender address
  5. balanceOf
    • Returns the balance uint256 of a queried address
  6. bridge
    • Returns the address of L2AviBridge on this network address
  7. decimals
    • Returns the number of decimals used for the token (imported from L1) uint8
  8. l1token
    • Returns the address of the corresponding token on Ethereum
  9. name
    • Returns the name of the token string
  10. remoteToken
    • Returns the address of the corresponding token on Ethereum
  11. supportsInterface
    • ERC165 interface check function. Returns a bool for whether or not an input interface is supported
  12. symbol
    • Returns the symbol of the token string
  13. totalSupply
    • Returns the total bridged supply uint256
  14. version
    • Returns the current contract version string

Write

  1. approve
    • See IERC20-approve. NOTE: If amount is the maximum uint256, the allowance is not updated on transferFrom. This is semantically equivalent to an infinite approval. Requirements: - spender cannot be the zero address.
  2. burn
    • Allows the authorized bridges (checked via the factory) to burn tokens on withdrawals Required user: bridge
  3. decreaseAllowance
    • Atomically decreases the allowance granted to spender by the caller. This is an alternative to approve that can be used as a mitigation for problems described in IERC20-approve. Emits an Approval event indicating the updated allowance. Requirements: - spender cannot be the zero address. - spender must have allowance for the caller of at least subtractedValue.
  4. increaseAllowance
    • Atomically increases the allowance granted to spender by the caller. This is an alternative to approve that can be used as a mitigation for problems described in IERC20-approve. Emits an Approval event indicating the updated allowance. Requirements: - spender cannot be the zero address.
  5. initialize
    • Initializes the token with factory variabls Required user: factory
  6. mint
    • Allows the authorized bridges (checked via the factory) to mint tokens on deposits Required user: bridge
  7. transfer
    • See IERC20-transfer. Requirements: - to cannot be the zero address. - the caller must have a balance of at least amount.
  8. transferFrom
    • See IERC20-transferFrom. Emits an Approval event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of ERC20. NOTE: Does not update the allowance if the current allowance is the maximum uint256. Requirements: - from and to cannot be the zero address. - from must have a balance of at least amount. - the caller must have allowance for from's tokens of at least amount.