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
690 changes: 345 additions & 345 deletions .gas-snapshot

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions foundry.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
"rev": "b8f065fda83b8cd94a6b2fec8fcd911dc3b444fd"
},
"lib/rain.datacontract": {
"rev": "9c8d6e64208fb1788ba38cec942e9234725f134d"
"rev": "061bf7cd63496ccbe4f74bcd0c48715883c1c3cb"
},
"lib/rain.math.fixedpoint": {
"rev": "0a1dbfb246d903768f52687555bab62a5a3d4da3"
"rev": "1752e9fbd635901ac7eb177699681ed97290e12e"
},
"lib/rain.sol.codegen": {
"rev": "00734d24d91db3fc4aac87c0a3c885de28449f96"
"rev": "bd7993b3f6b301e5a667ff687f25b80fdda878cd"
},
"lib/rain.string": {
"rev": "85d0074c8cd1fdca3285366c15bc9b44b84ad5e9"
"rev": "0b1ca08aed6d9c06b83fe127a7d20ee7002ead28"
}
}
3 changes: 2 additions & 1 deletion foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ solc = "0.8.25"
optimizer = true
optimizer_runs = 1000000

evm_version = "paris"
evm_version = "cancun"
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🌐 Web query:

Solidity 0.8.25 Cancun EVM compatibility

💡 Result:

Short summary — Solidity 0.8.25 (released Mar 14, 2024) makes the compiler default EVM = "cancun" and enables generator/use of the new MCOPY opcode; it also adjusts transient-storage warnings. That means bytecode produced by 0.8.25 may rely on Cancun opcodes/behavior, so verify target chains support the Cancun (Dencun/Cancun) EVM before deploying. Key details and notes (selfdestruct/transient storage/tooling warnings) are in the release/docs below. [1][2][3]

Sources

  • Solidity 0.8.25 release announcement (defaults EVM to cancun; MCOPY usage; changelog). [1]
  • Solidity GitHub release listing for v0.8.25. [2]
  • Solidity docs (v0.8.25) notes on Cancun-related behavioral changes (e.g., selfdestruct) and transient-storage warnings. [3]

References
[1] Solidity blog — "Solidity 0.8.25 Release Announcement".
[2] Solidity GitHub releases — v0.8.25.
[3] Solidity docs v0.8.25 (notes on EVM >= Cancun behavior).


🏁 Script executed:

# Search for any existing Cancun references or EVM-related discussions in the repo
rg -i "cancun|evm_version|paris" --type md --type txt --type toml -B 2 -A 2

Repository: rainlanguage/rain.math.float

Length of output: 209


🏁 Script executed:

# Check git history around foundry.toml to understand the context
cd foundry.toml 2>/dev/null || true
git log --oneline -20 -- foundry.toml | head -20

Repository: rainlanguage/rain.math.float

Length of output: 98


🏁 Script executed:

# Search for any test configuration or migration notes
fd -t f -e md -e txt | xargs rg -l "evm\|cancun\|migration" 2>/dev/null | head -10

Repository: rainlanguage/rain.math.float

Length of output: 54


🏁 Script executed:

# Check the current state of foundry.toml to understand full context
cat -n foundry.toml

Repository: rainlanguage/rain.math.float

Length of output: 1004


Confirm that Cancun EVM update aligns with Solidity 0.8.25 defaults and add migration rationale to PR description.

The Solidity 0.8.25 compiler defaults to EVM target "cancun" and may generate Cancun-specific opcodes (e.g., MCOPY), making this configuration change correct and necessary. However, the PR description should explicitly document:

  • Why this coordinated update to Solidity 0.8.25 and Cancun was made
  • Confirmation that all tests pass with this configuration
  • Any deployment target requirements (e.g., mainnet/L2 support for Cancun)

This ensures future maintainers understand the intentionality of the change.


bytecode_hash = "none"
cbor_metadata = false
Expand All @@ -29,6 +29,7 @@ fs_permissions = [

remappings = [
"rain.solmem/=lib/rain.datacontract/lib/rain.solmem/src/",
"openzeppelin-contracts/=lib/rain.math.fixedpoint/lib/openzeppelin-contracts/",
]

[fuzz]
Expand Down
2 changes: 1 addition & 1 deletion lib/rain.datacontract
2 changes: 1 addition & 1 deletion lib/rain.string
6 changes: 3 additions & 3 deletions src/lib/format/LibFormatDecimalFloat.sol
Original file line number Diff line number Diff line change
Expand Up @@ -140,17 +140,17 @@ library LibFormatDecimalFloat {
}

fractionalString =
fractional == 0 ? "" : string.concat(".", fracLeadingZerosString, Strings.toString(fractional));
fractional == 0 ? "" : string.concat(".", fracLeadingZerosString, Strings.toStringSigned(fractional));
}

string memory integralString = Strings.toString(integral);
string memory integralString = Strings.toStringSigned(integral);
// scaleExponent comes from either hardcoded values or `exponent` which
// is an `int256` that was cast to `uint256` above, which can be cast
// back to `int256` without truncation.
// forge-lint: disable-next-line(unsafe-typecast)
int256 displayExponent = exponent + int256(scaleExponent);
string memory exponentString =
(displayExponent == 0 || !scientific) ? "" : string.concat("e", Strings.toString(displayExponent));
(displayExponent == 0 || !scientific) ? "" : string.concat("e", Strings.toStringSigned(displayExponent));

string memory prefix = isNeg ? "-" : "";

Expand Down