Allows Cacti
to interact with HTLC contract manager.
The smart contracts and rationalle ane explained in detail in this Medium article .
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
Install Foundry: https://book.getfoundry.sh/getting-started/installation
Steps to compile the project: forge build
.
The tests can be found in @hyperledger/cactus-test-htlc-eth-besu. To run this, in the root project execute:
npm run test:plugin-htlc-besu
To run the solidity tests (within the root directory of this package):
forge test --match-contract PrivateHashTimeLockTest
To run a specific function:
forge test --match-contract PrivateHashTimeLockTest --match-test testDeployment
Run ALL the solidity tests: forge test -vvvv
We welcome contributions to Hyperledger Cactus in many forms, and there’s always plenty to do!
Please review CONTRIBUTING.md to get started.
Foundry uses forge-std
and ds-test
modules for testing purposes. Given that Foundry cannot access files outside of the project, we use nohoist to force lerna to download the packages within the Forge project directory:
"nohoist": [ "**/iroha-helpers", "**/forge-std", "**/forge-std/**" ] },
If in the future Forge supports importing Solidity files from outside the project, the imports/re-mappings can be updated and the nohoist configuration removed.
This distribution is published under the Apache License Version 2.0 found in the LICENSE file.