Simplify web tutorials and enable all in CI#166
Open
WiktorStarczewski wants to merge 9 commits intomainfrom
Open
Simplify web tutorials and enable all in CI#166WiktorStarczewski wants to merge 9 commits intomainfrom
WiktorStarczewski wants to merge 9 commits intomainfrom
Conversation
- listAvailable now returns InputNoteRecord[] directly - consume accepts notes array instead of noteIds - Remove .inputNoteRecord() and .map(n => n.id()) boilerplate
Remove Address.fromBech32(...).accountId() ceremony — getOrImport already accepts AccountRef (which includes bech32 strings).
Move inline MASM template strings from foreignProcedureInvocation.ts into dedicated .masm files (counter_contract.masm, count_reader.masm). Add webpack asset/source rule for .masm imports and a TypeScript module declaration. Restructure FPI tutorial to show file creation steps.
Extract inline MASM from incrementCounterContract.ts into the shared counter_contract.masm file. Restructure counter contract tutorial with dedicated MASM and bundler config steps. Remove unnecessary client.sync() calls across all web tutorials where local state is already up to date (after account creation, after consume with no subsequent chain query, etc.).
waitFor() already calls syncStateWithTimeout(0) on each polling iteration, so explicit sync after it is redundant. execute() updates local account state directly, so sync before accounts.get() is also unnecessary.
Enable incrementCounterContract and foreignProcedureInvocation in CI by
clearing WEB_SKIPPED. Guard empty-array references with the
${arr[@]+"${arr[@]}"} idiom so set -u does not trigger unbound-variable
errors.
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
client.sync()calls —waitFor()andexecute()already sync internally, so explicit syncs after these calls were redundant.masmfiles with a webpack loaderWord.toU64s()instead of manual hex conversiongetOrImporthelpers to accept bech32 strings directlylistAvailable,send,consume)send()API fromauthenticated: falsetoreturnNote: trueincrementCounterContractandforeignProcedureInvocationwere skipped)run_tutorials.shforset -ucompatibilityTest plan
yarn tutorials --web)incrementCounterContract,foreignProcedureInvocation) pass when explicitly run