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

Fixed broken tests from PRD alignment #10619

Merged
merged 2 commits into from
Sep 13, 2023
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
178 changes: 89 additions & 89 deletions contracts/gas-snapshots/llo-feeds.gas-snapshot

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions contracts/src/v0.8/llo-feeds/dev/FeeManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@ contract FeeManager is IFeeManager, ConfirmedOwner, TypeAndVersionInterface {
uint64 private constant PERCENTAGE_SCALAR = 1e18;

/// @notice the LINK token address
address private immutable i_linkAddress;
address public immutable i_linkAddress;

/// @notice the native token address
address private immutable i_nativeAddress;
address public immutable i_nativeAddress;

/// @notice the proxy address
address private immutable i_proxyAddress;
address public immutable i_proxyAddress;

/// @notice the reward manager address
IRewardManager private immutable i_rewardManager;
IRewardManager public immutable i_rewardManager;

// @notice the mask to apply to get the report version
bytes32 private constant REPORT_VERSION_MASK = 0xffff000000000000000000000000000000000000000000000000000000000000;
Expand Down Expand Up @@ -259,7 +259,7 @@ contract FeeManager is IFeeManager, ConfirmedOwner, TypeAndVersionInterface {
uint256 linkQuantity;
uint256 nativeQuantity;
uint256 expiresAt;
(, , , linkQuantity, nativeQuantity, expiresAt) = abi.decode(
(, , , nativeQuantity, linkQuantity, expiresAt) = abi.decode(
report,
(bytes32, uint32, uint32, uint192, uint192, uint32)
);
Expand Down
4 changes: 2 additions & 2 deletions contracts/src/v0.8/llo-feeds/dev/RewardManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {Common} from "../../libraries/Common.sol";
import {SafeERC20} from "../../vendor/openzeppelin-solidity/v4.8.0/contracts/token/ERC20/utils/SafeERC20.sol";

/**
* @title FeeManager
* @title RewardManager
* @author Michael Fletcher
* @author Austin Born
* @notice This contract will be used to reward any configured recipients within a pool. Recipients will receive a share of their pool relative to their configured weight.
Expand All @@ -34,7 +34,7 @@ contract RewardManager is IRewardManager, ConfirmedOwner, TypeAndVersionInterfac
bytes32[] public s_registeredPoolIds;

// @dev The address for the LINK contract
address private immutable i_linkAddress;
address public immutable i_linkAddress;

// The total weight of all RewardRecipients. 1e18 = 100% of the pool fees
uint64 private constant PERCENTAGE_SCALAR = 1e18;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,8 @@ contract BaseFeeManagerTest is Test {
feedId,
uint32(0),
uint32(0),
uint192(DEFAULT_REPORT_LINK_FEE),
uint192(DEFAULT_REPORT_NATIVE_FEE),
uint192(DEFAULT_REPORT_LINK_FEE),
uint32(block.timestamp),
int192(0)
);
Expand All @@ -210,8 +210,8 @@ contract BaseFeeManagerTest is Test {
feedId,
uint32(0),
uint32(0),
uint192(DEFAULT_REPORT_LINK_FEE),
uint192(DEFAULT_REPORT_NATIVE_FEE),
uint192(DEFAULT_REPORT_LINK_FEE),
uint32(block.timestamp),
int192(0),
int192(0),
Expand All @@ -230,8 +230,8 @@ contract BaseFeeManagerTest is Test {
feedId,
uint32(0),
uint32(0),
uint192(linkFee),
uint192(nativeFee),
uint192(linkFee),
uint32(expiry),
int192(0),
int192(0),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ contract BaseTestWithConfiguredVerifierAndFeeManager is BaseTest {
bytes32 internal v1ConfigDigest;
bytes32 internal v3ConfigDigest;

struct V2Report {
struct V3Report {
// The feed ID the report has data for
bytes32 feedId;
// The time the median value was observed on
Expand Down Expand Up @@ -321,14 +321,14 @@ contract BaseTestWithConfiguredVerifierAndFeeManager is BaseTest {
rewardManager.setFeeManager(address(feeManager));
}

function _encodeReport(V2Report memory report) internal pure returns (bytes memory) {
function _encodeReport(V3Report memory report) internal pure returns (bytes memory) {
return
abi.encode(
report.feedId,
report.observationsTimestamp,
report.validFromTimestamp,
report.linkFee,
report.nativeFee,
report.linkFee,
report.expiresAt,
report.benchmarkPrice,
report.bid,
Expand All @@ -337,7 +337,7 @@ contract BaseTestWithConfiguredVerifierAndFeeManager is BaseTest {
}

function _generateEncodedBlobWithQuote(
V2Report memory report,
V3Report memory report,
bytes32[3] memory reportContext,
Signer[] memory signers,
bytes memory quote
Expand Down Expand Up @@ -371,14 +371,14 @@ contract BaseTestWithConfiguredVerifierAndFeeManager is BaseTest {
);
}

function _generateV3Report() internal view returns (V2Report memory) {
function _generateV3Report() internal view returns (V3Report memory) {
return
V2Report({
V3Report({
feedId: FEED_ID_V3,
observationsTimestamp: OBSERVATIONS_TIMESTAMP,
validFromTimestamp: uint32(block.timestamp),
linkFee: uint192(DEFAULT_REPORT_LINK_FEE),
nativeFee: uint192(DEFAULT_REPORT_NATIVE_FEE),
linkFee: uint192(DEFAULT_REPORT_LINK_FEE),
expiresAt: uint32(block.timestamp),
benchmarkPrice: MEDIAN,
bid: BID,
Expand Down
100 changes: 98 additions & 2 deletions core/gethwrappers/llo-feeds/generated/fee_manager/fee_manager.go

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
GETH_VERSION: 1.12.0
errored_verifier: ../../../contracts/solc/v0.8.16/ErroredVerifier.abi ../../../contracts/solc/v0.8.16/ErroredVerifier.bin a1b88979c6b0b210677346df554ffc33992d6ebe24be5a244475bfb4d153155e
exposed_verifier: ../../../contracts/solc/v0.8.16/ExposedVerifier.abi ../../../contracts/solc/v0.8.16/ExposedVerifier.bin 6932cea8f2738e874d3ec9e1a4231d2421704030c071d9e15dd2f7f08482c246
fee_manager: ../../../contracts/solc/v0.8.16/FeeManager.abi ../../../contracts/solc/v0.8.16/FeeManager.bin 2c22cbfb24374f645eef8a368f30d1821e350501742118eebd0fa3e8bcbc4d29
fee_manager: ../../../contracts/solc/v0.8.16/FeeManager.abi ../../../contracts/solc/v0.8.16/FeeManager.bin 630d7dfa814579001a359e26d99ff9c1f76a6a6480b0140da91b9f20cc1ab8df
llo_feeds: ../../../contracts/solc/v0.8.16/FeeManager.abi ../../../contracts/solc/v0.8.16/FeeManager.bin cb71e018f67e49d7bc0e194c822204dfd59f79ff42e4fc8fd8ab63f3acd71361
llo_feeds_test: ../../../contracts/solc/v0.8.16/ExposedVerifier.abi ../../../contracts/solc/v0.8.16/ExposedVerifier.bin 6932cea8f2738e874d3ec9e1a4231d2421704030c071d9e15dd2f7f08482c246
reward_manager: ../../../contracts/solc/v0.8.16/RewardManager.abi ../../../contracts/solc/v0.8.16/RewardManager.bin 8b163eb0537180accfa69beea298890f1605c8d9f776689ea26802eefda46457
reward_manager: ../../../contracts/solc/v0.8.16/RewardManager.abi ../../../contracts/solc/v0.8.16/RewardManager.bin ec52c851ffe7ed00e05a68dbb363b2e01d38088ac829988b611653b30d10ec97
verifier: ../../../contracts/solc/v0.8.16/Verifier.abi ../../../contracts/solc/v0.8.16/Verifier.bin 8f841ddd5e616fc1a8d6ac3d27ea9a383d958055237c90ecaf980f5cb3421e49
verifier_proxy: ../../../contracts/solc/v0.8.16/VerifierProxy.abi ../../../contracts/solc/v0.8.16/VerifierProxy.bin 92ad0416e999e9d55e4f00a8b7df616bb69ae27ce52994a6061598e95364d2cc
Loading