AddressAliasHelper

Git Source

Roll-up layer address aliasing as per EIP-6735 (see https://eips.ethereum.org/EIPS/eip-6735).

State Variables

OFFSET

uint160 internal constant OFFSET = uint160(0x1111000000000000000000000000000000001111);

Functions

toAlias

Convert a settlement layer address to roll-up layer alias address.

function toAlias(address account_) internal pure returns (address alias_);

Parameters

NameTypeDescription
account_addressThe address on the settlement layer that will trigger a tx to the roll-up layer.

Returns

NameTypeDescription
alias_addressThe address on the roll-up layer that will be the msg.sender.

fromAlias

Convert a roll-up layer alias address to settlement layer address.

function fromAlias(address alias_) internal pure returns (address account_);

Parameters

NameTypeDescription
alias_addressThe address on the roll-up layer that will be the msg.sender.

Returns

NameTypeDescription
account_addressThe address on the settlement layer that triggered the tx to the roll-up layer.