Please see the contracts/ directory.
Contracts are written in Solidity and tested using Truffle and ganache-cli.
# Install local node dependencies
$ npm install
# Compile all smart contracts
$ npm run build
# Run all tests
$ npm test
# Run test coverage analysis
$ npm run coverage
A Docker image to run containerized testing is provided. Requires [Docker Compose][docker compose].
# Build the container and run all tests
$ make build test
# Run a test for a single contract
$ docker-compose run --rm truffle npm test test/CryptoCarzToken.test.js
Examples are provided on how to call a function of the smart contract from Node.js and how to deploy the smart contract in an Ethereum blockchain (e.g. mainnet, testnet, etc.)
# Run the example scripts
$ ts-node src/examples.ts
# Transpile to Javascript and run
$ tsc && dist/examples.js