-
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.
- Loading branch information
1 parent
909d7d9
commit b15abfa
Showing
11 changed files
with
2,210 additions
and
2 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,6 +66,4 @@ contract HATToken is IHATToken, ERC20Votes, ERC20Capped, Ownable { | |
super._mint(account, amount); | ||
} | ||
|
||
|
||
|
||
} |
66 changes: 66 additions & 0 deletions
66
docs/dodoc/token-bridge-contracts/contracts/tokenbridge/arbitrum/IArbToken.md
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,66 @@ | ||
# IArbToken | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
## Methods | ||
|
||
### bridgeBurn | ||
|
||
```solidity | ||
function bridgeBurn(address account, uint256 amount) external nonpayable | ||
``` | ||
|
||
should decrease token supply by amount, and should (probably) only be callable by the L1 bridge. | ||
|
||
|
||
|
||
#### Parameters | ||
|
||
| Name | Type | Description | | ||
|---|---|---| | ||
| account | address | undefined | | ||
| amount | uint256 | undefined | | ||
|
||
### bridgeMint | ||
|
||
```solidity | ||
function bridgeMint(address account, uint256 amount) external nonpayable | ||
``` | ||
|
||
should increase token supply by amount, and should (probably) only be callable by the L1 bridge. | ||
|
||
|
||
|
||
#### Parameters | ||
|
||
| Name | Type | Description | | ||
|---|---|---| | ||
| account | address | undefined | | ||
| amount | uint256 | undefined | | ||
|
||
### l1Address | ||
|
||
```solidity | ||
function l1Address() external view returns (address) | ||
``` | ||
|
||
|
||
|
||
|
||
|
||
|
||
#### Returns | ||
|
||
| Name | Type | Description | | ||
|---|---|---| | ||
| _0 | address | address of layer 1 token | | ||
|
||
|
||
|
||
|
32 changes: 32 additions & 0 deletions
32
...c/token-bridge-contracts/contracts/tokenbridge/ethereum/ArbitrumEnabledToken.md
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,32 @@ | ||
# ArbitrumEnabledToken | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
## Methods | ||
|
||
### isArbitrumEnabled | ||
|
||
```solidity | ||
function isArbitrumEnabled() external view returns (uint8) | ||
``` | ||
|
||
should return `0xb1` if token is enabled for arbitrum gateways | ||
|
||
*Previous implmentation used to return `uint8(0xa4b1)`, however that causes compile time error in Solidity 0.8. due to type mismatch. In current version `uint8(0xb1)` shall be returned, which results in no change as that's the same value as truncated `uint8(0xa4b1)`.* | ||
|
||
|
||
#### Returns | ||
|
||
| Name | Type | Description | | ||
|---|---|---| | ||
| _0 | uint8 | undefined | | ||
|
||
|
||
|
||
|
102 changes: 102 additions & 0 deletions
102
docs/dodoc/token-bridge-contracts/contracts/tokenbridge/ethereum/ICustomToken.md
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,102 @@ | ||
# ICustomToken | ||
|
||
|
||
|
||
> Minimum expected interface for L1 custom token (see TestCustomTokenL1.sol for an example implementation) | ||
|
||
|
||
|
||
|
||
## Methods | ||
|
||
### balanceOf | ||
|
||
```solidity | ||
function balanceOf(address account) external view returns (uint256) | ||
``` | ||
|
||
|
||
|
||
|
||
|
||
#### Parameters | ||
|
||
| Name | Type | Description | | ||
|---|---|---| | ||
| account | address | undefined | | ||
|
||
#### Returns | ||
|
||
| Name | Type | Description | | ||
|---|---|---| | ||
| _0 | uint256 | undefined | | ||
|
||
### isArbitrumEnabled | ||
|
||
```solidity | ||
function isArbitrumEnabled() external view returns (uint8) | ||
``` | ||
|
||
should return `0xb1` if token is enabled for arbitrum gateways | ||
|
||
*Previous implmentation used to return `uint8(0xa4b1)`, however that causes compile time error in Solidity 0.8. due to type mismatch. In current version `uint8(0xb1)` shall be returned, which results in no change as that's the same value as truncated `uint8(0xa4b1)`.* | ||
|
||
|
||
#### Returns | ||
|
||
| Name | Type | Description | | ||
|---|---|---| | ||
| _0 | uint8 | undefined | | ||
|
||
### registerTokenOnL2 | ||
|
||
```solidity | ||
function registerTokenOnL2(address l2CustomTokenAddress, uint256 maxSubmissionCostForCustomBridge, uint256 maxSubmissionCostForRouter, uint256 maxGasForCustomBridge, uint256 maxGasForRouter, uint256 gasPriceBid, uint256 valueForGateway, uint256 valueForRouter, address creditBackAddress) external payable | ||
``` | ||
|
||
Should make an external call to EthERC20Bridge.registerCustomL2Token | ||
|
||
|
||
|
||
#### Parameters | ||
|
||
| Name | Type | Description | | ||
|---|---|---| | ||
| l2CustomTokenAddress | address | undefined | | ||
| maxSubmissionCostForCustomBridge | uint256 | undefined | | ||
| maxSubmissionCostForRouter | uint256 | undefined | | ||
| maxGasForCustomBridge | uint256 | undefined | | ||
| maxGasForRouter | uint256 | undefined | | ||
| gasPriceBid | uint256 | undefined | | ||
| valueForGateway | uint256 | undefined | | ||
| valueForRouter | uint256 | undefined | | ||
| creditBackAddress | address | undefined | | ||
|
||
### transferFrom | ||
|
||
```solidity | ||
function transferFrom(address sender, address recipient, uint256 amount) external nonpayable returns (bool) | ||
``` | ||
|
||
|
||
|
||
|
||
|
||
#### Parameters | ||
|
||
| Name | Type | Description | | ||
|---|---|---| | ||
| sender | address | undefined | | ||
| recipient | address | undefined | | ||
| amount | uint256 | undefined | | ||
|
||
#### Returns | ||
|
||
| Name | Type | Description | | ||
|---|---|---| | ||
| _0 | bool | undefined | | ||
|
||
|
||
|
||
|
119 changes: 119 additions & 0 deletions
119
.../dodoc/token-bridge-contracts/contracts/tokenbridge/ethereum/L1MintableToken.md
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,119 @@ | ||
# L1MintableToken | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
## Methods | ||
|
||
### balanceOf | ||
|
||
```solidity | ||
function balanceOf(address account) external view returns (uint256) | ||
``` | ||
|
||
|
||
|
||
|
||
|
||
#### Parameters | ||
|
||
| Name | Type | Description | | ||
|---|---|---| | ||
| account | address | undefined | | ||
|
||
#### Returns | ||
|
||
| Name | Type | Description | | ||
|---|---|---| | ||
| _0 | uint256 | undefined | | ||
|
||
### bridgeMint | ||
|
||
```solidity | ||
function bridgeMint(address account, uint256 amount) external nonpayable | ||
``` | ||
|
||
|
||
|
||
|
||
|
||
#### Parameters | ||
|
||
| Name | Type | Description | | ||
|---|---|---| | ||
| account | address | undefined | | ||
| amount | uint256 | undefined | | ||
|
||
### isArbitrumEnabled | ||
|
||
```solidity | ||
function isArbitrumEnabled() external view returns (uint8) | ||
``` | ||
|
||
should return `0xb1` if token is enabled for arbitrum gateways | ||
|
||
*Previous implmentation used to return `uint8(0xa4b1)`, however that causes compile time error in Solidity 0.8. due to type mismatch. In current version `uint8(0xb1)` shall be returned, which results in no change as that's the same value as truncated `uint8(0xa4b1)`.* | ||
|
||
|
||
#### Returns | ||
|
||
| Name | Type | Description | | ||
|---|---|---| | ||
| _0 | uint8 | undefined | | ||
|
||
### registerTokenOnL2 | ||
|
||
```solidity | ||
function registerTokenOnL2(address l2CustomTokenAddress, uint256 maxSubmissionCostForCustomBridge, uint256 maxSubmissionCostForRouter, uint256 maxGasForCustomBridge, uint256 maxGasForRouter, uint256 gasPriceBid, uint256 valueForGateway, uint256 valueForRouter, address creditBackAddress) external payable | ||
``` | ||
|
||
Should make an external call to EthERC20Bridge.registerCustomL2Token | ||
|
||
|
||
|
||
#### Parameters | ||
|
||
| Name | Type | Description | | ||
|---|---|---| | ||
| l2CustomTokenAddress | address | undefined | | ||
| maxSubmissionCostForCustomBridge | uint256 | undefined | | ||
| maxSubmissionCostForRouter | uint256 | undefined | | ||
| maxGasForCustomBridge | uint256 | undefined | | ||
| maxGasForRouter | uint256 | undefined | | ||
| gasPriceBid | uint256 | undefined | | ||
| valueForGateway | uint256 | undefined | | ||
| valueForRouter | uint256 | undefined | | ||
| creditBackAddress | address | undefined | | ||
|
||
### transferFrom | ||
|
||
```solidity | ||
function transferFrom(address sender, address recipient, uint256 amount) external nonpayable returns (bool) | ||
``` | ||
|
||
|
||
|
||
|
||
|
||
#### Parameters | ||
|
||
| Name | Type | Description | | ||
|---|---|---| | ||
| sender | address | undefined | | ||
| recipient | address | undefined | | ||
| amount | uint256 | undefined | | ||
|
||
#### Returns | ||
|
||
| Name | Type | Description | | ||
|---|---|---| | ||
| _0 | bool | undefined | | ||
|
||
|
||
|
||
|
Oops, something went wrong.