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

Prepare v0.11.0 for release #126

Merged
merged 15 commits into from
Aug 21, 2023
Merged

Prepare v0.11.0 for release #126

merged 15 commits into from
Aug 21, 2023

Conversation

Shaptic
Copy link
Contributor

@Shaptic Shaptic commented Aug 14, 2023

Release Notes

v0.11.0 (diff)

Fixed

  • The SimulateTransactionResponse's error field now has the correct type (that is, string: #123).
  • Many irrelevant or unused dependencies have been eliminated (such as eventsource, lodash, and others), lowering overall bundle size (#126).

Added

  • A new ContractSpec class to facilitate building native JavaScript structures from custom contract types. Given a specification for the data structure (i.e. xdr.ScSpecEntry[]), it will interpret the values via the specified type (#115).

Breaking Changes

  • The minimum supported NodeJS version is now Node 16.
  • Server.prepareTransaction now returns a TransactionBuilder instance rather than an immutable Transaction, in order to facilitate modifying your transaction after assembling it alongside the simulation response (#127).
    • The intent is to avoid cloning the transaction again (via TransactionBuilder.cloneFrom) if you need to modify parameters such as the storage access footprint.
    • To migrate your code, just call .build() on the return value.
  • The RPC response schemas for simulation (see Server.simulateTransaction()) have been upgraded to parse the base64-encoded XDR automatically. The full interface changes are in the pull request (#127), but succinctly:
    • SimulateTransactionResponse -> RawSimulateTransactionResponse
    • SimulateHostFunctionResult -> RawSimulateHostFunctionResult
    • Now, SimulateTransactionResponse and SimulateHostFunctionResult include the full, decoded XDR structures instead of raw, base64-encoded strings for the relevant fields (e.g. SimulateTransactionResponse.transactionData is now an instance of SorobanDataBuilder, events is now an xdr.DiagnosticEvent[] [try out humanizeEvents for a friendlier representation of this field]).
    • The SimulateTransactionResponse.results[] field has been moved to SimulateTransactionResponse.result?, since there will always be exactly zero or one result.
  • The GetTransactionStatus is now an enum with actual values rather than a type (#129).
  • The RPC response schemas for retrieving transaction details (Server.getTransaction()) have been upgraded to parse the base64-encoded XDR automatically. The full interface changes are in the pull request (#129), but succinctly:
    • GetTransactionResponse -> RawGetTransactionResponse
    • GetTransactionResponse is now one of GetSuccessfulTransactionResponse | GetFailedTransactionResponse | GetMissingTransactionResponse, which gives proper typing to the interface depending on the response's status field.
    • All of the *Xdr properties are now full, decoded XDR structures.
    • There is a new returnValue field which is a decoded xdr.ScVal, present iff the transaction was a successful Soroban function invocation.

Not all schemas have been broken in this manner in order to facilitate user feedback on this approach. Please add your 👍 or 👎 to #128 to vote on whether or not we should do this for the other response schemas.

@Shaptic Shaptic force-pushed the v0.11.0 branch 2 times, most recently from 0a9ceed to 337eba1 Compare August 17, 2023 22:32
@Shaptic Shaptic requested review from paulbellamy, sreuland and aristidesstaffieri and removed request for paulbellamy August 17, 2023 22:39
@Shaptic
Copy link
Contributor Author

Shaptic commented Aug 17, 2023

Bundle size changes from v0.10.0:

  • soroban-client.js: 1.06 MiB -> 1010 KiB
  • soroban-client.min.js 505 KiB -> 499 KiB

Copy link
Contributor

@paulbellamy paulbellamy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bro, why you format everything in a release PR 😩

@Shaptic Shaptic merged commit 8c391cc into main Aug 21, 2023
4 checks passed
@Shaptic Shaptic deleted the v0.11.0 branch August 21, 2023 18:35
@sreuland
Copy link
Contributor

does package.json need version=0.11.0 , or maybe that's done at different time of release prep?

@Shaptic
Copy link
Contributor Author

Shaptic commented Aug 21, 2023

lol @sreuland I realized this after the fact 🤦 thanks!

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

Successfully merging this pull request may close these issues.

3 participants