Skip to content

Factory Pattern For Smart Contract Using JS #185

Answered by ailisp
hiraqdev asked this question in Q&A
Discussion options

You must be logged in to vote

Yes. You can refer to test_promise_batch_deploy_call method of https://github.com/near/near-sdk-js/blob/develop/tests/src/promise_batch_api.js function. It's a contract that deploying the given contract bytes.
The example looks ugly - have to provide the other contract's binary content (wasm) in a JS string and that can be extremely long. We're going to add a utility to allow include(filename) in the build process to make it a lot cleaner

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@hiraqdev
Comment options

@ailisp
Comment options

Answer selected by hiraqdev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants