L2 mint cap, vars to immutable
This commit is contained in:
parent
e0f8553b57
commit
e77f44b3c1
|
@ -5,8 +5,9 @@ import "./TenGransAbstractToken.sol";
|
||||||
import "@arbitrum/token-bridge-contracts/contracts/tokenbridge/arbitrum/IArbToken.sol";
|
import "@arbitrum/token-bridge-contracts/contracts/tokenbridge/arbitrum/IArbToken.sol";
|
||||||
|
|
||||||
contract TenGransArbToken is AbstractGrans, IArbToken {
|
contract TenGransArbToken is AbstractGrans, IArbToken {
|
||||||
address public l2Gateway;
|
uint256 public immutable cap = 15_000 * 10 ** 18;
|
||||||
address public override l1Address;
|
address public immutable l2Gateway;
|
||||||
|
address public immutable override l1Address;
|
||||||
|
|
||||||
modifier onlyGateway() {
|
modifier onlyGateway() {
|
||||||
require(msg.sender == l2Gateway, "ONLY_l2GATEWAY");
|
require(msg.sender == l2Gateway, "ONLY_l2GATEWAY");
|
||||||
|
@ -19,6 +20,7 @@ contract TenGransArbToken is AbstractGrans, IArbToken {
|
||||||
}
|
}
|
||||||
|
|
||||||
function bridgeMint(address account, uint256 amount) external virtual override onlyGateway {
|
function bridgeMint(address account, uint256 amount) external virtual override onlyGateway {
|
||||||
|
require(amount + totalSupply() <= cap, "CAP_EXCEEDED");
|
||||||
_mint(account, amount);
|
_mint(account, amount);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue