L2 mint cap, vars to immutable

This commit is contained in:
Moon Man 2023-08-13 18:57:02 -04:00
parent e0f8553b57
commit e77f44b3c1
1 changed files with 4 additions and 2 deletions

View File

@ -5,8 +5,9 @@ import "./TenGransAbstractToken.sol";
import "@arbitrum/token-bridge-contracts/contracts/tokenbridge/arbitrum/IArbToken.sol";
contract TenGransArbToken is AbstractGrans, IArbToken {
address public l2Gateway;
address public override l1Address;
uint256 public immutable cap = 15_000 * 10 ** 18;
address public immutable l2Gateway;
address public immutable override l1Address;
modifier onlyGateway() {
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 {
require(amount + totalSupply() <= cap, "CAP_EXCEEDED");
_mint(account, amount);
}