Socket
Socket
Sign inDemoInstall

ceres-browser

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ceres-browser

Run ink! contract in browser!


Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

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");

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

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

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

LICENSE

Apache-2.0

FAQs

Package last updated on 02 Aug 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc