Skip to content

autonity/ntn-locking-contracts

Repository files navigation

locking-contracts

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

User documentation

Documentation in /docs/ covers design specification, user guide, cookbook, and API reference.

Build

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 docs to build only
  • quarto preview docs to 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.

Technical

Used Devenv. Enter with devenv shell unless you have direnv enabled.

Solidity source code

Solidity source code, tests, API reference.

Dependencies

  • Node.js - v22
  • Yarn - v1.22
  • Hardhat - v2.0

Installation

You can install all necessary npm dependencies with:

yarn install

Commands

yarn compile

This 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 test

This command will run all tests in the ./test directory.

Devenv

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.

About

Smart contracts to hold and make available NTN stake tokens (and optionally allow staking of locked tokens)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors