All Projects → accordproject → Ergo

accordproject / Ergo

Licence: apache-2.0
The Language for Smart Legal Contracts

Programming Languages

javascript
184084 projects - #8 most used programming language
language
365 projects

Projects that are alternatives of or similar to Ergo

Blockchainbooks.github.io
Blockchain Books
Stars: ✭ 139 (+28.7%)
Mutual labels:  blockchain, ethereum, smart-contracts, hyperledger
Mythril
Security analysis tool for EVM bytecode. Supports smart contracts built for Ethereum, Hedera, Quorum, Vechain, Roostock, Tron and other EVM-compatible blockchains.
Stars: ✭ 1,968 (+1722.22%)
Mutual labels:  blockchain, ethereum, smart-contracts, hacktoberfest
Cryptocurrencyawesome
Cryptocurrency study materials resources
Stars: ✭ 118 (+9.26%)
Mutual labels:  blockchain, ethereum, smart-contracts, hyperledger
Truffle
A tool for developing smart contracts. Crafted with the finest cacaos.
Stars: ✭ 11,909 (+10926.85%)
Mutual labels:  blockchain, ethereum, smart-contracts, hacktoberfest
Ethereum book
精通以太坊 (中文版)
Stars: ✭ 875 (+710.19%)
Mutual labels:  blockchain, ethereum, smart-contracts
Burrow
https://wiki.hyperledger.org/display/burrow
Stars: ✭ 851 (+687.96%)
Mutual labels:  blockchain, ethereum, hyperledger
Smart Contracts Example
Simple example of token market. Based on blockchain technology using Ethereum platform.
Stars: ✭ 37 (-65.74%)
Mutual labels:  blockchain, ethereum, smart-contracts
Mortgageblockchainfabric
Mortgage Processing App using Hyperledger Fabric Blockchain. Uses channels for privacy and access, and restricts read/write previleges through endorsement policies
Stars: ✭ 45 (-58.33%)
Mutual labels:  blockchain, smart-contracts, hyperledger
Typechain
🔌 TypeScript bindings for Ethereum smart contracts
Stars: ✭ 769 (+612.04%)
Mutual labels:  blockchain, ethereum, hacktoberfest
Vyper.fun
Cryptozombies for Vyper: Learn Vyper by building games!
Stars: ✭ 42 (-61.11%)
Mutual labels:  ethereum, smart-contracts, hacktoberfest
Ethereumbook
Mastering Ethereum, by Andreas M. Antonopoulos, Gavin Wood
Stars: ✭ 11,663 (+10699.07%)
Mutual labels:  blockchain, ethereum, smart-contracts
Gdai.io
gDAI - Gas less DAI transfers by using GSN, Fulcrum and KyberNetwork
Stars: ✭ 26 (-75.93%)
Mutual labels:  blockchain, ethereum, smart-contracts
Aeternity
æternity: solving scalability problems by making sense of state-channels
Stars: ✭ 923 (+754.63%)
Mutual labels:  blockchain, ethereum, smart-contracts
Fabric Sdk Java
Stars: ✭ 982 (+809.26%)
Mutual labels:  blockchain, hyperledger, hacktoberfest
Oyente
An Analysis Tool for Smart Contracts
Stars: ✭ 820 (+659.26%)
Mutual labels:  blockchain, ethereum, smart-contracts
Learn Solidity
Code base for "Learn Solidity: Programming Language for Ethereum Smart Contracts" course in Tosh Academy & Blockchain Council
Stars: ✭ 44 (-59.26%)
Mutual labels:  blockchain, ethereum, smart-contracts
Ethnode
Run an Ethereum node (Geth or Openethereum) for development
Stars: ✭ 74 (-31.48%)
Mutual labels:  blockchain, ethereum, smart-contracts
Smart Contracts
Ethereum smart contracts for security and utility tokens
Stars: ✭ 1,187 (+999.07%)
Mutual labels:  blockchain, ethereum, smart-contracts
Indy Leaderboard
Example game leaderboard dApp utilizing EbakusDB on Ebakus blockchain
Stars: ✭ 103 (-4.63%)
Mutual labels:  blockchain, ethereum, smart-contracts
Blockchain
Compilation of useful documents and scientific papers about Blockchain & cryptocurrencies.
Stars: ✭ 751 (+595.37%)
Mutual labels:  blockchain, ethereum, hyperledger

Ergo logo

Build Status Build Mechanization Status Coverage Status GitHub license downloads npm version Join the Accord Project Slack

Introduction

This is the source code for the Ergo compiler. Ergo is the Accord Project language for Smart Legal Contracts.

The Ergo compiler is distributed as an npm package.

The Ergo compiler is written using the Coq proof assistant, with parsing and support code written in OCaml. It makes extensive use of the Q*cert compiler for code generation and type checking.

Both the Ergo language and its compiler are in early development phase. If you would like to build from source or to contribute, consult the DEVELOPERS file.

Try Ergo online

If you want to take a peek at Ergo without installing anything, check out the interactive REPL (read-eval-print-loop) for Ergo stand-alone, or the Accord Project Template Studio which illustrates Ergo in Accord Project templates.

Documentation

The most recent Ergo documentation is in the Ergo Language Guide.

Structure of the Code Repository

Top level repository (ergo), with sub packages. Each sub-package is published as an independent npm module using lerna:

  • ergo-cli : Command line interface for the Ergo compiler
  • ergo-compiler : Core classes for the Ergo compiler
  • ergo-engine : A Node.js VM based execution engine for Ergo
  • ergo-test : Cucumber based testing for Ergo

Installation

The easiest way to install Ergo is as a Node.js package. Once you have Node.js installed on your machine, you can get the Ergo compiler and command-line using the Node.js package manager by typing the following in a terminal:

$ npm install -g @accordproject/ergo-cli

This will install the Ergo command-line (ergo) and Read-Eval-Print-Loop (ergotop). Those will allow you to create, test and compile Ergo contracts. You can check your installed version by typing the following in a terminal:

$ ergo --version

Or to get command line help:

$ ergo --help
ergo <command>

Commands:
  ergo draft       create a contract text from data
  ergo trigger     send a request to the contract
  ergo invoke      invoke a clause of the contract
  ergo initialize  initialize the state for a contract
  ergo compile     compile a contract

Options:
  --help         Show help                                             [boolean]
  --version      Show version number                                   [boolean]
  --verbose, -v                                                 [default: false]

Create contract text

To create a contract text from a contract:

$ ergo draft --template ./examples/volumediscount --data ./examples/volumediscount/data.json

Initialize a contract

To obtain the initial state of the contract:

$ ergo initialize --template ./examples/volumediscount --data ./examples/volumediscount/data.json
06:40:29 - info:

Send a request to a contract

To send a request to a contract:

$ ergo trigger --template ./examples/volumediscount --data ./examples/volumediscount/data.json --request ./examples/volumediscount/request.json --state ./examples/volumediscount/state.json
06:40:01 - info:
{
  "clause": "orgXaccordprojectXvolumediscountXVolumeDiscount",
  "request": {
    "$class": "org.accordproject.volumediscount.VolumeDiscountRequest",
    "netAnnualChargeVolume": 10.4
  },
  "response": {
    "$class": "org.accordproject.volumediscount.VolumeDiscountResponse",
    "discountRate": 2.8,
    "transactionId": "13fa7cb6-03fc-4fd8-8e12-9a85ac8d5eb7",
    "timestamp": "2019-10-12T23:56:33.688Z"
  },
  "state": {
    "$class": "org.accordproject.cicero.contract.AccordContractState",
    "stateId": "1"
  },
  "emit": []
}

Invoke a clause

To invoke a specific clause of the contract:

$ ergo invoke --template ./examples/volumediscount --clauseName volumediscount --data ./examples/volumediscount/data.json --params ./examples/volumediscount/params.json --state ./examples/volumediscount/state.json

Compile a contract

To compile your first Ergo contract to JavaScript:

$ ergo compile ./examples/volumediscount/model/model.cto ./examples/volumediscount/logic/logic.ergo
Processing file: ./examples/volumediscount/logic.ergo -- compiled to: ./examples/volumediscount/logic.js

By default, Ergo compiles to JavaScript for execution. You can inspect the compiled JavaScript code in ./examples/volumediscount/logic.js


Accord Project Logo

Accord Project is an open source, non-profit, initiative working to transform contract management and contract automation by digitizing contracts. Accord Project operates under the umbrella of the Linux Foundation. The technical charter for the Accord Project can be found here.

Learn More About Accord Project

Overview

Documentation

Ecosystem

Core libraries:

Projects Package name Version Description
Cicero cicero-core npm version Templates Core
cicero-cli npm version Cicero CLI
cicero-engine npm version Node.js VM based implementation of Accord Project Template Specification execution
cicero-server npm version Wraps the Cicero Engine and exposes it as a RESTful service
cicero-test npm version Testing support for Cicero based on cucumber
cicero-tools npm version Cicero Tools
generator-cicero-template npm version Code generator for a Cicero Template
Concerto concerto-core npm version Core Implementation for the Concerto Modeling Language
concerto-tools npm version Tools for the Concerto Modeling Language
concerto-cli npm version command-line interface for Concerto
Ergo ergo-cli npm version Ergo CLI
ergo-compiler npm version Ergo compiler
ergo-test npm version Ergo test
ergo-engine npm version Ergo engine
Markdown markdown-common npm version A framework for transforming markdown
markdown-slate npm version Transform markdown to/from CommonMark DOM
markdown-cli npm version CLI for markdown transformations.
markdown-cicero npm version Markdown extensions for contracts, clauses, variables etc.
markdown-html npm version Transform CiceroDOM to HTML

UI Components:

Projects Package name Version Description
Markdown Editor markdown-editor npm version WYSIWYG rich text web editor for markdown based on Slate.js
Cicero UI cicero-ui npm version React UI components for Cicero
Concerto UI concerto-ui npm version Dynamic web forms generated from Concerto models

Template Editors:

Projects Cicero ver. Description
Template Studio v1 0.13.4 Web UI for creating, editing and testing Accord Project templates
Template Studio v2 0.13.4 Web UI for creating, editing and testing Accord Project templates
VSCode Extension 0.13.4 VS Code extension for editing Cicero templates and Ergo logic

Public templates and models:

Projects Description
Models Accord Project Model Library
Template Library Accord Project Template Library

Documentation:

Project Repo
Documentation techdocs

Contributing

The Accord Project technology is being developed as open source. All the software packages are being actively maintained on GitHub and we encourage organizations and individuals to contribute requirements, documentation, issues, new templates, and code.

Find out what’s coming on our blog.

Join the Accord Project Technology Working Group Slack channel to get involved!

For code contributions, read our CONTRIBUTING guide and information for DEVELOPERS.

README Badge

Using Accord Project? Add a README badge to let everyone know: accord project

[![accord project](https://img.shields.io/badge/powered%20by-accord%20project-19C6C8.svg)](https://www.accordproject.org/)

License

Accord Project source code files are made available under the Apache License, Version 2.0. Accord Project documentation files are made available under the Creative Commons Attribution 4.0 International License (CC-BY-4.0).

Copyright 2018-2019 Clause, Inc. All trademarks are the property of their respective owners. See LF Projects Trademark Policy.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].