Skip to content
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

feat: add an ignored token list #121

Merged
merged 6 commits into from
Jul 15, 2024
Merged

Conversation

colinlyguo
Copy link
Member

@colinlyguo colinlyguo commented Jul 11, 2024

Purpose or design rationale of this PR

feature:

  1. only ignoring transfer events for now (minimum alert changes).
  2. still sending an alert, with a "token ignored" flag for easier check.

TODOs:

  • Local syncing.
  • Testing the regression bad case.

PR title

Your PR title must follow conventional commits (as we are doing squash merge for each PR), so it must start with one of the following types:

  • feat: A new feature

Deployment tag versioning

Has tag in common/version.go been updated or have you added bump-version label to this PR?

  • Yes

Breaking change label

Does this PR have the breaking-change label?

  • No, this PR is not a breaking change

@colinlyguo colinlyguo changed the title feat: add a ignored token list feat: add an ignored token list Jul 11, 2024
Copy link

codecov bot commented Jul 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 40.82%. Comparing base (70a1d98) to head (66dd928).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #121   +/-   ##
=======================================
  Coverage   40.82%   40.82%           
=======================================
  Files           5        5           
  Lines         605      605           
=======================================
  Hits          247      247           
  Misses        349      349           
  Partials        9        9           
Flag Coverage Δ
chain-monitor 40.82% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@colinlyguo
Copy link
Member Author

testing result, can trigger the alarm and continue:

:bangbang: Gateway event and transfer event check failed
• token type: TokenTypeERC20
• layer type: Layer1
• event type: EventTypeUnknown
• block number: 20240334
• tx_hash: 0x275af83a9d9f1acdaa726b564a0852cc6c81f87cdf51efa9ac12c6ccb12a39e0
• msg_hash: 0x0000000000000000000000000000000000000000000000000000000000000000
• transfer balance: -30606497
• gateway balance: <nil>
• token address: 0x70fDD35857f4A765C1416ABa83ed5B19e49F27b9
• token ignored: true
• err info:the gateway event associated with the transfer event does not exist

Thegaram
Thegaram previously approved these changes Jul 12, 2024
internal/logic/assembler/transfer_event_validator.go Outdated Show resolved Hide resolved
georgehao
georgehao previously approved these changes Jul 12, 2024
@colinlyguo colinlyguo dismissed stale reviews from georgehao and Thegaram via 66dd928 July 12, 2024 16:32
Thegaram
Thegaram previously approved these changes Jul 12, 2024
@colinlyguo colinlyguo merged commit e760b52 into main Jul 15, 2024
3 checks passed
@colinlyguo colinlyguo deleted the feat-add-ignoredTokens-to-config branch July 15, 2024 09:58
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