Welcome to the Request Network Smart Contracts documentation. Using the smart contracts you can create new requests, pay them, consult them or update them from your own on-chain applications.
If your application is off-chain, you can interact with the JS library: view JS Library Documentation.
This is still an early version which is likely to significantly evolve.
If you need help, join the Request Hub Slack.
Detailled API reference for the smart contracts is available on docs-smart-contracts.request.network
Everything that is specified in the documentation of the protocol.
Among other things, this documentation specifies the smart contract architecture, the different actions that can be done at specific times, the statuses, how to use the extensions, the fee management system, the cross currency feature, how to manage identity and what to expect from the reputation system.
No tutorial available yet. Feel free to suggest yours and we will refer to it.
You can deploy your own contracts on testrpc thanks to the truffle project:
cd packages/requestNetworkSmartContracts truffle deploy --network development
See API reference: https://docs-smart-contracts.request.network/docs/RequestEthereum/
See API reference: https://docs-smart-contracts.request.network/docs/RequestERC20/
Install ganache globally if it isn’t already installed
npm install -g ganache-cli
Install lerna and bootstrap it, to install the dependencies and link the packages together
npm install --global lerna
Launch a ganache-cli instance on a terminal:
npm run ganache
You can now launch the unit tests:
npm run test
To build the artifacts, run
npm run build
This will compile the contracts through truffle and run exportArtifacts.js on the export of truffle.
The output will be accessible in export/
To clean build/ (temporary folder, output of truffle) and export/, run
npm run clean