feat: update examples to be compatible with 8.x chain#71
Open
prashantasdeveloper wants to merge 4 commits into
Open
feat: update examples to be compatible with 8.x chain#71prashantasdeveloper wants to merge 4 commits into
prashantasdeveloper wants to merge 4 commits into
Conversation
611cae8 to
5f28494
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Updates all SDK examples for Polymesh chain v8 and
@polymeshassociation/polymesh-sdkv30 /local-signing-managerv4. All 24 examples were run against a local dev node and adjusted for API changes, idempotent re-runs, and common local-chain constraints. The README is expanded with setup instructions, env var docs, an example index, and troubleshooting.Changes
Dependencies & tooling
@polymeshassociation/polymesh-sdkto30.0.0@polymeshassociation/local-signing-managerto^4.1.1.yarnrc.yml,packageManagerinpackage.json)Shared utilities
client.ts: default dev account uses{ mnemonic: '//Alice' }instead of{ uri: '//Alice' }utils.ts: addgetAssetHolderLabel()for settlementAssetHoldertypes (Account vs Portfolio)Example updates
subsidy.tsapproveSubsidy/acceptSubsidyflow; resilient handling of existing/missing subsidiestransferRestrictions.tssetStats()+setRestrictions()APIsettlements.tspartyinstead ofidentityon affirmations; configurable asset via argv; resilient affirmcreateToken.tsdocuments.add()/documents.remove()instead ofset()for removalexternalAgents.tsTxGroup.AssetManagement; resilient group create/invite/setmanageSecondaryKeys.tsclaims.tsgetCddClaims()is unsupported on v8batchTransactions.tscreatePortfolioinstead of deprecated freezedividendDistributions.tsDIVIDEND_CURRENCYenv/argv; improved timing and graceful skip for claim/reclaimstaking.tsgetSigningAccounts(); resilient re-runs (already bonded, etc.)investInSto.tsstos.tsDIVIDEND_CURRENCYfor raising currency; auto-createVenueType.Stovenue; optional--closeportfolios.ts/portfolioCustodians.tssecurityTokenCaa.tsEnvironment & docs
.env.samplewithDIVIDEND_CURRENCY,BOB_SEED, and inline docsREADME.md: setup, env var table, example index (all 24 scripts), run order, local dev notes, troubleshootingTest plan
All 24 examples verified against a local node (
ws://localhost:9944):