From 6cf3df219cd8e7372a38622b9d8b3b027caf7ec5 Mon Sep 17 00:00:00 2001 From: TilakMaddy Date: Wed, 18 Sep 2024 19:30:58 +0530 Subject: [PATCH 1/2] MCOPY opcode detector --- aderyn_core/src/detect/detector.rs | 3 + aderyn_core/src/detect/low/mcopy_opcode.rs | 94 ++++ aderyn_core/src/detect/low/mod.rs | 2 + reports/adhoc-sol-files-report.md | 62 ++- reports/ccip-functions-report.md | 326 +++++++++++- reports/hardhat-playground-report.md | 38 +- reports/nft-report.md | 38 +- reports/prb-math-report.md | 194 ++++++- reports/report.json | 182 ++++++- reports/report.md | 185 ++++++- reports/report.sarif | 306 +++++++++++ reports/sablier-aderyn-toml-nested-root.md | 134 ++++- reports/templegold-report.md | 494 +++++++++++++++++- .../src/LatestSolidityVersionContract.sol | 0 14 files changed, 2042 insertions(+), 16 deletions(-) create mode 100644 aderyn_core/src/detect/low/mcopy_opcode.rs create mode 100644 tests/contract-playground/src/LatestSolidityVersionContract.sol diff --git a/aderyn_core/src/detect/detector.rs b/aderyn_core/src/detect/detector.rs index 6e97a7879..08b9ff693 100644 --- a/aderyn_core/src/detect/detector.rs +++ b/aderyn_core/src/detect/detector.rs @@ -101,6 +101,7 @@ pub fn get_all_issue_detectors() -> Vec> { Box::::default(), Box::::default(), Box::::default(), + Box::::default(), ] } @@ -112,6 +113,7 @@ pub fn get_all_detectors_names() -> Vec { #[derive(Debug, PartialEq, EnumString, Display)] #[strum(serialize_all = "kebab-case")] pub(crate) enum IssueDetectorNamePool { + MCOPYOpcode, StateVariableChangesWithoutEvents, MissingInheritance, UnusedImport, @@ -216,6 +218,7 @@ pub fn request_issue_detector_by_name(detector_name: &str) -> Option { Some(Box::::default()) } + IssueDetectorNamePool::MCOPYOpcode => Some(Box::::default()), IssueDetectorNamePool::UnusedImport => Some(Box::::default()), IssueDetectorNamePool::VoidConstructor => Some(Box::::default()), IssueDetectorNamePool::StateVariableCouldBeDeclaredConstant => { diff --git a/aderyn_core/src/detect/low/mcopy_opcode.rs b/aderyn_core/src/detect/low/mcopy_opcode.rs new file mode 100644 index 000000000..d0bc5a533 --- /dev/null +++ b/aderyn_core/src/detect/low/mcopy_opcode.rs @@ -0,0 +1,94 @@ +use std::{collections::BTreeMap, error::Error, str::FromStr}; + +use crate::{ + ast::NodeID, + capture, + context::workspace_context::WorkspaceContext, + detect::{ + detector::{IssueDetector, IssueDetectorNamePool, IssueSeverity}, + helpers::pragma_directive_to_semver, + }, +}; +use eyre::Result; +use semver::{Version, VersionReq}; + +#[derive(Default)] +pub struct MCOPYOpcodeDetector { + // Keys are: [0] source file name, [1] line number, [2] character location of node. + // Do not add items manually, use `capture!` to add nodes to this BTreeMap. + found_instances: BTreeMap<(String, usize, String), NodeID>, +} + +impl IssueDetector for MCOPYOpcodeDetector { + fn detect(&mut self, context: &WorkspaceContext) -> Result> { + for pragma_directive in context.pragma_directives() { + let req = pragma_directive_to_semver(pragma_directive)?; + if version_req_allows_0_8_23_and_above(&req) { + capture!(self, context, pragma_directive); + } + } + Ok(!self.found_instances.is_empty()) + } + + fn severity(&self) -> IssueSeverity { + IssueSeverity::Low + } + + fn title(&self) -> String { + String::from("PUSH0 is not supported by all chains") + } + + fn description(&self) -> String { + String::from("MCOPY opcode is introduced in Solidity 0.8.23 so it's very likely that not all chains support it yet. Consider using using older version of solidity.") + } + + fn instances(&self) -> BTreeMap<(String, usize, String), NodeID> { + self.found_instances.clone() + } + + fn name(&self) -> String { + format!("{}", IssueDetectorNamePool::MCOPYOpcode) + } +} + +fn version_req_allows_0_8_23_and_above(version_req: &VersionReq) -> bool { + // If it matches any above 0.8.23 return true + // TODO: Every time a solidity version is released, please increment the below counter by 1 + let current_highest_version = 27; + for i in 23..=current_highest_version { + let version = Version::from_str(&format!("0.8.{}", i)).unwrap(); + if version_req.matches(&version) { + return true; + } + } + + // Else, return false + false +} + +#[cfg(test)] +mod mcopy_opcode_tests { + use serial_test::serial; + + use crate::detect::detector::IssueDetector; + + #[test] + #[serial] + fn test_mcopy_opcode() { + let context = crate::detect::test_utils::load_solidity_source_unit( + "../tests/contract-playground/src/LatestSolidityVersionContract.sol", + ); + + let mut detector = super::MCOPYOpcodeDetector::default(); + let found = detector.detect(&context).unwrap(); + // assert that it found something + assert!(found); + // assert that the number of instances is correct + assert_eq!(detector.instances().len(), 1); + // assert that the severity is low + assert_eq!( + detector.severity(), + crate::detect::detector::IssueSeverity::Low + ); + } +} diff --git a/aderyn_core/src/detect/low/mod.rs b/aderyn_core/src/detect/low/mod.rs index bc1be4ff0..ce517030b 100644 --- a/aderyn_core/src/detect/low/mod.rs +++ b/aderyn_core/src/detect/low/mod.rs @@ -17,6 +17,7 @@ pub(crate) mod function_pointer_in_constructor; pub(crate) mod inconsistent_type_names; pub(crate) mod large_literal_value; pub(crate) mod local_variable_shadowing; +pub(crate) mod mcopy_opcode; pub(crate) mod missing_inheritance; pub(crate) mod non_reentrant_before_others; pub(crate) mod public_variable_read_in_external_context; @@ -61,6 +62,7 @@ pub use function_pointer_in_constructor::FucntionPointerInConstructorDetector; pub use inconsistent_type_names::InconsistentTypeNamesDetector; pub use large_literal_value::LargeLiteralValueDetector; pub use local_variable_shadowing::LocalVariableShadowingDetector; +pub use mcopy_opcode::MCOPYOpcodeDetector; pub use missing_inheritance::MissingInheritanceDetector; pub use non_reentrant_before_others::NonReentrantBeforeOthersDetector; pub use public_variable_read_in_external_context::PublicVariableReadInExternalContextDetector; diff --git a/reports/adhoc-sol-files-report.md b/reports/adhoc-sol-files-report.md index 718a34129..040bd9980 100644 --- a/reports/adhoc-sol-files-report.md +++ b/reports/adhoc-sol-files-report.md @@ -34,6 +34,7 @@ This report was generated by [Aderyn](https://github.com/Cyfrin/aderyn), a stati - [L-19: Unused Imports](#l-19-unused-imports) - [L-20: State variable could be declared constant](#l-20-state-variable-could-be-declared-constant) - [L-21: State variable changes but no event is emitted.](#l-21-state-variable-changes-but-no-event-is-emitted) + - [L-22: PUSH0 is not supported by all chains](#l-22-push0-is-not-supported-by-all-chains) # Summary @@ -78,7 +79,7 @@ This report was generated by [Aderyn](https://github.com/Cyfrin/aderyn), a stati | Category | No. of Issues | | --- | --- | | High | 4 | -| Low | 21 | +| Low | 22 | # High Issues @@ -936,3 +937,62 @@ State variable changes in this function but no event is emitted. +## L-22: PUSH0 is not supported by all chains + +MCOPY opcode is introduced in Solidity 0.8.23 so it's very likely that not all chains support it yet. Consider using using older version of solidity. + +
8 Found Instances + + +- Found in Counter.sol [Line: 2](../tests/adhoc-sol-files/Counter.sol#L2) + + ```solidity + pragma solidity ^0.8.13; + ``` + +- Found in DemoASTNodes.sol [Line: 2](../tests/adhoc-sol-files/DemoASTNodes.sol#L2) + + ```solidity + pragma solidity >=0.8.0; + ``` + +- Found in Helper.sol [Line: 2](../tests/adhoc-sol-files/Helper.sol#L2) + + ```solidity + pragma solidity >=0.8.0; + ``` + +- Found in InconsistentUints.sol [Line: 1](../tests/adhoc-sol-files/InconsistentUints.sol#L1) + + ```solidity + pragma solidity ^0.8.24; + ``` + +- Found in inheritance/IContractInheritance.sol [Line: 2](../tests/adhoc-sol-files/inheritance/IContractInheritance.sol#L2) + + ```solidity + pragma solidity >=0.8.0; + ``` + +- Found in inheritance/InheritanceBase.sol [Line: 2](../tests/adhoc-sol-files/inheritance/InheritanceBase.sol#L2) + + ```solidity + pragma solidity ^0.8.0; + ``` + +- Found in multiple-versions/0.8/A.sol [Line: 2](../tests/adhoc-sol-files/multiple-versions/0.8/A.sol#L2) + + ```solidity + pragma solidity ^0.8.0; + ``` + +- Found in multiple-versions/0.8/B.sol [Line: 2](../tests/adhoc-sol-files/multiple-versions/0.8/B.sol#L2) + + ```solidity + pragma solidity ^0.8.0; + ``` + +
+ + + diff --git a/reports/ccip-functions-report.md b/reports/ccip-functions-report.md index ebb9b7ca3..5fc389c66 100644 --- a/reports/ccip-functions-report.md +++ b/reports/ccip-functions-report.md @@ -30,6 +30,7 @@ This report was generated by [Aderyn](https://github.com/Cyfrin/aderyn), a stati - [L-16: Costly operations inside loops.](#l-16-costly-operations-inside-loops) - [L-17: Unused Imports](#l-17-unused-imports) - [L-18: State variable changes but no event is emitted.](#l-18-state-variable-changes-but-no-event-is-emitted) + - [L-19: PUSH0 is not supported by all chains](#l-19-push0-is-not-supported-by-all-chains) # Summary @@ -106,7 +107,7 @@ This report was generated by [Aderyn](https://github.com/Cyfrin/aderyn), a stati | Category | No. of Issues | | --- | --- | | High | 3 | -| Low | 18 | +| Low | 19 | # High Issues @@ -2882,3 +2883,326 @@ State variable changes in this function but no event is emitted. +## L-19: PUSH0 is not supported by all chains + +MCOPY opcode is introduced in Solidity 0.8.23 so it's very likely that not all chains support it yet. Consider using using older version of solidity. + +
52 Found Instances + + +- Found in src/v0.8/functions/dev/v1_X/FunctionsBilling.sol [Line: 2](../tests/ccip-contracts/contracts/src/v0.8/functions/dev/v1_X/FunctionsBilling.sol#L2) + + ```solidity + pragma solidity ^0.8.19; + ``` + +- Found in src/v0.8/functions/dev/v1_X/FunctionsClient.sol [Line: 2](../tests/ccip-contracts/contracts/src/v0.8/functions/dev/v1_X/FunctionsClient.sol#L2) + + ```solidity + pragma solidity ^0.8.19; + ``` + +- Found in src/v0.8/functions/dev/v1_X/FunctionsCoordinator.sol [Line: 2](../tests/ccip-contracts/contracts/src/v0.8/functions/dev/v1_X/FunctionsCoordinator.sol#L2) + + ```solidity + pragma solidity ^0.8.19; + ``` + +- Found in src/v0.8/functions/dev/v1_X/FunctionsRouter.sol [Line: 2](../tests/ccip-contracts/contracts/src/v0.8/functions/dev/v1_X/FunctionsRouter.sol#L2) + + ```solidity + pragma solidity ^0.8.19; + ``` + +- Found in src/v0.8/functions/dev/v1_X/FunctionsSubscriptions.sol [Line: 2](../tests/ccip-contracts/contracts/src/v0.8/functions/dev/v1_X/FunctionsSubscriptions.sol#L2) + + ```solidity + pragma solidity ^0.8.19; + ``` + +- Found in src/v0.8/functions/dev/v1_X/Routable.sol [Line: 2](../tests/ccip-contracts/contracts/src/v0.8/functions/dev/v1_X/Routable.sol#L2) + + ```solidity + pragma solidity ^0.8.19; + ``` + +- Found in src/v0.8/functions/dev/v1_X/accessControl/TermsOfServiceAllowList.sol [Line: 2](../tests/ccip-contracts/contracts/src/v0.8/functions/dev/v1_X/accessControl/TermsOfServiceAllowList.sol#L2) + + ```solidity + pragma solidity ^0.8.19; + ``` + +- Found in src/v0.8/functions/dev/v1_X/accessControl/interfaces/ITermsOfServiceAllowList.sol [Line: 2](../tests/ccip-contracts/contracts/src/v0.8/functions/dev/v1_X/accessControl/interfaces/ITermsOfServiceAllowList.sol#L2) + + ```solidity + pragma solidity ^0.8.19; + ``` + +- Found in src/v0.8/functions/dev/v1_X/example/FunctionsClientExample.sol [Line: 2](../tests/ccip-contracts/contracts/src/v0.8/functions/dev/v1_X/example/FunctionsClientExample.sol#L2) + + ```solidity + pragma solidity ^0.8.19; + ``` + +- Found in src/v0.8/functions/dev/v1_X/interfaces/IFunctionsBilling.sol [Line: 2](../tests/ccip-contracts/contracts/src/v0.8/functions/dev/v1_X/interfaces/IFunctionsBilling.sol#L2) + + ```solidity + pragma solidity ^0.8.19; + ``` + +- Found in src/v0.8/functions/dev/v1_X/interfaces/IFunctionsClient.sol [Line: 2](../tests/ccip-contracts/contracts/src/v0.8/functions/dev/v1_X/interfaces/IFunctionsClient.sol#L2) + + ```solidity + pragma solidity ^0.8.19; + ``` + +- Found in src/v0.8/functions/dev/v1_X/interfaces/IFunctionsCoordinator.sol [Line: 2](../tests/ccip-contracts/contracts/src/v0.8/functions/dev/v1_X/interfaces/IFunctionsCoordinator.sol#L2) + + ```solidity + pragma solidity ^0.8.19; + ``` + +- Found in src/v0.8/functions/dev/v1_X/interfaces/IFunctionsRouter.sol [Line: 2](../tests/ccip-contracts/contracts/src/v0.8/functions/dev/v1_X/interfaces/IFunctionsRouter.sol#L2) + + ```solidity + pragma solidity ^0.8.19; + ``` + +- Found in src/v0.8/functions/dev/v1_X/interfaces/IFunctionsSubscriptions.sol [Line: 2](../tests/ccip-contracts/contracts/src/v0.8/functions/dev/v1_X/interfaces/IFunctionsSubscriptions.sol#L2) + + ```solidity + pragma solidity ^0.8.19; + ``` + +- Found in src/v0.8/functions/dev/v1_X/interfaces/IOwnableFunctionsRouter.sol [Line: 2](../tests/ccip-contracts/contracts/src/v0.8/functions/dev/v1_X/interfaces/IOwnableFunctionsRouter.sol#L2) + + ```solidity + pragma solidity ^0.8.19; + ``` + +- Found in src/v0.8/functions/dev/v1_X/libraries/ChainSpecificUtil.sol [Line: 2](../tests/ccip-contracts/contracts/src/v0.8/functions/dev/v1_X/libraries/ChainSpecificUtil.sol#L2) + + ```solidity + pragma solidity ^0.8.19; + ``` + +- Found in src/v0.8/functions/dev/v1_X/libraries/FunctionsRequest.sol [Line: 2](../tests/ccip-contracts/contracts/src/v0.8/functions/dev/v1_X/libraries/FunctionsRequest.sol#L2) + + ```solidity + pragma solidity ^0.8.19; + ``` + +- Found in src/v0.8/functions/dev/v1_X/libraries/FunctionsResponse.sol [Line: 2](../tests/ccip-contracts/contracts/src/v0.8/functions/dev/v1_X/libraries/FunctionsResponse.sol#L2) + + ```solidity + pragma solidity ^0.8.19; + ``` + +- Found in src/v0.8/functions/dev/v1_X/ocr/OCR2Abstract.sol [Line: 2](../tests/ccip-contracts/contracts/src/v0.8/functions/dev/v1_X/ocr/OCR2Abstract.sol#L2) + + ```solidity + pragma solidity ^0.8.19; + ``` + +- Found in src/v0.8/functions/dev/v1_X/ocr/OCR2Base.sol [Line: 2](../tests/ccip-contracts/contracts/src/v0.8/functions/dev/v1_X/ocr/OCR2Base.sol#L2) + + ```solidity + pragma solidity ^0.8.0; + ``` + +- Found in src/v0.8/functions/v1_0_0/FunctionsBilling.sol [Line: 2](../tests/ccip-contracts/contracts/src/v0.8/functions/v1_0_0/FunctionsBilling.sol#L2) + + ```solidity + pragma solidity ^0.8.19; + ``` + +- Found in src/v0.8/functions/v1_0_0/FunctionsClient.sol [Line: 2](../tests/ccip-contracts/contracts/src/v0.8/functions/v1_0_0/FunctionsClient.sol#L2) + + ```solidity + pragma solidity ^0.8.19; + ``` + +- Found in src/v0.8/functions/v1_0_0/FunctionsCoordinator.sol [Line: 2](../tests/ccip-contracts/contracts/src/v0.8/functions/v1_0_0/FunctionsCoordinator.sol#L2) + + ```solidity + pragma solidity ^0.8.19; + ``` + +- Found in src/v0.8/functions/v1_0_0/FunctionsRouter.sol [Line: 2](../tests/ccip-contracts/contracts/src/v0.8/functions/v1_0_0/FunctionsRouter.sol#L2) + + ```solidity + pragma solidity ^0.8.19; + ``` + +- Found in src/v0.8/functions/v1_0_0/FunctionsSubscriptions.sol [Line: 2](../tests/ccip-contracts/contracts/src/v0.8/functions/v1_0_0/FunctionsSubscriptions.sol#L2) + + ```solidity + pragma solidity ^0.8.19; + ``` + +- Found in src/v0.8/functions/v1_0_0/Routable.sol [Line: 2](../tests/ccip-contracts/contracts/src/v0.8/functions/v1_0_0/Routable.sol#L2) + + ```solidity + pragma solidity ^0.8.19; + ``` + +- Found in src/v0.8/functions/v1_0_0/accessControl/TermsOfServiceAllowList.sol [Line: 2](../tests/ccip-contracts/contracts/src/v0.8/functions/v1_0_0/accessControl/TermsOfServiceAllowList.sol#L2) + + ```solidity + pragma solidity ^0.8.19; + ``` + +- Found in src/v0.8/functions/v1_0_0/accessControl/interfaces/ITermsOfServiceAllowList.sol [Line: 2](../tests/ccip-contracts/contracts/src/v0.8/functions/v1_0_0/accessControl/interfaces/ITermsOfServiceAllowList.sol#L2) + + ```solidity + pragma solidity ^0.8.19; + ``` + +- Found in src/v0.8/functions/v1_0_0/example/FunctionsClientExample.sol [Line: 2](../tests/ccip-contracts/contracts/src/v0.8/functions/v1_0_0/example/FunctionsClientExample.sol#L2) + + ```solidity + pragma solidity ^0.8.19; + ``` + +- Found in src/v0.8/functions/v1_0_0/interfaces/IFunctionsBilling.sol [Line: 2](../tests/ccip-contracts/contracts/src/v0.8/functions/v1_0_0/interfaces/IFunctionsBilling.sol#L2) + + ```solidity + pragma solidity ^0.8.19; + ``` + +- Found in src/v0.8/functions/v1_0_0/interfaces/IFunctionsClient.sol [Line: 2](../tests/ccip-contracts/contracts/src/v0.8/functions/v1_0_0/interfaces/IFunctionsClient.sol#L2) + + ```solidity + pragma solidity ^0.8.19; + ``` + +- Found in src/v0.8/functions/v1_0_0/interfaces/IFunctionsCoordinator.sol [Line: 2](../tests/ccip-contracts/contracts/src/v0.8/functions/v1_0_0/interfaces/IFunctionsCoordinator.sol#L2) + + ```solidity + pragma solidity ^0.8.19; + ``` + +- Found in src/v0.8/functions/v1_0_0/interfaces/IFunctionsRouter.sol [Line: 2](../tests/ccip-contracts/contracts/src/v0.8/functions/v1_0_0/interfaces/IFunctionsRouter.sol#L2) + + ```solidity + pragma solidity ^0.8.19; + ``` + +- Found in src/v0.8/functions/v1_0_0/interfaces/IFunctionsSubscriptions.sol [Line: 2](../tests/ccip-contracts/contracts/src/v0.8/functions/v1_0_0/interfaces/IFunctionsSubscriptions.sol#L2) + + ```solidity + pragma solidity ^0.8.19; + ``` + +- Found in src/v0.8/functions/v1_0_0/interfaces/IOwnableFunctionsRouter.sol [Line: 2](../tests/ccip-contracts/contracts/src/v0.8/functions/v1_0_0/interfaces/IOwnableFunctionsRouter.sol#L2) + + ```solidity + pragma solidity ^0.8.19; + ``` + +- Found in src/v0.8/functions/v1_0_0/libraries/FunctionsRequest.sol [Line: 2](../tests/ccip-contracts/contracts/src/v0.8/functions/v1_0_0/libraries/FunctionsRequest.sol#L2) + + ```solidity + pragma solidity ^0.8.19; + ``` + +- Found in src/v0.8/functions/v1_0_0/libraries/FunctionsResponse.sol [Line: 2](../tests/ccip-contracts/contracts/src/v0.8/functions/v1_0_0/libraries/FunctionsResponse.sol#L2) + + ```solidity + pragma solidity ^0.8.19; + ``` + +- Found in src/v0.8/functions/v1_0_0/ocr/OCR2Abstract.sol [Line: 2](../tests/ccip-contracts/contracts/src/v0.8/functions/v1_0_0/ocr/OCR2Abstract.sol#L2) + + ```solidity + pragma solidity ^0.8.19; + ``` + +- Found in src/v0.8/functions/v1_0_0/ocr/OCR2Base.sol [Line: 2](../tests/ccip-contracts/contracts/src/v0.8/functions/v1_0_0/ocr/OCR2Base.sol#L2) + + ```solidity + pragma solidity ^0.8.0; + ``` + +- Found in src/v0.8/functions/v1_1_0/FunctionsBilling.sol [Line: 2](../tests/ccip-contracts/contracts/src/v0.8/functions/v1_1_0/FunctionsBilling.sol#L2) + + ```solidity + pragma solidity ^0.8.19; + ``` + +- Found in src/v0.8/functions/v1_1_0/FunctionsCoordinator.sol [Line: 2](../tests/ccip-contracts/contracts/src/v0.8/functions/v1_1_0/FunctionsCoordinator.sol#L2) + + ```solidity + pragma solidity ^0.8.19; + ``` + +- Found in src/v0.8/functions/v1_1_0/libraries/ChainSpecificUtil.sol [Line: 2](../tests/ccip-contracts/contracts/src/v0.8/functions/v1_1_0/libraries/ChainSpecificUtil.sol#L2) + + ```solidity + pragma solidity ^0.8.19; + ``` + +- Found in src/v0.8/functions/v1_1_0/ocr/OCR2Abstract.sol [Line: 2](../tests/ccip-contracts/contracts/src/v0.8/functions/v1_1_0/ocr/OCR2Abstract.sol#L2) + + ```solidity + pragma solidity ^0.8.19; + ``` + +- Found in src/v0.8/functions/v1_1_0/ocr/OCR2Base.sol [Line: 2](../tests/ccip-contracts/contracts/src/v0.8/functions/v1_1_0/ocr/OCR2Base.sol#L2) + + ```solidity + pragma solidity ^0.8.0; + ``` + +- Found in src/v0.8/functions/v1_3_0/FunctionsBilling.sol [Line: 2](../tests/ccip-contracts/contracts/src/v0.8/functions/v1_3_0/FunctionsBilling.sol#L2) + + ```solidity + pragma solidity ^0.8.19; + ``` + +- Found in src/v0.8/functions/v1_3_0/FunctionsClient.sol [Line: 2](../tests/ccip-contracts/contracts/src/v0.8/functions/v1_3_0/FunctionsClient.sol#L2) + + ```solidity + pragma solidity ^0.8.19; + ``` + +- Found in src/v0.8/functions/v1_3_0/FunctionsCoordinator.sol [Line: 2](../tests/ccip-contracts/contracts/src/v0.8/functions/v1_3_0/FunctionsCoordinator.sol#L2) + + ```solidity + pragma solidity ^0.8.19; + ``` + +- Found in src/v0.8/functions/v1_3_0/accessControl/TermsOfServiceAllowList.sol [Line: 2](../tests/ccip-contracts/contracts/src/v0.8/functions/v1_3_0/accessControl/TermsOfServiceAllowList.sol#L2) + + ```solidity + pragma solidity ^0.8.19; + ``` + +- Found in src/v0.8/functions/v1_3_0/accessControl/interfaces/ITermsOfServiceAllowList.sol [Line: 2](../tests/ccip-contracts/contracts/src/v0.8/functions/v1_3_0/accessControl/interfaces/ITermsOfServiceAllowList.sol#L2) + + ```solidity + pragma solidity ^0.8.19; + ``` + +- Found in src/v0.8/functions/v1_3_0/interfaces/IFunctionsBilling.sol [Line: 2](../tests/ccip-contracts/contracts/src/v0.8/functions/v1_3_0/interfaces/IFunctionsBilling.sol#L2) + + ```solidity + pragma solidity ^0.8.19; + ``` + +- Found in src/v0.8/functions/v1_3_0/ocr/OCR2Abstract.sol [Line: 2](../tests/ccip-contracts/contracts/src/v0.8/functions/v1_3_0/ocr/OCR2Abstract.sol#L2) + + ```solidity + pragma solidity ^0.8.19; + ``` + +- Found in src/v0.8/functions/v1_3_0/ocr/OCR2Base.sol [Line: 2](../tests/ccip-contracts/contracts/src/v0.8/functions/v1_3_0/ocr/OCR2Base.sol#L2) + + ```solidity + pragma solidity ^0.8.0; + ``` + +
+ + + diff --git a/reports/hardhat-playground-report.md b/reports/hardhat-playground-report.md index 856df9649..16cfd105f 100644 --- a/reports/hardhat-playground-report.md +++ b/reports/hardhat-playground-report.md @@ -26,6 +26,7 @@ This report was generated by [Aderyn](https://github.com/Cyfrin/aderyn), a stati - [L-10: Unused Imports](#l-10-unused-imports) - [L-11: State variable could be declared constant](#l-11-state-variable-could-be-declared-constant) - [L-12: State variable changes but no event is emitted.](#l-12-state-variable-changes-but-no-event-is-emitted) + - [L-13: PUSH0 is not supported by all chains](#l-13-push0-is-not-supported-by-all-chains) # Summary @@ -57,7 +58,7 @@ This report was generated by [Aderyn](https://github.com/Cyfrin/aderyn), a stati | Category | No. of Issues | | --- | --- | | High | 5 | -| Low | 12 | +| Low | 13 | # High Issues @@ -576,3 +577,38 @@ State variable changes in this function but no event is emitted. +## L-13: PUSH0 is not supported by all chains + +MCOPY opcode is introduced in Solidity 0.8.23 so it's very likely that not all chains support it yet. Consider using using older version of solidity. + +
4 Found Instances + + +- Found in contracts/Counter.sol [Line: 2](../tests/hardhat-js-playground/contracts/Counter.sol#L2) + + ```solidity + pragma solidity ^0.8.13; + ``` + +- Found in contracts/IContractInheritance.sol [Line: 2](../tests/hardhat-js-playground/contracts/IContractInheritance.sol#L2) + + ```solidity + pragma solidity >=0.8.0; + ``` + +- Found in contracts/InheritanceBase.sol [Line: 2](../tests/hardhat-js-playground/contracts/InheritanceBase.sol#L2) + + ```solidity + pragma solidity ^0.8.0; + ``` + +- Found in contracts/Lock.sol [Line: 2](../tests/hardhat-js-playground/contracts/Lock.sol#L2) + + ```solidity + pragma solidity ^0.8.20; + ``` + +
+ + + diff --git a/reports/nft-report.md b/reports/nft-report.md index f68cf0f17..7b7706adf 100644 --- a/reports/nft-report.md +++ b/reports/nft-report.md @@ -14,6 +14,7 @@ This report was generated by [Aderyn](https://github.com/Cyfrin/aderyn), a stati - [L-4: Unused Imports](#l-4-unused-imports) - [L-5: State variable could be declared constant](#l-5-state-variable-could-be-declared-constant) - [L-6: State variable changes but no event is emitted.](#l-6-state-variable-changes-but-no-event-is-emitted) + - [L-7: PUSH0 is not supported by all chains](#l-7-push0-is-not-supported-by-all-chains) # Summary @@ -43,7 +44,7 @@ This report was generated by [Aderyn](https://github.com/Cyfrin/aderyn), a stati | Category | No. of Issues | | --- | --- | | High | 0 | -| Low | 6 | +| Low | 7 | # Low Issues @@ -162,3 +163,38 @@ State variable changes in this function but no event is emitted. +## L-7: PUSH0 is not supported by all chains + +MCOPY opcode is introduced in Solidity 0.8.23 so it's very likely that not all chains support it yet. Consider using using older version of solidity. + +
4 Found Instances + + +- Found in src/BasicNft.sol [Line: 3](../tests/foundry-nft-f23/src/BasicNft.sol#L3) + + ```solidity + pragma solidity 0.8.25; + ``` + +- Found in src/F1.sol [Line: 3](../tests/foundry-nft-f23/src/F1.sol#L3) + + ```solidity + pragma solidity ^0.8.10; + ``` + +- Found in src/Initializer.sol [Line: 3](../tests/foundry-nft-f23/src/Initializer.sol#L3) + + ```solidity + pragma solidity 0.8.25; + ``` + +- Found in src/inner-core-modules/ICM.sol [Line: 3](../tests/foundry-nft-f23/src/inner-core-modules/ICM.sol#L3) + + ```solidity + pragma solidity 0.8.25; + ``` + +
+ + + diff --git a/reports/prb-math-report.md b/reports/prb-math-report.md index bd793bcd1..b50793ad2 100644 --- a/reports/prb-math-report.md +++ b/reports/prb-math-report.md @@ -16,6 +16,7 @@ This report was generated by [Aderyn](https://github.com/Cyfrin/aderyn), a stati - [L-3: Large literal values multiples of 10000 can be replaced with scientific notation](#l-3-large-literal-values-multiples-of-10000-can-be-replaced-with-scientific-notation) - [L-4: Internal functions called only once can be inlined](#l-4-internal-functions-called-only-once-can-be-inlined) - [L-5: Unused Imports](#l-5-unused-imports) + - [L-6: PUSH0 is not supported by all chains](#l-6-push0-is-not-supported-by-all-chains) # Summary @@ -70,7 +71,7 @@ This report was generated by [Aderyn](https://github.com/Cyfrin/aderyn), a stati | Category | No. of Issues | | --- | --- | | High | 2 | -| Low | 5 | +| Low | 6 | # High Issues @@ -724,3 +725,194 @@ Redundant import statement. Consider removing it. +## L-6: PUSH0 is not supported by all chains + +MCOPY opcode is introduced in Solidity 0.8.23 so it's very likely that not all chains support it yet. Consider using using older version of solidity. + +
30 Found Instances + + +- Found in src/Common.sol [Line: 2](../tests/prb-math/src/Common.sol#L2) + + ```solidity + pragma solidity >=0.8.19; + ``` + +- Found in src/SD1x18.sol [Line: 2](../tests/prb-math/src/SD1x18.sol#L2) + + ```solidity + pragma solidity >=0.8.19; + ``` + +- Found in src/SD59x18.sol [Line: 2](../tests/prb-math/src/SD59x18.sol#L2) + + ```solidity + pragma solidity >=0.8.19; + ``` + +- Found in src/UD2x18.sol [Line: 2](../tests/prb-math/src/UD2x18.sol#L2) + + ```solidity + pragma solidity >=0.8.19; + ``` + +- Found in src/UD60x18.sol [Line: 2](../tests/prb-math/src/UD60x18.sol#L2) + + ```solidity + pragma solidity >=0.8.19; + ``` + +- Found in src/casting/Uint128.sol [Line: 2](../tests/prb-math/src/casting/Uint128.sol#L2) + + ```solidity + pragma solidity >=0.8.19; + ``` + +- Found in src/casting/Uint256.sol [Line: 2](../tests/prb-math/src/casting/Uint256.sol#L2) + + ```solidity + pragma solidity >=0.8.19; + ``` + +- Found in src/casting/Uint40.sol [Line: 2](../tests/prb-math/src/casting/Uint40.sol#L2) + + ```solidity + pragma solidity >=0.8.19; + ``` + +- Found in src/sd1x18/Casting.sol [Line: 2](../tests/prb-math/src/sd1x18/Casting.sol#L2) + + ```solidity + pragma solidity >=0.8.19; + ``` + +- Found in src/sd1x18/Constants.sol [Line: 2](../tests/prb-math/src/sd1x18/Constants.sol#L2) + + ```solidity + pragma solidity >=0.8.19; + ``` + +- Found in src/sd1x18/Errors.sol [Line: 2](../tests/prb-math/src/sd1x18/Errors.sol#L2) + + ```solidity + pragma solidity >=0.8.19; + ``` + +- Found in src/sd1x18/ValueType.sol [Line: 2](../tests/prb-math/src/sd1x18/ValueType.sol#L2) + + ```solidity + pragma solidity >=0.8.19; + ``` + +- Found in src/sd59x18/Casting.sol [Line: 2](../tests/prb-math/src/sd59x18/Casting.sol#L2) + + ```solidity + pragma solidity >=0.8.19; + ``` + +- Found in src/sd59x18/Constants.sol [Line: 2](../tests/prb-math/src/sd59x18/Constants.sol#L2) + + ```solidity + pragma solidity >=0.8.19; + ``` + +- Found in src/sd59x18/Conversions.sol [Line: 2](../tests/prb-math/src/sd59x18/Conversions.sol#L2) + + ```solidity + pragma solidity >=0.8.19; + ``` + +- Found in src/sd59x18/Errors.sol [Line: 2](../tests/prb-math/src/sd59x18/Errors.sol#L2) + + ```solidity + pragma solidity >=0.8.19; + ``` + +- Found in src/sd59x18/Helpers.sol [Line: 2](../tests/prb-math/src/sd59x18/Helpers.sol#L2) + + ```solidity + pragma solidity >=0.8.19; + ``` + +- Found in src/sd59x18/Math.sol [Line: 2](../tests/prb-math/src/sd59x18/Math.sol#L2) + + ```solidity + pragma solidity >=0.8.19; + ``` + +- Found in src/sd59x18/ValueType.sol [Line: 2](../tests/prb-math/src/sd59x18/ValueType.sol#L2) + + ```solidity + pragma solidity >=0.8.19; + ``` + +- Found in src/ud2x18/Casting.sol [Line: 2](../tests/prb-math/src/ud2x18/Casting.sol#L2) + + ```solidity + pragma solidity >=0.8.19; + ``` + +- Found in src/ud2x18/Constants.sol [Line: 2](../tests/prb-math/src/ud2x18/Constants.sol#L2) + + ```solidity + pragma solidity >=0.8.19; + ``` + +- Found in src/ud2x18/Errors.sol [Line: 2](../tests/prb-math/src/ud2x18/Errors.sol#L2) + + ```solidity + pragma solidity >=0.8.19; + ``` + +- Found in src/ud2x18/ValueType.sol [Line: 2](../tests/prb-math/src/ud2x18/ValueType.sol#L2) + + ```solidity + pragma solidity >=0.8.19; + ``` + +- Found in src/ud60x18/Casting.sol [Line: 2](../tests/prb-math/src/ud60x18/Casting.sol#L2) + + ```solidity + pragma solidity >=0.8.19; + ``` + +- Found in src/ud60x18/Constants.sol [Line: 2](../tests/prb-math/src/ud60x18/Constants.sol#L2) + + ```solidity + pragma solidity >=0.8.19; + ``` + +- Found in src/ud60x18/Conversions.sol [Line: 2](../tests/prb-math/src/ud60x18/Conversions.sol#L2) + + ```solidity + pragma solidity >=0.8.19; + ``` + +- Found in src/ud60x18/Errors.sol [Line: 2](../tests/prb-math/src/ud60x18/Errors.sol#L2) + + ```solidity + pragma solidity >=0.8.19; + ``` + +- Found in src/ud60x18/Helpers.sol [Line: 2](../tests/prb-math/src/ud60x18/Helpers.sol#L2) + + ```solidity + pragma solidity >=0.8.19; + ``` + +- Found in src/ud60x18/Math.sol [Line: 2](../tests/prb-math/src/ud60x18/Math.sol#L2) + + ```solidity + pragma solidity >=0.8.19; + ``` + +- Found in src/ud60x18/ValueType.sol [Line: 2](../tests/prb-math/src/ud60x18/ValueType.sol#L2) + + ```solidity + pragma solidity >=0.8.19; + ``` + +
+ + + diff --git a/reports/report.json b/reports/report.json index 2e2a2b8a9..992109c52 100644 --- a/reports/report.json +++ b/reports/report.json @@ -1,7 +1,7 @@ { "files_summary": { - "total_source_units": 109, - "total_sloc": 3870 + "total_source_units": 110, + "total_sloc": 3880 }, "files_details": { "files_details": [ @@ -181,6 +181,10 @@ "file_path": "src/KeccakContract.sol", "n_sloc": 21 }, + { + "file_path": "src/LatestSolidityVersionContract.sol", + "n_sloc": 10 + }, { "file_path": "src/LocalVariableShadow.sol", "n_sloc": 23 @@ -445,7 +449,7 @@ }, "issue_count": { "high": 42, - "low": 43 + "low": 44 }, "high_issues": { "issues": [ @@ -6739,6 +6743,12 @@ "src": "213:8", "src_char": "213:8" }, + { + "contract_path": "src/LatestSolidityVersionContract.sol", + "line_no": 11, + "src": "208:10", + "src_char": "208:10" + }, { "contract_path": "src/MissingInheritance.sol", "line_no": 10, @@ -7112,6 +7122,169 @@ "src_char": "422:9" } ] + }, + { + "title": "PUSH0 is not supported by all chains", + "description": "MCOPY opcode is introduced in Solidity 0.8.23 so it's very likely that not all chains support it yet. Consider using using older version of solidity.", + "detector_name": "mcopy-opcode", + "instances": [ + { + "contract_path": "src/ContractLocksEther.sol", + "line_no": 2, + "src": "32:23", + "src_char": "32:23" + }, + { + "contract_path": "src/ContractWithTodo.sol", + "line_no": 2, + "src": "32:23", + "src_char": "32:23" + }, + { + "contract_path": "src/Counter.sol", + "line_no": 2, + "src": "39:24", + "src_char": "39:24" + }, + { + "contract_path": "src/CrazyPragma.sol", + "line_no": 2, + "src": "32:32", + "src_char": "32:32" + }, + { + "contract_path": "src/DelegateCallWithoutAddressCheck.sol", + "line_no": 2, + "src": "32:21", + "src_char": "32:21" + }, + { + "contract_path": "src/DeletionNestedMappingStructureContract.sol", + "line_no": 2, + "src": "32:23", + "src_char": "32:23" + }, + { + "contract_path": "src/FunctionSignatureCollision.sol", + "line_no": 2, + "src": "32:23", + "src_char": "32:23" + }, + { + "contract_path": "src/InconsistentUints.sol", + "line_no": 1, + "src": "0:24", + "src_char": "0:24" + }, + { + "contract_path": "src/IncorrectERC20.sol", + "line_no": 2, + "src": "32:23", + "src_char": "32:23" + }, + { + "contract_path": "src/IncorrectERC721.sol", + "line_no": 2, + "src": "32:23", + "src_char": "32:23" + }, + { + "contract_path": "src/LatestSolidityVersionContract.sol", + "line_no": 2, + "src": "32:23", + "src_char": "32:23" + }, + { + "contract_path": "src/LocalVariableShadow.sol", + "line_no": 2, + "src": "32:23", + "src_char": "32:23" + }, + { + "contract_path": "src/MsgValueInLoop.sol", + "line_no": 2, + "src": "32:23", + "src_char": "32:23" + }, + { + "contract_path": "src/OutOfOrderRetryable.sol", + "line_no": 2, + "src": "32:23", + "src_char": "32:23" + }, + { + "contract_path": "src/RevertsAndRequriesInLoops.sol", + "line_no": 2, + "src": "32:23", + "src_char": "32:23" + }, + { + "contract_path": "src/StateVariablesManipulation.sol", + "line_no": 2, + "src": "32:23", + "src_char": "32:23" + }, + { + "contract_path": "src/TxOriginUsedForAuth.sol", + "line_no": 2, + "src": "32:24", + "src_char": "32:24" + }, + { + "contract_path": "src/UninitializedStateVariable.sol", + "line_no": 3, + "src": "40:23", + "src_char": "40:23" + }, + { + "contract_path": "src/UnusedStateVariables.sol", + "line_no": 2, + "src": "32:24", + "src_char": "32:24" + }, + { + "contract_path": "src/VoidConstructor.sol", + "line_no": 2, + "src": "32:23", + "src_char": "32:23" + }, + { + "contract_path": "src/auditor_mode/PublicFunctionsWithoutSenderCheck.sol", + "line_no": 2, + "src": "32:23", + "src_char": "32:23" + }, + { + "contract_path": "src/cloc/AnotherHeavilyCommentedContract.sol", + "line_no": 6, + "src": "46:24", + "src_char": "46:24" + }, + { + "contract_path": "src/cloc/HeavilyCommentedContract.sol", + "line_no": 6, + "src": "46:32", + "src_char": "46:32" + }, + { + "contract_path": "src/inheritance/IContractInheritance.sol", + "line_no": 2, + "src": "32:24", + "src_char": "32:24" + }, + { + "contract_path": "src/inheritance/InheritanceBase.sol", + "line_no": 2, + "src": "32:23", + "src_char": "32:23" + }, + { + "contract_path": "src/nested_mappings/LaterVersion.sol", + "line_no": 2, + "src": "36:23", + "src_char": "36:23" + } + ] } ] }, @@ -7200,6 +7373,7 @@ "unchecked-low-level-call", "function-pointer-in-constructor", "state-variable-could-be-declared-constant", - "state-variable-changes-without-events" + "state-variable-changes-without-events", + "mcopy-opcode" ] } \ No newline at end of file diff --git a/reports/report.md b/reports/report.md index 8629160f4..44926e8bf 100644 --- a/reports/report.md +++ b/reports/report.md @@ -94,6 +94,7 @@ This report was generated by [Aderyn](https://github.com/Cyfrin/aderyn), a stati - [L-41: Function pointers used in constructors.](#l-41-function-pointers-used-in-constructors) - [L-42: State variable could be declared constant](#l-42-state-variable-could-be-declared-constant) - [L-43: State variable changes but no event is emitted.](#l-43-state-variable-changes-but-no-event-is-emitted) + - [L-44: PUSH0 is not supported by all chains](#l-44-push0-is-not-supported-by-all-chains) # Summary @@ -102,8 +103,8 @@ This report was generated by [Aderyn](https://github.com/Cyfrin/aderyn), a stati | Key | Value | | --- | --- | -| .sol Files | 109 | -| Total nSLOC | 3870 | +| .sol Files | 110 | +| Total nSLOC | 3880 | ## Files Details @@ -154,6 +155,7 @@ This report was generated by [Aderyn](https://github.com/Cyfrin/aderyn), a stati | src/IncorrectShift.sol | 17 | | src/InternalFunctions.sol | 22 | | src/KeccakContract.sol | 21 | +| src/LatestSolidityVersionContract.sol | 10 | | src/LocalVariableShadow.sol | 23 | | src/MissingInheritance.sol | 39 | | src/MisusedBoolean.sol | 67 | @@ -219,7 +221,7 @@ This report was generated by [Aderyn](https://github.com/Cyfrin/aderyn), a stati | src/reused_contract_name/ContractB.sol | 7 | | src/uniswap/UniswapV2Swapper.sol | 50 | | src/uniswap/UniswapV3Swapper.sol | 150 | -| **Total** | **3870** | +| **Total** | **3880** | ## Issue Summary @@ -227,7 +229,7 @@ This report was generated by [Aderyn](https://github.com/Cyfrin/aderyn), a stati | Category | No. of Issues | | --- | --- | | High | 42 | -| Low | 43 | +| Low | 44 | # High Issues @@ -6623,7 +6625,7 @@ State variables that are not updated following deployment should be declared con State variable changes in this function but no event is emitted. -
98 Found Instances +
99 Found Instances - Found in src/AbstractContract.sol [Line: 6](../tests/contract-playground/src/AbstractContract.sol#L6) @@ -6842,6 +6844,12 @@ State variable changes in this function but no event is emitted. function setValue(uint256 _newValue) external onlyOwner { ``` +- Found in src/LatestSolidityVersionContract.sol [Line: 11](../tests/contract-playground/src/LatestSolidityVersionContract.sol#L11) + + ```solidity + function setMessage(string memory msg_) external { + ``` + - Found in src/MissingInheritance.sol [Line: 10](../tests/contract-playground/src/MissingInheritance.sol#L10) ```solidity @@ -7218,3 +7226,170 @@ State variable changes in this function but no event is emitted. +## L-44: PUSH0 is not supported by all chains + +MCOPY opcode is introduced in Solidity 0.8.23 so it's very likely that not all chains support it yet. Consider using using older version of solidity. + +
26 Found Instances + + +- Found in src/ContractLocksEther.sol [Line: 2](../tests/contract-playground/src/ContractLocksEther.sol#L2) + + ```solidity + pragma solidity ^0.8.0; + ``` + +- Found in src/ContractWithTodo.sol [Line: 2](../tests/contract-playground/src/ContractWithTodo.sol#L2) + + ```solidity + pragma solidity ^0.8.0; + ``` + +- Found in src/Counter.sol [Line: 2](../tests/contract-playground/src/Counter.sol#L2) + + ```solidity + pragma solidity ^0.8.13; + ``` + +- Found in src/CrazyPragma.sol [Line: 2](../tests/contract-playground/src/CrazyPragma.sol#L2) + + ```solidity + pragma solidity >=0.8.19 <0.9.1; + ``` + +- Found in src/DelegateCallWithoutAddressCheck.sol [Line: 2](../tests/contract-playground/src/DelegateCallWithoutAddressCheck.sol#L2) + + ```solidity + pragma solidity ^0.8; + ``` + +- Found in src/DeletionNestedMappingStructureContract.sol [Line: 2](../tests/contract-playground/src/DeletionNestedMappingStructureContract.sol#L2) + + ```solidity + pragma solidity ^0.8.0; + ``` + +- Found in src/FunctionSignatureCollision.sol [Line: 2](../tests/contract-playground/src/FunctionSignatureCollision.sol#L2) + + ```solidity + pragma solidity ^0.8.0; + ``` + +- Found in src/InconsistentUints.sol [Line: 1](../tests/contract-playground/src/InconsistentUints.sol#L1) + + ```solidity + pragma solidity ^0.8.24; + ``` + +- Found in src/IncorrectERC20.sol [Line: 2](../tests/contract-playground/src/IncorrectERC20.sol#L2) + + ```solidity + pragma solidity ^0.8.0; + ``` + +- Found in src/IncorrectERC721.sol [Line: 2](../tests/contract-playground/src/IncorrectERC721.sol#L2) + + ```solidity + pragma solidity ^0.8.0; + ``` + +- Found in src/LatestSolidityVersionContract.sol [Line: 2](../tests/contract-playground/src/LatestSolidityVersionContract.sol#L2) + + ```solidity + pragma solidity 0.8.27; + ``` + +- Found in src/LocalVariableShadow.sol [Line: 2](../tests/contract-playground/src/LocalVariableShadow.sol#L2) + + ```solidity + pragma solidity 0.8.25; + ``` + +- Found in src/MsgValueInLoop.sol [Line: 2](../tests/contract-playground/src/MsgValueInLoop.sol#L2) + + ```solidity + pragma solidity ^0.8.0; + ``` + +- Found in src/OutOfOrderRetryable.sol [Line: 2](../tests/contract-playground/src/OutOfOrderRetryable.sol#L2) + + ```solidity + pragma solidity ^0.8.0; + ``` + +- Found in src/RevertsAndRequriesInLoops.sol [Line: 2](../tests/contract-playground/src/RevertsAndRequriesInLoops.sol#L2) + + ```solidity + pragma solidity 0.8.25; + ``` + +- Found in src/StateVariablesManipulation.sol [Line: 2](../tests/contract-playground/src/StateVariablesManipulation.sol#L2) + + ```solidity + pragma solidity ^0.8.0; + ``` + +- Found in src/TxOriginUsedForAuth.sol [Line: 2](../tests/contract-playground/src/TxOriginUsedForAuth.sol#L2) + + ```solidity + pragma solidity ^0.8.20; + ``` + +- Found in src/UninitializedStateVariable.sol [Line: 3](../tests/contract-playground/src/UninitializedStateVariable.sol#L3) + + ```solidity + pragma solidity 0.8.25; + ``` + +- Found in src/UnusedStateVariables.sol [Line: 2](../tests/contract-playground/src/UnusedStateVariables.sol#L2) + + ```solidity + pragma solidity ^0.8.20; + ``` + +- Found in src/VoidConstructor.sol [Line: 2](../tests/contract-playground/src/VoidConstructor.sol#L2) + + ```solidity + pragma solidity ^0.8.0; + ``` + +- Found in src/auditor_mode/PublicFunctionsWithoutSenderCheck.sol [Line: 2](../tests/contract-playground/src/auditor_mode/PublicFunctionsWithoutSenderCheck.sol#L2) + + ```solidity + pragma solidity 0.8.25; + ``` + +- Found in src/cloc/AnotherHeavilyCommentedContract.sol [Line: 6](../tests/contract-playground/src/cloc/AnotherHeavilyCommentedContract.sol#L6) + + ```solidity + pragma solidity ^0.8.18; + ``` + +- Found in src/cloc/HeavilyCommentedContract.sol [Line: 6](../tests/contract-playground/src/cloc/HeavilyCommentedContract.sol#L6) + + ```solidity + pragma solidity >=0.8.0 <0.8.25; + ``` + +- Found in src/inheritance/IContractInheritance.sol [Line: 2](../tests/contract-playground/src/inheritance/IContractInheritance.sol#L2) + + ```solidity + pragma solidity >=0.8.0; + ``` + +- Found in src/inheritance/InheritanceBase.sol [Line: 2](../tests/contract-playground/src/inheritance/InheritanceBase.sol#L2) + + ```solidity + pragma solidity ^0.8.0; + ``` + +- Found in src/nested_mappings/LaterVersion.sol [Line: 2](../tests/contract-playground/src/nested_mappings/LaterVersion.sol#L2) + + ```solidity + pragma solidity ^0.8.0; + ``` + +
+ + + diff --git a/reports/report.sarif b/reports/report.sarif index fbf3f65ad..32a26e595 100644 --- a/reports/report.sarif +++ b/reports/report.sarif @@ -11206,6 +11206,17 @@ } } }, + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/LatestSolidityVersionContract.sol" + }, + "region": { + "byteLength": 10, + "byteOffset": 208 + } + } + }, { "physicalLocation": { "artifactLocation": { @@ -11893,6 +11904,301 @@ "text": "State variable changes in this function but no event is emitted." }, "ruleId": "state-variable-changes-without-events" + }, + { + "level": "note", + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/ContractLocksEther.sol" + }, + "region": { + "byteLength": 23, + "byteOffset": 32 + } + } + }, + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/ContractWithTodo.sol" + }, + "region": { + "byteLength": 23, + "byteOffset": 32 + } + } + }, + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/Counter.sol" + }, + "region": { + "byteLength": 24, + "byteOffset": 39 + } + } + }, + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/CrazyPragma.sol" + }, + "region": { + "byteLength": 32, + "byteOffset": 32 + } + } + }, + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/DelegateCallWithoutAddressCheck.sol" + }, + "region": { + "byteLength": 21, + "byteOffset": 32 + } + } + }, + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/DeletionNestedMappingStructureContract.sol" + }, + "region": { + "byteLength": 23, + "byteOffset": 32 + } + } + }, + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/FunctionSignatureCollision.sol" + }, + "region": { + "byteLength": 23, + "byteOffset": 32 + } + } + }, + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/InconsistentUints.sol" + }, + "region": { + "byteLength": 24, + "byteOffset": 0 + } + } + }, + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/IncorrectERC20.sol" + }, + "region": { + "byteLength": 23, + "byteOffset": 32 + } + } + }, + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/IncorrectERC721.sol" + }, + "region": { + "byteLength": 23, + "byteOffset": 32 + } + } + }, + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/LatestSolidityVersionContract.sol" + }, + "region": { + "byteLength": 23, + "byteOffset": 32 + } + } + }, + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/LocalVariableShadow.sol" + }, + "region": { + "byteLength": 23, + "byteOffset": 32 + } + } + }, + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/MsgValueInLoop.sol" + }, + "region": { + "byteLength": 23, + "byteOffset": 32 + } + } + }, + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/OutOfOrderRetryable.sol" + }, + "region": { + "byteLength": 23, + "byteOffset": 32 + } + } + }, + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/RevertsAndRequriesInLoops.sol" + }, + "region": { + "byteLength": 23, + "byteOffset": 32 + } + } + }, + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/StateVariablesManipulation.sol" + }, + "region": { + "byteLength": 23, + "byteOffset": 32 + } + } + }, + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/TxOriginUsedForAuth.sol" + }, + "region": { + "byteLength": 24, + "byteOffset": 32 + } + } + }, + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/UninitializedStateVariable.sol" + }, + "region": { + "byteLength": 23, + "byteOffset": 40 + } + } + }, + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/UnusedStateVariables.sol" + }, + "region": { + "byteLength": 24, + "byteOffset": 32 + } + } + }, + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/VoidConstructor.sol" + }, + "region": { + "byteLength": 23, + "byteOffset": 32 + } + } + }, + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/auditor_mode/PublicFunctionsWithoutSenderCheck.sol" + }, + "region": { + "byteLength": 23, + "byteOffset": 32 + } + } + }, + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/cloc/AnotherHeavilyCommentedContract.sol" + }, + "region": { + "byteLength": 24, + "byteOffset": 46 + } + } + }, + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/cloc/HeavilyCommentedContract.sol" + }, + "region": { + "byteLength": 32, + "byteOffset": 46 + } + } + }, + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/inheritance/IContractInheritance.sol" + }, + "region": { + "byteLength": 24, + "byteOffset": 32 + } + } + }, + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/inheritance/InheritanceBase.sol" + }, + "region": { + "byteLength": 23, + "byteOffset": 32 + } + } + }, + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/nested_mappings/LaterVersion.sol" + }, + "region": { + "byteLength": 23, + "byteOffset": 36 + } + } + } + ], + "message": { + "text": "MCOPY opcode is introduced in Solidity 0.8.23 so it's very likely that not all chains support it yet. Consider using using older version of solidity." + }, + "ruleId": "mcopy-opcode" } ], "tool": { diff --git a/reports/sablier-aderyn-toml-nested-root.md b/reports/sablier-aderyn-toml-nested-root.md index e5be85177..e095ffc2d 100644 --- a/reports/sablier-aderyn-toml-nested-root.md +++ b/reports/sablier-aderyn-toml-nested-root.md @@ -16,6 +16,7 @@ This report was generated by [Aderyn](https://github.com/Cyfrin/aderyn), a stati - [L-6: Large literal values multiples of 10000 can be replaced with scientific notation](#l-6-large-literal-values-multiples-of-10000-can-be-replaced-with-scientific-notation) - [L-7: Internal functions called only once can be inlined](#l-7-internal-functions-called-only-once-can-be-inlined) - [L-8: Costly operations inside loops.](#l-8-costly-operations-inside-loops) + - [L-9: PUSH0 is not supported by all chains](#l-9-push0-is-not-supported-by-all-chains) # Summary @@ -60,7 +61,7 @@ This report was generated by [Aderyn](https://github.com/Cyfrin/aderyn), a stati | Category | No. of Issues | | --- | --- | | High | 0 | -| Low | 8 | +| Low | 9 | # Low Issues @@ -621,3 +622,134 @@ Invoking `SSTORE`operations in loops may lead to Out-of-gas errors. Use a local +## L-9: PUSH0 is not supported by all chains + +MCOPY opcode is introduced in Solidity 0.8.23 so it's very likely that not all chains support it yet. Consider using using older version of solidity. + +
20 Found Instances + + +- Found in src/SablierV2LockupDynamic.sol [Line: 2](../tests/2024-05-Sablier/v2-core/src/SablierV2LockupDynamic.sol#L2) + + ```solidity + pragma solidity >=0.8.22; + ``` + +- Found in src/SablierV2LockupLinear.sol [Line: 2](../tests/2024-05-Sablier/v2-core/src/SablierV2LockupLinear.sol#L2) + + ```solidity + pragma solidity >=0.8.22; + ``` + +- Found in src/SablierV2LockupTranched.sol [Line: 2](../tests/2024-05-Sablier/v2-core/src/SablierV2LockupTranched.sol#L2) + + ```solidity + pragma solidity >=0.8.22; + ``` + +- Found in src/SablierV2NFTDescriptor.sol [Line: 3](../tests/2024-05-Sablier/v2-core/src/SablierV2NFTDescriptor.sol#L3) + + ```solidity + pragma solidity >=0.8.22; + ``` + +- Found in src/abstracts/Adminable.sol [Line: 2](../tests/2024-05-Sablier/v2-core/src/abstracts/Adminable.sol#L2) + + ```solidity + pragma solidity >=0.8.22; + ``` + +- Found in src/abstracts/NoDelegateCall.sol [Line: 2](../tests/2024-05-Sablier/v2-core/src/abstracts/NoDelegateCall.sol#L2) + + ```solidity + pragma solidity >=0.8.22; + ``` + +- Found in src/abstracts/SablierV2Lockup.sol [Line: 2](../tests/2024-05-Sablier/v2-core/src/abstracts/SablierV2Lockup.sol#L2) + + ```solidity + pragma solidity >=0.8.22; + ``` + +- Found in src/interfaces/IAdminable.sol [Line: 2](../tests/2024-05-Sablier/v2-core/src/interfaces/IAdminable.sol#L2) + + ```solidity + pragma solidity >=0.8.22; + ``` + +- Found in src/interfaces/ISablierV2Lockup.sol [Line: 2](../tests/2024-05-Sablier/v2-core/src/interfaces/ISablierV2Lockup.sol#L2) + + ```solidity + pragma solidity >=0.8.22; + ``` + +- Found in src/interfaces/ISablierV2LockupDynamic.sol [Line: 2](../tests/2024-05-Sablier/v2-core/src/interfaces/ISablierV2LockupDynamic.sol#L2) + + ```solidity + pragma solidity >=0.8.22; + ``` + +- Found in src/interfaces/ISablierV2LockupLinear.sol [Line: 2](../tests/2024-05-Sablier/v2-core/src/interfaces/ISablierV2LockupLinear.sol#L2) + + ```solidity + pragma solidity >=0.8.22; + ``` + +- Found in src/interfaces/ISablierV2LockupTranched.sol [Line: 2](../tests/2024-05-Sablier/v2-core/src/interfaces/ISablierV2LockupTranched.sol#L2) + + ```solidity + pragma solidity >=0.8.22; + ``` + +- Found in src/interfaces/ISablierV2NFTDescriptor.sol [Line: 2](../tests/2024-05-Sablier/v2-core/src/interfaces/ISablierV2NFTDescriptor.sol#L2) + + ```solidity + pragma solidity >=0.8.22; + ``` + +- Found in src/interfaces/hooks/ISablierV2Recipient.sol [Line: 2](../tests/2024-05-Sablier/v2-core/src/interfaces/hooks/ISablierV2Recipient.sol#L2) + + ```solidity + pragma solidity >=0.8.22; + ``` + +- Found in src/interfaces/hooks/ISablierV2Sender.sol [Line: 2](../tests/2024-05-Sablier/v2-core/src/interfaces/hooks/ISablierV2Sender.sol#L2) + + ```solidity + pragma solidity >=0.8.22; + ``` + +- Found in src/libraries/Errors.sol [Line: 2](../tests/2024-05-Sablier/v2-core/src/libraries/Errors.sol#L2) + + ```solidity + pragma solidity >=0.8.22; + ``` + +- Found in src/libraries/Helpers.sol [Line: 2](../tests/2024-05-Sablier/v2-core/src/libraries/Helpers.sol#L2) + + ```solidity + pragma solidity >=0.8.22; + ``` + +- Found in src/libraries/NFTSVG.sol [Line: 3](../tests/2024-05-Sablier/v2-core/src/libraries/NFTSVG.sol#L3) + + ```solidity + pragma solidity >=0.8.22; + ``` + +- Found in src/libraries/SVGElements.sol [Line: 3](../tests/2024-05-Sablier/v2-core/src/libraries/SVGElements.sol#L3) + + ```solidity + pragma solidity >=0.8.22; + ``` + +- Found in src/types/DataTypes.sol [Line: 2](../tests/2024-05-Sablier/v2-core/src/types/DataTypes.sol#L2) + + ```solidity + pragma solidity >=0.8.22; + ``` + +
+ + + diff --git a/reports/templegold-report.md b/reports/templegold-report.md index f941d967a..8898d4cc6 100644 --- a/reports/templegold-report.md +++ b/reports/templegold-report.md @@ -44,6 +44,7 @@ This report was generated by [Aderyn](https://github.com/Cyfrin/aderyn), a stati - [L-24: Potentially missing inheritance for contract.](#l-24-potentially-missing-inheritance-for-contract) - [L-25: Unused Imports](#l-25-unused-imports) - [L-26: State variable changes but no event is emitted.](#l-26-state-variable-changes-but-no-event-is-emitted) + - [L-27: PUSH0 is not supported by all chains](#l-27-push0-is-not-supported-by-all-chains) # Summary @@ -197,7 +198,7 @@ This report was generated by [Aderyn](https://github.com/Cyfrin/aderyn), a stati | Category | No. of Issues | | --- | --- | | High | 9 | -| Low | 26 | +| Low | 27 | # High Issues @@ -9158,3 +9159,494 @@ State variable changes in this function but no event is emitted. +## L-27: PUSH0 is not supported by all chains + +MCOPY opcode is introduced in Solidity 0.8.23 so it's very likely that not all chains support it yet. Consider using using older version of solidity. + +
80 Found Instances + + +- Found in contracts/admin/TempleTeamPayments.sol [Line: 2](../tests/2024-07-templegold/protocol/contracts/admin/TempleTeamPayments.sol#L2) + + ```solidity + pragma solidity ^0.8.0; + ``` + +- Found in contracts/admin/TempleTeamPaymentsFactory.sol [Line: 2](../tests/2024-07-templegold/protocol/contracts/admin/TempleTeamPaymentsFactory.sol#L2) + + ```solidity + pragma solidity ^0.8.4; + ``` + +- Found in contracts/admin/TempleTeamPaymentsV2.sol [Line: 2](../tests/2024-07-templegold/protocol/contracts/admin/TempleTeamPaymentsV2.sol#L2) + + ```solidity + pragma solidity ^0.8.4; + ``` + +- Found in contracts/amm/TempleStableAMMRouter.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/amm/TempleStableAMMRouter.sol#L1) + + ```solidity + pragma solidity ^0.8.4; + ``` + +- Found in contracts/amm/TreasuryIV.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/amm/TreasuryIV.sol#L1) + + ```solidity + pragma solidity ^0.8.4; + ``` + +- Found in contracts/amo/AuraStaking.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/amo/AuraStaking.sol#L1) + + ```solidity + pragma solidity ^0.8.20; + ``` + +- Found in contracts/amo/Ramos.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/amo/Ramos.sol#L1) + + ```solidity + pragma solidity ^0.8.20; + ``` + +- Found in contracts/common/CommonEventsAndErrors.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/common/CommonEventsAndErrors.sol#L1) + + ```solidity + pragma solidity ^0.8.20; + ``` + +- Found in contracts/common/SafeCast.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/common/SafeCast.sol#L1) + + ```solidity + pragma solidity ^0.8.20; + ``` + +- Found in contracts/common/TempleMath.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/common/TempleMath.sol#L1) + + ```solidity + pragma solidity ^0.8.20; + ``` + +- Found in contracts/core/Exposure.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/core/Exposure.sol#L1) + + ```solidity + pragma solidity ^0.8.4; + ``` + +- Found in contracts/core/JoiningFee.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/core/JoiningFee.sol#L1) + + ```solidity + pragma solidity ^0.8.4; + ``` + +- Found in contracts/core/MultiOtcOffer.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/core/MultiOtcOffer.sol#L1) + + ```solidity + pragma solidity ^0.8.20; + ``` + +- Found in contracts/core/OpsManager.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/core/OpsManager.sol#L1) + + ```solidity + pragma solidity ^0.8.4; + ``` + +- Found in contracts/core/OpsManagerLib.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/core/OpsManagerLib.sol#L1) + + ```solidity + pragma solidity ^0.8.4; + ``` + +- Found in contracts/core/OtcOffer.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/core/OtcOffer.sol#L1) + + ```solidity + pragma solidity ^0.8.20; + ``` + +- Found in contracts/core/Rational.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/core/Rational.sol#L1) + + ```solidity + pragma solidity ^0.8.4; + ``` + +- Found in contracts/core/RebasingERC20.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/core/RebasingERC20.sol#L1) + + ```solidity + pragma solidity ^0.8.4; + ``` + +- Found in contracts/core/TempleERC20Token.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/core/TempleERC20Token.sol#L1) + + ```solidity + pragma solidity ^0.8.4; + ``` + +- Found in contracts/core/TreasuryFarmingRevenue.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/core/TreasuryFarmingRevenue.sol#L1) + + ```solidity + pragma solidity ^0.8.4; + ``` + +- Found in contracts/core/Vault.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/core/Vault.sol#L1) + + ```solidity + pragma solidity ^0.8.4; + ``` + +- Found in contracts/core/VaultEarlyWithdraw.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/core/VaultEarlyWithdraw.sol#L1) + + ```solidity + pragma solidity ^0.8.4; + ``` + +- Found in contracts/core/VaultProxy.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/core/VaultProxy.sol#L1) + + ```solidity + pragma solidity ^0.8.4; + ``` + +- Found in contracts/core/VaultedTemple.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/core/VaultedTemple.sol#L1) + + ```solidity + pragma solidity ^0.8.4; + ``` + +- Found in contracts/deprecated/Faith.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/deprecated/Faith.sol#L1) + + ```solidity + pragma solidity ^0.8.4; + ``` + +- Found in contracts/deprecated/IExitQueue.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/deprecated/IExitQueue.sol#L1) + + ```solidity + pragma solidity ^0.8.4; + ``` + +- Found in contracts/deprecated/InstantExitQueue.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/deprecated/InstantExitQueue.sol#L1) + + ```solidity + pragma solidity ^0.8.4; + ``` + +- Found in contracts/deprecated/LockedOGTemple.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/deprecated/LockedOGTemple.sol#L1) + + ```solidity + pragma solidity ^0.8.4; + ``` + +- Found in contracts/deprecated/OGTemple.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/deprecated/OGTemple.sol#L1) + + ```solidity + pragma solidity ^0.8.4; + ``` + +- Found in contracts/deprecated/TempleStaking.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/deprecated/TempleStaking.sol#L1) + + ```solidity + pragma solidity ^0.8.4; + ``` + +- Found in contracts/fakes/FakeERC20.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/fakes/FakeERC20.sol#L1) + + ```solidity + pragma solidity ^0.8.20; + ``` + +- Found in contracts/fakes/FakeERC20CustomDecimals.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/fakes/FakeERC20CustomDecimals.sol#L1) + + ```solidity + pragma solidity ^0.8.20; + ``` + +- Found in contracts/fakes/NoopLiquidator.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/fakes/NoopLiquidator.sol#L1) + + ```solidity + pragma solidity ^0.8.4; + ``` + +- Found in contracts/fakes/NoopVaultedTempleLiquidator.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/fakes/NoopVaultedTempleLiquidator.sol#L1) + + ```solidity + pragma solidity ^0.8.4; + ``` + +- Found in contracts/fakes/templegold/TempleGoldMock.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/fakes/templegold/TempleGoldMock.sol#L1) + + ```solidity + pragma solidity ^0.8.20; + ``` + +- Found in contracts/fakes/templegold/TempleGoldStakingMock.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/fakes/templegold/TempleGoldStakingMock.sol#L1) + + ```solidity + pragma solidity ^0.8.20; + ``` + +- Found in contracts/fakes/templegold/TempleTokenMock.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/fakes/templegold/TempleTokenMock.sol#L1) + + ```solidity + pragma solidity ^0.8.20; + ``` + +- Found in contracts/fakes/v2/TempleDebtTokenTestnetAdmin.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/fakes/v2/TempleDebtTokenTestnetAdmin.sol#L1) + + ```solidity + pragma solidity ^0.8.20; + ``` + +- Found in contracts/fakes/v2/strategies/DsrBaseStrategyTestnet.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/fakes/v2/strategies/DsrBaseStrategyTestnet.sol#L1) + + ```solidity + pragma solidity ^0.8.20; + ``` + +- Found in contracts/governance/ElderElection.sol [Line: 2](../tests/2024-07-templegold/protocol/contracts/governance/ElderElection.sol#L2) + + ```solidity + pragma solidity ^0.8.4; + ``` + +- Found in contracts/governance/Templar.sol [Line: 2](../tests/2024-07-templegold/protocol/contracts/governance/Templar.sol#L2) + + ```solidity + pragma solidity ^0.8.4; + ``` + +- Found in contracts/governance/TemplarMetadata.sol [Line: 2](../tests/2024-07-templegold/protocol/contracts/governance/TemplarMetadata.sol#L2) + + ```solidity + pragma solidity ^0.8.4; + ``` + +- Found in contracts/interfaces/core/ITempleERC20Token.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/interfaces/core/ITempleERC20Token.sol#L1) + + ```solidity + pragma solidity ^0.8.20; + ``` + +- Found in contracts/interfaces/templegold/IAuctionBase.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/interfaces/templegold/IAuctionBase.sol#L1) + + ```solidity + pragma solidity ^0.8.20; + ``` + +- Found in contracts/interfaces/templegold/IDaiGoldAuction.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/interfaces/templegold/IDaiGoldAuction.sol#L1) + + ```solidity + pragma solidity ^0.8.20; + ``` + +- Found in contracts/interfaces/templegold/ISpiceAuction.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/interfaces/templegold/ISpiceAuction.sol#L1) + + ```solidity + pragma solidity ^0.8.20; + ``` + +- Found in contracts/interfaces/templegold/ISpiceAuctionFactory.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/interfaces/templegold/ISpiceAuctionFactory.sol#L1) + + ```solidity + pragma solidity ^0.8.20; + ``` + +- Found in contracts/interfaces/templegold/ITempleGold.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/interfaces/templegold/ITempleGold.sol#L1) + + ```solidity + pragma solidity ^0.8.20; + ``` + +- Found in contracts/interfaces/templegold/ITempleGoldAdmin.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/interfaces/templegold/ITempleGoldAdmin.sol#L1) + + ```solidity + pragma solidity ^0.8.20; + ``` + +- Found in contracts/interfaces/templegold/ITempleGoldStaking.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/interfaces/templegold/ITempleGoldStaking.sol#L1) + + ```solidity + pragma solidity ^0.8.20; + ``` + +- Found in contracts/interfaces/templegold/ITempleTeleporter.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/interfaces/templegold/ITempleTeleporter.sol#L1) + + ```solidity + pragma solidity ^0.8.20; + ``` + +- Found in contracts/templegold/AuctionBase.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/templegold/AuctionBase.sol#L1) + + ```solidity + pragma solidity ^0.8.20; + ``` + +- Found in contracts/templegold/DaiGoldAuction.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/templegold/DaiGoldAuction.sol#L1) + + ```solidity + pragma solidity ^0.8.20; + ``` + +- Found in contracts/templegold/EpochLib.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/templegold/EpochLib.sol#L1) + + ```solidity + pragma solidity ^0.8.20; + ``` + +- Found in contracts/templegold/SpiceAuction.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/templegold/SpiceAuction.sol#L1) + + ```solidity + pragma solidity ^0.8.20; + ``` + +- Found in contracts/templegold/SpiceAuctionFactory.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/templegold/SpiceAuctionFactory.sol#L1) + + ```solidity + pragma solidity ^0.8.20; + ``` + +- Found in contracts/templegold/TempleGold.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/templegold/TempleGold.sol#L1) + + ```solidity + pragma solidity ^0.8.20; + ``` + +- Found in contracts/templegold/TempleGoldAdmin.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/templegold/TempleGoldAdmin.sol#L1) + + ```solidity + pragma solidity ^0.8.20; + ``` + +- Found in contracts/templegold/TempleGoldStaking.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/templegold/TempleGoldStaking.sol#L1) + + ```solidity + pragma solidity ^0.8.20; + ``` + +- Found in contracts/templegold/TempleTeleporter.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/templegold/TempleTeleporter.sol#L1) + + ```solidity + pragma solidity ^0.8.20; + ``` + +- Found in contracts/util/ABDKMath64x64.sol [Line: 6](../tests/2024-07-templegold/protocol/contracts/util/ABDKMath64x64.sol#L6) + + ```solidity + pragma solidity ^0.8.4; + ``` + +- Found in contracts/util/ABDKMathQuad.sol [Line: 6](../tests/2024-07-templegold/protocol/contracts/util/ABDKMathQuad.sol#L6) + + ```solidity + pragma solidity ^0.8.0; + ``` + +- Found in contracts/v2/TempleDebtToken.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/v2/TempleDebtToken.sol#L1) + + ```solidity + pragma solidity ^0.8.20; + ``` + +- Found in contracts/v2/TreasuryPriceIndexOracle.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/v2/TreasuryPriceIndexOracle.sol#L1) + + ```solidity + pragma solidity ^0.8.20; + ``` + +- Found in contracts/v2/TreasuryReservesVault.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/v2/TreasuryReservesVault.sol#L1) + + ```solidity + pragma solidity ^0.8.20; + ``` + +- Found in contracts/v2/access/TempleElevatedAccess.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/v2/access/TempleElevatedAccess.sol#L1) + + ```solidity + pragma solidity ^0.8.20; + ``` + +- Found in contracts/v2/circuitBreaker/TempleCircuitBreakerAllUsersPerPeriod.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/v2/circuitBreaker/TempleCircuitBreakerAllUsersPerPeriod.sol#L1) + + ```solidity + pragma solidity ^0.8.20; + ``` + +- Found in contracts/v2/circuitBreaker/TempleCircuitBreakerProxy.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/v2/circuitBreaker/TempleCircuitBreakerProxy.sol#L1) + + ```solidity + pragma solidity ^0.8.20; + ``` + +- Found in contracts/v2/interestRate/BaseInterestRateModel.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/v2/interestRate/BaseInterestRateModel.sol#L1) + + ```solidity + pragma solidity ^0.8.20; + ``` + +- Found in contracts/v2/interestRate/CompoundedInterest.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/v2/interestRate/CompoundedInterest.sol#L1) + + ```solidity + pragma solidity ^0.8.20; + ``` + +- Found in contracts/v2/interestRate/LinearWithKinkInterestRateModel.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/v2/interestRate/LinearWithKinkInterestRateModel.sol#L1) + + ```solidity + pragma solidity ^0.8.20; + ``` + +- Found in contracts/v2/safeGuards/SafeForked.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/v2/safeGuards/SafeForked.sol#L1) + + ```solidity + pragma solidity ^0.8.20; + ``` + +- Found in contracts/v2/safeGuards/ThresholdSafeGuard.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/v2/safeGuards/ThresholdSafeGuard.sol#L1) + + ```solidity + pragma solidity ^0.8.20; + ``` + +- Found in contracts/v2/strategies/AbstractStrategy.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/v2/strategies/AbstractStrategy.sol#L1) + + ```solidity + pragma solidity ^0.8.20; + ``` + +- Found in contracts/v2/strategies/DsrBaseStrategy.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/v2/strategies/DsrBaseStrategy.sol#L1) + + ```solidity + pragma solidity ^0.8.20; + ``` + +- Found in contracts/v2/strategies/GnosisStrategy.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/v2/strategies/GnosisStrategy.sol#L1) + + ```solidity + pragma solidity ^0.8.20; + ``` + +- Found in contracts/v2/strategies/RamosStrategy.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/v2/strategies/RamosStrategy.sol#L1) + + ```solidity + pragma solidity ^0.8.20; + ``` + +- Found in contracts/v2/strategies/TempleTokenBaseStrategy.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/v2/strategies/TempleTokenBaseStrategy.sol#L1) + + ```solidity + pragma solidity ^0.8.20; + ``` + +- Found in contracts/v2/strategies/TlcStrategy.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/v2/strategies/TlcStrategy.sol#L1) + + ```solidity + pragma solidity ^0.8.20; + ``` + +- Found in contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol [Line: 1](../tests/2024-07-templegold/protocol/contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol#L1) + + ```solidity + pragma solidity ^0.8.20; + ``` + +
+ + + diff --git a/tests/contract-playground/src/LatestSolidityVersionContract.sol b/tests/contract-playground/src/LatestSolidityVersionContract.sol new file mode 100644 index 000000000..e69de29bb From 07b504330bc25c0f2e5ef99c246c460c6aed6e58 Mon Sep 17 00:00:00 2001 From: TilakMaddy Date: Wed, 18 Sep 2024 19:31:11 +0530 Subject: [PATCH 2/2] Solidity test file --- .../src/LatestSolidityVersionContract.sol | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/contract-playground/src/LatestSolidityVersionContract.sol b/tests/contract-playground/src/LatestSolidityVersionContract.sol index e69de29bb..757aa0aeb 100644 --- a/tests/contract-playground/src/LatestSolidityVersionContract.sol +++ b/tests/contract-playground/src/LatestSolidityVersionContract.sol @@ -0,0 +1,14 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.27; + +contract LatestSolidityVersionMsgStore { + string public message; + + constructor(string memory msg_) { + message = msg_; + } + + function setMessage(string memory msg_) external { + message = msg_; + } +}