In order to use, build and test the contracts found in this repo, Truffle version > 4 is needed.
These contracts have not been audited, use them with caution.
First install as a npm package in your truffle project directory:
yarn add -E @tokenfoundry/state-machine
Import in your contracts:
import "@tokenfoundry/state-machine/contracts/StateMachine.sol";
contract MyContract is StateMachine {
...
}
Please read the docs and the examples for more information about how to use this.
To run the tests, clone this repo and run yarn install
to install dependencies.
Run yarn test
to run all the tests.
Run yarn coverage
to run tests and get code coverage.
MIT