0.1.4 • Published 3 years ago

@patract/ceres-browser v0.1.4

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
3 years ago

Ceres

Run ink! contract anywhere

A browser implementation of ceres

Example

import Flipper from "./flipper.json";

(async () => {
    const wasm = await import("@patract/ceres-browser").catch(console.error);
    const { Runtime } = wasm && (await wasm.default);

    // create monitor
    console.log("hello, this is a template of ceres");

    // load contract
    const contract = new Runtime(JSON.stringify(Flipper));
    console.log("...init contract to storage");

    // deploy contract
    (contract as any).deploy("default", "[]", null);
    console.log("...deploy contract");

    // call contract
    const res = contract.call("get", "[]", null);
    console.log(`call contract...${res}`);
})();

LICENSE

Apache-2.0

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago