@donezone/core
v0.1.16
Published
TypeScript helpers for working with the Done JS contract runtime from Node/Bun tooling.
Downloads
1,662
Readme
@donezone/core
TypeScript helpers for working with the Done JS contract runtime from Node/Bun tooling.
Features
WasmdClient– thin wrapper around thewasmdbinary with typed upload/instantiate helpersdeployJsContract– convenience function that uploadscw_js.wasmand instantiates it with a JS script (as used by the Done runtime)- Command utilities for running child processes with predictable error handling
Example
import { deployJsContract } from "@donezone/core";
const result = await deployJsContract({
scriptPath: "./packages/demo/contract/tokenSale.js",
from: "validator",
wasmd: {
chainId: "testing",
node: "http://127.0.0.1:26657",
keyringBackend: "test",
},
});
console.log("Contract address:", result.instantiate.contractAddress);You can supply instantiateMsg or instantiateMsgPath to pass custom state, as well as override the
cw_js.wasm path or admin/funds for the instantiate transaction.
The module is used by @donezone/cli and can be embedded in custom scripts to automate Done contract
operations.
