Skip to main content

Optimism_Wrapper

Optimism_Wrapper#

Functions#

constructor(contract WETH9Like _weth, address _bridgePool) (public)

Construct Optimism Wrapper contract.

Parameters:#

  • _weth: l1WethContract address. Normally deployed at 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.
  • _bridgePool: address of the bridge pool to send Wrapped ETH to when ETH is sent to this contract.
changeBridgePool(address newBridgePool) (public)

Called by owner of the wrapper to change the destination of the wrapped ETH (bridgePool).

Parameters:#

  • newBridgePool: address of the bridge pool to send Wrapped ETH to when ETH is sent to this contract.
wrapAndTransfer() (public)

Publicly callable function that takes all ETH in this contract, wraps it to WETH and sends it to the bridge pool contract. Function is called by fallback functions to automatically wrap ETH to WETH and send at the conclusion of a canonical ETH bridging action.

fallback() (external)
owner() → address (public)

Returns the address of the current owner.

renounceOwnership() (public)

Leaves the contract without owner. It will not be possible to call onlyOwner functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.

transferOwnership(address newOwner) (public)

Transfers ownership of the contract to a new account (newOwner). Can only be called by the current owner.

_transferOwnership(address newOwner) (internal)

Transfers ownership of the contract to a new account (newOwner). Internal function without access restriction.

_msgSender() → address (internal)
_msgData() → bytes (internal)

Events#

ChangedBridgePool(address bridgePool)
OwnershipTransferred(address previousOwner, address newOwner)

Modifiers#

onlyOwner()

Throws if called by any account other than the owner.