shl0ms / CAR-contracts

Smart contracts for the CAR gasless auction and NFT token

Home Page:https://car.shl0ms.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

$CAR gasless auction and NFT contracts

Development Process

Development follows these processes outlined in development process


Project Installation, building and running

Git clone, then from the project root execute

Install

To retrieve the project dependencies and before any further tasks will run correctly

npm ci

Husky Git Commit Hooks

To enable Husky commit hooks to trigger the lint-staged behaviour of formatting and linting the staged files prior before committing, prepare your repo with prepare.

npm run prepare

Build and Test

npm run build
npm test

If you make changes that don't get picked up then add a clean into the process

npm run clean
npm run build
npm test

Hardhat

If you want to avoid using the convience scripts, then you can execute against Hardhat directly.

All tests

Target to run all the mocha tests found in the /test directory, transpiled as necessary.

npx hardhat test

Single test

Run a single test (or a regex of tests), then pass in as an argument.

 npx hardhat test .\test\sample.test.ts

Scripts

The TypeScript transpiler will automatically as needed, execute through HardHat for the instantiated environment

npx hardhat run .\scripts\sample-script.ts

Logging

Logging is performed with Bunyan

Bunyan CLI

To have the JSON logging output into a more human-readable form, pipe the stdout to the Bunyan CLI tool.

npx hardhat accounts | npx bunyan

Sequence Diagram Rendering

To create or update the renders for the Plant UML sequence diagrams

Ensure Java is installed

java -version

The output will vary depending on OS, however if it fails claiming Java is not found, then you must install before proceeding.

Generate renders for all Plant UML documents under docs/spec

npm run plant

About

Smart contracts for the CAR gasless auction and NFT token

https://car.shl0ms.com/

License:Apache License 2.0


Languages

Language:TypeScript 68.4%Language:Solidity 31.2%Language:Shell 0.4%