@rsksmart/rif-scheduler-contracts v1.0.1
RIF Scheduler smart contracts are used to
- purchase execution plans with ERC-20 tokens or RBTC,
- schedule executions, (batch scheduling available)
- check execution statuses and
- cancel executions
The Service Provider must deploy this contract and set the address in the RIF Scheduler Service to start making revenue. The SP can:
- Create plans and choose the payment currency. It can be RBTC. Plans have a price per execution, that is given by the window and the gas limit.
- Execute the scheduled executions and collect the reward. It can also change the payee address.
- Pause/unpause the contract. While paused, users can cancel purchasing.
Run for development
Install dependencies:
npm iRun unit tests
npm testCoverage report with:
npm run coverageRun linter
npm run lintAuto-fix:
npm run lint:fixStatic analysis
First install slither and run:
slither .Branching model
mainhas latest release. Merge intomainwill deploy to npm. Do merge commits.develophas latest approved PR. PRs need to passciandscan. Do squash & merge.- Use branches pointing to
developto add new PRs. - Do external PRs against latest commit in
develop.
Deploy
First, create a .secret file with a mnemonic phrase. You will need to fund the account. Then run:
npm run deploy:ganache # deploy to :8545
npm run deploy:rsk-testnet # deploy to RSK Testnet
npm run deploy:rsk-mainnet # deploy to RSK MainnetDeployments
RIF is running an instance of the Scheduler.
RSK Testnet: 0xad249557515d8b89f2869834857bb872d7b5c398
RSK Mainnet: 0x7429d3222f7291a53b5fda3fe8d42b49d2ae6a19
Acknowledgments
Scheduled transaction times are not exact, they will be performed inside an execution window depending on the plan.
The contract also uses block.timestamp to stablish if the scheduled transaction should be executed and/or refunded,
which is subject to manipulation for short time periods.
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago