-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
first start for arb bridge contracts
- Loading branch information
1 parent
b05b7db
commit 3a3363d
Showing
5 changed files
with
4,432 additions
and
598 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,4 +66,6 @@ contract HATToken is IHATToken, ERC20Votes, ERC20Capped, Ownable { | |
super._mint(account, amount); | ||
} | ||
|
||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
|
||
import "./HATToken.sol"; | ||
import "@arbitrum/token-bridge-contracts/contracts/tokenbridge/ethereum/ICustomToken.sol"; | ||
|
||
contract HATTokenArbitrumBridgeL1 is ICustomToken, HATToken { | ||
/** functions for registring the token with the arbitrum bridge */ | ||
function isArbitrumEnabled() external view override returns (uint8) { | ||
return uint8(0xb1); | ||
} | ||
|
||
function registerTokenOnL2( | ||
address l2CustomTokenAddress, | ||
uint256 maxSubmissionCostForCustomGateway, | ||
uint256 maxSubmissionCostForRouter, | ||
uint256 maxGasForCustomGateway, | ||
uint256 maxGasForRouter, | ||
uint256 gasPriceBid, | ||
uint256 valueForGateway, | ||
uint256 valueForRouter, | ||
address creditBackAddress | ||
) public payable virtual override { | ||
IL1CustomGateway(gateway).registerTokenToL2{ value: valueForGateway }( | ||
l2CustomTokenAddress, | ||
maxGasForCustomGateway, | ||
gasPriceBid, | ||
maxSubmissionCostForCustomGateway, | ||
creditBackAddress | ||
); | ||
|
||
IGatewayRouter2(router).setGateway{ value: valueForRouter }( | ||
gateway, | ||
maxGasForRouter, | ||
gasPriceBid, | ||
maxSubmissionCostForRouter, | ||
creditBackAddress | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
|
||
import "./HATToken.sol"; | ||
import "@arbitrum/token-bridge-contracts/contracts/tokenbridge/arbitrum/IArbToken.sol"; | ||
|
||
contract HATTokenArbitrumBridgeL2 is IArbToken, HATToken { | ||
/** functions for registring the token with the arbitrum bridge */ | ||
} |
Oops, something went wrong.