diff --git a/Cargo.toml b/Cargo.toml index d4ccda8e5564..d3a81bfee667 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -211,17 +211,17 @@ alloy-node-bindings = { version = "0.9.0", default-features = false } alloy-network-primitives = { version = "0.9.0", default-features = false } ## alloy-core -alloy-dyn-abi = "0.8.14" -alloy-json-abi = "0.8.14" -alloy-primitives = { version = "0.8.14", features = [ +alloy-dyn-abi = "0.8.16" +alloy-json-abi = "0.8.16" +alloy-primitives = { version = "0.8.16", features = [ "getrandom", "rand", "map-foldhash", ] } -alloy-sol-macro-expander = "0.8.14" -alloy-sol-macro-input = "0.8.14" -alloy-sol-types = "0.8.14" -syn-solidity = "0.8.14" +alloy-sol-macro-expander = "0.8.16" +alloy-sol-macro-input = "0.8.16" +alloy-sol-types = "0.8.16" +syn-solidity = "0.8.16" alloy-chains = "0.1" alloy-rlp = "0.3" diff --git a/crates/forge/tests/it/repros.rs b/crates/forge/tests/it/repros.rs index 2a47d3d3efd1..863b8b28479e 100644 --- a/crates/forge/tests/it/repros.rs +++ b/crates/forge/tests/it/repros.rs @@ -389,3 +389,6 @@ test_repro!(8971; |config| { // https://github.com/foundry-rs/foundry/issues/8639 test_repro!(8639); + +// https://github.com/foundry-rs/foundry/issues/8566 +test_repro!(8566); diff --git a/testdata/default/repros/Issue8566.t.sol b/testdata/default/repros/Issue8566.t.sol new file mode 100644 index 000000000000..f300d096f7a2 --- /dev/null +++ b/testdata/default/repros/Issue8566.t.sol @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +pragma solidity ^0.8.18; + +import "ds-test/test.sol"; +import "cheats/Vm.sol"; + +// https://github.com/foundry-rs/foundry/issues/8566 +contract Issue8566Test is DSTest { + Vm constant vm = Vm(HEVM_ADDRESS); + + function testParseJsonUint() public { + string memory json = + "{ \"1284\": { \"addRewardInfo\": { \"amount\": 74258.225772486694040708e18, \"rewardPerSec\": 0.03069536448928848133e20 } } }"; + + assertEq(74258225772486694040708, vm.parseJsonUint(json, ".1284.addRewardInfo.amount")); + assertEq(3069536448928848133, vm.parseJsonUint(json, ".1284.addRewardInfo.rewardPerSec")); + } +}