AddressAliasHelper
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
Name | Type | Description |
---|---|---|
l1Address | address | the address in the L1 that triggered the tx to L2 |
Returns
Name | Type | Description |
---|---|---|
l2Address | address | L2 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
Name | Type | Description |
---|---|---|
l2Address | address | L2 address as viewed in msg.sender |
Returns
Name | Type | Description |
---|---|---|
l1Address | address | the address in the L1 that triggered the tx to L2 |