Solidity smart contracts to hold and make available NTN stake tokens (and optionally allow staking of locked tokens).
This repo contains user documentation and Solidity source code
Documentation in /docs/ covers design specification, user guide, cookbook, and API reference.
Rendered version included here, in /docs/docs/index.html
Can be built with Quarto to a static website viewed on your machine's local host:
quarto render docsto build onlyquarto preview docsto build and preview on localhost.
Note: The above quarto commands assume that API Documentation is available in ./api-docs for inclusion. See below, yarn compile step.
Alternatively, in devenv shell use commands docs-render or docs-preview, which include the yarn compile step.
Used Devenv. Enter with devenv shell unless you have direnv enabled.
Solidity source code, tests, API reference.
- Node.js - v22
- Yarn - v1.22
- Hardhat - v2.0
You can install all necessary npm dependencies with:
yarn installyarn compileThis command will compile all contracts in the ./contracts directory, and export all ABIs to the ./abi and all bytecodes to the ./artifacts directory. It will also generate documentation in ./api-docs directory.
yarn testThis command will run all tests in the ./test directory.
You can also use devenv to run tests. Run devenv shell then test-all to run all
unit tests. All test reports can be found in ./test/report directory.