Code Monkey home page Code Monkey logo

chinstrap's Issues

Changing the structure of the originations object

Describe the issue
Changing the structure of the originations object for better discoverability.

Examples
The current originations object is structured as follows:

{
  "chinstrap": {
    "networks": {
      "development": {
        "ce454cb23b49e96cd9190eed128ab4eb5e83bca865b3c3ef1c4ede0124ba5a0a": {
          "orignation_hash": "ooDL2ymhse9ExVpJCV9M1xD54ACPXr7s7DQ2fejXTHz2jXmb94i",
          "address": "KT1VuEMFcjJ1GnhVyg3LdfYbhKH7F7wo2u5B",
          "name": "contract_name",
          "date": "2022-08-16T11:22:48.104119"
        },
      }
    }
  }
}

For better discoverability I propose the following:

{
  "chinstrap": {
    "networks": {
      "development": {
        "<contract_name>": [
          {
            "hash": "ce454cb23b49e96cd9190eed128ab4eb5e83bca865b3c3ef1c4ede0124ba5a0a",
            "orignation_hash": "ooDL2ymhse9ExVpJCV9M1xD54ACPXr7s7DQ2fejXTHz2jXmb94i",
            "address": "KT1VuEMFcjJ1GnhVyg3LdfYbhKH7F7wo2u5B",
            "name": "contract_name",
            "date": "2022-08-16T11:22:48.104119"
          }
        ]
      }
    }
  }
}

At every run of chinstrap originate, the script would check if a contract already exists at the corresponding index of the contract_name array. For example, suppose you want to deploy two instances of nft_contract to the sandbox and have two files in the originations/folder:

  • 1_nft_contract_a.py
  • 2_nft_contract_b.py

The steps would be as follows:

  1. On the first run of chinstrap originate, two instances will be originated and two corresponding objects will be appended to the array under chinstrap.networks.development.nft_contract
  2. On the second run of chinstrap originate, the script detects that contracts already exist at index 0 and 1 of the chinstrap.networks.development.nft_contract, and simply returns the existing deployments.
  3. You add 3_nft_contract_b.py to the originations/ folder and run chinstrap originate. The first two originations are skipped as per the logic above, but the third one is executed because the script detects nothing at index 3 of the nft_contract array.

Ligo support

Any chances to use it to compile ligo contracts in some near feature?

Docker image

Is there a chance to have a docker image so we can install it with a oneliner and without deps?

"--originate" perform tests

Hi, I use chinstrap with docker as expressed in README via the following command:
docker run -v pwd:/home --rm -it ant4g0nist/chinstrap

when I run the --originate option, chinstrap actually performs --test pytest command instead of originating contracts.
I have the same issue with other commands such as --debug or --network .

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.