Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding smoke tests for v23 #13644

Merged
merged 3 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/honest-avocados-heal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

add test for v23 #added
5 changes: 5 additions & 0 deletions contracts/.changeset/green-pigs-reflect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@chainlink/contracts": patch
---

add test for v23 #added
3 changes: 3 additions & 0 deletions contracts/scripts/native_solc_compile_all_automation
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,6 @@ compileContract automation/v2_3/AutomationRegistryLogicB2_3.sol
compileContract automation/v2_3/AutomationRegistryLogicC2_3.sol
compileContract automation/v2_3/AutomationUtils2_3.sol
compileContract automation/interfaces/v2_3/IAutomationRegistryMaster2_3.sol

compileContract automation/testhelpers/MockETHUSDAggregator.sol
compileContract automation/test/v2_3/WETH9.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;

import "../../shared/interfaces/AggregatorV3Interface.sol";

contract MockETHUSDAggregator is AggregatorV3Interface {
int256 public answer;
uint256 private blockTimestampDeduction = 0;

constructor(int256 _answer) {
answer = _answer;
}

function decimals() external pure override returns (uint8) {
return 8;
}

function description() external pure override returns (string memory) {
return "MockETHUSDAggregator";
}

function version() external pure override returns (uint256) {
return 1;
}

function getRoundData(
uint80 /*_roundId*/
)
external
view
override
returns (uint80 roundId, int256 ans, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound)
{
return (1, answer, getDeductedBlockTimestamp(), getDeductedBlockTimestamp(), 1);
}

function latestRoundData()
external
view
override
returns (uint80 roundId, int256 ans, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound)
{
return (1, answer, getDeductedBlockTimestamp(), getDeductedBlockTimestamp(), 1);
}

function getDeductedBlockTimestamp() internal view returns (uint256) {
return block.timestamp - blockTimestampDeduction;
}

function setBlockTimestampDeduction(uint256 _blockTimestampDeduction) external {
blockTimestampDeduction = _blockTimestampDeduction;
}
}
Loading
Loading