-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improve(Arbitrum_CustomGasToken_Adapter): Handle non-18 custom gas to…
…ken precision (#589) * improve(Arbitrum_CustomGasToken_Adapter): Handle non-18 custom gas token precision Based on this [Inbox](https://github.com/OffchainLabs/nitro-contracts/blob/fbbcef09c95f69decabaced3da683f987902f3e2/src/bridge/AbsInbox.sol#L237) code which implies that the `tokenTotalFeeAmount` passed into the [ERC20Inbox](https://github.com/OffchainLabs/nitro-contracts/blob/fbbcef09c95f69decabaced3da683f987902f3e2/src/bridge/ERC20Inbox.sol#L85) should be in the custom gas token's precision while the `maxSubmissionCost`, `gasPrice`, and `gasLimit` should all be same as for normal Arbitrum messages * Update contracts/chain-adapters/Arbitrum_CustomGasToken_Adapter.sol * Update contracts/chain-adapters/Arbitrum_CustomGasToken_Adapter.sol * Update Arbitrum_CustomGasToken_Adapter.sol * support deecimals > 18 * divCeil instead of divFLoor
- Loading branch information
1 parent
5c779a9
commit bf55da0
Showing
1 changed file
with
38 additions
and
4 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