Skip to content
This repository has been archived by the owner on Jun 7, 2019. It is now read-only.

Update getRequiredAttributes function in BaseTransaction #975

Closed
shuse2 opened this issue Jan 7, 2019 · 0 comments
Closed

Update getRequiredAttributes function in BaseTransaction #975

shuse2 opened this issue Jan 7, 2019 · 0 comments

Comments

@shuse2
Copy link
Contributor

shuse2 commented Jan 7, 2019

Description

In order to keep the extensibility, getRequiredAttributes should be updated to return an object

{
  'entity name': { // ex) account
    'property': ['values'] // ex) address: ['xxxL', 'yyyL']
  },
}

Also, we should add abstract function

interface EntityMap { // name to be considered
  'entity name': [Entity],
}
interface RequiredState {
  sender: Account,
  recipient?: Account,
  dependentStates?: EntityMap,
}

abstract processRequiredState(state: EntityMap): RequiredState
throws error on missing state

and update verify, apply and undo function to take RequiredState as an input.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant