feat: prices automation support for chainlink v2.3 - #69
Conversation
0645250 to
7fa70d1
Compare
Report from live testing on Base Sepolia1. Run the setup script2. Manual checks
3. Manual steps
Performance results
|
airtoonricardo
left a comment
There was a problem hiding this comment.
Changes are overall looking good to me, just left some cleanup comments.
| "test:fork:v2_3": "FORK_ENABLED=true FORK_CHAIN=base BLOCK_NUMBER=27557816 npx hardhat test test/emissions/fork/v2_3/GaugeUpkeepManagerV2_3.test.ts", | ||
| "test:fork:prices": "FORK_ENABLED=true FORK_CHAIN=optimism BLOCK_NUMBER=135890825 npx hardhat test test/prices/fork/TokenUpkeepManager.test.ts", | ||
| "test:fork:prices": "FORK_ENABLED=true FORK_CHAIN=optimism BLOCK_NUMBER=135890825 npx hardhat test test/prices/fork/v2_1/TokenUpkeepManagerV2_1.test.ts", | ||
| "test:fork:prices:v2_3": "FORK_ENABLED=true FORK_CHAIN=base BLOCK_NUMBER=30517684 npx hardhat test test/prices/fork/v2_3/TokenUpkeepManagerV2_3.test.ts", |
There was a problem hiding this comment.
I think this will likely have some conflicts with the changes in #55, so once that's merged this file should be updated accordingly (i.e.: test:fork should run all fork tests, etc)
| import {EnumerableSet} from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; | ||
| import {StableEnumerableSet} from "./libraries/StableEnumerableSet.sol"; | ||
| import {StableEnumerableSet} from "../libraries/StableEnumerableSet.sol"; | ||
| import {Log} from "@chainlink/contracts/src/v0.8/automation/interfaces/ILogAutomation.sol"; |
There was a problem hiding this comment.
nit: Can we move the Log import above the StableEnumerableSet import? We usually try to separate external imports from internal ones.
| uint8 private constant CONDITIONAL_TRIGGER_TYPE = 0; | ||
| string private constant UPKEEP_NAME = "Token upkeep"; | ||
| uint256 internal constant TOKENS_PER_UPKEEP = 100; | ||
| uint256 internal constant UPKEEP_CANCEL_BUFFER = 20; |
There was a problem hiding this comment.
nit: Think the UPKEEPP_CANCEL_BUFFER can remain as private, right? Since it is only used here
| @@ -2,7 +2,7 @@ | |||
| pragma solidity 0.8.6; | |||
There was a problem hiding this comment.
nit: Can also move the TokenUpkeep contract into the common folder
| automationRegistrar: AutomationRegistrar2_3, | ||
| eventSignature: string, | ||
| voterAddress: string, | ||
| gaugeUpkeepManagerAddress: string, |
There was a problem hiding this comment.
Should refactor the instances of gaugeUpkeepManagerAddress in this file to tokenUpkeepManagerAddress
|
|
||
| uint256 private constant TOKENS_PER_UPKEEP = 100; | ||
| uint256 internal constant TOKENS_PER_UPKEEP = 100; | ||
| uint256 private constant UPKEEP_CANCEL_BUFFER = 20; |
There was a problem hiding this comment.
tiny nit: Can we move the private constant below the internal ones now?
Resovles #59
Depends on #55