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 ability to access current transaction info/transfers #2475

Closed
spencercorwin opened this issue Jun 17, 2021 · 0 comments
Closed

Add ability to access current transaction info/transfers #2475

spencercorwin opened this issue Jun 17, 2021 · 0 comments
Assignees
Labels
area/client Categorize issue or PR as client (@neo-one/client) related area/compiler Categorize issue or PR as compiler (@neo-one/smart-contract-compiler) related area/documentation Categorize issue or PR as documentation related kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. kind/feature Categorizes issue or PR as related to a new feature. priority/important-soon Must be staffed and worked on either currently, or very soon.

Comments

@spencercorwin
Copy link
Collaborator

  • Add transaction notifications
  • Come back to ObjectBindingHelper.test.ts (testing notifications)
  • Need to add transfers to script in UAPB.invokeRaw()
  • Need to add coverage for this when added to blockchain.test.ts and transaction.test.ts
  • Need notes in transaction.ts and index.d.ts
  • Add to the tests file that are used in getSemanticDiagnostics.ts (valid.ts and complex.ts) then run tes
  • Document notifications, stack items, stackitemtype, etc. in Index.d.ts
  • Implement StackItems and Notifications in compiler
  • Use ISTYPE opcode? Or create helper for IsBuiltinTypeHelper
  • Notifications
  • Need to add a types folder for notifications
  • Need to add to all the builtin type stuff for notification
  • Blockchain.currentTransaction.notifications
  • Each notification has a script hash, eventname, and state = array of stack items
  • Need to be able to parse the stack items
  • Each stack item should be some sort of object with a type and then other key-value pairs depending on the type
  • May need to add builtin type for StackItem and for each stackitem
  • Then need to integrate APIs for those stack items into index.d.ts and the compiler
  • Iterative over the state array and for each item determine its type and wrap that in an object with a type property which will be a number enum or a string (see how it was done with transactions)
  • Test with Blockchain.test.ts in compiler
  • Get notifications from Blockchain.currentTransaction?
  • Or Blockchain.transfers?
  • Blockchain.notifications
  • Blockchain.currentNotifications
@spencercorwin spencercorwin added kind/feature Categorizes issue or PR as related to a new feature. priority/important-soon Must be staffed and worked on either currently, or very soon. area/client Categorize issue or PR as client (@neo-one/client) related area/compiler Categorize issue or PR as compiler (@neo-one/smart-contract-compiler) related area/documentation Categorize issue or PR as documentation related kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. labels Jun 17, 2021
@spencercorwin spencercorwin self-assigned this Jun 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/client Categorize issue or PR as client (@neo-one/client) related area/compiler Categorize issue or PR as compiler (@neo-one/smart-contract-compiler) related area/documentation Categorize issue or PR as documentation related kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. kind/feature Categorizes issue or PR as related to a new feature. priority/important-soon Must be staffed and worked on either currently, or very soon.
Projects
None yet
Development

No branches or pull requests

1 participant