Giter Club home page Giter Club logo

orbit-manifest's Introduction

Tezos Orbit Manifest Contract

This smart-contract is an implementation of a Kepler Orbit Manifest using the Tezos blockchain. As such, it provides a decentralised root of control over a Kepler Orbit's authorization policy.

Local Environment

Requires Docker.

For development purposes, a full-fledged local environment is provided. It contains a sandbox Tezos node, TzKT API, and the likes. To use it:

docker-compose -f bcd-sandbox.yml up -d

CLI

Installation

Compile DIDKit to WASM for Node.js use. Under didkit/lib/web, run:

wasm-pack build --target nodejs --out-dir pkg/node

Then, in this directory:

npm i

Usage

Deploy with tezos blockchain via the CLI

node cli/cli.js originate <manifest> --secret <secret> --url <local node or mainnet url>

To see all possible usages and parameters, you can refer to the CLI's help:

$ node cli/cli.js --help
cli.js [command]

Commands:
  cli.js originate      Deploy Orbit Manifest smart contract.
  cli.js add-host       Add host.
  cli.js remove-hosts   Remove hosts.
  cli.js add-admins     Add admins.
  cli.js remove-admins  Remove admins.
  cli.js read           Read orbit state.

Options:
      --version          Show version number                           [boolean]
  -u, --url              Tezos node.
                            [string] [default: "https://api.tez.ie/rpc/mainnet"]
  -n, --network          Tezos network.            [string] [default: "mainnet"]
  -f, --faucet_key_file  Path to a faucet key JSON file.                [string]
  -s, --secret           Secret key.                                    [string]
  -b, --tzkt_base        Base url for better-call.dev API endpoints
                               [string] [default: "https://api.better-call.dev"]
  -h, --help             Show help 

SDK

Import the contract interactions as JS functions (TODO: Add examples)

Smart Contract Code

The literal smart-contract code written in LIGO, compiled to Michelson for use by cli/lib

orbit-manifest's People

Contributors

chunningham avatar

Watchers

James Cloos avatar wyc avatar Simon Bihel avatar  avatar Gregory Rocco avatar

orbit-manifest's Issues

Potential improvements to the contract before release

  • The case for Tezos.amount > 0 should maybe have its own error message.
  • Ligo doesn't optimise the code much, so functions like add/remove_admins should be removed and u.insert should be passed as it is (it avoids unnecessary if branches),
  • From experience with TZP, the _update record should probably become a list and attach the add/remove boolean to each address in the list (so you can add and remove admins in one transaction).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.