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

[stakingindex] implement indexer for new staking contract #4237

Merged
merged 15 commits into from
Jun 7, 2024

Conversation

envestcc
Copy link
Member

@envestcc envestcc commented Apr 17, 2024

Description

The new version of the staking contract is coming, mainly removing the restrictions on the staking amount, embracing liquidity-hub better. Therefore a new indexer is also required.

Three main changes:

  • add a common pkg pkg/util/abiutil to handle data structure convertion between contract and go
  • add indexer common to implement some basic for all contract indexers
  • add the new staking indexer for the new staking contract

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • [] make test
  • [] fullsync
  • [] Other test (please specify)

Test Configuration:

  • Firmware version:
  • Hardware:
  • Toolchain:
  • SDK:

Checklist:

  • [] My code follows the style guidelines of this project
  • [] I have performed a self-review of my code
  • [] I have commented my code, particularly in hard-to-understand areas
  • [] I have made corresponding changes to the documentation
  • [] My changes generate no new warnings
  • [] I have added tests that prove my fix is effective or that my feature works
  • [] New and existing unit tests pass locally with my changes
  • [] Any dependent changes have been merged and published in downstream modules

@envestcc envestcc changed the title [stakingindex] initialize indexer framework for new staking contract [stakingindex] implement indexer for new staking contract Apr 19, 2024
@envestcc envestcc marked this pull request as ready for review April 19, 2024 00:56
systemcontractindex/stakingindex/bucket.go Outdated Show resolved Hide resolved
systemcontractindex/stakingindex/bucket.go Outdated Show resolved Hide resolved
systemcontractindex/stakingindex/cache.go Outdated Show resolved Hide resolved
systemcontractindex/stakingindex/cache.go Outdated Show resolved Hide resolved
systemcontractindex/stakingindex/index.go Outdated Show resolved Hide resolved
systemcontractindex/stakingindex/index.go Outdated Show resolved Hide resolved
systemcontractindex/stakingindex/index.go Outdated Show resolved Hide resolved
systemcontractindex/stakingindex/index.go Show resolved Hide resolved
systemcontractindex/common.go Outdated Show resolved Hide resolved
systemcontractindex/stakingindex/index.go Show resolved Hide resolved
Copy link

sonarcloud bot commented Jun 7, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
4.9% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

@envestcc envestcc merged commit 2f8f01a into iotexproject:master Jun 7, 2024
2 of 3 checks passed
@envestcc envestcc deleted the stakingindexer branch June 7, 2024 13:38
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