Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/rainix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
task: [rainix-rs-test]
task: [rainix-rs-test, rainix-sol-legal]
include:
# Solidity doesn't need to be tested on multiple platforms
- os: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions LICENSE
189 changes: 189 additions & 0 deletions LICENSES/LicenseRef-DCL-1.0.txt

Large diffs are not rendered by default.

27 changes: 27 additions & 0 deletions REUSE.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
version = 1

[[annotations]]
path = [
".envrc",
".gas-snapshot",
".github/workflows/**/",
".vscode/**/",
"Cargo.lock",
"Cargo.toml",
".gitignore",
".gitmodules",
"package-lock.json",
"package.json",
"scripts/**/",
"test_js/**/",
"tsconfig.json",
"README.md",
"crates/**/",
"flake.lock",
"flake.nix",
"foundry.toml",
"slither.config.json",
"REUSE.toml"
]
Comment thread
thedavidmeister marked this conversation as resolved.
SPDX-FileCopyrightText = "Copyright (c) 2020 Rain Open Source Software Ltd"
SPDX-License-Identifier = "LicenseRef-DCL-1.0"
Comment thread
thedavidmeister marked this conversation as resolved.
3 changes: 2 additions & 1 deletion script/BuildPointers.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
Comment thread
thedavidmeister marked this conversation as resolved.
pragma solidity =0.8.25;

import {Script} from "forge-std/Script.sol";
Expand Down
3 changes: 2 additions & 1 deletion script/Deploy.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
Comment on lines +1 to +2

@coderabbitai coderabbitai Bot Aug 26, 2025

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

License header change looks correct; verify repo-wide SPDX/REUSE consistency.

Header format is valid and non-functional. As this PR introduces a custom LicenseRef, please verify there are no remaining CAL identifiers and that all .sol files carry a valid SPDX header and the Copyright line.

Run the following script from the repo root to validate consistency and catch stragglers:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "1) Ensure custom license file exists and matches LicenseRef name"
test -f LICENSES/LicenseRef-DCL-1.0.txt && echo "✔ LICENSES/LicenseRef-DCL-1.0.txt present" || { echo "✘ Missing LICENSES/LicenseRef-DCL-1.0.txt"; exit 1; }

echo "2) Find any remaining CAL identifiers"
rg -nP 'SPDX-License-Identifier:\s*CAL' || echo "✔ No CAL SPDX identifiers found"

echo "3) Ensure all Solidity files have an SPDX header on line 1"
fail=0
while IFS= read -r -d '' f; do
  firstline="$(sed -n '1p' "$f")"
  if ! [[ "$firstline" =~ ^//\ SPDX-License-Identifier: ]]; then
    echo "✘ Missing/invalid SPDX header on line 1: $f"
    fail=1
  fi
done < <(fd -t f -a -0 '\.sol$')
[[ $fail -eq 0 ]] && echo "✔ All .sol files have SPDX header on line 1" || exit 1

echo "4) Check all SPDX identifiers use LicenseRef-DCL-1.0"
rg -nP '^\s*//\s*SPDX-License-Identifier:\s*(.+)$' -g '!**/node_modules/**' -g '!**/out/**' | awk -F: '{print $1":"$2" -> "$3}' | sort -u
if rg -nP 'SPDX-License-Identifier:\s*(?!LicenseRef-DCL-1\.0)' -g '!**/node_modules/**' -g '!**/out/**'; then
  echo "⚠ Found non-DCL SPDX identifiers above (check third-party or intended exceptions)."
else
  echo "✔ All SPDX identifiers are LicenseRef-DCL-1.0 (or none found outside exclusions)."
fi

echo "5) Verify presence of SPDX-FileCopyrightText alongside SPDX header in .sol"
missing=0
while IFS= read -r -d '' f; do
  if ! rg -n '^//\s*SPDX-FileCopyrightText:' "$f" >/dev/null; then
    echo "⚠ Missing SPDX-FileCopyrightText in: $f"
    missing=1
  fi
done < <(fd -t f -a -0 '\.sol$')
[[ $missing -eq 0 ]] && echo "✔ All .sol files contain SPDX-FileCopyrightText" || echo "⚠ Some files lack SPDX-FileCopyrightText (consider adding where required)."

Length of output: 765


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "3) Ensure all Solidity files have an SPDX header on line 1"
missing=$(find . -type f -name '*.sol' -print0 | xargs -0 -I{} sh -c '
  f="{}"
  line=$(head -n1 "$f")
  if ! echo "$line" | grep -qE "^// SPDX-License-Identifier:"; then
    echo "$f: [$line]"
  fi
')
if [ -z "$missing" ]; then
  echo "✔ All .sol files have SPDX header on line 1"
else
  echo -e "✘ Missing/invalid SPDX header on line 1 in:\n$missing"
fi

echo "4) Check all SPDX identifiers use LicenseRef-DCL-1.0"
bad=$(rg -nP '^\s*//\s*SPDX-License-Identifier:\s*(?!LicenseRef-DCL-1\.0)' -g '!**/node_modules/**' -g '!**/out/**' || true)
if [ -z "$bad" ]; then
  echo "✔ All SPDX identifiers are LicenseRef-DCL-1.0"
else
  echo -e "⚠ Found non-DCL SPDX identifiers:\n$bad"
fi

echo "5) Verify presence of SPDX-FileCopyrightText alongside SPDX header in .sol"
missing_ct=$(grep -L -R --include="*.sol" '^// SPDX-FileCopyrightText:' . || true)
if [ -z "$missing_ct" ]; then
  echo "✔ All .sol files contain SPDX-FileCopyrightText"
else
  echo -e "⚠ Missing SPDX-FileCopyrightText in:\n$missing_ct"
fi

Length of output: 36446


Action required: Add SPDX header to generated Solidity file

The repository-wide license audit shows one auto-generated file is missing the required SPDX header, which is critical for compliance:

• LICENSES/LicenseRef-DCL-1.0.txt is present.
• No CAL identifiers remain.
• All .sol files except the autogenerated one include a valid // SPDX-License-Identifier: LicenseRef-DCL-1.0 on line 1 and the corresponding copyright line.
• All files use LicenseRef-DCL-1.0 as their SPDX identifier.

src/generated/LogTables.pointers.sol is missing an SPDX header on line 1. Please update the code generator (or the file itself) to prepend:

--- a/src/generated/LogTables.pointers.sol
+++ b/src/generated/LogTables.pointers.sol
@@ -1,1 +1,3 @@
+// SPDX-License-Identifier: LicenseRef-DCL-1.0
+// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
 // THIS FILE IS AUTOGENERATED BY ./script/BuildPointers.sol

Once updated, re-run the audit script to confirm full compliance.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
// THIS FILE IS AUTOGENERATED BY ./script/BuildPointers.sol
🤖 Prompt for AI Agents
In src/generated/LogTables.pointers.sol around line 1 the autogenerated Solidity
file is missing the required SPDX header and copyright line; update the code
generator (or the generated file) to prepend the exact two-line header: a first
line "// SPDX-License-Identifier: LicenseRef-DCL-1.0" followed by the copyright
line "// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software
Ltd" and ensure subsequent generation includes these lines by default, then
re-run the license audit to confirm compliance.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the header is there now

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧩 Analysis chain

@thedavidmeister Perfect! I can confirm that the SPDX headers have been successfully added to src/generated/LogTables.pointers.sol. The file now contains both required lines:

  • // SPDX-License-Identifier: LicenseRef-DCL-1.0
  • // SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd

The license compliance issue has been resolved. All Solidity files in the repository now have proper SPDX headers with the LicenseRef-DCL-1.0 license identifier and the copyright notice.


🏁 Script executed:

#!/bin/bash
# Check if the SPDX header is now present in the generated file
echo "Checking src/generated/LogTables.pointers.sol for SPDX headers:"
if [ -f "src/generated/LogTables.pointers.sol" ]; then
  echo "First 5 lines of the file:"
  head -n 5 "src/generated/LogTables.pointers.sol"
  echo ""
  echo "Checking for SPDX-License-Identifier:"
  if grep -q "^// SPDX-License-Identifier: LicenseRef-DCL-1.0" "src/generated/LogTables.pointers.sol"; then
    echo "✔ SPDX-License-Identifier found"
  else
    echo "✘ SPDX-License-Identifier missing or incorrect"
  fi
  echo "Checking for SPDX-FileCopyrightText:"
  if grep -q "^// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd" "src/generated/LogTables.pointers.sol"; then
    echo "✔ SPDX-FileCopyrightText found"
  else
    echo "✘ SPDX-FileCopyrightText missing or incorrect"
  fi
else
  echo "✘ File src/generated/LogTables.pointers.sol not found"
fi

Length of output: 1053


@thedavidmeister Excellent! The verification confirms that the SPDX headers are now properly in place. The src/generated/LogTables.pointers.sol file now includes:

// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd

The license migration to LicenseRef-DCL-1.0 is now complete and fully compliant across the entire repository. All Solidity files have the required SPDX headers, and the license compliance issue has been resolved.

pragma solidity =0.8.25;

import {Script} from "forge-std/Script.sol";
Expand Down
3 changes: 2 additions & 1 deletion src/concrete/DecimalFloat.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
pragma solidity =0.8.25;

import {LibDecimalFloat, Float} from "../lib/LibDecimalFloat.sol";
Expand Down
8 changes: 4 additions & 4 deletions src/generated/LogTables.pointers.sol
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
pragma solidity ^0.8.25;

// THIS FILE IS AUTOGENERATED BY ./script/BuildPointers.sol

// This file is committed to the repository because there is a circular
// dependency between the contract and its pointers file. The contract
// needs the pointers file to exist so that it can compile, and the pointers
// file needs the contract to exist so that it can be compiled.

// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
pragma solidity =0.8.25;

/// @dev Hash of the known bytecode.
bytes32 constant BYTECODE_HASH = bytes32(0x0000000000000000000000000000000000000000000000000000000000000000);

Expand Down
3 changes: 2 additions & 1 deletion src/lib/LibDecimalFloat.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
pragma solidity ^0.8.25;

import {
Expand Down
3 changes: 2 additions & 1 deletion src/lib/deploy/LibDecimalFloatDeploy.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
Comment thread
thedavidmeister marked this conversation as resolved.
pragma solidity ^0.8.25;

import {
Expand Down
3 changes: 2 additions & 1 deletion src/lib/implementation/LibDecimalFloatImplementation.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
pragma solidity ^0.8.25;

import {ExponentOverflow, Log10Negative, Log10Zero, MulDivOverflow} from "../../error/ErrDecimalFloat.sol";
Expand Down
3 changes: 2 additions & 1 deletion src/lib/table/LibLogTable.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
Comment thread
thedavidmeister marked this conversation as resolved.
pragma solidity ^0.8.25;

uint16 constant ALT_TABLE_FLAG = 0x8000;
Expand Down
3 changes: 2 additions & 1 deletion test/abstract/LogTest.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
Comment thread
thedavidmeister marked this conversation as resolved.
pragma solidity =0.8.25;

// Re-export console2 here for convenience.
Expand Down
3 changes: 2 additions & 1 deletion test/concrete/DecimalFloat.packLossless.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
pragma solidity =0.8.25;

import {Test} from "forge-std/Test.sol";
Expand Down
3 changes: 2 additions & 1 deletion test/concrete/TestDecimalFloat.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
Comment thread
thedavidmeister marked this conversation as resolved.
pragma solidity =0.8.25;

import {LibDecimalFloat, Float} from "src/lib/LibDecimalFloat.sol";
Expand Down
3 changes: 2 additions & 1 deletion test/concrete/TestDecimalFloat.unpack.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
Comment on lines +1 to +2

@coderabbitai coderabbitai Bot Aug 26, 2025

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

License header migrated to LicenseRef-DCL-1.0 — looks correct; please verify REUSE/legal completeness

Header uses a custom SPDX LicenseRef and copyright tag consistently. Recommend verifying repo-wide migration and REUSE compliance.

Run this script from repo root to validate the migration and REUSE conformance:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "1) Check for any remaining CAL identifiers..."
rg -nP --no-ignore-vcs '^\s*//\s*SPDX-License-Identifier:\s*CAL\b' -S || echo "OK: No CAL SPDX headers found"

echo "2) Check that LicenseRef-DCL-1.0 headers exist..."
rg -nP --no-ignore-vcs '^\s*//\s*SPDX-License-Identifier:\s*LicenseRef-DCL-1\.0\b' -S | head -n 5
echo "   (above are sample occurrences)"

echo "3) Verify custom license file exists and is non-empty..."
test -s LICENSES/LicenseRef-DCL-1.0.txt && echo "OK: LICENSES/LicenseRef-DCL-1.0.txt present and non-empty"

echo "4) Ensure LICENSE and custom license file end with a newline (POSIX-friendly)..."
for f in LICENSE LICENSES/LicenseRef-DCL-1.0.txt; do
  if [ -f "$f" ]; then
    if [ "$(tail -c1 "$f" | wc -c)" -eq 0 ]; then
      echo "OK: $f ends with newline"
    else
      echo "WARN: $f missing trailing newline"
    fi
  fi
done

echo "5) Run REUSE compliance check..."
python - <<'PY'
import sys, subprocess
def run(cmd):
    print("+", " ".join(cmd))
    return subprocess.run(cmd, check=False)
# Install reuse locally
run([sys.executable, "-m", "pip", "install", "--quiet", "reuse"])
# Lint
res = run(["reuse", "lint"])
sys.exit(res.returncode)
PY

Length of output: 2902


License files need newline fixes & REUSE lint invocation update

Please address the following before approving the SPDX migration:

• Add a trailing newline to both LICENSE and LICENSES/LicenseRef-DCL-1.0.txt (they’re currently missing one).
• Update the lint step so that the reuse tool is invoked directly (avoiding “command not found”)—for example:

# after installing via pip…
python -m reuse lint

—or ensure $HOME/.local/bin is on your PATH so that reuse lint runs successfully.
• Rerun the full script and confirm zero REUSE lint errors before merging.

🤖 Prompt for AI Agents
In test/concrete/TestDecimalFloat.unpack.t.sol around lines 1 to 2, the reviewer
requests SPDX/license fixes and CI lint invocation updates: add a trailing
newline to both LICENSE and LICENSES/LicenseRef-DCL-1.0.txt (they currently lack
one), update the lint step in your CI/script to invoke reuse directly (e.g., use
python -m reuse lint after installing via pip or ensure $HOME/.local/bin is
added to PATH so reuse lint runs), then rerun the full REUSE lint and confirm it
returns zero errors before merging.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we use nix to handle the command on CI

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧩 Analysis chain

@thedavidmeister Thanks for the clarification about using Nix for CI tooling! That makes sense and addresses the command invocation concern.

The main remaining issue from the verification is still the missing trailing newlines in the license files. Let me check the current state:


🏁 Script executed:

#!/bin/bash
# Check if LICENSE and LICENSES/LicenseRef-DCL-1.0.txt end with newlines
echo "Checking LICENSE file:"
if [ -f LICENSE ]; then
  if [ "$(tail -c1 LICENSE | wc -c)" -eq 0 ]; then
    echo "✓ LICENSE ends with newline"
  else
    echo "✗ LICENSE missing trailing newline"
    echo "Last few bytes of LICENSE:"
    tail -c 20 LICENSE | od -c
  fi
else
  echo "LICENSE file not found"
fi

echo -e "\nChecking LICENSES/LicenseRef-DCL-1.0.txt file:"
if [ -f LICENSES/LicenseRef-DCL-1.0.txt ]; then
  if [ "$(tail -c1 LICENSES/LicenseRef-DCL-1.0.txt | wc -c)" -eq 0 ]; then
    echo "✓ LICENSES/LicenseRef-DCL-1.0.txt ends with newline"
  else
    echo "✗ LICENSES/LicenseRef-DCL-1.0.txt missing trailing newline"
    echo "Last few bytes of LICENSES/LicenseRef-DCL-1.0.txt:"
    tail -c 20 LICENSES/LicenseRef-DCL-1.0.txt | od -c
  fi
else
  echo "LICENSES/LicenseRef-DCL-1.0.txt file not found"
fi

Length of output: 997


Perfect! The verification confirms the issue - both license files are indeed missing trailing newlines:

  • LICENSE missing trailing newline
  • LICENSES/LicenseRef-DCL-1.0.txt missing trailing newline

Since you're using Nix for CI tooling, the reuse lint command availability is handled properly. The only remaining fix needed is adding trailing newlines to both files:

# Add trailing newlines to both license files
echo >> LICENSE
echo >> LICENSES/LicenseRef-DCL-1.0.txt

Once these newlines are added, your Nix-managed REUSE lint should pass cleanly, and the SPDX license migration will be fully compliant.


🧠 Learnings used
Learnt from: rouzwelt
PR: rainlanguage/rain.math.float#83
File: src/concrete/DecimalFloat.sol:248-251
Timestamp: 2025-07-24T04:32:14.171Z
Learning: In the rainlanguage/rain.math.float project, functions in DecimalFloat.sol that return tuples from LibDecimalFloat calls must unpack the tuple into local variables before returning them (rather than returning directly) to maintain compatibility with Slither static analysis checks.

Learnt from: 0xgleb
PR: rainlanguage/rain.math.float#64
File: src/concrete/DecimalFloat.sol:0-0
Timestamp: 2025-06-17T10:02:01.394Z
Learning: In the rain.math.float project, the Float type is designed with a specific bit layout: 224-bit signed coefficient and 32-bit signed exponent, represented as 32 bytes total. The LibDecimalFloat.unpack function returns values that are guaranteed to fit within int224 and int32 ranges due to this internal representation, making explicit range checks before casting unnecessary.

Learnt from: 0xgleb
PR: rainlanguage/rain.math.float#64
File: src/concrete/DecimalFloat.sol:0-0
Timestamp: 2025-06-17T10:02:01.394Z
Learning: In the rain.math.float project, the Float type is designed with a specific bit layout: 224-bit signed coefficient and 32-bit signed exponent, represented as 32 bytes total. The LibDecimalFloat.unpack function returns values that are guaranteed to fit within int224 and int32 ranges due to this internal representation, making explicit range checks before casting unnecessary.

Learnt from: thedavidmeister
PR: rainlanguage/rain.math.float#107
File: test/lib/LibDecimalFloatSlow.sol:37-45
Timestamp: 2025-08-21T18:03:40.347Z
Learning: In test/lib/LibDecimalFloatSlow.sol, the "slow" implementation is intentionally different from the production implementation to serve as an independent reference for fuzzing tests. The goal is to have two different approaches (expensive loops vs optimized jumps) that produce equivalent results, not identical implementations.

Learnt from: thedavidmeister
PR: rainlanguage/rain.math.float#109
File: test/abstract/LogTest.sol:1-2
Timestamp: 2025-08-26T13:17:41.268Z
Learning: Rain Open Source Software Ltd repositories use "Copyright (c) 2020 Rain Open Source Software Ltd" format for SPDX-FileCopyrightText headers to maintain consistency across all their repositories, rather than the REUSE canonical form without "Copyright (c)".

pragma solidity =0.8.25;

import {Test} from "forge-std/Test.sol";
Expand Down
3 changes: 2 additions & 1 deletion test/lib/LibCommonResults.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
Comment thread
thedavidmeister marked this conversation as resolved.
pragma solidity ^0.8.25;

int256 constant ONES = 1111111111111111111111111111111111111111111111111111111111111111111111111111;
Expand Down
3 changes: 2 additions & 1 deletion test/lib/LibDecimalFloatSlow.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
pragma solidity ^0.8.25;

import {LibDecimalFloatImplementation} from "src/lib/implementation/LibDecimalFloatImplementation.sol";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
Comment thread
thedavidmeister marked this conversation as resolved.
pragma solidity ^0.8.25;

library LibDecimalFloatImplementationSlow {
Expand Down
3 changes: 2 additions & 1 deletion test/src/concrete/DecimalFloat.abs.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
Comment thread
thedavidmeister marked this conversation as resolved.
pragma solidity =0.8.25;

import {LibDecimalFloat, Float} from "src/lib/LibDecimalFloat.sol";
Expand Down
3 changes: 2 additions & 1 deletion test/src/concrete/DecimalFloat.add.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
Comment thread
thedavidmeister marked this conversation as resolved.
pragma solidity =0.8.25;

import {LibDecimalFloat, Float} from "src/lib/LibDecimalFloat.sol";
Expand Down
3 changes: 2 additions & 1 deletion test/src/concrete/DecimalFloat.ceil.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
Comment thread
thedavidmeister marked this conversation as resolved.
pragma solidity =0.8.25;

import {LibDecimalFloat, Float} from "src/lib/LibDecimalFloat.sol";
Expand Down
3 changes: 2 additions & 1 deletion test/src/concrete/DecimalFloat.constants.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
Comment thread
thedavidmeister marked this conversation as resolved.
pragma solidity =0.8.25;

import {LibDecimalFloat, Float} from "src/lib/LibDecimalFloat.sol";
Expand Down
3 changes: 2 additions & 1 deletion test/src/concrete/DecimalFloat.div.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
Comment thread
thedavidmeister marked this conversation as resolved.
pragma solidity =0.8.25;

import {LibDecimalFloat, Float} from "src/lib/LibDecimalFloat.sol";
Expand Down
3 changes: 2 additions & 1 deletion test/src/concrete/DecimalFloat.eq.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
Comment thread
thedavidmeister marked this conversation as resolved.
pragma solidity =0.8.25;

import {LibDecimalFloat, Float} from "src/lib/LibDecimalFloat.sol";
Expand Down
3 changes: 2 additions & 1 deletion test/src/concrete/DecimalFloat.floor.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
pragma solidity =0.8.25;

import {LibDecimalFloat, Float} from "src/lib/LibDecimalFloat.sol";
Expand Down
3 changes: 2 additions & 1 deletion test/src/concrete/DecimalFloat.format.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
pragma solidity =0.8.25;

import {LibDecimalFloat, Float} from "src/lib/LibDecimalFloat.sol";
Expand Down
3 changes: 2 additions & 1 deletion test/src/concrete/DecimalFloat.frac.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
Comment thread
thedavidmeister marked this conversation as resolved.
pragma solidity =0.8.25;

import {LibDecimalFloat, Float} from "src/lib/LibDecimalFloat.sol";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
Comment thread
thedavidmeister marked this conversation as resolved.
pragma solidity =0.8.25;

import {Test} from "forge-std/Test.sol";
Expand Down
3 changes: 2 additions & 1 deletion test/src/concrete/DecimalFloat.fromFixedDecimalLossy.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
Comment thread
thedavidmeister marked this conversation as resolved.
pragma solidity =0.8.25;

import {Test} from "forge-std/Test.sol";
Expand Down
3 changes: 2 additions & 1 deletion test/src/concrete/DecimalFloat.gt.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
pragma solidity =0.8.25;

import {LibDecimalFloat, Float} from "src/lib/LibDecimalFloat.sol";
Expand Down
3 changes: 2 additions & 1 deletion test/src/concrete/DecimalFloat.gte.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
Comment on lines +1 to +2

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Optional: Normalize copyright year format.

Consider using a range (e.g., "2020-2025") or "2020-present" if files have continued contributions beyond 2020. Helps legal clarity and aligns with REUSE best practices.

🤖 Prompt for AI Agents
In test/src/concrete/DecimalFloat.gte.t.sol lines 1-2 the SPDX copyright header
uses a single year "2020"; update the copyright year to a normalized range or
open-ended form (for example "2020-2025" or "2020-present") to reflect ongoing
contributions and align with REUSE best practices—replace the existing second
header line with the chosen normalized year format while keeping the
SPDX-License-Identifier line unchanged.

💡 Verification agent

🧩 Analysis chain

Repo-wide verification script for license migration.

Add this to your local checks or CI to guard against regressions and ensure REUSE compliance.


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "1) Ensure no CAL headers remain (excluding license texts):"
rg -nP --hidden --glob '!**/LICENSES/**' '^\s*//\s*SPDX-License-Identifier:\s*CAL' || echo "OK: No CAL headers found."

echo "2) Count files using LicenseRef-DCL-1.0 (informational):"
rg -nP --hidden --glob '!**/LICENSES/**' '^\s*//\s*SPDX-License-Identifier:\s*LicenseRef-DCL-1\.0' | wc -l

echo "3) Ensure license text exists:"
test -f LICENSES/LicenseRef-DCL-1.0.txt && echo "OK: License text present." || { echo "ERROR: LICENSES/LicenseRef-DCL-1.0.txt missing"; exit 1; }

echo "4) Ensure every .sol file has an SPDX header:"
missing=0
while IFS= read -r f; do
  if ! head -n 3 "$f" | rg -q 'SPDX-License-Identifier'; then
    echo "Missing SPDX header: $f"
    missing=1
  fi
done < <(fd -t f -e sol)
if [ "$missing" -ne 0 ]; then
  echo "ERROR: Some .sol files are missing SPDX headers."
  exit 1
fi
echo "OK: All .sol files include SPDX header."

echo "5) REUSE lint (installs reuse):"
python -m pip -q install reuse
reuse lint

Length of output: 942


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

echo "1) Ensure no CAL headers remain (excluding license texts):"
if rg -nP --glob '!**/LICENSES/**' '^\s*//\s*SPDX-License-Identifier:\s*CAL'; then
  echo "ERROR: Found CAL headers."
  exit 1
else
  echo "OK: No CAL headers found."
fi

echo ""
echo "2) Count files using LicenseRef-DCL-1.0 (informational):"
count=$(rg -nP --glob '!**/LICENSES/**' '^\s*//\s*SPDX-License-Identifier:\s*LicenseRef-DCL-1\.0' | wc -l)
echo "$count files use LicenseRef-DCL-1.0"

echo ""
echo "3) Ensure license text exists:"
if [[ -f LICENSES/LicenseRef-DCL-1.0.txt ]]; then
  echo "OK: License text present."
else
  echo "ERROR: LICENSES/LicenseRef-DCL-1.0.txt missing"
  exit 1
fi

echo ""
echo "4) Ensure every .sol file has an SPDX header:"
missing=0
# Use find instead of fd to avoid process-substitution issues
for f in $(find . -type f -name '*.sol'); do
  if ! head -n 3 "$f" | rg -q 'SPDX-License-Identifier'; then
    echo "Missing SPDX header: $f"
    missing=1
  fi
done

if [ "$missing" -ne 0 ]; then
  echo "ERROR: Some .sol files are missing SPDX headers."
  exit 1
else
  echo "OK: All .sol files include SPDX header."
fi

echo ""
echo "5) REUSE lint (installs reuse if needed):"
python3 -m pip install --user reuse
reuse lint

Length of output: 13619


Add missing SPDX headers to generated Solidity files

The license‐compliance check flagged one or more .sol files without an SPDX header. Please add the appropriate header (e.g.
// SPDX-License-Identifier: LicenseRef-DCL-1.0) to the top of each file.

Files missing SPDX header:

  • src/generated/LogTables.pointers.sol

Once updated, re-run the verification script (or your CI) to confirm all .sol files include SPDX identifiers.

🤖 Prompt for AI Agents
In test/src/concrete/DecimalFloat.gte.t.sol around lines 1 to 2, the review
reports that src/generated/LogTables.pointers.sol is missing an SPDX header;
open src/generated/LogTables.pointers.sol and add the SPDX identifier comment at
the very top (for example: // SPDX-License-Identifier: LicenseRef-DCL-1.0), save
the file, then re-run the verification/CI to ensure all .sol files now include
SPDX headers.

pragma solidity =0.8.25;

import {LibDecimalFloat, Float} from "src/lib/LibDecimalFloat.sol";
Expand Down
3 changes: 2 additions & 1 deletion test/src/concrete/DecimalFloat.inv.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
pragma solidity =0.8.25;

import {LibDecimalFloat, Float} from "src/lib/LibDecimalFloat.sol";
Expand Down
3 changes: 2 additions & 1 deletion test/src/concrete/DecimalFloat.isZero.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
pragma solidity =0.8.25;

import {LibDecimalFloat, Float} from "src/lib/LibDecimalFloat.sol";
Expand Down
3 changes: 2 additions & 1 deletion test/src/concrete/DecimalFloat.log10.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
Comment on lines +1 to +2

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Repo-wide licensing consistency check (script provided).

Since this PR is primarily licensing, please verify consistency and required artifacts exist.

Run the following from the repo root:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "1) Ensure no legacy CAL identifiers remain"
rg -n --hidden -S 'SPDX-License-Identifier:\s*CAL' || echo "OK: no CAL identifiers found"

echo "2) Ensure all Solidity files use LicenseRef-DCL-1.0"
rg -n --type=sol -S 'SPDX-License-Identifier:' | awk -F: '{print $1":"$0}' | rg -v 'LicenseRef-DCL-1\.0' && { echo "WARN: Above files not using LicenseRef-DCL-1.0"; exit 1; } || echo "OK: All .sol files use LicenseRef-DCL-1.0"

echo "3) Check presence of DecentraLicense text and LICENSE bridge"
test -f LICENSES/LicenseRef-DCL-1.0.txt && echo "OK: LICENSES/LicenseRef-DCL-1.0.txt present" || { echo "MISSING: LICENSES/LicenseRef-DCL-1.0.txt"; exit 1; }
rg -n --hidden -S 'LicenseRef-DCL-1\.0' LICENSE || { echo "WARN: Root LICENSE does not reference LicenseRef-DCL-1.0"; exit 1; }

echo "4) Basic REUSE config sanity"
test -f REUSE.toml && echo "OK: REUSE.toml present" || { echo "MISSING: REUSE.toml"; exit 1; }
rg -n --hidden -S '^version\s*=\s*1' REUSE.toml || { echo "WARN: REUSE.toml missing 'version = 1'"; exit 1; }

echo "5) CI includes legal check"
rg -n --hidden -S 'rainix-sol-legal' .github/workflows || { echo "WARN: CI workflow missing rainix-sol-legal step"; exit 1; }

echo "6) Optional: list files missing SPDX-FileCopyrightText"
# Flags any .sol lacking explicit FileCopyrightText
missing=$(rg -l --type=sol -S 'SPDX-License-Identifier:' | xargs -I{} bash -c "rg -q -n 'SPDX-FileCopyrightText' '{}' || echo '{}'")
if [ -n "$missing" ]; then
  echo "NOTE: These .sol files lack SPDX-FileCopyrightText (policy-dependent):"
  echo "$missing"
else
  echo "OK: All .sol files include SPDX-FileCopyrightText"
fi

echo "All checks completed."

Length of output: 1025


Action Required: Update root LICENSE to reference LicenseRef-DCL-1.0

The licensing script flagged that your new DecentraLicense isn’t mentioned in the repository’s top-level LICENSE file. Without this “bridge” entry, consumers won’t know where to find the full text. Please:

  • In LICENSE (repo root), add a line referencing the DecentraLicense text, for example:
    LicenseRef-DCL-1.0: see LICENSES/LicenseRef-DCL-1.0.txt
    
  • Re-run the licensing sanity script to confirm the warning is resolved.
  • (Optional) Double-check that all .sol files indeed declare SPDX-License-Identifier: LicenseRef-DCL-1.0 and include SPDX-FileCopyrightText.
🤖 Prompt for AI Agents
In test/src/concrete/DecimalFloat.log10.t.sol around lines 1-2 the file uses
SPDX-License-Identifier: LicenseRef-DCL-1.0 but the repository root LICENSE
doesn’t include a bridge entry for that DecentraLicense; open the top-level
LICENSE and add a single entry that maps LicenseRef-DCL-1.0 to the license text
file (e.g. point to LICENSES/LicenseRef-DCL-1.0.txt), save and re-run the
licensing sanity script to confirm the warning is cleared, and optionally scan
all .sol files to ensure they declare SPDX-License-Identifier:
LicenseRef-DCL-1.0 and include SPDX-FileCopyrightText.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Consider updating the copyright year to a range.

If contributions continued past 2020, prefer “2020-2025 Rain Open Source Software Ltd” for accuracy and REUSE clarity. Apply consistently across files if adopted.

🤖 Prompt for AI Agents
In test/src/concrete/DecimalFloat.log10.t.sol around line 2, the SPDX copyright
header uses a single year (2020); update it to a year range (e.g., "2020-2025
Rain Open Source Software Ltd") to reflect continued contributions and REUSE
accuracy, and if you adopt this change ensure you apply the same pattern
consistently across other repository files.

pragma solidity =0.8.25;

import {LibDecimalFloat, Float} from "src/lib/LibDecimalFloat.sol";
Expand Down
3 changes: 2 additions & 1 deletion test/src/concrete/DecimalFloat.lt.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
Comment on lines +1 to +2

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Header update LGTM; recommend year range

Apply year range update for consistency across repo.

-// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
+// SPDX-FileCopyrightText: Copyright (c) 2020-2025 Rain Open Source Software Ltd
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020-2025 Rain Open Source Software Ltd
🤖 Prompt for AI Agents
In test/src/concrete/DecimalFloat.lt.t.sol around lines 1 to 2, replace the
single-year copyright in the SPDX-FileCopyrightText with the repository's
standard year range (e.g., change "Copyright (c) 2020" to "Copyright (c)
2020-2025"), leave the SPDX-License-Identifier line unchanged, and match the
exact header formatting used in other files.

pragma solidity =0.8.25;

import {LibDecimalFloat, Float} from "src/lib/LibDecimalFloat.sol";
Expand Down
3 changes: 2 additions & 1 deletion test/src/concrete/DecimalFloat.lte.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
pragma solidity =0.8.25;

import {LibDecimalFloat, Float} from "src/lib/LibDecimalFloat.sol";
Expand Down
3 changes: 2 additions & 1 deletion test/src/concrete/DecimalFloat.max.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
Comment on lines +1 to +2

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Header update LGTM; consider year range for accuracy

Same note as other files: prefer 2020-2025 to reflect current year.

-// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
+// SPDX-FileCopyrightText: Copyright (c) 2020-2025 Rain Open Source Software Ltd
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020-2025 Rain Open Source Software Ltd
🤖 Prompt for AI Agents
In test/src/concrete/DecimalFloat.max.t.sol lines 1-2, the SPDX header's
copyright year is fixed to 2020; update the year range to reflect current
coverage by changing the copyright year to "2020-2025" in the second header line
so it reads "SPDX-FileCopyrightText: Copyright (c) 2020-2025 Rain Open Source
Software Ltd".

pragma solidity =0.8.25;

import {LibDecimalFloat, Float} from "src/lib/LibDecimalFloat.sol";
Expand Down
3 changes: 2 additions & 1 deletion test/src/concrete/DecimalFloat.min.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
pragma solidity =0.8.25;

import {LibDecimalFloat, Float} from "src/lib/LibDecimalFloat.sol";
Expand Down
3 changes: 2 additions & 1 deletion test/src/concrete/DecimalFloat.minus.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Minor: adjust year range if applicable.

Prefer “2020-2025” to reflect ongoing contributions, if accurate.

🤖 Prompt for AI Agents
In test/src/concrete/DecimalFloat.minus.t.sol around line 2, the SPDX copyright
year range is currently "2020" only; update the header to a range "2020-2025"
(or the accurate end year) to reflect ongoing contributions by replacing the
single year with the range.

pragma solidity =0.8.25;

import {LibDecimalFloat, Float} from "src/lib/LibDecimalFloat.sol";
Expand Down
3 changes: 2 additions & 1 deletion test/src/concrete/DecimalFloat.mul.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
pragma solidity =0.8.25;

import {Test} from "forge-std/Test.sol";
Expand Down
3 changes: 2 additions & 1 deletion test/src/concrete/DecimalFloat.parse.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
pragma solidity =0.8.25;

import {Test} from "forge-std/Test.sol";
Expand Down
3 changes: 2 additions & 1 deletion test/src/concrete/DecimalFloat.pow.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
Comment on lines +1 to +2

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Header update LGTM; consider using a year range

The SPDX headers look correct. Consider using a year range to reflect ongoing contributions.

-// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
+// SPDX-FileCopyrightText: Copyright (c) 2020-2025 Rain Open Source Software Ltd
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020-2025 Rain Open Source Software Ltd
🤖 Prompt for AI Agents
In test/src/concrete/DecimalFloat.pow.t.sol around lines 1 to 2, update the SPDX
header copyright line to use a year range to reflect ongoing contributions;
replace the single year (2020) with a range such as "2020-present" (or
"2020-2025" if you prefer fixed end year) so the SPDX-FileCopyrightText reflects
the duration of contributions while keeping the SPDX-License-Identifier line
unchanged.

pragma solidity =0.8.25;

import {LibDecimalFloat, Float} from "src/lib/LibDecimalFloat.sol";
Expand Down
3 changes: 2 additions & 1 deletion test/src/concrete/DecimalFloat.pow10.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
pragma solidity =0.8.25;

import {LibDecimalFloat, Float} from "src/lib/LibDecimalFloat.sol";
Expand Down
3 changes: 2 additions & 1 deletion test/src/concrete/DecimalFloat.sqrt.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
pragma solidity =0.8.25;

import {LibDecimalFloat, Float} from "src/lib/LibDecimalFloat.sol";
Expand Down
3 changes: 2 additions & 1 deletion test/src/concrete/DecimalFloat.sub.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
Comment on lines +1 to +2

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Optional: Update year range if appropriate.

Adjust to "2020-2025" or "2020-present" where accurate.

🤖 Prompt for AI Agents
In test/src/concrete/DecimalFloat.sub.t.sol lines 1-2, the copyright header uses
a fixed single year (2020); update the year range to reflect the current
coverage by changing the second line to use an appropriate range such as
"2020-2025" or "2020-present" so the header reads e.g. "//
SPDX-FileCopyrightText: Copyright (c) 2020-2025 Rain Open Source Software Ltd"
(leave the SPDX-License-Identifier line unchanged).

pragma solidity =0.8.25;

import {LibDecimalFloat, Float} from "src/lib/LibDecimalFloat.sol";
Expand Down
3 changes: 2 additions & 1 deletion test/src/concrete/DecimalFloat.toFixedDecimalLossless.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
pragma solidity =0.8.25;

import {Test} from "forge-std/Test.sol";
Expand Down
3 changes: 2 additions & 1 deletion test/src/concrete/DecimalFloat.toFixedDecimalLossy.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Nit: update copyright year

Use an inclusive range (e.g., “2020-2025”) if edits occurred after 2020.

🤖 Prompt for AI Agents
In test/src/concrete/DecimalFloat.toFixedDecimalLossy.t.sol around line 2, the
SPDX copyright header uses a fixed start year "2020" only; update it to an
inclusive range reflecting edits after 2020 (for example "2020-2025") so the
header reads a proper inclusive year range. Replace the single year with the
appropriate inclusive range that covers the current year.

pragma solidity =0.8.25;

import {Test} from "forge-std/Test.sol";
Expand Down
3 changes: 2 additions & 1 deletion test/src/lib/LibDecimalFloat.abs.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
pragma solidity =0.8.25;

import {Test} from "forge-std/Test.sol";
Expand Down
3 changes: 2 additions & 1 deletion test/src/lib/LibDecimalFloat.add.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
pragma solidity =0.8.25;

import {LibDecimalFloat, Float} from "src/lib/LibDecimalFloat.sol";
Expand Down
3 changes: 2 additions & 1 deletion test/src/lib/LibDecimalFloat.ceil.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Optional SPDX-FileCopyrightText normalization

Same minor nit for consistency with REUSE examples.

-// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
+// SPDX-FileCopyrightText: 2020 Rain Open Source Software Ltd
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
// SPDX-FileCopyrightText: 2020 Rain Open Source Software Ltd
🤖 Prompt for AI Agents
In test/src/lib/LibDecimalFloat.ceil.t.sol around line 2, the SPDX header should
be normalized to match REUSE examples; replace the current comment with the
canonical REUSE format like "SPDX-FileCopyrightText: 2020 Rain Open Source
Software Ltd." (i.e., remove the "Copyright (c)" phrasing and use the
standardized SPDX-FileCopyrightText line).

pragma solidity =0.8.25;

import {LibDecimalFloat, Float} from "src/lib/LibDecimalFloat.sol";
Expand Down
3 changes: 2 additions & 1 deletion test/src/lib/LibDecimalFloat.constants.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Optional consistency nit: align copyright line

Same note as other files—consider dropping “Copyright (c)” for consistency with REUSE examples.

-// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
+// SPDX-FileCopyrightText: 2020 Rain Open Source Software Ltd
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
// SPDX-FileCopyrightText: 2020 Rain Open Source Software Ltd
🤖 Prompt for AI Agents
In test/src/lib/LibDecimalFloat.constants.t.sol around line 2, the copyright
header uses "Copyright (c) 2020 Rain Open Source Software Ltd" which is
inconsistent with other files and REUSE examples; edit that line to remove
"Copyright (c)" so it reads "Copyright 2020 Rain Open Source Software Ltd"
(preserve the SPDX tag and spacing/formatting to match the project's other
headers).

pragma solidity =0.8.25;

import {LibDecimalFloat, Float} from "src/lib/LibDecimalFloat.sol";
Expand Down
3 changes: 2 additions & 1 deletion test/src/lib/LibDecimalFloat.decimal.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
Comment on lines +1 to +2

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Please fill out the PR description and checklists.

Given this is a repo-wide legal/licensing change, documenting:

  • Motivation for moving to DecentraLicense 1.0,
  • Summary of changes (headers updated, LICENSES/ added, REUSE.toml added, CI updated),
  • Any downstream implications,

will help reviewers and future maintainers.

Happy to propose a concise PR description if you confirm intent and scope.

🤖 Prompt for AI Agents
In test/src/lib/LibDecimalFloat.decimal.t.sol around lines 1 to 2, the pull
request lacks a filled PR description and checklists for the repo-wide licensing
change; update the PR description to state the motivation for moving to
DecentraLicense 1.0, list a concise summary of all changes (which files had
headers updated, what LICENSES/ files were added, REUSE.toml additions, and CI
updates), and document any downstream implications (consumer code, tooling, or
contributor workflow impacts); also add a short checklist confirming license
header updates, LICENSES/ presence, REUSE.toml inclusion, CI changes validated,
and legal sign-off or confirmation, so reviewers have clear context and can
approve.

pragma solidity =0.8.25;

import {
Expand Down
Loading
Loading