IBridgedStandardERC20

Git Source

Author: Matter Labs

The interface for the BridgedStandardERC20 contract

Note: security-contact: security@matterlabs.dev

Functions

reinitializeToken

A method to be called by the governor to update the token's metadata.

The _version must be exactly the version higher by 1 than the current version. This is needed to ensure that the governor can not accidentally disable future reinitialization of the token.

function reinitializeToken(
  ERC20Getters calldata _availableGetters,
  string calldata _newName,
  string calldata _newSymbol,
  uint8 _version
) external;

Parameters

NameTypeDescription
_availableGettersERC20GettersThe getters that the token has.
_newNamestringThe new name of the token.
_newSymbolstringThe new symbol of the token.
_versionuint8The version of the token that will be initialized.

Structs

ERC20Getters

Used to explicitly separate which getters the token has and which it does not.

Different tokens in L1 can implement or not implement getter function as name/symbol/decimals,

Our goal is to store all the getters that L1 token implements, and for others, we keep it as an unimplemented method.

Describes whether there is a specific getter in the token.

struct ERC20Getters {
  bool ignoreName;
  bool ignoreSymbol;
  bool ignoreDecimals;
}