minor changes
This commit is contained in:
parent
b9fc687822
commit
6a99fda774
|
@ -1,8 +1,8 @@
|
||||||
# Optimism-Compatible Token
|
# Optimism-Compatible Token
|
||||||
|
|
||||||
ERC-20 token with extra features, capable of being bridged to an
|
EVM-compatible ERC-20 token with extra features, capable of being bridged to an
|
||||||
Optimism-compatible L2. Built for Base blockchain and the 10Grans token,
|
Optimism-compatible L2. Built for Base blockchain and the 10Grans token,
|
||||||
specifically but general.
|
but general enough to be reused.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
npx hardhat compile
|
npx hardhat compile
|
||||||
|
|
|
@ -43,6 +43,7 @@ contract L2Token is AbstractToken, IOptimismMintableERC20 {
|
||||||
/// @notice Allows the StandardBridge on this network to mint tokens.
|
/// @notice Allows the StandardBridge on this network to mint tokens.
|
||||||
/// @param _to Address to mint tokens to.
|
/// @param _to Address to mint tokens to.
|
||||||
/// @param _amount Amount of tokens to mint.
|
/// @param _amount Amount of tokens to mint.
|
||||||
|
// ONLY bridge is allowed to mint, for security reasons.
|
||||||
function mint(
|
function mint(
|
||||||
address _to,
|
address _to,
|
||||||
uint256 _amount
|
uint256 _amount
|
||||||
|
@ -59,6 +60,7 @@ contract L2Token is AbstractToken, IOptimismMintableERC20 {
|
||||||
/// @notice Allows the StandardBridge on this network to burn tokens.
|
/// @notice Allows the StandardBridge on this network to burn tokens.
|
||||||
/// @param _from Address to burn tokens from.
|
/// @param _from Address to burn tokens from.
|
||||||
/// @param _amount Amount of tokens to burn.
|
/// @param _amount Amount of tokens to burn.
|
||||||
|
// ONLY bridge is allowed to burn, for security reasons.
|
||||||
function burn(
|
function burn(
|
||||||
address _from,
|
address _from,
|
||||||
uint256 _amount
|
uint256 _amount
|
||||||
|
@ -100,12 +102,14 @@ contract L2Token is AbstractToken, IOptimismMintableERC20 {
|
||||||
|
|
||||||
/// @custom:legacy
|
/// @custom:legacy
|
||||||
/// @notice Legacy getter for the remote token. Use REMOTE_TOKEN going forward.
|
/// @notice Legacy getter for the remote token. Use REMOTE_TOKEN going forward.
|
||||||
|
// Turns out Base blockchain needed this.
|
||||||
function l1Token() public virtual view returns (address) {
|
function l1Token() public virtual view returns (address) {
|
||||||
return REMOTE_TOKEN;
|
return REMOTE_TOKEN;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @custom:legacy
|
/// @custom:legacy
|
||||||
/// @notice Legacy getter for the bridge. Use BRIDGE going forward.
|
/// @notice Legacy getter for the bridge. Use BRIDGE going forward.
|
||||||
|
// Turns out Base blockchain needed this.
|
||||||
function l2Bridge() public virtual view returns (address) {
|
function l2Bridge() public virtual view returns (address) {
|
||||||
return BRIDGE;
|
return BRIDGE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue