Skip to content

Conversation

@chrismaree
Copy link
Member

  • nit
  • nit
  • nit
  • Update contracts/HubPool.sol
  • review nit
  • review nit
  • feat(hubpool): Refactor hub pool to use 1D bitmap integer
  • nit
  • WIP
  • review nit
  • review nit
  • nit
  • nit
  • nit
  • nit
  • nit
  • nit
  • WIP
  • nit
  • nit
  • nit
  • nit
  • nit
  • nit
  • nit
  • nit
  • nit
  • nit
  • nit
  • WIP
  • nit
  • nit
  • WIP
  • nit
  • nit
  • nit
  • nit
  • nit
  • nit
  • nit
  • nit
  • feat(slack-config): Add sync method and liquidity utilization
  • nit
  • Delete settings.json
  • nit
  • nit
  • nit
  • nit
  • nit
  • nit
  • nit
  • nit
  • nit
  • nit
  • nit
  • nit
  • nit
  • nit
  • nit
  • nit
  • feat: Add arbitrum adapter

chrismaree and others added 30 commits January 28, 2022 14:04
Signed-off-by: chrismaree <christopher.maree@gmail.com>
Signed-off-by: chrismaree <christopher.maree@gmail.com>
Signed-off-by: chrismaree <christopher.maree@gmail.com>
Co-authored-by: Matt Rice <matthewcrice32@gmail.com>
Signed-off-by: chrismaree <christopher.maree@gmail.com>
Signed-off-by: chrismaree <christopher.maree@gmail.com>
Signed-off-by: chrismaree <christopher.maree@gmail.com>
Signed-off-by: chrismaree <christopher.maree@gmail.com>
Signed-off-by: chrismaree <christopher.maree@gmail.com>
Signed-off-by: chrismaree <christopher.maree@gmail.com>
Signed-off-by: chrismaree <christopher.maree@gmail.com>
Signed-off-by: chrismaree <christopher.maree@gmail.com>
Signed-off-by: chrismaree <christopher.maree@gmail.com>
Signed-off-by: chrismaree <christopher.maree@gmail.com>
Signed-off-by: chrismaree <christopher.maree@gmail.com>
Signed-off-by: chrismaree <christopher.maree@gmail.com>
Signed-off-by: chrismaree <christopher.maree@gmail.com>
Signed-off-by: chrismaree <christopher.maree@gmail.com>
Signed-off-by: chrismaree <christopher.maree@gmail.com>
Signed-off-by: chrismaree <christopher.maree@gmail.com>
Signed-off-by: chrismaree <christopher.maree@gmail.com>
Signed-off-by: chrismaree <christopher.maree@gmail.com>
Signed-off-by: chrismaree <christopher.maree@gmail.com>
Signed-off-by: chrismaree <christopher.maree@gmail.com>
Signed-off-by: chrismaree <christopher.maree@gmail.com>
Signed-off-by: chrismaree <christopher.maree@gmail.com>
Signed-off-by: chrismaree <christopher.maree@gmail.com>
Signed-off-by: chrismaree <christopher.maree@gmail.com>
Signed-off-by: chrismaree <christopher.maree@gmail.com>
Signed-off-by: chrismaree <christopher.maree@gmail.com>
Signed-off-by: chrismaree <christopher.maree@gmail.com>
Signed-off-by: chrismaree <christopher.maree@gmail.com>
Signed-off-by: chrismaree <christopher.maree@gmail.com>
Signed-off-by: chrismaree <christopher.maree@gmail.com>
Signed-off-by: chrismaree <christopher.maree@gmail.com>
Signed-off-by: chrismaree <christopher.maree@gmail.com>
Signed-off-by: chrismaree <christopher.maree@gmail.com>
Signed-off-by: chrismaree <christopher.maree@gmail.com>
Signed-off-by: chrismaree <christopher.maree@gmail.com>
Signed-off-by: chrismaree <christopher.maree@gmail.com>
Signed-off-by: chrismaree <christopher.maree@gmail.com>
Signed-off-by: chrismaree <christopher.maree@gmail.com>
Signed-off-by: chrismaree <christopher.maree@gmail.com>
Signed-off-by: chrismaree <christopher.maree@gmail.com>
Signed-off-by: chrismaree <christopher.maree@gmail.com>
emit l2RefundL2AddressSet(l2RefundL2Address);
}

function relayMessage(address target, bytes memory message) external payable override onlyHubPool {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: should make this function nonReentrant since it makes an external call?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ye, for consistency sake. will revert.


function relayMessage(address target, bytes memory message) external payable override onlyHubPool {
uint256 requiredL1CallValue = l2MaxSubmissionCost + l2GasPrice * l2GasLimit;
require(address(this).balance >= requiredL1CallValue, "Insufficient ETH balance");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think we'' have an EOA send ETH to this contract prior to cross chain calls, or will the HubPool send ETH over?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EOA just drops funds on it I think.


function relayMessage(address target, bytes memory message) external payable override onlyHubPool {
uint256 requiredL1CallValue = l2MaxSubmissionCost + l2GasPrice * l2GasLimit;
require(address(this).balance >= requiredL1CallValue, "Insufficient ETH balance");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WDYT about making this required L1 call value publicly queryable, for a potential EOA's convenience? We do this with the cross-chain oracle here but it may not be useful for this case if the HubPool deterministically decides when to send over ETH

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ye, that's a good idea. it will also let us automate when to top up the contract. I'll refactor now.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont, however, think this needs to be nonReentrantView like your method. that's way overkill IMHO


event L2GasPriceSet(uint256 newL2GasPrice);

event l2RefundL2AddressSet(address newL2RefundL2Address);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: forgot to capitalize this event

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<3

Copy link
Member

@nicholaspai nicholaspai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work, my only questions are surrounding the design and plan for funding the Arbitrum_Adapter with ETH to ensure createRetryableTicket works!

Signed-off-by: chrismaree <christopher.maree@gmail.com>
@chrismaree chrismaree merged commit e2e0dd6 into master Feb 11, 2022
@chrismaree chrismaree deleted the chrismaree/arbitrum-l1-adapter branch February 11, 2022 21:29
pxrl pushed a commit that referenced this pull request Feb 17, 2024
pxrl added a commit that referenced this pull request Feb 17, 2024
Change supplied by Nick.

Co-authored-by: nicholaspai <9457025+nicholaspai@users.noreply.github.com>
pxrl pushed a commit that referenced this pull request Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants