10grans-ng/contracts/TenGransArbToken.sol

29 lines
835 B
Solidity
Raw Normal View History

2023-08-13 15:15:29 +00:00
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.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;
modifier onlyGateway() {
require(msg.sender == l2Gateway, "ONLY_l2GATEWAY");
_;
}
constructor(address _l2Gateway, address _l1Address) AbstractGrans() {
l2Gateway = _l2Gateway;
l1Address = _l1Address;
}
function bridgeMint(address account, uint256 amount) external virtual override onlyGateway {
_mint(account, amount);
}
function bridgeBurn(address account, uint256 amount) external virtual override onlyGateway {
_burn(account, amount);
}
}