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 {
|
contract TenGransEthToken is AbstractGrans, ICustomToken {
|
||||||
address public gateway;
|
address public immutable gateway;
|
||||||
address public router;
|
address public immutable router;
|
||||||
bool private shouldRegisterGateway;
|
bool private shouldRegisterGateway;
|
||||||
|
|
||||||
constructor() AbstractGrans() {
|
constructor(address _gateway, address _router) AbstractGrans() {
|
||||||
_mint(msg.sender, 15000 * 10 ** decimals());
|
gateway = _gateway;
|
||||||
|
router = _router;
|
||||||
|
_mint(msg.sender, 15_000 * 10 ** 18);
|
||||||
}
|
}
|
||||||
|
|
||||||
function balanceOf(address account) public view virtual override(AbstractGrans, ICustomToken) returns (uint256) {
|
function balanceOf(address account) public view virtual override(AbstractGrans, ICustomToken) returns (uint256) {
|
||||||
|
@ -57,7 +59,7 @@ contract TenGransEthToken is AbstractGrans, ICustomToken {
|
||||||
uint256 valueForGateway,
|
uint256 valueForGateway,
|
||||||
uint256 valueForRouter,
|
uint256 valueForRouter,
|
||||||
address creditBackAddress
|
address creditBackAddress
|
||||||
) public payable override {
|
) public payable override onlyOwner {
|
||||||
// we temporarily set `shouldRegisterGateway` to true for the callback in registerTokenToL2 to succeed
|
// we temporarily set `shouldRegisterGateway` to true for the callback in registerTokenToL2 to succeed
|
||||||
bool prev = shouldRegisterGateway;
|
bool prev = shouldRegisterGateway;
|
||||||
shouldRegisterGateway = true;
|
shouldRegisterGateway = true;
|
||||||
|
|
Loading…
Reference in New Issue