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

Polkadot API (PAPI) Integration PR #2335

Open
wants to merge 95 commits into
base: main
Choose a base branch
from
Open

Polkadot API (PAPI) Integration PR #2335

wants to merge 95 commits into from

Conversation

rossbulat
Copy link
Collaborator

@rossbulat rossbulat commented Nov 16, 2024

This PR integrates Polkadot API into the staking dashboard, replacing and discontinuing Polkadot JS API.

Note: This refactor will have no effect on end users.

  • Initialisation
  • Constants
  • Runtime APIs
  • Storage Queries
  • Transaction Submission

Commit Log

  • Initialise Polkadot API with Smoldot & Websocket Support, and retrieve chain spec.
  • Expose untyped API client.
  • Destroy pApi on disconnect.
  • Fetch dashboard constants via pApi.
  • Fetch the active era via pApi.
  • Fetch network metadata via pApi.
  • Move activeEra logic to a Subscription class.
  • Refactor BlockNumber Subscription to pApi class.
  • Add RXJS for typing and observable utility support.
  • Refactor NetworkMetrics Subscription to pApi class.
  • Refactor PoolsConfig Subscription to pApi class.
  • Refactor StakingMetrics Subscription to pApi class.
  • Fetch chain version metadata and add to chain specs.
  • Refactor fetching of validator entries via ValidatorEntries pApi class.
  • Refactor fetching of erasStakersOverview to ErasStakersOverview pApi class.
  • Refactor fetching of erasStakersPaged to ErasStakersPaged pApi class.
  • Refactor fetching of bonded pools via BondedPoolEntries pApi class.
  • Add dedicated directory for entries fetching
  • Refactor fetching of bonded accounts to a pApi Subscription class.
  • Use substrate-bindings to generate pool addresses.
  • Refactor Fast Unstake config to be a separate pApi Subscription class.
  • Abstract Fast Unstake queue for an account into a separate Subscription class.
  • Abstract account balances to a new Subscription class.
  • Add fetching and formatting of one BondedPool.
  • Discontinue fetching pool member entries, no longer scalable.
  • Migrate pool multi queries to classes.
  • Move account proxies subscription to Account Proxies Subscription class.
  • Migrate proxy queries to ProxyQuery class.
  • init ActivePoolAccount subscription & remove multi role logic.
  • Migrate IdentitiesController to pApi.
  • Migrate validator entries queries.
  • Add ParaSessionAccounts query to replace subscription.
  • Add PoolMemberBatchEvent and migrate pool member batches.
  • Migrate ValidatorEntries multi queries.
  • Migrate ClaimedRewards, BondedMulti queries for Payouts.
  • Migrate remaining Payouts queries.
  • Refactor tx hooks for pApi support.
  • Submit transactions via pApi.
  • Remove useBuildPayload hook.
  • Stop exposing api and peopleApi through API context.
  • Stop connecting to PJS API.
  • Uninstall PJS API dependencies.
  • Added custom signer for Ledger.
  • Ensure all queries and apis are fetched at best.
  • Added custom signer for Polkadot Vault.
  • Add custom signer for WalletConnect with amended submission flow.

@rossbulat rossbulat changed the title Polkadot API (PAPI) Integration PR Polkadot API (PAPI) Integration PR [WIP] Nov 16, 2024
@rossbulat rossbulat marked this pull request as ready for review November 22, 2024 14:23
@rossbulat rossbulat changed the title Polkadot API (PAPI) Integration PR [WIP] Polkadot API (PAPI) Integration PR Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ✂️ In progress
Development

Successfully merging this pull request may close these issues.

2 participants