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

refactor: create base signer and signer structs to group common data of EVM/Bitcoin signer and observer #2344

Merged
merged 13 commits into from
Jun 19, 2024

Conversation

ws4charlie
Copy link
Contributor

@ws4charlie ws4charlie commented Jun 17, 2024

Description

This refactor created three base structs below. The final goal is to use these reusable base structs to simply existing EVM/Bitcoin signers and observers.

  • Created base Signer as the base struct for all chain signers.
  • Created base Observer as the base struct for all chain observers.
  • Created base Logger struct that contain commonly used loggers by observers.

Type of change

  • 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 not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Include instructions and any relevant details so others can reproduce.

  • Tested CCTX in localnet
  • Tested in development environment
  • Go unit tests
  • Go integration tests
  • Tested via GitHub Actions

Checklist:

  • I have added unit tests that prove my fix feature works

@ws4charlie ws4charlie marked this pull request as draft June 17, 2024 15:26
@ws4charlie ws4charlie changed the title Refactor base signer observer refactor: create base signer and signer structs to group common data of EVM/Bitcoin signer and observer Jun 17, 2024
Copy link

codecov bot commented Jun 17, 2024

Codecov Report

Attention: Patch coverage is 95.85253% with 9 lines in your changes missing coverage. Please review.

Project coverage is 68.37%. Comparing base (d4a9f7d) to head (2e68884).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2344      +/-   ##
===========================================
+ Coverage    68.06%   68.37%   +0.30%     
===========================================
  Files          299      302       +3     
  Lines        18971    19178     +207     
===========================================
+ Hits         12913    13112     +199     
- Misses        5421     5426       +5     
- Partials       637      640       +3     
Files Coverage Δ
zetaclient/chains/base/signer.go 100.00% <100.00%> (ø)
zetaclient/chains/bitcoin/observer/observer.go 14.31% <100.00%> (ø)
zetaclient/chains/bitcoin/signer/signer.go 19.35% <100.00%> (ø)
zetaclient/chains/evm/signer/signer.go 53.97% <100.00%> (ø)
zetaclient/chains/evm/observer/observer.go 32.04% <66.66%> (ø)
zetaclient/chains/base/logger.go 95.12% <95.12%> (ø)
zetaclient/chains/base/observer.go 95.52% <95.52%> (ø)

@ws4charlie ws4charlie marked this pull request as ready for review June 17, 2024 19:27
Copy link
Member

@lumtis lumtis left a comment

Choose a reason for hiding this comment

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

LGTM, just a few comment regarding documentation

zetaclient/chains/base/observer.go Outdated Show resolved Hide resolved
zetaclient/chains/base/observer.go Outdated Show resolved Hide resolved
zetaclient/chains/base/signer.go Outdated Show resolved Hide resolved
@ws4charlie ws4charlie merged commit 2c76429 into develop Jun 19, 2024
19 checks passed
@ws4charlie ws4charlie deleted the refactor-base-signer-observer branch June 19, 2024 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants