Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge master into dev #207

Merged
merged 21 commits into from
Jul 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Truffle CI

on:
push:
branches: [dev, master, main]
pull_request:
branches: [dev, master, main]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Setup NodeJS 16
uses: actions/setup-node@v3
with:
node-version: 16.17.0

- name: Show NodeJS version
run: npm --version

- name: Checkout submodules
run: git submodule update --init --recursive

- name: Install Project Dependencies
run: npm install

- name: Run Truffle Test
run: npx truffle test
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v16.17.0
12 changes: 10 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,17 @@

Please follow <https://changelog.md/> conventions.

## 2.3
## 2.3.0 - 20230609

The release 2.3 contains mainly the different fixes and improvements related to the audit performed on the version 2.2.
- Add Truffle CI workflow (Contributor: [diego-G](https://github.com/diego-G) / [21.co](https://github.com/amun))
- Add Truffle plugin [eth-gas-reporter](https://github.com/cgewecke/eth-gas-reporter)
- Add security policy

## 2.3.0-rc.0 - 20230515

> The release 2.3-rc.0 is a *release candidate* before performing an official release 2.3

The release 2.3-rc.0 contains mainly the different fixes and improvements related to the audit performed on the version 2.2.

**Documentation**

Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# CMTA Token
> To use the CMTAT, we recommend the latest audited version, from the [Releases](https://github.com/CMTA/CMTAT/releases) page. Currently, it is the version [v2.3.0](https://github.com/CMTA/CMTAT/releases/tag/v2.3.0)

## Introduction

Expand Down Expand Up @@ -28,8 +29,6 @@ order to support:
This reference implementation allows the issuance and management of tokens representing equity securities.
It can however also be used for other forms of financial instruments such as debt securities.

To use the CMTAT, we recommend that you use the latest audited version, from the [Releases](https://github.com/CMTA/CMTAT/releases) page.

You may modify the token code by adding, removing, or modifying features. However, the mandatory modules must remain in place for compliance with Swiss law.

### Deployment model
Expand Down Expand Up @@ -148,7 +147,7 @@ The second audit covered version [2.2](https://github.com/CMTA/CMTAT/releases/ta

Version 2.3 contains the different fixes and improvements related to this audit.

The list if findings is documented in [Taurus. Audit 3.1. Collected Issues.ods](doc/audits/Taurus.Audit3.1.CollectedIssues.ods).
The report is available in [ABDK_CMTA_CMTATRuleEngine_v_1_0.pdf](doc/audits/ABDK_CMTA_CMTATRuleEngine_v_1_0.pdf).

### Tools

Expand Down
10 changes: 9 additions & 1 deletion doc/USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The toolchain includes the following components, where the versions
are the latest ones that we tested:

- npm 8.19.2
- Truffle 5.8.3
- Truffle 5.9.3
- Solidity 0.8.17 (via solc-js)
- Node 16.17.0
- Web3.js 1.9.0
Expand All @@ -18,12 +18,20 @@ Although present in the dependencies, Hardhat is not included in the toolchain s

## Installation

- Clone the repository

Clone the git repository, with the option `--recurse-submodules` to fetch the submodules:

`git clone git@github.com:CMTA/CMTAT.git --recurse-submodules`

- Node.js version

We recommend to install the [Node Version Manager `nvm`](https://github.com/nvm-sh/nvm) to manage multiple versions of Node.js on your machine. You can then, for example, install the version 16.17.0 of Node.js with the following command: `nvm install 16.17.0`

The file [.nvmrc](../.nvmrc) at the root of the project set the Node.js version. `nvm use`will automatically use this version if no version is supplied on the command line.

- node modules

To install the node modules required by CMTAT, run the following command at the root of the project:

`npm install`
Expand Down
Binary file added doc/audits/ABDK_CMTA_CMTATRuleEngine_v_1_0.pdf
Binary file not shown.
Binary file removed doc/audits/Taurus.Audit3.1.CollectedIssues.ods
Binary file not shown.
Binary file not shown.
30 changes: 30 additions & 0 deletions migrations/1_deploy_contracts.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
require('dotenv').config()

const CMTAT_PROXY = artifacts.require("CMTAT_PROXY")
const { deployProxy } = require("@openzeppelin/truffle-upgrades")
const { Address } = require("ethereumjs-util")

module.exports = async function (deployer, _network, account) {
const admin = process.env.ADMIN_ADDRESS ? process.env.ADMIN_ADDRESS : account[0]
const flag = 0
const ZERO_ADDRESS = Address.zero().toString()
const proxyContract = await deployProxy(
CMTAT_PROXY,
[
admin,
"Test CMTA Token",
"TCMTAT",
"TCMTAT_ISIN",
"https://cmta.ch",
ZERO_ADDRESS,
"TCMTAT_info",
flag,
],
{
deployer,
constructorArgs: [ZERO_ADDRESS]
}
);
await CMTAT_PROXY.deployed()
console.log("Proxy deployed at: ", proxyContract.address)
}
Loading