From 132bc185d3595acf5eddff993deee92c315ff4d1 Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Fri, 6 Feb 2026 21:51:42 +0400 Subject: [PATCH 01/24] rain deploy --- .gitmodules | 3 +++ lib/rain.deploy | 1 + 2 files changed, 4 insertions(+) create mode 160000 lib/rain.deploy diff --git a/.gitmodules b/.gitmodules index 54ad4b15..b90fb115 100644 --- a/.gitmodules +++ b/.gitmodules @@ -13,3 +13,6 @@ [submodule "lib/rain.math.fixedpoint"] path = lib/rain.math.fixedpoint url = https://github.com/rainlanguage/rain.math.fixedpoint +[submodule "lib/rain.deploy"] + path = lib/rain.deploy + url = https://github.com/rainlanguage/rain.deploy diff --git a/lib/rain.deploy b/lib/rain.deploy new file mode 160000 index 00000000..1120ee36 --- /dev/null +++ b/lib/rain.deploy @@ -0,0 +1 @@ +Subproject commit 1120ee36cfb74e228a4aa6fbba02b515fe14f172 From f21fdc8f05ee6ff39ccf62bcda6c3919edcb8f6b Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Fri, 6 Feb 2026 21:57:14 +0400 Subject: [PATCH 02/24] wip on new deploy --- script/Deploy.sol | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/script/Deploy.sol b/script/Deploy.sol index a7898db5..ae7415d2 100644 --- a/script/Deploy.sol +++ b/script/Deploy.sol @@ -15,21 +15,33 @@ contract Deploy is Script { function run() external { uint256 deployerPrivateKey = vm.envUint("DEPLOYMENT_KEY"); - string memory suiteString = vm.envOr("DEPLOYMENT_SUITE", string("all")); - bytes32 suite = keccak256(bytes(suiteString)); - DataContractMemoryContainer container = LibDecimalFloatDeploy.dataContract(); + LibRainDeploy.deployAndBroadcastToSupportedNetworks( + vm, + LibRainDeploy.supportedNetworks(), + deployerPrivateKey, + type(DecimalFloat).creationCode, + "src/concrete/DecimalFloat.sol:DecimalFloat", + LibDecimalFloatDeploy.ZOLTU_DEPLOYED_DECIMAL_FLOAT_ADDRESS, + LibDecimalFloatDeploy.DECIMAL_FLOAT_DATA_CONTRACT_HASH, + new address[](0) + ); - vm.startBroadcast(deployerPrivateKey); + // string memory suiteString = vm.envOr("DEPLOYMENT_SUITE", string("all")); + // bytes32 suite = keccak256(bytes(suiteString)); - if (suite == DEPLOYMENT_SUITE_ALL || suite == DEPLOYMENT_SUITE_TABLES) { - container.writeZoltu(); - } + // DataContractMemoryContainer container = LibDecimalFloatDeploy.dataContract(); - if (suite == DEPLOYMENT_SUITE_ALL || suite == DEPLOYMENT_SUITE_CONTRACT) { - LibDecimalFloatDeploy.decimalFloatZoltu(); - } + // vm.startBroadcast(deployerPrivateKey); - vm.stopBroadcast(); + // if (suite == DEPLOYMENT_SUITE_ALL || suite == DEPLOYMENT_SUITE_TABLES) { + // container.writeZoltu(); + // } + + // if (suite == DEPLOYMENT_SUITE_ALL || suite == DEPLOYMENT_SUITE_CONTRACT) { + // LibDecimalFloatDeploy.decimalFloatZoltu(); + // } + + // vm.stopBroadcast(); } } From 3ec27075096ecdaf3b97b5cb3b9b2787f160b38e Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Fri, 6 Feb 2026 22:01:47 +0400 Subject: [PATCH 03/24] artifacts yaml --- .github/workflows/manual-sol-artifacts.yaml | 59 +++++---------------- 1 file changed, 12 insertions(+), 47 deletions(-) diff --git a/.github/workflows/manual-sol-artifacts.yaml b/.github/workflows/manual-sol-artifacts.yaml index f85e854e..8b7bfb87 100644 --- a/.github/workflows/manual-sol-artifacts.yaml +++ b/.github/workflows/manual-sol-artifacts.yaml @@ -2,46 +2,11 @@ name: Manual sol artifacts on: workflow_dispatch: inputs: - network: - description: 'Network to deploy to' - required: true - type: choice - options: - - arbitrum - - arbitrum_sepolia - - avalanche - - base - - bsc - - ethereum - - flare - - mumbai - - oasis_sapphire - - polygon - - sepolia - - songbird - - suite: - description: "Suite to deploy" - required: true - type: choice - options: - - all - - deployment.suite.tables - - deployment.suite.contract jobs: deploy: runs-on: ubuntu-latest steps: - - run: | - network=${{ inputs.network }} - echo "etherscan_api_key_secret_name=CI_DEPLOY_${network^^}_ETHERSCAN_API_KEY" >> $GITHUB_ENV - echo "rpc_secret_name=CI_DEPLOY_${network^^}_RPC_URL" >> $GITHUB_ENV - echo "verify_secret_name=CI_DEPLOY_${network^^}_VERIFY" >> $GITHUB_ENV - echo "verifier_secret_name=CI_DEPLOY_${network^^}_VERIFIER" >> $GITHUB_ENV - echo "verifier_url_secret_name=CI_DEPLOY_${network^^}_VERIFIER_URL" >> $GITHUB_ENV - echo "metaboard_address_secret_name=CI_DEPLOY_${network^^}_METABOARD_ADDRESS" >> $GITHUB_ENV - - uses: actions/checkout@v4 with: submodules: recursive @@ -65,17 +30,17 @@ jobs: gc-max-store-size-linux: 1G - run: nix develop -c rainix-sol-prelude - - name: deploy to ${{ inputs.network }} - run: nix develop -c rainix-sol-artifacts + - run: nix develop -c forge selectors up --all + - run: nix develop -c forge script script/Deploy.sol:Deploy -vvvvv --slow --broadcast --verify env: - DEPLOYMENT_SUITE: ${{ inputs.suite }} - DEPLOY_BROADCAST: '1' DEPLOYMENT_KEY: ${{ github.ref == 'refs/heads/main' && secrets.PRIVATE_KEY || secrets.PRIVATE_KEY_DEV }} - ETH_RPC_URL: ${{ secrets[env.rpc_secret_name] || vars[env.rpc_secret_name] || '' }} - CI_FORK_ETH_RPC_URL: ${{ secrets.RPC_URL_ETHEREUM_FORK || vars.RPC_URL_ETHEREUM_FORK || '' }} - CI_FORK_FLARE_RPC_URL: ${{ secrets.RPC_URL_FLARE_FORK || vars.RPC_URL_FLARE_FORK || '' }} - ETHERSCAN_API_KEY: ${{ secrets[env.etherscan_api_key_secret_name] || vars[env.etherscan_api_key_secret_name] || ''}} - DEPLOY_VERIFY: ${{ secrets[env.verify_secret_name] || vars[env.verify_secret_name] || '' }} - DEPLOY_VERIFIER: ${{ secrets[env.verifier_secret_name] || vars[env.verifier_secret_name] || '' }} - DEPLOY_VERIFIER_URL: ${{ secrets[env.verifier_url_secret_name] || vars[env.verifier_url_secret_name] || '' }} - DEPLOY_METABOARD_ADDRESS: ${{ secrets[env.metaboard_address_secret_name] || vars[env.metaboard_address_secret_name] || '' }} \ No newline at end of file + + CI_DEPLOY_ARBITRUM_RPC_URL: ${{ secrets.CI_DEPLOY_ARBITRUM_RPC_URL || vars.CI_DEPLOY_ARBITRUM_RPC_URL || '' }} + CI_DEPLOY_BASE_RPC_URL: ${{ secrets.CI_DEPLOY_BASE_RPC_URL || vars.CI_DEPLOY_BASE_RPC_URL || '' }} + CI_DEPLOY_FLARE_RPC_URL: ${{ secrets.CI_DEPLOY_FLARE_RPC_URL || vars.CI_DEPLOY_FLARE_RPC_URL || '' }} + CI_DEPLOY_POLYGON_RPC_URL: ${{ secrets.CI_DEPLOY_POLYGON_RPC_URL || vars.CI_DEPLOY_POLYGON_RPC_URL || '' }} + + CI_DEPLOY_ARBITRUM_ETHERSCAN_API_KEY: ${{ secrets.CI_DEPLOY_ARBITRUM_ETHERSCAN_API_KEY || vars.CI_DEPLOY_ARBITRUM_ETHERSCAN_API_KEY || '' }} + CI_DEPLOY_BASE_ETHERSCAN_API_KEY: ${{ secrets.CI_DEPLOY_BASE_ETHERSCAN_API_KEY || vars.CI_DEPLOY_BASE_ETHERSCAN_API_KEY || '' }} + CI_DEPLOY_FLARE_ETHERSCAN_API_KEY: ${{ secrets.CI_DEPLOY_FLARE_ETHERSCAN_API_KEY || vars.CI_DEPLOY_FLARE_ETHERSCAN_API_KEY || '' }} + CI_DEPLOY_POLYGON_ETHERSCAN_API_KEY: ${{ secrets.CI_DEPLOY_POLYGON_ETHERSCAN_API_KEY || vars.CI_DEPLOY_POLYGON_ETHERSCAN_API_KEY || '' }} \ No newline at end of file From 22bbd839dd769380b87850b3078b7898d8b06e0b Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Fri, 6 Feb 2026 22:06:26 +0400 Subject: [PATCH 04/24] fix build and config --- foundry.toml | 15 ++++++++++++++- script/Deploy.sol | 2 ++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/foundry.toml b/foundry.toml index 06fc2bf5..505c7a67 100644 --- a/foundry.toml +++ b/foundry.toml @@ -30,7 +30,20 @@ fs_permissions = [ remappings = [ "rain.solmem/=lib/rain.datacontract/lib/rain.solmem/src/", "openzeppelin-contracts/=lib/rain.math.fixedpoint/lib/openzeppelin-contracts/", + "rain.deploy/=lib/rain.deploy/src/" ] [fuzz] -runs = 5096 \ No newline at end of file +runs = 5096 + +[rpc_endpoints] +arbitrum = "${CI_DEPLOY_ARBITRUM_RPC_URL}" +base = "${CI_DEPLOY_BASE_RPC_URL}" +flare = "${CI_DEPLOY_FLARE_RPC_URL}" +polygon = "${CI_DEPLOY_POLYGON_RPC_URL}" + +[etherscan] +arbitrum = { key = "${CI_DEPLOY_ARBITRUM_ETHERSCAN_API_KEY}" } +base = { key = "${CI_DEPLOY_BASE_ETHERSCAN_API_KEY}" } +flare = { key = "${CI_DEPLOY_FLARE_ETHERSCAN_API_KEY}" } +polygon = { key = "${CI_DEPLOY_POLYGON_ETHERSCAN_API_KEY}" } \ No newline at end of file diff --git a/script/Deploy.sol b/script/Deploy.sol index ae7415d2..8306780d 100644 --- a/script/Deploy.sol +++ b/script/Deploy.sol @@ -5,6 +5,8 @@ pragma solidity =0.8.25; import {Script} from "forge-std/Script.sol"; import {DataContractMemoryContainer, LibDataContract} from "rain.datacontract/lib/LibDataContract.sol"; import {LibDecimalFloatDeploy} from "../src/lib/deploy/LibDecimalFloatDeploy.sol"; +import {LibRainDeploy} from "rain.deploy/lib/LibRainDeploy.sol"; +import {DecimalFloat} from "../src/concrete/DecimalFloat.sol"; bytes32 constant DEPLOYMENT_SUITE_ALL = keccak256("all"); bytes32 constant DEPLOYMENT_SUITE_TABLES = keccak256("deployment.suite.tables"); From 32d88ce0e82d75c42516959c3c2081414abc34f8 Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Fri, 6 Feb 2026 22:23:41 +0400 Subject: [PATCH 05/24] wip on deployment --- script/Deploy.sol | 2 +- src/lib/deploy/LibDecimalFloatDeploy.sol | 18 +++++-- .../lib/deploy/LibDecimalFloatDeploy.t.sol | 50 ++++++++++++------- 3 files changed, 48 insertions(+), 22 deletions(-) diff --git a/script/Deploy.sol b/script/Deploy.sol index 8306780d..77dca52b 100644 --- a/script/Deploy.sol +++ b/script/Deploy.sol @@ -25,7 +25,7 @@ contract Deploy is Script { type(DecimalFloat).creationCode, "src/concrete/DecimalFloat.sol:DecimalFloat", LibDecimalFloatDeploy.ZOLTU_DEPLOYED_DECIMAL_FLOAT_ADDRESS, - LibDecimalFloatDeploy.DECIMAL_FLOAT_DATA_CONTRACT_HASH, + LibDecimalFloatDeploy.DECIMAL_FLOAT_CONTRACT_HASH, new address[](0) ); diff --git a/src/lib/deploy/LibDecimalFloatDeploy.sol b/src/lib/deploy/LibDecimalFloatDeploy.sol index eb73668c..c2fd8baf 100644 --- a/src/lib/deploy/LibDecimalFloatDeploy.sol +++ b/src/lib/deploy/LibDecimalFloatDeploy.sol @@ -17,6 +17,10 @@ import {LOG_TABLE_DISAMBIGUATOR} from "../table/LibLogTable.sol"; import {WriteError} from "../../error/ErrDecimalFloat.sol"; library LibDecimalFloatDeploy { + /// Thrown when failing to ensure the DecimalFloat contract is deployed at + /// the expected address or the codehash does not match the expected value. + error DecimalFloatNotDeployed(); + /// @dev Zoltu deterministic deployment proxy address. /// https://github.com/Zoltu/deterministic-deployment-proxy?tab=readme-ov-file#proxy-address address constant ZOLTU_PROXY_ADDRESS = 0x7A0D94F55792C434d74a40883C6ed8545E406D12; @@ -24,12 +28,20 @@ library LibDecimalFloatDeploy { /// @dev Address of the DecimalFloat contract deployed via Zoltu's /// deterministic deployment proxy. /// This address is the same across all EVM-compatible networks. - address constant ZOLTU_DEPLOYED_DECIMAL_FLOAT_ADDRESS = address(0x6421E8a23cdEe2E6E579b2cDebc8C2A514843593); + address constant ZOLTU_DEPLOYED_DECIMAL_FLOAT_ADDRESS = address(0x12A66eFbE556e38308A17e34cC86f21DcA1CDB73); /// @dev The expected codehash of the DecimalFloat contract deployed via /// Zoltu's deterministic deployment proxy. - bytes32 constant DECIMAL_FLOAT_DATA_CONTRACT_HASH = - 0x2573004ac3a9ee7fc8d73654d76386f1b6b99e34cdf86a689c4691e47143420f; + bytes32 constant DECIMAL_FLOAT_CONTRACT_HASH = 0x705cdef2ed9538557152f86cd0988c748e0bd647a49df00b3e4f100c3544a583; + + function ensureDeployed() internal view { + if ( + address(ZOLTU_DEPLOYED_DECIMAL_FLOAT_ADDRESS).code.length == 0 + || address(ZOLTU_DEPLOYED_DECIMAL_FLOAT_ADDRESS).codehash != DECIMAL_FLOAT_CONTRACT_HASH + ) { + revert DecimalFloatNotDeployed(); + } + } /// Combines all log and anti-log tables into a single bytes array for /// deployment. These are using packed encoding to minimize size and remove diff --git a/test/src/lib/deploy/LibDecimalFloatDeploy.t.sol b/test/src/lib/deploy/LibDecimalFloatDeploy.t.sol index b5e2c93f..492dc6b3 100644 --- a/test/src/lib/deploy/LibDecimalFloatDeploy.t.sol +++ b/test/src/lib/deploy/LibDecimalFloatDeploy.t.sol @@ -3,10 +3,24 @@ pragma solidity =0.8.25; import {Test, console2} from "forge-std/Test.sol"; - +import {LibRainDeploy} from "rain.deploy/lib/LibRainDeploy.sol"; import {LibDecimalFloatDeploy, DecimalFloat} from "src/lib/deploy/LibDecimalFloatDeploy.sol"; contract LibDecimalFloatDeployTest is Test { + function testDeployAddress() external { + vm.createSelectFork(vm.envString("CI_FORK_ETH_RPC_URL")); + address deployedAddress = LibRainDeploy.deployZoltu(type(DecimalFloat).creationCode); + assertEq(deployedAddress, LibDecimalFloatDeploy.ZOLTU_DEPLOYED_DECIMAL_FLOAT_ADDRESS); + + LibDecimalFloatDeploy.ensureDeployed(); + } + + function testExpectedCodeHash() external { + DecimalFloat decimalFloat = new DecimalFloat(); + + assertEq(address(decimalFloat).codehash, LibDecimalFloatDeploy.DECIMAL_FLOAT_CONTRACT_HASH); + } + function testDecimalFloatZoltu() external { vm.createSelectFork(vm.envString("CI_FORK_ETH_RPC_URL")); @@ -18,21 +32,21 @@ contract LibDecimalFloatDeployTest is Test { assertEq(address(deployedZoltu).codehash, address(deployedDirect).codehash); } - function testDecimalFloatZoltuProd() external { - string[] memory forkRpcUrls = new string[](3); - forkRpcUrls[0] = "CI_FORK_FLARE_RPC_URL"; - forkRpcUrls[1] = "CI_FORK_BASE_RPC_URL"; - forkRpcUrls[2] = "CI_FORK_ARB_RPC_URL"; - - for (uint256 i = 0; i < forkRpcUrls.length; i++) { - console2.log("Testing fork:", forkRpcUrls[i]); - vm.createSelectFork(vm.envString(forkRpcUrls[i])); - - assertEq( - LibDecimalFloatDeploy.DECIMAL_FLOAT_DATA_CONTRACT_HASH, - LibDecimalFloatDeploy.ZOLTU_DEPLOYED_DECIMAL_FLOAT_ADDRESS.codehash, - forkRpcUrls[i] - ); - } - } + // function testDecimalFloatZoltuProd() external { + // string[] memory forkRpcUrls = new string[](3); + // forkRpcUrls[0] = "CI_FORK_FLARE_RPC_URL"; + // forkRpcUrls[1] = "CI_FORK_BASE_RPC_URL"; + // forkRpcUrls[2] = "CI_FORK_ARB_RPC_URL"; + + // for (uint256 i = 0; i < forkRpcUrls.length; i++) { + // console2.log("Testing fork:", forkRpcUrls[i]); + // vm.createSelectFork(vm.envString(forkRpcUrls[i])); + + // assertEq( + // LibDecimalFloatDeploy.DECIMAL_FLOAT_DATA_CONTRACT_HASH, + // LibDecimalFloatDeploy.ZOLTU_DEPLOYED_DECIMAL_FLOAT_ADDRESS.codehash, + // forkRpcUrls[i] + // ); + // } + // } } From 0a7e2b35a2ca4f98071299774f8b4cd035d6b800 Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Sun, 8 Feb 2026 15:01:53 +0400 Subject: [PATCH 06/24] update data contract --- .gitmodules | 2 +- foundry.lock | 5 ++++- lib/rain.datacontract | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.gitmodules b/.gitmodules index b90fb115..e2daefa6 100644 --- a/.gitmodules +++ b/.gitmodules @@ -6,7 +6,7 @@ url = https://github.com/rainlanguage/rain.sol.codegen [submodule "lib/rain.datacontract"] path = lib/rain.datacontract - url = https://github.com/rainlanguage/rain.datacontract + url = https://github.com/lib/rain.datacontract [submodule "lib/rain.string"] path = lib/rain.string url = https://github.com/rainlanguage/rain.string diff --git a/foundry.lock b/foundry.lock index b5bf1bd9..1ad08811 100644 --- a/foundry.lock +++ b/foundry.lock @@ -3,7 +3,10 @@ "rev": "1801b0541f4fda118a10798fd3486bb7051c5dd6" }, "lib/rain.datacontract": { - "rev": "82590300cf768b6c5efc8b92c64b7f402bd34bee" + "rev": "3bff30782e408386f73b9353c5122e2e0ab24df2" + }, + "lib/rain.deploy": { + "rev": "1120ee36cfb74e228a4aa6fbba02b515fe14f172" }, "lib/rain.math.fixedpoint": { "rev": "8308cbb6da0e231c6f3437f1861e66eff7ea2b00" diff --git a/lib/rain.datacontract b/lib/rain.datacontract index 82590300..3bff3078 160000 --- a/lib/rain.datacontract +++ b/lib/rain.datacontract @@ -1 +1 @@ -Subproject commit 82590300cf768b6c5efc8b92c64b7f402bd34bee +Subproject commit 3bff30782e408386f73b9353c5122e2e0ab24df2 From 6c0de3fda920007326e2d1ed4b7172de979e4ccc Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Sun, 8 Feb 2026 15:16:20 +0400 Subject: [PATCH 07/24] log tables deploy --- script/Deploy.sol | 15 +++++++- src/lib/deploy/LibDecimalFloatDeploy.sol | 36 ++----------------- test/abstract/LogTest.sol | 15 ++++++-- .../lib/deploy/LibDecimalFloatDeploy.t.sol | 14 ++++---- 4 files changed, 37 insertions(+), 43 deletions(-) diff --git a/script/Deploy.sol b/script/Deploy.sol index 77dca52b..c8b09ebb 100644 --- a/script/Deploy.sol +++ b/script/Deploy.sol @@ -18,6 +18,19 @@ contract Deploy is Script { function run() external { uint256 deployerPrivateKey = vm.envUint("DEPLOYMENT_KEY"); + LibRainDeploy.deployAndBroadcastToSupportedNetworks( + vm, + LibRainDeploy.supportedNetworks(), + deployerPrivateKey, + LibDecimalFloatDeploy.combinedTables(), + "", + LibDecimalFloatDeploy.ZOLTU_DEPLOYED_LOG_TABLES_ADDRESS, + LibDecimalFloatDeploy.LOG_TABLES_DATA_CONTRACT_HASH, + new address[](0) + ); + + address[] memory decimalFloatDependencies = new address[](1); + decimalFloatDependencies[0] = LibDecimalFloatDeploy.ZOLTU_DEPLOYED_LOG_TABLES_ADDRESS; LibRainDeploy.deployAndBroadcastToSupportedNetworks( vm, LibRainDeploy.supportedNetworks(), @@ -26,7 +39,7 @@ contract Deploy is Script { "src/concrete/DecimalFloat.sol:DecimalFloat", LibDecimalFloatDeploy.ZOLTU_DEPLOYED_DECIMAL_FLOAT_ADDRESS, LibDecimalFloatDeploy.DECIMAL_FLOAT_CONTRACT_HASH, - new address[](0) + decimalFloatDependencies ); // string memory suiteString = vm.envOr("DEPLOYMENT_SUITE", string("all")); diff --git a/src/lib/deploy/LibDecimalFloatDeploy.sol b/src/lib/deploy/LibDecimalFloatDeploy.sol index c2fd8baf..e748c6a2 100644 --- a/src/lib/deploy/LibDecimalFloatDeploy.sol +++ b/src/lib/deploy/LibDecimalFloatDeploy.sol @@ -21,9 +21,9 @@ library LibDecimalFloatDeploy { /// the expected address or the codehash does not match the expected value. error DecimalFloatNotDeployed(); - /// @dev Zoltu deterministic deployment proxy address. - /// https://github.com/Zoltu/deterministic-deployment-proxy?tab=readme-ov-file#proxy-address - address constant ZOLTU_PROXY_ADDRESS = 0x7A0D94F55792C434d74a40883C6ed8545E406D12; + address constant ZOLTU_DEPLOYED_LOG_TABLES_ADDRESS = address(0); + + bytes32 constant LOG_TABLES_DATA_CONTRACT_HASH = 0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890; /// @dev Address of the DecimalFloat contract deployed via Zoltu's /// deterministic deployment proxy. @@ -57,34 +57,4 @@ library LibDecimalFloatDeploy { LOG_TABLE_DISAMBIGUATOR ); } - - /// Creates a DataContractMemoryContainer containing all log and anti-log - /// tables. - /// @return dataContract The DataContractMemoryContainer containing the - /// tables. - function dataContract() internal pure returns (DataContractMemoryContainer) { - bytes memory tables = combinedTables(); - (DataContractMemoryContainer container, Pointer pointer) = LibDataContract.newContainer(tables.length); - LibMemCpy.unsafeCopyBytesTo(LibBytes.dataPointer(tables), pointer, tables.length); - return container; - } - - /// Deploys a DecimalFloat contract using Zoltu's deterministic deployment - /// proxy contract. This allows the concrete DecimalFloat contract to be - /// found at a predictable location regardless of the network. - /// Reverts with WriteError if deployment fails. - /// @return deployedAddress The address of the deployed DecimalFloat - /// contract. - function decimalFloatZoltu() internal returns (DecimalFloat deployedAddress) { - //slither-disable-next-line too-many-digits - bytes memory code = type(DecimalFloat).creationCode; - bool success; - address zoltuProxy = ZOLTU_PROXY_ADDRESS; - assembly ("memory-safe") { - mstore(0, 0) - success := call(gas(), zoltuProxy, 0, add(code, 0x20), mload(code), 12, 20) - deployedAddress := mload(0) - } - if (address(deployedAddress) == address(0) || !success) revert WriteError(); - } } diff --git a/test/abstract/LogTest.sol b/test/abstract/LogTest.sol index 0e06e637..48e0102c 100644 --- a/test/abstract/LogTest.sol +++ b/test/abstract/LogTest.sol @@ -15,8 +15,19 @@ abstract contract LogTest is Test { function logTables() internal returns (address) { if (sTables == address(0)) { - DataContractMemoryContainer container = LibDecimalFloatDeploy.dataContract(); - sTables = container.write(); + bytes memory tables = LibDecimalFloatDeploy.combinedTables(); + bytes memory creationCode = LibDataContract.contractCreationCode(tables); + address tablesAddress; + assembly ("memory-safe") { + tablesAddress := create(0, add(creationCode, 0x20), mload(creationCode)) + } + assertTrue(tablesAddress != address(0), "Failed to deploy tables"); + assertEq( + tablesAddress.codehash, + LibDecimalFloatDeploy.LOG_TABLES_DATA_CONTRACT_HASH, + "Deployed tables codehash does not match expected value" + ); + sTables = tablesAddress; } return sTables; } diff --git a/test/src/lib/deploy/LibDecimalFloatDeploy.t.sol b/test/src/lib/deploy/LibDecimalFloatDeploy.t.sol index 492dc6b3..64a7c756 100644 --- a/test/src/lib/deploy/LibDecimalFloatDeploy.t.sol +++ b/test/src/lib/deploy/LibDecimalFloatDeploy.t.sol @@ -21,16 +21,16 @@ contract LibDecimalFloatDeployTest is Test { assertEq(address(decimalFloat).codehash, LibDecimalFloatDeploy.DECIMAL_FLOAT_CONTRACT_HASH); } - function testDecimalFloatZoltu() external { - vm.createSelectFork(vm.envString("CI_FORK_ETH_RPC_URL")); + // function testDecimalFloatZoltu() external { + // vm.createSelectFork(vm.envString("CI_FORK_ETH_RPC_URL")); - DecimalFloat deployedZoltu = LibDecimalFloatDeploy.decimalFloatZoltu(); - assertTrue(address(deployedZoltu) != address(0)); + // DecimalFloat deployedZoltu = LibDecimalFloatDeploy.decimalFloatZoltu(); + // assertTrue(address(deployedZoltu) != address(0)); - DecimalFloat deployedDirect = new DecimalFloat(); + // DecimalFloat deployedDirect = new DecimalFloat(); - assertEq(address(deployedZoltu).codehash, address(deployedDirect).codehash); - } + // assertEq(address(deployedZoltu).codehash, address(deployedDirect).codehash); + // } // function testDecimalFloatZoltuProd() external { // string[] memory forkRpcUrls = new string[](3); From 795fe19b4cbc9ac45eac1c04af808a945ee28ffa Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Sun, 8 Feb 2026 15:21:48 +0400 Subject: [PATCH 08/24] gitmodules --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index e2daefa6..b90fb115 100644 --- a/.gitmodules +++ b/.gitmodules @@ -6,7 +6,7 @@ url = https://github.com/rainlanguage/rain.sol.codegen [submodule "lib/rain.datacontract"] path = lib/rain.datacontract - url = https://github.com/lib/rain.datacontract + url = https://github.com/rainlanguage/rain.datacontract [submodule "lib/rain.string"] path = lib/rain.string url = https://github.com/rainlanguage/rain.string From 8355484cea3c3e0c0a56789e3fd36d67f98b478b Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Sun, 8 Feb 2026 15:53:58 +0400 Subject: [PATCH 09/24] fix log tables address --- src/lib/deploy/LibDecimalFloatDeploy.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/deploy/LibDecimalFloatDeploy.sol b/src/lib/deploy/LibDecimalFloatDeploy.sol index e748c6a2..02cc09f6 100644 --- a/src/lib/deploy/LibDecimalFloatDeploy.sol +++ b/src/lib/deploy/LibDecimalFloatDeploy.sol @@ -21,7 +21,7 @@ library LibDecimalFloatDeploy { /// the expected address or the codehash does not match the expected value. error DecimalFloatNotDeployed(); - address constant ZOLTU_DEPLOYED_LOG_TABLES_ADDRESS = address(0); + address constant ZOLTU_DEPLOYED_LOG_TABLES_ADDRESS = address(0xA43E75ee92c2949B95c8a79f427958cC0B05473e); bytes32 constant LOG_TABLES_DATA_CONTRACT_HASH = 0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890; From eba283d06be05c90a127740c850f2ba4b6a062c9 Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Sun, 8 Feb 2026 16:12:56 +0400 Subject: [PATCH 10/24] rain deploy dep --- foundry.lock | 2 +- lib/rain.deploy | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/foundry.lock b/foundry.lock index 1ad08811..7c0b6880 100644 --- a/foundry.lock +++ b/foundry.lock @@ -6,7 +6,7 @@ "rev": "3bff30782e408386f73b9353c5122e2e0ab24df2" }, "lib/rain.deploy": { - "rev": "1120ee36cfb74e228a4aa6fbba02b515fe14f172" + "rev": "1af8ca2a981c2f67844f343e224f4c7b1969de1c" }, "lib/rain.math.fixedpoint": { "rev": "8308cbb6da0e231c6f3437f1861e66eff7ea2b00" diff --git a/lib/rain.deploy b/lib/rain.deploy index 1120ee36..1af8ca2a 160000 --- a/lib/rain.deploy +++ b/lib/rain.deploy @@ -1 +1 @@ -Subproject commit 1120ee36cfb74e228a4aa6fbba02b515fe14f172 +Subproject commit 1af8ca2a981c2f67844f343e224f4c7b1969de1c From 216e4acf2a22e7fc8b5b3605651ea3d5b374f5a0 Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Sun, 8 Feb 2026 16:19:14 +0400 Subject: [PATCH 11/24] codehash for log tables --- src/lib/deploy/LibDecimalFloatDeploy.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/deploy/LibDecimalFloatDeploy.sol b/src/lib/deploy/LibDecimalFloatDeploy.sol index 02cc09f6..ae98fb85 100644 --- a/src/lib/deploy/LibDecimalFloatDeploy.sol +++ b/src/lib/deploy/LibDecimalFloatDeploy.sol @@ -23,7 +23,7 @@ library LibDecimalFloatDeploy { address constant ZOLTU_DEPLOYED_LOG_TABLES_ADDRESS = address(0xA43E75ee92c2949B95c8a79f427958cC0B05473e); - bytes32 constant LOG_TABLES_DATA_CONTRACT_HASH = 0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890; + bytes32 constant LOG_TABLES_DATA_CONTRACT_HASH = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; /// @dev Address of the DecimalFloat contract deployed via Zoltu's /// deterministic deployment proxy. From 19137e8f81414ad76282cc932ad5c6af305046e6 Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Sun, 8 Feb 2026 16:42:29 +0400 Subject: [PATCH 12/24] datacontract to fix tables deploy --- script/Deploy.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/Deploy.sol b/script/Deploy.sol index c8b09ebb..7fef6e53 100644 --- a/script/Deploy.sol +++ b/script/Deploy.sol @@ -22,7 +22,7 @@ contract Deploy is Script { vm, LibRainDeploy.supportedNetworks(), deployerPrivateKey, - LibDecimalFloatDeploy.combinedTables(), + LibDataContract.contractCreationCode(LibDecimalFloatDeploy.combinedTables()), "", LibDecimalFloatDeploy.ZOLTU_DEPLOYED_LOG_TABLES_ADDRESS, LibDecimalFloatDeploy.LOG_TABLES_DATA_CONTRACT_HASH, From f02b9b105d874e7d135fb42ff81b5481abbeae2e Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Sun, 8 Feb 2026 16:47:30 +0400 Subject: [PATCH 13/24] update log tables address --- src/lib/deploy/LibDecimalFloatDeploy.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/deploy/LibDecimalFloatDeploy.sol b/src/lib/deploy/LibDecimalFloatDeploy.sol index ae98fb85..ebece8f2 100644 --- a/src/lib/deploy/LibDecimalFloatDeploy.sol +++ b/src/lib/deploy/LibDecimalFloatDeploy.sol @@ -21,7 +21,7 @@ library LibDecimalFloatDeploy { /// the expected address or the codehash does not match the expected value. error DecimalFloatNotDeployed(); - address constant ZOLTU_DEPLOYED_LOG_TABLES_ADDRESS = address(0xA43E75ee92c2949B95c8a79f427958cC0B05473e); + address constant ZOLTU_DEPLOYED_LOG_TABLES_ADDRESS = address(0xc51a14251b0dcF0ae24A96b7153991378938f5F5); bytes32 constant LOG_TABLES_DATA_CONTRACT_HASH = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; From a9c3d983ad69a3a6dfeb8b7027fc162062624527 Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Sun, 8 Feb 2026 16:52:32 +0400 Subject: [PATCH 14/24] tables codehash --- src/lib/deploy/LibDecimalFloatDeploy.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/deploy/LibDecimalFloatDeploy.sol b/src/lib/deploy/LibDecimalFloatDeploy.sol index ebece8f2..b6b566dc 100644 --- a/src/lib/deploy/LibDecimalFloatDeploy.sol +++ b/src/lib/deploy/LibDecimalFloatDeploy.sol @@ -23,7 +23,7 @@ library LibDecimalFloatDeploy { address constant ZOLTU_DEPLOYED_LOG_TABLES_ADDRESS = address(0xc51a14251b0dcF0ae24A96b7153991378938f5F5); - bytes32 constant LOG_TABLES_DATA_CONTRACT_HASH = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; + bytes32 constant LOG_TABLES_DATA_CONTRACT_HASH = 0x2573004ac3a9ee7fc8d73654d76386f1b6b99e34cdf86a689c4691e47143420f; /// @dev Address of the DecimalFloat contract deployed via Zoltu's /// deterministic deployment proxy. From 612f45de1b6d0d1392d9d628c50360aff0ec86b2 Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Sun, 8 Feb 2026 18:07:05 +0400 Subject: [PATCH 15/24] incremental deployment of deps --- script/Deploy.sol | 58 ++++++++++++++++++++++++++++------------------- 1 file changed, 35 insertions(+), 23 deletions(-) diff --git a/script/Deploy.sol b/script/Deploy.sol index 7fef6e53..f9aad172 100644 --- a/script/Deploy.sol +++ b/script/Deploy.sol @@ -18,29 +18,41 @@ contract Deploy is Script { function run() external { uint256 deployerPrivateKey = vm.envUint("DEPLOYMENT_KEY"); - LibRainDeploy.deployAndBroadcastToSupportedNetworks( - vm, - LibRainDeploy.supportedNetworks(), - deployerPrivateKey, - LibDataContract.contractCreationCode(LibDecimalFloatDeploy.combinedTables()), - "", - LibDecimalFloatDeploy.ZOLTU_DEPLOYED_LOG_TABLES_ADDRESS, - LibDecimalFloatDeploy.LOG_TABLES_DATA_CONTRACT_HASH, - new address[](0) - ); - - address[] memory decimalFloatDependencies = new address[](1); - decimalFloatDependencies[0] = LibDecimalFloatDeploy.ZOLTU_DEPLOYED_LOG_TABLES_ADDRESS; - LibRainDeploy.deployAndBroadcastToSupportedNetworks( - vm, - LibRainDeploy.supportedNetworks(), - deployerPrivateKey, - type(DecimalFloat).creationCode, - "src/concrete/DecimalFloat.sol:DecimalFloat", - LibDecimalFloatDeploy.ZOLTU_DEPLOYED_DECIMAL_FLOAT_ADDRESS, - LibDecimalFloatDeploy.DECIMAL_FLOAT_CONTRACT_HASH, - decimalFloatDependencies - ); + if ( + LibDecimalFloatDeploy.ZOLTU_DEPLOYED_LOG_TABLES_ADDRESS.code.length == 0 + || LibDecimalFloatDeploy.ZOLTU_DEPLOYED_LOG_TABLES_ADDRESS.codehash + != LibDecimalFloatDeploy.LOG_TABLES_DATA_CONTRACT_HASH + ) { + console2.log("Log tables not deployed, deploying now..."); + LibRainDeploy.deployAndBroadcastToSupportedNetworks( + vm, + LibRainDeploy.supportedNetworks(), + deployerPrivateKey, + LibDataContract.contractCreationCode(LibDecimalFloatDeploy.combinedTables()), + "", + LibDecimalFloatDeploy.ZOLTU_DEPLOYED_LOG_TABLES_ADDRESS, + LibDecimalFloatDeploy.LOG_TABLES_DATA_CONTRACT_HASH, + new address[](0) + ); + + console2.log("Log tables deployed successfully."); + console2.log( + "Please reun the deployment script to deploy the DecimalFloat contract now that the dependency is in place." + ); + } else { + address[] memory decimalFloatDependencies = new address[](1); + decimalFloatDependencies[0] = LibDecimalFloatDeploy.ZOLTU_DEPLOYED_LOG_TABLES_ADDRESS; + LibRainDeploy.deployAndBroadcastToSupportedNetworks( + vm, + LibRainDeploy.supportedNetworks(), + deployerPrivateKey, + type(DecimalFloat).creationCode, + "src/concrete/DecimalFloat.sol:DecimalFloat", + LibDecimalFloatDeploy.ZOLTU_DEPLOYED_DECIMAL_FLOAT_ADDRESS, + LibDecimalFloatDeploy.DECIMAL_FLOAT_CONTRACT_HASH, + decimalFloatDependencies + ); + } // string memory suiteString = vm.envOr("DEPLOYMENT_SUITE", string("all")); // bytes32 suite = keccak256(bytes(suiteString)); From db6669fd80df76e97b8e65cdf11c68c9af98ff6e Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Sun, 8 Feb 2026 18:11:11 +0400 Subject: [PATCH 16/24] build fix --- script/Deploy.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/Deploy.sol b/script/Deploy.sol index f9aad172..62ca0df2 100644 --- a/script/Deploy.sol +++ b/script/Deploy.sol @@ -2,7 +2,7 @@ // SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd pragma solidity =0.8.25; -import {Script} from "forge-std/Script.sol"; +import {Script, console2} from "forge-std/Script.sol"; import {DataContractMemoryContainer, LibDataContract} from "rain.datacontract/lib/LibDataContract.sol"; import {LibDecimalFloatDeploy} from "../src/lib/deploy/LibDecimalFloatDeploy.sol"; import {LibRainDeploy} from "rain.deploy/lib/LibRainDeploy.sol"; From b7ddb0f137f0c6ea54eafe19f69dd327e12036ba Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Sun, 8 Feb 2026 18:40:51 +0400 Subject: [PATCH 17/24] debug ci --- script/Deploy.sol | 2 ++ test/src/lib/deploy/LibDecimalFloatDeploy.t.sol | 14 +++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/script/Deploy.sol b/script/Deploy.sol index 62ca0df2..a6c9846d 100644 --- a/script/Deploy.sol +++ b/script/Deploy.sol @@ -40,6 +40,8 @@ contract Deploy is Script { "Please reun the deployment script to deploy the DecimalFloat contract now that the dependency is in place." ); } else { + console2.log("Log tables already deployed, proceeding to deploy DecimalFloat..."); + address[] memory decimalFloatDependencies = new address[](1); decimalFloatDependencies[0] = LibDecimalFloatDeploy.ZOLTU_DEPLOYED_LOG_TABLES_ADDRESS; LibRainDeploy.deployAndBroadcastToSupportedNetworks( diff --git a/test/src/lib/deploy/LibDecimalFloatDeploy.t.sol b/test/src/lib/deploy/LibDecimalFloatDeploy.t.sol index 64a7c756..c7f703ae 100644 --- a/test/src/lib/deploy/LibDecimalFloatDeploy.t.sol +++ b/test/src/lib/deploy/LibDecimalFloatDeploy.t.sol @@ -5,6 +5,7 @@ pragma solidity =0.8.25; import {Test, console2} from "forge-std/Test.sol"; import {LibRainDeploy} from "rain.deploy/lib/LibRainDeploy.sol"; import {LibDecimalFloatDeploy, DecimalFloat} from "src/lib/deploy/LibDecimalFloatDeploy.sol"; +import {LibDataContract} from "rain.datacontract/lib/LibDataContract.sol"; contract LibDecimalFloatDeployTest is Test { function testDeployAddress() external { @@ -15,12 +16,23 @@ contract LibDecimalFloatDeployTest is Test { LibDecimalFloatDeploy.ensureDeployed(); } - function testExpectedCodeHash() external { + function testExpectedCodeHashDecimalFloat() external { DecimalFloat decimalFloat = new DecimalFloat(); assertEq(address(decimalFloat).codehash, LibDecimalFloatDeploy.DECIMAL_FLOAT_CONTRACT_HASH); } + function testExpectedCodeHashLogTables() external { + bytes memory logTables = LibDataContract.contractCreationCode(LibDecimalFloatDeploy.combinedTables()); + + address deployedAddress; + assembly ("memory-safe") { + deployedAddress := create(0, add(logTables, 0x20), mload(logTables)) + } + + assertEq(deployedAddress.codehash, LibDecimalFloatDeploy.LOG_TABLES_DATA_CONTRACT_HASH); + } + // function testDecimalFloatZoltu() external { // vm.createSelectFork(vm.envString("CI_FORK_ETH_RPC_URL")); From 011f643ecb9cfcd6b1d466ee4caee5c8e0f44274 Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Sun, 8 Feb 2026 18:54:32 +0400 Subject: [PATCH 18/24] debug ci --- script/Deploy.sol | 4 +++- test/src/lib/deploy/LibDecimalFloatDeploy.t.sol | 11 +++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/script/Deploy.sol b/script/Deploy.sol index a6c9846d..70ea7d8e 100644 --- a/script/Deploy.sol +++ b/script/Deploy.sol @@ -23,6 +23,8 @@ contract Deploy is Script { || LibDecimalFloatDeploy.ZOLTU_DEPLOYED_LOG_TABLES_ADDRESS.codehash != LibDecimalFloatDeploy.LOG_TABLES_DATA_CONTRACT_HASH ) { + console2.logBytes32(LibDecimalFloatDeploy.ZOLTU_DEPLOYED_LOG_TABLES_ADDRESS.codehash); + console2.logBytes32(LibDecimalFloatDeploy.LOG_TABLES_DATA_CONTRACT_HASH); console2.log("Log tables not deployed, deploying now..."); LibRainDeploy.deployAndBroadcastToSupportedNetworks( vm, @@ -37,7 +39,7 @@ contract Deploy is Script { console2.log("Log tables deployed successfully."); console2.log( - "Please reun the deployment script to deploy the DecimalFloat contract now that the dependency is in place." + "Please rerun the deployment script to deploy the DecimalFloat contract now that the dependency is in place." ); } else { console2.log("Log tables already deployed, proceeding to deploy DecimalFloat..."); diff --git a/test/src/lib/deploy/LibDecimalFloatDeploy.t.sol b/test/src/lib/deploy/LibDecimalFloatDeploy.t.sol index c7f703ae..c888424d 100644 --- a/test/src/lib/deploy/LibDecimalFloatDeploy.t.sol +++ b/test/src/lib/deploy/LibDecimalFloatDeploy.t.sol @@ -22,6 +22,17 @@ contract LibDecimalFloatDeployTest is Test { assertEq(address(decimalFloat).codehash, LibDecimalFloatDeploy.DECIMAL_FLOAT_CONTRACT_HASH); } + function testDeployAddressLogTables() external { + vm.createSelectFork(vm.envString("CI_FORK_ETH_RPC_URL")); + bytes memory logTables = LibDataContract.contractCreationCode(LibDecimalFloatDeploy.combinedTables()); + + address deployedAddress = LibRainDeploy.deployZoltu(logTables); + + assertEq(deployedAddress, LibDecimalFloatDeploy.ZOLTU_DEPLOYED_LOG_TABLES_ADDRESS); + + assertEq(address(deployedAddress).codehash, LibDecimalFloatDeploy.LOG_TABLES_DATA_CONTRACT_HASH); + } + function testExpectedCodeHashLogTables() external { bytes memory logTables = LibDataContract.contractCreationCode(LibDecimalFloatDeploy.combinedTables()); From f5df83f6130a1c7bc164661df5864e2340d20a31 Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Sun, 8 Feb 2026 19:09:19 +0400 Subject: [PATCH 19/24] use suites in ci --- .github/workflows/manual-sol-artifacts.yaml | 8 ++++ script/Deploy.sol | 45 +++++---------------- 2 files changed, 17 insertions(+), 36 deletions(-) diff --git a/.github/workflows/manual-sol-artifacts.yaml b/.github/workflows/manual-sol-artifacts.yaml index 8b7bfb87..750c70fd 100644 --- a/.github/workflows/manual-sol-artifacts.yaml +++ b/.github/workflows/manual-sol-artifacts.yaml @@ -2,6 +2,13 @@ name: Manual sol artifacts on: workflow_dispatch: inputs: + suite: + description: "The suite to deploy" + required: true + type: choice + options: + - log-tables + - decimal-float jobs: deploy: @@ -33,6 +40,7 @@ jobs: - run: nix develop -c forge selectors up --all - run: nix develop -c forge script script/Deploy.sol:Deploy -vvvvv --slow --broadcast --verify env: + DEPLOYMENT_SUITE: ${{ inputs.suite }} DEPLOYMENT_KEY: ${{ github.ref == 'refs/heads/main' && secrets.PRIVATE_KEY || secrets.PRIVATE_KEY_DEV }} CI_DEPLOY_ARBITRUM_RPC_URL: ${{ secrets.CI_DEPLOY_ARBITRUM_RPC_URL || vars.CI_DEPLOY_ARBITRUM_RPC_URL || '' }} diff --git a/script/Deploy.sol b/script/Deploy.sol index 70ea7d8e..5ac74526 100644 --- a/script/Deploy.sol +++ b/script/Deploy.sol @@ -8,9 +8,8 @@ import {LibDecimalFloatDeploy} from "../src/lib/deploy/LibDecimalFloatDeploy.sol import {LibRainDeploy} from "rain.deploy/lib/LibRainDeploy.sol"; import {DecimalFloat} from "../src/concrete/DecimalFloat.sol"; -bytes32 constant DEPLOYMENT_SUITE_ALL = keccak256("all"); -bytes32 constant DEPLOYMENT_SUITE_TABLES = keccak256("deployment.suite.tables"); -bytes32 constant DEPLOYMENT_SUITE_CONTRACT = keccak256("deployment.suite.contract"); +bytes32 constant DEPLOYMENT_SUITE_TABLES = keccak256("log-tables"); +bytes32 constant DEPLOYMENT_SUITE_CONTRACT = keccak256("decimal-float"); contract Deploy is Script { using LibDataContract for DataContractMemoryContainer; @@ -18,14 +17,8 @@ contract Deploy is Script { function run() external { uint256 deployerPrivateKey = vm.envUint("DEPLOYMENT_KEY"); - if ( - LibDecimalFloatDeploy.ZOLTU_DEPLOYED_LOG_TABLES_ADDRESS.code.length == 0 - || LibDecimalFloatDeploy.ZOLTU_DEPLOYED_LOG_TABLES_ADDRESS.codehash - != LibDecimalFloatDeploy.LOG_TABLES_DATA_CONTRACT_HASH - ) { - console2.logBytes32(LibDecimalFloatDeploy.ZOLTU_DEPLOYED_LOG_TABLES_ADDRESS.codehash); - console2.logBytes32(LibDecimalFloatDeploy.LOG_TABLES_DATA_CONTRACT_HASH); - console2.log("Log tables not deployed, deploying now..."); + bytes32 suite = keccak256(bytes(vm.envOr("DEPLOYMENT_SUITE", string("decimal-float")))); + if (suite == DEPLOYMENT_SUITE_TABLES) { LibRainDeploy.deployAndBroadcastToSupportedNetworks( vm, LibRainDeploy.supportedNetworks(), @@ -36,14 +29,7 @@ contract Deploy is Script { LibDecimalFloatDeploy.LOG_TABLES_DATA_CONTRACT_HASH, new address[](0) ); - - console2.log("Log tables deployed successfully."); - console2.log( - "Please rerun the deployment script to deploy the DecimalFloat contract now that the dependency is in place." - ); - } else { - console2.log("Log tables already deployed, proceeding to deploy DecimalFloat..."); - + } else if (suite == DEPLOYMENT_SUITE_CONTRACT) { address[] memory decimalFloatDependencies = new address[](1); decimalFloatDependencies[0] = LibDecimalFloatDeploy.ZOLTU_DEPLOYED_LOG_TABLES_ADDRESS; LibRainDeploy.deployAndBroadcastToSupportedNetworks( @@ -56,23 +42,10 @@ contract Deploy is Script { LibDecimalFloatDeploy.DECIMAL_FLOAT_CONTRACT_HASH, decimalFloatDependencies ); + } else { + revert( + "Invalid deployment suite specified. Please set the DEPLOYMENT_SUITE environment variable to either 'log-tables' or 'decimal-float'." + ); } - - // string memory suiteString = vm.envOr("DEPLOYMENT_SUITE", string("all")); - // bytes32 suite = keccak256(bytes(suiteString)); - - // DataContractMemoryContainer container = LibDecimalFloatDeploy.dataContract(); - - // vm.startBroadcast(deployerPrivateKey); - - // if (suite == DEPLOYMENT_SUITE_ALL || suite == DEPLOYMENT_SUITE_TABLES) { - // container.writeZoltu(); - // } - - // if (suite == DEPLOYMENT_SUITE_ALL || suite == DEPLOYMENT_SUITE_CONTRACT) { - // LibDecimalFloatDeploy.decimalFloatZoltu(); - // } - - // vm.stopBroadcast(); } } From 74d091261c30b3aacefe21717a80913ea09041ec Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Sun, 8 Feb 2026 20:09:15 +0400 Subject: [PATCH 20/24] liint --- script/Deploy.sol | 6 ++-- src/lib/deploy/LibDecimalFloatDeploy.sol | 14 +++----- .../lib/deploy/LibDecimalFloatDeploy.t.sol | 35 ++----------------- 3 files changed, 10 insertions(+), 45 deletions(-) diff --git a/script/Deploy.sol b/script/Deploy.sol index 5ac74526..d1770628 100644 --- a/script/Deploy.sol +++ b/script/Deploy.sol @@ -2,8 +2,8 @@ // SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd pragma solidity =0.8.25; -import {Script, console2} from "forge-std/Script.sol"; -import {DataContractMemoryContainer, LibDataContract} from "rain.datacontract/lib/LibDataContract.sol"; +import {Script} from "forge-std/Script.sol"; +import {LibDataContract} from "rain.datacontract/lib/LibDataContract.sol"; import {LibDecimalFloatDeploy} from "../src/lib/deploy/LibDecimalFloatDeploy.sol"; import {LibRainDeploy} from "rain.deploy/lib/LibRainDeploy.sol"; import {DecimalFloat} from "../src/concrete/DecimalFloat.sol"; @@ -12,8 +12,6 @@ bytes32 constant DEPLOYMENT_SUITE_TABLES = keccak256("log-tables"); bytes32 constant DEPLOYMENT_SUITE_CONTRACT = keccak256("decimal-float"); contract Deploy is Script { - using LibDataContract for DataContractMemoryContainer; - function run() external { uint256 deployerPrivateKey = vm.envUint("DEPLOYMENT_KEY"); diff --git a/src/lib/deploy/LibDecimalFloatDeploy.sol b/src/lib/deploy/LibDecimalFloatDeploy.sol index b6b566dc..f61e8159 100644 --- a/src/lib/deploy/LibDecimalFloatDeploy.sol +++ b/src/lib/deploy/LibDecimalFloatDeploy.sol @@ -21,8 +21,13 @@ library LibDecimalFloatDeploy { /// the expected address or the codehash does not match the expected value. error DecimalFloatNotDeployed(); + /// @dev Address of the log tables deployed via Zoltu's deterministic + /// deployment proxy. This address is the same across all EVM-compatible + /// networks. address constant ZOLTU_DEPLOYED_LOG_TABLES_ADDRESS = address(0xc51a14251b0dcF0ae24A96b7153991378938f5F5); + /// @dev The expected codehash of the log tables deployed via Zoltu's + /// deterministic deployment proxy. bytes32 constant LOG_TABLES_DATA_CONTRACT_HASH = 0x2573004ac3a9ee7fc8d73654d76386f1b6b99e34cdf86a689c4691e47143420f; /// @dev Address of the DecimalFloat contract deployed via Zoltu's @@ -34,15 +39,6 @@ library LibDecimalFloatDeploy { /// Zoltu's deterministic deployment proxy. bytes32 constant DECIMAL_FLOAT_CONTRACT_HASH = 0x705cdef2ed9538557152f86cd0988c748e0bd647a49df00b3e4f100c3544a583; - function ensureDeployed() internal view { - if ( - address(ZOLTU_DEPLOYED_DECIMAL_FLOAT_ADDRESS).code.length == 0 - || address(ZOLTU_DEPLOYED_DECIMAL_FLOAT_ADDRESS).codehash != DECIMAL_FLOAT_CONTRACT_HASH - ) { - revert DecimalFloatNotDeployed(); - } - } - /// Combines all log and anti-log tables into a single bytes array for /// deployment. These are using packed encoding to minimize size and remove /// the complexity of full ABI encoding. diff --git a/test/src/lib/deploy/LibDecimalFloatDeploy.t.sol b/test/src/lib/deploy/LibDecimalFloatDeploy.t.sol index c888424d..61692594 100644 --- a/test/src/lib/deploy/LibDecimalFloatDeploy.t.sol +++ b/test/src/lib/deploy/LibDecimalFloatDeploy.t.sol @@ -11,9 +11,11 @@ contract LibDecimalFloatDeployTest is Test { function testDeployAddress() external { vm.createSelectFork(vm.envString("CI_FORK_ETH_RPC_URL")); address deployedAddress = LibRainDeploy.deployZoltu(type(DecimalFloat).creationCode); + assertEq(deployedAddress, LibDecimalFloatDeploy.ZOLTU_DEPLOYED_DECIMAL_FLOAT_ADDRESS); + assertTrue(address(deployedAddress).code.length > 0, "Deployed address has no code"); - LibDecimalFloatDeploy.ensureDeployed(); + assertEq(address(deployedAddress).codehash, LibDecimalFloatDeploy.DECIMAL_FLOAT_CONTRACT_HASH); } function testExpectedCodeHashDecimalFloat() external { @@ -25,11 +27,9 @@ contract LibDecimalFloatDeployTest is Test { function testDeployAddressLogTables() external { vm.createSelectFork(vm.envString("CI_FORK_ETH_RPC_URL")); bytes memory logTables = LibDataContract.contractCreationCode(LibDecimalFloatDeploy.combinedTables()); - address deployedAddress = LibRainDeploy.deployZoltu(logTables); assertEq(deployedAddress, LibDecimalFloatDeploy.ZOLTU_DEPLOYED_LOG_TABLES_ADDRESS); - assertEq(address(deployedAddress).codehash, LibDecimalFloatDeploy.LOG_TABLES_DATA_CONTRACT_HASH); } @@ -43,33 +43,4 @@ contract LibDecimalFloatDeployTest is Test { assertEq(deployedAddress.codehash, LibDecimalFloatDeploy.LOG_TABLES_DATA_CONTRACT_HASH); } - - // function testDecimalFloatZoltu() external { - // vm.createSelectFork(vm.envString("CI_FORK_ETH_RPC_URL")); - - // DecimalFloat deployedZoltu = LibDecimalFloatDeploy.decimalFloatZoltu(); - // assertTrue(address(deployedZoltu) != address(0)); - - // DecimalFloat deployedDirect = new DecimalFloat(); - - // assertEq(address(deployedZoltu).codehash, address(deployedDirect).codehash); - // } - - // function testDecimalFloatZoltuProd() external { - // string[] memory forkRpcUrls = new string[](3); - // forkRpcUrls[0] = "CI_FORK_FLARE_RPC_URL"; - // forkRpcUrls[1] = "CI_FORK_BASE_RPC_URL"; - // forkRpcUrls[2] = "CI_FORK_ARB_RPC_URL"; - - // for (uint256 i = 0; i < forkRpcUrls.length; i++) { - // console2.log("Testing fork:", forkRpcUrls[i]); - // vm.createSelectFork(vm.envString(forkRpcUrls[i])); - - // assertEq( - // LibDecimalFloatDeploy.DECIMAL_FLOAT_DATA_CONTRACT_HASH, - // LibDecimalFloatDeploy.ZOLTU_DEPLOYED_DECIMAL_FLOAT_ADDRESS.codehash, - // forkRpcUrls[i] - // ); - // } - // } } From de88fdeeb31039862fdbe72ff0138b9d21c593aa Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Sun, 8 Feb 2026 20:12:40 +0400 Subject: [PATCH 21/24] EOL --- foundry.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/foundry.toml b/foundry.toml index 505c7a67..3822d703 100644 --- a/foundry.toml +++ b/foundry.toml @@ -46,4 +46,4 @@ polygon = "${CI_DEPLOY_POLYGON_RPC_URL}" arbitrum = { key = "${CI_DEPLOY_ARBITRUM_ETHERSCAN_API_KEY}" } base = { key = "${CI_DEPLOY_BASE_ETHERSCAN_API_KEY}" } flare = { key = "${CI_DEPLOY_FLARE_ETHERSCAN_API_KEY}" } -polygon = { key = "${CI_DEPLOY_POLYGON_ETHERSCAN_API_KEY}" } \ No newline at end of file +polygon = { key = "${CI_DEPLOY_POLYGON_ETHERSCAN_API_KEY}" } From 3feb81064e540aa82e4b08719409f0b4fa670e50 Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Sun, 8 Feb 2026 20:14:15 +0400 Subject: [PATCH 22/24] lint --- src/lib/deploy/LibDecimalFloatDeploy.sol | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/lib/deploy/LibDecimalFloatDeploy.sol b/src/lib/deploy/LibDecimalFloatDeploy.sol index f61e8159..57293237 100644 --- a/src/lib/deploy/LibDecimalFloatDeploy.sol +++ b/src/lib/deploy/LibDecimalFloatDeploy.sol @@ -17,10 +17,6 @@ import {LOG_TABLE_DISAMBIGUATOR} from "../table/LibLogTable.sol"; import {WriteError} from "../../error/ErrDecimalFloat.sol"; library LibDecimalFloatDeploy { - /// Thrown when failing to ensure the DecimalFloat contract is deployed at - /// the expected address or the codehash does not match the expected value. - error DecimalFloatNotDeployed(); - /// @dev Address of the log tables deployed via Zoltu's deterministic /// deployment proxy. This address is the same across all EVM-compatible /// networks. From c8ddc74cf0edf026a9548205e253d4e28226f552 Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Sun, 8 Feb 2026 20:16:50 +0400 Subject: [PATCH 23/24] lint tests --- .gas-snapshot | 354 +++++++++--------- .../lib/deploy/LibDecimalFloatDeploy.t.sol | 1 + 2 files changed, 182 insertions(+), 173 deletions(-) diff --git a/.gas-snapshot b/.gas-snapshot index b6f495f2..a7cb8569 100644 --- a/.gas-snapshot +++ b/.gas-snapshot @@ -1,65 +1,66 @@ -DecimalFloatAbsTest:testAbsDeployed(bytes32) (runs: 5096, μ: 3630849, ~: 3630783) -DecimalFloatAddTest:testAddDeployed(bytes32,bytes32) (runs: 5096, μ: 3635891, ~: 3636279) -DecimalFloatCeilTest:testCeilDeployed(bytes32) (runs: 5096, μ: 3630808, ~: 3630365) -DecimalFloatConstantsTest:testEDeployed() (gas: 3629946) -DecimalFloatConstantsTest:testMaxNegativeValueDeployed() (gas: 3629936) -DecimalFloatConstantsTest:testMaxPositiveValueDeployed() (gas: 3629937) -DecimalFloatConstantsTest:testMinNegativeValueDeployed() (gas: 3629912) -DecimalFloatConstantsTest:testMinPositiveValueDeployed() (gas: 3629935) -DecimalFloatConstantsTest:testZeroDeployed() (gas: 3629955) -DecimalFloatDivTest:testDivDeployed(bytes32,bytes32) (runs: 5096, μ: 3637817, ~: 3638031) -DecimalFloatEqTest:testEqDeployed(bytes32,bytes32) (runs: 5096, μ: 3631168, ~: 3631067) -DecimalFloatFloorTest:testFloorDeployed(bytes32) (runs: 5096, μ: 3630905, ~: 3630408) -DecimalFloatFormatTest:testFormatConstants() (gas: 3630531) -DecimalFloatFormatTest:testFormatDeployed(bytes32,bytes32,bytes32) (runs: 5096, μ: 3655597, ~: 3662378) -DecimalFloatFracTest:testFracDeployed(bytes32) (runs: 5096, μ: 3630962, ~: 3630921) -DecimalFloatFromFixedDecimalLosslessTest:testFromFixedDecimalLosslessDeployed(uint256,uint8) (runs: 5096, μ: 3631819, ~: 3631485) -DecimalFloatFromFixedDecimalLossyTest:testFromFixedDecimalLossyDeployed(uint256,uint8) (runs: 5096, μ: 3631710, ~: 3631642) -DecimalFloatGtTest:testGtDeployed(bytes32,bytes32) (runs: 5096, μ: 3631067, ~: 3630966) -DecimalFloatGteTest:testGteDeployed(bytes32,bytes32) (runs: 5096, μ: 3631141, ~: 3631039) -DecimalFloatInvTest:testInvDeployed(bytes32) (runs: 5096, μ: 3636151, ~: 3636277) -DecimalFloatIsZeroTest:testIsZeroDeployed(bytes32) (runs: 5096, μ: 3630281, ~: 3630281) -DecimalFloatLtTest:testLtDeployed(bytes32,bytes32) (runs: 5096, μ: 3631044, ~: 3630943) -DecimalFloatLteTest:testLteDeployed(bytes32,bytes32) (runs: 5096, μ: 3631098, ~: 3630996) -DecimalFloatMaxTest:testMaxDeployed(bytes32,bytes32) (runs: 5096, μ: 3631142, ~: 3631054) -DecimalFloatMinTest:testMinDeployed(bytes32,bytes32) (runs: 5096, μ: 3631118, ~: 3631030) -DecimalFloatMinusTest:testMinusDeployed(bytes32) (runs: 5096, μ: 3630880, ~: 3630883) -DecimalFloatMulTest:testMulDeployed(bytes32,bytes32) (runs: 5096, μ: 3635218, ~: 3635682) +DecimalFloatAbsTest:testAbsDeployed(bytes32) (runs: 5096, μ: 3653504, ~: 3653437) +DecimalFloatAddTest:testAddDeployed(bytes32,bytes32) (runs: 5096, μ: 3658502, ~: 3658911) +DecimalFloatCeilTest:testCeilDeployed(bytes32) (runs: 5096, μ: 3653468, ~: 3653029) +DecimalFloatConstantsTest:testEDeployed() (gas: 3652610) +DecimalFloatConstantsTest:testMaxNegativeValueDeployed() (gas: 3652600) +DecimalFloatConstantsTest:testMaxPositiveValueDeployed() (gas: 3652644) +DecimalFloatConstantsTest:testMinNegativeValueDeployed() (gas: 3652554) +DecimalFloatConstantsTest:testMinPositiveValueDeployed() (gas: 3652577) +DecimalFloatConstantsTest:testZeroDeployed() (gas: 3652597) +DecimalFloatDivTest:testDivDeployed(bytes32,bytes32) (runs: 5096, μ: 3660462, ~: 3660681) +DecimalFloatEqTest:testEqDeployed(bytes32,bytes32) (runs: 5096, μ: 3653831, ~: 3653731) +DecimalFloatFloorTest:testFloorDeployed(bytes32) (runs: 5096, μ: 3653562, ~: 3653072) +DecimalFloatFormatTest:testFormatConstants() (gas: 3653151) +DecimalFloatFormatTest:testFormatDeployed(bytes32,bytes32,bytes32) (runs: 5096, μ: 3678438, ~: 3685035) +DecimalFloatFracTest:testFracDeployed(bytes32) (runs: 5096, μ: 3653600, ~: 3653559) +DecimalFloatFromFixedDecimalLosslessTest:testFromFixedDecimalLosslessDeployed(uint256,uint8) (runs: 5096, μ: 3654494, ~: 3654149) +DecimalFloatFromFixedDecimalLossyTest:testFromFixedDecimalLossyDeployed(uint256,uint8) (runs: 5096, μ: 3654373, ~: 3654306) +DecimalFloatGtTest:testGtDeployed(bytes32,bytes32) (runs: 5096, μ: 3653753, ~: 3653653) +DecimalFloatGteTest:testGteDeployed(bytes32,bytes32) (runs: 5096, μ: 3653803, ~: 3653703) +DecimalFloatIntegerTest:testIntegerDeployed(bytes32) (runs: 5096, μ: 3653570, ~: 3653576) +DecimalFloatInvTest:testInvDeployed(bytes32) (runs: 5096, μ: 3658828, ~: 3658941) +DecimalFloatIsZeroTest:testIsZeroDeployed(bytes32) (runs: 5096, μ: 3652923, ~: 3652923) +DecimalFloatLtTest:testLtDeployed(bytes32,bytes32) (runs: 5096, μ: 3653731, ~: 3653630) +DecimalFloatLteTest:testLteDeployed(bytes32,bytes32) (runs: 5096, μ: 3653783, ~: 3653683) +DecimalFloatMaxTest:testMaxDeployed(bytes32,bytes32) (runs: 5096, μ: 3653805, ~: 3653718) +DecimalFloatMinTest:testMinDeployed(bytes32,bytes32) (runs: 5096, μ: 3653805, ~: 3653717) +DecimalFloatMinusTest:testMinusDeployed(bytes32) (runs: 5096, μ: 3653579, ~: 3653582) +DecimalFloatMulTest:testMulDeployed(bytes32,bytes32) (runs: 5096, μ: 3657863, ~: 3658314) DecimalFloatPackLosslessTest:testPackDeployed(int224,int32) (runs: 5096, μ: 163825, ~: 163827) -DecimalFloatParseTest:testParseDeployed(string) (runs: 5096, μ: 3633842, ~: 3632921) -DecimalFloatPowTest:testPowDeployed(bytes32,bytes32) (runs: 5096, μ: 3663059, ~: 3635707) -DecimalFloatSqrtTest:testSqrtDeployed(bytes32) (runs: 5096, μ: 3648127, ~: 3648881) -DecimalFloatSubTest:testSubDeployed(bytes32,bytes32) (runs: 5096, μ: 3636212, ~: 3636620) -DecimalFloatToFixedDecimalLosslessTest:testToFixedDecimalLosslessDeployed(bytes32,uint8) (runs: 5096, μ: 3634281, ~: 3634135) -DecimalFloatToFixedDecimalLossyTest:testToFixedDecimalLossyDeployed(bytes32,uint8) (runs: 5096, μ: 3633780, ~: 3633719) -LibDecimalFloatAbsTest:testAbsMinValue(int32) (runs: 5096, μ: 4480, ~: 4480) -LibDecimalFloatAbsTest:testAbsNegative(int256,int32) (runs: 5096, μ: 2731, ~: 2998) -LibDecimalFloatAbsTest:testAbsNonNegative(int256,int32) (runs: 5096, μ: 2256, ~: 2543) -LibDecimalFloatCeilTest:testCeilExamples() (gas: 49683) -LibDecimalFloatCeilTest:testCeilInRange(int224,int256) (runs: 5096, μ: 4525, ~: 4530) -LibDecimalFloatCeilTest:testCeilLessThanMin(int224,int256) (runs: 5096, μ: 3528, ~: 3839) -LibDecimalFloatCeilTest:testCeilNonNegative(int224,int256) (runs: 5096, μ: 2316, ~: 2440) -LibDecimalFloatCeilTest:testCeilNotReverts(bytes32) (runs: 5096, μ: 634, ~: 408) +DecimalFloatParseTest:testParseDeployed(string) (runs: 5096, μ: 3656508, ~: 3655563) +DecimalFloatPowTest:testPowDeployed(bytes32,bytes32) (runs: 5096, μ: 3682862, ~: 3658371) +DecimalFloatSqrtTest:testSqrtDeployed(bytes32) (runs: 5096, μ: 3670762, ~: 3671411) +DecimalFloatSubTest:testSubDeployed(bytes32,bytes32) (runs: 5096, μ: 3658859, ~: 3659274) +DecimalFloatToFixedDecimalLosslessTest:testToFixedDecimalLosslessDeployed(bytes32,uint8) (runs: 5096, μ: 3656934, ~: 3656799) +DecimalFloatToFixedDecimalLossyTest:testToFixedDecimalLossyDeployed(bytes32,uint8) (runs: 5096, μ: 3656450, ~: 3656383) +LibDecimalFloatAbsTest:testAbsMinValue(int32) (runs: 5096, μ: 4475, ~: 4475) +LibDecimalFloatAbsTest:testAbsNegative(int256,int32) (runs: 5096, μ: 2726, ~: 2993) +LibDecimalFloatAbsTest:testAbsNonNegative(int256,int32) (runs: 5096, μ: 2251, ~: 2538) +LibDecimalFloatCeilTest:testCeilExamples() (gas: 49568) +LibDecimalFloatCeilTest:testCeilInRange(int224,int256) (runs: 5096, μ: 4531, ~: 4525) +LibDecimalFloatCeilTest:testCeilLessThanMin(int224,int256) (runs: 5096, μ: 3518, ~: 3834) +LibDecimalFloatCeilTest:testCeilNonNegative(int224,int256) (runs: 5096, μ: 2315, ~: 2440) +LibDecimalFloatCeilTest:testCeilNotReverts(bytes32) (runs: 5096, μ: 633, ~: 408) LibDecimalFloatCeilTest:testCeilZero(int32) (runs: 5096, μ: 1915, ~: 1915) LibDecimalFloatConstantsTest:testFloatE() (gas: 534) LibDecimalFloatConstantsTest:testFloatHalf() (gas: 513) LibDecimalFloatConstantsTest:testFloatMaxNegativeValue() (gas: 556) -LibDecimalFloatConstantsTest:testFloatMaxNegativeValueIsMax(bytes32) (runs: 5096, μ: 4149, ~: 4281) +LibDecimalFloatConstantsTest:testFloatMaxNegativeValueIsMax(bytes32) (runs: 5096, μ: 4145, ~: 4276) LibDecimalFloatConstantsTest:testFloatMaxPositiveValue() (gas: 512) LibDecimalFloatConstantsTest:testFloatMaxPositiveValueIsMax(bytes32) (runs: 5096, μ: 698, ~: 748) LibDecimalFloatConstantsTest:testFloatMinNegativeValue() (gas: 512) -LibDecimalFloatConstantsTest:testFloatMinNegativeValueIsMin(bytes32) (runs: 5096, μ: 665, ~: 622) +LibDecimalFloatConstantsTest:testFloatMinNegativeValueIsMin(bytes32) (runs: 5096, μ: 666, ~: 622) LibDecimalFloatConstantsTest:testFloatMinPositiveValue() (gas: 534) -LibDecimalFloatConstantsTest:testFloatMinPositiveValueIsMin(bytes32) (runs: 5096, μ: 4638, ~: 4559) +LibDecimalFloatConstantsTest:testFloatMinPositiveValueIsMin(bytes32) (runs: 5096, μ: 4633, ~: 4554) LibDecimalFloatConstantsTest:testFloatOne() (gas: 535) LibDecimalFloatConstantsTest:testFloatTwo() (gas: 557) LibDecimalFloatConstantsTest:testFloatZero() (gas: 482) -LibDecimalFloatDecimalAddTest:testAddPacked(bytes32,bytes32) (runs: 5096, μ: 7607, ~: 7997) +LibDecimalFloatDecimalAddTest:testAddPacked(bytes32,bytes32) (runs: 5096, μ: 7592, ~: 7992) LibDecimalFloatDecimalLosslessTest:testFromFixedDecimalLosslessFail(uint256,uint8) (runs: 5096, μ: 6144, ~: 6184) LibDecimalFloatDecimalLosslessTest:testFromFixedDecimalLosslessMem(uint256,uint8) (runs: 5096, μ: 1735, ~: 1665) LibDecimalFloatDecimalLosslessTest:testFromFixedDecimalLosslessPass(uint256,uint8) (runs: 5096, μ: 1142, ~: 1122) LibDecimalFloatDecimalLosslessTest:testToFixedDecimalLosslessFail() (gas: 4640) -LibDecimalFloatDecimalLosslessTest:testToFixedDecimalLosslessPacked(bytes32,uint8) (runs: 5096, μ: 5925, ~: 5892) +LibDecimalFloatDecimalLosslessTest:testToFixedDecimalLosslessPacked(bytes32,uint8) (runs: 5096, μ: 5929, ~: 5892) LibDecimalFloatDecimalLosslessTest:testToFixedDecimalLosslessPass(int256,int256,uint8) (runs: 5096, μ: 5354, ~: 5232) LibDecimalFloatDecimalTest:testFixedDecimalRoundTripLossless(uint256,uint8) (runs: 5096, μ: 1403, ~: 1337) LibDecimalFloatDecimalTest:testFromFixedDecimalLossyComplicated() (gas: 184877) @@ -68,55 +69,57 @@ LibDecimalFloatDecimalTest:testFromFixedDecimalLossyOne() (gas: 184921) LibDecimalFloatDecimalTest:testFromFixedDecimalLossyOneMillion() (gas: 184856) LibDecimalFloatDecimalTest:testFromFixedDecimalLossyOverflow() (gas: 213925) LibDecimalFloatDecimalTest:testFromFixedDecimalLossyPacked(uint256,uint8) (runs: 5096, μ: 1829, ~: 1756) -LibDecimalFloatDecimalTest:testFromFixedDecimalLossyTruncateOne(uint256,uint8) (runs: 5096, μ: 1483, ~: 1454) -LibDecimalFloatDecimalTest:testFromFixedDecimalLossyTruncateZero(uint256,uint8) (runs: 5096, μ: 1536, ~: 1377) -LibDecimalFloatDecimalTest:testToFixedDecimalLosslessScaleUp(int256,int256,uint8) (runs: 5096, μ: 7765, ~: 7642) +LibDecimalFloatDecimalTest:testFromFixedDecimalLossyTruncateOne(uint256,uint8) (runs: 5096, μ: 1482, ~: 1454) +LibDecimalFloatDecimalTest:testFromFixedDecimalLossyTruncateZero(uint256,uint8) (runs: 5096, μ: 1537, ~: 1377) +LibDecimalFloatDecimalTest:testToFixedDecimalLosslessScaleUp(int256,int256,uint8) (runs: 5096, μ: 7768, ~: 7642) LibDecimalFloatDecimalTest:testToFixedDecimalLossyExponentOverflow(int256,int256,uint8) (runs: 5096, μ: 7703, ~: 7655) LibDecimalFloatDecimalTest:testToFixedDecimalLossyIdentity(int256,uint8) (runs: 5096, μ: 2102, ~: 2474) LibDecimalFloatDecimalTest:testToFixedDecimalLossyNegative(int256,int256,uint8) (runs: 5096, μ: 5963, ~: 6150) -LibDecimalFloatDecimalTest:testToFixedDecimalLossyPacked(bytes32,uint8) (runs: 5096, μ: 5262, ~: 5432) -LibDecimalFloatDecimalTest:testToFixedDecimalLossyScaleUpOverflow(int256,int256,uint8) (runs: 5096, μ: 8982, ~: 9163) -LibDecimalFloatDecimalTest:testToFixedDecimalLossyTruncate(int256,int256,uint8) (runs: 5096, μ: 4639, ~: 4421) +LibDecimalFloatDecimalTest:testToFixedDecimalLossyPacked(bytes32,uint8) (runs: 5096, μ: 5271, ~: 5432) +LibDecimalFloatDecimalTest:testToFixedDecimalLossyScaleUpOverflow(int256,int256,uint8) (runs: 5096, μ: 8984, ~: 9163) +LibDecimalFloatDecimalTest:testToFixedDecimalLossyTruncate(int256,int256,uint8) (runs: 5096, μ: 4637, ~: 4387) LibDecimalFloatDecimalTest:testToFixedDecimalLossyTruncateLossless() (gas: 4135) -LibDecimalFloatDecimalTest:testToFixedDecimalLossyUnderflow(int256,int256,uint8) (runs: 5096, μ: 3601, ~: 3527) +LibDecimalFloatDecimalTest:testToFixedDecimalLossyUnderflow(int256,int256,uint8) (runs: 5096, μ: 3597, ~: 3527) LibDecimalFloatDecimalTest:testToFixedDecimalLossyZero(int256,uint8) (runs: 5096, μ: 748, ~: 748) -LibDecimalFloatDeployTest:testDecimalFloatZoltu() (gas: 7272663) -LibDecimalFloatDeployTest:testDecimalFloatZoltuProd() (gas: 16002) -LibDecimalFloatDivTest:testDivByNegativeOneFloat(int224,int32) (runs: 5096, μ: 338250, ~: 341377) -LibDecimalFloatDivTest:testDivByOneFloat(int224,int32) (runs: 5096, μ: 311642, ~: 313702) -LibDecimalFloatDivTest:testDivPacked(bytes32,bytes32) (runs: 5096, μ: 9490, ~: 9709) -LibDecimalFloatEqTest:testEqPacked(bytes32,bytes32) (runs: 5096, μ: 2706, ~: 2605) +LibDecimalFloatDeployTest:testDeployAddress() (gas: 3665949) +LibDecimalFloatDeployTest:testDeployAddressLogTables() (gas: 1214587) +LibDecimalFloatDeployTest:testExpectedCodeHashDecimalFloat() (gas: 3651480) +LibDecimalFloatDeployTest:testExpectedCodeHashLogTables() (gas: 1205793) +LibDecimalFloatDivTest:testDivByNegativeOneFloat(int224,int32) (runs: 5096, μ: 337590, ~: 340717) +LibDecimalFloatDivTest:testDivByOneFloat(int224,int32) (runs: 5096, μ: 311312, ~: 313372) +LibDecimalFloatDivTest:testDivPacked(bytes32,bytes32) (runs: 5096, μ: 9478, ~: 9704) +LibDecimalFloatEqTest:testEqPacked(bytes32,bytes32) (runs: 5096, μ: 2705, ~: 2605) LibDecimalFloatEqTest:testEqXNotYExponents(bytes32,bytes32) (runs: 5096, μ: 1531, ~: 1384) LibDecimalFloatEqTest:testEqZero(int32) (runs: 5096, μ: 1603, ~: 1603) -LibDecimalFloatFloorTest:testFloorExamples() (gas: 53915) -LibDecimalFloatFloorTest:testFloorGas0() (gas: 1056) -LibDecimalFloatFloorTest:testFloorGasTiny() (gas: 888) +LibDecimalFloatFloorTest:testFloorExamples() (gas: 53755) +LibDecimalFloatFloorTest:testFloorGas0() (gas: 1051) +LibDecimalFloatFloorTest:testFloorGasTiny() (gas: 883) LibDecimalFloatFloorTest:testFloorGasZero() (gas: 539) -LibDecimalFloatFloorTest:testFloorInRangeNegative(int224,int256) (runs: 5096, μ: 12351, ~: 12658) -LibDecimalFloatFloorTest:testFloorInRangeNonNegative(int224,int256) (runs: 5096, μ: 4610, ~: 4481) -LibDecimalFloatFloorTest:testFloorLessThanMin(int224,int256) (runs: 5096, μ: 3112, ~: 2992) -LibDecimalFloatFloorTest:testFloorNonNegative(int224,int256) (runs: 5096, μ: 2265, ~: 2395) -LibDecimalFloatFloorTest:testFloorNotReverts(bytes32) (runs: 5096, μ: 630, ~: 362) -LibDecimalFloatFracTest:testFracExamples() (gas: 36585) -LibDecimalFloatFracTest:testFracGas0() (gas: 990) -LibDecimalFloatFracTest:testFracGasTiny() (gas: 875) -LibDecimalFloatFracTest:testFracGasZero() (gas: 794) -LibDecimalFloatFracTest:testFracInRange(int224,int256) (runs: 5096, μ: 3416, ~: 3465) -LibDecimalFloatFracTest:testFracLessThanMin(int224,int256) (runs: 5096, μ: 2847, ~: 2889) -LibDecimalFloatFracTest:testFracNonNegative(int224,int256) (runs: 5096, μ: 2491, ~: 2622) -LibDecimalFloatFracTest:testFracNotReverts(bytes32) (runs: 5096, μ: 628, ~: 606) +LibDecimalFloatFloorTest:testFloorInRangeNegative(int224,int256) (runs: 5096, μ: 7412, ~: 7775) +LibDecimalFloatFloorTest:testFloorInRangeNonNegative(int224,int256) (runs: 5096, μ: 4611, ~: 4476) +LibDecimalFloatFloorTest:testFloorLessThanMin(int224,int256) (runs: 5096, μ: 3104, ~: 2987) +LibDecimalFloatFloorTest:testFloorNonNegative(int224,int256) (runs: 5096, μ: 2263, ~: 2395) +LibDecimalFloatFloorTest:testFloorNotReverts(bytes32) (runs: 5096, μ: 624, ~: 362) +LibDecimalFloatFracTest:testFracExamples() (gas: 36091) +LibDecimalFloatFracTest:testFracGas0() (gas: 977) +LibDecimalFloatFracTest:testFracGasTiny() (gas: 862) +LibDecimalFloatFracTest:testFracGasZero() (gas: 781) +LibDecimalFloatFracTest:testFracInRange(int224,int256) (runs: 5096, μ: 3408, ~: 3452) +LibDecimalFloatFracTest:testFracLessThanMin(int224,int256) (runs: 5096, μ: 2830, ~: 2876) +LibDecimalFloatFracTest:testFracNonNegative(int224,int256) (runs: 5096, μ: 2478, ~: 2609) +LibDecimalFloatFracTest:testFracNotReverts(bytes32) (runs: 5096, μ: 615, ~: 593) LibDecimalFloatGtTest:testGtGasAZero() (gas: 978) LibDecimalFloatGtTest:testGtGasBZero() (gas: 978) LibDecimalFloatGtTest:testGtGasBothZero() (gas: 736) LibDecimalFloatGtTest:testGtGasDifferentSigns() (gas: 1011) LibDecimalFloatGtTest:testGtGasExponentDiffOverflow() (gas: 1179) LibDecimalFloatGtTest:testGtOneEAny(bytes32) (runs: 5096, μ: 658, ~: 658) -LibDecimalFloatGtTest:testGtReference(int224,int32,int224,int32) (runs: 5096, μ: 8013, ~: 8950) +LibDecimalFloatGtTest:testGtReference(int224,int32,int224,int32) (runs: 5096, μ: 8057, ~: 9149) LibDecimalFloatGtTest:testGtX(int224,int32) (runs: 5096, μ: 1066, ~: 1067) -LibDecimalFloatGtTest:testGtXEAnyVsXEAny(int256,int32,int32) (runs: 5096, μ: 3226, ~: 3465) -LibDecimalFloatGtTest:testGtXEAnyVsXEAnyNegative(int256,int32,int32) (runs: 5096, μ: 3396, ~: 3649) -LibDecimalFloatGtTest:testGtXNotY(bytes32,bytes32) (runs: 5096, μ: 1530, ~: 1383) -LibDecimalFloatGtTest:testGtXPositiveYNegative(int256,int32,int256,int32) (runs: 5096, μ: 4274, ~: 4276) +LibDecimalFloatGtTest:testGtXEAnyVsXEAny(int256,int32,int32) (runs: 5096, μ: 3223, ~: 3465) +LibDecimalFloatGtTest:testGtXEAnyVsXEAnyNegative(int256,int32,int32) (runs: 5096, μ: 3393, ~: 3649) +LibDecimalFloatGtTest:testGtXNotY(bytes32,bytes32) (runs: 5096, μ: 1529, ~: 1383) +LibDecimalFloatGtTest:testGtXPositiveYNegative(int256,int32,int256,int32) (runs: 5096, μ: 4275, ~: 4276) LibDecimalFloatGtTest:testGtXPositiveYZero(int256,int32,int32) (runs: 5096, μ: 2876, ~: 3141) LibDecimalFloatGtTest:testGtZero(int32,int32) (runs: 5096, μ: 1609, ~: 1609) LibDecimalFloatGteTest:testGteGasAZero() (gas: 981) @@ -125,28 +128,28 @@ LibDecimalFloatGteTest:testGteGasBothZero() (gas: 738) LibDecimalFloatGteTest:testGteGasDifferentSigns() (gas: 1033) LibDecimalFloatGteTest:testGteGasExponentDiffOverflow() (gas: 1138) LibDecimalFloatGteTest:testGteOneEAny(bytes32) (runs: 5096, μ: 658, ~: 658) -LibDecimalFloatGteTest:testGteReference(int224,int32,int224,int32) (runs: 5096, μ: 8072, ~: 9070) +LibDecimalFloatGteTest:testGteReference(int224,int32,int224,int32) (runs: 5096, μ: 8099, ~: 9130) LibDecimalFloatGteTest:testGteX(int224,int32) (runs: 5096, μ: 1109, ~: 1110) -LibDecimalFloatGteTest:testGteXEAnyVsXEAny(int256,int32,int32) (runs: 5096, μ: 3256, ~: 3497) -LibDecimalFloatGteTest:testGteXEAnyVsXEAnyNegative(int256,int32,int32) (runs: 5096, μ: 3409, ~: 3661) -LibDecimalFloatGteTest:testGteXNotLtY(bytes32,bytes32) (runs: 5096, μ: 1129, ~: 1028) -LibDecimalFloatGteTest:testGteXPositiveYNegative(int256,int32,int256,int32) (runs: 5096, μ: 4300, ~: 4304) +LibDecimalFloatGteTest:testGteXEAnyVsXEAny(int256,int32,int32) (runs: 5096, μ: 3253, ~: 3497) +LibDecimalFloatGteTest:testGteXEAnyVsXEAnyNegative(int256,int32,int32) (runs: 5096, μ: 3406, ~: 3661) +LibDecimalFloatGteTest:testGteXNotLtY(bytes32,bytes32) (runs: 5096, μ: 1128, ~: 1028) +LibDecimalFloatGteTest:testGteXPositiveYNegative(int256,int32,int256,int32) (runs: 5096, μ: 4301, ~: 4304) LibDecimalFloatGteTest:testGteXPositiveYZero(int256,int32,int32) (runs: 5096, μ: 2480, ~: 2755) LibDecimalFloatGteTest:testGteZero(int32,int32) (runs: 5096, μ: 1654, ~: 1654) LibDecimalFloatImplementationAddTest:testAdd123456789987654321() (gas: 2134) LibDecimalFloatImplementationAddTest:testAdd123456789e9987654321() (gas: 2185) -LibDecimalFloatImplementationAddTest:testAddNeverRevert(int256,int256,int256,int256) (runs: 5096, μ: 5075, ~: 5124) +LibDecimalFloatImplementationAddTest:testAddNeverRevert(int256,int256,int256,int256) (runs: 5096, μ: 5066, ~: 5121) LibDecimalFloatImplementationAddTest:testAddOneOneNotMaximized() (gas: 3113) LibDecimalFloatImplementationAddTest:testAddOneOnePreMaximized() (gas: 1305) LibDecimalFloatImplementationAddTest:testAddOneZero() (gas: 463) LibDecimalFloatImplementationAddTest:testAddRevertMaxA() (gas: 6056) -LibDecimalFloatImplementationAddTest:testAddSameExponent(int256,int256) (runs: 5096, μ: 6360, ~: 6453) +LibDecimalFloatImplementationAddTest:testAddSameExponent(int256,int256) (runs: 5096, μ: 6354, ~: 6446) LibDecimalFloatImplementationAddTest:testAddZero() (gas: 483) LibDecimalFloatImplementationAddTest:testAddZeroAnyExponent(int128) (runs: 5096, μ: 1736, ~: 1668) LibDecimalFloatImplementationAddTest:testAddZeroOne() (gas: 483) -LibDecimalFloatImplementationAddTest:testAddZeroToAnyNonZero(int256,int256,int256) (runs: 5096, μ: 6555, ~: 6480) +LibDecimalFloatImplementationAddTest:testAddZeroToAnyNonZero(int256,int256,int256) (runs: 5096, μ: 6554, ~: 6480) LibDecimalFloatImplementationAddTest:testAddingSmallToLargeReturnsLargeExamples() (gas: 62746) -LibDecimalFloatImplementationAddTest:testAddingSmallToLargeReturnsLargeFuzz(int256,int256,int256,int256) (runs: 5096, μ: 11428, ~: 11535) +LibDecimalFloatImplementationAddTest:testAddingSmallToLargeReturnsLargeFuzz(int256,int256,int256,int256) (runs: 5096, μ: 11417, ~: 11522) LibDecimalFloatImplementationAddTest:testGasAddOne() (gas: 1845) LibDecimalFloatImplementationAddTest:testGasAddZero() (gas: 377) LibDecimalFloatImplementationAddTest:testOverflowChecks(int256,int256) (runs: 5096, μ: 711, ~: 710) @@ -155,10 +158,10 @@ LibDecimalFloatImplementationDivTest:testDiv1Over3Gas0() (gas: 2512) LibDecimalFloatImplementationDivTest:testDiv1Over3Gas10() (gas: 20913) LibDecimalFloatImplementationDivTest:testDiv1Over9Over1Over3() (gas: 10748) LibDecimalFloatImplementationDivTest:testDiv1e18Over3() (gas: 3381) -LibDecimalFloatImplementationDivTest:testDivBy1(int256,int256) (runs: 5096, μ: 259617, ~: 263258) -LibDecimalFloatImplementationDivTest:testDivByNegativeOneFloat(int256,int256) (runs: 5096, μ: 261986, ~: 269370) -LibDecimalFloatImplementationDivTest:testDivMaxPositiveValueDenominatorNotRevert(int256,int256) (runs: 5096, μ: 2587, ~: 2646) -LibDecimalFloatImplementationDivTest:testDivMinPositiveValueDenominatorRevert(int256,int256) (runs: 5096, μ: 6863, ~: 6912) +LibDecimalFloatImplementationDivTest:testDivBy1(int256,int256) (runs: 5096, μ: 259396, ~: 263258) +LibDecimalFloatImplementationDivTest:testDivByNegativeOneFloat(int256,int256) (runs: 5096, μ: 261764, ~: 269063) +LibDecimalFloatImplementationDivTest:testDivMaxPositiveValueDenominatorNotRevert(int256,int256) (runs: 5096, μ: 2584, ~: 2646) +LibDecimalFloatImplementationDivTest:testDivMinPositiveValueDenominatorRevert(int256,int256) (runs: 5096, μ: 6860, ~: 6912) LibDecimalFloatImplementationDivTest:testDivNegative1Over3() (gas: 3954) LibDecimalFloatImplementationDivTest:testDivOOMs5and2() (gas: 2826) LibDecimalFloatImplementationDivTest:testDivOOMsOverTen() (gas: 3829) @@ -172,33 +175,33 @@ LibDecimalFloatImplementationEqTest:testEqGasDifferentSigns() (gas: 477) LibDecimalFloatImplementationEqTest:testEqGasExponentDiffOverflow() (gas: 527) LibDecimalFloatImplementationEqTest:testEqNotReverts(int256,int256,int256,int256) (runs: 5096, μ: 626, ~: 569) LibDecimalFloatImplementationEqTest:testEqOneEAny(int256,int256) (runs: 5096, μ: 580, ~: 580) -LibDecimalFloatImplementationEqTest:testEqReference(int256,int256,int256,int256) (runs: 5096, μ: 6566, ~: 7383) +LibDecimalFloatImplementationEqTest:testEqReference(int256,int256,int256,int256) (runs: 5096, μ: 6584, ~: 7459) LibDecimalFloatImplementationEqTest:testEqX(int256) (runs: 5096, μ: 554, ~: 554) -LibDecimalFloatImplementationEqTest:testEqXEAnyVsXEAny(int256,int256,int256) (runs: 5096, μ: 4030, ~: 4022) +LibDecimalFloatImplementationEqTest:testEqXEAnyVsXEAny(int256,int256,int256) (runs: 5096, μ: 4028, ~: 4022) LibDecimalFloatImplementationEqTest:testEqXEqY(int256,int256,int256,int256) (runs: 5096, μ: 699, ~: 642) -LibDecimalFloatImplementationEqTest:testEqXNotY(int256,int256,int256,int256) (runs: 5096, μ: 5181, ~: 5251) +LibDecimalFloatImplementationEqTest:testEqXNotY(int256,int256,int256,int256) (runs: 5096, μ: 5174, ~: 5239) LibDecimalFloatImplementationEqTest:testEqZero(int256,int256) (runs: 5096, μ: 602, ~: 602) LibDecimalFloatImplementationIntFracTest:testIntFracExamples() (gas: 7940) -LibDecimalFloatImplementationIntFracTest:testIntFracNegExponentLarge(int256,int256) (runs: 5096, μ: 2148, ~: 2392) +LibDecimalFloatImplementationIntFracTest:testIntFracNegExponentLarge(int256,int256) (runs: 5096, μ: 2142, ~: 2392) LibDecimalFloatImplementationIntFracTest:testIntFracNegExponentSmall(int256) (runs: 5096, μ: 100629, ~: 100629) LibDecimalFloatImplementationIntFracTest:testIntFracNonNegExponent(int256,int256) (runs: 5096, μ: 1804, ~: 1780) LibDecimalFloatImplementationInvTest:testInv0() (gas: 4204) LibDecimalFloatImplementationInvTest:testInvGas0() (gas: 2215) -LibDecimalFloatImplementationInvTest:testInvReference(int256,int256) (runs: 5096, μ: 9620, ~: 9701) +LibDecimalFloatImplementationInvTest:testInvReference(int256,int256) (runs: 5096, μ: 9613, ~: 9689) LibDecimalFloatImplementationInvTest:testInvSlowGas0() (gas: 2527) -LibDecimalFloatImplementationLog10Test:testExactLogs() (gas: 1229922) -LibDecimalFloatImplementationLog10Test:testExactLookupsLog10() (gas: 1273910) -LibDecimalFloatImplementationLog10Test:testInterpolatedLookups() (gas: 1229175) -LibDecimalFloatImplementationLog10Test:testLog10One() (gas: 1402769) -LibDecimalFloatImplementationLog10Test:testSub1() (gas: 1230040) -LibDecimalFloatImplementationLookupLogTableValTest:testLookupLogTableVal() (gas: 1312355) -LibDecimalFloatImplementationMaximizeTest:testMaximizedEverything(int256,int256) (runs: 5096, μ: 2628, ~: 2672) +LibDecimalFloatImplementationLog10Test:testExactLogs() (gas: 1230159) +LibDecimalFloatImplementationLog10Test:testExactLookupsLog10() (gas: 1274148) +LibDecimalFloatImplementationLog10Test:testInterpolatedLookups() (gas: 1229411) +LibDecimalFloatImplementationLog10Test:testLog10One() (gas: 1403021) +LibDecimalFloatImplementationLog10Test:testSub1() (gas: 1230275) +LibDecimalFloatImplementationLookupLogTableValTest:testLookupLogTableVal() (gas: 1312590) +LibDecimalFloatImplementationMaximizeTest:testMaximizedEverything(int256,int256) (runs: 5096, μ: 2625, ~: 2672) LibDecimalFloatImplementationMaximizeTest:testMaximizedExamples() (gas: 130254) -LibDecimalFloatImplementationMaximizeTest:testMaximizedIdempotent(int256,int256) (runs: 5096, μ: 2830, ~: 2870) -LibDecimalFloatImplementationMaximizeTest:testMaximizedReference(int256,int256) (runs: 5096, μ: 6025, ~: 6636) -LibDecimalFloatImplementationMinusTest:testMinusIsSubZero(int256,int256,int256) (runs: 5096, μ: 3598, ~: 3531) +LibDecimalFloatImplementationMaximizeTest:testMaximizedIdempotent(int256,int256) (runs: 5096, μ: 2827, ~: 2865) +LibDecimalFloatImplementationMaximizeTest:testMaximizedReference(int256,int256) (runs: 5096, μ: 6034, ~: 6652) +LibDecimalFloatImplementationMinusTest:testMinusIsSubZero(int256,int256,int256) (runs: 5096, μ: 3597, ~: 3531) LibDecimalFloatImplementationMulTest:testMul123456789987654321() (gas: 1718) -LibDecimalFloatImplementationMulTest:testMul123456789987654321WithExponents(int128,int128) (runs: 5096, μ: 4980, ~: 5201) +LibDecimalFloatImplementationMulTest:testMul123456789987654321WithExponents(int128,int128) (runs: 5096, μ: 4993, ~: 5201) LibDecimalFloatImplementationMulTest:testMul1_3979_0_5() (gas: 2510) LibDecimalFloatImplementationMulTest:testMul1e181e19() (gas: 1765) LibDecimalFloatImplementationMulTest:testMulGasOne() (gas: 1450) @@ -206,62 +209,67 @@ LibDecimalFloatImplementationMulTest:testMulGasZero() (gas: 318) LibDecimalFloatImplementationMulTest:testMulMaxSignedCoefficient() (gas: 2830) LibDecimalFloatImplementationMulTest:testMulNegativeOne() (gas: 1817) LibDecimalFloatImplementationMulTest:testMulNegativeOneOne() (gas: 1873) -LibDecimalFloatImplementationMulTest:testMulNotRevertAnyExpectation(int256,int256,int256,int256) (runs: 5096, μ: 6043, ~: 5223) +LibDecimalFloatImplementationMulTest:testMulNotRevertAnyExpectation(int256,int256,int256,int256) (runs: 5096, μ: 6046, ~: 5223) LibDecimalFloatImplementationMulTest:testMulOneNegativeOne() (gas: 1849) LibDecimalFloatImplementationMulTest:testMulOneOne() (gas: 1741) LibDecimalFloatImplementationMulTest:testMulOneZero() (gas: 655) LibDecimalFloatImplementationMulTest:testMulZero0Exponent() (gas: 677) LibDecimalFloatImplementationMulTest:testMulZeroAnyExponent(int64,int64) (runs: 5096, μ: 877, ~: 877) LibDecimalFloatImplementationMulTest:testMulZeroOne() (gas: 612) -LibDecimalFloatImplementationPow10Test:testExactLookupsPow10() (gas: 1243871) -LibDecimalFloatImplementationPow10Test:testExactPows() (gas: 1224263) -LibDecimalFloatImplementationPow10Test:testInterpolatedLookupsPower() (gas: 1258298) -LibDecimalFloatImplementationPow10Test:testNoRevert(int224,int32) (runs: 5096, μ: 1223642, ~: 1223730) -LibDecimalFloatImplementationPow10Test:testPow10One() (gas: 1434006) -LibDecimalFloatImplementationSubTest:testSubIsAdd(int256,int256,int256,int256) (runs: 5096, μ: 10280, ~: 10441) -LibDecimalFloatImplementationSubTest:testSubMinSignedValue(int256,int256,int256) (runs: 5096, μ: 6585, ~: 6681) +LibDecimalFloatImplementationPow10Test:testExactLookupsPow10() (gas: 1244107) +LibDecimalFloatImplementationPow10Test:testExactPows() (gas: 1224498) +LibDecimalFloatImplementationPow10Test:testInterpolatedLookupsPower() (gas: 1258533) +LibDecimalFloatImplementationPow10Test:testNoRevert(int224,int32) (runs: 5096, μ: 1223752, ~: 1222475) +LibDecimalFloatImplementationPow10Test:testPow10One() (gas: 1434249) +LibDecimalFloatImplementationSubTest:testSubIsAdd(int256,int256,int256,int256) (runs: 5096, μ: 10262, ~: 10418) +LibDecimalFloatImplementationSubTest:testSubMinSignedValue(int256,int256,int256) (runs: 5096, μ: 6571, ~: 6665) LibDecimalFloatImplementationSubTest:testSubOneFromMax() (gas: 3331) LibDecimalFloatImplementationSubTest:testSubSelf(int224,int32) (runs: 5096, μ: 2931, ~: 3037) -LibDecimalFloatImplementationUnabsUnsignedMulOrDivLossyTest:testUnabsUnsignedMulOrDivLossyMixedAB(uint256,uint256,uint256,int256) (runs: 5096, μ: 1609, ~: 1545) -LibDecimalFloatImplementationUnabsUnsignedMulOrDivLossyTest:testUnabsUnsignedMulOrDivLossyMixedABOverflow(uint256,uint256,uint256,int256) (runs: 5096, μ: 5583, ~: 5582) -LibDecimalFloatImplementationUnabsUnsignedMulOrDivLossyTest:testUnabsUnsignedMulOrDivLossyMixedBA(uint256,uint256,uint256,int256) (runs: 5096, μ: 5581, ~: 5580) +LibDecimalFloatImplementationUnabsUnsignedMulOrDivLossyTest:testUnabsUnsignedMulOrDivLossyMixedAB(uint256,uint256,uint256,int256) (runs: 5096, μ: 1608, ~: 1545) +LibDecimalFloatImplementationUnabsUnsignedMulOrDivLossyTest:testUnabsUnsignedMulOrDivLossyMixedABOverflow(uint256,uint256,uint256,int256) (runs: 5096, μ: 5581, ~: 5582) +LibDecimalFloatImplementationUnabsUnsignedMulOrDivLossyTest:testUnabsUnsignedMulOrDivLossyMixedBA(uint256,uint256,uint256,int256) (runs: 5096, μ: 5580, ~: 5580) LibDecimalFloatImplementationUnabsUnsignedMulOrDivLossyTest:testUnabsUnsignedMulOrDivLossyMixedBAOverflow(uint256,uint256,int256) (runs: 5096, μ: 1449, ~: 1400) -LibDecimalFloatImplementationUnabsUnsignedMulOrDivLossyTest:testUnabsUnsignedMulOrDivLossyNegative(uint256,uint256,uint256,int256) (runs: 5096, μ: 1562, ~: 1494) -LibDecimalFloatImplementationUnabsUnsignedMulOrDivLossyTest:testUnabsUnsignedMulOrDivLossyNegativeOverflow(uint256,uint256,uint256,int256) (runs: 5096, μ: 5448, ~: 5445) -LibDecimalFloatImplementationUnabsUnsignedMulOrDivLossyTest:testUnabsUnsignedMulOrDivLossyPositive(uint256,uint256,uint256,int256) (runs: 5096, μ: 1305, ~: 1243) -LibDecimalFloatImplementationUnabsUnsignedMulOrDivLossyTest:testUnabsUnsignedMulOrDivLossyPositiveOverflow(uint256,uint256,uint256,int256) (runs: 5096, μ: 5340, ~: 5343) +LibDecimalFloatImplementationUnabsUnsignedMulOrDivLossyTest:testUnabsUnsignedMulOrDivLossyNegative(uint256,uint256,uint256,int256) (runs: 5096, μ: 1560, ~: 1494) +LibDecimalFloatImplementationUnabsUnsignedMulOrDivLossyTest:testUnabsUnsignedMulOrDivLossyNegativeOverflow(uint256,uint256,uint256,int256) (runs: 5096, μ: 5447, ~: 5445) +LibDecimalFloatImplementationUnabsUnsignedMulOrDivLossyTest:testUnabsUnsignedMulOrDivLossyPositive(uint256,uint256,uint256,int256) (runs: 5096, μ: 1303, ~: 1243) +LibDecimalFloatImplementationUnabsUnsignedMulOrDivLossyTest:testUnabsUnsignedMulOrDivLossyPositiveOverflow(uint256,uint256,uint256,int256) (runs: 5096, μ: 5339, ~: 5343) LibDecimalFloatImplementationWithTargetExponentTest:testWithTargetExponentExamples() (gas: 4372) -LibDecimalFloatImplementationWithTargetExponentTest:testWithTargetExponentLargerExponentOverflowRescaleRevert(int256,int256,int256) (runs: 5096, μ: 7936, ~: 7937) -LibDecimalFloatImplementationWithTargetExponentTest:testWithTargetExponentLargerExponentVeryLargeDiffRevert(int256,int256,int256) (runs: 5096, μ: 6784, ~: 6965) -LibDecimalFloatImplementationWithTargetExponentTest:testWithTargetExponentLargerTargetExponentNoRevert(int256,int256,int256) (runs: 5096, μ: 2944, ~: 2859) +LibDecimalFloatImplementationWithTargetExponentTest:testWithTargetExponentLargerExponentOverflowRescaleRevert(int256,int256,int256) (runs: 5096, μ: 7936, ~: 7881) +LibDecimalFloatImplementationWithTargetExponentTest:testWithTargetExponentLargerExponentVeryLargeDiffRevert(int256,int256,int256) (runs: 5096, μ: 6782, ~: 6965) +LibDecimalFloatImplementationWithTargetExponentTest:testWithTargetExponentLargerTargetExponentNoRevert(int256,int256,int256) (runs: 5096, μ: 2943, ~: 2756) LibDecimalFloatImplementationWithTargetExponentTest:testWithTargetExponentMaxOverflow(int256) (runs: 5096, μ: 594, ~: 594) LibDecimalFloatImplementationWithTargetExponentTest:testWithTargetExponentSameExponentNoop(int256,int256) (runs: 5096, μ: 549, ~: 549) LibDecimalFloatImplementationWithTargetExponentTest:testWithTargetExponentScaleDown(int256,int256,int256) (runs: 5096, μ: 3723, ~: 3706) -LibDecimalFloatImplementationWithTargetExponentTest:testWithTargetExponentScaleUpLargeDiffRevert(int256,int256,int256) (runs: 5096, μ: 6971, ~: 7158) -LibDecimalFloatImplementationWithTargetExponentTest:testWithTargetExponentScaleUpNotOverflow(int256,int256,int256) (runs: 5096, μ: 6782, ~: 6779) -LibDecimalFloatImplementationWithTargetExponentTest:testWithTargetExponentScaleUpOverflow(int256,int256,int256) (runs: 5096, μ: 7690, ~: 7663) -LibDecimalFloatImplementationWithTargetExponentTest:testWithTargetExponentSmallerExponentNoRevert(int256,int256,int256) (runs: 5096, μ: 7117, ~: 7015) -LibDecimalFloatImplementationWithTargetExponentTest:testWithTargetExponentTargetMoreThan76Larger(int256,int256,int256) (runs: 5096, μ: 3048, ~: 3067) -LibDecimalFloatInvTest:testInvMem(bytes32) (runs: 5096, μ: 7969, ~: 8094) +LibDecimalFloatImplementationWithTargetExponentTest:testWithTargetExponentScaleUpLargeDiffRevert(int256,int256,int256) (runs: 5096, μ: 6968, ~: 7158) +LibDecimalFloatImplementationWithTargetExponentTest:testWithTargetExponentScaleUpNotOverflow(int256,int256,int256) (runs: 5096, μ: 6783, ~: 6779) +LibDecimalFloatImplementationWithTargetExponentTest:testWithTargetExponentScaleUpOverflow(int256,int256,int256) (runs: 5096, μ: 7689, ~: 7663) +LibDecimalFloatImplementationWithTargetExponentTest:testWithTargetExponentSmallerExponentNoRevert(int256,int256,int256) (runs: 5096, μ: 7121, ~: 7015) +LibDecimalFloatImplementationWithTargetExponentTest:testWithTargetExponentTargetMoreThan76Larger(int256,int256,int256) (runs: 5096, μ: 3046, ~: 3067) +LibDecimalFloatIntegerTest:testIntegerExamples() (gas: 31205) +LibDecimalFloatIntegerTest:testIntegerInRange(int224,int256) (runs: 5096, μ: 3472, ~: 3538) +LibDecimalFloatIntegerTest:testIntegerLessThanMin(int224,int256) (runs: 5096, μ: 2817, ~: 2863) +LibDecimalFloatIntegerTest:testIntegerNonNegative(int224,int256) (runs: 5096, μ: 2484, ~: 2617) +LibDecimalFloatIntegerTest:testIntegerNotReverts(bytes32) (runs: 5096, μ: 601, ~: 603) +LibDecimalFloatInvTest:testInvMem(bytes32) (runs: 5096, μ: 7981, ~: 8094) LibDecimalFloatIsZeroTest:testIsZeroDeployed(bytes32) (runs: 5096, μ: 1063, ~: 1063) LibDecimalFloatIsZeroTest:testIsZeroEqZero(bytes32) (runs: 5096, μ: 684, ~: 684) LibDecimalFloatIsZeroTest:testIsZeroExamples(int32) (runs: 5096, μ: 977, ~: 977) LibDecimalFloatIsZeroTest:testNotIsZero(int224,int32) (runs: 5096, μ: 3592, ~: 3592) -LibDecimalFloatLog10Test:testLog10Packed(bytes32) (runs: 5096, μ: 1706922, ~: 1245448) +LibDecimalFloatLog10Test:testLog10Packed(bytes32) (runs: 5096, μ: 1707320, ~: 1245624) LibDecimalFloatLtTest:testLtExamples() (gas: 1161) LibDecimalFloatLtTest:testLtGasAZero() (gas: 953) LibDecimalFloatLtTest:testLtGasBZero() (gas: 1019) LibDecimalFloatLtTest:testLtGasBothZero() (gas: 944) LibDecimalFloatLtTest:testLtGasDifferentSigns() (gas: 1008) LibDecimalFloatLtTest:testLtGasExponentDiffOverflow() (gas: 1091) -LibDecimalFloatLtTest:testLtNegativeVsPositive(int256,int32,int256,int32) (runs: 5096, μ: 4287, ~: 4298) +LibDecimalFloatLtTest:testLtNegativeVsPositive(int256,int32,int256,int32) (runs: 5096, μ: 4286, ~: 4298) LibDecimalFloatLtTest:testLtNegativeVsZero(int256,int32,int32) (runs: 5096, μ: 3023, ~: 3302) LibDecimalFloatLtTest:testLtOneEAny(int224,int32) (runs: 5096, μ: 1089, ~: 1090) -LibDecimalFloatLtTest:testLtReference(bytes32,bytes32) (runs: 5096, μ: 2444, ~: 2250) -LibDecimalFloatLtTest:testLtVsEqualVsGt(bytes32,bytes32) (runs: 5096, μ: 1513, ~: 1361) +LibDecimalFloatLtTest:testLtReference(bytes32,bytes32) (runs: 5096, μ: 2460, ~: 2250) +LibDecimalFloatLtTest:testLtVsEqualVsGt(bytes32,bytes32) (runs: 5096, μ: 1511, ~: 1361) LibDecimalFloatLtTest:testLtX(int224) (runs: 5096, μ: 981, ~: 982) -LibDecimalFloatLtTest:testLtXEAnyVsXEAny(int256,int32,int32) (runs: 5096, μ: 3202, ~: 3442) -LibDecimalFloatLtTest:testLtXEAnyVsXEAnyNegative(int256,int32,int32) (runs: 5096, μ: 3418, ~: 3671) +LibDecimalFloatLtTest:testLtXEAnyVsXEAny(int256,int32,int32) (runs: 5096, μ: 3200, ~: 3442) +LibDecimalFloatLtTest:testLtXEAnyVsXEAnyNegative(int256,int32,int32) (runs: 5096, μ: 3416, ~: 3671) LibDecimalFloatLtTest:testLtZero(int32,int32) (runs: 5096, μ: 1311, ~: 1311) LibDecimalFloatLteTest:testLteGasAZero() (gas: 1002) LibDecimalFloatLteTest:testLteGasBZero() (gas: 1004) @@ -269,52 +277,52 @@ LibDecimalFloatLteTest:testLteGasBothZero() (gas: 738) LibDecimalFloatLteTest:testLteGasDifferentSigns() (gas: 1013) LibDecimalFloatLteTest:testLteGasExponentDiffOverflow() (gas: 1118) LibDecimalFloatLteTest:testLteOneEAny(bytes32) (runs: 5096, μ: 657, ~: 657) -LibDecimalFloatLteTest:testLteReference(int224,int32,int224,int32) (runs: 5096, μ: 8056, ~: 9010) +LibDecimalFloatLteTest:testLteReference(int224,int32,int224,int32) (runs: 5096, μ: 8096, ~: 9187) LibDecimalFloatLteTest:testLteX(int224,int32) (runs: 5096, μ: 1088, ~: 1089) -LibDecimalFloatLteTest:testLteXEAnyVsXEAny(int256,int32,int32) (runs: 5096, μ: 3214, ~: 3454) -LibDecimalFloatLteTest:testLteXEAnyVsXEAnyNegative(int256,int32,int32) (runs: 5096, μ: 3430, ~: 3683) +LibDecimalFloatLteTest:testLteXEAnyVsXEAny(int256,int32,int32) (runs: 5096, μ: 3211, ~: 3454) +LibDecimalFloatLteTest:testLteXEAnyVsXEAnyNegative(int256,int32,int32) (runs: 5096, μ: 3428, ~: 3683) LibDecimalFloatLteTest:testLteXNotLtY(bytes32,bytes32) (runs: 5096, μ: 1063, ~: 962) -LibDecimalFloatLteTest:testLteXPositiveYNegative(int256,int32,int256,int32) (runs: 5096, μ: 3934, ~: 3936) +LibDecimalFloatLteTest:testLteXPositiveYNegative(int256,int32,int256,int32) (runs: 5096, μ: 3935, ~: 3936) LibDecimalFloatLteTest:testLteXPositiveYZero(int256,int32,int32) (runs: 5096, μ: 2503, ~: 2776) LibDecimalFloatLteTest:testLteZero(int32,int32) (runs: 5096, μ: 1632, ~: 1632) LibDecimalFloatMaxTest:testMaxX(bytes32) (runs: 5096, μ: 1105, ~: 1105) -LibDecimalFloatMaxTest:testMaxXY(bytes32,bytes32) (runs: 5096, μ: 1570, ~: 1468) +LibDecimalFloatMaxTest:testMaxXY(bytes32,bytes32) (runs: 5096, μ: 1569, ~: 1468) LibDecimalFloatMaxTest:testMaxXYEqual(bytes32) (runs: 5096, μ: 1511, ~: 1511) -LibDecimalFloatMaxTest:testMaxXYGreater(bytes32,bytes32) (runs: 5096, μ: 4898, ~: 4752) -LibDecimalFloatMaxTest:testMaxXYLess(bytes32,bytes32) (runs: 5096, μ: 4922, ~: 4763) +LibDecimalFloatMaxTest:testMaxXYGreater(bytes32,bytes32) (runs: 5096, μ: 4897, ~: 4752) +LibDecimalFloatMaxTest:testMaxXYLess(bytes32,bytes32) (runs: 5096, μ: 4920, ~: 4763) LibDecimalFloatMinTest:testMinX(bytes32) (runs: 5096, μ: 1127, ~: 1127) -LibDecimalFloatMinTest:testMinXY(bytes32,bytes32) (runs: 5096, μ: 1570, ~: 1468) +LibDecimalFloatMinTest:testMinXY(bytes32,bytes32) (runs: 5096, μ: 1569, ~: 1468) LibDecimalFloatMinTest:testMinXYEqual(bytes32) (runs: 5096, μ: 1531, ~: 1531) -LibDecimalFloatMinTest:testMinXYGreater(bytes32,bytes32) (runs: 5096, μ: 4847, ~: 4697) -LibDecimalFloatMinTest:testMinXYLess(bytes32,bytes32) (runs: 5096, μ: 4870, ~: 4708) -LibDecimalFloatMinusTest:testMinusPacked(bytes32) (runs: 5096, μ: 2417, ~: 2419) -LibDecimalFloatMixedTest:testDiv1Over3Mixed() (gas: 7258) -LibDecimalFloatMulTest:testMulPacked(bytes32,bytes32) (runs: 5096, μ: 6962, ~: 7451) -LibDecimalFloatPackTest:testPackExponentOverflow(int256,int256) (runs: 5096, μ: 6347, ~: 6519) -LibDecimalFloatPackTest:testPackNegativeExponentLossyZero(int256,int256) (runs: 5096, μ: 6088, ~: 6225) +LibDecimalFloatMinTest:testMinXYGreater(bytes32,bytes32) (runs: 5096, μ: 4845, ~: 4697) +LibDecimalFloatMinTest:testMinXYLess(bytes32,bytes32) (runs: 5096, μ: 4869, ~: 4708) +LibDecimalFloatMinusTest:testMinusPacked(bytes32) (runs: 5096, μ: 2412, ~: 2414) +LibDecimalFloatMixedTest:testDiv1Over3Mixed() (gas: 7248) +LibDecimalFloatMulTest:testMulPacked(bytes32,bytes32) (runs: 5096, μ: 6961, ~: 7446) +LibDecimalFloatPackTest:testPackExponentOverflow(int256,int256) (runs: 5096, μ: 6348, ~: 6519) +LibDecimalFloatPackTest:testPackNegativeExponentLossyZero(int256,int256) (runs: 5096, μ: 6089, ~: 6225) LibDecimalFloatPackTest:testPackZero(int256) (runs: 5096, μ: 654, ~: 654) LibDecimalFloatPackTest:testPartsRoundTrip(int224,int32) (runs: 5096, μ: 1021, ~: 1022) -LibDecimalFloatPow10Test:testPow10Packed(bytes32) (runs: 5096, μ: 1780209, ~: 1232182) -LibDecimalFloatPowTest:testNegativePowError(bytes32,bytes32) (runs: 5096, μ: 1216354, ~: 1216486) -LibDecimalFloatPowTest:testPowAZero(int32,bytes32) (runs: 5096, μ: 1215095, ~: 1215095) -LibDecimalFloatPowTest:testPowAZeroNegative(bytes32) (runs: 5096, μ: 1215967, ~: 1215967) -LibDecimalFloatPowTest:testPowBOne(bytes32) (runs: 5096, μ: 1423042, ~: 1423008) -LibDecimalFloatPowTest:testPowBZero(bytes32,int32) (runs: 5096, μ: 1212165, ~: 1212165) -LibDecimalFloatPowTest:testPows() (gas: 1649967) -LibDecimalFloatPowTest:testRoundTripFuzzPow(bytes32,bytes32) (runs: 5096, μ: 1235520, ~: 1212956) -LibDecimalFloatPowTest:testRoundTripSimple() (gas: 1840934) -LibDecimalFloatSqrtTest:testRoundTripFuzzSqrt(int224,int32) (runs: 5096, μ: 1271452, ~: 1278272) -LibDecimalFloatSqrtTest:testSqrt() (gas: 1270384) -LibDecimalFloatSqrtTest:testSqrtNegative(bytes32) (runs: 5096, μ: 1216063, ~: 1216198) -LibDecimalFloatSqrtTest:testSqrtRoundTrip() (gas: 1487094) -LibDecimalFloatSubTest:testSubPacked(bytes32,bytes32) (runs: 5096, μ: 8970, ~: 9348) +LibDecimalFloatPow10Test:testPow10Packed(bytes32) (runs: 5096, μ: 1782449, ~: 1232413) +LibDecimalFloatPowTest:testNegativePowError(bytes32,bytes32) (runs: 5096, μ: 1216587, ~: 1216716) +LibDecimalFloatPowTest:testPowAZero(int32,bytes32) (runs: 5096, μ: 1215330, ~: 1215330) +LibDecimalFloatPowTest:testPowAZeroNegative(bytes32) (runs: 5096, μ: 1216203, ~: 1216203) +LibDecimalFloatPowTest:testPowBOne(bytes32) (runs: 5096, μ: 1423290, ~: 1423256) +LibDecimalFloatPowTest:testPowBZero(bytes32,int32) (runs: 5096, μ: 1212400, ~: 1212400) +LibDecimalFloatPowTest:testPows() (gas: 1650149) +LibDecimalFloatPowTest:testRoundTripFuzzPow(bytes32,bytes32) (runs: 5096, μ: 1239620, ~: 1213191) +LibDecimalFloatPowTest:testRoundTripSimple() (gas: 1840912) +LibDecimalFloatSqrtTest:testRoundTripFuzzSqrt(int224,int32) (runs: 5096, μ: 1272704, ~: 1278751) +LibDecimalFloatSqrtTest:testSqrt() (gas: 1270606) +LibDecimalFloatSqrtTest:testSqrtNegative(bytes32) (runs: 5096, μ: 1216295, ~: 1216428) +LibDecimalFloatSqrtTest:testSqrtRoundTrip() (gas: 1487129) +LibDecimalFloatSubTest:testSubPacked(bytes32,bytes32) (runs: 5096, μ: 8954, ~: 9343) LibFormatDecimalFloatCountSigFigs:testCountSigFigsExamples() (gas: 47425) -LibFormatDecimalFloatCountSigFigs:testCountSigFigsOne(int256) (runs: 5096, μ: 22601, ~: 22120) +LibFormatDecimalFloatCountSigFigs:testCountSigFigsOne(int256) (runs: 5096, μ: 22660, ~: 22580) LibFormatDecimalFloatCountSigFigs:testCountSigFigsZero(int256) (runs: 5096, μ: 520, ~: 520) LibFormatDecimalFloatToDecimalStringTest:testFormatDecimalExamples() (gas: 709867) LibFormatDecimalFloatToDecimalStringTest:testFormatDecimalRoundTripExamples() (gas: 675881) -LibFormatDecimalFloatToDecimalStringTest:testFormatDecimalRoundTripNegative(int256,bool) (runs: 5096, μ: 55659, ~: 52770) -LibFormatDecimalFloatToDecimalStringTest:testFormatDecimalRoundTripNonNegative(uint256,bool) (runs: 5096, μ: 41888, ~: 44041) +LibFormatDecimalFloatToDecimalStringTest:testFormatDecimalRoundTripNegative(int256,bool) (runs: 5096, μ: 55629, ~: 52164) +LibFormatDecimalFloatToDecimalStringTest:testFormatDecimalRoundTripNonNegative(uint256,bool) (runs: 5096, μ: 41911, ~: 44041) LibLogTableBytesTest:testToBytesAntiLogTableDec() (gas: 153244) LibLogTableBytesTest:testToBytesAntiLogTableDecSmall() (gas: 158078) LibLogTableBytesTest:testToBytesLogTableDec() (gas: 137440) @@ -337,7 +345,7 @@ LibParseDecimalFloatTest:testParseLiteralDecimalFloatEDot() (gas: 972) LibParseDecimalFloatTest:testParseLiteralDecimalFloatExponentRevert5() (gas: 980) LibParseDecimalFloatTest:testParseLiteralDecimalFloatExponentRevert6() (gas: 970) LibParseDecimalFloatTest:testParseLiteralDecimalFloatExponents() (gas: 321070) -LibParseDecimalFloatTest:testParseLiteralDecimalFloatFuzz(uint256,uint8,bool) (runs: 5096, μ: 33846, ~: 27205) +LibParseDecimalFloatTest:testParseLiteralDecimalFloatFuzz(uint256,uint8,bool) (runs: 5096, μ: 33866, ~: 27228) LibParseDecimalFloatTest:testParseLiteralDecimalFloatLeadingZeros() (gas: 47427) LibParseDecimalFloatTest:testParseLiteralDecimalFloatNegativeE() (gas: 2799) LibParseDecimalFloatTest:testParseLiteralDecimalFloatNegativeFrac() (gas: 1930) @@ -345,5 +353,5 @@ LibParseDecimalFloatTest:testParseLiteralDecimalFloatPrecisionRevert0() (gas: 24 LibParseDecimalFloatTest:testParseLiteralDecimalFloatPrecisionRevert1() (gas: 21607) LibParseDecimalFloatTest:testParseLiteralDecimalFloatSpecific() (gas: 12389) LibParseDecimalFloatTest:testParseLiteralDecimalFloatUnrelated() (gas: 35350) -LibParseDecimalFloatTest:testParsePacked(string) (runs: 5096, μ: 6164, ~: 5242) +LibParseDecimalFloatTest:testParsePacked(string) (runs: 5096, μ: 6170, ~: 5242) TestDecimalFloatUnpackTest:testUnpackDeployed(bytes32) (runs: 5096, μ: 163108, ~: 163108) \ No newline at end of file diff --git a/test/src/lib/deploy/LibDecimalFloatDeploy.t.sol b/test/src/lib/deploy/LibDecimalFloatDeploy.t.sol index 61692594..ea993cf9 100644 --- a/test/src/lib/deploy/LibDecimalFloatDeploy.t.sol +++ b/test/src/lib/deploy/LibDecimalFloatDeploy.t.sol @@ -42,5 +42,6 @@ contract LibDecimalFloatDeployTest is Test { } assertEq(deployedAddress.codehash, LibDecimalFloatDeploy.LOG_TABLES_DATA_CONTRACT_HASH); + assertTrue(address(deployedAddress).code.length > 0, "Deployed address has no code"); } } From b6386fa6ea8f2e134bd55d553f5450a787c7e64b Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Sun, 8 Feb 2026 20:19:30 +0400 Subject: [PATCH 24/24] lint --- test/src/lib/deploy/LibDecimalFloatDeploy.t.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/src/lib/deploy/LibDecimalFloatDeploy.t.sol b/test/src/lib/deploy/LibDecimalFloatDeploy.t.sol index ea993cf9..8800a386 100644 --- a/test/src/lib/deploy/LibDecimalFloatDeploy.t.sol +++ b/test/src/lib/deploy/LibDecimalFloatDeploy.t.sol @@ -2,7 +2,7 @@ // SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd pragma solidity =0.8.25; -import {Test, console2} from "forge-std/Test.sol"; +import {Test} from "forge-std/Test.sol"; import {LibRainDeploy} from "rain.deploy/lib/LibRainDeploy.sol"; import {LibDecimalFloatDeploy, DecimalFloat} from "src/lib/deploy/LibDecimalFloatDeploy.sol"; import {LibDataContract} from "rain.datacontract/lib/LibDataContract.sol";