Repository navigation
fix(makefile): use optimized wasm for typescript bindings and contract deployment (Fixes #866) - #891
Closed
kleitonbernardino-lab wants to merge 1 commit into
Conversation
…t deployment (Fixes MergeFi#866) Update make bindings to generate TypeScript contract bindings from the optimized WASM artifacts (*.optimized.wasm) instead of the unoptimized raw binaries produced by cargo build. Also update deploy targets and example integration script to reference optimized binaries, and add an assertion in make build ensuring optimized WASM exists after optimization. Fixes MergeFi#866 Signed-off-by: Kleiton Bernardino <kleiton.bernardino@gmail.com>
|
@kleitonbernardino-lab is attempting to deploy a commit to the chonilius' projects Team on Vercel. A member of the Team first needs to authorize it. |
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
Fixes #866.
make buildrunsstellar contract optimize --wasm ..., which produces<contract>.optimized.wasm. However,make bindingswas previously reading from the raw unoptimized*.wasmfile, causing generated TypeScript bindings (and published release artifacts) to reflect an artifact different from what is actually deployed.In addition, the example deploy recipes and integration flow script were referencing the unoptimized binary.
Changes
Makefile(bindings): Pointstellar contract bindings typescript --wasmat$(WASM_DIR)/$$(echo $$c | tr - _).optimized.wasm.Makefile(build): Assert that*.optimized.wasmexists following optimization to fail fast if optimization fails.Makefile(deploy targets): Updatedeploy-escrow,deploy-milestones, anddeploy-maintenance-poolto deploy the optimized.optimized.wasmbinary.scripts/examples/deposit-withdraw-flow.sh: DefaultWASM_PATHtotarget/wasm32v1-none/release/mergefi_maintenance_pool.optimized.wasm.Verification
Makefilesyntax and tab indentation.ci.ymlwasm build and release steps.