From 4c351b2f0a0c73b8766f546300b520004315d932 Mon Sep 17 00:00:00 2001 From: simplemachine92 Date: Mon, 6 Jan 2025 19:57:51 -0600 Subject: [PATCH 1/3] fix test err, partial emit wen --- test/units/static/JBMultiTerminal/TestSendPayoutsOf.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/units/static/JBMultiTerminal/TestSendPayoutsOf.sol b/test/units/static/JBMultiTerminal/TestSendPayoutsOf.sol index cbcaabe1..85af04e0 100644 --- a/test/units/static/JBMultiTerminal/TestSendPayoutsOf.sol +++ b/test/units/static/JBMultiTerminal/TestSendPayoutsOf.sol @@ -234,7 +234,7 @@ contract TestSendPayoutsOf_Local is JBMultiTerminalSetup { address(this), address(0), 97, // Amount that would have been transferred after fee. - bytes(hex"9996b3150000000000000000000000000000000000000000000000000000000000000000"), + bytes(hex"5274afe70000000000000000000000000000000000000000000000000000000000000000"), address(this) ); From 5fd49069b0ea6f27af04da042501f64ef395a6ba Mon Sep 17 00:00:00 2001 From: simplemachine92 Date: Mon, 6 Jan 2025 19:58:13 -0600 Subject: [PATCH 2/3] invalid round check --- src/JBChainlinkV3SequencerPriceFeed.sol | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/JBChainlinkV3SequencerPriceFeed.sol b/src/JBChainlinkV3SequencerPriceFeed.sol index fd95ef0f..1dd85a7f 100644 --- a/src/JBChainlinkV3SequencerPriceFeed.sol +++ b/src/JBChainlinkV3SequencerPriceFeed.sol @@ -17,6 +17,8 @@ contract JBChainlinkV3SequencerPriceFeed is JBChainlinkV3PriceFeed { uint256 timestamp, uint256 gradePeriodTime, uint256 startedAt ); + error JBChainlinkV3SequencerPriceFeed_InvalidRound(); + //*********************************************************************// // ---------------- public stored immutable properties --------------- // //*********************************************************************// @@ -59,6 +61,9 @@ contract JBChainlinkV3SequencerPriceFeed is JBChainlinkV3PriceFeed { // slither-disable-next-line unused-return (, int256 answer, uint256 startedAt,,) = SEQUENCER_FEED.latestRoundData(); + // Check if round is valid to prevent an edge-case where Arbitrum uptime contract is not init. + if (startedAt == 0) revert JBChainlinkV3SequencerPriceFeed_InvalidRound(); + // Revert if sequencer has too recently restarted or is currently down. if (block.timestamp <= GRACE_PERIOD_TIME + startedAt || answer == 1) { revert JBChainlinkV3SequencerPriceFeed_SequencerDownOrRestarting( From a3168c2c7c484d6c1bbf7dd99a84f362423e3b14 Mon Sep 17 00:00:00 2001 From: mejango Date: Thu, 9 Jan 2025 20:01:12 -0300 Subject: [PATCH 3/3] rm blank line --- src/JBChainlinkV3SequencerPriceFeed.sol | 1 - 1 file changed, 1 deletion(-) diff --git a/src/JBChainlinkV3SequencerPriceFeed.sol b/src/JBChainlinkV3SequencerPriceFeed.sol index 1dd85a7f..fcb781ab 100644 --- a/src/JBChainlinkV3SequencerPriceFeed.sol +++ b/src/JBChainlinkV3SequencerPriceFeed.sol @@ -16,7 +16,6 @@ contract JBChainlinkV3SequencerPriceFeed is JBChainlinkV3PriceFeed { error JBChainlinkV3SequencerPriceFeed_SequencerDownOrRestarting( uint256 timestamp, uint256 gradePeriodTime, uint256 startedAt ); - error JBChainlinkV3SequencerPriceFeed_InvalidRound(); //*********************************************************************//