CityOfZion / neon-js

Javascript libraries that allow the applications to interact with NEO blockchain
https://docs.coz.io/neo3/neon-js/index.html
MIT License
183 stars 165 forks source link

fix(tx): support NEO3 transaction attributes #878

Closed ixje closed 1 year ago

ixje commented 1 year ago

The current code is still legacy Neo2. The transaction attributes have changed (and reduced) significantly. There are only 2 now

  1. HighPriority
  2. OracleResponse

For these reasons I removed the ability to add attributes to a TX. Instead I only added support for (de)serialization because it seems liked the user here was processing a TX with such attributes (likely an OracleResponse). Because I work so irregularly with JS/TS I took the style from WitnessCondition.

melanke commented 1 year ago

Task linked: CU-2ve3xje update transaction attributes

ixje commented 1 year ago

They’re used with the export() function. Which Transaction.export() calls on the attributes.

On 11 Nov 2022, at 04:53, Yak Jun Xiang @.***> wrote:

 @snowypowers commented on this pull request.

In packages/neon-core/src/tx/components/TransactionAttribute.ts:

  • return type as TxAttrUsage; +export interface TransactionAttributeLike { is the Like interfaces being used? I cant seem to find them anywhere?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.