Proposal of a Filecoin smart contract suite for mathematical proofs, based on Lean theorem prover
Make sure to have all of the following installed:
- python
- pip for python package management
- node.js
- lean4
Keep in mind: lean comes with a command line tool called lake that enables custom theorem imports.
Installing the python dependencies:
pip install -r requirements.txtInstalling the node dependencies:
npm install
npm install next
npm install -g --no-fund @lighthouse-web3/sdkWe are going to be using the hardhat
npx hardhat compileBefore running the application run:
lake update
lake buildIf there are issues run:
lake cleanRainbowkit will provide the wallet related functionalities
cd rainbowkit-app
npm install next
npm run build
npm run devMake sure that the URL of the rainbowkit server is correct: Execute the following command:
streamit run sakura.pyWe have three main scripts:
- publish.js, which can be launched only by the owner of the contract (i.e. the server), with the syntax:
node publish.js --author [author] --citations [cit1] [cit2] [...]- activateArticle.js, which can be launched by anybody and triggers a pull payment by the Publish.sol contract, syntax:
node activateArticle.js --articleId [id]- getCitations.js, just a view function, syntax:
node getCitations.js --articleId [id]