diff --git a/README.md b/README.md index 2862dfd6..729e1716 100644 --- a/README.md +++ b/README.md @@ -118,8 +118,9 @@ New V5 `SupplyController` (increased cap to account for the governance-induced b New V5 `SupplyController` (increase cap again to account for governance-induced burn): * Mainnet: https://etherscan.io/address/0xD4628FA47AAe2d0f4c8a204f36c2d93AA8dc31F5 -New V5 `SupplyController` (increase cap again to account for governance-induced burn and discount treasury tokens): +New V5 `SupplyController` (increase cap again to account for governance-induced burn by discounting treasury tokens): * Mainnet: https://etherscan.io/address/0x9B370599B2bf61806DDca1379257F26377472BEe +* Was later updated by setting the incentive rate on 05 Feb 2024 following another halving governance vote StakingPool: diff --git a/contracts/OUTPACE.sol b/contracts/OUTPACE.sol index a2f41e77..e52753c7 100644 --- a/contracts/OUTPACE.sol +++ b/contracts/OUTPACE.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: agpl-3.0 -pragma solidity 0.8.7; +pragma solidity 0.8.19; import "./libs/SafeERC20.sol"; import "./libs/MerkleProof.sol"; @@ -88,7 +88,7 @@ contract OUTPACE { if (challengeExpirationTime != 0) lastStateRoot[channelId] = withdrawal.stateRoot; // Check the signatures - bytes32 hashToSign = keccak256(abi.encode(address(this), channelId, withdrawal.stateRoot)); + bytes32 hashToSign = keccak256(abi.encode(address(this), channelId, withdrawal.stateRoot, block.chainid)); require(SignatureValidator.isValid(hashToSign, withdrawal.channel.leader, withdrawal.sigLeader), 'LEADER_SIG'); require(SignatureValidator.isValid(hashToSign, withdrawal.channel.follower, withdrawal.sigFollower), 'FOLLOWER_SIG'); // adds like 8k gas for 10 withdrawals (2% increase) @@ -128,7 +128,7 @@ contract OUTPACE { uint challengeExpires = challenges[channelId]; require(challengeExpires != 0 && challengeExpires != CLOSED, 'CHANNEL_NOT_CHALLENGED'); // NOTE: we can resume the channel by mutual consent even if it's closable, so we won't check whether challengeExpires is in the future - bytes32 hashToSign = keccak256(abi.encodePacked('resume', channelId, challengeExpires)); + bytes32 hashToSign = keccak256(abi.encodePacked('resume', channelId, challengeExpires, block.chainid)); require(SignatureValidator.isValid(hashToSign, channel.leader, sigLeader), 'INVALID_LEADER_SIG'); require(SignatureValidator.isValid(hashToSign, channel.follower, sigFollower), 'INVALID_FOLLOWER_SIG'); diff --git a/contracts/libs/BytesLib.sol b/contracts/libs/BytesLib.sol index ad4073af..6072822b 100644 --- a/contracts/libs/BytesLib.sol +++ b/contracts/libs/BytesLib.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: agpl-3.0 -pragma solidity 0.8.7; +pragma solidity 0.8.19; // @TODO: Formatting library LibBytes { diff --git a/contracts/libs/MerkleProof.sol b/contracts/libs/MerkleProof.sol index 174ed51f..0887750a 100644 --- a/contracts/libs/MerkleProof.sol +++ b/contracts/libs/MerkleProof.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: agpl-3.0 -pragma solidity 0.8.7; +pragma solidity 0.8.19; library MerkleProof { function isContained(bytes32 valueHash, bytes32[] memory proof, bytes32 root) internal pure returns (bool) { diff --git a/contracts/libs/SafeERC20.sol b/contracts/libs/SafeERC20.sol index 79907de6..bed0ce5b 100644 --- a/contracts/libs/SafeERC20.sol +++ b/contracts/libs/SafeERC20.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: agpl-3.0 -pragma solidity 0.8.7; +pragma solidity 0.8.19; // NOTE: this interface lacks return values for transfer/transferFrom/approve on purpose, // as we use the SafeERC20 library to check the return value diff --git a/contracts/libs/SignatureValidator.sol b/contracts/libs/SignatureValidator.sol index 44992267..5444d5aa 100644 --- a/contracts/libs/SignatureValidator.sol +++ b/contracts/libs/SignatureValidator.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: agpl-3.0 -pragma solidity 0.8.7; +pragma solidity 0.8.19; library SignatureValidator { enum SignatureMode { diff --git a/contracts/libs/SignatureValidatorV2.sol b/contracts/libs/SignatureValidatorV2.sol index 9c481394..80438c8d 100644 --- a/contracts/libs/SignatureValidatorV2.sol +++ b/contracts/libs/SignatureValidatorV2.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: agpl-3.0 -pragma solidity 0.8.7; +pragma solidity 0.8.19; import "./BytesLib.sol";