Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Andre Cronje committed Mar 28, 2021
2 parents a79922c + 923c7a6 commit d7b7989
Show file tree
Hide file tree
Showing 6 changed files with 927 additions and 11 deletions.
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# Introduction to Keep3r Network

{% hint style="info" %}
These docs are in active development by the Keep3r community.
{% endhint %}
_These docs are in active development by the Keep3r community._

Keep3r Network is a decentralized keeper network for projects that need external devops and for external teams to find keeper jobs

Expand Down Expand Up @@ -41,7 +39,7 @@ For no, or low risk executions, you can simply call ```Keep3r.isKeeper(msg.sende
For high, sensitive, or critical risk executions, you can specify a minimum bond, minimum jobs completed, and minimum Keeper age required to execute this function. Based on these 3 limits you can define your own trust ratio on these keepers.

So a function definition would look as follows;
```
```solidity
function execute() external {
require(Keep3r.isKeeper(msg.sender), "Keep3r not allowed");
}
Expand All @@ -51,7 +49,7 @@ At the end of the call, you simply need to call ```workReceipt(address,uint)```

Example Keep3rJob

```
```solidity
interface UniOracleFactory {
function update(address tokenA, address tokenB) external;
}
Expand Down
2 changes: 1 addition & 1 deletion contracts/Keep3r.sol
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,7 @@ contract Keep3rV1 is ReentrancyGuard {
* @param amount the amount of credit being added to the job
*/
function addCredit(address credit, address job, uint amount) external nonReentrant {
require(jobs[job], "addCreditETH: !job");
require(jobs[job], "addCredit: !job");
uint _before = IERC20(credit).balanceOf(address(this));
IERC20(credit).safeTransferFrom(msg.sender, address(this), amount);
uint _received = IERC20(credit).balanceOf(address(this)).sub(_before);
Expand Down
5 changes: 1 addition & 4 deletions contracts/MetaKeep3r.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ pragma solidity ^0.5.17;

library SafeMath {
function add(uint a, uint b) internal pure returns (uint) {
uint c = a + b;
require(c >= a, "add: +");

return c;
return add(a, b, "add: +")
}
function add(uint a, uint b, string memory errorMessage) internal pure returns (uint) {
uint c = a + b;
Expand Down
Loading

0 comments on commit d7b7989

Please sign in to comment.