make bridge registration onlyOwner, add config for bridge info
This commit is contained in:
parent
39d816ee50
commit
e0f8553b57
|
@ -25,12 +25,14 @@ interface IGatewayRouter2 {
|
|||
}
|
||||
|
||||
contract TenGransEthToken is AbstractGrans, ICustomToken {
|
||||
address public gateway;
|
||||
address public router;
|
||||
address public immutable gateway;
|
||||
address public immutable router;
|
||||
bool private shouldRegisterGateway;
|
||||
|
||||
constructor() AbstractGrans() {
|
||||
_mint(msg.sender, 15000 * 10 ** decimals());
|
||||
constructor(address _gateway, address _router) AbstractGrans() {
|
||||
gateway = _gateway;
|
||||
router = _router;
|
||||
_mint(msg.sender, 15_000 * 10 ** 18);
|
||||
}
|
||||
|
||||
function balanceOf(address account) public view virtual override(AbstractGrans, ICustomToken) returns (uint256) {
|
||||
|
@ -57,7 +59,7 @@ contract TenGransEthToken is AbstractGrans, ICustomToken {
|
|||
uint256 valueForGateway,
|
||||
uint256 valueForRouter,
|
||||
address creditBackAddress
|
||||
) public payable override {
|
||||
) public payable override onlyOwner {
|
||||
// we temporarily set `shouldRegisterGateway` to true for the callback in registerTokenToL2 to succeed
|
||||
bool prev = shouldRegisterGateway;
|
||||
shouldRegisterGateway = true;
|
||||
|
|
Loading…
Reference in New Issue