Skip to content

Commit

Permalink
Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-kaufman committed Jul 11, 2024
1 parent 909d7d9 commit b15abfa
Show file tree
Hide file tree
Showing 11 changed files with 2,210 additions and 2 deletions.
2 changes: 0 additions & 2 deletions contracts/token/HATToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,4 @@ contract HATToken is IHATToken, ERC20Votes, ERC20Capped, Ownable {
super._mint(account, amount);
}



}
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 |




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 |




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 |




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 |




Loading

0 comments on commit b15abfa

Please sign in to comment.