diff --git a/foundry.toml b/foundry.toml index a3eae5b8e..b59d87364 100644 --- a/foundry.toml +++ b/foundry.toml @@ -37,6 +37,7 @@ remappings = [ "rain.sol.codegen/=lib/rain.sol.codegen/src/", "rain.solmem/=lib/rain.interpreter.interface/lib/rain.solmem/src/", "openzeppelin-contracts/=lib/rain.interpreter.interface/lib/openzeppelin-contracts/", + "rain.math.float/=lib/rain.math.float/src/", ] [fuzz] diff --git a/src/concrete/extern/RainterpreterReferenceExternNPE2.sol b/src/concrete/extern/RainterpreterReferenceExternNPE2.sol index b617fd80d..54a620535 100644 --- a/src/concrete/extern/RainterpreterReferenceExternNPE2.sol +++ b/src/concrete/extern/RainterpreterReferenceExternNPE2.sol @@ -34,7 +34,7 @@ import { INTEGRITY_FUNCTION_POINTERS, OPCODE_FUNCTION_POINTERS } from "../../generated/RainterpreterReferenceExternNPE2.pointers.sol"; -import {LibDecimalFloat} from "rain.math.float/src/lib/LibDecimalFloat.sol"; +import {LibDecimalFloat} from "rain.math.float/lib/LibDecimalFloat.sol"; /// @dev The number of subparser functions available to the parser. This is NOT /// 1:1 with the number of opcodes provided by the extern component of this diff --git a/src/lib/extern/reference/op/LibExternOpIntIncNPE2.sol b/src/lib/extern/reference/op/LibExternOpIntIncNPE2.sol index 043455fc3..ea31c2f81 100644 --- a/src/lib/extern/reference/op/LibExternOpIntIncNPE2.sol +++ b/src/lib/extern/reference/op/LibExternOpIntIncNPE2.sol @@ -4,7 +4,7 @@ pragma solidity ^0.8.25; import {Operand} from "rain.interpreter.interface/interface/unstable/IInterpreterV4.sol"; import {LibSubParse} from "../../../parse/LibSubParse.sol"; import {IInterpreterExternV3} from "rain.interpreter.interface/interface/IInterpreterExternV3.sol"; -import {LibDecimalFloat} from "rain.math.float/src/lib/LibDecimalFloat.sol"; +import {LibDecimalFloat} from "rain.math.float/lib/LibDecimalFloat.sol"; /// @dev Opcode index of the extern increment opcode. Needs to be manually kept /// in sync with the extern opcode function pointers. Definitely write tests for diff --git a/src/lib/parse/LibParseOperand.sol b/src/lib/parse/LibParseOperand.sol index 161aa3041..be2dfb569 100644 --- a/src/lib/parse/LibParseOperand.sol +++ b/src/lib/parse/LibParseOperand.sol @@ -16,7 +16,7 @@ import {CMASK_OPERAND_END, CMASK_WHITESPACE, CMASK_OPERAND_START} from "./LibPar import {ParseState, OPERAND_VALUES_LENGTH, FSM_YANG_MASK} from "./LibParseState.sol"; import {LibParseError} from "./LibParseError.sol"; import {LibParseInterstitial} from "./LibParseInterstitial.sol"; -import {LibDecimalFloat} from "rain.math.float/src/lib/LibDecimalFloat.sol"; +import {LibDecimalFloat} from "rain.math.float/lib/LibDecimalFloat.sol"; library LibParseOperand { using LibParseError for ParseState; diff --git a/src/lib/parse/literal/LibParseLiteralDecimal.sol b/src/lib/parse/literal/LibParseLiteralDecimal.sol index 21baed774..426e2e57f 100644 --- a/src/lib/parse/literal/LibParseLiteralDecimal.sol +++ b/src/lib/parse/literal/LibParseLiteralDecimal.sol @@ -18,7 +18,7 @@ import { } from "../LibParseCMask.sol"; import {LibParseError} from "../LibParseError.sol"; import {LibParse} from "../LibParse.sol"; -import {LibDecimalFloatImplementation, LibDecimalFloat} from "rain.math.float/src/lib/LibDecimalFloat.sol"; +import {LibDecimalFloatImplementation, LibDecimalFloat} from "rain.math.float/lib/LibDecimalFloat.sol"; /// @dev The default is 18 decimal places for a fractional number. uint256 constant DECIMAL_SCALE = 18; diff --git a/test/src/concrete/RainterpreterNPE2.stateOverlay.t.sol b/test/src/concrete/RainterpreterNPE2.stateOverlay.t.sol index 348f55cd4..c95cce6ee 100644 --- a/test/src/concrete/RainterpreterNPE2.stateOverlay.t.sol +++ b/test/src/concrete/RainterpreterNPE2.stateOverlay.t.sol @@ -6,7 +6,7 @@ import {RainterpreterExpressionDeployerNPE2DeploymentTest} from import {FullyQualifiedNamespace, StateNamespace} from "rain.interpreter.interface/interface/IInterpreterStoreV2.sol"; import {EvalV4, SourceIndexV2} from "rain.interpreter.interface/interface/unstable/IInterpreterV4.sol"; import {LibNamespace} from "rain.interpreter.interface/lib/ns/LibNamespace.sol"; -import {LibDecimalFloat} from "rain.math.float/src/lib/LibDecimalFloat.sol"; +import {LibDecimalFloat} from "rain.math.float/lib/LibDecimalFloat.sol"; contract RainterpreterNPE2StateOverlayTest is RainterpreterExpressionDeployerNPE2DeploymentTest { /// Show that state overlay can prewarm a get. diff --git a/test/src/concrete/RainterpreterReferenceExternNPE2.intInc.t.sol b/test/src/concrete/RainterpreterReferenceExternNPE2.intInc.t.sol index 88fd7ebfd..b79bfea6e 100644 --- a/test/src/concrete/RainterpreterReferenceExternNPE2.intInc.t.sol +++ b/test/src/concrete/RainterpreterReferenceExternNPE2.intInc.t.sol @@ -19,7 +19,7 @@ import {LibExtern} from "src/lib/extern/LibExtern.sol"; import {Strings} from "openzeppelin-contracts/contracts/utils/Strings.sol"; import {OPCODE_EXTERN} from "rain.interpreter.interface/interface/unstable/IInterpreterV4.sol"; import {ExternDispatchConstantsHeightOverflow} from "src/error/ErrSubParse.sol"; -import {LibDecimalFloat} from "rain.math.float/src/lib/LibDecimalFloat.sol"; +import {LibDecimalFloat} from "rain.math.float/lib/LibDecimalFloat.sol"; import {CURRENT_COMPATIBILITY} from "src/lib/parse/LibSubParse.sol"; contract RainterpreterReferenceExternNPE2IntIncTest is OpTest { diff --git a/test/src/lib/op/00/LibOpConstantNP.t.sol b/test/src/lib/op/00/LibOpConstantNP.t.sol index 9ca735cf8..8c080b717 100644 --- a/test/src/lib/op/00/LibOpConstantNP.t.sol +++ b/test/src/lib/op/00/LibOpConstantNP.t.sol @@ -18,7 +18,7 @@ import {IInterpreterStoreV2} from "rain.interpreter.interface/interface/IInterpr import {SignedContextV1} from "rain.interpreter.interface/interface/IInterpreterCallerV3.sol"; import {LibOperand} from "test/lib/operand/LibOperand.sol"; import {BadOpOutputsLength} from "src/error/ErrIntegrity.sol"; -import {LibDecimalFloat} from "rain.math.float/src/lib/LibDecimalFloat.sol"; +import {LibDecimalFloat} from "rain.math.float/lib/LibDecimalFloat.sol"; /// @title LibOpConstantNPTest /// @notice Test the runtime and integrity time logic of LibOpConstantNP. diff --git a/test/src/lib/op/00/LibOpContextNP.t.sol b/test/src/lib/op/00/LibOpContextNP.t.sol index 2c22e3f78..c1c38bfa8 100644 --- a/test/src/lib/op/00/LibOpContextNP.t.sol +++ b/test/src/lib/op/00/LibOpContextNP.t.sol @@ -34,6 +34,7 @@ contract LibOpContextNPTest is OpTest { /// Directly test the runtime logic of LibOpContextNP. This tests that the /// values in the context matrix can be pushed to the stack via. the operand. + /// forge-config: default.fuzz.runs = 100 function testOpContextNPRun(uint256[][] memory context, uint256 i, uint256 j) external view { InterpreterStateNP memory state = opTestDefaultInterpreterState(); state.context = context; @@ -52,6 +53,7 @@ contract LibOpContextNPTest is OpTest { /// Directly test the reference logic of LibOpContextNP. This tests that the /// runtime logic will revert if the indexes are OOB. Tests that i is OOB. + /// forge-config: default.fuzz.runs = 100 function testOpContextNPRunOOBi(uint256[][] memory context, uint256 i, uint256 j) external { InterpreterStateNP memory state = opTestDefaultInterpreterState(); state.context = context; @@ -68,6 +70,7 @@ contract LibOpContextNPTest is OpTest { /// Directly test the reference logic of LibOpContextNP. This tests that the /// runtime logic will revert if the indexes are OOB. Tests that j is OOB. + /// forge-config: default.fuzz.runs = 100 function testOpContextNPRunOOBj(uint256[][] memory context, uint256 i, uint256 j) external { InterpreterStateNP memory state = opTestDefaultInterpreterState(); state.context = context; @@ -85,6 +88,7 @@ contract LibOpContextNPTest is OpTest { } /// Test the eval of context opcode parsed from a string. This tests 0 0. + /// forge-config: default.fuzz.runs = 100 function testOpContextNPEval00(uint256[][] memory context) external view { vm.assume(context.length > 0); vm.assume(context[0].length > 0); @@ -108,6 +112,7 @@ contract LibOpContextNPTest is OpTest { } /// Test the eval of context opcode parsed from a string. This tests 0 1. + /// forge-config: default.fuzz.runs = 100 function testOpContextNPEval01(uint256[][] memory context) external view { vm.assume(context.length > 0); vm.assume(context[0].length > 1); @@ -130,6 +135,7 @@ contract LibOpContextNPTest is OpTest { } /// Test the eval of context opcode parsed from a string. This tests 1 0. + /// forge-config: default.fuzz.runs = 100 function testOpContextNPEval10(uint256[][] memory context) external view { vm.assume(context.length > 1); vm.assume(context[1].length > 0); @@ -153,6 +159,7 @@ contract LibOpContextNPTest is OpTest { } /// Test the eval of context opcode parsed from a string. This tests 1 1. + /// forge-config: default.fuzz.runs = 100 function testOpContextNPEval11(uint256[][] memory context) external view { vm.assume(context.length > 1); vm.assume(context[1].length > 1); @@ -176,6 +183,7 @@ contract LibOpContextNPTest is OpTest { } /// Test the eval of context opcode parsed from a string. This tests OOB i. + /// forge-config: default.fuzz.runs = 100 function testOpContextNPEvalOOBi(uint256[] memory context0) external { uint256[][] memory context = new uint256[][](1); context[0] = context0; diff --git a/test/src/lib/op/00/LibOpExternNP.t.sol b/test/src/lib/op/00/LibOpExternNP.t.sol index 6bbe475b3..82f8a303f 100644 --- a/test/src/lib/op/00/LibOpExternNP.t.sol +++ b/test/src/lib/op/00/LibOpExternNP.t.sol @@ -17,7 +17,7 @@ import { import {IERC165} from "openzeppelin-contracts/contracts/utils/introspection/IERC165.sol"; import {LibOperand} from "test/lib/operand/LibOperand.sol"; import {LibUint256Array} from "rain.solmem/lib/LibUint256Array.sol"; -import {LibDecimalFloat} from "rain.math.float/src/lib/LibDecimalFloat.sol"; +import {LibDecimalFloat} from "rain.math.float/lib/LibDecimalFloat.sol"; /// @title LibOpExternNPTest /// @notice Test the runtime and integrity time logic of LibOpExternNP. diff --git a/test/src/lib/op/00/LibOpStackNP.t.sol b/test/src/lib/op/00/LibOpStackNP.t.sol index 077cf7d1b..5217efb6a 100644 --- a/test/src/lib/op/00/LibOpStackNP.t.sol +++ b/test/src/lib/op/00/LibOpStackNP.t.sol @@ -21,7 +21,7 @@ import {OpTest, PRE, POST} from "test/abstract/OpTest.sol"; import {SignedContextV1} from "rain.interpreter.interface/interface/IInterpreterCallerV3.sol"; import {LibOperand} from "test/lib/operand/LibOperand.sol"; import {BadOpOutputsLength} from "src/error/ErrIntegrity.sol"; -import {LibDecimalFloat} from "rain.math.float/src/lib/LibDecimalFloat.sol"; +import {LibDecimalFloat} from "rain.math.float/lib/LibDecimalFloat.sol"; /// @title LibOpStackNPTest /// @notice Test the runtime and integrity time logic of LibOpStackNP. diff --git a/test/src/lib/op/call/LibOpCallNP.t.sol b/test/src/lib/op/call/LibOpCallNP.t.sol index 144936acc..40b56037e 100644 --- a/test/src/lib/op/call/LibOpCallNP.t.sol +++ b/test/src/lib/op/call/LibOpCallNP.t.sol @@ -17,7 +17,7 @@ import {LibBytecode, SourceIndexOutOfBounds} from "rain.interpreter.interface/li import {BadOpInputsLength} from "src/lib/integrity/LibIntegrityCheckNP.sol"; import {STACK_TRACER} from "src/lib/state/LibInterpreterStateNP.sol"; import {LibOperand} from "test/lib/operand/LibOperand.sol"; -import {LibDecimalFloat} from "rain.math.float/src/lib/LibDecimalFloat.sol"; +import {LibDecimalFloat} from "rain.math.float/lib/LibDecimalFloat.sol"; /// @title LibOpCallNPTest /// @notice Test the LibOpCallNP library that includes the "call" word. diff --git a/test/src/lib/op/crypto/LibOpHashNP.t.sol b/test/src/lib/op/crypto/LibOpHashNP.t.sol index 304eb0c2a..782b66962 100644 --- a/test/src/lib/op/crypto/LibOpHashNP.t.sol +++ b/test/src/lib/op/crypto/LibOpHashNP.t.sol @@ -23,7 +23,7 @@ import {SignedContextV1} from "rain.interpreter.interface/interface/IInterpreter import {LibIntegrityCheckNP, IntegrityCheckStateNP} from "src/lib/integrity/LibIntegrityCheckNP.sol"; import {InterpreterStateNP, LibInterpreterStateNP} from "src/lib/state/LibInterpreterStateNP.sol"; import {LibOperand} from "test/lib/operand/LibOperand.sol"; -import {LibDecimalFloat} from "rain.math.float/src/lib/LibDecimalFloat.sol"; +import {LibDecimalFloat} from "rain.math.float/lib/LibDecimalFloat.sol"; /// @title LibOpHashNPTest /// @notice Test the runtime and integrity time logic of LibOpHashNP. diff --git a/test/src/lib/parse/LibParse.literalIntegerDecimal.t.sol b/test/src/lib/parse/LibParse.literalIntegerDecimal.t.sol index 23ca21830..767569ea7 100644 --- a/test/src/lib/parse/LibParse.literalIntegerDecimal.t.sol +++ b/test/src/lib/parse/LibParse.literalIntegerDecimal.t.sol @@ -8,7 +8,7 @@ import {DecimalLiteralOverflow} from "src/lib/parse/literal/LibParseLiteral.sol" import {LibParse, UnexpectedRHSChar, UnexpectedRightParen} from "src/lib/parse/LibParse.sol"; import {LibBytecode} from "rain.interpreter.interface/lib/bytecode/LibBytecode.sol"; import {ParseState} from "src/lib/parse/LibParseState.sol"; -import {LibDecimalFloat} from "rain.math.float/src/lib/LibDecimalFloat.sol"; +import {LibDecimalFloat} from "rain.math.float/lib/LibDecimalFloat.sol"; /// @title LibParseLiteralIntegerDecimalTest /// Tests parsing integer literal decimal values. diff --git a/test/src/lib/parse/LibParse.namedLHS.t.sol b/test/src/lib/parse/LibParse.namedLHS.t.sol index 315c80076..d3e5a4161 100644 --- a/test/src/lib/parse/LibParse.namedLHS.t.sol +++ b/test/src/lib/parse/LibParse.namedLHS.t.sol @@ -15,7 +15,7 @@ import {Operand, LibParseOperand} from "src/lib/parse/LibParseOperand.sol"; import {LibConvert} from "rain.lib.typecast/LibConvert.sol"; import {LibAllStandardOpsNP} from "src/lib/op/LibAllStandardOpsNP.sol"; import {LibGenParseMeta} from "rain.sol.codegen/lib/LibGenParseMeta.sol"; -import {LibDecimalFloat} from "rain.math.float/src/lib/LibDecimalFloat.sol"; +import {LibDecimalFloat} from "rain.math.float/lib/LibDecimalFloat.sol"; /// @title LibParseNamedLHSTest contract LibParseNamedLHSTest is Test { diff --git a/test/src/lib/parse/LibParseOperand.parseOperand.t.sol b/test/src/lib/parse/LibParseOperand.parseOperand.t.sol index 3d8329758..4d0be5631 100644 --- a/test/src/lib/parse/LibParseOperand.parseOperand.t.sol +++ b/test/src/lib/parse/LibParseOperand.parseOperand.t.sol @@ -10,8 +10,8 @@ import {LibMetaFixture} from "test/lib/parse/LibMetaFixture.sol"; import {LibLiteralString} from "test/lib/literal/LibLiteralString.sol"; import {OperandValuesOverflow, UnclosedOperand} from "src/error/ErrParse.sol"; import {LibParseLiteral} from "src/lib/parse/literal/LibParseLiteral.sol"; -import {LibDecimalFloat, LibDecimalFloatImplementation} from "rain.math.float/src/lib/LibDecimalFloat.sol"; -import {SIGNED_NORMALIZED_MAX} from "rain.math.float/src/lib/implementation/LibDecimalFloatImplementation.sol"; +import {LibDecimalFloat, LibDecimalFloatImplementation} from "rain.math.float/lib/LibDecimalFloat.sol"; +import {SIGNED_NORMALIZED_MAX} from "rain.math.float/lib/implementation/LibDecimalFloatImplementation.sol"; contract LibParseOperandParseOperandTest is Test { using LibBytes for bytes;