forked from keep3r-network/keep3r-network-v2
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
31 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity >=0.8.4 <0.9.0; | ||
|
||
import "../interfaces/IKeep3r.sol"; | ||
import '../interfaces/IKeep3r.sol'; | ||
|
||
contract BasicJob { | ||
error KeeperNotValid(); | ||
error KeeperNotValid(); | ||
|
||
address public keep3r; | ||
uint256 public nonce; | ||
uint256[] public array; | ||
address public keep3r; | ||
uint256 public nonce; | ||
uint256[] public array; | ||
|
||
constructor(address _keep3r) { | ||
keep3r = _keep3r; | ||
} | ||
constructor(address _keep3r) { | ||
keep3r = _keep3r; | ||
} | ||
|
||
function test() external { | ||
array.push(1); | ||
} | ||
function test() external { | ||
array.push(1); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,35 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity >=0.8.4 <0.9.0; | ||
|
||
import "../interfaces/IKeep3r.sol"; | ||
import '../interfaces/IKeep3r.sol'; | ||
|
||
contract JobForTest { | ||
error InvalidKeeper(); | ||
error InvalidKeeper(); | ||
|
||
address public keep3r; | ||
uint256 public nonce; | ||
address public keep3r; | ||
uint256 public nonce; | ||
|
||
constructor(address _keep3r) { | ||
keep3r = _keep3r; | ||
} | ||
|
||
function work() external { | ||
if (!IKeep3r(keep3r).isKeeper(msg.sender)) revert InvalidKeeper(); | ||
constructor(address _keep3r) { | ||
keep3r = _keep3r; | ||
} | ||
|
||
for (uint256 i; i < 1000; i++) { | ||
nonce++; | ||
} | ||
function work() external { | ||
if (!IKeep3r(keep3r).isKeeper(msg.sender)) revert InvalidKeeper(); | ||
|
||
IKeep3r(keep3r).worked(msg.sender); | ||
for (uint256 i; i < 1000; i++) { | ||
nonce++; | ||
} | ||
|
||
function workHard(uint256 _factor) external { | ||
if (!IKeep3r(keep3r).isKeeper(msg.sender)) revert InvalidKeeper(); | ||
IKeep3r(keep3r).worked(msg.sender); | ||
} | ||
|
||
for (uint256 i; i < 1000 * _factor; i++) { | ||
nonce++; | ||
} | ||
function workHard(uint256 _factor) external { | ||
if (!IKeep3r(keep3r).isKeeper(msg.sender)) revert InvalidKeeper(); | ||
|
||
IKeep3r(keep3r).worked(msg.sender); | ||
for (uint256 i; i < 1000 * _factor; i++) { | ||
nonce++; | ||
} | ||
|
||
IKeep3r(keep3r).worked(msg.sender); | ||
} | ||
} |