Coder Social home page Coder Social logo

a-damw / azakazam Goto Github PK

View Code? Open in Web Editor NEW

This project forked from azarusio/azakazam

0.0 1.0 0.0 39 KB

AZAkazam is a development, testing and deployment framework for EOS.IO, aiming to make life as an EOS developer easier

License: GNU General Public License v3.0

Dockerfile 4.43% Shell 5.14% JavaScript 87.50% CMake 1.42% C++ 1.51%

azakazam's Introduction

AZAkazam - A TDD framework for EOS

CircleCI

AZAkazam is a development, testing and deployment framework for EOS.IO, aiming to make life as an EOS developer easier. With AZAkazam, you get:

  • Built-in smart contract compilation, linking, deployment and binary management.
  • Automated contract testing with Mocha.
  • Configurable build pipeline with support for custom build processes.
  • Scriptable deployment & migrations framework.
  • Network management for deploying to many public & private networks.
  • Instant rebuilding of assets during development.
ℹī¸ Contributors: Please see the Development section of this README.

Setup

Start by pulling this repo. You can operate in 2 modes: local or containerized. Local is geared towards on-premises development, while dockerized is more aimed at CI.

Local

If operating locally:

You can then run the tests by calling npm run test

Dockerized

Alternatively, you can compile and run everything out of a docker container:

  • Build a new container with your local code by running docker build -t AZAkazam .
  • Run the tests with docker run AZAkazam

Note that you'll need to rebuild a new container for every code change.

Configuration

Getting your project up and running is fairly simple - here are the files you'll be interacting with: * |-> package.json: you may change the name of the default template there |-> templates: A directory to save your deployment templates |-> src: The directory to save the sources of your smart contracts |-> tests: The directory to save your Mocha test

Templates

The template files are YAML descriptors aimed at managing the deployments of the contracts. The default.yml should get your started. After each run, an updated version of the YAML is saved in the root directory, that way you can restart tests without needing to reset your local nodeos - just ron node deploy.js 15436623.yml where "15436623" is the latest timestamp.

The file has the following sections:

  • header: context about the deployment including the node url
  • wallet: all the keys you'll need for the accounts you'll be using. Missing keys are generated automatically and will be appended to the deployment file.
  • accounts: all the accounts you'll be using
  • contracts: all the contracts you'll be using
  • test: the tests to run

Contracts

Contracts must be located in directory with their names. For instance, EOS.IO hello contract is called hello - it's defined as a class hello : public contract with files hello.cpp and hello.hpp: you must put everything into "src/hello" and the framework will find it and locate it.

Tests

Tests come with a handy helper: global.EOSContract.getPrivateKey("active@azarusiocorp") will retrieve the private key for a permission/account

 global.EOSContract.sendAction(
      'hello', 
      'hi', 
      {user: "bob"}, 
      "active@azarusiocorp", 
      global.EOSContract.getPrivateKey("active@azarusiocorp")
      )

Will Send an action to account "hello", action "hi", with parameters {user: "bob"}, using account "active@azarusiocorp" signed by the key global.EOSContract.getPrivateKey("active@azarusiocorp")


Development

We welcome pull requests. To get started, just fork this repo, and submit a pull request.

Contributors

Initially developed by Alex Casassovici [email protected] for Azarus https://azarus.io

License

GPL version 3.0: https://www.gnu.org/licenses/gpl-3.0.en.html

azakazam's People

Contributors

zatmonkey avatar

Watchers

James Cloos avatar

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.