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

🪣 Create web3 domain service libs #7504

Closed
Tracked by #6802
Rotorsoft opened this issue Apr 18, 2024 · 4 comments · Fixed by #10504
Closed
Tracked by #6802

🪣 Create web3 domain service libs #7504

Rotorsoft opened this issue Apr 18, 2024 · 4 comments · Fixed by #10504
Assignees
Labels
bucket 🪣 tracking ticket for several subtasks enhancement New feature or request

Comments

@Rotorsoft
Copy link
Contributor

Rotorsoft commented Apr 18, 2024

Description

Create domain service libraries to isolate Web3 dependencies, allowing them to be easily mocked during unit testing.

Objective

Eliminate all Web3 dependencies (Web3.js, Ethers.js, Cosmos, Solana) from libs/model and simplify import structures.

Services to refactor

  • Common Protocol
    • Stake
    • Contests
    • Namespace
  • Snapshots
  • Token Balance Cache

Engineering Requirements

Each new library should consider:

  • Encapsulate dependencies to web3 modules
  • Define a clean interface (mockable)
  • Unit tests against a real Web3 chain
  • Avoid barrel files with aliases - flat structure
@Rotorsoft Rotorsoft added enhancement New feature or request needs estimate labels Apr 18, 2024
@Rotorsoft Rotorsoft changed the title Create web3 domain service Create web3 domain service libs Jul 29, 2024
@Rotorsoft Rotorsoft changed the title Create web3 domain service libs 🪣 Create web3 domain service libs Jul 29, 2024
@Rotorsoft Rotorsoft added the bucket 🪣 tracking ticket for several subtasks label Jul 29, 2024
@Rotorsoft
Copy link
Contributor Author

@timolegros should we link this ticket to the web3 refactoring work you have in mind?

@Rotorsoft
Copy link
Contributor Author

Done in #9933

@timolegros
Copy link
Collaborator

@Rotorsoft I don't believe this ticket is complete. Note in #9933:

Sub-ticket of #7504. Difference is this ticket is not focused on moving existing Web3 references to the new lib.

@Rotorsoft
Copy link
Contributor Author

Reopening per comments above ☝️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bucket 🪣 tracking ticket for several subtasks enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants