Releases: accordproject/template-archive
Cicero v0.9.1
Cicero and Ergo are now using the brand new Composer Concerto modeling language! (Contribution @dselman @mttrbrts and @jeromesimeon)
This release also includes API changes to support generation of Ergo archives which are used by the Accord Project Template Studio
Install the latest release of the Cicero command-line tool with
npm i -g @accordproject/cicero-cli
💔 Both of those new features involve breaking changes. If you are upgrading from Cicero 0.8.0 look at the release notes below for the relevant changes.
Namespaces
- 💔 The root namespace has changed from
org.hyperledger.composer.system
toorg.accordproject.base
. - 💔 The
org.accordproject.base
namespace is now reserved for built-in types. If you have CTO models or Ergo code depending on it you should consider renaming to a new namespace.
Ergo
Cicero 0.9.1 is now running Ergo 0.5.2!
- 💔 If your Ergo code depends on any of the previous system Hyperledger types (
Event
,Transaction
,Concept
,Asset
, orParticipant
) those will now be considered by the Ergo compiler to be in theorg.accordproject.base
namespace.
API
- 💔The
Template.toArchive
call now takes a mandatory language parameter. To recover Cicero 0.8.0 behavior, replacetoArchive()
bytoArchive('javascript')
.
Security fixes
- 👮 Update to npm package dependencies to avoid known security vulnerabilities (Contribution @mttrbrts)
Tooling
⚖️ 🎉 The new Accord Project Template Studio is live! Create and edit Accord Projects without leaving your chair (or your browser)! Give it a try and give us feedback on the template studio's GitHub. (Contribution @jeromesimeon)
Templates
💔 The published Accord Project templates archives now contain Ergo rather than JavaScript.
🏦 Simple variant for Late Delivery and Penalty Clause is a simpler form for the popular late delivery and penalty clause (Contribution @hshadab)
Cicero v0.8.0
This week's release includes bug fixes and support for now-strongly-typed Ergo 0.4.0 for safer contract logic.
💔 Unsurprisingly, this means we have again some breaking changes in this release on the Ergo side
Install the latest release of the Cicero command-line tool with
npm i -g @accordproject/cicero-cli
Ergo
This is a release for strongly typed Ergo! The type checker is now enabled on the compiler as well as the REPL.
Additional changes include:
🍸 Ergo Type Checker
- 👩⚕️More better error messages (accordproject/ergo#374)
- 🔬You cannot instantiate an abstract class anymore, and rightly so (accordproject/ergo#370)
Build
- Cleaner and faster Ergo build from source in CircleCI
Bug fixes
- 🐞 bug in optional chaining implementation (accordproject/ergo#321)
- 🐞 bug in importing type hierarchy from CTO files
Tooling
- Updated VSCode plugin understands Cicero 0.8.0 & Ergo 0.4.0 and reports type errors
Templates
🏦 One Time Payment has a better natural language text (contribution by @hshadab)
Cicero v0.6.0
This week's release includes bug fixes and performance improvements. It also includes support for Ergo 0.3.1, which comes with a brand new tool for interactive construction, execution and debugging of Ergo program.
💔 Beware that we have again some breaking changes in this release on the Ergo side
Install the latest release of the Cicero command-line tool with
npm i -g @accordproject/cicero-cli
Fixes
- 🐞The creation of hashes for templates is now more robust and consistent (Thanks to @mttrbrts! PR #186)
- 🐇Avoid loading external models when we don't have to which improves performance (Also Thanks to @mttrbrts ! PR #188 )
- 🐞Inlining bug for constants (accordproject/ergo#389)
- 🐞Prevent redefining types with the same name (accordproject/ergo#408)
Ergo
Ergo 0.3.1 is out!
🍸 Ergo REPL!
There is a brand new tool for interactive development and testing of Ergo programs called the REPL (Read-Eval-Print-Loop) (@kach and @jeromesimeon)
Try it by installing the latest release of Ergo with:
npm i -g @accordproject/ergo-cli
Then start the REPL by typing in a terminal:
ergotop
You can type in Ergo expressions (or even load contracts) and try them interactively. The REPL showcases the upcoming type system for Ergo. When you write an expression or load a contract, it will check types for you and tell you if it finds mistakes in your code.
Sample Ergo contracts that work in the REPL can be found in https://github.com/accordproject/ergo/tree/v0.3.1/examples/typechecked
Language
- Output types on functions and clauses are now optional
- Built in functions on DateTime renamed from
moment*
todateTime*
- Optional values use
none
andsome(...)
consistently - Empty value (resp. type) now called
unit
(resp.Unit
) - match expressions now understand the composer models type hierarchy
Tooling
- New VIM mode (contribution @kach) can be found in
ergo.vim
Templates
🚗 Payment Upon Delivery (in English). A new payment clause thanks to @DianaLease and @Michael-Grover-C
Documentation
🏁 And finally, thanks to @FelixKuehl for some improvements to the Quick Start tutorial in the documentation, https://docs.accordproject.org/docs/cicero-tutorial_001.html
Cicero v0.5.0
Momentum is building 📈 ! We're really starting to see the benefits of the stack now.
This week's release includes support for Cicero in the browser, support for module import in Ergo, and an external contribution from @dlkconsultancy to provide a contract Car Rental template in Turkish, teşekkür ederim! 🇹🇷
Note that we plan to support multi-locale templates (with legal text in multiple locales, backed by a common data model and logic) in a future release. See issue #174.
💔 Beware that we have some breaking changes in this release on the Ergo side, but don't worry, the migration is pretty simple (accordproject/ergo#326)
Install the latest release of the Cicero command-line tool with
npm i -g @accordproject/cicero-cli
Features
Cicero
🏖 Cicero is escaping from the server into the browser! This opens up all sorts of fun possibilities, Cicero Template editing online, client-side validation of templates. We're really excited to see where this leads. HT @mttrbrts
<script src="https://unpkg.com/@accordproject/[email protected]/umd/cicero.js"></script>
See the following minimal repos for examples that use the webpack'd library.
- Using the CDN version of Cicero - https://github.com/mttrbrts/react-cicero
- Bundle the module yourself - https://github.com/mttrbrts/webpack-cicero
Ergo
🎂 Ergo is now at v0.2.0.
🍸 Delegate!! Ergo 0.2.0 supports modularity: you can create your logic in multiple Ergo files or import libraries! For instance:
// In money.ergo:
namespace org.accordproject.ergo.money
define function compoundInterest(annualInterest : Double, numberOfDays : Double) : Double {
return (1.0 + annualInterest) ^ (numberOfDays / 365.0)
}
// In logic.ergo:
import org.accordproject.ergo.money.*
...
clause check(request : Payment) : Result throws ErrorResponse {
let compounded = request.amount * compoundInterest(contract.interestRate, numberOfDays);
...
Language
- Module system for Ergo. Logic can be split in multiple module and imported.
- Instead of
new Concept{ ... }
we now write:Concept{ ... }
(accordproject/ergo#326) - Fully qualified names prefixed with
~
to avoid parsing ambiguity (accordproject/ergo#310) - New syntax to set contract instance and call clauses (accordproject/ergo#277)
Compiler
- Brand new inlining phase (contribution @kach)
- Revisions/bug fixes to namespace resolution and context management
- Compiler and REPL share common compilation pipeline
- Automatically reorders input CTOs and Ergo modules based on dependency
- Initial compiler support for type checking
Tooling
- new
ergodep
command line tool calculates dependencies
REPL (contribution @kach 🌯, @jeromesimeon)
- Interface improvements (multiline input, better error reporting, handles empty input gracefully)
- Support for state changes
- Support for
match
,set contract
andcall
REPL now checks/infers types (alpha)
Document Object Model
🐶 Eating our own dog-food... @dselman has published a DOM (document-object model) to describe the structure of a Cicero template. This formal structure gives us much more power to parse, generate and manipulate templates within the engine and using Ergo code.
Get a sneak peek of what's to come at https://models.accordproject.org/cicero/dom.html and by following the issue #171.
Templates
🚗 Car Rental Agreement (in Turkish) via @dlkconsultancy. This is the first non-English template, great job Umut and Serkan!
Documentation
See the latest version of the documentation at https://docs.accordproject.org/
Fixes
🐞 Something screwy happened with our version numbers but @jeromesimeon & @penguinbroker put us back on track! (215e3da)
🐞 The cicero-core API now exposes the TemplateLibrary
class properly (2469c1d)
v0.4.7
Cicero v0.4.7
Install the latest release of the Cicero command-line tool with
npm i -g @accordproject/cicero-cli
API
- 🐜 Template libraries can now be filtered by latest version and by cicero version.
v0.4.6
Cicero v0.4.6
✨ The community is growing! This week we're indebted to our new contributors @kach, @jbesq777 @jcarpenter67, @jhoogstraat & @peterhunn. Great work guys!
Install the latest release of the Cicero command-line tool with
npm i -g @accordproject/cicero-cli
Features
- 🏋️♀️
composer-common
has been on a diet, which means that Cicero can grow on even more exciting environments. Smart Contracts on FaaS, anyone? https://github.com/hyperledger/composer/pull/4200 - 📜 Ergo. Now at v0.1.2 from 0.0.68, @jeromesimeon & @kach have been busy! Updates include:
- 🗺 Improved compiler & error messages with location information so that you know exactly where things went wrong.
- 👓 Namespace resolution support & standard library functions clean up your Ergo logic so that it's easier to read.
- 🗽 Syntax changes:
declare variable
is nowdeclare constant
in declarations andlet
in expressions - 🔁 Ergo now has a sexy REPL (read-eval-print-loop) tool thanks to @kach. This lets us execute Ergo snippets on the command line, and there's lots more to come I'm told! accordproject/ergo#272
- 💰 @jcarpenter67 has seen the money with his first commit. Thanks John for your contribution of a digital currency model to the Models Repository
- 🏛Template libraries can be filtered to just retrieve the latest version of each template. #153 . As seen at https://templates.accordproject.org
Fixes
- 🐞Instead of throwing errors,
Template.getRequestTypes
,Template.getResponseTypes
,Template.getEmitTypes
,Template.getStateTypes
now return empty arrays if the template doesn't have any logic. #154 - 🐞 Error when installing the
ergo-cli
with npm (thanks to @jhoogstraat). accordproject/ergo#270
Documentation
- 📚 @jbesq777 has been at it again! Yet more beautiful words to describe Ergo Contracts and Clauses. https://docs.accordproject.org/docs/next/ergo-lang.html#contract-declarations
- 📘 The template specification has now moved into the docs site, https://docs.accordproject.org/docs/next/cicero-specification.html
Fame
- 🙇♀️ We were flattered by our friends over at https://github.com/hyperledger/composer/ to be featured in the world-famous Conga Comic (@EdMoffatt is a ⭐️)
If you are new to Conga Comics, then you can view the complete Conga Comic collection at https://congacomic.tumblr.com
v0.4.5
Cicero v0.4.5
Install the latest release of the command-line tool with
npm i -g @accordproject/cicero-cli
Features
- 🕺Model repository at https://models.accordproject.org
- 🏛Template library at https://templates.accordproject.org #96
- 🌐 Template API. Now has
fromUrl
function to retrieve templates from GitHub (github://
), HTTP(S) (http(s)://
) and the Accord Project template library(ap://
) depending on the protocol of the URI. #142 - 🗺 Template API. Now has
getStateTypes
function. #138 - 🚬 Template API. Now has
getHash
function to generate a content based SHA-256 hash for a template. #145 - 🗜️CLI now supports creating archives #135
- 📘 Documentation consolidation. All docs are now at the shiny docs.accordproject.org . #136
- 📜 Ergo. Now at v0.0.67
- 🖥 Logging now produces formatted and coloured JSON output. #144, #139
v0.4.4
- Upgrade to Ergo 0.0.66
v0.4.3
- Add language to metadata
v0.4.2
- Support for state intialization
- Ergo 0.0.65
- Bug fixes