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

Add getSchema action on framework #5497

Closed
shuse2 opened this issue Jul 1, 2020 · 0 comments · Fixed by #5516
Closed

Add getSchema action on framework #5497

shuse2 opened this issue Jul 1, 2020 · 0 comments · Fixed by #5516
Assignees

Comments

@shuse2
Copy link
Member

shuse2 commented Jul 1, 2020

Description

  • Add getSchema action which returns schema below
getSchema: () => {
  account: {},
  blockHeader: {},
  blockHeadersAssets: { [version: number]: schema },
  baseTransaction: {},
  transactionsAssets: { [type: number}: schema },
}

Obtain block and account schema from the chain and transactions schema from registered transactions

  • Update base plugin to register to app:ready event and call getSchema action there to cache schemas in the base plugin.

Motivation

When plugin receives encoded data through event or action, it needs to be able to decode it back in order to understand the content

Acceptance Criteria

  • Add functional test for action and check if it returns the schemas
@pablitovicente pablitovicente self-assigned this Jul 1, 2020
shuse2 added a commit that referenced this issue Jul 3, 2020
…mework

Add getSchema action on framework - Closes #5497
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants