ruby-stellar-sdk icon indicating copy to clipboard operation
ruby-stellar-sdk copied to clipboard

Updating the SDKs to the stable Protocol 20 release

Open Shaptic opened this issue 2 years ago • 1 comments

SDKs need to be updated to adapt to breaking changes that have occurred since Preview 11 (i.e. the current testnet release candidate) coming to Protocol 20.

Summary of Breaking Changes

This is likely irrelevant to SDK maintainers, but do note sandbox mode has been removed from the Soroban CLI (https://github.com/stellar/soroban-tools/issues/983).

XDR

The XDR needs to be updated to https://github.com/stellar/stellar-xdr/commit/6a620d160aab22609c982d54578ff6a63bfcdc01. This includes a non-trivial list of breaking changes (mostly renames):

  • The BumpFootprintExpirationOp is now ExtendFootprintTTLOp and its ledgersToExpire field is now named extendTo, but it serves the same purpose.
  • ContractExecutable.contractExecutableToken is now contractExecutableStellarAsset
  • SorobanTransactionData.refundableFee is now resourceFee
  • This new fee encompasses the entirety of the Soroban-related resource fees. Note that this is distinct from the "network-inclusion" fee that you would set on your transaction
  • see https://github.com/stellar/js-stellar-base/pull/704 for an example migration

RPC

  • The getEvents RPC endpoint structure has changed:
    • value: { xdr: string } is now just value: string (https://github.com/stellar/soroban-tools/pull/1015)
    • contractId will always be a contract strkey (C... format) if present (https://github.com/stellar/soroban-tools/issues/1007)
  • The getLedgerEntries RPC endpoint now includes expiration info (https://github.com/stellar/soroban-tools/pull/1010):
    • expirationLedgerSeq is a string-ified uint32 present if the requested entries have expiration

Shaptic avatar Oct 23 '23 22:10 Shaptic

There is an additional schema change: the getLedgerEntries RPC response will use liveUntilLedgerSeq rather than expirationLedgerSeq in the final build (ref: stellar/soroban-tools#1029)

Shaptic avatar Oct 25 '23 18:10 Shaptic