Skip to content

Prepare v10.0.0-soroban.5 for release. - #661

Merged
Shaptic merged 4 commits into
sorobanfrom
v10.0.0-soroban.5
Aug 4, 2023
Merged

Shaptic merged 4 commits into
sorobanfrom
v10.0.0-soroban.5

Conversation

@Shaptic

@Shaptic Shaptic commented Jul 27, 2023 •

Copy link
Copy Markdown
Contributor

Notice that we're going back to the -soroban.<N> suffix: this is because there will be another XDR upgrade, and I don't want to tag it off as a beta until we're truly stable in regards to testnet.

v10.0.0-soroban.5 - Release Notes

Breaking Changes

  • We have dropped all support for the deprecated hex-encoded contract ID format (#658).

You should use the well-supported C... strkey format, instead. To migrate, you can do something like let s = StrKey.decodeContract(Buffer.from(hexContractId, 'hex'));.

Added

  • Adds a way to clone a TransactionBuilder from an existing transaction (#656).
  • Adds a way to parse contract and diagnostic events into a human-readable structure (#659).
  • Adds a SorobanDataBuilder to prepare Soroban transactions with custom footprints, resources, etc. easier (#660).
  • Adds several ways to reliably build Soroban authorization entries for complex, multi-party signing scenarios (#663).
class TransactionBuilder {
  static cloneFrom(tx: Transaction): TransactionBuilder;
}

function humanizeEvents(
  events: xdr.DiagnosticEvent[] | xdr.ContractEvent[]
): {
  type: 'system'|'contract'|'diagnostic';   // xdr.ContractEventType.name
  contractId?: string;                      // C... encoded strkey

  topics: any[];  // essentially a call of map(event.body.topics, scValToNative)
  data: any;      // similarly, scValToNative(rawEvent.data);
}[];

class SorobanDataBuilder {
  constructor(data?: string | xdr.SorobanTransactionData | null);

  setRefundableFee(fee: IntLike): SorobanDataBuilder;
  setResources(
    cpuInstrs: number,
    readBytes: number,
    writeBytes: number,
    metadataBytes: number
  ): SorobanDataBuilder;

  setFootprint(
    readOnly?: xdr.LedgerKey[] | null,
    readWrite?: xdr.LedgerKey[] | null
  ): SorobanDataBuilder;

  setReadOnly(keys?: xdr.LedgerKey[]): SorobanDataBuilder;
  setReadWrite(keys?: xdr.LedgerKey[]): SorobanDataBuilder;

  build(): xdr.SorobanTransactionData;
}

function authorizeInvocation(
  signer: Keypair,
  networkPassphrase: string,
  validUntil: number,
  invocation: xdr.SorobanAuthorizedInvocation
): xdr.SorobanAuthorizationEntry;

function authorizeInvocationCallback(
  publicKey: string,
  signingMethod: (input: Buffer) => Buffer,
  networkPassphrase: string,
  validUntil: number,
  invocation: xdr.SorobanAuthorizedInvocation
): xdr.SorobanAuthorizationEntry;

function buildAuthEnvelope(
  networkPassphrase: string,
  validUntil: number,
  invocation: xdr.SorobanAuthorizedInvocation
): xdr.HashIdPreimage;

function buildAuthEntry(
  envelope: xdr.HashIdPreimage,
  signature: Buffer | Uint8Array,
  publicKey: string
): xdr.SorobanAuthorizationEntry;

Fixed

  • Cleaned up unnecessary dependency entries (#652).

@Shaptic Shaptic changed the title Bump version and dependencies Prepare v10.0.0-soroban.5 for release. Jul 27, 2023
@Shaptic Shaptic changed the title Prepare v10.0.0-soroban.5 for release. Prepare v10.0.0-soroban.5 for release. Jul 27, 2023
@github-actions

github-actions Bot commented Jul 27, 2023 •

Copy link
Copy Markdown

Size Change: -59 B (0%)

Total Size: 3.07 MB

Filename Size Change
dist/stellar-base.js 2.25 MB -59 B (0%)
ℹ️ View Unchanged
Filename Size
dist/stellar-base.min.js 818 kB

compressed-size-action

@Shaptic
Shaptic force-pushed the v10.0.0-soroban.5 branch from ff19411 to d97f9fd Compare August 4, 2023 03:17

@tsachiherman tsachiherman left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Probably just me - but, don't we need to make some js file changes for this PR ?
The description is very convincing, but I can't find that implemented in this PR.

@Shaptic

Shaptic commented Aug 4, 2023 •

Copy link
Copy Markdown
Contributor Author

@tsachiherman this PR is just the version bump; the release notes cover the set of PRs that have merged since the last release. you can see these in the diff (which is awkward because the soroban.N releases don't get tagged): 272dedf...soroban.

I like to put the release notes in the PR because, again, since there's no tagged release (e.g. here), there's no way to clearly communicate the improvements downstream and this makes it easy to copy-paste into a soroban-client release.

@Shaptic
Shaptic merged commit e3403eb into soroban Aug 4, 2023
@Shaptic
Shaptic deleted the v10.0.0-soroban.5 branch August 4, 2023 16:56
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