sails-hook-truffle
A hook for sails.js which handles parsing and instantiation of contracts on Ethereum based consensus networks via truffle.
Installing the Hook
On existing Sails & Truffle projects:
- Copy contracts folder and truffle.js (or truffle-config.js depending on which your project is using) from your truffle project into the sails project.
- In your sails project, run
npm install -s sails-hook-truffle
Usage:
If your contract's filename is ContractName.sol
:
on the server side you can interact with your contract using:
sailsContractName
on the clientSide:
iosocket