Skip to content

feat: match across zero address output tokens #29

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Mar 27, 2025

Conversation

mpetrun5
Copy link
Collaborator

Description

Related Issue Or Context

Closes: #24

How Has This Been Tested? Testing details.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation

Checklist:

  • I have commented my code, particularly in hard-to-understand areas.
  • I have ensured that all acceptance criteria (or expected behavior) from issue are met
  • I have updated the documentation locally and in docs.
  • I have added tests to cover my changes.
  • I have ensured that all the checks are passing and green, I've signed the CLA bot

Copy link

Go Test coverage is 56.0 %\ ✨ ✨ ✨

@@ -237,6 +245,15 @@ func (h *AcrossMessageHandler) minimalConfirmations(d *events.AcrossDeposit) (ui
return 0, err
}

if common.Bytes2Hex(d.OutputToken[:]) == ZERO_ADDRESS {
Copy link
Member

Choose a reason for hiding this comment

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

isn't output token actually bytes32 and not an address?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I checked contract and tested on sepolia.
It is address right now.
I guess they didn't update it yet.

Copy link
Member

Choose a reason for hiding this comment

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

but you have defined it as bytes32:

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The event is [32]byte, but the function on hub pool returns address.
I convert the address to back to [32]byte to assign to the event if needed.

@mpetrun5 mpetrun5 requested a review from mpetrunic March 26, 2025 14:56
Copy link

Go Test coverage is 56.0 %\ ✨ ✨ ✨

@mpetrunic mpetrunic merged commit 8c6cd21 into main Mar 27, 2025
7 checks passed
@mpetrunic mpetrunic deleted the mpetrun5/across-token-matching branch March 27, 2025 08:52
This was referenced Apr 9, 2025
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.

Match zero address with token for across orders
3 participants