AddressAliasHelper

Git Source

State Variables

offset

uint160 internal constant offset =
  uint160(0x1111000000000000000000000000000000001111);

Functions

applyL1ToL2Alias

Utility function converts the address that submitted a tx to the inbox on L1 to the msg.sender viewed on L2

function applyL1ToL2Alias(address l1Address)
  internal
  pure
  returns (address l2Address);

Parameters

NameTypeDescription
l1Addressaddressthe address in the L1 that triggered the tx to L2

Returns

NameTypeDescription
l2AddressaddressL2 address as viewed in msg.sender

undoL1ToL2Alias

Utility function that converts the msg.sender viewed on L2 to the address that submitted a tx to the inbox on L1

function undoL1ToL2Alias(address l2Address)
  internal
  pure
  returns (address l1Address);

Parameters

NameTypeDescription
l2AddressaddressL2 address as viewed in msg.sender

Returns

NameTypeDescription
l1Addressaddressthe address in the L1 that triggered the tx to L2