Coder Social home page Coder Social logo

stove-labs / granary Goto Github PK

View Code? Open in Web Editor NEW
68.0 5.0 8.0 11.58 MB

Tezos smart contract & dapp development toolkit

License: MIT License

Makefile 3.93% Dockerfile 6.02% JavaScript 2.05% C++ 2.43% OCaml 85.40% Shell 0.16%
tezos tezos-blockchain reasonml ocaml docker

granary's Introduction

Granary


All-in-one Tezos development environment for DAPPs, Smart Contracts and more.

๐Ÿ‘‰ Getting started

Please refer to the docs for a detailed getting started guide.

๐Ÿ›  Contributing

Please refer to the contributor docs.

๐Ÿ’ธ Sponsors & Contributors


granary's People

Contributors

dexterslabor avatar maht0rz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

granary's Issues

Add contribution examples to the docs

Is your feature request related to a problem? Please describe.
Contributors should be given a clear example on how to contribute to Granary.

Describe the solution you'd like
Document a step by step guide in the docs, referencing github issues, forks, PRs and the CI process

Granary originate not working

Hi, I'm having a problem trying the originate command. It fails with this message Error: Specified -base-dir does not exist. Please create the directory and try again.

my folder structure is:

tezos-defi-dev-experience
  -- tezos-ligo
    -- v1-public-pool.tz

and the command is:
granary client - originate contract v1-public-pool for contractOwner transferring 0 from contractOwner running $PWD/tezos-ligo/v1-public-pool.tz --burn-cap 0.295 --dry-run

where contractOwner is the alias for the wallet.

granary client commands error

Hi Tezos team,
I followed the granary client commands as per in the documentation.
granary client - get balance for "alice" - It is work for still yesterday , Now it can't working in granary node client. Then How to check my balance in the granary node ?
what's the problem in the chain. Kindly help me, if anyone knows

Tezos node & client management w/ sandbox & alphanet support

Describe the solution you'd like
Granary should provide a cli for tezos node management, this should support both sandboxnet and alphanet (mainnet in the future).

Node properties:

  • rpc port (e.g.: 8732)
  • cors headers (should accept trafic from anywhere, but mainly localhost)
  • data directory (e.g.: ./.granary//node)

Node commands

  • start
  • stop
  • clean

Client properties

  • data directory (e.g.: ./granary//client)
  • node addr (based on the network - name of the docker container where it runs)

Client commands

  • '-' proxy for a pre-configured client running in a docker container

Sandbox faucet file

Is your feature request related to a problem? Please describe.
Is there a way I can generate a faucet file for Sandbox? That will be very useful for working on contracts and deployments.

Describe the solution you'd like

sth along the lines of npx granary faucet I guess

Describe alternatives you've considered

gathering the info from various cli command and make my own

Additional context

Cool project, eager to use more!

Configuration per project

Granary needs a JSON configuration file to be created & stored per project

CLI should offer to:

  • create a dummy/init configuration file
  • upsert a config property
  • delete a config property
  • pass a --config <file> to override the config for the current CLI run.

Ideal implementation should consider using configstore as it provides a lot of features out of the box.

Configuration error for nodeAddr 'rpcalpha.tzbeta.net'

If I configure Granary with this:

"nodeAddr": "rpcalpha.tzbeta.net",
"nodeRpcPort": "443",

I'm not able to run commands anymore, all of them fail with this message:

$ granary client - rpc get /protocols
Warning:
  Failed to acquire the protocol version from the node
  Rpc request failed:
     - meth: GET
     - uri: http://granary-tezos-node-sandbox:8732/chains/main/blocks/head/protocols
     - error: Unable to connect to the node: "resolution failed: name resolution failed"

Error:
  Rpc request failed:
     - meth: GET
     - uri: http://granary-tezos-node-sandbox:8732/describe/protocols?recurse=no
     - error: Unable to connect to the node: "resolution failed: name resolution failed"

Even passing the flag --tls or -S from https://tezos.gitlab.io/master/api/cli-commands.html.

  • Running the command directly from tezos-client, it works if the flag -S is provided.

NPM badge redirects to the @latest version instead of @pre-alpha

Describe the bug
Readme should show a badge with the latest npm version, that redirects to the given npm page for that version, now it redirects to @latest version instead of @pre-alpha.

To Reproduce
Steps to reproduce the behavior:

  1. Open README.md
  2. Click on the npm badge that shows the latest pre-alpha version of the package
  3. You will be redirected to here, which is wrong, because it does not show the latest pre-alpha deployment.

Expected behavior
I'd expect the [latest pre-alpha url](https://www.npmjs.com/package/@stove-labs/granary/v/pre-alpha] to be opened instead.

Tezos-node: internal error

I followed the granary node setup which is as per in the document.
I faced the issue at when granary node start.
Issue:
Tezos-node: internal error
Unix.Unix_error(Unix.EACCES, "mkdir", "/root/.granary")
Raised by primitive operation at file "src/unix/lwt_unix.cppo.ml"
Re-raised at file "src/core/lwt.ml"
Called from file "src/unix/lwt_main.ml"
Called from file "src/bin_node/node_run_command.ml"
Called from file "cmdliner_term.ml"
Called from file "cmdliner.ml"
Called from file "cmdliner.ml"
Kindly help me, if anyone knows

Unable to get sandbox started

Hello,

Following intructions and the build works okay but when I try to run the make start command, I get the following error:

Makefile:11: warning: overriding recipe for target 'start'
Makefile:2: warning: ignoring old recipe for target 'start'
sh ./scripts//commands.sh start
sh: 0: Can't open ./scripts//commands.sh
make: *** [Makefile:11: start] Error 127

There was another issue I resolved by mounting /tmp as writeable. I tried going into the sandox sub directory and setting the commands.sh to be executable but its looking like there is a directory missing in the path:

sh: 0: Can't open ./scripts//commands.sh

Should it be ./scripts/sandboxnet/commands.sh ?

Anyways, Im not sure how to resolve.

Docker version:
Client:
Version: 17.10.0-ce
API version: 1.33
Go version: go1.8.3
Git commit: f4ffd25
Built: Tue Oct 17 19:05:05 2017
OS/Arch: linux/amd64

Server:
Version: 17.10.0-ce
API version: 1.33 (minimum version 1.12)
Go version: go1.8.3
Git commit: f4ffd25
Built: Tue Oct 17 19:03:46 2017
OS/Arch: linux/amd64
Experimental: false
docker-compose version 1.14.0, build c7bdf9e
docker-py version: 2.3.0
CPython version: 2.7.13
OpenSSL version: OpenSSL 1.0.1t 3 May 2016

Docker-compose version:
docker-compose version 1.14.0, build c7bdf9e
docker-py version: 2.3.0
CPython version: 2.7.13
OpenSSL version: OpenSSL 1.0.1t 3 May 2016

Ubuntu version:
Distributor ID: Ubuntu
Description: Ubuntu 18.10
Release: 18.10
Codename: cosmic

setting up Babylone protocol

Hello,
I'm trying to activate the "babylone" protocol while using the starter-kit. Naively, I was expecting to modify the starter-kit scripts and get a running node on babylone.

Steps to reproduce the behavior:

  1. add a new command in package.json
    '''
    "activate-proto-babylone": "./activate_proto_babylone.sh",
    '''
  2. create a new "activate_proto_babylone.sh" (with the babylone protocol hash)
    '''
    #!/bin/bash
    ./node_modules/.bin/granary client - import secret key activator unencrypted:edsk31vznjHSSpGExDMHYASz45VZqXN4DPxvsa4hAyY8dHM28cZzp6 --force
    ./node_modules/.bin/granary client - activate protocol PsBABY5HQTSkA4297zNHfsZNKtxULfL18y95qb3m53QJiXGmrbU with fitness 1 and key activator and parameters $PWD/protocol_parameters_babylone.json --timestamp $(TZ='AAA+1' date +%FT%TZ)
    ./node_modules/.bin/granary client - import secret key "bootstrap1" "unencrypted:edsk3gUfUPyBSfrS9CCgmCiQsTCHGkviBDusMxDJstFtojtc1zcpsh"
    ./node_modules/.bin/granary client - bake for bootstrap1
    ./node_modules/.bin/granary client - rpc get /chains/main/blocks/head
    '''
  3. create a new 'protocol_parameters_babylone.json'
    '''
    {
    "bootstrap_accounts": [
    [
    "edpkuBknW28nW72KG6RoHtYW7p12T6GKc7nAbwYX5m8Wd9sDVC9yav",
    "4000000000000"
    ]
    ],
    "time_between_blocks": [
    "1",
    "0"
    ],
    "blocks_per_roll_snapshot": 4,
    "blocks_per_cycle": 8,
    "preserved_cycles": 2,
    "proof_of_work_threshold": "-1",
    "blocks_per_commitment": 4,
    "blocks_per_voting_period": 64,
    "endorsers_per_block": 32,
    "hard_gas_limit_per_operation": "800000",
    "hard_gas_limit_per_block": "8000000",
    "tokens_per_roll": "8000",
    "michelson_maximum_type_size": 1000,
    "seed_nonce_revelation_tip": "1",
    "origination_size": 257,
    "block_security_deposit": "512",
    "endorsement_security_deposit": "64",
    "block_reward": "16",
    "endorsement_reward": "2",
    "hard_storage_limit_per_operation": "60000",
    "cost_per_byte": "1000",
    "test_chain_duration": "1966080",
    "quorum_min": 2000,
    "quorum_max": 7000,
    "min_proposal_quorum": 500,
    "initial_endorsers": 24,
    "delay_per_missing_endorsement": "8"
    }
    '''
  4. npm run init
  5. npm run start
  6. in a new terminal, npm run activate-proto-babylone

I was expecting a running node in babylone

The script start (import secret key activator seems to work) and then "activate protocol" command fail/freeze ...

Desktop (please complete the following information):

  • OS: ubuntu 18
  • Browser firefox
  • Version 1.0.0-pre-alpha.38

Unknown protocol version for Alphabet

Describe the bug
I cannot get the "hello world" example to work. It fails when testing the client configuration.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://stove-labs.github.io/granary/docs/tutorials-deploying-a-tezos-smart-contract-to-alphanet
  2. Follow the instructions
  3. Up to granary client - rpc get /protocols
  4. See error:
bash-3.2$ granary client - rpc get /protocols 
Warning:
  
                 This is NOT the Tezos Mainnet.
  
     The node you are connecting to claims to be running on the
               Tezos Alphanet DEVELOPMENT NETWORK.
          Do NOT use your fundraiser keys on this network.
          Alphanet is a testing network, with free tokens.

Fatal error: unknown protocol version.

Expected behavior
The instructions indicate the following output:

Screenshot 2019-09-30 at 12 58 40 PM

Desktop (please complete the following information):

  • OS: MacOS
  • Browser Safari
  • Version ???

Additional context
First installation of Granary.

Build status points to the wrong branch (not develop)

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Look at the readme
  2. See that the build status button points at feature/cli, which is not correct

Expected behavior
It should display build status of the develop branch instead

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.