From 4f20ed69cf58fe310f01dc7aa80eef69ac6da526 Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Wed, 8 Oct 2025 16:15:34 +0400 Subject: [PATCH 01/94] flake update --- flake.lock | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/flake.lock b/flake.lock index 588c043098..18c99cf49a 100644 --- a/flake.lock +++ b/flake.lock @@ -182,11 +182,11 @@ "nixpkgs": "nixpkgs_5" }, "locked": { - "lastModified": 1741023058, - "narHash": "sha256-LSd/8CBlpDLjci5ANFJjP0w+dGdY/mqKsyUfhjGwnfs=", + "lastModified": 1758705030, + "narHash": "sha256-zYM8PiEXANNrtjfyGUc7w37/D/kCynp0cQS+wCQ77GI=", "owner": "shazow", "repo": "foundry.nix", - "rev": "66becfe20b7e688b8f2e5774609c4436cf202ba0", + "rev": "b59a55014050110170023e3e1c277c1d4a2f055b", "type": "github" }, "original": { @@ -272,11 +272,11 @@ }, "nixpkgs_6": { "locked": { - "lastModified": 1749104371, - "narHash": "sha256-m2NmOPd6XgBiskmUq/BS9Xxuf3z0ebnGVfSKNAO5NEM=", + "lastModified": 1758711836, + "narHash": "sha256-uBqPg7wNX2v6YUdTswH7wWU8wqb60cFZx0tHaWTGF30=", "owner": "nixos", "repo": "nixpkgs", - "rev": "48975d7f9b9960ed33c4e8561bcce20cc0c2de5b", + "rev": "46f97b78e825ae762c0224e3983c47687436a498", "type": "github" }, "original": { @@ -367,11 +367,11 @@ "solc": "solc_2" }, "locked": { - "lastModified": 1757439424, - "narHash": "sha256-slPazOVyDSOaG7uL/E4Er2gbS5Zx7037oYHrSE2GuO4=", + "lastModified": 1758730752, + "narHash": "sha256-ZQ1INSsEWYgb1NdC5zo6nu1ObLzOCDI+wjiZ4222fQ8=", "owner": "rainlanguage", "repo": "rainix", - "rev": "7f734b1da77771b5d6ee5449f43c2a1a43705149", + "rev": "cc7c9bbbd9b817aa3a6a5c994262e14fb0bc920c", "type": "github" }, "original": { @@ -411,11 +411,11 @@ "nixpkgs": "nixpkgs_7" }, "locked": { - "lastModified": 1749091064, - "narHash": "sha256-TGtYjzRX0sueFhwYsnNNFF5TTKnpnloznpIghLzxeXo=", + "lastModified": 1758681214, + "narHash": "sha256-8cW731vev6kfr58cILO2ZsjHwaPhm88dQ8Q6nTSjP9I=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "12419593ce78f2e8e1e89a373c6515885e218acb", + "rev": "b12ed88d8d33d4f3cbc842bf29fad93bb1437299", "type": "github" }, "original": { @@ -446,13 +446,13 @@ "solc-macos-amd64-list-json": { "flake": false, "locked": { - "narHash": "sha256-U5ckttxwKO13gIKggel6iybG5oTDbSidPR5nH3Gs+kY=", + "narHash": "sha256-AvITkfpNYgCypXuLJyqco0li+unVw39BAfdOZvd/SPE=", "type": "file", - "url": "https://github.com/ethereum/solc-bin/raw/30a3695/macosx-amd64/list.json" + "url": "https://github.com/argotorg/solc-bin/raw/26fc3fd/macosx-amd64/list.json" }, "original": { "type": "file", - "url": "https://github.com/ethereum/solc-bin/raw/30a3695/macosx-amd64/list.json" + "url": "https://github.com/argotorg/solc-bin/raw/26fc3fd/macosx-amd64/list.json" } }, "solc_2": { @@ -462,11 +462,11 @@ "solc-macos-amd64-list-json": "solc-macos-amd64-list-json" }, "locked": { - "lastModified": 1748780655, - "narHash": "sha256-mradCdMvjXwKd7kVFACB/d1CP2LLCyEgUu4vJCSzNLU=", + "lastModified": 1756368702, + "narHash": "sha256-cqEHv7uCV0LibmQphyiXZ1+jYtGjMNb9Pae4tfcAcF8=", "owner": "hellwolf", "repo": "solc.nix", - "rev": "3b6f3223ace5a7bc400b01a434d86bb1cb2593fb", + "rev": "d83e90df2fa8359a690f6baabf76099432193c3f", "type": "github" }, "original": { From 4079205f7872a04bd017c75ed0230e6ae1fb2680 Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Wed, 8 Oct 2025 16:16:54 +0400 Subject: [PATCH 02/94] foundry lock --- foundry.lock | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 foundry.lock diff --git a/foundry.lock b/foundry.lock new file mode 100644 index 0000000000..985f0143db --- /dev/null +++ b/foundry.lock @@ -0,0 +1,11 @@ +{ + "lib/rain.interpreter": { + "rev": "ff1d064d8fef013d17934694b59aecafad8409b9" + }, + "lib/rain.orderbook.interface": { + "rev": "698588adcf35117864fe56fef8b83f436b6db2b1" + }, + "lib/sushixswap-v2": { + "rev": "ca38c64cf7c3042f6427414d7bff61c54293da51" + } +} \ No newline at end of file From cf147481f8e0a77972794a6ade0afeba471ad329 Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Wed, 8 Oct 2025 16:17:53 +0400 Subject: [PATCH 03/94] update deps --- foundry.lock | 4 ++-- lib/rain.interpreter | 2 +- lib/rain.orderbook.interface | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/foundry.lock b/foundry.lock index 985f0143db..059407d415 100644 --- a/foundry.lock +++ b/foundry.lock @@ -1,9 +1,9 @@ { "lib/rain.interpreter": { - "rev": "ff1d064d8fef013d17934694b59aecafad8409b9" + "rev": "6068857887731d910f3f1850c5f27248fce3a5d5" }, "lib/rain.orderbook.interface": { - "rev": "698588adcf35117864fe56fef8b83f436b6db2b1" + "rev": "26d2a017e98d081f38d0fcff92690e3fc6c204e2" }, "lib/sushixswap-v2": { "rev": "ca38c64cf7c3042f6427414d7bff61c54293da51" diff --git a/lib/rain.interpreter b/lib/rain.interpreter index ff1d064d8f..6068857887 160000 --- a/lib/rain.interpreter +++ b/lib/rain.interpreter @@ -1 +1 @@ -Subproject commit ff1d064d8fef013d17934694b59aecafad8409b9 +Subproject commit 6068857887731d910f3f1850c5f27248fce3a5d5 diff --git a/lib/rain.orderbook.interface b/lib/rain.orderbook.interface index 698588adcf..26d2a017e9 160000 --- a/lib/rain.orderbook.interface +++ b/lib/rain.orderbook.interface @@ -1 +1 @@ -Subproject commit 698588adcf35117864fe56fef8b83f436b6db2b1 +Subproject commit 26d2a017e98d081f38d0fcff92690e3fc6c204e2 From 08e1c4ecf1ebc2f8b5601fbf2daf7101bc395e94 Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Thu, 9 Oct 2025 21:58:49 +0400 Subject: [PATCH 04/94] wip on size --- .gitmodules | 3 + foundry.toml | 1 + lib/rain.tofu.erc20-decimals | 1 + .../OrderBookV4FlashLenderDisabled.sol | 58 +++++++++ src/abstract/OrderBookV5ArbOrderTaker.sol | 8 +- src/abstract/OrderBookV5FlashBorrower.sol | 8 +- src/concrete/ob/OrderBook.sol | 42 +++---- src/lib/LibTOFUTokenDecimals.sol | 118 ------------------ 8 files changed, 87 insertions(+), 152 deletions(-) create mode 160000 lib/rain.tofu.erc20-decimals create mode 100644 src/abstract/OrderBookV4FlashLenderDisabled.sol delete mode 100644 src/lib/LibTOFUTokenDecimals.sol diff --git a/.gitmodules b/.gitmodules index 06a43b1656..b78d173c56 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,3 +7,6 @@ [submodule "lib/rain.interpreter"] path = lib/rain.interpreter url = https://github.com/rainlanguage/rain.interpreter +[submodule "lib/rain.tofu.erc20-decimals"] + path = lib/rain.tofu.erc20-decimals + url = https://github.com/rainlanguage/rain.tofu.erc20-decimals diff --git a/foundry.toml b/foundry.toml index 3b03b09eaf..869fc60ad2 100644 --- a/foundry.toml +++ b/foundry.toml @@ -45,6 +45,7 @@ remappings = [ "rain.sol.codegen/=lib/rain.interpreter/lib/rain.interpreter.interface/lib/rain.sol.codegen/src/", "rain.solmem/=lib/rain.orderbook.interface/lib/rain.interpreter.interface/lib/rain.solmem/src", "rain.math.float/=lib/rain.orderbook.interface/lib/rain.interpreter.interface/lib/rain.math.float/src/", + "rain.tofu.erc20-decimals/=lib/rain.tofu.erc20-decimals/src/", ] [fuzz] diff --git a/lib/rain.tofu.erc20-decimals b/lib/rain.tofu.erc20-decimals new file mode 160000 index 0000000000..47f08161a1 --- /dev/null +++ b/lib/rain.tofu.erc20-decimals @@ -0,0 +1 @@ +Subproject commit 47f08161a1a7cd87c75da7fb11da9399e87b0d48 diff --git a/src/abstract/OrderBookV4FlashLenderDisabled.sol b/src/abstract/OrderBookV4FlashLenderDisabled.sol new file mode 100644 index 0000000000..fd8ffbb465 --- /dev/null +++ b/src/abstract/OrderBookV4FlashLenderDisabled.sol @@ -0,0 +1,58 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.19; + +import {ERC165, IERC165} from "openzeppelin-contracts/contracts/utils/introspection/ERC165.sol"; +import {IERC20} from "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; +import {SafeERC20} from "openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol"; + +import { + IERC3156FlashBorrower, + ON_FLASH_LOAN_CALLBACK_SUCCESS +} from "rain.orderbook.interface/interface/ierc3156/IERC3156FlashBorrower.sol"; +import {IERC3156FlashLender} from "rain.orderbook.interface/interface/ierc3156/IERC3156FlashLender.sol"; + +/// Thrown when the `onFlashLoan` callback returns anything other than +/// ON_FLASH_LOAN_CALLBACK_SUCCESS. +/// @param result The value that was returned by `onFlashLoan`. +error FlashLenderCallbackFailed(bytes32 result); + +/// @dev Flash fee is always 0 for orderbook as there's no entity to take +/// revenue for `Orderbook` and its more important anyway that flashloans happen +/// to connect external liquidity to live orders via arbitrage. +uint256 constant FLASH_FEE = 0; + +/// @title OrderBookV4FlashLender +/// @notice Implements `IERC3156FlashLender` for `OrderBook`. Based on the +/// reference implementation by Alberto Cuesta Cañada found at +/// https://eips.ethereum.org/EIPS/eip-3156#flash-loan-reference-implementation +abstract contract OrderBookV4FlashLenderDisabled is IERC3156FlashLender, ERC165 { + using SafeERC20 for IERC20; + + /// @inheritdoc IERC165 + function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { + return interfaceId == type(IERC3156FlashLender).interfaceId || super.supportsInterface(interfaceId); + } + + /// @inheritdoc IERC3156FlashLender + function flashLoan(IERC3156FlashBorrower , address , uint256 , bytes calldata ) + external + override + returns (bool) + { + revert FlashLenderCallbackFailed(0); + } + + /// @inheritdoc IERC3156FlashLender + function flashFee(address, uint256) external pure override returns (uint256) { + return FLASH_FEE; + } + + /// There's no limit to the size of a flash loan from `Orderbook` other than + /// the current tokens deposited in `Orderbook`. If there is an active debt + /// then loans are disabled so the max becomes `0` until after repayment. + /// @inheritdoc IERC3156FlashLender + function maxFlashLoan(address ) external view override returns (uint256) { + return 0; + } +} diff --git a/src/abstract/OrderBookV5ArbOrderTaker.sol b/src/abstract/OrderBookV5ArbOrderTaker.sol index 4a2cf50388..330440e9e0 100644 --- a/src/abstract/OrderBookV5ArbOrderTaker.sol +++ b/src/abstract/OrderBookV5ArbOrderTaker.sol @@ -29,7 +29,7 @@ import {LibBytecode} from "rain.interpreter.interface/lib/bytecode/LibBytecode.s import {LibOrderBook} from "../lib/LibOrderBook.sol"; import {LibOrderBookArb, NonZeroBeforeArbStack, BadLender} from "../lib/LibOrderBookArb.sol"; import {IOrderBookV5OrderTaker} from "rain.orderbook.interface/interface/unstable/IOrderBookV5OrderTaker.sol"; -import {LibTOFUTokenDecimals, TOFUTokenDecimals} from "../lib/LibTOFUTokenDecimals.sol"; +import {LibTOFUTokenDecimals} from "rain.tofu.erc20-decimals/lib/LibTOFUTokenDecimals.sol"; /// Thrown when "before arb" wants inputs that we don't have. error NonZeroBeforeArbInputs(uint256 inputs); @@ -47,8 +47,6 @@ abstract contract OrderBookV5ArbOrderTaker is { using SafeERC20 for IERC20; - mapping(address token => TOFUTokenDecimals tofuTokenDecimals) internal sTOFUTokenDecimals; - constructor(OrderBookV5ArbConfig memory config) OrderBookV5ArbCommon(config) {} /// @inheritdoc IERC165 @@ -81,9 +79,9 @@ abstract contract OrderBookV5ArbOrderTaker is LibOrderBookArb.finalizeArb( task, ordersInputToken, - LibTOFUTokenDecimals.safeDecimalsForToken(sTOFUTokenDecimals, ordersInputToken), + LibTOFUTokenDecimals.safeDecimalsForToken(ordersInputToken), ordersOutputToken, - LibTOFUTokenDecimals.safeDecimalsForToken(sTOFUTokenDecimals, ordersOutputToken) + LibTOFUTokenDecimals.safeDecimalsForToken(ordersOutputToken) ); } diff --git a/src/abstract/OrderBookV5FlashBorrower.sol b/src/abstract/OrderBookV5FlashBorrower.sol index 36a2669e03..ac65ef63ad 100644 --- a/src/abstract/OrderBookV5FlashBorrower.sol +++ b/src/abstract/OrderBookV5FlashBorrower.sol @@ -26,7 +26,7 @@ import {OrderBookV5ArbConfig, OrderBookV5ArbCommon} from "./OrderBookV5ArbCommon import {EvaluableV4, SignedContextV1} from "rain.interpreter.interface/interface/unstable/IInterpreterCallerV4.sol"; import {LibOrderBook} from "../lib/LibOrderBook.sol"; import {LibOrderBookArb, NonZeroBeforeArbStack, BadLender} from "../lib/LibOrderBookArb.sol"; -import {LibTOFUTokenDecimals, TOFUTokenDecimals} from "../lib/LibTOFUTokenDecimals.sol"; +import {LibTOFUTokenDecimals} from "rain.tofu.erc20-decimals/lib/LibTOFUTokenDecimals.sol"; import {LibDecimalFloat} from "rain.math.float/lib/LibDecimalFloat.sol"; /// Thrown when the initiator is not the order book. @@ -73,8 +73,6 @@ abstract contract OrderBookV5FlashBorrower is IERC3156FlashBorrower, ReentrancyG using Address for address; using SafeERC20 for IERC20; - mapping(address token => TOFUTokenDecimals tofuTokenDecimals) internal sTOFUTokenDecimals; - constructor(OrderBookV5ArbConfig memory config) OrderBookV5ArbCommon(config) {} /// @inheritdoc IERC165 @@ -160,8 +158,8 @@ abstract contract OrderBookV5FlashBorrower is IERC3156FlashBorrower, ReentrancyG address ordersOutputToken = takeOrders.orders[0].order.validOutputs[takeOrders.orders[0].outputIOIndex].token; address ordersInputToken = takeOrders.orders[0].order.validInputs[takeOrders.orders[0].inputIOIndex].token; - uint8 inputDecimals = LibTOFUTokenDecimals.safeDecimalsForToken(sTOFUTokenDecimals, ordersInputToken); - uint8 outputDecimals = LibTOFUTokenDecimals.safeDecimalsForToken(sTOFUTokenDecimals, ordersOutputToken); + uint8 inputDecimals = LibTOFUTokenDecimals.safeDecimalsForToken(ordersInputToken); + uint8 outputDecimals = LibTOFUTokenDecimals.safeDecimalsForToken(ordersOutputToken); // We can't repay more than the minimum that the orders are going to // give us and there's no reason to borrow less. diff --git a/src/concrete/ob/OrderBook.sol b/src/concrete/ob/OrderBook.sol index b6487a2513..584f60f78d 100644 --- a/src/concrete/ob/OrderBook.sol +++ b/src/concrete/ob/OrderBook.sol @@ -33,10 +33,9 @@ import {LibOrderBook} from "../../lib/LibOrderBook.sol"; import {LibDecimalFloat} from "rain.math.float/lib/LibDecimalFloat.sol"; import { LibTOFUTokenDecimals, - TOFUTokenDecimals, TOFUOutcome, TokenDecimalsReadFailure -} from "../../lib/LibTOFUTokenDecimals.sol"; +} from "rain.tofu.erc20-decimals/lib/LibTOFUTokenDecimals.sol"; import { IOrderBookV5, @@ -67,7 +66,7 @@ import { CONTEXT_VAULT_OUTPUTS_COLUMN, CONTEXT_VAULT_IO_VAULT_ID } from "../../lib/LibOrderBook.sol"; -import {OrderBookV4FlashLender} from "../../abstract/OrderBookV4FlashLender.sol"; +import {OrderBookV4FlashLenderDisabled} from "../../abstract/OrderBookV4FlashLenderDisabled.sol"; import {LibBytes32Array} from "rain.solmem/lib/LibBytes32Array.sol"; import {LibBytes32Matrix} from "rain.solmem/lib/LibBytes32Matrix.sol"; @@ -203,7 +202,7 @@ type Input18Amount is uint256; /// @title OrderBook /// See `IOrderBookV1` for more documentation. -contract OrderBook is IOrderBookV5, IMetaV1_2, ReentrancyGuard, Multicall, OrderBookV4FlashLender { +contract OrderBook is IOrderBookV5, IMetaV1_2, ReentrancyGuard, Multicall, OrderBookV4FlashLenderDisabled { using LibUint256Array for uint256[]; using SafeERC20 for IERC20; using LibOrder for OrderV4; @@ -222,8 +221,6 @@ contract OrderBook is IOrderBookV5, IMetaV1_2, ReentrancyGuard, Multicall, Order //solhint-disable-next-line private-vars-leading-underscore mapping(bytes32 orderHash => uint256 liveness) internal sOrders; - mapping(address token => TOFUTokenDecimals tofuTokenDecimals) internal sTOFUTokenDecimals; - /// @dev Vault balances are stored in a mapping of owner => token => vault ID /// This gives 1:1 parity with the `IOrderBookV1` interface but keeping the /// `sFoo` naming convention for storage variables. @@ -386,6 +383,15 @@ contract OrderBook is IOrderBookV5, IMetaV1_2, ReentrancyGuard, Multicall, Order } } + function checkTokenSelfTrade(OrderV4 memory order, uint256 inputIOIndex, uint256 outputIOIndex) + internal + pure + { + if (order.validInputs[inputIOIndex].token == order.validOutputs[outputIOIndex].token) { + revert TokenSelfTrade(); + } + } + /// @inheritdoc IOrderBookV5 function quote2(QuoteV2 calldata quoteConfig) external view returns (bool, Float, Float) { bytes32 orderHash = quoteConfig.order.hash(); @@ -394,12 +400,7 @@ contract OrderBook is IOrderBookV5, IMetaV1_2, ReentrancyGuard, Multicall, Order return (false, Float.wrap(0), Float.wrap(0)); } - if ( - quoteConfig.order.validInputs[quoteConfig.inputIOIndex].token - == quoteConfig.order.validOutputs[quoteConfig.outputIOIndex].token - ) { - revert TokenSelfTrade(); - } + checkTokenSelfTrade(quoteConfig.order, quoteConfig.inputIOIndex, quoteConfig.outputIOIndex); OrderIOCalculationV4 memory orderIOCalculation = calculateOrderIO( quoteConfig.order, @@ -468,12 +469,7 @@ contract OrderBook is IOrderBookV5, IMetaV1_2, ReentrancyGuard, Multicall, Order revert TokenMismatch(); } - if ( - order.validInputs[takeOrderConfig.inputIOIndex].token - == order.validOutputs[takeOrderConfig.outputIOIndex].token - ) { - revert TokenSelfTrade(); - } + checkTokenSelfTrade(order, takeOrderConfig.inputIOIndex, takeOrderConfig.outputIOIndex); bytes32 orderHash = order.hash(); if (sOrders[orderHash] == ORDER_DEAD) { @@ -530,11 +526,9 @@ contract OrderBook is IOrderBookV5, IMetaV1_2, ReentrancyGuard, Multicall, Order } } - { if (totalTakerInput.lt(config.minimumInput)) { revert MinimumInput(config.minimumInput, totalTakerInput); } - } // We send the tokens to `msg.sender` first adopting a similar pattern to // Uniswap flash swaps. We call the caller before attempting to pull @@ -693,7 +687,7 @@ contract OrderBook is IOrderBookV5, IMetaV1_2, ReentrancyGuard, Multicall, Order { (TOFUOutcome inputOutcome, uint8 inputDecimals) = LibTOFUTokenDecimals.decimalsForTokenReadOnly( - sTOFUTokenDecimals, order.validInputs[inputIOIndex].token + order.validInputs[inputIOIndex].token ); if (inputOutcome != TOFUOutcome.Consistent && inputOutcome != TOFUOutcome.Initial) { revert TokenDecimalsReadFailure(order.validInputs[inputIOIndex].token, inputOutcome); @@ -713,7 +707,7 @@ contract OrderBook is IOrderBookV5, IMetaV1_2, ReentrancyGuard, Multicall, Order { (TOFUOutcome outputOutcome, uint8 outputDecimals) = LibTOFUTokenDecimals.decimalsForTokenReadOnly( - sTOFUTokenDecimals, order.validOutputs[outputIOIndex].token + order.validOutputs[outputIOIndex].token ); if (outputOutcome != TOFUOutcome.Consistent && outputOutcome != TOFUOutcome.Initial) { revert TokenDecimalsReadFailure(order.validOutputs[outputIOIndex].token, outputOutcome); @@ -956,7 +950,7 @@ contract OrderBook is IOrderBookV5, IMetaV1_2, ReentrancyGuard, Multicall, Order } function pullTokens(address token, Float amount) internal returns (uint256, uint8) { - (TOFUOutcome tofuOutcome, uint8 decimals) = LibTOFUTokenDecimals.decimalsForToken(sTOFUTokenDecimals, token); + (TOFUOutcome tofuOutcome, uint8 decimals) = LibTOFUTokenDecimals.decimalsForToken(token); if (tofuOutcome != TOFUOutcome.Consistent && tofuOutcome != TOFUOutcome.Initial) { revert TokenDecimalsReadFailure(token, tofuOutcome); } @@ -978,7 +972,7 @@ contract OrderBook is IOrderBookV5, IMetaV1_2, ReentrancyGuard, Multicall, Order } function pushTokens(address token, Float amountFloat) internal returns (uint256, uint8) { - (TOFUOutcome tofuOutcome, uint8 decimals) = LibTOFUTokenDecimals.decimalsForToken(sTOFUTokenDecimals, token); + (TOFUOutcome tofuOutcome, uint8 decimals) = LibTOFUTokenDecimals.decimalsForToken(token); if (tofuOutcome != TOFUOutcome.Consistent && tofuOutcome != TOFUOutcome.Initial) { revert TokenDecimalsReadFailure(token, tofuOutcome); } diff --git a/src/lib/LibTOFUTokenDecimals.sol b/src/lib/LibTOFUTokenDecimals.sol deleted file mode 100644 index 72e11b920e..0000000000 --- a/src/lib/LibTOFUTokenDecimals.sol +++ /dev/null @@ -1,118 +0,0 @@ -// SPDX-License-Identifier: LicenseRef-DCL-1.0 -// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd -pragma solidity ^0.8.19; - -/// Thrown when a TOFU decimals read fails during deposit. -/// @param token The token that failed to read decimals. -/// @param tofuOutcome The outcome of the TOFU read. -error TokenDecimalsReadFailure(address token, TOFUOutcome tofuOutcome); - -/// Encodes the token's decimals for a token. Includes a bool to indicate if -/// the token's decimals have been read from the external contract before. This -/// guards against the default `0` value for unset storage data being -/// misinterpreted as a valid token decimal value `0`. -/// @param initialized True if the token's decimals have been read from the -/// external contract before. -/// @param tokenDecimals The token's decimals. -struct TOFUTokenDecimals { - bool initialized; - uint8 tokenDecimals; -} - -enum TOFUOutcome { - /// Token's decimals have not been read from the external contract before. - Initial, - /// Token's decimals are consistent with the stored value. - Consistent, - /// Token's decimals are inconsistent with the stored value. - Inconsistent, - /// Token's decimals could not be read from the external contract. - ReadFailure -} - -/// @dev The selector for the `decimals()` function in the ERC20 standard. -bytes constant TOFU_DECIMALS_SELECTOR = hex"313ce567"; - -library LibTOFUTokenDecimals { - function decimalsForTokenReadOnly(mapping(address => TOFUTokenDecimals) storage sTOFUTokenDecimals, address token) - internal - view - returns (TOFUOutcome, uint8) - { - TOFUTokenDecimals memory tofuTokenDecimals = sTOFUTokenDecimals[token]; - - // The default solidity try/catch logic will error if the return is a - // success but fails to deserialize to the target type. We need to handle - // all errors as read failures so that the calling context can decide - // whether to revert the current transaction or continue with the stored - // value. E.g. withdrawals will prefer to continue than trap funds, and - // deposits will prefer to revert and prevent new funds entering the - // DEX. - //slither-disable-start low-level-calls - //slither-disable-start calls-loop - (bool success, bytes memory returnData) = token.staticcall(TOFU_DECIMALS_SELECTOR); - //slither-disable-end low-level-calls - //slither-disable-end calls-loop - if (!success || returnData.length != 0x20) { - return (TOFUOutcome.ReadFailure, tofuTokenDecimals.tokenDecimals); - } - - uint256 decodedDecimals = abi.decode(returnData, (uint256)); - if (decodedDecimals > type(uint8).max) { - return (TOFUOutcome.ReadFailure, tofuTokenDecimals.tokenDecimals); - } - uint8 readDecimals = uint8(decodedDecimals); - - if (!tofuTokenDecimals.initialized) { - return (TOFUOutcome.Initial, readDecimals); - } else { - return ( - readDecimals == tofuTokenDecimals.tokenDecimals ? TOFUOutcome.Consistent : TOFUOutcome.Inconsistent, - tofuTokenDecimals.tokenDecimals - ); - } - } - - /// Trust on first use (TOFU) token decimals. - /// The first time we read the decimals from a token we store them in a - /// mapping. If the token's decimals change we will always use the stored - /// value. This is because the token's decimals could technically change and - /// are NOT intended for onchain use as they are optional, but we're doing - /// it anyway to convert to floating point numbers. - /// - /// If we have nothing stored we read from the token, store and return it - /// with TOFUOUTCOME.Initial. - /// - /// If the call to `decimals` is not a success that deserializes cleanly to - /// a `uint8` we return the stored value and TOFUOUTCOME.ReadFailure. - /// - /// If the stored value is inconsistent with the token's decimals we return - /// the stored value and TOFUOUTCOME.Inconsistent. - function decimalsForToken(mapping(address => TOFUTokenDecimals) storage sTOFUTokenDecimals, address token) - internal - returns (TOFUOutcome, uint8) - { - (TOFUOutcome tofuOutcome, uint8 readDecimals) = decimalsForTokenReadOnly(sTOFUTokenDecimals, token); - - if (tofuOutcome == TOFUOutcome.Initial) { - sTOFUTokenDecimals[token] = TOFUTokenDecimals({initialized: true, tokenDecimals: readDecimals}); - } - return (tofuOutcome, readDecimals); - } - - /// Trust on first use (TOFU) token decimals. - /// Same as `decimalsForToken` but reverts with a standard error if the - /// token's decimals are inconsistent. On the first read the decimals are - /// never considered inconsistent. - /// @return The token's decimals. - function safeDecimalsForToken(mapping(address => TOFUTokenDecimals) storage sTOFUTokenDecimals, address token) - internal - returns (uint8) - { - (TOFUOutcome tofuOutcome, uint8 readDecimals) = decimalsForToken(sTOFUTokenDecimals, token); - if (tofuOutcome != TOFUOutcome.Consistent && tofuOutcome != TOFUOutcome.Initial) { - revert TokenDecimalsReadFailure(token, tofuOutcome); - } - return readDecimals; - } -} From 4d74e5d2fe0062f975c5b08659500bec8e06ed1c Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Thu, 9 Oct 2025 22:01:16 +0400 Subject: [PATCH 05/94] wip on size --- src/concrete/ob/OrderBook.sol | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/concrete/ob/OrderBook.sol b/src/concrete/ob/OrderBook.sol index 584f60f78d..1189b77d45 100644 --- a/src/concrete/ob/OrderBook.sol +++ b/src/concrete/ob/OrderBook.sol @@ -427,6 +427,8 @@ contract OrderBook is IOrderBookV5, IMetaV1_2, ReentrancyGuard, Multicall, Order TakeOrderConfigV4 memory takeOrderConfig; OrderV4 memory order; + address inputToken = config.orders[0].order.validInputs[config.orders[0].inputIOIndex].token; + address outputToken = config.orders[0].order.validOutputs[config.orders[0].outputIOIndex].token; // Allocate a region of memory to hold pointers. We don't know how many // will run at this point, but we conservatively set aside a slot for From 0d1220de64c94742d8104fe4921a7250f833e2aa Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Thu, 9 Oct 2025 22:33:29 +0400 Subject: [PATCH 06/94] wip on contract size --- foundry.lock | 3 +++ lib/rain.tofu.erc20-decimals | 2 +- src/concrete/ob/OrderBook.sol | 16 ++++++++-------- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/foundry.lock b/foundry.lock index 059407d415..c7355a7b75 100644 --- a/foundry.lock +++ b/foundry.lock @@ -5,6 +5,9 @@ "lib/rain.orderbook.interface": { "rev": "26d2a017e98d081f38d0fcff92690e3fc6c204e2" }, + "lib/rain.tofu.erc20-decimals": { + "rev": "ca8e8bacf6c6cb3b9938a6961efb9f93cc1754f9" + }, "lib/sushixswap-v2": { "rev": "ca38c64cf7c3042f6427414d7bff61c54293da51" } diff --git a/lib/rain.tofu.erc20-decimals b/lib/rain.tofu.erc20-decimals index 47f08161a1..ca8e8bacf6 160000 --- a/lib/rain.tofu.erc20-decimals +++ b/lib/rain.tofu.erc20-decimals @@ -1 +1 @@ -Subproject commit 47f08161a1a7cd87c75da7fb11da9399e87b0d48 +Subproject commit ca8e8bacf6c6cb3b9938a6961efb9f93cc1754f9 diff --git a/src/concrete/ob/OrderBook.sol b/src/concrete/ob/OrderBook.sol index 1189b77d45..4761e58935 100644 --- a/src/concrete/ob/OrderBook.sol +++ b/src/concrete/ob/OrderBook.sol @@ -427,8 +427,8 @@ contract OrderBook is IOrderBookV5, IMetaV1_2, ReentrancyGuard, Multicall, Order TakeOrderConfigV4 memory takeOrderConfig; OrderV4 memory order; - address inputToken = config.orders[0].order.validInputs[config.orders[0].inputIOIndex].token; - address outputToken = config.orders[0].order.validOutputs[config.orders[0].outputIOIndex].token; + address orderInputToken = config.orders[0].order.validInputs[config.orders[0].inputIOIndex].token; + address orderOutputToken = config.orders[0].order.validOutputs[config.orders[0].outputIOIndex].token; // Allocate a region of memory to hold pointers. We don't know how many // will run at this point, but we conservatively set aside a slot for @@ -461,11 +461,11 @@ contract OrderBook is IOrderBookV5, IMetaV1_2, ReentrancyGuard, Multicall, Order if ( ( order.validInputs[takeOrderConfig.inputIOIndex].token - != config.orders[0].order.validInputs[config.orders[0].inputIOIndex].token + != orderInputToken ) || ( order.validOutputs[takeOrderConfig.outputIOIndex].token - != config.orders[0].order.validOutputs[config.orders[0].outputIOIndex].token + != orderOutputToken ) ) { revert TokenMismatch(); @@ -543,19 +543,19 @@ contract OrderBook is IOrderBookV5, IMetaV1_2, ReentrancyGuard, Multicall, Order // external data (e.g. prices) that could be modified by the caller's // trades. - pushTokens(config.orders[0].order.validOutputs[config.orders[0].outputIOIndex].token, totalTakerInput); + pushTokens(orderOutputToken, totalTakerInput); if (config.data.length > 0) { IOrderBookV5OrderTaker(msg.sender).onTakeOrders2( - config.orders[0].order.validOutputs[config.orders[0].outputIOIndex].token, - config.orders[0].order.validInputs[config.orders[0].inputIOIndex].token, + orderOutputToken, + orderInputToken, totalTakerInput, totalTakerOutput, config.data ); } - pullTokens(config.orders[0].order.validInputs[config.orders[0].inputIOIndex].token, totalTakerOutput); + pullTokens(orderInputToken, totalTakerOutput); unchecked { for (uint256 i = 0; i < orderIOCalculationsToHandle.length; i++) { From 7538fafc1e43b6d4bd3ad5634f303e227ae081bb Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Thu, 9 Oct 2025 23:13:06 +0400 Subject: [PATCH 07/94] fix tests --- .../OrderBookV4FlashLenderDisabled.sol | 8 +--- src/concrete/ob/OrderBook.sol | 41 ++++++------------- .../ob/OrderBook.deposit.entask.t.sol | 4 +- test/concrete/ob/OrderBook.deposit.t.sol | 2 +- .../ob/OrderBook.withdraw.entask.t.sol | 2 +- test/concrete/ob/OrderBook.withdraw.t.sol | 4 +- test/util/abstract/ArbTest.sol | 5 +++ .../abstract/OrderBookExternalMockTest.sol | 6 +++ .../abstract/OrderBookExternalRealTest.sol | 5 +++ 9 files changed, 37 insertions(+), 40 deletions(-) diff --git a/src/abstract/OrderBookV4FlashLenderDisabled.sol b/src/abstract/OrderBookV4FlashLenderDisabled.sol index fd8ffbb465..1ce44466cf 100644 --- a/src/abstract/OrderBookV4FlashLenderDisabled.sol +++ b/src/abstract/OrderBookV4FlashLenderDisabled.sol @@ -35,11 +35,7 @@ abstract contract OrderBookV4FlashLenderDisabled is IERC3156FlashLender, ERC165 } /// @inheritdoc IERC3156FlashLender - function flashLoan(IERC3156FlashBorrower , address , uint256 , bytes calldata ) - external - override - returns (bool) - { + function flashLoan(IERC3156FlashBorrower, address, uint256, bytes calldata) external override returns (bool) { revert FlashLenderCallbackFailed(0); } @@ -52,7 +48,7 @@ abstract contract OrderBookV4FlashLenderDisabled is IERC3156FlashLender, ERC165 /// the current tokens deposited in `Orderbook`. If there is an active debt /// then loans are disabled so the max becomes `0` until after repayment. /// @inheritdoc IERC3156FlashLender - function maxFlashLoan(address ) external view override returns (uint256) { + function maxFlashLoan(address) external view override returns (uint256) { return 0; } } diff --git a/src/concrete/ob/OrderBook.sol b/src/concrete/ob/OrderBook.sol index 4761e58935..490fe7b68d 100644 --- a/src/concrete/ob/OrderBook.sol +++ b/src/concrete/ob/OrderBook.sol @@ -66,7 +66,7 @@ import { CONTEXT_VAULT_OUTPUTS_COLUMN, CONTEXT_VAULT_IO_VAULT_ID } from "../../lib/LibOrderBook.sol"; -import {OrderBookV4FlashLenderDisabled} from "../../abstract/OrderBookV4FlashLenderDisabled.sol"; +import {OrderBookV4FlashLender} from "../../abstract/OrderBookV4FlashLender.sol"; import {LibBytes32Array} from "rain.solmem/lib/LibBytes32Array.sol"; import {LibBytes32Matrix} from "rain.solmem/lib/LibBytes32Matrix.sol"; @@ -202,7 +202,7 @@ type Input18Amount is uint256; /// @title OrderBook /// See `IOrderBookV1` for more documentation. -contract OrderBook is IOrderBookV5, IMetaV1_2, ReentrancyGuard, Multicall, OrderBookV4FlashLenderDisabled { +contract OrderBook is IOrderBookV5, IMetaV1_2, ReentrancyGuard, Multicall, OrderBookV4FlashLender { using LibUint256Array for uint256[]; using SafeERC20 for IERC20; using LibOrder for OrderV4; @@ -383,10 +383,7 @@ contract OrderBook is IOrderBookV5, IMetaV1_2, ReentrancyGuard, Multicall, Order } } - function checkTokenSelfTrade(OrderV4 memory order, uint256 inputIOIndex, uint256 outputIOIndex) - internal - pure - { + function checkTokenSelfTrade(OrderV4 memory order, uint256 inputIOIndex, uint256 outputIOIndex) internal pure { if (order.validInputs[inputIOIndex].token == order.validOutputs[outputIOIndex].token) { revert TokenSelfTrade(); } @@ -459,14 +456,8 @@ contract OrderBook is IOrderBookV5, IMetaV1_2, ReentrancyGuard, Multicall, Order // Every order needs the same input token. // Every order needs the same output token. if ( - ( - order.validInputs[takeOrderConfig.inputIOIndex].token - != orderInputToken - ) - || ( - order.validOutputs[takeOrderConfig.outputIOIndex].token - != orderOutputToken - ) + (order.validInputs[takeOrderConfig.inputIOIndex].token != orderInputToken) + || (order.validOutputs[takeOrderConfig.outputIOIndex].token != orderOutputToken) ) { revert TokenMismatch(); } @@ -528,9 +519,9 @@ contract OrderBook is IOrderBookV5, IMetaV1_2, ReentrancyGuard, Multicall, Order } } - if (totalTakerInput.lt(config.minimumInput)) { - revert MinimumInput(config.minimumInput, totalTakerInput); - } + if (totalTakerInput.lt(config.minimumInput)) { + revert MinimumInput(config.minimumInput, totalTakerInput); + } // We send the tokens to `msg.sender` first adopting a similar pattern to // Uniswap flash swaps. We call the caller before attempting to pull @@ -547,11 +538,7 @@ contract OrderBook is IOrderBookV5, IMetaV1_2, ReentrancyGuard, Multicall, Order if (config.data.length > 0) { IOrderBookV5OrderTaker(msg.sender).onTakeOrders2( - orderOutputToken, - orderInputToken, - totalTakerInput, - totalTakerOutput, - config.data + orderOutputToken, orderInputToken, totalTakerInput, totalTakerOutput, config.data ); } @@ -688,9 +675,8 @@ contract OrderBook is IOrderBookV5, IMetaV1_2, ReentrancyGuard, Multicall, Order ); { - (TOFUOutcome inputOutcome, uint8 inputDecimals) = LibTOFUTokenDecimals.decimalsForTokenReadOnly( - order.validInputs[inputIOIndex].token - ); + (TOFUOutcome inputOutcome, uint8 inputDecimals) = + LibTOFUTokenDecimals.decimalsForTokenReadOnly(order.validInputs[inputIOIndex].token); if (inputOutcome != TOFUOutcome.Consistent && inputOutcome != TOFUOutcome.Initial) { revert TokenDecimalsReadFailure(order.validInputs[inputIOIndex].token, inputOutcome); } @@ -708,9 +694,8 @@ contract OrderBook is IOrderBookV5, IMetaV1_2, ReentrancyGuard, Multicall, Order } { - (TOFUOutcome outputOutcome, uint8 outputDecimals) = LibTOFUTokenDecimals.decimalsForTokenReadOnly( - order.validOutputs[outputIOIndex].token - ); + (TOFUOutcome outputOutcome, uint8 outputDecimals) = + LibTOFUTokenDecimals.decimalsForTokenReadOnly(order.validOutputs[outputIOIndex].token); if (outputOutcome != TOFUOutcome.Consistent && outputOutcome != TOFUOutcome.Initial) { revert TokenDecimalsReadFailure(order.validOutputs[outputIOIndex].token, outputOutcome); } diff --git a/test/concrete/ob/OrderBook.deposit.entask.t.sol b/test/concrete/ob/OrderBook.deposit.entask.t.sol index 45e3b171a5..3f7863b385 100644 --- a/test/concrete/ob/OrderBook.deposit.entask.t.sol +++ b/test/concrete/ob/OrderBook.deposit.entask.t.sol @@ -35,13 +35,13 @@ contract OrderBookDepositEnactTest is OrderBookExternalRealTest { (bytes32[] memory reads, bytes32[] memory writes) = vm.accesses(address(iOrderbook)); // 3 reads for reentrancy guard. // 5 reads for deposit. - assertEq(reads.length, isFirstDeposit ? 8 : 6); + assertEq(reads.length, 5); assertEq(reads[0], bytes32(uint256(0))); assertEq(reads[1], bytes32(uint256(0))); assertEq(reads[reads.length - 1], bytes32(uint256(0))); // 2 writes for reentrancy guard. // 2 write for deposit. - assertEq(writes.length, isFirstDeposit ? 4 : 3); + assertEq(writes.length, 3); assertEq(writes[0], bytes32(uint256(0))); assertEq(writes[writes.length - 1], bytes32(uint256(0))); } diff --git a/test/concrete/ob/OrderBook.deposit.t.sol b/test/concrete/ob/OrderBook.deposit.t.sol index 277a39b460..fe44ff2a1f 100644 --- a/test/concrete/ob/OrderBook.deposit.t.sol +++ b/test/concrete/ob/OrderBook.deposit.t.sol @@ -163,7 +163,7 @@ contract OrderBookDepositTest is OrderBookExternalMockTest { // - reentrancy guard x3 // - vault balance floats x2 // - token decimals x2 - assertTrue(reads.length == 6 || reads.length == 8, "reads"); + assertTrue(reads.length == 5, "reads"); // // - reentrancy guard x2 // // - vault balance x1 assertTrue(writes.length == 4 || writes.length == 3, "writes"); diff --git a/test/concrete/ob/OrderBook.withdraw.entask.t.sol b/test/concrete/ob/OrderBook.withdraw.entask.t.sol index 8d96237355..b2b0ebc4a2 100644 --- a/test/concrete/ob/OrderBook.withdraw.entask.t.sol +++ b/test/concrete/ob/OrderBook.withdraw.entask.t.sol @@ -114,7 +114,7 @@ contract OrderBookWithdrawEvalTest is OrderBookExternalRealTest { } iOrderbook.withdraw3(address(iToken0), vaultId, targetAmount, actions); if (err.length == 0) { - checkReentrancyRW(7, 3); + checkReentrancyRW(6, 3); (bytes32[] memory reads, bytes32[] memory writes) = vm.accesses(address(iStore)); assertEq(reads.length, expectedReads); assertEq(writes.length, expectedWrites); diff --git a/test/concrete/ob/OrderBook.withdraw.t.sol b/test/concrete/ob/OrderBook.withdraw.t.sol index 3293f7489d..67ce30abaa 100644 --- a/test/concrete/ob/OrderBook.withdraw.t.sol +++ b/test/concrete/ob/OrderBook.withdraw.t.sol @@ -44,8 +44,8 @@ contract OrderBookWithdrawTest is OrderBookExternalMockTest { vm.record(); iOrderbook.withdraw3(address(iToken0), vaultId, amount, new TaskV2[](0)); (bytes32[] memory reads, bytes32[] memory writes) = vm.accesses(address(iOrderbook)); - assertEq(reads.length, 9, "reads"); - assertEq(writes.length, 4, "writes"); + assertEq(reads.length, 6, "reads"); + assertEq(writes.length, 3, "writes"); } /// Withdrawing the full amount from a vault should delete the vault. diff --git a/test/util/abstract/ArbTest.sol b/test/util/abstract/ArbTest.sol index f6bcd3b5cb..6abec678d8 100644 --- a/test/util/abstract/ArbTest.sol +++ b/test/util/abstract/ArbTest.sol @@ -21,6 +21,7 @@ import {OrderBookV5ArbConfig} from "src/concrete/arb/GenericPoolOrderBookV5ArbOr import {TaskV2} from "rain.orderbook.interface/interface/unstable/IOrderBookV5.sol"; import {IInterpreterV4} from "rain.interpreter.interface/interface/unstable/IInterpreterV4.sol"; import {IInterpreterStoreV3} from "rain.interpreter.interface/interface/unstable/IInterpreterStoreV3.sol"; +import {TOFUTokenDecimals, LibTOFUTokenDecimals} from "rain.tofu.erc20-decimals/concrete/TOFUTokenDecimals.sol"; contract Token is ERC20 { constructor() ERC20("Token", "TKN") {} @@ -50,6 +51,10 @@ abstract contract ArbTest is Test { function buildArb(OrderBookV5ArbConfig memory config) internal virtual returns (address); constructor() { + // Put the TOFU decimals contract in place so that any calls to it + // succeed. This is because we don't have zoltu here. + vm.etch(address(LibTOFUTokenDecimals.TOFU_DECIMALS_DEPLOYMENT), type(TOFUTokenDecimals).runtimeCode); + iInterpreter = IInterpreterV4(address(uint160(uint256(keccak256("interpreter.rain.test"))))); vm.label(address(iInterpreter), "iInterpreter"); iInterpreterStore = IInterpreterStoreV3(address(uint160(uint256(keccak256("interpreter.store.rain.test"))))); diff --git a/test/util/abstract/OrderBookExternalMockTest.sol b/test/util/abstract/OrderBookExternalMockTest.sol index 451298b84c..51a5dbec82 100644 --- a/test/util/abstract/OrderBookExternalMockTest.sol +++ b/test/util/abstract/OrderBookExternalMockTest.sol @@ -19,6 +19,7 @@ import {LibOrder} from "src/lib/LibOrder.sol"; import {OrderBook} from "src/concrete/ob/OrderBook.sol"; import {EvaluableV4} from "rain.interpreter.interface/interface/unstable/IInterpreterCallerV4.sol"; import {IERC20Metadata} from "openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Metadata.sol"; +import {TOFUTokenDecimals, LibTOFUTokenDecimals} from "rain.tofu.erc20-decimals/concrete/TOFUTokenDecimals.sol"; /// @title OrderBookExternalTest /// Abstract contract that performs common setup needed for testing an orderbook @@ -40,6 +41,11 @@ abstract contract OrderBookExternalMockTest is Test, IMetaV1_2, IOrderBookV5Stub constructor() { vm.pauseGasMetering(); + + // Put the TOFU decimals contract in place so that any calls to it + // succeed. This is because we don't have zoltu here. + vm.etch(address(LibTOFUTokenDecimals.TOFU_DECIMALS_DEPLOYMENT), type(TOFUTokenDecimals).runtimeCode); + iInterpreter = IInterpreterV4(address(uint160(uint256(keccak256("interpreter.rain.test"))))); vm.etch(address(iInterpreter), REVERTING_MOCK_BYTECODE); iStore = IInterpreterStoreV3(address(uint160(uint256(keccak256("store.rain.test"))))); diff --git a/test/util/abstract/OrderBookExternalRealTest.sol b/test/util/abstract/OrderBookExternalRealTest.sol index 82f8d2cf8b..2e7b7ddde0 100644 --- a/test/util/abstract/OrderBookExternalRealTest.sol +++ b/test/util/abstract/OrderBookExternalRealTest.sol @@ -26,6 +26,7 @@ import {RainterpreterParser} from "rain.interpreter/concrete/RainterpreterParser import {OrderBookSubParser} from "src/concrete/parser/OrderBookSubParser.sol"; import {IERC20Metadata} from "openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Metadata.sol"; import {LibDecimalFloat, Float} from "rain.math.float/lib/LibDecimalFloat.sol"; +import {TOFUTokenDecimals, LibTOFUTokenDecimals} from "rain.tofu.erc20-decimals/concrete/TOFUTokenDecimals.sol"; abstract contract OrderBookExternalRealTest is Test, IOrderBookV5Stub { IInterpreterV4 internal immutable iInterpreter; @@ -38,6 +39,10 @@ abstract contract OrderBookExternalRealTest is Test, IOrderBookV5Stub { OrderBookSubParser internal immutable iSubParser; constructor() { + // Put the TOFU decimals contract in place so that any calls to it + // succeed. This is because we don't have zoltu here. + vm.etch(address(LibTOFUTokenDecimals.TOFU_DECIMALS_DEPLOYMENT), type(TOFUTokenDecimals).runtimeCode); + iInterpreter = IInterpreterV4(new Rainterpreter()); iStore = IInterpreterStoreV3(new RainterpreterStore()); iParser = new RainterpreterParser(); From 8437bbfc931b147d9dd88fa58bd8364c648d512f Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Fri, 10 Oct 2025 14:25:28 +0400 Subject: [PATCH 08/94] bump int --- foundry.lock | 2 +- lib/rain.orderbook.interface | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/foundry.lock b/foundry.lock index c7355a7b75..d638de4b66 100644 --- a/foundry.lock +++ b/foundry.lock @@ -3,7 +3,7 @@ "rev": "6068857887731d910f3f1850c5f27248fce3a5d5" }, "lib/rain.orderbook.interface": { - "rev": "26d2a017e98d081f38d0fcff92690e3fc6c204e2" + "rev": "dae86d795b32cb88005d9c47cbbbff9a5eef940a" }, "lib/rain.tofu.erc20-decimals": { "rev": "ca8e8bacf6c6cb3b9938a6961efb9f93cc1754f9" diff --git a/lib/rain.orderbook.interface b/lib/rain.orderbook.interface index 26d2a017e9..dae86d795b 160000 --- a/lib/rain.orderbook.interface +++ b/lib/rain.orderbook.interface @@ -1 +1 @@ -Subproject commit 26d2a017e98d081f38d0fcff92690e3fc6c204e2 +Subproject commit dae86d795b32cb88005d9c47cbbbff9a5eef940a From d2d63711e70cef4d0a3ad2f4fc2d88060e5be07d Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Fri, 10 Oct 2025 14:26:32 +0400 Subject: [PATCH 09/94] interpreter --- foundry.lock | 2 +- lib/rain.interpreter | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/foundry.lock b/foundry.lock index d638de4b66..a224bfb208 100644 --- a/foundry.lock +++ b/foundry.lock @@ -1,6 +1,6 @@ { "lib/rain.interpreter": { - "rev": "6068857887731d910f3f1850c5f27248fce3a5d5" + "rev": "4c3552c2f6597c02f10d805151b1396fb0204a33" }, "lib/rain.orderbook.interface": { "rev": "dae86d795b32cb88005d9c47cbbbff9a5eef940a" diff --git a/lib/rain.interpreter b/lib/rain.interpreter index 6068857887..4c3552c2f6 160000 --- a/lib/rain.interpreter +++ b/lib/rain.interpreter @@ -1 +1 @@ -Subproject commit 6068857887731d910f3f1850c5f27248fce3a5d5 +Subproject commit 4c3552c2f6597c02f10d805151b1396fb0204a33 From 185f17ed97c5da81945ba89ee8da115c5f53bd65 Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Fri, 10 Oct 2025 14:30:43 +0400 Subject: [PATCH 10/94] fix tests --- test/concrete/ob/OrderBook.deposit.entask.t.sol | 16 +++------------- test/concrete/ob/OrderBook.withdraw.entask.t.sol | 6 +++--- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/test/concrete/ob/OrderBook.deposit.entask.t.sol b/test/concrete/ob/OrderBook.deposit.entask.t.sol index 3f7863b385..bb183f8ff3 100644 --- a/test/concrete/ob/OrderBook.deposit.entask.t.sol +++ b/test/concrete/ob/OrderBook.deposit.entask.t.sol @@ -21,17 +21,7 @@ contract OrderBookDepositEnactTest is OrderBookExternalRealTest { using LibDecimalFloat for Float; using LibFormatDecimalFloat for Float; - uint256 internal runID = 0; - mapping(uint256 => bool) internal previouslyDeposited; - - constructor() { - runID++; - } - - function checkReentrancyRW() internal { - bool isFirstDeposit = !previouslyDeposited[runID]; - previouslyDeposited[runID] = true; - + function checkReentrancyRW() internal view { (bytes32[] memory reads, bytes32[] memory writes) = vm.accesses(address(iOrderbook)); // 3 reads for reentrancy guard. // 5 reads for deposit. @@ -232,7 +222,7 @@ contract OrderBookDepositEnactTest is OrderBookExternalRealTest { string.concat( usingWordsFrom, ":ensure(equal-to(deposit-vault-before() ", - preDepositAmount.toDecimalString(9), + preDepositAmount.toDecimalString(false), ") \"vault balance before\");" ) ); @@ -240,7 +230,7 @@ contract OrderBookDepositEnactTest is OrderBookExternalRealTest { string.concat( usingWordsFrom, ":ensure(equal-to(deposit-vault-after() ", - preDepositAmount.add(depositAmount).toDecimalString(9), + preDepositAmount.add(depositAmount).toDecimalString(false), ") \"vault balance after\");" ) ); diff --git a/test/concrete/ob/OrderBook.withdraw.entask.t.sol b/test/concrete/ob/OrderBook.withdraw.entask.t.sol index b2b0ebc4a2..2dfae7464e 100644 --- a/test/concrete/ob/OrderBook.withdraw.entask.t.sol +++ b/test/concrete/ob/OrderBook.withdraw.entask.t.sol @@ -377,7 +377,7 @@ contract OrderBookWithdrawEvalTest is OrderBookExternalRealTest { string.concat( usingWordsFrom, ":ensure(equal-to(withdraw-vault-before() ", - depositAmount.toDecimalString(9), + depositAmount.toDecimalString(false), ") \"vault before\");" ) ); @@ -385,7 +385,7 @@ contract OrderBookWithdrawEvalTest is OrderBookExternalRealTest { string.concat( usingWordsFrom, ":ensure(equal-to(withdraw-vault-after() ", - depositAmount.sub(withdrawAmount).toDecimalString(9), + depositAmount.sub(withdrawAmount).toDecimalString(false), ") \"balance after\");" ) ); @@ -394,7 +394,7 @@ contract OrderBookWithdrawEvalTest is OrderBookExternalRealTest { string.concat( usingWordsFrom, ":ensure(equal-to(withdraw-target-amount() ", - targetAmount.toDecimalString(9), + targetAmount.toDecimalString(false), ") \"target amount\");" ) ); From 77c896857d6d1b0f91e12a043f44e3398f346836 Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Fri, 10 Oct 2025 14:35:24 +0400 Subject: [PATCH 11/94] lint --- .../OrderBookV4FlashLenderDisabled.sol | 54 ------------------- 1 file changed, 54 deletions(-) delete mode 100644 src/abstract/OrderBookV4FlashLenderDisabled.sol diff --git a/src/abstract/OrderBookV4FlashLenderDisabled.sol b/src/abstract/OrderBookV4FlashLenderDisabled.sol deleted file mode 100644 index 1ce44466cf..0000000000 --- a/src/abstract/OrderBookV4FlashLenderDisabled.sol +++ /dev/null @@ -1,54 +0,0 @@ -// SPDX-License-Identifier: LicenseRef-DCL-1.0 -// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd -pragma solidity ^0.8.19; - -import {ERC165, IERC165} from "openzeppelin-contracts/contracts/utils/introspection/ERC165.sol"; -import {IERC20} from "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; -import {SafeERC20} from "openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol"; - -import { - IERC3156FlashBorrower, - ON_FLASH_LOAN_CALLBACK_SUCCESS -} from "rain.orderbook.interface/interface/ierc3156/IERC3156FlashBorrower.sol"; -import {IERC3156FlashLender} from "rain.orderbook.interface/interface/ierc3156/IERC3156FlashLender.sol"; - -/// Thrown when the `onFlashLoan` callback returns anything other than -/// ON_FLASH_LOAN_CALLBACK_SUCCESS. -/// @param result The value that was returned by `onFlashLoan`. -error FlashLenderCallbackFailed(bytes32 result); - -/// @dev Flash fee is always 0 for orderbook as there's no entity to take -/// revenue for `Orderbook` and its more important anyway that flashloans happen -/// to connect external liquidity to live orders via arbitrage. -uint256 constant FLASH_FEE = 0; - -/// @title OrderBookV4FlashLender -/// @notice Implements `IERC3156FlashLender` for `OrderBook`. Based on the -/// reference implementation by Alberto Cuesta Cañada found at -/// https://eips.ethereum.org/EIPS/eip-3156#flash-loan-reference-implementation -abstract contract OrderBookV4FlashLenderDisabled is IERC3156FlashLender, ERC165 { - using SafeERC20 for IERC20; - - /// @inheritdoc IERC165 - function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { - return interfaceId == type(IERC3156FlashLender).interfaceId || super.supportsInterface(interfaceId); - } - - /// @inheritdoc IERC3156FlashLender - function flashLoan(IERC3156FlashBorrower, address, uint256, bytes calldata) external override returns (bool) { - revert FlashLenderCallbackFailed(0); - } - - /// @inheritdoc IERC3156FlashLender - function flashFee(address, uint256) external pure override returns (uint256) { - return FLASH_FEE; - } - - /// There's no limit to the size of a flash loan from `Orderbook` other than - /// the current tokens deposited in `Orderbook`. If there is an active debt - /// then loans are disabled so the max becomes `0` until after repayment. - /// @inheritdoc IERC3156FlashLender - function maxFlashLoan(address) external view override returns (uint256) { - return 0; - } -} From 0b1726a1914308ddda856927940cb91712cd39e9 Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Fri, 10 Oct 2025 15:18:47 +0400 Subject: [PATCH 12/94] pointers --- src/generated/OrderBookSubParser.pointers.sol | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/generated/OrderBookSubParser.pointers.sol b/src/generated/OrderBookSubParser.pointers.sol index 898c2e0a07..1c131c8a94 100644 --- a/src/generated/OrderBookSubParser.pointers.sol +++ b/src/generated/OrderBookSubParser.pointers.sol @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.25; + // THIS FILE IS AUTOGENERATED BY ./script/BuildPointers.sol // This file is committed to the repository because there is a circular @@ -5,10 +9,6 @@ // needs the pointers file to exist so that it can compile, and the pointers // file needs the contract to exist so that it can be compiled. -// SPDX-License-Identifier: LicenseRef-DCL-1.0 -// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd -pragma solidity =0.8.25; - /// @dev Hash of the known bytecode. bytes32 constant BYTECODE_HASH = bytes32(0x7c8b8c827e772690a58491ad0b064e4eadf31c95511023abfea56990fef5d847); From 22d65bd93ff170b3a59d02d2d5ef8209c032f81d Mon Sep 17 00:00:00 2001 From: 0xgleb Date: Fri, 10 Oct 2025 12:36:29 -0300 Subject: [PATCH 13/94] formatting test fixes --- crates/common/src/types/order_takes_list_flattened.rs | 2 +- crates/common/src/types/token_vault_flattened.rs | 2 +- crates/common/src/types/vault_balance_change_flattened.rs | 2 +- packages/orderbook/test/js_api/gui.test.ts | 2 +- packages/orderbook/test/js_api/raindexClient.test.ts | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/common/src/types/order_takes_list_flattened.rs b/crates/common/src/types/order_takes_list_flattened.rs index 2e6ab8c3c0..77e9f3f65c 100644 --- a/crates/common/src/types/order_takes_list_flattened.rs +++ b/crates/common/src/types/order_takes_list_flattened.rs @@ -297,7 +297,7 @@ mod tests { let input_display = "-1.234567890123456789".to_string(); let input_amount = Float::parse(input_display.clone()).unwrap(); - let output_display = "-0.98765432".to_string(); + let output_display = "-9.8765432e-1".to_string(); let output_amount = Float::parse(output_display.clone()).unwrap(); trade_data.input_vault_balance_change.amount = SgBytes(input_amount.as_hex()); diff --git a/crates/common/src/types/token_vault_flattened.rs b/crates/common/src/types/token_vault_flattened.rs index 39b696db28..d6399fb36b 100644 --- a/crates/common/src/types/token_vault_flattened.rs +++ b/crates/common/src/types/token_vault_flattened.rs @@ -226,7 +226,7 @@ mod tests { let result = TokenVaultFlattened::try_from(sg_vault); let flattened = result.unwrap(); - assert_eq!(flattened.balance_display, "9.87650000000000000000001e4"); + assert_eq!(flattened.balance_display, "98765.0000000000000000001"); assert_eq!(flattened.balance, SgBytes(balance_str.to_string())); } } diff --git a/crates/common/src/types/vault_balance_change_flattened.rs b/crates/common/src/types/vault_balance_change_flattened.rs index 9b477121e0..80669c7744 100644 --- a/crates/common/src/types/vault_balance_change_flattened.rs +++ b/crates/common/src/types/vault_balance_change_flattened.rs @@ -156,7 +156,7 @@ mod tests { let result = VaultBalanceChangeFlattened::try_from(val); assert!(result.is_ok()); let flattened = result.unwrap(); - assert_eq!(flattened.amount_display_signed, "-0.5"); + assert_eq!(flattened.amount_display_signed, "-5e-1"); } #[test] diff --git a/packages/orderbook/test/js_api/gui.test.ts b/packages/orderbook/test/js_api/gui.test.ts index 3b16075ba2..9a044eac14 100644 --- a/packages/orderbook/test/js_api/gui.test.ts +++ b/packages/orderbook/test/js_api/gui.test.ts @@ -2048,7 +2048,7 @@ ${dotrainWithoutVaultIds}`; ) ); assert.equal(result.balance.toFixedDecimal(18).value, BigInt(1000)); - assert.equal(result.formattedBalance, '0.000000000000001'); + assert.equal(result.formattedBalance, '1e-15'); }); }); diff --git a/packages/orderbook/test/js_api/raindexClient.test.ts b/packages/orderbook/test/js_api/raindexClient.test.ts index 4887a7d4e7..a8349f4e63 100644 --- a/packages/orderbook/test/js_api/raindexClient.test.ts +++ b/packages/orderbook/test/js_api/raindexClient.test.ts @@ -1951,7 +1951,7 @@ describe('Rain Orderbook JS API Package Bindgen Tests - Raindex Client', async f const res = extractWasmEncodedData(await vault.getOwnerBalance()); assert.equal(res.balance.toFixedDecimal(18).value, BigInt(1000)); - assert.equal(res.formattedBalance, '0.000000000000001'); + assert.equal(res.formattedBalance, '1e-15'); }); }); From 8054b0aba63e324430aed998611f3c4727fdc0f7 Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Fri, 10 Oct 2025 22:47:05 +0400 Subject: [PATCH 14/94] fix static --- slither.config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slither.config.json b/slither.config.json index 9a54a934dd..e463555647 100644 --- a/slither.config.json +++ b/slither.config.json @@ -1,4 +1,4 @@ { "detectors_to_exclude": "assembly-usage,solc-version,unused-imports,different-pragma-directives-are-used", - "filter_paths": "forge-std,openzeppelin,test,rain.math.float" + "filter_paths": "forge-std,openzeppelin,test,rain.math.float,rain.tofu.erc20-decimals" } From 546fae5e948f420ad095b2a931632604e2183d98 Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Fri, 10 Oct 2025 22:48:28 +0400 Subject: [PATCH 15/94] fix legal and static --- REUSE.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/REUSE.toml b/REUSE.toml index 2312176b63..d27017ee3c 100644 --- a/REUSE.toml +++ b/REUSE.toml @@ -15,6 +15,7 @@ path = [ "flake.lock", "flake.nix", "foundry.toml", + "foundry.lock", "slither.config.json", "typeshare.toml", "REUSE.toml", From b004dd5bac54492981c62bf9860404f8bc514ba5 Mon Sep 17 00:00:00 2001 From: 0xgleb Date: Fri, 10 Oct 2025 14:19:34 -0300 Subject: [PATCH 16/94] update the scripts --- pointers.sh | 1 + prep-all.sh | 3 +++ 2 files changed, 4 insertions(+) diff --git a/pointers.sh b/pointers.sh index 0211dded96..9d18e673b8 100755 --- a/pointers.sh +++ b/pointers.sh @@ -9,6 +9,7 @@ set -euxo pipefail (cd lib/rain.interpreter && nix develop -c i9r-prelude) (cd lib/rain.interpreter/lib/rain.metadata && nix develop -c rainix-sol-prelude) (cd lib/rain.interpreter/lib/rain.metadata && nix develop -c rainix-rs-prelude) +(cd lib/rain.tofu.erc20-decimals && nix develop -c forge build) nix develop -c rainix-sol-prelude nix develop -c rainix-rs-prelude diff --git a/prep-all.sh b/prep-all.sh index e865db53d3..61a1a50c5b 100755 --- a/prep-all.sh +++ b/prep-all.sh @@ -35,6 +35,9 @@ nix develop -i ${keep[@]} -c bash \ nix develop -i ${keep[@]} -c bash \ -c '(cd lib/rain.interpreter/lib/rain.interpreter.interface/lib/rain.math.float && rainix-rs-prelude)' +echo "Setting up rain.tofu.erc20-decimals..." +(cd lib/rain.tofu.erc20-decimals && nix develop -c forge build) + echo "Setting up rain.interpreter..." nix develop -i ${keep[@]} -c bash -c '(cd lib/rain.interpreter && rainix-sol-prelude)' nix develop -i ${keep[@]} -c bash -c '(cd lib/rain.interpreter && rainix-rs-prelude)' From 539c82e7bfc33bd92a0013296606303194dde8a1 Mon Sep 17 00:00:00 2001 From: 0xgleb Date: Fri, 10 Oct 2025 15:53:19 -0300 Subject: [PATCH 17/94] fix test fixtures --- crates/test_fixtures/src/lib.rs | 26 ++++++++++++++----- .../src-tauri/src/commands/order_take.rs | 2 +- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/crates/test_fixtures/src/lib.rs b/crates/test_fixtures/src/lib.rs index d8c12a8f55..2229f89692 100644 --- a/crates/test_fixtures/src/lib.rs +++ b/crates/test_fixtures/src/lib.rs @@ -3,7 +3,7 @@ use alloy::{ hex::decode, network::{AnyNetwork, AnyTransactionReceipt, EthereumWallet, TransactionBuilder}, node_bindings::{Anvil, AnvilInstance}, - primitives::{utils::parse_units, Address, Bytes, B256, U256}, + primitives::{address, utils::parse_units, Address, Bytes, B256, U256}, providers::{ext::AnvilApi, PendingTransactionError, Provider, ProviderBuilder}, rpc::types::TransactionRequest, serde::WithOtherFields, @@ -14,7 +14,7 @@ use alloy::{ }; pub use rain_interpreter_test_fixtures::{Deployer, Interpreter, Parser, Store, ERC20}; use serde_json::value::RawValue; -use std::{marker::PhantomData, str::FromStr}; +use std::marker::PhantomData; use rain_interpreter_test_fixtures::LocalEvmProvider; use rain_math_float::Float; @@ -34,6 +34,11 @@ sol!( "../../lib/rain.interpreter/lib/rain.interpreter.interface/lib/forge-std/src/interfaces//IMulticall3.sol" ); +sol!( + #![sol(all_derives = true, rpc = true)] + TOFUTokenDecimals, "../../lib/rain.tofu.erc20-decimals/out/TOFUTokenDecimals.sol/TOFUTokenDecimals.json" +); + /// A local evm instance that wraps an Anvil instance and provider with /// its signers, and with rain contracts already deployed on it. /// The first signer wallet is the main wallet that would sign any transactions @@ -104,6 +109,14 @@ impl LocalEvm { .wallet(signer_wallets[0].clone()) .connect_http(anvil.endpoint_url()); + provider + .anvil_set_code( + TOFU_TOKEN_DECIMALS_ADDRESS, + TOFUTokenDecimals::DEPLOYED_BYTECODE.clone(), + ) + .await + .unwrap(); + // deploy rain contracts let orderbook = Orderbook::deploy(provider.clone()).await.unwrap(); let orderbook_subparser = OrderbookSubParser::deploy(provider.clone()).await.unwrap(); @@ -118,15 +131,14 @@ impl LocalEvm { let deployer = Deployer::deploy(provider.clone(), config).await.unwrap(); // set the multicall 3 contract at its official address - let multicall3_address = Address::from_str(MULTICALL3_ADDRESS).unwrap(); provider .anvil_set_code( - multicall3_address, + MULTICALL3_ADDRESS, decode(MULTICALL3_BYTECODE).unwrap().into(), ) .await .unwrap(); - let multicall3 = IMulticall3::new(multicall3_address, provider.clone()); + let multicall3 = IMulticall3::new(MULTICALL3_ADDRESS, provider.clone()); Self { anvil, @@ -336,5 +348,7 @@ impl LocalEvm { } } -const MULTICALL3_ADDRESS: &str = "0xcA11bde05977b3631167028862bE2a173976CA11"; +const MULTICALL3_ADDRESS: Address = address!("cA11bde05977b3631167028862bE2a173976CA11"); const MULTICALL3_BYTECODE: &str = "0x6080604052600436106100f35760003560e01c80634d2301cc1161008a578063a8b0574e11610059578063a8b0574e1461025a578063bce38bd714610275578063c3077fa914610288578063ee82ac5e1461029b57600080fd5b80634d2301cc146101ec57806372425d9d1461022157806382ad56cb1461023457806386d516e81461024757600080fd5b80633408e470116100c65780633408e47014610191578063399542e9146101a45780633e64a696146101c657806342cbb15c146101d957600080fd5b80630f28c97d146100f8578063174dea711461011a578063252dba421461013a57806327e86d6e1461015b575b600080fd5b34801561010457600080fd5b50425b6040519081526020015b60405180910390f35b61012d610128366004610a85565b6102ba565b6040516101119190610bbe565b61014d610148366004610a85565b6104ef565b604051610111929190610bd8565b34801561016757600080fd5b50437fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0140610107565b34801561019d57600080fd5b5046610107565b6101b76101b2366004610c60565b610690565b60405161011193929190610cba565b3480156101d257600080fd5b5048610107565b3480156101e557600080fd5b5043610107565b3480156101f857600080fd5b50610107610207366004610ce2565b73ffffffffffffffffffffffffffffffffffffffff163190565b34801561022d57600080fd5b5044610107565b61012d610242366004610a85565b6106ab565b34801561025357600080fd5b5045610107565b34801561026657600080fd5b50604051418152602001610111565b61012d610283366004610c60565b61085a565b6101b7610296366004610a85565b610a1a565b3480156102a757600080fd5b506101076102b6366004610d18565b4090565b60606000828067ffffffffffffffff8111156102d8576102d8610d31565b60405190808252806020026020018201604052801561031e57816020015b6040805180820190915260008152606060208201528152602001906001900390816102f65790505b5092503660005b8281101561047757600085828151811061034157610341610d60565b6020026020010151905087878381811061035d5761035d610d60565b905060200281019061036f9190610d8f565b6040810135958601959093506103886020850185610ce2565b73ffffffffffffffffffffffffffffffffffffffff16816103ac6060870187610dcd565b6040516103ba929190610e32565b60006040518083038185875af1925050503d80600081146103f7576040519150601f19603f3d011682016040523d82523d6000602084013e6103fc565b606091505b50602080850191909152901515808452908501351761046d577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b5050600101610325565b508234146104e6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4d756c746963616c6c333a2076616c7565206d69736d6174636800000000000060448201526064015b60405180910390fd5b50505092915050565b436060828067ffffffffffffffff81111561050c5761050c610d31565b60405190808252806020026020018201604052801561053f57816020015b606081526020019060019003908161052a5790505b5091503660005b8281101561068657600087878381811061056257610562610d60565b90506020028101906105749190610e42565b92506105836020840184610ce2565b73ffffffffffffffffffffffffffffffffffffffff166105a66020850185610dcd565b6040516105b4929190610e32565b6000604051808303816000865af19150503d80600081146105f1576040519150601f19603f3d011682016040523d82523d6000602084013e6105f6565b606091505b5086848151811061060957610609610d60565b602090810291909101015290508061067d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060448201526064016104dd565b50600101610546565b5050509250929050565b43804060606106a086868661085a565b905093509350939050565b6060818067ffffffffffffffff8111156106c7576106c7610d31565b60405190808252806020026020018201604052801561070d57816020015b6040805180820190915260008152606060208201528152602001906001900390816106e55790505b5091503660005b828110156104e657600084828151811061073057610730610d60565b6020026020010151905086868381811061074c5761074c610d60565b905060200281019061075e9190610e76565b925061076d6020840184610ce2565b73ffffffffffffffffffffffffffffffffffffffff166107906040850185610dcd565b60405161079e929190610e32565b6000604051808303816000865af19150503d80600081146107db576040519150601f19603f3d011682016040523d82523d6000602084013e6107e0565b606091505b506020808401919091529015158083529084013517610851577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260646000fd5b50600101610714565b6060818067ffffffffffffffff81111561087657610876610d31565b6040519080825280602002602001820160405280156108bc57816020015b6040805180820190915260008152606060208201528152602001906001900390816108945790505b5091503660005b82811015610a105760008482815181106108df576108df610d60565b602002602001015190508686838181106108fb576108fb610d60565b905060200281019061090d9190610e42565b925061091c6020840184610ce2565b73ffffffffffffffffffffffffffffffffffffffff1661093f6020850185610dcd565b60405161094d929190610e32565b6000604051808303816000865af19150503d806000811461098a576040519150601f19603f3d011682016040523d82523d6000602084013e61098f565b606091505b506020830152151581528715610a07578051610a07576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060448201526064016104dd565b506001016108c3565b5050509392505050565b6000806060610a2b60018686610690565b919790965090945092505050565b60008083601f840112610a4b57600080fd5b50813567ffffffffffffffff811115610a6357600080fd5b6020830191508360208260051b8501011115610a7e57600080fd5b9250929050565b60008060208385031215610a9857600080fd5b823567ffffffffffffffff811115610aaf57600080fd5b610abb85828601610a39565b90969095509350505050565b6000815180845260005b81811015610aed57602081850181015186830182015201610ad1565b81811115610aff576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b600082825180855260208086019550808260051b84010181860160005b84811015610bb1578583037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe001895281518051151584528401516040858501819052610b9d81860183610ac7565b9a86019a9450505090830190600101610b4f565b5090979650505050505050565b602081526000610bd16020830184610b32565b9392505050565b600060408201848352602060408185015281855180845260608601915060608160051b870101935082870160005b82811015610c52577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa0888703018452610c40868351610ac7565b95509284019290840190600101610c06565b509398975050505050505050565b600080600060408486031215610c7557600080fd5b83358015158114610c8557600080fd5b9250602084013567ffffffffffffffff811115610ca157600080fd5b610cad86828701610a39565b9497909650939450505050565b838152826020820152606060408201526000610cd96060830184610b32565b95945050505050565b600060208284031215610cf457600080fd5b813573ffffffffffffffffffffffffffffffffffffffff81168114610bd157600080fd5b600060208284031215610d2a57600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81833603018112610dc357600080fd5b9190910192915050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112610e0257600080fd5b83018035915067ffffffffffffffff821115610e1d57600080fd5b602001915036819003821315610a7e57600080fd5b8183823760009101908152919050565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc1833603018112610dc357600080fd5b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa1833603018112610dc357600080fdfea2646970667358221220bb2b5c71a328032f97c676ae39a1ec2148d3e5d6f73d95e9b17910152d61f16264736f6c634300080c0033"; + +const TOFU_TOKEN_DECIMALS_ADDRESS: Address = address!("4f1C29FAAB7EDdF8D7794695d8259996734Cc665"); diff --git a/tauri-app/src-tauri/src/commands/order_take.rs b/tauri-app/src-tauri/src/commands/order_take.rs index 2fe3816071..8eba813de3 100644 --- a/tauri-app/src-tauri/src/commands/order_take.rs +++ b/tauri-app/src-tauri/src/commands/order_take.rs @@ -233,7 +233,7 @@ mod tests { let expected = " id,timestamp,timestamp_display,transaction,sender,order_id,input,input_display,input_token_id,input_token_symbol,output,output_display,output_token_id,output_token_symbol trade1,0,1970-01-01 00:00:00 UTC,tx1,sender1,hash1,0x0000000000000000000000000000000000000000000000000000000000000001,1,0x1d80c49bbbcd1c0911346656b529df9e5c2f783d,WFLR,0x00000000fffffffffffffffffffffffffffffffffffffffffffffffffffffffe,-2,0x12e605bc104e93b45e1ad99f9e555f659051c2bb,sFLR -trade2,1700086400,2023-11-15 22:13:20 UTC,tx2,sender2,hash2,0x0000000000000000000000000000000000000000000000000000000000000002,2,0x1d80c49bbbcd1c0911346656b529df9e5c2f783d,WFLR,0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffb,-0.5,0x12e605bc104e93b45e1ad99f9e555f659051c2bb,sFLR +trade2,1700086400,2023-11-15 22:13:20 UTC,tx2,sender2,hash2,0x0000000000000000000000000000000000000000000000000000000000000002,2,0x1d80c49bbbcd1c0911346656b529df9e5c2f783d,WFLR,0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffb,-5e-1,0x12e605bc104e93b45e1ad99f9e555f659051c2bb,sFLR "; let csv_text = fs::read_to_string(path.clone()).unwrap(); assert_eq!(csv_text.trim(), expected.trim()); From 08b8ebbc49af7f2b461af75e4213b21a5a625260 Mon Sep 17 00:00:00 2001 From: 0xgleb Date: Fri, 10 Oct 2025 16:31:52 -0300 Subject: [PATCH 18/94] try adding lobsoup dep --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 238fc76e36..d7b090a33d 100644 --- a/flake.nix +++ b/flake.nix @@ -290,7 +290,7 @@ ]; shellHook = rainix.devShells.${system}.tauri-shell.shellHook; buildInputs = rainix.devShells.${system}.tauri-shell.buildInputs - ++ [ pkgs.clang-tools ]; + ++ [ pkgs.clang-tools pkgs.libsoup_2_4 ]; nativeBuildInputs = rainix.devShells.${system}.tauri-shell.nativeBuildInputs; }; From c9e48abeb2c90428c7975dd2c6178d9159b559d8 Mon Sep 17 00:00:00 2001 From: 0xgleb Date: Fri, 10 Oct 2025 17:23:50 -0300 Subject: [PATCH 19/94] try bumping up rainix --- flake.lock | 19 ++++++++++--------- flake.nix | 3 +-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/flake.lock b/flake.lock index 18c99cf49a..2a4753c5b4 100644 --- a/flake.lock +++ b/flake.lock @@ -272,11 +272,11 @@ }, "nixpkgs_6": { "locked": { - "lastModified": 1758711836, - "narHash": "sha256-uBqPg7wNX2v6YUdTswH7wWU8wqb60cFZx0tHaWTGF30=", + "lastModified": 1760126274, + "narHash": "sha256-wuD53nRK1lI4Zpt3SIpcvn5dXiusapgQkcuh62FztDk=", "owner": "nixos", "repo": "nixpkgs", - "rev": "46f97b78e825ae762c0224e3983c47687436a498", + "rev": "151ad2221f19cbbc659c74dd1d1dd0cb29588d7a", "type": "github" }, "original": { @@ -367,16 +367,17 @@ "solc": "solc_2" }, "locked": { - "lastModified": 1758730752, - "narHash": "sha256-ZQ1INSsEWYgb1NdC5zo6nu1ObLzOCDI+wjiZ4222fQ8=", + "lastModified": 1760127078, + "narHash": "sha256-77cRdc0MB7MFHSDTdntVSV/VaxQU5yG+E+W8S4LpWPg=", "owner": "rainlanguage", "repo": "rainix", - "rev": "cc7c9bbbd9b817aa3a6a5c994262e14fb0bc920c", + "rev": "f2a4edac01a17368ffdbae9fb42a110139acebde", "type": "github" }, "original": { "owner": "rainlanguage", "repo": "rainix", + "rev": "f2a4edac01a17368ffdbae9fb42a110139acebde", "type": "github" } }, @@ -411,11 +412,11 @@ "nixpkgs": "nixpkgs_7" }, "locked": { - "lastModified": 1758681214, - "narHash": "sha256-8cW731vev6kfr58cILO2ZsjHwaPhm88dQ8Q6nTSjP9I=", + "lastModified": 1760063676, + "narHash": "sha256-s5Fjh43skH2L+avOGioLmEHoYZffDbg3abV5h0gjeew=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "b12ed88d8d33d4f3cbc842bf29fad93bb1437299", + "rev": "897deed0923cc5a1d560c5176abe0d172ec9716d", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index d7b090a33d..b9306548dd 100644 --- a/flake.nix +++ b/flake.nix @@ -2,7 +2,7 @@ description = "Flake for development workflows."; inputs = { - rainix.url = "github:rainlanguage/rainix"; + rainix.url = "github:rainlanguage/rainix?rev=f2a4edac01a17368ffdbae9fb42a110139acebde"; rain.url = "github:rainlanguage/rain.cli"; flake-utils.url = "github:numtide/flake-utils"; }; @@ -12,7 +12,6 @@ let pkgs = rainix.pkgs.${system}; in rec { packages = rec { - tauri-release-env = rainix.tauri-release-env.${system}; raindex-prelude = rainix.mkTask.${system} { From 6abbed07c6419d509673dca16c8180b5d1b7130f Mon Sep 17 00:00:00 2001 From: 0xgleb Date: Fri, 10 Oct 2025 17:59:16 -0300 Subject: [PATCH 20/94] try libsoup 3 --- flake.lock | 19 +++++++++---------- flake.nix | 5 ++--- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/flake.lock b/flake.lock index 2a4753c5b4..18c99cf49a 100644 --- a/flake.lock +++ b/flake.lock @@ -272,11 +272,11 @@ }, "nixpkgs_6": { "locked": { - "lastModified": 1760126274, - "narHash": "sha256-wuD53nRK1lI4Zpt3SIpcvn5dXiusapgQkcuh62FztDk=", + "lastModified": 1758711836, + "narHash": "sha256-uBqPg7wNX2v6YUdTswH7wWU8wqb60cFZx0tHaWTGF30=", "owner": "nixos", "repo": "nixpkgs", - "rev": "151ad2221f19cbbc659c74dd1d1dd0cb29588d7a", + "rev": "46f97b78e825ae762c0224e3983c47687436a498", "type": "github" }, "original": { @@ -367,17 +367,16 @@ "solc": "solc_2" }, "locked": { - "lastModified": 1760127078, - "narHash": "sha256-77cRdc0MB7MFHSDTdntVSV/VaxQU5yG+E+W8S4LpWPg=", + "lastModified": 1758730752, + "narHash": "sha256-ZQ1INSsEWYgb1NdC5zo6nu1ObLzOCDI+wjiZ4222fQ8=", "owner": "rainlanguage", "repo": "rainix", - "rev": "f2a4edac01a17368ffdbae9fb42a110139acebde", + "rev": "cc7c9bbbd9b817aa3a6a5c994262e14fb0bc920c", "type": "github" }, "original": { "owner": "rainlanguage", "repo": "rainix", - "rev": "f2a4edac01a17368ffdbae9fb42a110139acebde", "type": "github" } }, @@ -412,11 +411,11 @@ "nixpkgs": "nixpkgs_7" }, "locked": { - "lastModified": 1760063676, - "narHash": "sha256-s5Fjh43skH2L+avOGioLmEHoYZffDbg3abV5h0gjeew=", + "lastModified": 1758681214, + "narHash": "sha256-8cW731vev6kfr58cILO2ZsjHwaPhm88dQ8Q6nTSjP9I=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "897deed0923cc5a1d560c5176abe0d172ec9716d", + "rev": "b12ed88d8d33d4f3cbc842bf29fad93bb1437299", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index b9306548dd..96e980f0c6 100644 --- a/flake.nix +++ b/flake.nix @@ -2,7 +2,7 @@ description = "Flake for development workflows."; inputs = { - rainix.url = "github:rainlanguage/rainix?rev=f2a4edac01a17368ffdbae9fb42a110139acebde"; + rainix.url = "github:rainlanguage/rainix"; rain.url = "github:rainlanguage/rain.cli"; flake-utils.url = "github:numtide/flake-utils"; }; @@ -289,7 +289,7 @@ ]; shellHook = rainix.devShells.${system}.tauri-shell.shellHook; buildInputs = rainix.devShells.${system}.tauri-shell.buildInputs - ++ [ pkgs.clang-tools pkgs.libsoup_2_4 ]; + ++ [ pkgs.clang-tools pkgs.libsoup_3 ]; nativeBuildInputs = rainix.devShells.${system}.tauri-shell.nativeBuildInputs; }; @@ -300,5 +300,4 @@ rainix.devShells.${system}.default.nativeBuildInputs; }; }); - } From 15bd0f12e2c5956ae393cdb622f98f18af7aa6fb Mon Sep 17 00:00:00 2001 From: 0xgleb Date: Fri, 10 Oct 2025 19:44:19 -0300 Subject: [PATCH 21/94] try insecure --- .github/workflows/tauri-release.yml | 7 ++++--- .github/workflows/tauri.yaml | 11 ++++++----- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/tauri-release.yml b/.github/workflows/tauri-release.yml index bdb1e7b832..2ffa454d39 100644 --- a/.github/workflows/tauri-release.yml +++ b/.github/workflows/tauri-release.yml @@ -33,6 +33,7 @@ jobs: CI_SEPOLIA_METABOARD_URL: ${{ vars.CI_SEPOLIA_METABOARD_URL }} RPC_URL_ETHEREUM_FORK: ${{ secrets.RPC_URL_ETHEREUM_FORK }} COMMIT_SHA: ${{ github.sha }} + NIXPKGS_ALLOW_INSECURE: 1 steps: - name: Free up disk space in action runner (Ubuntu) if: matrix.platform == 'ubuntu-22.04' @@ -86,9 +87,9 @@ jobs: env: PUBLIC_WALLETCONNECT_PROJECT_ID: ${{ secrets.WALLETCONNECT_PROJECT_ID }} - - run: nix develop .#tauri-shell -c ob-tauri-unit-test + - run: nix develop --impure .#tauri-shell -c ob-tauri-unit-test - - run: nix develop .#tauri-shell --command ob-tauri-before-release + - run: nix develop --impure .#tauri-shell --command ob-tauri-before-release working-directory: ./tauri-app env: VITE_WALLETCONNECT_PROJECT_ID: ${{ secrets.WALLETCONNECT_PROJECT_ID }} @@ -125,7 +126,7 @@ jobs: APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} COMMIT_SHA: ${{ github.sha }} with: - tauriScript: "nix develop -i -k COMMIT_SHA -k APPLE_CERTIFICATE -k APPLE_CERTIFICATE_PASSWORD -k APPLE_SIGNING_IDENTITY -k APPLE_ID -k APPLE_PASSWORD -k APPLE_TEAM_ID -k CI_DEPLOY_SEPOLIA_RPC_URL -k CI_FORK_SEPOLIA_DEPLOYER_ADDRESS -k CI_FORK_SEPOLIA_BLOCK_NUMBER -k CI_DEPLOY_POLYGON_RPC_URL -k CI_SEPOLIA_METABOARD_URL -k RPC_URL_ETHEREUM_FORK .#tauri-shell --command cargo tauri" + tauriScript: "nix develop --impure -i -k COMMIT_SHA -k APPLE_CERTIFICATE -k APPLE_CERTIFICATE_PASSWORD -k APPLE_SIGNING_IDENTITY -k APPLE_ID -k APPLE_PASSWORD -k APPLE_TEAM_ID -k CI_DEPLOY_SEPOLIA_RPC_URL -k CI_FORK_SEPOLIA_DEPLOYER_ADDRESS -k CI_FORK_SEPOLIA_BLOCK_NUMBER -k CI_DEPLOY_POLYGON_RPC_URL -k CI_SEPOLIA_METABOARD_URL -k RPC_URL_ETHEREUM_FORK .#tauri-shell --command cargo tauri" tagName: app-v__VERSION__-${{ github.sha }} # the action automatically replaces \_\_VERSION\_\_ with the app version releaseName: "App v__VERSION__-${{ github.sha }}" releaseBody: "See the assets to download this version and install." diff --git a/.github/workflows/tauri.yaml b/.github/workflows/tauri.yaml index 3566555bfa..5f3ece4a3d 100644 --- a/.github/workflows/tauri.yaml +++ b/.github/workflows/tauri.yaml @@ -29,6 +29,7 @@ jobs: runs-on: ${{ matrix.os }} env: COMMIT_SHA: ${{ github.sha }} + NIXPKGS_ALLOW_INSECURE: 1 steps: - name: Free up disk space in action runner (Ubuntu) if: matrix.os == 'ubuntu-22.04' @@ -91,13 +92,13 @@ jobs: env: PUBLIC_WALLETCONNECT_PROJECT_ID: ${{ secrets.WALLETCONNECT_PROJECT_ID || 'test' }} - - run: nix develop .#tauri-shell -c ob-tauri-unit-test + - run: nix develop --impure .#tauri-shell -c ob-tauri-unit-test - - run: nix develop .#tauri-shell --command ob-tauri-before-build-ci + - run: nix develop --impure .#tauri-shell --command ob-tauri-before-build-ci working-directory: ./tauri-app env: WALLETCONNECT_PROJECT_ID: ${{ secrets.WALLETCONNECT_PROJECT_ID || 'test' }} - - run: nix develop .#tauri-shell --command npm run svelte-lint-format-check + - run: nix develop --impure .#tauri-shell --command npm run svelte-lint-format-check working-directory: ./tauri-app - name: Reset workspace target before Rust tests @@ -106,7 +107,7 @@ jobs: rm -rf tauri-app/src-tauri/target - name: Run Rust tests with reduced debug artifacts - run: nix develop .#tauri-shell --command tauri-rs-test + run: nix develop --impure .#tauri-shell --command tauri-rs-test env: RUSTFLAGS: "-Cdebuginfo=0" CARGO_INCREMENTAL: 0 @@ -115,7 +116,7 @@ jobs: rm -rf target rm -rf tauri-app/src-tauri/target - - run: nix develop .#tauri-shell --command cargo tauri build --verbose + - run: nix develop --impure .#tauri-shell --command cargo tauri build --verbose working-directory: ./tauri-app - name: Reclaim workspace target artifacts From e5ef0c10a617f48259b081da88ebe91ab28afcd0 Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Sat, 11 Oct 2025 22:41:02 +0000 Subject: [PATCH 22/94] Update libsoup version in flake.nix --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 96e980f0c6..62cda11d5b 100644 --- a/flake.nix +++ b/flake.nix @@ -289,7 +289,7 @@ ]; shellHook = rainix.devShells.${system}.tauri-shell.shellHook; buildInputs = rainix.devShells.${system}.tauri-shell.buildInputs - ++ [ pkgs.clang-tools pkgs.libsoup_3 ]; + ++ [ pkgs.clang-tools pkgs.libsoup_2_4 ]; nativeBuildInputs = rainix.devShells.${system}.tauri-shell.nativeBuildInputs; }; From 8c424fc078180ac377e330cd6c8be5b0cea562d5 Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Sat, 11 Oct 2025 23:00:09 +0000 Subject: [PATCH 23/94] Use --impure flag for tauri-shell development --- prep-all.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/prep-all.sh b/prep-all.sh index 61a1a50c5b..7844af2d3e 100755 --- a/prep-all.sh +++ b/prep-all.sh @@ -53,8 +53,8 @@ nix develop -i ${keep[@]} -c rainix-rs-prelude nix develop -i ${keep[@]} -c raindex-prelude echo "Setting up UI components..." -nix develop -i ${keep[@]} .#tauri-shell -c ob-tauri-prelude -nix develop -i ${keep[@]} .#tauri-shell -c ob-ui-components-prelude +nix develop --impure -i ${keep[@]} .#tauri-shell -c ob-tauri-prelude +nix develop --impure -i ${keep[@]} .#tauri-shell -c ob-ui-components-prelude echo "Building packages..." nix develop -i ${keep[@]} -c bash -c '(npm run build -w @rainlanguage/orderbook)' From cb50d976ccde70e4a2e2d8e632c0c3814a028a7d Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Sat, 11 Oct 2025 23:01:05 +0000 Subject: [PATCH 24/94] Allow insecure Nixpkgs in Vercel docs preview workflow --- .github/workflows/vercel-docs-preview.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/vercel-docs-preview.yaml b/.github/workflows/vercel-docs-preview.yaml index 804b8907d4..d19fb58224 100644 --- a/.github/workflows/vercel-docs-preview.yaml +++ b/.github/workflows/vercel-docs-preview.yaml @@ -18,6 +18,7 @@ jobs: contents: read env: COMMIT_SHA: ${{ github.sha }} + NIXPKGS_ALLOW_INSECURE: 1 steps: - uses: actions/checkout@v4 with: From 6eba209eb9b0832b8c84eb2b093d73ae7516a6eb Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Sat, 11 Oct 2025 23:01:21 +0000 Subject: [PATCH 25/94] Allow insecure Nixpkgs in Vercel workflow --- .github/workflows/vercel-docs-prod.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/vercel-docs-prod.yaml b/.github/workflows/vercel-docs-prod.yaml index 1a13086022..1dcd49c16f 100644 --- a/.github/workflows/vercel-docs-prod.yaml +++ b/.github/workflows/vercel-docs-prod.yaml @@ -14,6 +14,7 @@ jobs: runs-on: ubuntu-latest env: COMMIT_SHA: ${{ github.sha }} + NIXPKGS_ALLOW_INSECURE: 1 steps: - uses: actions/checkout@v4 with: From 054da8da0da686f95c9cd56c38b3dcfabcb8be26 Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Sat, 11 Oct 2025 23:01:55 +0000 Subject: [PATCH 26/94] Allow insecure Nixpkgs in Vercel preview workflow --- .github/workflows/vercel-preview-pr-target.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/vercel-preview-pr-target.yaml b/.github/workflows/vercel-preview-pr-target.yaml index d20029b68f..03e5063069 100644 --- a/.github/workflows/vercel-preview-pr-target.yaml +++ b/.github/workflows/vercel-preview-pr-target.yaml @@ -35,6 +35,7 @@ jobs: contents: read env: COMMIT_SHA: ${{ github.sha }} + NIXPKGS_ALLOW_INSECURE: 1 environment: vercel-preview steps: - name: Checkout PR head From 0a59c1139896a1c064dc7a8dc265a7a9c22f18c3 Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Sat, 11 Oct 2025 23:02:12 +0000 Subject: [PATCH 27/94] Allow insecure Nixpkgs in Vercel preview workflow --- .github/workflows/vercel-preview.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/vercel-preview.yaml b/.github/workflows/vercel-preview.yaml index e7a460ac51..f38d3d46a4 100644 --- a/.github/workflows/vercel-preview.yaml +++ b/.github/workflows/vercel-preview.yaml @@ -30,6 +30,7 @@ jobs: contents: read env: COMMIT_SHA: ${{ github.sha }} + NIXPKGS_ALLOW_INSECURE: 1 steps: - name: Checkout repository uses: actions/checkout@v4 From 236644eb7bae7524025ee6be27c016d56c9ef97e Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Sat, 11 Oct 2025 23:02:26 +0000 Subject: [PATCH 28/94] Allow insecure Nixpkgs in Vercel production workflow --- .github/workflows/vercel-prod.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/vercel-prod.yaml b/.github/workflows/vercel-prod.yaml index 4de7683f74..adc128b73f 100644 --- a/.github/workflows/vercel-prod.yaml +++ b/.github/workflows/vercel-prod.yaml @@ -14,6 +14,7 @@ jobs: runs-on: ubuntu-latest env: COMMIT_SHA: ${{ github.sha }} + NIXPKGS_ALLOW_INSECURE: 1 steps: - uses: actions/checkout@v2 with: From 9e33287f7e8844fac3ff93ca95c426b7c2d7aafb Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Sat, 11 Oct 2025 23:03:07 +0000 Subject: [PATCH 29/94] Allow insecure Nix packages in workflow --- .github/workflows/test-webapp.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test-webapp.yaml b/.github/workflows/test-webapp.yaml index cf18f50bea..473da9a86a 100644 --- a/.github/workflows/test-webapp.yaml +++ b/.github/workflows/test-webapp.yaml @@ -43,6 +43,7 @@ jobs: - run: ./prep-all.sh env: PUBLIC_WALLETCONNECT_PROJECT_ID: ${{ secrets.WALLETCONNECT_PROJECT_ID || 'test' }} + NIXPKGS_ALLOW_INSECURE: 1 - run: nix develop -c npm run svelte-lint-format-check -w @rainlanguage/webapp env: From 6551dfe57435d1a4735c234f5735069cee436ac3 Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Sat, 11 Oct 2025 23:03:21 +0000 Subject: [PATCH 30/94] Add NIXPKGS_ALLOW_INSECURE environment variable --- .github/workflows/test-ui-components.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test-ui-components.yaml b/.github/workflows/test-ui-components.yaml index 39252fb2f6..7128df893f 100644 --- a/.github/workflows/test-ui-components.yaml +++ b/.github/workflows/test-ui-components.yaml @@ -43,6 +43,7 @@ jobs: - run: ./prep-all.sh env: PUBLIC_WALLETCONNECT_PROJECT_ID: ${{ secrets.WALLETCONNECT_PROJECT_ID || 'test' }} + NIXPKGS_ALLOW_INSECURE: 1 - run: nix develop -c npm run svelte-lint-format-check -w @rainlanguage/ui-components From 2a62efa0993f385527bb4546aabe74a9bbcd9f00 Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Sat, 11 Oct 2025 23:04:15 +0000 Subject: [PATCH 31/94] Set NIXPKGS_ALLOW_INSECURE environment variable Allow insecure Nix packages during the script execution. --- .github/workflows/rainix.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/rainix.yaml b/.github/workflows/rainix.yaml index 3ebb8ac02f..b16603329b 100644 --- a/.github/workflows/rainix.yaml +++ b/.github/workflows/rainix.yaml @@ -93,6 +93,8 @@ jobs: gc-max-store-size-linux: 10G - run: ./pointers.sh + env: + NIXPKGS_ALLOW_INSECURE: 1 - name: Generate ephemeral deployment key run: | From 777718083dda5f25d4722c53af064cbca0d98b73 Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Sat, 11 Oct 2025 23:04:59 +0000 Subject: [PATCH 32/94] Remove and re-add NIXPKGS_ALLOW_INSECURE env variable --- .github/workflows/vercel-docs-preview.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/vercel-docs-preview.yaml b/.github/workflows/vercel-docs-preview.yaml index d19fb58224..c06ddf3269 100644 --- a/.github/workflows/vercel-docs-preview.yaml +++ b/.github/workflows/vercel-docs-preview.yaml @@ -18,7 +18,6 @@ jobs: contents: read env: COMMIT_SHA: ${{ github.sha }} - NIXPKGS_ALLOW_INSECURE: 1 steps: - uses: actions/checkout@v4 with: @@ -33,6 +32,7 @@ jobs: - run: ./prep-all.sh env: PUBLIC_WALLETCONNECT_PROJECT_ID: ${{ secrets.WALLETCONNECT_PROJECT_ID }} + NIXPKGS_ALLOW_INSECURE: 1 - run: nix develop .#webapp-shell -c npm run docs working-directory: packages/orderbook From 756caa62f603cd32cde9fae9a9d994bc032f5847 Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Sat, 11 Oct 2025 23:05:15 +0000 Subject: [PATCH 33/94] Move NIXPKGS_ALLOW_INSECURE to prep-all.sh step --- .github/workflows/vercel-docs-prod.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/vercel-docs-prod.yaml b/.github/workflows/vercel-docs-prod.yaml index 1dcd49c16f..98dcd89d28 100644 --- a/.github/workflows/vercel-docs-prod.yaml +++ b/.github/workflows/vercel-docs-prod.yaml @@ -14,7 +14,6 @@ jobs: runs-on: ubuntu-latest env: COMMIT_SHA: ${{ github.sha }} - NIXPKGS_ALLOW_INSECURE: 1 steps: - uses: actions/checkout@v4 with: @@ -29,6 +28,7 @@ jobs: - run: ./prep-all.sh env: PUBLIC_WALLETCONNECT_PROJECT_ID: ${{ secrets.WALLETCONNECT_PROJECT_ID }} + NIXPKGS_ALLOW_INSECURE: 1 - run: nix develop .#webapp-shell -c npm run docs working-directory: packages/orderbook From 648f15fefce2d077dea270716857df44e3fd1282 Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Sat, 11 Oct 2025 23:05:39 +0000 Subject: [PATCH 34/94] Restore NIXPKGS_ALLOW_INSECURE in workflow Re-add NIXPKGS_ALLOW_INSECURE environment variable for build step. --- .github/workflows/vercel-preview-pr-target.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/vercel-preview-pr-target.yaml b/.github/workflows/vercel-preview-pr-target.yaml index 03e5063069..4c5514b766 100644 --- a/.github/workflows/vercel-preview-pr-target.yaml +++ b/.github/workflows/vercel-preview-pr-target.yaml @@ -35,7 +35,6 @@ jobs: contents: read env: COMMIT_SHA: ${{ github.sha }} - NIXPKGS_ALLOW_INSECURE: 1 environment: vercel-preview steps: - name: Checkout PR head @@ -54,6 +53,7 @@ jobs: - run: ./prep-all.sh env: PUBLIC_WALLETCONNECT_PROJECT_ID: test + NIXPKGS_ALLOW_INSECURE: 1 - run: nix develop .#webapp-shell -c npm run build working-directory: packages/webapp From 51fb2b9530b83ca9fd66d5537e83077f97e110a8 Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Sat, 11 Oct 2025 23:05:56 +0000 Subject: [PATCH 35/94] Move NIXPKGS_ALLOW_INSECURE to prep-all step --- .github/workflows/vercel-preview.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/vercel-preview.yaml b/.github/workflows/vercel-preview.yaml index f38d3d46a4..a6c7808974 100644 --- a/.github/workflows/vercel-preview.yaml +++ b/.github/workflows/vercel-preview.yaml @@ -30,7 +30,6 @@ jobs: contents: read env: COMMIT_SHA: ${{ github.sha }} - NIXPKGS_ALLOW_INSECURE: 1 steps: - name: Checkout repository uses: actions/checkout@v4 @@ -58,6 +57,7 @@ jobs: - run: ./prep-all.sh env: PUBLIC_WALLETCONNECT_PROJECT_ID: ${{ secrets.WALLETCONNECT_PROJECT_ID }} + NIXPKGS_ALLOW_INSECURE: 1 - run: nix develop .#webapp-shell -c npm run build working-directory: packages/webapp From 91abd78b3bd2f9eb1ef56af31ee57eb60401891e Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Sat, 11 Oct 2025 23:06:10 +0000 Subject: [PATCH 36/94] Restore NIXPKGS_ALLOW_INSECURE in workflow Re-add NIXPKGS_ALLOW_INSECURE environment variable for build step. --- .github/workflows/vercel-prod.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/vercel-prod.yaml b/.github/workflows/vercel-prod.yaml index adc128b73f..277049d003 100644 --- a/.github/workflows/vercel-prod.yaml +++ b/.github/workflows/vercel-prod.yaml @@ -14,7 +14,6 @@ jobs: runs-on: ubuntu-latest env: COMMIT_SHA: ${{ github.sha }} - NIXPKGS_ALLOW_INSECURE: 1 steps: - uses: actions/checkout@v2 with: @@ -41,6 +40,7 @@ jobs: - run: ./prep-all.sh env: PUBLIC_WALLETCONNECT_PROJECT_ID: ${{ secrets.WALLETCONNECT_PROJECT_ID }} + NIXPKGS_ALLOW_INSECURE: 1 - run: nix develop .#webapp-shell -c npm run build working-directory: packages/webapp From 4f5dc8951efdfd9d657e06280250b6b40df2e8cb Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Sat, 11 Oct 2025 23:39:22 +0000 Subject: [PATCH 37/94] upd --- .github/workflows/rainix.yaml | 2 -- .github/workflows/test-ui-components.yaml | 1 - .github/workflows/test-webapp.yaml | 1 - .github/workflows/vercel-docs-preview.yaml | 1 - .github/workflows/vercel-docs-prod.yaml | 1 - .github/workflows/vercel-preview-pr-target.yaml | 3 +-- .github/workflows/vercel-preview.yaml | 1 - .github/workflows/vercel-prod.yaml | 1 - prep-all.sh | 4 ++-- 9 files changed, 3 insertions(+), 12 deletions(-) diff --git a/.github/workflows/rainix.yaml b/.github/workflows/rainix.yaml index b16603329b..3ebb8ac02f 100644 --- a/.github/workflows/rainix.yaml +++ b/.github/workflows/rainix.yaml @@ -93,8 +93,6 @@ jobs: gc-max-store-size-linux: 10G - run: ./pointers.sh - env: - NIXPKGS_ALLOW_INSECURE: 1 - name: Generate ephemeral deployment key run: | diff --git a/.github/workflows/test-ui-components.yaml b/.github/workflows/test-ui-components.yaml index 7128df893f..39252fb2f6 100644 --- a/.github/workflows/test-ui-components.yaml +++ b/.github/workflows/test-ui-components.yaml @@ -43,7 +43,6 @@ jobs: - run: ./prep-all.sh env: PUBLIC_WALLETCONNECT_PROJECT_ID: ${{ secrets.WALLETCONNECT_PROJECT_ID || 'test' }} - NIXPKGS_ALLOW_INSECURE: 1 - run: nix develop -c npm run svelte-lint-format-check -w @rainlanguage/ui-components diff --git a/.github/workflows/test-webapp.yaml b/.github/workflows/test-webapp.yaml index 473da9a86a..cf18f50bea 100644 --- a/.github/workflows/test-webapp.yaml +++ b/.github/workflows/test-webapp.yaml @@ -43,7 +43,6 @@ jobs: - run: ./prep-all.sh env: PUBLIC_WALLETCONNECT_PROJECT_ID: ${{ secrets.WALLETCONNECT_PROJECT_ID || 'test' }} - NIXPKGS_ALLOW_INSECURE: 1 - run: nix develop -c npm run svelte-lint-format-check -w @rainlanguage/webapp env: diff --git a/.github/workflows/vercel-docs-preview.yaml b/.github/workflows/vercel-docs-preview.yaml index c06ddf3269..804b8907d4 100644 --- a/.github/workflows/vercel-docs-preview.yaml +++ b/.github/workflows/vercel-docs-preview.yaml @@ -32,7 +32,6 @@ jobs: - run: ./prep-all.sh env: PUBLIC_WALLETCONNECT_PROJECT_ID: ${{ secrets.WALLETCONNECT_PROJECT_ID }} - NIXPKGS_ALLOW_INSECURE: 1 - run: nix develop .#webapp-shell -c npm run docs working-directory: packages/orderbook diff --git a/.github/workflows/vercel-docs-prod.yaml b/.github/workflows/vercel-docs-prod.yaml index 98dcd89d28..1a13086022 100644 --- a/.github/workflows/vercel-docs-prod.yaml +++ b/.github/workflows/vercel-docs-prod.yaml @@ -28,7 +28,6 @@ jobs: - run: ./prep-all.sh env: PUBLIC_WALLETCONNECT_PROJECT_ID: ${{ secrets.WALLETCONNECT_PROJECT_ID }} - NIXPKGS_ALLOW_INSECURE: 1 - run: nix develop .#webapp-shell -c npm run docs working-directory: packages/orderbook diff --git a/.github/workflows/vercel-preview-pr-target.yaml b/.github/workflows/vercel-preview-pr-target.yaml index 4c5514b766..fd6c44b3c4 100644 --- a/.github/workflows/vercel-preview-pr-target.yaml +++ b/.github/workflows/vercel-preview-pr-target.yaml @@ -52,8 +52,7 @@ jobs: keep-outputs = true - run: ./prep-all.sh env: - PUBLIC_WALLETCONNECT_PROJECT_ID: test - NIXPKGS_ALLOW_INSECURE: 1 + PUBLIC_WALLETCONNECT_PROJECT_ID: test - run: nix develop .#webapp-shell -c npm run build working-directory: packages/webapp diff --git a/.github/workflows/vercel-preview.yaml b/.github/workflows/vercel-preview.yaml index a6c7808974..e7a460ac51 100644 --- a/.github/workflows/vercel-preview.yaml +++ b/.github/workflows/vercel-preview.yaml @@ -57,7 +57,6 @@ jobs: - run: ./prep-all.sh env: PUBLIC_WALLETCONNECT_PROJECT_ID: ${{ secrets.WALLETCONNECT_PROJECT_ID }} - NIXPKGS_ALLOW_INSECURE: 1 - run: nix develop .#webapp-shell -c npm run build working-directory: packages/webapp diff --git a/.github/workflows/vercel-prod.yaml b/.github/workflows/vercel-prod.yaml index 277049d003..4de7683f74 100644 --- a/.github/workflows/vercel-prod.yaml +++ b/.github/workflows/vercel-prod.yaml @@ -40,7 +40,6 @@ jobs: - run: ./prep-all.sh env: PUBLIC_WALLETCONNECT_PROJECT_ID: ${{ secrets.WALLETCONNECT_PROJECT_ID }} - NIXPKGS_ALLOW_INSECURE: 1 - run: nix develop .#webapp-shell -c npm run build working-directory: packages/webapp diff --git a/prep-all.sh b/prep-all.sh index 7844af2d3e..2190592329 100755 --- a/prep-all.sh +++ b/prep-all.sh @@ -53,8 +53,8 @@ nix develop -i ${keep[@]} -c rainix-rs-prelude nix develop -i ${keep[@]} -c raindex-prelude echo "Setting up UI components..." -nix develop --impure -i ${keep[@]} .#tauri-shell -c ob-tauri-prelude -nix develop --impure -i ${keep[@]} .#tauri-shell -c ob-ui-components-prelude +NIXPKGS_ALLOW_INSECURE=1 nix develop --impure -i ${keep[@]} .#tauri-shell -c ob-tauri-prelude +NIXPKGS_ALLOW_INSECURE=1 nix develop --impure -i ${keep[@]} .#tauri-shell -c ob-ui-components-prelude echo "Building packages..." nix develop -i ${keep[@]} -c bash -c '(npm run build -w @rainlanguage/orderbook)' From 8c4da83be994afd5875ec332a4bfb6edf5465cf4 Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Sat, 11 Oct 2025 23:52:34 +0000 Subject: [PATCH 38/94] fmt --- .github/workflows/vercel-preview-pr-target.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/vercel-preview-pr-target.yaml b/.github/workflows/vercel-preview-pr-target.yaml index fd6c44b3c4..d20029b68f 100644 --- a/.github/workflows/vercel-preview-pr-target.yaml +++ b/.github/workflows/vercel-preview-pr-target.yaml @@ -52,7 +52,7 @@ jobs: keep-outputs = true - run: ./prep-all.sh env: - PUBLIC_WALLETCONNECT_PROJECT_ID: test + PUBLIC_WALLETCONNECT_PROJECT_ID: test - run: nix develop .#webapp-shell -c npm run build working-directory: packages/webapp From d1c75aaa6ec8a9051bbe706598d4fe03924982a8 Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Sun, 12 Oct 2025 00:43:41 +0000 Subject: [PATCH 39/94] Update flake.nix --- flake.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 62cda11d5b..2f0e9f7cd6 100644 --- a/flake.nix +++ b/flake.nix @@ -289,7 +289,10 @@ ]; shellHook = rainix.devShells.${system}.tauri-shell.shellHook; buildInputs = rainix.devShells.${system}.tauri-shell.buildInputs - ++ [ pkgs.clang-tools pkgs.libsoup_2_4 ]; + ++ [ pkgs.clang-tools pkgs.libsoup_2_4 ] + ++ (pkgs.lib.optionals (!pkgs.stdenv.isDarwin) [ + pkgs.webkitgtk_4_0 + ]); nativeBuildInputs = rainix.devShells.${system}.tauri-shell.nativeBuildInputs; }; From 0223a9744d987037221b597ec238ee3b2c108ff2 Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Sun, 12 Oct 2025 21:54:13 +0000 Subject: [PATCH 40/94] update flake --- flake.lock | 7 ++++--- flake.nix | 7 ++----- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/flake.lock b/flake.lock index 18c99cf49a..437ac7f038 100644 --- a/flake.lock +++ b/flake.lock @@ -367,16 +367,17 @@ "solc": "solc_2" }, "locked": { - "lastModified": 1758730752, - "narHash": "sha256-ZQ1INSsEWYgb1NdC5zo6nu1ObLzOCDI+wjiZ4222fQ8=", + "lastModified": 1760305638, + "narHash": "sha256-EHUe2NS1A9jKZgIx3YX1OkzLusNS8XmNEt0AMfJxQqs=", "owner": "rainlanguage", "repo": "rainix", - "rev": "cc7c9bbbd9b817aa3a6a5c994262e14fb0bc920c", + "rev": "a6ec108595ef128e4975799a9acd6d01ef1cce91", "type": "github" }, "original": { "owner": "rainlanguage", "repo": "rainix", + "rev": "a6ec108595ef128e4975799a9acd6d01ef1cce91", "type": "github" } }, diff --git a/flake.nix b/flake.nix index 2f0e9f7cd6..b863baaf5e 100644 --- a/flake.nix +++ b/flake.nix @@ -2,7 +2,7 @@ description = "Flake for development workflows."; inputs = { - rainix.url = "github:rainlanguage/rainix"; + rainix.url = "github:rainlanguage/rainix?rev=a6ec108595ef128e4975799a9acd6d01ef1cce91"; rain.url = "github:rainlanguage/rain.cli"; flake-utils.url = "github:numtide/flake-utils"; }; @@ -289,10 +289,7 @@ ]; shellHook = rainix.devShells.${system}.tauri-shell.shellHook; buildInputs = rainix.devShells.${system}.tauri-shell.buildInputs - ++ [ pkgs.clang-tools pkgs.libsoup_2_4 ] - ++ (pkgs.lib.optionals (!pkgs.stdenv.isDarwin) [ - pkgs.webkitgtk_4_0 - ]); + ++ [ pkgs.clang-tools pkgs.libsoup_2_4 ]; nativeBuildInputs = rainix.devShells.${system}.tauri-shell.nativeBuildInputs; }; From 98ca4939c9abe75194903cbf2c52579d0196bc5b Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Sun, 12 Oct 2025 22:39:39 +0000 Subject: [PATCH 41/94] update --- .github/workflows/tauri-release.yml | 18 +++--------------- .github/workflows/tauri.yaml | 18 +++--------------- .github/workflows/test-ui-components.yaml | 18 +++--------------- .github/workflows/test-webapp.yaml | 18 +++--------------- .../workflows/vercel-preview-pr-target.yaml | 7 +++---- .github/workflows/vercel-preview.yaml | 18 +++--------------- .github/workflows/vercel-prod.yaml | 18 +++--------------- 7 files changed, 21 insertions(+), 94 deletions(-) diff --git a/.github/workflows/tauri-release.yml b/.github/workflows/tauri-release.yml index 2ffa454d39..3c1cef3ec4 100644 --- a/.github/workflows/tauri-release.yml +++ b/.github/workflows/tauri-release.yml @@ -66,22 +66,10 @@ jobs: submodules: recursive fetch-depth: 0 - - uses: nixbuild/nix-quick-install-action@v30 + - uses: DeterminateSystems/nix-installer-action@main with: - nix_conf: | - keep-env-derivations = true - keep-outputs = true - - name: Restore and save Nix store - uses: nix-community/cache-nix-action@v6 - with: - # restore and save a cache using this key - primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix', '**/flake.lock') }} - # if there's no cache hit, restore a cache by this prefix - restore-prefixes-first-match: nix-${{ runner.os }}- - # collect garbage until the Nix store size (in bytes) is at most this number - # before trying to save a new cache - # 1G = 1073741824 - gc-max-store-size-linux: 1G + determinate: true + - uses: DeterminateSystems/flakehub-cache-action@main - run: ./prep-all.sh env: diff --git a/.github/workflows/tauri.yaml b/.github/workflows/tauri.yaml index 5f3ece4a3d..a132e54f7a 100644 --- a/.github/workflows/tauri.yaml +++ b/.github/workflows/tauri.yaml @@ -71,22 +71,10 @@ jobs: submodules: recursive fetch-depth: 0 - - uses: nixbuild/nix-quick-install-action@v30 + - uses: DeterminateSystems/nix-installer-action@main with: - nix_conf: | - keep-env-derivations = true - keep-outputs = true - - name: Restore and save Nix store - uses: nix-community/cache-nix-action@v6 - with: - # restore and save a cache using this key - primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix', '**/flake.lock') }} - # if there's no cache hit, restore a cache by this prefix - restore-prefixes-first-match: nix-${{ runner.os }}- - # collect garbage until the Nix store size (in bytes) is at most this number - # before trying to save a new cache - # 1G = 1073741824 - gc-max-store-size-linux: 1G + determinate: true + - uses: DeterminateSystems/flakehub-cache-action@main - run: ./prep-all.sh env: diff --git a/.github/workflows/test-ui-components.yaml b/.github/workflows/test-ui-components.yaml index 39252fb2f6..0deda18177 100644 --- a/.github/workflows/test-ui-components.yaml +++ b/.github/workflows/test-ui-components.yaml @@ -23,22 +23,10 @@ jobs: submodules: recursive fetch-depth: 0 - - uses: nixbuild/nix-quick-install-action@v30 + - uses: DeterminateSystems/nix-installer-action@main with: - nix_conf: | - keep-env-derivations = true - keep-outputs = true - - name: Restore and save Nix store - uses: nix-community/cache-nix-action@v6 - with: - # restore and save a cache using this key - primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix', '**/flake.lock') }} - # if there's no cache hit, restore a cache by this prefix - restore-prefixes-first-match: nix-${{ runner.os }}- - # collect garbage until the Nix store size (in bytes) is at most this number - # before trying to save a new cache - # 1G = 1073741824 - gc-max-store-size-linux: 1G + determinate: true + - uses: DeterminateSystems/flakehub-cache-action@main - run: ./prep-all.sh env: diff --git a/.github/workflows/test-webapp.yaml b/.github/workflows/test-webapp.yaml index cf18f50bea..25d9782ef7 100644 --- a/.github/workflows/test-webapp.yaml +++ b/.github/workflows/test-webapp.yaml @@ -23,22 +23,10 @@ jobs: submodules: recursive fetch-depth: 0 - - uses: nixbuild/nix-quick-install-action@v30 + - uses: DeterminateSystems/nix-installer-action@main with: - nix_conf: | - keep-env-derivations = true - keep-outputs = true - - name: Restore and save Nix store - uses: nix-community/cache-nix-action@v6 - with: - # restore and save a cache using this key - primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix', '**/flake.lock') }} - # if there's no cache hit, restore a cache by this prefix - restore-prefixes-first-match: nix-${{ runner.os }}- - # collect garbage until the Nix store size (in bytes) is at most this number - # before trying to save a new cache - # 1G = 1073741824 - gc-max-store-size-linux: 1G + determinate: true + - uses: DeterminateSystems/flakehub-cache-action@main - run: ./prep-all.sh env: diff --git a/.github/workflows/vercel-preview-pr-target.yaml b/.github/workflows/vercel-preview-pr-target.yaml index d20029b68f..8d0c9a70c6 100644 --- a/.github/workflows/vercel-preview-pr-target.yaml +++ b/.github/workflows/vercel-preview-pr-target.yaml @@ -45,11 +45,10 @@ jobs: repository: ${{ github.event.pull_request.head.repo.full_name }} ref: ${{ github.event.pull_request.head.sha }} persist-credentials: false - - uses: nixbuild/nix-quick-install-action@v30 + - uses: DeterminateSystems/nix-installer-action@main with: - nix_conf: | - keep-env-derivations = true - keep-outputs = true + determinate: true + - uses: DeterminateSystems/flakehub-cache-action@main - run: ./prep-all.sh env: PUBLIC_WALLETCONNECT_PROJECT_ID: test diff --git a/.github/workflows/vercel-preview.yaml b/.github/workflows/vercel-preview.yaml index e7a460ac51..566d26ed94 100644 --- a/.github/workflows/vercel-preview.yaml +++ b/.github/workflows/vercel-preview.yaml @@ -37,22 +37,10 @@ jobs: submodules: recursive fetch-depth: 0 - - uses: nixbuild/nix-quick-install-action@v30 + - uses: DeterminateSystems/nix-installer-action@main with: - nix_conf: | - keep-env-derivations = true - keep-outputs = true - - name: Restore and save Nix store - uses: nix-community/cache-nix-action@v6 - with: - # restore and save a cache using this key - primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix', '**/flake.lock') }} - # if there's no cache hit, restore a cache by this prefix - restore-prefixes-first-match: nix-${{ runner.os }}- - # collect garbage until the Nix store size (in bytes) is at most this number - # before trying to save a new cache - # 1G = 1073741824 - gc-max-store-size-linux: 1G + determinate: true + - uses: DeterminateSystems/flakehub-cache-action@main - run: ./prep-all.sh env: diff --git a/.github/workflows/vercel-prod.yaml b/.github/workflows/vercel-prod.yaml index 4de7683f74..be6fe20bec 100644 --- a/.github/workflows/vercel-prod.yaml +++ b/.github/workflows/vercel-prod.yaml @@ -20,22 +20,10 @@ jobs: submodules: recursive fetch-depth: 0 - - uses: nixbuild/nix-quick-install-action@v30 + - uses: DeterminateSystems/nix-installer-action@main with: - nix_conf: | - keep-env-derivations = true - keep-outputs = true - - name: Restore and save Nix store - uses: nix-community/cache-nix-action@v6 - with: - # restore and save a cache using this key - primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix', '**/flake.lock') }} - # if there's no cache hit, restore a cache by this prefix - restore-prefixes-first-match: nix-${{ runner.os }}- - # collect garbage until the Nix store size (in bytes) is at most this number - # before trying to save a new cache - # 1G = 1073741824 - gc-max-store-size-linux: 1G + determinate: true + - uses: DeterminateSystems/flakehub-cache-action@main - run: ./prep-all.sh env: From 148261c6673a37686c680acbb4af5136df851e14 Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Sun, 12 Oct 2025 23:56:33 +0000 Subject: [PATCH 42/94] Update vercel-preview.yaml --- .github/workflows/vercel-preview.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/vercel-preview.yaml b/.github/workflows/vercel-preview.yaml index 566d26ed94..6e1d292466 100644 --- a/.github/workflows/vercel-preview.yaml +++ b/.github/workflows/vercel-preview.yaml @@ -28,6 +28,7 @@ jobs: runs-on: ubuntu-latest permissions: contents: read + id-token: write env: COMMIT_SHA: ${{ github.sha }} steps: From 74a32b3fd43027acd06d278015cfc67feb04d4fa Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Tue, 14 Oct 2025 18:01:58 +0000 Subject: [PATCH 43/94] upd --- flake.lock | 7 +++---- flake.nix | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/flake.lock b/flake.lock index 437ac7f038..81c5d4fc03 100644 --- a/flake.lock +++ b/flake.lock @@ -367,17 +367,16 @@ "solc": "solc_2" }, "locked": { - "lastModified": 1760305638, - "narHash": "sha256-EHUe2NS1A9jKZgIx3YX1OkzLusNS8XmNEt0AMfJxQqs=", + "lastModified": 1760460761, + "narHash": "sha256-IHvwnmphDaOyZnzvObwOoDQlA9nzym2ZUxe9K/5vs0U=", "owner": "rainlanguage", "repo": "rainix", - "rev": "a6ec108595ef128e4975799a9acd6d01ef1cce91", + "rev": "add0d8a1fd76ce0e65b962c952e9252257876465", "type": "github" }, "original": { "owner": "rainlanguage", "repo": "rainix", - "rev": "a6ec108595ef128e4975799a9acd6d01ef1cce91", "type": "github" } }, diff --git a/flake.nix b/flake.nix index 339148ecea..7f7c31128f 100644 --- a/flake.nix +++ b/flake.nix @@ -2,7 +2,7 @@ description = "Flake for development workflows."; inputs = { - rainix.url = "github:rainlanguage/rainix?rev=a6ec108595ef128e4975799a9acd6d01ef1cce91"; + rainix.url = "github:rainlanguage/rainix"; rain.url = "github:rainlanguage/rain.cli"; flake-utils.url = "github:numtide/flake-utils"; }; From 0d3c0493eeecd6a711b5e411806cf91b6a2bd50b Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Wed, 15 Oct 2025 18:32:39 +0000 Subject: [PATCH 44/94] test v34 --- .github/workflows/test-webapp.yaml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-webapp.yaml b/.github/workflows/test-webapp.yaml index 25d9782ef7..6e8e7ebb82 100644 --- a/.github/workflows/test-webapp.yaml +++ b/.github/workflows/test-webapp.yaml @@ -23,10 +23,22 @@ jobs: submodules: recursive fetch-depth: 0 - - uses: DeterminateSystems/nix-installer-action@main + - uses: nixbuild/nix-quick-install-action@v34 with: - determinate: true - - uses: DeterminateSystems/flakehub-cache-action@main + nix_conf: | + keep-env-derivations = true + keep-outputs = true + - name: Restore and save Nix store + uses: nix-community/cache-nix-action@v6 + with: + # restore and save a cache using this key + primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix', '**/flake.lock') }} + # if there's no cache hit, restore a cache by this prefix + restore-prefixes-first-match: nix-${{ runner.os }}- + # collect garbage until the Nix store size (in bytes) is at most this number + # before trying to save a new cache + # 1G = 1073741824 + gc-max-store-size-linux: 1G - run: ./prep-all.sh env: From 17905dd6b115eb56829c50233508fc740f61597c Mon Sep 17 00:00:00 2001 From: 0xgleb Date: Fri, 24 Oct 2025 11:48:02 -0300 Subject: [PATCH 45/94] fix error assertion --- crates/quote/src/rpc.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/quote/src/rpc.rs b/crates/quote/src/rpc.rs index 5b2635b033..75f713417d 100644 --- a/crates/quote/src/rpc.rs +++ b/crates/quote/src/rpc.rs @@ -246,7 +246,7 @@ mod tests { }, MulticallResult { success: false, - returnData: alloy::hex!("deadbeef").to_vec().into(), // Unknown error selector + returnData: alloy::hex!("ff00ff00").to_vec().into(), // Unknown error selector }, ] .abi_encode(); From 4ff2c278cb8a3f2062046566cafe9a1f1e54a0f7 Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Mon, 27 Oct 2025 18:24:34 +0000 Subject: [PATCH 46/94] revert nix installer on cis --- .github/workflows/tauri-release.yml | 18 +++++++++++++++--- .github/workflows/tauri.yaml | 18 +++++++++++++++--- .github/workflows/test-ui-components.yaml | 18 +++++++++++++++--- .../workflows/vercel-preview-pr-target.yaml | 7 ++++--- .github/workflows/vercel-preview.yaml | 18 +++++++++++++++--- .github/workflows/vercel-prod.yaml | 18 +++++++++++++++--- tauri-app/src-tauri/Cargo.lock | 1 + 7 files changed, 80 insertions(+), 18 deletions(-) diff --git a/.github/workflows/tauri-release.yml b/.github/workflows/tauri-release.yml index 3c1cef3ec4..3b9e3ada06 100644 --- a/.github/workflows/tauri-release.yml +++ b/.github/workflows/tauri-release.yml @@ -66,10 +66,22 @@ jobs: submodules: recursive fetch-depth: 0 - - uses: DeterminateSystems/nix-installer-action@main + - uses: nixbuild/nix-quick-install-action@v34 with: - determinate: true - - uses: DeterminateSystems/flakehub-cache-action@main + nix_conf: | + keep-env-derivations = true + keep-outputs = true + - name: Restore and save Nix store + uses: nix-community/cache-nix-action@v6 + with: + # restore and save a cache using this key + primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix', '**/flake.lock') }} + # if there's no cache hit, restore a cache by this prefix + restore-prefixes-first-match: nix-${{ runner.os }}- + # collect garbage until the Nix store size (in bytes) is at most this number + # before trying to save a new cache + # 1G = 1073741824 + gc-max-store-size-linux: 1G - run: ./prep-all.sh env: diff --git a/.github/workflows/tauri.yaml b/.github/workflows/tauri.yaml index a132e54f7a..425fb437a2 100644 --- a/.github/workflows/tauri.yaml +++ b/.github/workflows/tauri.yaml @@ -71,10 +71,22 @@ jobs: submodules: recursive fetch-depth: 0 - - uses: DeterminateSystems/nix-installer-action@main + - uses: nixbuild/nix-quick-install-action@v34 with: - determinate: true - - uses: DeterminateSystems/flakehub-cache-action@main + nix_conf: | + keep-env-derivations = true + keep-outputs = true + - name: Restore and save Nix store + uses: nix-community/cache-nix-action@v6 + with: + # restore and save a cache using this key + primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix', '**/flake.lock') }} + # if there's no cache hit, restore a cache by this prefix + restore-prefixes-first-match: nix-${{ runner.os }}- + # collect garbage until the Nix store size (in bytes) is at most this number + # before trying to save a new cache + # 1G = 1073741824 + gc-max-store-size-linux: 1G - run: ./prep-all.sh env: diff --git a/.github/workflows/test-ui-components.yaml b/.github/workflows/test-ui-components.yaml index 0deda18177..e2c3f5464a 100644 --- a/.github/workflows/test-ui-components.yaml +++ b/.github/workflows/test-ui-components.yaml @@ -23,10 +23,22 @@ jobs: submodules: recursive fetch-depth: 0 - - uses: DeterminateSystems/nix-installer-action@main + - uses: nixbuild/nix-quick-install-action@v34 with: - determinate: true - - uses: DeterminateSystems/flakehub-cache-action@main + nix_conf: | + keep-env-derivations = true + keep-outputs = true + - name: Restore and save Nix store + uses: nix-community/cache-nix-action@v6 + with: + # restore and save a cache using this key + primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix', '**/flake.lock') }} + # if there's no cache hit, restore a cache by this prefix + restore-prefixes-first-match: nix-${{ runner.os }}- + # collect garbage until the Nix store size (in bytes) is at most this number + # before trying to save a new cache + # 1G = 1073741824 + gc-max-store-size-linux: 1G - run: ./prep-all.sh env: diff --git a/.github/workflows/vercel-preview-pr-target.yaml b/.github/workflows/vercel-preview-pr-target.yaml index 8d0c9a70c6..6f3c8c3608 100644 --- a/.github/workflows/vercel-preview-pr-target.yaml +++ b/.github/workflows/vercel-preview-pr-target.yaml @@ -45,10 +45,11 @@ jobs: repository: ${{ github.event.pull_request.head.repo.full_name }} ref: ${{ github.event.pull_request.head.sha }} persist-credentials: false - - uses: DeterminateSystems/nix-installer-action@main + - uses: nixbuild/nix-quick-install-action@v34 with: - determinate: true - - uses: DeterminateSystems/flakehub-cache-action@main + nix_conf: | + keep-env-derivations = true + keep-outputs = true - run: ./prep-all.sh env: PUBLIC_WALLETCONNECT_PROJECT_ID: test diff --git a/.github/workflows/vercel-preview.yaml b/.github/workflows/vercel-preview.yaml index 6e1d292466..ff9c458b5c 100644 --- a/.github/workflows/vercel-preview.yaml +++ b/.github/workflows/vercel-preview.yaml @@ -38,10 +38,22 @@ jobs: submodules: recursive fetch-depth: 0 - - uses: DeterminateSystems/nix-installer-action@main + - uses: nixbuild/nix-quick-install-action@v34 with: - determinate: true - - uses: DeterminateSystems/flakehub-cache-action@main + nix_conf: | + keep-env-derivations = true + keep-outputs = true + - name: Restore and save Nix store + uses: nix-community/cache-nix-action@v6 + with: + # restore and save a cache using this key + primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix', '**/flake.lock') }} + # if there's no cache hit, restore a cache by this prefix + restore-prefixes-first-match: nix-${{ runner.os }}- + # collect garbage until the Nix store size (in bytes) is at most this number + # before trying to save a new cache + # 1G = 1073741824 + gc-max-store-size-linux: 1G - run: ./prep-all.sh env: diff --git a/.github/workflows/vercel-prod.yaml b/.github/workflows/vercel-prod.yaml index be6fe20bec..4dbdb1aca9 100644 --- a/.github/workflows/vercel-prod.yaml +++ b/.github/workflows/vercel-prod.yaml @@ -20,10 +20,22 @@ jobs: submodules: recursive fetch-depth: 0 - - uses: DeterminateSystems/nix-installer-action@main + - uses: nixbuild/nix-quick-install-action@v34 with: - determinate: true - - uses: DeterminateSystems/flakehub-cache-action@main + nix_conf: | + keep-env-derivations = true + keep-outputs = true + - name: Restore and save Nix store + uses: nix-community/cache-nix-action@v6 + with: + # restore and save a cache using this key + primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix', '**/flake.lock') }} + # if there's no cache hit, restore a cache by this prefix + restore-prefixes-first-match: nix-${{ runner.os }}- + # collect garbage until the Nix store size (in bytes) is at most this number + # before trying to save a new cache + # 1G = 1073741824 + gc-max-store-size-linux: 1G - run: ./prep-all.sh env: diff --git a/tauri-app/src-tauri/Cargo.lock b/tauri-app/src-tauri/Cargo.lock index d4552c9e17..f67fced41e 100644 --- a/tauri-app/src-tauri/Cargo.lock +++ b/tauri-app/src-tauri/Cargo.lock @@ -8946,6 +8946,7 @@ version = "0.0.0-alpha.0" dependencies = [ "alloy", "alloy-ethers-typecast 0.2.0 (git+https://github.com/rainlanguage/alloy-ethers-typecast?rev=bcc3a04394aefe191fef4ae8e6e94381a419c99a)", + "async-trait", "backon", "chrono", "csv", From 36dbee00eee92a5bdc1608d9dc648cb332ee6b92 Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Mon, 27 Oct 2025 18:28:22 +0000 Subject: [PATCH 47/94] Update vercel-preview.yaml --- .github/workflows/vercel-preview.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/vercel-preview.yaml b/.github/workflows/vercel-preview.yaml index ff9c458b5c..8edd7fd9fd 100644 --- a/.github/workflows/vercel-preview.yaml +++ b/.github/workflows/vercel-preview.yaml @@ -28,7 +28,6 @@ jobs: runs-on: ubuntu-latest permissions: contents: read - id-token: write env: COMMIT_SHA: ${{ github.sha }} steps: From ebee68c0888954e182e1302c2790057d9c39eaca Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Mon, 27 Oct 2025 18:33:04 +0000 Subject: [PATCH 48/94] Update Cargo.lock --- tauri-app/src-tauri/Cargo.lock | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tauri-app/src-tauri/Cargo.lock b/tauri-app/src-tauri/Cargo.lock index f67fced41e..cf79d62b6e 100644 --- a/tauri-app/src-tauri/Cargo.lock +++ b/tauri-app/src-tauri/Cargo.lock @@ -4181,9 +4181,9 @@ dependencies = [ [[package]] name = "form_urlencoded" -version = "1.2.1" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" dependencies = [ "percent-encoding", ] @@ -5860,9 +5860,9 @@ dependencies = [ [[package]] name = "idna" -version = "1.0.3" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" dependencies = [ "idna_adapter", "smallvec", @@ -7963,9 +7963,9 @@ dependencies = [ [[package]] name = "percent-encoding" -version = "2.3.1" +version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" [[package]] name = "pest" @@ -12699,12 +12699,12 @@ dependencies = [ [[package]] name = "url" -version = "2.5.4" +version = "2.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" +checksum = "08bc136a29a3d1758e07a9cca267be308aeebf5cfd5a10f3f67ab2097683ef5b" dependencies = [ "form_urlencoded", - "idna 1.0.3", + "idna 1.1.0", "percent-encoding", "serde", ] From 3c5eccaf0df4d263fdeaa7cca2473b63db068cee Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Mon, 27 Oct 2025 18:51:47 +0000 Subject: [PATCH 49/94] Update rain.interpreter --- lib/rain.interpreter | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rain.interpreter b/lib/rain.interpreter index 4c3552c2f6..d1fee1b9c4 160000 --- a/lib/rain.interpreter +++ b/lib/rain.interpreter @@ -1 +1 @@ -Subproject commit 4c3552c2f6597c02f10d805151b1396fb0204a33 +Subproject commit d1fee1b9c4a427ebd529b9c0b0e17718c1a4a99a From dd4bce633ed8018b65883ab9a6ff7b4afe48a87a Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Mon, 27 Oct 2025 19:17:45 +0000 Subject: [PATCH 50/94] fix rs --- crates/cli/src/commands/order/calldata.rs | 12 ++++++------ crates/common/src/fuzz/impls.rs | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/crates/cli/src/commands/order/calldata.rs b/crates/cli/src/commands/order/calldata.rs index eacb0942d5..0900b0e25e 100644 --- a/crates/cli/src/commands/order/calldata.rs +++ b/crates/cli/src/commands/order/calldata.rs @@ -133,25 +133,25 @@ mod tests { }) }; - // mock iInterpreter() call + // mock I_INTERPRETER() call rpc_server.mock(|when, then| { - when.path("/rpc").body_contains("0xf0cfdd37"); + when.path("/rpc").body_contains("0x56fb83e9"); then.status(200) .header("content-type", "application/json") .json_body(build_address_return(1)); }); - // mock iStore() call + // mock I_STORE() call rpc_server.mock(|when, then| { - when.path("/rpc").body_contains("0xc19423bc"); + when.path("/rpc").body_contains("0x251ac32e"); then.status(200) .header("content-type", "application/json") .json_body(build_address_return(2)); }); - // mock iParser() call + // mock I_PARSER() call rpc_server.mock(|when, then| { - when.path("/rpc").body_contains("0x24376855"); + when.path("/rpc").body_contains("0xf79693f4"); then.status(200) .header("content-type", "application/json") .json_body(build_address_return(3)); diff --git a/crates/common/src/fuzz/impls.rs b/crates/common/src/fuzz/impls.rs index 643bdf2ca6..0d49e2eebf 100644 --- a/crates/common/src/fuzz/impls.rs +++ b/crates/common/src/fuzz/impls.rs @@ -14,7 +14,7 @@ use rain_error_decoding::{AbiDecodeFailedErrors, AbiDecodedErrorType}; use rain_interpreter_bindings::IInterpreterStoreV3::FullyQualifiedNamespace; use rain_interpreter_bindings::IInterpreterV4::EvalV4; use rain_interpreter_bindings::{ - DeployerISP::{iInterpreterCall, iStoreCall}, + DeployerISP::{I_INTERPRETERCall, I_STORECall}, IInterpreterV4::eval4Call, }; use rain_interpreter_eval::eval::ForkParseArgs; @@ -496,7 +496,7 @@ impl FuzzRunner { .map_err(|e| FuzzRunnerError::ForkCallError(Box::new(e)))?; let store = self .forker - .alloy_call(Address::default(), deployer.address, iStoreCall {}, true) + .alloy_call(Address::default(), deployer.address, I_STORECall {}, true) .await? .typed_return; @@ -505,7 +505,7 @@ impl FuzzRunner { .alloy_call( Address::default(), deployer.address, - iInterpreterCall {}, + I_INTERPRETERCall {}, true, ) .await? From 4c206259ce3f19e38acaccad59ff4abb5f1b6454 Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Mon, 27 Oct 2025 20:20:15 +0000 Subject: [PATCH 51/94] update flake nix pkgs --- flake.lock | 7 ++++--- flake.nix | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/flake.lock b/flake.lock index 81c5d4fc03..80143a07b8 100644 --- a/flake.lock +++ b/flake.lock @@ -367,16 +367,17 @@ "solc": "solc_2" }, "locked": { - "lastModified": 1760460761, - "narHash": "sha256-IHvwnmphDaOyZnzvObwOoDQlA9nzym2ZUxe9K/5vs0U=", + "lastModified": 1761596012, + "narHash": "sha256-s6Nr7eTIva2gyRVyGhC8/o+MzcxxE9L6emg9pEBV30c=", "owner": "rainlanguage", "repo": "rainix", - "rev": "add0d8a1fd76ce0e65b962c952e9252257876465", + "rev": "29dbd53f21885d84961aa6f546c8d91576b3476d", "type": "github" }, "original": { "owner": "rainlanguage", "repo": "rainix", + "rev": "29dbd53f21885d84961aa6f546c8d91576b3476d", "type": "github" } }, diff --git a/flake.nix b/flake.nix index 7f7c31128f..59975d9551 100644 --- a/flake.nix +++ b/flake.nix @@ -2,7 +2,7 @@ description = "Flake for development workflows."; inputs = { - rainix.url = "github:rainlanguage/rainix"; + rainix.url = "github:rainlanguage/rainix?rev=29dbd53f21885d84961aa6f546c8d91576b3476d"; rain.url = "github:rainlanguage/rain.cli"; flake-utils.url = "github:numtide/flake-utils"; }; From 96318e922f7c9ee7f9b92ce1ad5f1cfe78b4f90c Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Mon, 27 Oct 2025 20:52:57 +0000 Subject: [PATCH 52/94] Update flake.nix --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 59975d9551..1e0a1569fe 100644 --- a/flake.nix +++ b/flake.nix @@ -316,7 +316,7 @@ ]; shellHook = rainix.devShells.${system}.tauri-shell.shellHook; buildInputs = rainix.devShells.${system}.tauri-shell.buildInputs - ++ [ pkgs.clang-tools pkgs.libsoup_2_4 ]; + ++ [ pkgs.clang-tools ]; nativeBuildInputs = rainix.devShells.${system}.tauri-shell.nativeBuildInputs; }; From 2c613858005828f0bb7bb6e84914ce7bde109fd1 Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Mon, 27 Oct 2025 21:27:44 +0000 Subject: [PATCH 53/94] update --- .github/workflows/tauri-release.yml | 1 - .github/workflows/tauri.yaml | 1 - prep-all.sh | 4 ++-- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tauri-release.yml b/.github/workflows/tauri-release.yml index 3b9e3ada06..81cc59066c 100644 --- a/.github/workflows/tauri-release.yml +++ b/.github/workflows/tauri-release.yml @@ -33,7 +33,6 @@ jobs: CI_SEPOLIA_METABOARD_URL: ${{ vars.CI_SEPOLIA_METABOARD_URL }} RPC_URL_ETHEREUM_FORK: ${{ secrets.RPC_URL_ETHEREUM_FORK }} COMMIT_SHA: ${{ github.sha }} - NIXPKGS_ALLOW_INSECURE: 1 steps: - name: Free up disk space in action runner (Ubuntu) if: matrix.platform == 'ubuntu-22.04' diff --git a/.github/workflows/tauri.yaml b/.github/workflows/tauri.yaml index 425fb437a2..0f4c4cbf42 100644 --- a/.github/workflows/tauri.yaml +++ b/.github/workflows/tauri.yaml @@ -29,7 +29,6 @@ jobs: runs-on: ${{ matrix.os }} env: COMMIT_SHA: ${{ github.sha }} - NIXPKGS_ALLOW_INSECURE: 1 steps: - name: Free up disk space in action runner (Ubuntu) if: matrix.os == 'ubuntu-22.04' diff --git a/prep-all.sh b/prep-all.sh index 2190592329..61a1a50c5b 100755 --- a/prep-all.sh +++ b/prep-all.sh @@ -53,8 +53,8 @@ nix develop -i ${keep[@]} -c rainix-rs-prelude nix develop -i ${keep[@]} -c raindex-prelude echo "Setting up UI components..." -NIXPKGS_ALLOW_INSECURE=1 nix develop --impure -i ${keep[@]} .#tauri-shell -c ob-tauri-prelude -NIXPKGS_ALLOW_INSECURE=1 nix develop --impure -i ${keep[@]} .#tauri-shell -c ob-ui-components-prelude +nix develop -i ${keep[@]} .#tauri-shell -c ob-tauri-prelude +nix develop -i ${keep[@]} .#tauri-shell -c ob-ui-components-prelude echo "Building packages..." nix develop -i ${keep[@]} -c bash -c '(npm run build -w @rainlanguage/orderbook)' From 9d5b0c9decf5ed48f3f70a680838ae74a4165bd8 Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Mon, 27 Oct 2025 21:32:35 +0000 Subject: [PATCH 54/94] update --- .github/workflows/tauri-release.yml | 6 +++--- .github/workflows/tauri.yaml | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/tauri-release.yml b/.github/workflows/tauri-release.yml index 81cc59066c..317aff3749 100644 --- a/.github/workflows/tauri-release.yml +++ b/.github/workflows/tauri-release.yml @@ -86,9 +86,9 @@ jobs: env: PUBLIC_WALLETCONNECT_PROJECT_ID: ${{ secrets.WALLETCONNECT_PROJECT_ID }} - - run: nix develop --impure .#tauri-shell -c ob-tauri-unit-test + - run: nix develop .#tauri-shell -c ob-tauri-unit-test - - run: nix develop --impure .#tauri-shell --command ob-tauri-before-release + - run: nix develop .#tauri-shell --command ob-tauri-before-release working-directory: ./tauri-app env: VITE_WALLETCONNECT_PROJECT_ID: ${{ secrets.WALLETCONNECT_PROJECT_ID }} @@ -125,7 +125,7 @@ jobs: APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} COMMIT_SHA: ${{ github.sha }} with: - tauriScript: "nix develop --impure -i -k COMMIT_SHA -k APPLE_CERTIFICATE -k APPLE_CERTIFICATE_PASSWORD -k APPLE_SIGNING_IDENTITY -k APPLE_ID -k APPLE_PASSWORD -k APPLE_TEAM_ID -k CI_DEPLOY_SEPOLIA_RPC_URL -k CI_FORK_SEPOLIA_DEPLOYER_ADDRESS -k CI_FORK_SEPOLIA_BLOCK_NUMBER -k CI_DEPLOY_POLYGON_RPC_URL -k CI_SEPOLIA_METABOARD_URL -k RPC_URL_ETHEREUM_FORK .#tauri-shell --command cargo tauri" + tauriScript: "nix develop -i -k COMMIT_SHA -k APPLE_CERTIFICATE -k APPLE_CERTIFICATE_PASSWORD -k APPLE_SIGNING_IDENTITY -k APPLE_ID -k APPLE_PASSWORD -k APPLE_TEAM_ID -k CI_DEPLOY_SEPOLIA_RPC_URL -k CI_FORK_SEPOLIA_DEPLOYER_ADDRESS -k CI_FORK_SEPOLIA_BLOCK_NUMBER -k CI_DEPLOY_POLYGON_RPC_URL -k CI_SEPOLIA_METABOARD_URL -k RPC_URL_ETHEREUM_FORK .#tauri-shell --command cargo tauri" tagName: app-v__VERSION__-${{ github.sha }} # the action automatically replaces \_\_VERSION\_\_ with the app version releaseName: "App v__VERSION__-${{ github.sha }}" releaseBody: "See the assets to download this version and install." diff --git a/.github/workflows/tauri.yaml b/.github/workflows/tauri.yaml index 0f4c4cbf42..99a58e84f4 100644 --- a/.github/workflows/tauri.yaml +++ b/.github/workflows/tauri.yaml @@ -91,13 +91,13 @@ jobs: env: PUBLIC_WALLETCONNECT_PROJECT_ID: ${{ secrets.WALLETCONNECT_PROJECT_ID || 'test' }} - - run: nix develop --impure .#tauri-shell -c ob-tauri-unit-test + - run: nix develop .#tauri-shell -c ob-tauri-unit-test - - run: nix develop --impure .#tauri-shell --command ob-tauri-before-build-ci + - run: nix develop .#tauri-shell --command ob-tauri-before-build-ci working-directory: ./tauri-app env: WALLETCONNECT_PROJECT_ID: ${{ secrets.WALLETCONNECT_PROJECT_ID || 'test' }} - - run: nix develop --impure .#tauri-shell --command npm run svelte-lint-format-check + - run: nix develop .#tauri-shell --command npm run svelte-lint-format-check working-directory: ./tauri-app - name: Reset workspace target before Rust tests @@ -106,7 +106,7 @@ jobs: rm -rf tauri-app/src-tauri/target - name: Run Rust tests with reduced debug artifacts - run: nix develop --impure .#tauri-shell --command tauri-rs-test + run: nix develop .#tauri-shell --command tauri-rs-test env: RUSTFLAGS: "-Cdebuginfo=0" CARGO_INCREMENTAL: 0 @@ -115,7 +115,7 @@ jobs: rm -rf target rm -rf tauri-app/src-tauri/target - - run: nix develop --impure .#tauri-shell --command cargo tauri build --verbose + - run: nix develop .#tauri-shell --command cargo tauri build --verbose working-directory: ./tauri-app - name: Reclaim workspace target artifacts From 16d0709ea50e99520818dd72a7918e95988dc8f2 Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Mon, 27 Oct 2025 21:47:44 +0000 Subject: [PATCH 55/94] Update flake.lock --- flake.lock | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/flake.lock b/flake.lock index 80143a07b8..588c043098 100644 --- a/flake.lock +++ b/flake.lock @@ -182,11 +182,11 @@ "nixpkgs": "nixpkgs_5" }, "locked": { - "lastModified": 1758705030, - "narHash": "sha256-zYM8PiEXANNrtjfyGUc7w37/D/kCynp0cQS+wCQ77GI=", + "lastModified": 1741023058, + "narHash": "sha256-LSd/8CBlpDLjci5ANFJjP0w+dGdY/mqKsyUfhjGwnfs=", "owner": "shazow", "repo": "foundry.nix", - "rev": "b59a55014050110170023e3e1c277c1d4a2f055b", + "rev": "66becfe20b7e688b8f2e5774609c4436cf202ba0", "type": "github" }, "original": { @@ -272,11 +272,11 @@ }, "nixpkgs_6": { "locked": { - "lastModified": 1758711836, - "narHash": "sha256-uBqPg7wNX2v6YUdTswH7wWU8wqb60cFZx0tHaWTGF30=", + "lastModified": 1749104371, + "narHash": "sha256-m2NmOPd6XgBiskmUq/BS9Xxuf3z0ebnGVfSKNAO5NEM=", "owner": "nixos", "repo": "nixpkgs", - "rev": "46f97b78e825ae762c0224e3983c47687436a498", + "rev": "48975d7f9b9960ed33c4e8561bcce20cc0c2de5b", "type": "github" }, "original": { @@ -367,17 +367,16 @@ "solc": "solc_2" }, "locked": { - "lastModified": 1761596012, - "narHash": "sha256-s6Nr7eTIva2gyRVyGhC8/o+MzcxxE9L6emg9pEBV30c=", + "lastModified": 1757439424, + "narHash": "sha256-slPazOVyDSOaG7uL/E4Er2gbS5Zx7037oYHrSE2GuO4=", "owner": "rainlanguage", "repo": "rainix", - "rev": "29dbd53f21885d84961aa6f546c8d91576b3476d", + "rev": "7f734b1da77771b5d6ee5449f43c2a1a43705149", "type": "github" }, "original": { "owner": "rainlanguage", "repo": "rainix", - "rev": "29dbd53f21885d84961aa6f546c8d91576b3476d", "type": "github" } }, @@ -412,11 +411,11 @@ "nixpkgs": "nixpkgs_7" }, "locked": { - "lastModified": 1758681214, - "narHash": "sha256-8cW731vev6kfr58cILO2ZsjHwaPhm88dQ8Q6nTSjP9I=", + "lastModified": 1749091064, + "narHash": "sha256-TGtYjzRX0sueFhwYsnNNFF5TTKnpnloznpIghLzxeXo=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "b12ed88d8d33d4f3cbc842bf29fad93bb1437299", + "rev": "12419593ce78f2e8e1e89a373c6515885e218acb", "type": "github" }, "original": { @@ -447,13 +446,13 @@ "solc-macos-amd64-list-json": { "flake": false, "locked": { - "narHash": "sha256-AvITkfpNYgCypXuLJyqco0li+unVw39BAfdOZvd/SPE=", + "narHash": "sha256-U5ckttxwKO13gIKggel6iybG5oTDbSidPR5nH3Gs+kY=", "type": "file", - "url": "https://github.com/argotorg/solc-bin/raw/26fc3fd/macosx-amd64/list.json" + "url": "https://github.com/ethereum/solc-bin/raw/30a3695/macosx-amd64/list.json" }, "original": { "type": "file", - "url": "https://github.com/argotorg/solc-bin/raw/26fc3fd/macosx-amd64/list.json" + "url": "https://github.com/ethereum/solc-bin/raw/30a3695/macosx-amd64/list.json" } }, "solc_2": { @@ -463,11 +462,11 @@ "solc-macos-amd64-list-json": "solc-macos-amd64-list-json" }, "locked": { - "lastModified": 1756368702, - "narHash": "sha256-cqEHv7uCV0LibmQphyiXZ1+jYtGjMNb9Pae4tfcAcF8=", + "lastModified": 1748780655, + "narHash": "sha256-mradCdMvjXwKd7kVFACB/d1CP2LLCyEgUu4vJCSzNLU=", "owner": "hellwolf", "repo": "solc.nix", - "rev": "d83e90df2fa8359a690f6baabf76099432193c3f", + "rev": "3b6f3223ace5a7bc400b01a434d86bb1cb2593fb", "type": "github" }, "original": { From aded35121462964880826e43688b3eb45500d39b Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Mon, 27 Oct 2025 21:55:15 +0000 Subject: [PATCH 56/94] Update flake.lock --- flake.lock | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/flake.lock b/flake.lock index 588c043098..e8a245f5fd 100644 --- a/flake.lock +++ b/flake.lock @@ -182,11 +182,11 @@ "nixpkgs": "nixpkgs_5" }, "locked": { - "lastModified": 1741023058, - "narHash": "sha256-LSd/8CBlpDLjci5ANFJjP0w+dGdY/mqKsyUfhjGwnfs=", + "lastModified": 1758705030, + "narHash": "sha256-zYM8PiEXANNrtjfyGUc7w37/D/kCynp0cQS+wCQ77GI=", "owner": "shazow", "repo": "foundry.nix", - "rev": "66becfe20b7e688b8f2e5774609c4436cf202ba0", + "rev": "b59a55014050110170023e3e1c277c1d4a2f055b", "type": "github" }, "original": { @@ -272,11 +272,11 @@ }, "nixpkgs_6": { "locked": { - "lastModified": 1749104371, - "narHash": "sha256-m2NmOPd6XgBiskmUq/BS9Xxuf3z0ebnGVfSKNAO5NEM=", + "lastModified": 1761594641, + "narHash": "sha256-sImk6SJQASDLQo8l+0zWWaBgg7TueLS6lTvdH5pBZpo=", "owner": "nixos", "repo": "nixpkgs", - "rev": "48975d7f9b9960ed33c4e8561bcce20cc0c2de5b", + "rev": "1666250dbe4141e4ca8aaf89b40a3a51c2e36144", "type": "github" }, "original": { @@ -367,16 +367,17 @@ "solc": "solc_2" }, "locked": { - "lastModified": 1757439424, - "narHash": "sha256-slPazOVyDSOaG7uL/E4Er2gbS5Zx7037oYHrSE2GuO4=", + "lastModified": 1761596012, + "narHash": "sha256-s6Nr7eTIva2gyRVyGhC8/o+MzcxxE9L6emg9pEBV30c=", "owner": "rainlanguage", "repo": "rainix", - "rev": "7f734b1da77771b5d6ee5449f43c2a1a43705149", + "rev": "29dbd53f21885d84961aa6f546c8d91576b3476d", "type": "github" }, "original": { "owner": "rainlanguage", "repo": "rainix", + "rev": "29dbd53f21885d84961aa6f546c8d91576b3476d", "type": "github" } }, @@ -411,11 +412,11 @@ "nixpkgs": "nixpkgs_7" }, "locked": { - "lastModified": 1749091064, - "narHash": "sha256-TGtYjzRX0sueFhwYsnNNFF5TTKnpnloznpIghLzxeXo=", + "lastModified": 1758681214, + "narHash": "sha256-8cW731vev6kfr58cILO2ZsjHwaPhm88dQ8Q6nTSjP9I=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "12419593ce78f2e8e1e89a373c6515885e218acb", + "rev": "b12ed88d8d33d4f3cbc842bf29fad93bb1437299", "type": "github" }, "original": { @@ -446,13 +447,13 @@ "solc-macos-amd64-list-json": { "flake": false, "locked": { - "narHash": "sha256-U5ckttxwKO13gIKggel6iybG5oTDbSidPR5nH3Gs+kY=", + "narHash": "sha256-AvITkfpNYgCypXuLJyqco0li+unVw39BAfdOZvd/SPE=", "type": "file", - "url": "https://github.com/ethereum/solc-bin/raw/30a3695/macosx-amd64/list.json" + "url": "https://github.com/argotorg/solc-bin/raw/26fc3fd/macosx-amd64/list.json" }, "original": { "type": "file", - "url": "https://github.com/ethereum/solc-bin/raw/30a3695/macosx-amd64/list.json" + "url": "https://github.com/argotorg/solc-bin/raw/26fc3fd/macosx-amd64/list.json" } }, "solc_2": { @@ -462,11 +463,11 @@ "solc-macos-amd64-list-json": "solc-macos-amd64-list-json" }, "locked": { - "lastModified": 1748780655, - "narHash": "sha256-mradCdMvjXwKd7kVFACB/d1CP2LLCyEgUu4vJCSzNLU=", + "lastModified": 1756368702, + "narHash": "sha256-cqEHv7uCV0LibmQphyiXZ1+jYtGjMNb9Pae4tfcAcF8=", "owner": "hellwolf", "repo": "solc.nix", - "rev": "3b6f3223ace5a7bc400b01a434d86bb1cb2593fb", + "rev": "d83e90df2fa8359a690f6baabf76099432193c3f", "type": "github" }, "original": { From 9563eb752505eefd28cb90134e090c4da9445ab1 Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Mon, 27 Oct 2025 22:27:37 +0000 Subject: [PATCH 57/94] update --- flake.lock | 8 ++++---- flake.nix | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/flake.lock b/flake.lock index e8a245f5fd..c0c27d2c04 100644 --- a/flake.lock +++ b/flake.lock @@ -367,17 +367,17 @@ "solc": "solc_2" }, "locked": { - "lastModified": 1761596012, - "narHash": "sha256-s6Nr7eTIva2gyRVyGhC8/o+MzcxxE9L6emg9pEBV30c=", + "lastModified": 1761603987, + "narHash": "sha256-chu0SbFMMg+ldiqLDIgTDA0lfIoYl2y+JO4gsrz9eZQ=", "owner": "rainlanguage", "repo": "rainix", - "rev": "29dbd53f21885d84961aa6f546c8d91576b3476d", + "rev": "ece42e0c0c7df5d2b76708e1c5e94bcf8b489258", "type": "github" }, "original": { "owner": "rainlanguage", "repo": "rainix", - "rev": "29dbd53f21885d84961aa6f546c8d91576b3476d", + "rev": "ece42e0c0c7df5d2b76708e1c5e94bcf8b489258", "type": "github" } }, diff --git a/flake.nix b/flake.nix index 1e0a1569fe..7977fa1668 100644 --- a/flake.nix +++ b/flake.nix @@ -2,7 +2,7 @@ description = "Flake for development workflows."; inputs = { - rainix.url = "github:rainlanguage/rainix?rev=29dbd53f21885d84961aa6f546c8d91576b3476d"; + rainix.url = "github:rainlanguage/rainix?rev=ece42e0c0c7df5d2b76708e1c5e94bcf8b489258"; rain.url = "github:rainlanguage/rain.cli"; flake-utils.url = "github:numtide/flake-utils"; }; From 5b0faac6b86f754cb35afd6de2d1fd62c2df857d Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Mon, 27 Oct 2025 23:09:30 +0000 Subject: [PATCH 58/94] update --- flake.lock | 14 +++++++------- flake.nix | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/flake.lock b/flake.lock index c0c27d2c04..cca6bebe06 100644 --- a/flake.lock +++ b/flake.lock @@ -272,11 +272,11 @@ }, "nixpkgs_6": { "locked": { - "lastModified": 1761594641, - "narHash": "sha256-sImk6SJQASDLQo8l+0zWWaBgg7TueLS6lTvdH5pBZpo=", + "lastModified": 1758711836, + "narHash": "sha256-uBqPg7wNX2v6YUdTswH7wWU8wqb60cFZx0tHaWTGF30=", "owner": "nixos", "repo": "nixpkgs", - "rev": "1666250dbe4141e4ca8aaf89b40a3a51c2e36144", + "rev": "46f97b78e825ae762c0224e3983c47687436a498", "type": "github" }, "original": { @@ -367,17 +367,17 @@ "solc": "solc_2" }, "locked": { - "lastModified": 1761603987, - "narHash": "sha256-chu0SbFMMg+ldiqLDIgTDA0lfIoYl2y+JO4gsrz9eZQ=", + "lastModified": 1761604672, + "narHash": "sha256-pGLbPrUNlLA20Tif0C3qiNszrNHiN9BmAsPaFMFUbow=", "owner": "rainlanguage", "repo": "rainix", - "rev": "ece42e0c0c7df5d2b76708e1c5e94bcf8b489258", + "rev": "d26f65d1a5de54996fa42ce0ca0d3d95ff44e2bc", "type": "github" }, "original": { "owner": "rainlanguage", "repo": "rainix", - "rev": "ece42e0c0c7df5d2b76708e1c5e94bcf8b489258", + "rev": "d26f65d1a5de54996fa42ce0ca0d3d95ff44e2bc", "type": "github" } }, diff --git a/flake.nix b/flake.nix index 7977fa1668..1983122da7 100644 --- a/flake.nix +++ b/flake.nix @@ -2,7 +2,7 @@ description = "Flake for development workflows."; inputs = { - rainix.url = "github:rainlanguage/rainix?rev=ece42e0c0c7df5d2b76708e1c5e94bcf8b489258"; + rainix.url = "github:rainlanguage/rainix?rev=d26f65d1a5de54996fa42ce0ca0d3d95ff44e2bc"; rain.url = "github:rainlanguage/rain.cli"; flake-utils.url = "github:numtide/flake-utils"; }; From 4d89bbbf575cfdeee2b6fcc3dd003a1994e16fa6 Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Mon, 27 Oct 2025 23:17:51 +0000 Subject: [PATCH 59/94] update --- .github/workflows/tauri-release.yml | 2 +- .github/workflows/tauri.yaml | 2 +- .github/workflows/test-ui-components.yaml | 2 +- .github/workflows/test-webapp.yaml | 2 +- .github/workflows/vercel-preview-pr-target.yaml | 2 +- .github/workflows/vercel-preview.yaml | 2 +- .github/workflows/vercel-prod.yaml | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/tauri-release.yml b/.github/workflows/tauri-release.yml index 317aff3749..bdb1e7b832 100644 --- a/.github/workflows/tauri-release.yml +++ b/.github/workflows/tauri-release.yml @@ -65,7 +65,7 @@ jobs: submodules: recursive fetch-depth: 0 - - uses: nixbuild/nix-quick-install-action@v34 + - uses: nixbuild/nix-quick-install-action@v30 with: nix_conf: | keep-env-derivations = true diff --git a/.github/workflows/tauri.yaml b/.github/workflows/tauri.yaml index 99a58e84f4..3566555bfa 100644 --- a/.github/workflows/tauri.yaml +++ b/.github/workflows/tauri.yaml @@ -70,7 +70,7 @@ jobs: submodules: recursive fetch-depth: 0 - - uses: nixbuild/nix-quick-install-action@v34 + - uses: nixbuild/nix-quick-install-action@v30 with: nix_conf: | keep-env-derivations = true diff --git a/.github/workflows/test-ui-components.yaml b/.github/workflows/test-ui-components.yaml index e2c3f5464a..39252fb2f6 100644 --- a/.github/workflows/test-ui-components.yaml +++ b/.github/workflows/test-ui-components.yaml @@ -23,7 +23,7 @@ jobs: submodules: recursive fetch-depth: 0 - - uses: nixbuild/nix-quick-install-action@v34 + - uses: nixbuild/nix-quick-install-action@v30 with: nix_conf: | keep-env-derivations = true diff --git a/.github/workflows/test-webapp.yaml b/.github/workflows/test-webapp.yaml index 6e8e7ebb82..cf18f50bea 100644 --- a/.github/workflows/test-webapp.yaml +++ b/.github/workflows/test-webapp.yaml @@ -23,7 +23,7 @@ jobs: submodules: recursive fetch-depth: 0 - - uses: nixbuild/nix-quick-install-action@v34 + - uses: nixbuild/nix-quick-install-action@v30 with: nix_conf: | keep-env-derivations = true diff --git a/.github/workflows/vercel-preview-pr-target.yaml b/.github/workflows/vercel-preview-pr-target.yaml index 6f3c8c3608..d20029b68f 100644 --- a/.github/workflows/vercel-preview-pr-target.yaml +++ b/.github/workflows/vercel-preview-pr-target.yaml @@ -45,7 +45,7 @@ jobs: repository: ${{ github.event.pull_request.head.repo.full_name }} ref: ${{ github.event.pull_request.head.sha }} persist-credentials: false - - uses: nixbuild/nix-quick-install-action@v34 + - uses: nixbuild/nix-quick-install-action@v30 with: nix_conf: | keep-env-derivations = true diff --git a/.github/workflows/vercel-preview.yaml b/.github/workflows/vercel-preview.yaml index 8edd7fd9fd..e7a460ac51 100644 --- a/.github/workflows/vercel-preview.yaml +++ b/.github/workflows/vercel-preview.yaml @@ -37,7 +37,7 @@ jobs: submodules: recursive fetch-depth: 0 - - uses: nixbuild/nix-quick-install-action@v34 + - uses: nixbuild/nix-quick-install-action@v30 with: nix_conf: | keep-env-derivations = true diff --git a/.github/workflows/vercel-prod.yaml b/.github/workflows/vercel-prod.yaml index 4dbdb1aca9..4de7683f74 100644 --- a/.github/workflows/vercel-prod.yaml +++ b/.github/workflows/vercel-prod.yaml @@ -20,7 +20,7 @@ jobs: submodules: recursive fetch-depth: 0 - - uses: nixbuild/nix-quick-install-action@v34 + - uses: nixbuild/nix-quick-install-action@v30 with: nix_conf: | keep-env-derivations = true From 30d244230fc158403c987ee2bf067f390dddc1cd Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Tue, 28 Oct 2025 00:01:21 +0000 Subject: [PATCH 60/94] fix orderbook tests --- packages/orderbook/test/js_api/gui.test.ts | 62 +++++++++++----------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/packages/orderbook/test/js_api/gui.test.ts b/packages/orderbook/test/js_api/gui.test.ts index 9a044eac14..3a34ba875b 100644 --- a/packages/orderbook/test/js_api/gui.test.ts +++ b/packages/orderbook/test/js_api/gui.test.ts @@ -1232,17 +1232,17 @@ ${dotrain}`; it('generates deposit calldatas', async () => { await mockServer .forPost('/rpc-url') - .withBodyIncluding('0xf0cfdd37') + .withBodyIncluding('0x56fb83e9') .thenSendJsonRpcResult(`0x${'0'.repeat(24) + '1'.repeat(40)}`); - // iStore() call + // I_STORE()() call await mockServer .forPost('/rpc-url') - .withBodyIncluding('0xc19423bc') + .withBodyIncluding('0x251ac32e') .thenSendJsonRpcResult(`0x${'0'.repeat(24) + '2'.repeat(40)}`); - // iParser() call + // I_PARSER() call await mockServer .forPost('/rpc-url') - .withBodyIncluding('0x24376855') + .withBodyIncluding('0xf79693f4') .thenSendJsonRpcResult(`0x${'0'.repeat(24) + '3'.repeat(40)}`); // parse2() call await mockServer @@ -1280,17 +1280,17 @@ ${dotrain}`; it('generates add order calldata', async () => { await mockServer .forPost('/rpc-url') - .withBodyIncluding('0xf0cfdd37') + .withBodyIncluding('0x56fb83e9') .thenSendJsonRpcResult(`0x${'0'.repeat(24) + '1'.repeat(40)}`); - // iStore() call + // I_STORE()() call await mockServer .forPost('/rpc-url') - .withBodyIncluding('0xc19423bc') + .withBodyIncluding('0x251ac32e') .thenSendJsonRpcResult(`0x${'0'.repeat(24) + '2'.repeat(40)}`); - // iParser() call + // I_PARSER() call await mockServer .forPost('/rpc-url') - .withBodyIncluding('0x24376855') + .withBodyIncluding('0xf79693f4') .thenSendJsonRpcResult(`0x${'0'.repeat(24) + '3'.repeat(40)}`); // parse2() call await mockServer @@ -1317,17 +1317,17 @@ ${dotrain}`; it('generates add order calldata without entering field value', async () => { await mockServer .forPost('/rpc-url') - .withBodyIncluding('0xf0cfdd37') + .withBodyIncluding('0x56fb83e9') .thenSendJsonRpcResult(`0x${'0'.repeat(24) + '1'.repeat(40)}`); - // iStore() call + // I_STORE()() call await mockServer .forPost('/rpc-url') - .withBodyIncluding('0xc19423bc') + .withBodyIncluding('0x251ac32e') .thenSendJsonRpcResult(`0x${'0'.repeat(24) + '2'.repeat(40)}`); - // iParser() call + // I_PARSER() call await mockServer .forPost('/rpc-url') - .withBodyIncluding('0x24376855') + .withBodyIncluding('0xf79693f4') .thenSendJsonRpcResult(`0x${'0'.repeat(24) + '3'.repeat(40)}`); // parse2() call await mockServer @@ -1352,17 +1352,17 @@ ${dotrain}`; it('should generate multicalldata for deposit and add order with existing vault ids', async () => { await mockServer .forPost('/rpc-url') - .withBodyIncluding('0xf0cfdd37') + .withBodyIncluding('0x56fb83e9') .thenSendJsonRpcResult(`0x${'0'.repeat(24) + '1'.repeat(40)}`); - // iStore() call + // I_STORE()() call await mockServer .forPost('/rpc-url') - .withBodyIncluding('0xc19423bc') + .withBodyIncluding('0x251ac32e') .thenSendJsonRpcResult(`0x${'0'.repeat(24) + '2'.repeat(40)}`); - // iParser() call + // I_PARSER() call await mockServer .forPost('/rpc-url') - .withBodyIncluding('0x24376855') + .withBodyIncluding('0xf79693f4') .thenSendJsonRpcResult(`0x${'0'.repeat(24) + '3'.repeat(40)}`); // parse2() call await mockServer @@ -1394,17 +1394,17 @@ ${dotrain}`; it('should generate multicalldata for deposit and add order with missing field value', async () => { await mockServer .forPost('/rpc-url') - .withBodyIncluding('0xf0cfdd37') + .withBodyIncluding('0x56fb83e9') .thenSendJsonRpcResult(`0x${'0'.repeat(24) + '1'.repeat(40)}`); - // iStore() call + // I_STORE()() call await mockServer .forPost('/rpc-url') - .withBodyIncluding('0xc19423bc') + .withBodyIncluding('0x251ac32e') .thenSendJsonRpcResult(`0x${'0'.repeat(24) + '2'.repeat(40)}`); - // iParser() call + // I_PARSER() call await mockServer .forPost('/rpc-url') - .withBodyIncluding('0x24376855') + .withBodyIncluding('0xf79693f4') .thenSendJsonRpcResult(`0x${'0'.repeat(24) + '3'.repeat(40)}`); // parse2() call await mockServer @@ -1458,15 +1458,15 @@ ${dotrainWithoutVaultIds}`; await mockServer .forPost('/rpc-url') - .withBodyIncluding('0xf0cfdd37') + .withBodyIncluding('0x56fb83e9') .thenSendJsonRpcResult(`0x${'0'.repeat(24) + '1'.repeat(40)}`); await mockServer .forPost('/rpc-url') - .withBodyIncluding('0xc19423bc') + .withBodyIncluding('0x251ac32e') .thenSendJsonRpcResult(`0x${'0'.repeat(24) + '2'.repeat(40)}`); await mockServer .forPost('/rpc-url') - .withBodyIncluding('0x24376855') + .withBodyIncluding('0xf79693f4') .thenSendJsonRpcResult(`0x${'0'.repeat(24) + '3'.repeat(40)}`); await mockServer .forPost('/rpc-url') @@ -1742,15 +1742,15 @@ ${dotrainWithoutVaultIds}`; ); await mockServer .forPost('/rpc-url') - .withBodyIncluding('0xf0cfdd37') + .withBodyIncluding('0x56fb83e9') .thenSendJsonRpcResult(`0x${'0'.repeat(24) + '1'.repeat(40)}`); await mockServer .forPost('/rpc-url') - .withBodyIncluding('0xc19423bc') + .withBodyIncluding('0x251ac32e') .thenSendJsonRpcResult(`0x${'0'.repeat(24) + '2'.repeat(40)}`); await mockServer .forPost('/rpc-url') - .withBodyIncluding('0x24376855') + .withBodyIncluding('0xf79693f4') .thenSendJsonRpcResult(`0x${'0'.repeat(24) + '3'.repeat(40)}`); await mockServer .forPost('/rpc-url') From dabf86e99c9ba9127585b3a0df0abd2a44b74424 Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Tue, 28 Oct 2025 00:35:07 +0000 Subject: [PATCH 61/94] update --- .github/workflows/tauri-release.yml | 7 ++++--- .github/workflows/tauri.yaml | 11 ++++++----- flake.nix | 2 +- prep-all.sh | 4 ++-- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/.github/workflows/tauri-release.yml b/.github/workflows/tauri-release.yml index bdb1e7b832..2ffa454d39 100644 --- a/.github/workflows/tauri-release.yml +++ b/.github/workflows/tauri-release.yml @@ -33,6 +33,7 @@ jobs: CI_SEPOLIA_METABOARD_URL: ${{ vars.CI_SEPOLIA_METABOARD_URL }} RPC_URL_ETHEREUM_FORK: ${{ secrets.RPC_URL_ETHEREUM_FORK }} COMMIT_SHA: ${{ github.sha }} + NIXPKGS_ALLOW_INSECURE: 1 steps: - name: Free up disk space in action runner (Ubuntu) if: matrix.platform == 'ubuntu-22.04' @@ -86,9 +87,9 @@ jobs: env: PUBLIC_WALLETCONNECT_PROJECT_ID: ${{ secrets.WALLETCONNECT_PROJECT_ID }} - - run: nix develop .#tauri-shell -c ob-tauri-unit-test + - run: nix develop --impure .#tauri-shell -c ob-tauri-unit-test - - run: nix develop .#tauri-shell --command ob-tauri-before-release + - run: nix develop --impure .#tauri-shell --command ob-tauri-before-release working-directory: ./tauri-app env: VITE_WALLETCONNECT_PROJECT_ID: ${{ secrets.WALLETCONNECT_PROJECT_ID }} @@ -125,7 +126,7 @@ jobs: APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} COMMIT_SHA: ${{ github.sha }} with: - tauriScript: "nix develop -i -k COMMIT_SHA -k APPLE_CERTIFICATE -k APPLE_CERTIFICATE_PASSWORD -k APPLE_SIGNING_IDENTITY -k APPLE_ID -k APPLE_PASSWORD -k APPLE_TEAM_ID -k CI_DEPLOY_SEPOLIA_RPC_URL -k CI_FORK_SEPOLIA_DEPLOYER_ADDRESS -k CI_FORK_SEPOLIA_BLOCK_NUMBER -k CI_DEPLOY_POLYGON_RPC_URL -k CI_SEPOLIA_METABOARD_URL -k RPC_URL_ETHEREUM_FORK .#tauri-shell --command cargo tauri" + tauriScript: "nix develop --impure -i -k COMMIT_SHA -k APPLE_CERTIFICATE -k APPLE_CERTIFICATE_PASSWORD -k APPLE_SIGNING_IDENTITY -k APPLE_ID -k APPLE_PASSWORD -k APPLE_TEAM_ID -k CI_DEPLOY_SEPOLIA_RPC_URL -k CI_FORK_SEPOLIA_DEPLOYER_ADDRESS -k CI_FORK_SEPOLIA_BLOCK_NUMBER -k CI_DEPLOY_POLYGON_RPC_URL -k CI_SEPOLIA_METABOARD_URL -k RPC_URL_ETHEREUM_FORK .#tauri-shell --command cargo tauri" tagName: app-v__VERSION__-${{ github.sha }} # the action automatically replaces \_\_VERSION\_\_ with the app version releaseName: "App v__VERSION__-${{ github.sha }}" releaseBody: "See the assets to download this version and install." diff --git a/.github/workflows/tauri.yaml b/.github/workflows/tauri.yaml index 3566555bfa..5f3ece4a3d 100644 --- a/.github/workflows/tauri.yaml +++ b/.github/workflows/tauri.yaml @@ -29,6 +29,7 @@ jobs: runs-on: ${{ matrix.os }} env: COMMIT_SHA: ${{ github.sha }} + NIXPKGS_ALLOW_INSECURE: 1 steps: - name: Free up disk space in action runner (Ubuntu) if: matrix.os == 'ubuntu-22.04' @@ -91,13 +92,13 @@ jobs: env: PUBLIC_WALLETCONNECT_PROJECT_ID: ${{ secrets.WALLETCONNECT_PROJECT_ID || 'test' }} - - run: nix develop .#tauri-shell -c ob-tauri-unit-test + - run: nix develop --impure .#tauri-shell -c ob-tauri-unit-test - - run: nix develop .#tauri-shell --command ob-tauri-before-build-ci + - run: nix develop --impure .#tauri-shell --command ob-tauri-before-build-ci working-directory: ./tauri-app env: WALLETCONNECT_PROJECT_ID: ${{ secrets.WALLETCONNECT_PROJECT_ID || 'test' }} - - run: nix develop .#tauri-shell --command npm run svelte-lint-format-check + - run: nix develop --impure .#tauri-shell --command npm run svelte-lint-format-check working-directory: ./tauri-app - name: Reset workspace target before Rust tests @@ -106,7 +107,7 @@ jobs: rm -rf tauri-app/src-tauri/target - name: Run Rust tests with reduced debug artifacts - run: nix develop .#tauri-shell --command tauri-rs-test + run: nix develop --impure .#tauri-shell --command tauri-rs-test env: RUSTFLAGS: "-Cdebuginfo=0" CARGO_INCREMENTAL: 0 @@ -115,7 +116,7 @@ jobs: rm -rf target rm -rf tauri-app/src-tauri/target - - run: nix develop .#tauri-shell --command cargo tauri build --verbose + - run: nix develop --impure .#tauri-shell --command cargo tauri build --verbose working-directory: ./tauri-app - name: Reclaim workspace target artifacts diff --git a/flake.nix b/flake.nix index 1983122da7..a526106b1e 100644 --- a/flake.nix +++ b/flake.nix @@ -316,7 +316,7 @@ ]; shellHook = rainix.devShells.${system}.tauri-shell.shellHook; buildInputs = rainix.devShells.${system}.tauri-shell.buildInputs - ++ [ pkgs.clang-tools ]; + ++ [ pkgs.clang-tools pkgs.libsoup_2_4 ]; nativeBuildInputs = rainix.devShells.${system}.tauri-shell.nativeBuildInputs; }; diff --git a/prep-all.sh b/prep-all.sh index 61a1a50c5b..2190592329 100755 --- a/prep-all.sh +++ b/prep-all.sh @@ -53,8 +53,8 @@ nix develop -i ${keep[@]} -c rainix-rs-prelude nix develop -i ${keep[@]} -c raindex-prelude echo "Setting up UI components..." -nix develop -i ${keep[@]} .#tauri-shell -c ob-tauri-prelude -nix develop -i ${keep[@]} .#tauri-shell -c ob-ui-components-prelude +NIXPKGS_ALLOW_INSECURE=1 nix develop --impure -i ${keep[@]} .#tauri-shell -c ob-tauri-prelude +NIXPKGS_ALLOW_INSECURE=1 nix develop --impure -i ${keep[@]} .#tauri-shell -c ob-ui-components-prelude echo "Building packages..." nix develop -i ${keep[@]} -c bash -c '(npm run build -w @rainlanguage/orderbook)' From 6021d2d6bc35665abe73229275d182b2bc00371b Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Tue, 28 Oct 2025 01:21:43 +0000 Subject: [PATCH 62/94] update --- flake.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index a526106b1e..dca3535abe 100644 --- a/flake.nix +++ b/flake.nix @@ -316,7 +316,11 @@ ]; shellHook = rainix.devShells.${system}.tauri-shell.shellHook; buildInputs = rainix.devShells.${system}.tauri-shell.buildInputs - ++ [ pkgs.clang-tools pkgs.libsoup_2_4 ]; + ++ [ pkgs.clang-tools ] + ++ (pkgs.lib.optionals (!pkgs.stdenv.isDarwin) [ + pkgs.libsoup_2_4 + pkgs.webkitgtk_4_0 + ]); nativeBuildInputs = rainix.devShells.${system}.tauri-shell.nativeBuildInputs; }; From a983a96531bbd92ab066f6e02092e9f6c847ac47 Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Tue, 28 Oct 2025 01:48:54 +0000 Subject: [PATCH 63/94] update --- flake.nix | 11 +++++------ prep-all.sh | 44 ++++++++++++++++++++++---------------------- 2 files changed, 27 insertions(+), 28 deletions(-) diff --git a/flake.nix b/flake.nix index dca3535abe..44b76ce61a 100644 --- a/flake.nix +++ b/flake.nix @@ -316,13 +316,12 @@ ]; shellHook = rainix.devShells.${system}.tauri-shell.shellHook; buildInputs = rainix.devShells.${system}.tauri-shell.buildInputs - ++ [ pkgs.clang-tools ] - ++ (pkgs.lib.optionals (!pkgs.stdenv.isDarwin) [ - pkgs.libsoup_2_4 - pkgs.webkitgtk_4_0 - ]); + ++ [ pkgs.clang-tools ]; nativeBuildInputs = - rainix.devShells.${system}.tauri-shell.nativeBuildInputs; + rainix.devShells.${system}.tauri-shell.nativeBuildInputs ++ (pkgs.lib.optionals (!pkgs.stdenv.isDarwin) [ + pkgs.libsoup_2_4 + pkgs.webkitgtk_4_0 + ]); }; devShells.webapp-shell = pkgs.mkShell { packages = with pkgs; [ nodejs_20 ]; diff --git a/prep-all.sh b/prep-all.sh index 2190592329..b8ef746157 100755 --- a/prep-all.sh +++ b/prep-all.sh @@ -29,28 +29,28 @@ keep=( echo "Installing Forge dependencies..." nix develop -c forge install -echo "Setting up rain.math.float..." -nix develop -i ${keep[@]} -c bash \ - -c '(cd lib/rain.interpreter/lib/rain.interpreter.interface/lib/rain.math.float && rainix-sol-prelude)' -nix develop -i ${keep[@]} -c bash \ - -c '(cd lib/rain.interpreter/lib/rain.interpreter.interface/lib/rain.math.float && rainix-rs-prelude)' - -echo "Setting up rain.tofu.erc20-decimals..." -(cd lib/rain.tofu.erc20-decimals && nix develop -c forge build) - -echo "Setting up rain.interpreter..." -nix develop -i ${keep[@]} -c bash -c '(cd lib/rain.interpreter && rainix-sol-prelude)' -nix develop -i ${keep[@]} -c bash -c '(cd lib/rain.interpreter && rainix-rs-prelude)' -(cd lib/rain.interpreter && nix develop -i ${keep[@]} -c bash -c i9r-prelude) - -echo "Setting up rain.metadata..." -nix develop -i ${keep[@]} -c bash -c '(cd lib/rain.interpreter/lib/rain.metadata && rainix-sol-prelude)' -nix develop -i ${keep[@]} -c bash -c '(cd lib/rain.interpreter/lib/rain.metadata && rainix-rs-prelude)' - -echo "Setting up main project dependencies..." -nix develop -i ${keep[@]} -c rainix-sol-prelude -nix develop -i ${keep[@]} -c rainix-rs-prelude -nix develop -i ${keep[@]} -c raindex-prelude +# echo "Setting up rain.math.float..." +# nix develop -i ${keep[@]} -c bash \ +# -c '(cd lib/rain.interpreter/lib/rain.interpreter.interface/lib/rain.math.float && rainix-sol-prelude)' +# nix develop -i ${keep[@]} -c bash \ +# -c '(cd lib/rain.interpreter/lib/rain.interpreter.interface/lib/rain.math.float && rainix-rs-prelude)' + +# echo "Setting up rain.tofu.erc20-decimals..." +# (cd lib/rain.tofu.erc20-decimals && nix develop -c forge build) + +# echo "Setting up rain.interpreter..." +# nix develop -i ${keep[@]} -c bash -c '(cd lib/rain.interpreter && rainix-sol-prelude)' +# nix develop -i ${keep[@]} -c bash -c '(cd lib/rain.interpreter && rainix-rs-prelude)' +# (cd lib/rain.interpreter && nix develop -i ${keep[@]} -c bash -c i9r-prelude) + +# echo "Setting up rain.metadata..." +# nix develop -i ${keep[@]} -c bash -c '(cd lib/rain.interpreter/lib/rain.metadata && rainix-sol-prelude)' +# nix develop -i ${keep[@]} -c bash -c '(cd lib/rain.interpreter/lib/rain.metadata && rainix-rs-prelude)' + +# echo "Setting up main project dependencies..." +# nix develop -i ${keep[@]} -c rainix-sol-prelude +# nix develop -i ${keep[@]} -c rainix-rs-prelude +# nix develop -i ${keep[@]} -c raindex-prelude echo "Setting up UI components..." NIXPKGS_ALLOW_INSECURE=1 nix develop --impure -i ${keep[@]} .#tauri-shell -c ob-tauri-prelude From 8ae697fee2985baf5e902ceccf84633dfd5a7305 Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Tue, 28 Oct 2025 02:49:03 +0000 Subject: [PATCH 64/94] Update prep-all.sh --- prep-all.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/prep-all.sh b/prep-all.sh index b8ef746157..c8501a8c90 100755 --- a/prep-all.sh +++ b/prep-all.sh @@ -53,8 +53,8 @@ nix develop -c forge install # nix develop -i ${keep[@]} -c raindex-prelude echo "Setting up UI components..." -NIXPKGS_ALLOW_INSECURE=1 nix develop --impure -i ${keep[@]} .#tauri-shell -c ob-tauri-prelude -NIXPKGS_ALLOW_INSECURE=1 nix develop --impure -i ${keep[@]} .#tauri-shell -c ob-ui-components-prelude +NIXPKGS_ALLOW_INSECURE=1 NIXPKGS_ALLOW_BROKEN=1 nix develop --impure -i ${keep[@]} .#tauri-shell -c ob-tauri-prelude +NIXPKGS_ALLOW_INSECURE=1 NIXPKGS_ALLOW_BROKEN=1 nix develop --impure -i ${keep[@]} .#tauri-shell -c ob-ui-components-prelude echo "Building packages..." nix develop -i ${keep[@]} -c bash -c '(npm run build -w @rainlanguage/orderbook)' From d5080ae6e774739a80cc1afb94eeadd033324949 Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Tue, 28 Oct 2025 03:10:23 +0000 Subject: [PATCH 65/94] Update flake.nix --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index 44b76ce61a..7594472c8b 100644 --- a/flake.nix +++ b/flake.nix @@ -321,6 +321,7 @@ rainix.devShells.${system}.tauri-shell.nativeBuildInputs ++ (pkgs.lib.optionals (!pkgs.stdenv.isDarwin) [ pkgs.libsoup_2_4 pkgs.webkitgtk_4_0 + pkgs.gtk4 ]); }; devShells.webapp-shell = pkgs.mkShell { From e69d725f25802ebca332eacfbdae2655feb343db Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Tue, 28 Oct 2025 03:13:51 +0000 Subject: [PATCH 66/94] Update flake.nix --- flake.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index 7594472c8b..cdd6440b86 100644 --- a/flake.nix +++ b/flake.nix @@ -319,8 +319,8 @@ ++ [ pkgs.clang-tools ]; nativeBuildInputs = rainix.devShells.${system}.tauri-shell.nativeBuildInputs ++ (pkgs.lib.optionals (!pkgs.stdenv.isDarwin) [ - pkgs.libsoup_2_4 - pkgs.webkitgtk_4_0 + # pkgs.libsoup_2_4 + # pkgs.webkitgtk_4_0 pkgs.gtk4 ]); }; From 139b458f70a1d89ea78d7b445fe50559990a9147 Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Tue, 28 Oct 2025 03:26:18 +0000 Subject: [PATCH 67/94] Update prep-all.sh --- prep-all.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/prep-all.sh b/prep-all.sh index c8501a8c90..3958e9da54 100755 --- a/prep-all.sh +++ b/prep-all.sh @@ -53,8 +53,8 @@ nix develop -c forge install # nix develop -i ${keep[@]} -c raindex-prelude echo "Setting up UI components..." -NIXPKGS_ALLOW_INSECURE=1 NIXPKGS_ALLOW_BROKEN=1 nix develop --impure -i ${keep[@]} .#tauri-shell -c ob-tauri-prelude -NIXPKGS_ALLOW_INSECURE=1 NIXPKGS_ALLOW_BROKEN=1 nix develop --impure -i ${keep[@]} .#tauri-shell -c ob-ui-components-prelude +nix develop -i ${keep[@]} .#tauri-shell -c ob-tauri-prelude +nix develop -i ${keep[@]} .#tauri-shell -c ob-ui-components-prelude echo "Building packages..." nix develop -i ${keep[@]} -c bash -c '(npm run build -w @rainlanguage/orderbook)' From 11526ad6895badcd0581e1c6bf603e53d2e17928 Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Tue, 28 Oct 2025 03:40:30 +0000 Subject: [PATCH 68/94] update --- .github/workflows/tauri-release.yml | 7 ++--- .github/workflows/tauri.yaml | 11 ++++---- prep-all.sh | 44 ++++++++++++++--------------- 3 files changed, 30 insertions(+), 32 deletions(-) diff --git a/.github/workflows/tauri-release.yml b/.github/workflows/tauri-release.yml index 2ffa454d39..bdb1e7b832 100644 --- a/.github/workflows/tauri-release.yml +++ b/.github/workflows/tauri-release.yml @@ -33,7 +33,6 @@ jobs: CI_SEPOLIA_METABOARD_URL: ${{ vars.CI_SEPOLIA_METABOARD_URL }} RPC_URL_ETHEREUM_FORK: ${{ secrets.RPC_URL_ETHEREUM_FORK }} COMMIT_SHA: ${{ github.sha }} - NIXPKGS_ALLOW_INSECURE: 1 steps: - name: Free up disk space in action runner (Ubuntu) if: matrix.platform == 'ubuntu-22.04' @@ -87,9 +86,9 @@ jobs: env: PUBLIC_WALLETCONNECT_PROJECT_ID: ${{ secrets.WALLETCONNECT_PROJECT_ID }} - - run: nix develop --impure .#tauri-shell -c ob-tauri-unit-test + - run: nix develop .#tauri-shell -c ob-tauri-unit-test - - run: nix develop --impure .#tauri-shell --command ob-tauri-before-release + - run: nix develop .#tauri-shell --command ob-tauri-before-release working-directory: ./tauri-app env: VITE_WALLETCONNECT_PROJECT_ID: ${{ secrets.WALLETCONNECT_PROJECT_ID }} @@ -126,7 +125,7 @@ jobs: APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} COMMIT_SHA: ${{ github.sha }} with: - tauriScript: "nix develop --impure -i -k COMMIT_SHA -k APPLE_CERTIFICATE -k APPLE_CERTIFICATE_PASSWORD -k APPLE_SIGNING_IDENTITY -k APPLE_ID -k APPLE_PASSWORD -k APPLE_TEAM_ID -k CI_DEPLOY_SEPOLIA_RPC_URL -k CI_FORK_SEPOLIA_DEPLOYER_ADDRESS -k CI_FORK_SEPOLIA_BLOCK_NUMBER -k CI_DEPLOY_POLYGON_RPC_URL -k CI_SEPOLIA_METABOARD_URL -k RPC_URL_ETHEREUM_FORK .#tauri-shell --command cargo tauri" + tauriScript: "nix develop -i -k COMMIT_SHA -k APPLE_CERTIFICATE -k APPLE_CERTIFICATE_PASSWORD -k APPLE_SIGNING_IDENTITY -k APPLE_ID -k APPLE_PASSWORD -k APPLE_TEAM_ID -k CI_DEPLOY_SEPOLIA_RPC_URL -k CI_FORK_SEPOLIA_DEPLOYER_ADDRESS -k CI_FORK_SEPOLIA_BLOCK_NUMBER -k CI_DEPLOY_POLYGON_RPC_URL -k CI_SEPOLIA_METABOARD_URL -k RPC_URL_ETHEREUM_FORK .#tauri-shell --command cargo tauri" tagName: app-v__VERSION__-${{ github.sha }} # the action automatically replaces \_\_VERSION\_\_ with the app version releaseName: "App v__VERSION__-${{ github.sha }}" releaseBody: "See the assets to download this version and install." diff --git a/.github/workflows/tauri.yaml b/.github/workflows/tauri.yaml index 5f3ece4a3d..3566555bfa 100644 --- a/.github/workflows/tauri.yaml +++ b/.github/workflows/tauri.yaml @@ -29,7 +29,6 @@ jobs: runs-on: ${{ matrix.os }} env: COMMIT_SHA: ${{ github.sha }} - NIXPKGS_ALLOW_INSECURE: 1 steps: - name: Free up disk space in action runner (Ubuntu) if: matrix.os == 'ubuntu-22.04' @@ -92,13 +91,13 @@ jobs: env: PUBLIC_WALLETCONNECT_PROJECT_ID: ${{ secrets.WALLETCONNECT_PROJECT_ID || 'test' }} - - run: nix develop --impure .#tauri-shell -c ob-tauri-unit-test + - run: nix develop .#tauri-shell -c ob-tauri-unit-test - - run: nix develop --impure .#tauri-shell --command ob-tauri-before-build-ci + - run: nix develop .#tauri-shell --command ob-tauri-before-build-ci working-directory: ./tauri-app env: WALLETCONNECT_PROJECT_ID: ${{ secrets.WALLETCONNECT_PROJECT_ID || 'test' }} - - run: nix develop --impure .#tauri-shell --command npm run svelte-lint-format-check + - run: nix develop .#tauri-shell --command npm run svelte-lint-format-check working-directory: ./tauri-app - name: Reset workspace target before Rust tests @@ -107,7 +106,7 @@ jobs: rm -rf tauri-app/src-tauri/target - name: Run Rust tests with reduced debug artifacts - run: nix develop --impure .#tauri-shell --command tauri-rs-test + run: nix develop .#tauri-shell --command tauri-rs-test env: RUSTFLAGS: "-Cdebuginfo=0" CARGO_INCREMENTAL: 0 @@ -116,7 +115,7 @@ jobs: rm -rf target rm -rf tauri-app/src-tauri/target - - run: nix develop --impure .#tauri-shell --command cargo tauri build --verbose + - run: nix develop .#tauri-shell --command cargo tauri build --verbose working-directory: ./tauri-app - name: Reclaim workspace target artifacts diff --git a/prep-all.sh b/prep-all.sh index 3958e9da54..61a1a50c5b 100755 --- a/prep-all.sh +++ b/prep-all.sh @@ -29,28 +29,28 @@ keep=( echo "Installing Forge dependencies..." nix develop -c forge install -# echo "Setting up rain.math.float..." -# nix develop -i ${keep[@]} -c bash \ -# -c '(cd lib/rain.interpreter/lib/rain.interpreter.interface/lib/rain.math.float && rainix-sol-prelude)' -# nix develop -i ${keep[@]} -c bash \ -# -c '(cd lib/rain.interpreter/lib/rain.interpreter.interface/lib/rain.math.float && rainix-rs-prelude)' - -# echo "Setting up rain.tofu.erc20-decimals..." -# (cd lib/rain.tofu.erc20-decimals && nix develop -c forge build) - -# echo "Setting up rain.interpreter..." -# nix develop -i ${keep[@]} -c bash -c '(cd lib/rain.interpreter && rainix-sol-prelude)' -# nix develop -i ${keep[@]} -c bash -c '(cd lib/rain.interpreter && rainix-rs-prelude)' -# (cd lib/rain.interpreter && nix develop -i ${keep[@]} -c bash -c i9r-prelude) - -# echo "Setting up rain.metadata..." -# nix develop -i ${keep[@]} -c bash -c '(cd lib/rain.interpreter/lib/rain.metadata && rainix-sol-prelude)' -# nix develop -i ${keep[@]} -c bash -c '(cd lib/rain.interpreter/lib/rain.metadata && rainix-rs-prelude)' - -# echo "Setting up main project dependencies..." -# nix develop -i ${keep[@]} -c rainix-sol-prelude -# nix develop -i ${keep[@]} -c rainix-rs-prelude -# nix develop -i ${keep[@]} -c raindex-prelude +echo "Setting up rain.math.float..." +nix develop -i ${keep[@]} -c bash \ + -c '(cd lib/rain.interpreter/lib/rain.interpreter.interface/lib/rain.math.float && rainix-sol-prelude)' +nix develop -i ${keep[@]} -c bash \ + -c '(cd lib/rain.interpreter/lib/rain.interpreter.interface/lib/rain.math.float && rainix-rs-prelude)' + +echo "Setting up rain.tofu.erc20-decimals..." +(cd lib/rain.tofu.erc20-decimals && nix develop -c forge build) + +echo "Setting up rain.interpreter..." +nix develop -i ${keep[@]} -c bash -c '(cd lib/rain.interpreter && rainix-sol-prelude)' +nix develop -i ${keep[@]} -c bash -c '(cd lib/rain.interpreter && rainix-rs-prelude)' +(cd lib/rain.interpreter && nix develop -i ${keep[@]} -c bash -c i9r-prelude) + +echo "Setting up rain.metadata..." +nix develop -i ${keep[@]} -c bash -c '(cd lib/rain.interpreter/lib/rain.metadata && rainix-sol-prelude)' +nix develop -i ${keep[@]} -c bash -c '(cd lib/rain.interpreter/lib/rain.metadata && rainix-rs-prelude)' + +echo "Setting up main project dependencies..." +nix develop -i ${keep[@]} -c rainix-sol-prelude +nix develop -i ${keep[@]} -c rainix-rs-prelude +nix develop -i ${keep[@]} -c raindex-prelude echo "Setting up UI components..." nix develop -i ${keep[@]} .#tauri-shell -c ob-tauri-prelude From dde6dddfc54105ef7388036225643f6f456f9b10 Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Tue, 28 Oct 2025 04:24:31 +0000 Subject: [PATCH 69/94] update --- .github/workflows/tauri.yaml | 12 +++++++----- flake.nix | 6 +++--- prep-all.sh | 4 ++-- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.github/workflows/tauri.yaml b/.github/workflows/tauri.yaml index 3566555bfa..517439b20a 100644 --- a/.github/workflows/tauri.yaml +++ b/.github/workflows/tauri.yaml @@ -29,6 +29,8 @@ jobs: runs-on: ${{ matrix.os }} env: COMMIT_SHA: ${{ github.sha }} + NIXPKGS_ALLOW_INSECURE: 1 + NIXPKGS_ALLOW_BROKEN: 1 steps: - name: Free up disk space in action runner (Ubuntu) if: matrix.os == 'ubuntu-22.04' @@ -91,13 +93,13 @@ jobs: env: PUBLIC_WALLETCONNECT_PROJECT_ID: ${{ secrets.WALLETCONNECT_PROJECT_ID || 'test' }} - - run: nix develop .#tauri-shell -c ob-tauri-unit-test + - run: nix develop --impure .#tauri-shell -c ob-tauri-unit-test - - run: nix develop .#tauri-shell --command ob-tauri-before-build-ci + - run: nix develop --impure .#tauri-shell --command ob-tauri-before-build-ci working-directory: ./tauri-app env: WALLETCONNECT_PROJECT_ID: ${{ secrets.WALLETCONNECT_PROJECT_ID || 'test' }} - - run: nix develop .#tauri-shell --command npm run svelte-lint-format-check + - run: nix develop --impure .#tauri-shell --command npm run svelte-lint-format-check working-directory: ./tauri-app - name: Reset workspace target before Rust tests @@ -106,7 +108,7 @@ jobs: rm -rf tauri-app/src-tauri/target - name: Run Rust tests with reduced debug artifacts - run: nix develop .#tauri-shell --command tauri-rs-test + run: nix develop --impure .#tauri-shell --command tauri-rs-test env: RUSTFLAGS: "-Cdebuginfo=0" CARGO_INCREMENTAL: 0 @@ -115,7 +117,7 @@ jobs: rm -rf target rm -rf tauri-app/src-tauri/target - - run: nix develop .#tauri-shell --command cargo tauri build --verbose + - run: nix develop --impure .#tauri-shell --command cargo tauri build --verbose working-directory: ./tauri-app - name: Reclaim workspace target artifacts diff --git a/flake.nix b/flake.nix index cdd6440b86..7fa30a9b3a 100644 --- a/flake.nix +++ b/flake.nix @@ -319,9 +319,9 @@ ++ [ pkgs.clang-tools ]; nativeBuildInputs = rainix.devShells.${system}.tauri-shell.nativeBuildInputs ++ (pkgs.lib.optionals (!pkgs.stdenv.isDarwin) [ - # pkgs.libsoup_2_4 - # pkgs.webkitgtk_4_0 - pkgs.gtk4 + pkgs.libsoup_2_4 + pkgs.webkitgtk_4_0 + pkgs.gtk3 ]); }; devShells.webapp-shell = pkgs.mkShell { diff --git a/prep-all.sh b/prep-all.sh index 61a1a50c5b..5799ae1796 100755 --- a/prep-all.sh +++ b/prep-all.sh @@ -53,8 +53,8 @@ nix develop -i ${keep[@]} -c rainix-rs-prelude nix develop -i ${keep[@]} -c raindex-prelude echo "Setting up UI components..." -nix develop -i ${keep[@]} .#tauri-shell -c ob-tauri-prelude -nix develop -i ${keep[@]} .#tauri-shell -c ob-ui-components-prelude +NIXPKGS_ALLOW_INSECURE=1 NIXPKGS_ALLOW_BROKEN=1 nix develop --impure -i ${keep[@]} .#tauri-shell -c ob-tauri-prelude +NIXPKGS_ALLOW_INSECURE=1 NIXPKGS_ALLOW_BROKEN=1 nix develop --impure -i ${keep[@]} .#tauri-shell -c ob-ui-components-prelude echo "Building packages..." nix develop -i ${keep[@]} -c bash -c '(npm run build -w @rainlanguage/orderbook)' From f1cd85e73ee56c93a807210242debabb64a81628 Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Tue, 28 Oct 2025 17:23:28 +0000 Subject: [PATCH 70/94] update --- flake.lock | 55 +++++++++++++++++++++++++++++++++++------------------- flake.nix | 15 +++++++++------ 2 files changed, 45 insertions(+), 25 deletions(-) diff --git a/flake.lock b/flake.lock index cca6bebe06..f0257c151c 100644 --- a/flake.lock +++ b/flake.lock @@ -159,7 +159,7 @@ "foundry": { "inputs": { "flake-utils": "flake-utils_4", - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs_2" }, "locked": { "lastModified": 1714727549, @@ -179,7 +179,7 @@ "foundry_2": { "inputs": { "flake-utils": "flake-utils_8", - "nixpkgs": "nixpkgs_5" + "nixpkgs": "nixpkgs_6" }, "locked": { "lastModified": 1758705030, @@ -196,6 +196,22 @@ } }, "nixpkgs": { + "locked": { + "lastModified": 1749104371, + "narHash": "sha256-m2NmOPd6XgBiskmUq/BS9Xxuf3z0ebnGVfSKNAO5NEM=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "48975d7f9b9960ed33c4e8561bcce20cc0c2de5b", + "type": "github" + }, + "original": { + "owner": "nixos", + "repo": "nixpkgs", + "rev": "48975d7f9b9960ed33c4e8561bcce20cc0c2de5b", + "type": "github" + } + }, + "nixpkgs_2": { "locked": { "lastModified": 1666753130, "narHash": "sha256-Wff1dGPFSneXJLI2c0kkdWTgxnQ416KE6X4KnFkgPYQ=", @@ -209,7 +225,7 @@ "type": "indirect" } }, - "nixpkgs_2": { + "nixpkgs_3": { "locked": { "lastModified": 1714764285, "narHash": "sha256-oeevp27kMeDjKdxaTyXyS14TLjJrpJhXp7UVEUdYqYs=", @@ -224,7 +240,7 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs_4": { "locked": { "lastModified": 1706487304, "narHash": "sha256-LE8lVX28MV2jWJsidW13D2qrHU/RUUONendL2Q/WlJg=", @@ -240,7 +256,7 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_5": { "locked": { "lastModified": 1708564076, "narHash": "sha256-KKkqoxlgx9n3nwST7O2kM8tliDOijiSSNaWuSkiozdQ=", @@ -256,7 +272,7 @@ "type": "github" } }, - "nixpkgs_5": { + "nixpkgs_6": { "locked": { "lastModified": 1666753130, "narHash": "sha256-Wff1dGPFSneXJLI2c0kkdWTgxnQ416KE6X4KnFkgPYQ=", @@ -270,7 +286,7 @@ "type": "indirect" } }, - "nixpkgs_6": { + "nixpkgs_7": { "locked": { "lastModified": 1758711836, "narHash": "sha256-uBqPg7wNX2v6YUdTswH7wWU8wqb60cFZx0tHaWTGF30=", @@ -285,7 +301,7 @@ "type": "github" } }, - "nixpkgs_7": { + "nixpkgs_8": { "locked": { "lastModified": 1744536153, "narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=", @@ -301,7 +317,7 @@ "type": "github" } }, - "nixpkgs_8": { + "nixpkgs_9": { "locked": { "lastModified": 1748662220, "narHash": "sha256-7gGa49iB9nCnFk4h/g9zwjlQAyjtpgcFkODjcOQS0Es=", @@ -340,7 +356,7 @@ "inputs": { "flake-utils": "flake-utils_3", "foundry": "foundry", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs_3", "rust-overlay": "rust-overlay", "solc": "solc" }, @@ -362,28 +378,29 @@ "inputs": { "flake-utils": "flake-utils_7", "foundry": "foundry_2", - "nixpkgs": "nixpkgs_6", + "nixpkgs": "nixpkgs_7", "rust-overlay": "rust-overlay_2", "solc": "solc_2" }, "locked": { - "lastModified": 1761604672, - "narHash": "sha256-pGLbPrUNlLA20Tif0C3qiNszrNHiN9BmAsPaFMFUbow=", + "lastModified": 1761667115, + "narHash": "sha256-Cqk6nr7TQp3hsi2hbKqaeu1SGkLCcMqTyZjmPCS+g68=", "owner": "rainlanguage", "repo": "rainix", - "rev": "d26f65d1a5de54996fa42ce0ca0d3d95ff44e2bc", + "rev": "b26aff9868b253329c3f27a94094130b01f6916f", "type": "github" }, "original": { "owner": "rainlanguage", "repo": "rainix", - "rev": "d26f65d1a5de54996fa42ce0ca0d3d95ff44e2bc", + "rev": "b26aff9868b253329c3f27a94094130b01f6916f", "type": "github" } }, "root": { "inputs": { "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs", "rain": "rain", "rainix": "rainix_2" } @@ -391,7 +408,7 @@ "rust-overlay": { "inputs": { "flake-utils": "flake-utils_5", - "nixpkgs": "nixpkgs_3" + "nixpkgs": "nixpkgs_4" }, "locked": { "lastModified": 1714702555, @@ -409,7 +426,7 @@ }, "rust-overlay_2": { "inputs": { - "nixpkgs": "nixpkgs_7" + "nixpkgs": "nixpkgs_8" }, "locked": { "lastModified": 1758681214, @@ -428,7 +445,7 @@ "solc": { "inputs": { "flake-utils": "flake-utils_6", - "nixpkgs": "nixpkgs_4" + "nixpkgs": "nixpkgs_5" }, "locked": { "lastModified": 1711538161, @@ -459,7 +476,7 @@ "solc_2": { "inputs": { "flake-utils": "flake-utils_9", - "nixpkgs": "nixpkgs_8", + "nixpkgs": "nixpkgs_9", "solc-macos-amd64-list-json": "solc-macos-amd64-list-json" }, "locked": { diff --git a/flake.nix b/flake.nix index 7fa30a9b3a..e2bc0d377d 100644 --- a/flake.nix +++ b/flake.nix @@ -2,14 +2,17 @@ description = "Flake for development workflows."; inputs = { - rainix.url = "github:rainlanguage/rainix?rev=d26f65d1a5de54996fa42ce0ca0d3d95ff44e2bc"; + rainix.url = "github:rainlanguage/rainix?rev=b26aff9868b253329c3f27a94094130b01f6916f"; + nixpkgs.url = "github:nixos/nixpkgs?rev=48975d7f9b9960ed33c4e8561bcce20cc0c2de5b"; rain.url = "github:rainlanguage/rain.cli"; flake-utils.url = "github:numtide/flake-utils"; }; - outputs = { self, flake-utils, rainix, rain }: + outputs = { self, flake-utils, rainix, rain, nixpkgs }: flake-utils.lib.eachDefaultSystem (system: - let pkgs = rainix.pkgs.${system}; + let + pkgs = rainix.pkgs.${system}; + npkgs = nixpkgs.${system}; in rec { packages = rec { tauri-release-env = rainix.tauri-release-env.${system}; @@ -319,9 +322,9 @@ ++ [ pkgs.clang-tools ]; nativeBuildInputs = rainix.devShells.${system}.tauri-shell.nativeBuildInputs ++ (pkgs.lib.optionals (!pkgs.stdenv.isDarwin) [ - pkgs.libsoup_2_4 - pkgs.webkitgtk_4_0 - pkgs.gtk3 + npkgs.libsoup_2_4 + npkgs.webkitgtk + # npkgs.gtk3 ]); }; devShells.webapp-shell = pkgs.mkShell { From a7264d436fcedc01295e3315e58692c8fdc6fedf Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Tue, 28 Oct 2025 17:24:26 +0000 Subject: [PATCH 71/94] update --- .github/workflows/tauri.yaml | 12 +++++------- prep-all.sh | 4 ++-- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/tauri.yaml b/.github/workflows/tauri.yaml index 517439b20a..3566555bfa 100644 --- a/.github/workflows/tauri.yaml +++ b/.github/workflows/tauri.yaml @@ -29,8 +29,6 @@ jobs: runs-on: ${{ matrix.os }} env: COMMIT_SHA: ${{ github.sha }} - NIXPKGS_ALLOW_INSECURE: 1 - NIXPKGS_ALLOW_BROKEN: 1 steps: - name: Free up disk space in action runner (Ubuntu) if: matrix.os == 'ubuntu-22.04' @@ -93,13 +91,13 @@ jobs: env: PUBLIC_WALLETCONNECT_PROJECT_ID: ${{ secrets.WALLETCONNECT_PROJECT_ID || 'test' }} - - run: nix develop --impure .#tauri-shell -c ob-tauri-unit-test + - run: nix develop .#tauri-shell -c ob-tauri-unit-test - - run: nix develop --impure .#tauri-shell --command ob-tauri-before-build-ci + - run: nix develop .#tauri-shell --command ob-tauri-before-build-ci working-directory: ./tauri-app env: WALLETCONNECT_PROJECT_ID: ${{ secrets.WALLETCONNECT_PROJECT_ID || 'test' }} - - run: nix develop --impure .#tauri-shell --command npm run svelte-lint-format-check + - run: nix develop .#tauri-shell --command npm run svelte-lint-format-check working-directory: ./tauri-app - name: Reset workspace target before Rust tests @@ -108,7 +106,7 @@ jobs: rm -rf tauri-app/src-tauri/target - name: Run Rust tests with reduced debug artifacts - run: nix develop --impure .#tauri-shell --command tauri-rs-test + run: nix develop .#tauri-shell --command tauri-rs-test env: RUSTFLAGS: "-Cdebuginfo=0" CARGO_INCREMENTAL: 0 @@ -117,7 +115,7 @@ jobs: rm -rf target rm -rf tauri-app/src-tauri/target - - run: nix develop --impure .#tauri-shell --command cargo tauri build --verbose + - run: nix develop .#tauri-shell --command cargo tauri build --verbose working-directory: ./tauri-app - name: Reclaim workspace target artifacts diff --git a/prep-all.sh b/prep-all.sh index 5799ae1796..61a1a50c5b 100755 --- a/prep-all.sh +++ b/prep-all.sh @@ -53,8 +53,8 @@ nix develop -i ${keep[@]} -c rainix-rs-prelude nix develop -i ${keep[@]} -c raindex-prelude echo "Setting up UI components..." -NIXPKGS_ALLOW_INSECURE=1 NIXPKGS_ALLOW_BROKEN=1 nix develop --impure -i ${keep[@]} .#tauri-shell -c ob-tauri-prelude -NIXPKGS_ALLOW_INSECURE=1 NIXPKGS_ALLOW_BROKEN=1 nix develop --impure -i ${keep[@]} .#tauri-shell -c ob-ui-components-prelude +nix develop -i ${keep[@]} .#tauri-shell -c ob-tauri-prelude +nix develop -i ${keep[@]} .#tauri-shell -c ob-ui-components-prelude echo "Building packages..." nix develop -i ${keep[@]} -c bash -c '(npm run build -w @rainlanguage/orderbook)' From 77099c8709a9d147ffba9a01eb12f87ea0e18474 Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Tue, 28 Oct 2025 17:57:14 +0000 Subject: [PATCH 72/94] Update flake.nix --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index e2bc0d377d..414c2ce5d9 100644 --- a/flake.nix +++ b/flake.nix @@ -12,7 +12,7 @@ flake-utils.lib.eachDefaultSystem (system: let pkgs = rainix.pkgs.${system}; - npkgs = nixpkgs.${system}; + npkgs = import nixpkgs { inherit system; }; in rec { packages = rec { tauri-release-env = rainix.tauri-release-env.${system}; From edb46219aff88e6b2aa64d31f7475bcd5f7a32d4 Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Tue, 28 Oct 2025 18:01:18 +0000 Subject: [PATCH 73/94] Update flake.nix --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 414c2ce5d9..eb92847814 100644 --- a/flake.nix +++ b/flake.nix @@ -321,7 +321,7 @@ buildInputs = rainix.devShells.${system}.tauri-shell.buildInputs ++ [ pkgs.clang-tools ]; nativeBuildInputs = - rainix.devShells.${system}.tauri-shell.nativeBuildInputs ++ (pkgs.lib.optionals (!pkgs.stdenv.isDarwin) [ + rainix.devShells.${system}.tauri-shell.nativeBuildInputs ++ (npkgs.lib.optionals (!npkgs.stdenv.isDarwin) [ npkgs.libsoup_2_4 npkgs.webkitgtk # npkgs.gtk3 From fc5269e612f7561737b5680a47b1cdb1003e9446 Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Tue, 28 Oct 2025 18:04:46 +0000 Subject: [PATCH 74/94] Update flake.nix --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index eb92847814..414c2ce5d9 100644 --- a/flake.nix +++ b/flake.nix @@ -321,7 +321,7 @@ buildInputs = rainix.devShells.${system}.tauri-shell.buildInputs ++ [ pkgs.clang-tools ]; nativeBuildInputs = - rainix.devShells.${system}.tauri-shell.nativeBuildInputs ++ (npkgs.lib.optionals (!npkgs.stdenv.isDarwin) [ + rainix.devShells.${system}.tauri-shell.nativeBuildInputs ++ (pkgs.lib.optionals (!pkgs.stdenv.isDarwin) [ npkgs.libsoup_2_4 npkgs.webkitgtk # npkgs.gtk3 From a3675942b378b824e714532a0a9b9ed5fa4e6ff8 Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Tue, 28 Oct 2025 18:51:37 +0000 Subject: [PATCH 75/94] update --- flake.lock | 23 +++++++++++++++++++---- flake.nix | 17 ++++++++--------- 2 files changed, 27 insertions(+), 13 deletions(-) diff --git a/flake.lock b/flake.lock index f0257c151c..903f422d48 100644 --- a/flake.lock +++ b/flake.lock @@ -196,6 +196,20 @@ } }, "nixpkgs": { + "locked": { + "lastModified": 1761594641, + "narHash": "sha256-sImk6SJQASDLQo8l+0zWWaBgg7TueLS6lTvdH5pBZpo=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "1666250dbe4141e4ca8aaf89b40a3a51c2e36144", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "nixpkgs-old": { "locked": { "lastModified": 1749104371, "narHash": "sha256-m2NmOPd6XgBiskmUq/BS9Xxuf3z0ebnGVfSKNAO5NEM=", @@ -379,21 +393,22 @@ "flake-utils": "flake-utils_7", "foundry": "foundry_2", "nixpkgs": "nixpkgs_7", + "nixpkgs-old": "nixpkgs-old", "rust-overlay": "rust-overlay_2", "solc": "solc_2" }, "locked": { - "lastModified": 1761667115, - "narHash": "sha256-Cqk6nr7TQp3hsi2hbKqaeu1SGkLCcMqTyZjmPCS+g68=", + "lastModified": 1761677332, + "narHash": "sha256-4s+iGsGpMaVQn0j8RHvlyouGGSiX3k3mPWRc/vFiBVA=", "owner": "rainlanguage", "repo": "rainix", - "rev": "b26aff9868b253329c3f27a94094130b01f6916f", + "rev": "bca1b1df0ea73f4610425e94ac7d6c1d7f1d8343", "type": "github" }, "original": { "owner": "rainlanguage", "repo": "rainix", - "rev": "b26aff9868b253329c3f27a94094130b01f6916f", + "rev": "bca1b1df0ea73f4610425e94ac7d6c1d7f1d8343", "type": "github" } }, diff --git a/flake.nix b/flake.nix index 414c2ce5d9..7f8a673171 100644 --- a/flake.nix +++ b/flake.nix @@ -2,8 +2,7 @@ description = "Flake for development workflows."; inputs = { - rainix.url = "github:rainlanguage/rainix?rev=b26aff9868b253329c3f27a94094130b01f6916f"; - nixpkgs.url = "github:nixos/nixpkgs?rev=48975d7f9b9960ed33c4e8561bcce20cc0c2de5b"; + rainix.url = "github:rainlanguage/rainix?rev=bca1b1df0ea73f4610425e94ac7d6c1d7f1d8343"; rain.url = "github:rainlanguage/rain.cli"; flake-utils.url = "github:numtide/flake-utils"; }; @@ -12,7 +11,6 @@ flake-utils.lib.eachDefaultSystem (system: let pkgs = rainix.pkgs.${system}; - npkgs = import nixpkgs { inherit system; }; in rec { packages = rec { tauri-release-env = rainix.tauri-release-env.${system}; @@ -135,7 +133,7 @@ echo COMMIT_SHA=''${COMMIT_SHA} >> .env echo VITE_WALLETCONNECT_PROJECT_ID=''${VITE_WALLETCONNECT_PROJECT_ID} >> .env ''; - additionalBuildInputs = [ pkgs.sentry-cli ]; + # additionalBuildInputs = [ pkgs.sentry-cli ]; }; ob-tauri-before-build-ci = rainix.mkTask.${system} { @@ -321,11 +319,12 @@ buildInputs = rainix.devShells.${system}.tauri-shell.buildInputs ++ [ pkgs.clang-tools ]; nativeBuildInputs = - rainix.devShells.${system}.tauri-shell.nativeBuildInputs ++ (pkgs.lib.optionals (!pkgs.stdenv.isDarwin) [ - npkgs.libsoup_2_4 - npkgs.webkitgtk - # npkgs.gtk3 - ]); + rainix.devShells.${system}.tauri-shell.nativeBuildInputs; + # ++ (pkgs.lib.optionals (!pkgs.stdenv.isDarwin) [ + # npkgs.libsoup_2_4 + # npkgs.webkitgtk + # # npkgs.gtk3 + # ]); }; devShells.webapp-shell = pkgs.mkShell { packages = with pkgs; [ nodejs_20 ]; From 1d6c8a1d009f62df192617595286626efda5320d Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Tue, 28 Oct 2025 20:30:15 +0000 Subject: [PATCH 76/94] update --- flake.lock | 8 ++++---- flake.nix | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/flake.lock b/flake.lock index 903f422d48..37e72cdef6 100644 --- a/flake.lock +++ b/flake.lock @@ -398,17 +398,17 @@ "solc": "solc_2" }, "locked": { - "lastModified": 1761677332, - "narHash": "sha256-4s+iGsGpMaVQn0j8RHvlyouGGSiX3k3mPWRc/vFiBVA=", + "lastModified": 1761683366, + "narHash": "sha256-Y6qU/1I4IR1EmdFZWXmioyYlbrdTGPyUvS+IE9b1YB8=", "owner": "rainlanguage", "repo": "rainix", - "rev": "bca1b1df0ea73f4610425e94ac7d6c1d7f1d8343", + "rev": "499059a89d5a946513b24e56f3f67792e5ad5bbd", "type": "github" }, "original": { "owner": "rainlanguage", "repo": "rainix", - "rev": "bca1b1df0ea73f4610425e94ac7d6c1d7f1d8343", + "rev": "499059a89d5a946513b24e56f3f67792e5ad5bbd", "type": "github" } }, diff --git a/flake.nix b/flake.nix index 7f8a673171..2d066afd89 100644 --- a/flake.nix +++ b/flake.nix @@ -2,7 +2,7 @@ description = "Flake for development workflows."; inputs = { - rainix.url = "github:rainlanguage/rainix?rev=bca1b1df0ea73f4610425e94ac7d6c1d7f1d8343"; + rainix.url = "github:rainlanguage/rainix?rev=499059a89d5a946513b24e56f3f67792e5ad5bbd"; rain.url = "github:rainlanguage/rain.cli"; flake-utils.url = "github:numtide/flake-utils"; }; From 9f4edc8e70d1e252bda385c23b6f13d9a9d3ab9e Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Tue, 28 Oct 2025 21:31:58 +0000 Subject: [PATCH 77/94] update --- flake.lock | 8 ++++---- flake.nix | 14 ++++++-------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/flake.lock b/flake.lock index 37e72cdef6..f707af9ff3 100644 --- a/flake.lock +++ b/flake.lock @@ -398,17 +398,17 @@ "solc": "solc_2" }, "locked": { - "lastModified": 1761683366, - "narHash": "sha256-Y6qU/1I4IR1EmdFZWXmioyYlbrdTGPyUvS+IE9b1YB8=", + "lastModified": 1761686489, + "narHash": "sha256-5W0xZwM7LgyD/R1Gzsw/GOiVBYyuuA49Vu961P1dB4M=", "owner": "rainlanguage", "repo": "rainix", - "rev": "499059a89d5a946513b24e56f3f67792e5ad5bbd", + "rev": "5a9777f987828ccfdedee8ce709c0e558858bed1", "type": "github" }, "original": { "owner": "rainlanguage", "repo": "rainix", - "rev": "499059a89d5a946513b24e56f3f67792e5ad5bbd", + "rev": "5a9777f987828ccfdedee8ce709c0e558858bed1", "type": "github" } }, diff --git a/flake.nix b/flake.nix index 2d066afd89..5cc472a058 100644 --- a/flake.nix +++ b/flake.nix @@ -2,17 +2,19 @@ description = "Flake for development workflows."; inputs = { - rainix.url = "github:rainlanguage/rainix?rev=499059a89d5a946513b24e56f3f67792e5ad5bbd"; + rainix.url = "github:rainlanguage/rainix?rev=5a9777f987828ccfdedee8ce709c0e558858bed1"; rain.url = "github:rainlanguage/rain.cli"; flake-utils.url = "github:numtide/flake-utils"; }; - outputs = { self, flake-utils, rainix, rain, nixpkgs }: + outputs = { self, flake-utils, rainix, rain }: flake-utils.lib.eachDefaultSystem (system: let pkgs = rainix.pkgs.${system}; + old-pkgs = rainix.old-pkgs.${system}; in rec { packages = rec { + tauri-release-env = rainix.tauri-release-env.${system}; raindex-prelude = rainix.mkTask.${system} { @@ -133,7 +135,7 @@ echo COMMIT_SHA=''${COMMIT_SHA} >> .env echo VITE_WALLETCONNECT_PROJECT_ID=''${VITE_WALLETCONNECT_PROJECT_ID} >> .env ''; - # additionalBuildInputs = [ pkgs.sentry-cli ]; + additionalBuildInputs = [ old-pkgs.sentry-cli ]; }; ob-tauri-before-build-ci = rainix.mkTask.${system} { @@ -320,11 +322,6 @@ ++ [ pkgs.clang-tools ]; nativeBuildInputs = rainix.devShells.${system}.tauri-shell.nativeBuildInputs; - # ++ (pkgs.lib.optionals (!pkgs.stdenv.isDarwin) [ - # npkgs.libsoup_2_4 - # npkgs.webkitgtk - # # npkgs.gtk3 - # ]); }; devShells.webapp-shell = pkgs.mkShell { packages = with pkgs; [ nodejs_20 ]; @@ -333,4 +330,5 @@ rainix.devShells.${system}.default.nativeBuildInputs; }; }); + } From 1197f44e52241ed2699e53e7c5484ba94a915eb4 Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Tue, 28 Oct 2025 21:47:59 +0000 Subject: [PATCH 78/94] Update flake.lock --- flake.lock | 49 +++++++++++++++++-------------------------------- 1 file changed, 17 insertions(+), 32 deletions(-) diff --git a/flake.lock b/flake.lock index f707af9ff3..a3f0b4fb40 100644 --- a/flake.lock +++ b/flake.lock @@ -159,7 +159,7 @@ "foundry": { "inputs": { "flake-utils": "flake-utils_4", - "nixpkgs": "nixpkgs_2" + "nixpkgs": "nixpkgs" }, "locked": { "lastModified": 1714727549, @@ -179,7 +179,7 @@ "foundry_2": { "inputs": { "flake-utils": "flake-utils_8", - "nixpkgs": "nixpkgs_6" + "nixpkgs": "nixpkgs_5" }, "locked": { "lastModified": 1758705030, @@ -197,11 +197,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1761594641, - "narHash": "sha256-sImk6SJQASDLQo8l+0zWWaBgg7TueLS6lTvdH5pBZpo=", + "lastModified": 1666753130, + "narHash": "sha256-Wff1dGPFSneXJLI2c0kkdWTgxnQ416KE6X4KnFkgPYQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "1666250dbe4141e4ca8aaf89b40a3a51c2e36144", + "rev": "f540aeda6f677354f1e7144ab04352f61aaa0118", "type": "github" }, "original": { @@ -226,20 +226,6 @@ } }, "nixpkgs_2": { - "locked": { - "lastModified": 1666753130, - "narHash": "sha256-Wff1dGPFSneXJLI2c0kkdWTgxnQ416KE6X4KnFkgPYQ=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "f540aeda6f677354f1e7144ab04352f61aaa0118", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "type": "indirect" - } - }, - "nixpkgs_3": { "locked": { "lastModified": 1714764285, "narHash": "sha256-oeevp27kMeDjKdxaTyXyS14TLjJrpJhXp7UVEUdYqYs=", @@ -254,7 +240,7 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_3": { "locked": { "lastModified": 1706487304, "narHash": "sha256-LE8lVX28MV2jWJsidW13D2qrHU/RUUONendL2Q/WlJg=", @@ -270,7 +256,7 @@ "type": "github" } }, - "nixpkgs_5": { + "nixpkgs_4": { "locked": { "lastModified": 1708564076, "narHash": "sha256-KKkqoxlgx9n3nwST7O2kM8tliDOijiSSNaWuSkiozdQ=", @@ -286,7 +272,7 @@ "type": "github" } }, - "nixpkgs_6": { + "nixpkgs_5": { "locked": { "lastModified": 1666753130, "narHash": "sha256-Wff1dGPFSneXJLI2c0kkdWTgxnQ416KE6X4KnFkgPYQ=", @@ -300,7 +286,7 @@ "type": "indirect" } }, - "nixpkgs_7": { + "nixpkgs_6": { "locked": { "lastModified": 1758711836, "narHash": "sha256-uBqPg7wNX2v6YUdTswH7wWU8wqb60cFZx0tHaWTGF30=", @@ -315,7 +301,7 @@ "type": "github" } }, - "nixpkgs_8": { + "nixpkgs_7": { "locked": { "lastModified": 1744536153, "narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=", @@ -331,7 +317,7 @@ "type": "github" } }, - "nixpkgs_9": { + "nixpkgs_8": { "locked": { "lastModified": 1748662220, "narHash": "sha256-7gGa49iB9nCnFk4h/g9zwjlQAyjtpgcFkODjcOQS0Es=", @@ -370,7 +356,7 @@ "inputs": { "flake-utils": "flake-utils_3", "foundry": "foundry", - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_2", "rust-overlay": "rust-overlay", "solc": "solc" }, @@ -392,7 +378,7 @@ "inputs": { "flake-utils": "flake-utils_7", "foundry": "foundry_2", - "nixpkgs": "nixpkgs_7", + "nixpkgs": "nixpkgs_6", "nixpkgs-old": "nixpkgs-old", "rust-overlay": "rust-overlay_2", "solc": "solc_2" @@ -415,7 +401,6 @@ "root": { "inputs": { "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs", "rain": "rain", "rainix": "rainix_2" } @@ -423,7 +408,7 @@ "rust-overlay": { "inputs": { "flake-utils": "flake-utils_5", - "nixpkgs": "nixpkgs_4" + "nixpkgs": "nixpkgs_3" }, "locked": { "lastModified": 1714702555, @@ -441,7 +426,7 @@ }, "rust-overlay_2": { "inputs": { - "nixpkgs": "nixpkgs_8" + "nixpkgs": "nixpkgs_7" }, "locked": { "lastModified": 1758681214, @@ -460,7 +445,7 @@ "solc": { "inputs": { "flake-utils": "flake-utils_6", - "nixpkgs": "nixpkgs_5" + "nixpkgs": "nixpkgs_4" }, "locked": { "lastModified": 1711538161, @@ -491,7 +476,7 @@ "solc_2": { "inputs": { "flake-utils": "flake-utils_9", - "nixpkgs": "nixpkgs_9", + "nixpkgs": "nixpkgs_8", "solc-macos-amd64-list-json": "solc-macos-amd64-list-json" }, "locked": { From f104609ad5551ca83bc4f24d5410256ae87c49d2 Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Tue, 28 Oct 2025 22:06:21 +0000 Subject: [PATCH 79/94] Update flake.lock --- flake.lock | 54 ++++++++++++++++++------------------------------------ 1 file changed, 18 insertions(+), 36 deletions(-) diff --git a/flake.lock b/flake.lock index a3f0b4fb40..588c043098 100644 --- a/flake.lock +++ b/flake.lock @@ -182,11 +182,11 @@ "nixpkgs": "nixpkgs_5" }, "locked": { - "lastModified": 1758705030, - "narHash": "sha256-zYM8PiEXANNrtjfyGUc7w37/D/kCynp0cQS+wCQ77GI=", + "lastModified": 1741023058, + "narHash": "sha256-LSd/8CBlpDLjci5ANFJjP0w+dGdY/mqKsyUfhjGwnfs=", "owner": "shazow", "repo": "foundry.nix", - "rev": "b59a55014050110170023e3e1c277c1d4a2f055b", + "rev": "66becfe20b7e688b8f2e5774609c4436cf202ba0", "type": "github" }, "original": { @@ -209,22 +209,6 @@ "type": "indirect" } }, - "nixpkgs-old": { - "locked": { - "lastModified": 1749104371, - "narHash": "sha256-m2NmOPd6XgBiskmUq/BS9Xxuf3z0ebnGVfSKNAO5NEM=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "48975d7f9b9960ed33c4e8561bcce20cc0c2de5b", - "type": "github" - }, - "original": { - "owner": "nixos", - "repo": "nixpkgs", - "rev": "48975d7f9b9960ed33c4e8561bcce20cc0c2de5b", - "type": "github" - } - }, "nixpkgs_2": { "locked": { "lastModified": 1714764285, @@ -288,11 +272,11 @@ }, "nixpkgs_6": { "locked": { - "lastModified": 1758711836, - "narHash": "sha256-uBqPg7wNX2v6YUdTswH7wWU8wqb60cFZx0tHaWTGF30=", + "lastModified": 1749104371, + "narHash": "sha256-m2NmOPd6XgBiskmUq/BS9Xxuf3z0ebnGVfSKNAO5NEM=", "owner": "nixos", "repo": "nixpkgs", - "rev": "46f97b78e825ae762c0224e3983c47687436a498", + "rev": "48975d7f9b9960ed33c4e8561bcce20cc0c2de5b", "type": "github" }, "original": { @@ -379,22 +363,20 @@ "flake-utils": "flake-utils_7", "foundry": "foundry_2", "nixpkgs": "nixpkgs_6", - "nixpkgs-old": "nixpkgs-old", "rust-overlay": "rust-overlay_2", "solc": "solc_2" }, "locked": { - "lastModified": 1761686489, - "narHash": "sha256-5W0xZwM7LgyD/R1Gzsw/GOiVBYyuuA49Vu961P1dB4M=", + "lastModified": 1757439424, + "narHash": "sha256-slPazOVyDSOaG7uL/E4Er2gbS5Zx7037oYHrSE2GuO4=", "owner": "rainlanguage", "repo": "rainix", - "rev": "5a9777f987828ccfdedee8ce709c0e558858bed1", + "rev": "7f734b1da77771b5d6ee5449f43c2a1a43705149", "type": "github" }, "original": { "owner": "rainlanguage", "repo": "rainix", - "rev": "5a9777f987828ccfdedee8ce709c0e558858bed1", "type": "github" } }, @@ -429,11 +411,11 @@ "nixpkgs": "nixpkgs_7" }, "locked": { - "lastModified": 1758681214, - "narHash": "sha256-8cW731vev6kfr58cILO2ZsjHwaPhm88dQ8Q6nTSjP9I=", + "lastModified": 1749091064, + "narHash": "sha256-TGtYjzRX0sueFhwYsnNNFF5TTKnpnloznpIghLzxeXo=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "b12ed88d8d33d4f3cbc842bf29fad93bb1437299", + "rev": "12419593ce78f2e8e1e89a373c6515885e218acb", "type": "github" }, "original": { @@ -464,13 +446,13 @@ "solc-macos-amd64-list-json": { "flake": false, "locked": { - "narHash": "sha256-AvITkfpNYgCypXuLJyqco0li+unVw39BAfdOZvd/SPE=", + "narHash": "sha256-U5ckttxwKO13gIKggel6iybG5oTDbSidPR5nH3Gs+kY=", "type": "file", - "url": "https://github.com/argotorg/solc-bin/raw/26fc3fd/macosx-amd64/list.json" + "url": "https://github.com/ethereum/solc-bin/raw/30a3695/macosx-amd64/list.json" }, "original": { "type": "file", - "url": "https://github.com/argotorg/solc-bin/raw/26fc3fd/macosx-amd64/list.json" + "url": "https://github.com/ethereum/solc-bin/raw/30a3695/macosx-amd64/list.json" } }, "solc_2": { @@ -480,11 +462,11 @@ "solc-macos-amd64-list-json": "solc-macos-amd64-list-json" }, "locked": { - "lastModified": 1756368702, - "narHash": "sha256-cqEHv7uCV0LibmQphyiXZ1+jYtGjMNb9Pae4tfcAcF8=", + "lastModified": 1748780655, + "narHash": "sha256-mradCdMvjXwKd7kVFACB/d1CP2LLCyEgUu4vJCSzNLU=", "owner": "hellwolf", "repo": "solc.nix", - "rev": "d83e90df2fa8359a690f6baabf76099432193c3f", + "rev": "3b6f3223ace5a7bc400b01a434d86bb1cb2593fb", "type": "github" }, "original": { From 5ba9d7cb610a9307ea7bf5f2038511e56e5042f7 Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Tue, 28 Oct 2025 22:07:45 +0000 Subject: [PATCH 80/94] Update flake.lock --- flake.lock | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 588c043098..e466154fa3 100644 --- a/flake.lock +++ b/flake.lock @@ -209,6 +209,22 @@ "type": "indirect" } }, + "nixpkgs-old": { + "locked": { + "lastModified": 1749104371, + "narHash": "sha256-m2NmOPd6XgBiskmUq/BS9Xxuf3z0ebnGVfSKNAO5NEM=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "48975d7f9b9960ed33c4e8561bcce20cc0c2de5b", + "type": "github" + }, + "original": { + "owner": "nixos", + "repo": "nixpkgs", + "rev": "48975d7f9b9960ed33c4e8561bcce20cc0c2de5b", + "type": "github" + } + }, "nixpkgs_2": { "locked": { "lastModified": 1714764285, @@ -363,20 +379,22 @@ "flake-utils": "flake-utils_7", "foundry": "foundry_2", "nixpkgs": "nixpkgs_6", + "nixpkgs-old": "nixpkgs-old", "rust-overlay": "rust-overlay_2", "solc": "solc_2" }, "locked": { - "lastModified": 1757439424, - "narHash": "sha256-slPazOVyDSOaG7uL/E4Er2gbS5Zx7037oYHrSE2GuO4=", + "lastModified": 1761686489, + "narHash": "sha256-5W0xZwM7LgyD/R1Gzsw/GOiVBYyuuA49Vu961P1dB4M=", "owner": "rainlanguage", "repo": "rainix", - "rev": "7f734b1da77771b5d6ee5449f43c2a1a43705149", + "rev": "5a9777f987828ccfdedee8ce709c0e558858bed1", "type": "github" }, "original": { "owner": "rainlanguage", "repo": "rainix", + "rev": "5a9777f987828ccfdedee8ce709c0e558858bed1", "type": "github" } }, From 4115849d7412b6dfbe38c009172607c94e1fc816 Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Tue, 28 Oct 2025 22:10:30 +0000 Subject: [PATCH 81/94] Update flake.nix --- flake.nix | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/flake.nix b/flake.nix index 5cc472a058..520f4268ba 100644 --- a/flake.nix +++ b/flake.nix @@ -9,9 +9,7 @@ outputs = { self, flake-utils, rainix, rain }: flake-utils.lib.eachDefaultSystem (system: - let - pkgs = rainix.pkgs.${system}; - old-pkgs = rainix.old-pkgs.${system}; + let pkgs = rainix.pkgs.${system}; in rec { packages = rec { @@ -135,7 +133,7 @@ echo COMMIT_SHA=''${COMMIT_SHA} >> .env echo VITE_WALLETCONNECT_PROJECT_ID=''${VITE_WALLETCONNECT_PROJECT_ID} >> .env ''; - additionalBuildInputs = [ old-pkgs.sentry-cli ]; + additionalBuildInputs = [ pkgs.sentry-cli ]; }; ob-tauri-before-build-ci = rainix.mkTask.${system} { From a29c6838c503a19a700144ad7beddbb30dc039ce Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Tue, 28 Oct 2025 22:21:33 +0000 Subject: [PATCH 82/94] update --- flake.lock | 24 +++--------------------- flake.nix | 2 +- 2 files changed, 4 insertions(+), 22 deletions(-) diff --git a/flake.lock b/flake.lock index e466154fa3..588c043098 100644 --- a/flake.lock +++ b/flake.lock @@ -209,22 +209,6 @@ "type": "indirect" } }, - "nixpkgs-old": { - "locked": { - "lastModified": 1749104371, - "narHash": "sha256-m2NmOPd6XgBiskmUq/BS9Xxuf3z0ebnGVfSKNAO5NEM=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "48975d7f9b9960ed33c4e8561bcce20cc0c2de5b", - "type": "github" - }, - "original": { - "owner": "nixos", - "repo": "nixpkgs", - "rev": "48975d7f9b9960ed33c4e8561bcce20cc0c2de5b", - "type": "github" - } - }, "nixpkgs_2": { "locked": { "lastModified": 1714764285, @@ -379,22 +363,20 @@ "flake-utils": "flake-utils_7", "foundry": "foundry_2", "nixpkgs": "nixpkgs_6", - "nixpkgs-old": "nixpkgs-old", "rust-overlay": "rust-overlay_2", "solc": "solc_2" }, "locked": { - "lastModified": 1761686489, - "narHash": "sha256-5W0xZwM7LgyD/R1Gzsw/GOiVBYyuuA49Vu961P1dB4M=", + "lastModified": 1757439424, + "narHash": "sha256-slPazOVyDSOaG7uL/E4Er2gbS5Zx7037oYHrSE2GuO4=", "owner": "rainlanguage", "repo": "rainix", - "rev": "5a9777f987828ccfdedee8ce709c0e558858bed1", + "rev": "7f734b1da77771b5d6ee5449f43c2a1a43705149", "type": "github" }, "original": { "owner": "rainlanguage", "repo": "rainix", - "rev": "5a9777f987828ccfdedee8ce709c0e558858bed1", "type": "github" } }, diff --git a/flake.nix b/flake.nix index 520f4268ba..0db84d01db 100644 --- a/flake.nix +++ b/flake.nix @@ -2,7 +2,7 @@ description = "Flake for development workflows."; inputs = { - rainix.url = "github:rainlanguage/rainix?rev=5a9777f987828ccfdedee8ce709c0e558858bed1"; + rainix.url = "github:rainlanguage/rainix"; rain.url = "github:rainlanguage/rain.cli"; flake-utils.url = "github:numtide/flake-utils"; }; From a7d33cfc442f1398991984c8ff83e49292b2a97d Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Tue, 28 Oct 2025 22:24:25 +0000 Subject: [PATCH 83/94] update flake --- flake.lock | 54 ++++++++++++++++++++++++++++++++++++------------------ flake.nix | 8 +++++--- 2 files changed, 41 insertions(+), 21 deletions(-) diff --git a/flake.lock b/flake.lock index 588c043098..5ec660a65a 100644 --- a/flake.lock +++ b/flake.lock @@ -182,11 +182,11 @@ "nixpkgs": "nixpkgs_5" }, "locked": { - "lastModified": 1741023058, - "narHash": "sha256-LSd/8CBlpDLjci5ANFJjP0w+dGdY/mqKsyUfhjGwnfs=", + "lastModified": 1758705030, + "narHash": "sha256-zYM8PiEXANNrtjfyGUc7w37/D/kCynp0cQS+wCQ77GI=", "owner": "shazow", "repo": "foundry.nix", - "rev": "66becfe20b7e688b8f2e5774609c4436cf202ba0", + "rev": "b59a55014050110170023e3e1c277c1d4a2f055b", "type": "github" }, "original": { @@ -209,6 +209,22 @@ "type": "indirect" } }, + "nixpkgs-old": { + "locked": { + "lastModified": 1749104371, + "narHash": "sha256-m2NmOPd6XgBiskmUq/BS9Xxuf3z0ebnGVfSKNAO5NEM=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "48975d7f9b9960ed33c4e8561bcce20cc0c2de5b", + "type": "github" + }, + "original": { + "owner": "nixos", + "repo": "nixpkgs", + "rev": "48975d7f9b9960ed33c4e8561bcce20cc0c2de5b", + "type": "github" + } + }, "nixpkgs_2": { "locked": { "lastModified": 1714764285, @@ -272,11 +288,11 @@ }, "nixpkgs_6": { "locked": { - "lastModified": 1749104371, - "narHash": "sha256-m2NmOPd6XgBiskmUq/BS9Xxuf3z0ebnGVfSKNAO5NEM=", + "lastModified": 1758711836, + "narHash": "sha256-uBqPg7wNX2v6YUdTswH7wWU8wqb60cFZx0tHaWTGF30=", "owner": "nixos", "repo": "nixpkgs", - "rev": "48975d7f9b9960ed33c4e8561bcce20cc0c2de5b", + "rev": "46f97b78e825ae762c0224e3983c47687436a498", "type": "github" }, "original": { @@ -363,20 +379,22 @@ "flake-utils": "flake-utils_7", "foundry": "foundry_2", "nixpkgs": "nixpkgs_6", + "nixpkgs-old": "nixpkgs-old", "rust-overlay": "rust-overlay_2", "solc": "solc_2" }, "locked": { - "lastModified": 1757439424, - "narHash": "sha256-slPazOVyDSOaG7uL/E4Er2gbS5Zx7037oYHrSE2GuO4=", + "lastModified": 1761689964, + "narHash": "sha256-lAE1aFG7T5i0r9dRDrMrabdM3y93ol6JBvVXS/ak100=", "owner": "rainlanguage", "repo": "rainix", - "rev": "7f734b1da77771b5d6ee5449f43c2a1a43705149", + "rev": "40cf05142b419e9caa79c34c1354ca8619ef3b68", "type": "github" }, "original": { "owner": "rainlanguage", "repo": "rainix", + "rev": "40cf05142b419e9caa79c34c1354ca8619ef3b68", "type": "github" } }, @@ -411,11 +429,11 @@ "nixpkgs": "nixpkgs_7" }, "locked": { - "lastModified": 1749091064, - "narHash": "sha256-TGtYjzRX0sueFhwYsnNNFF5TTKnpnloznpIghLzxeXo=", + "lastModified": 1758681214, + "narHash": "sha256-8cW731vev6kfr58cILO2ZsjHwaPhm88dQ8Q6nTSjP9I=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "12419593ce78f2e8e1e89a373c6515885e218acb", + "rev": "b12ed88d8d33d4f3cbc842bf29fad93bb1437299", "type": "github" }, "original": { @@ -446,13 +464,13 @@ "solc-macos-amd64-list-json": { "flake": false, "locked": { - "narHash": "sha256-U5ckttxwKO13gIKggel6iybG5oTDbSidPR5nH3Gs+kY=", + "narHash": "sha256-AvITkfpNYgCypXuLJyqco0li+unVw39BAfdOZvd/SPE=", "type": "file", - "url": "https://github.com/ethereum/solc-bin/raw/30a3695/macosx-amd64/list.json" + "url": "https://github.com/argotorg/solc-bin/raw/26fc3fd/macosx-amd64/list.json" }, "original": { "type": "file", - "url": "https://github.com/ethereum/solc-bin/raw/30a3695/macosx-amd64/list.json" + "url": "https://github.com/argotorg/solc-bin/raw/26fc3fd/macosx-amd64/list.json" } }, "solc_2": { @@ -462,11 +480,11 @@ "solc-macos-amd64-list-json": "solc-macos-amd64-list-json" }, "locked": { - "lastModified": 1748780655, - "narHash": "sha256-mradCdMvjXwKd7kVFACB/d1CP2LLCyEgUu4vJCSzNLU=", + "lastModified": 1756368702, + "narHash": "sha256-cqEHv7uCV0LibmQphyiXZ1+jYtGjMNb9Pae4tfcAcF8=", "owner": "hellwolf", "repo": "solc.nix", - "rev": "3b6f3223ace5a7bc400b01a434d86bb1cb2593fb", + "rev": "d83e90df2fa8359a690f6baabf76099432193c3f", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 0db84d01db..a953b9ff35 100644 --- a/flake.nix +++ b/flake.nix @@ -2,14 +2,16 @@ description = "Flake for development workflows."; inputs = { - rainix.url = "github:rainlanguage/rainix"; + rainix.url = "github:rainlanguage/rainix?rev=40cf05142b419e9caa79c34c1354ca8619ef3b68"; rain.url = "github:rainlanguage/rain.cli"; flake-utils.url = "github:numtide/flake-utils"; }; outputs = { self, flake-utils, rainix, rain }: flake-utils.lib.eachDefaultSystem (system: - let pkgs = rainix.pkgs.${system}; + let + pkgs = rainix.pkgs.${system}; + old-pkgs = rainix.old-pkgs.${system}; in rec { packages = rec { @@ -133,7 +135,7 @@ echo COMMIT_SHA=''${COMMIT_SHA} >> .env echo VITE_WALLETCONNECT_PROJECT_ID=''${VITE_WALLETCONNECT_PROJECT_ID} >> .env ''; - additionalBuildInputs = [ pkgs.sentry-cli ]; + additionalBuildInputs = [ old-pkgs.sentry-cli ]; }; ob-tauri-before-build-ci = rainix.mkTask.${system} { From f2ac1c4ad728f22f01f0cdab6e800cc41a8712ea Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Tue, 28 Oct 2025 23:38:43 +0000 Subject: [PATCH 84/94] update --- flake.lock | 8 ++++---- flake.nix | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/flake.lock b/flake.lock index 5ec660a65a..c0590d0dbf 100644 --- a/flake.lock +++ b/flake.lock @@ -384,17 +384,17 @@ "solc": "solc_2" }, "locked": { - "lastModified": 1761689964, - "narHash": "sha256-lAE1aFG7T5i0r9dRDrMrabdM3y93ol6JBvVXS/ak100=", + "lastModified": 1761691469, + "narHash": "sha256-414jL0IpGHzOztZIvd/ePiPakus+OFZ51A1xlEVHhN4=", "owner": "rainlanguage", "repo": "rainix", - "rev": "40cf05142b419e9caa79c34c1354ca8619ef3b68", + "rev": "d3fd31f0e4706984d1b26e63c179eccbdb1567ae", "type": "github" }, "original": { "owner": "rainlanguage", "repo": "rainix", - "rev": "40cf05142b419e9caa79c34c1354ca8619ef3b68", + "rev": "d3fd31f0e4706984d1b26e63c179eccbdb1567ae", "type": "github" } }, diff --git a/flake.nix b/flake.nix index a953b9ff35..9da5427e0c 100644 --- a/flake.nix +++ b/flake.nix @@ -2,7 +2,7 @@ description = "Flake for development workflows."; inputs = { - rainix.url = "github:rainlanguage/rainix?rev=40cf05142b419e9caa79c34c1354ca8619ef3b68"; + rainix.url = "github:rainlanguage/rainix?rev=d3fd31f0e4706984d1b26e63c179eccbdb1567ae"; rain.url = "github:rainlanguage/rain.cli"; flake-utils.url = "github:numtide/flake-utils"; }; From 15fa1f699614e0e68d247b5c696e712b417931ba Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Tue, 28 Oct 2025 23:52:16 +0000 Subject: [PATCH 85/94] Update foundry.lock --- foundry.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/foundry.lock b/foundry.lock index a224bfb208..55989f8d99 100644 --- a/foundry.lock +++ b/foundry.lock @@ -1,6 +1,6 @@ { "lib/rain.interpreter": { - "rev": "4c3552c2f6597c02f10d805151b1396fb0204a33" + "rev": "d1fee1b9c4a427ebd529b9c0b0e17718c1a4a99a" }, "lib/rain.orderbook.interface": { "rev": "dae86d795b32cb88005d9c47cbbbff9a5eef940a" From 191d4b0912229fc145978b90ae39da887b556e6d Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Wed, 29 Oct 2025 15:14:05 +0400 Subject: [PATCH 86/94] nix flake update --- flake.lock | 6 +++--- flake.nix | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/flake.lock b/flake.lock index c0590d0dbf..d6cae64b94 100644 --- a/flake.lock +++ b/flake.lock @@ -384,17 +384,17 @@ "solc": "solc_2" }, "locked": { - "lastModified": 1761691469, + "lastModified": 1761735588, "narHash": "sha256-414jL0IpGHzOztZIvd/ePiPakus+OFZ51A1xlEVHhN4=", "owner": "rainlanguage", "repo": "rainix", - "rev": "d3fd31f0e4706984d1b26e63c179eccbdb1567ae", + "rev": "8354e4956ed60f33135598750e4442f075a23c10", "type": "github" }, "original": { "owner": "rainlanguage", "repo": "rainix", - "rev": "d3fd31f0e4706984d1b26e63c179eccbdb1567ae", + "rev": "8354e4956ed60f33135598750e4442f075a23c10", "type": "github" } }, diff --git a/flake.nix b/flake.nix index 9da5427e0c..7d9ad1990b 100644 --- a/flake.nix +++ b/flake.nix @@ -2,14 +2,14 @@ description = "Flake for development workflows."; inputs = { - rainix.url = "github:rainlanguage/rainix?rev=d3fd31f0e4706984d1b26e63c179eccbdb1567ae"; + rainix.url = "github:rainlanguage/rainix?rev=8354e4956ed60f33135598750e4442f075a23c10"; rain.url = "github:rainlanguage/rain.cli"; flake-utils.url = "github:numtide/flake-utils"; }; outputs = { self, flake-utils, rainix, rain }: flake-utils.lib.eachDefaultSystem (system: - let + let pkgs = rainix.pkgs.${system}; old-pkgs = rainix.old-pkgs.${system}; in rec { From 7f32571c80dccfb4e56f3287b17d634cdeb339b6 Mon Sep 17 00:00:00 2001 From: Siddharth2207 Date: Wed, 29 Oct 2025 20:17:48 +0530 Subject: [PATCH 87/94] registry --- packages/webapp/src/lib/constants.ts | 4 ++-- tauri-app/src/lib/services/loadRemoteSettings.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/webapp/src/lib/constants.ts b/packages/webapp/src/lib/constants.ts index cb8bb2718d..ea273c538e 100644 --- a/packages/webapp/src/lib/constants.ts +++ b/packages/webapp/src/lib/constants.ts @@ -1,4 +1,4 @@ export const REGISTRY_URL = - 'https://raw.githubusercontent.com/rainlanguage/rain.strategies/e5fb0899864c9a2b084dd97312f78ccac1444cab/registry'; + 'https://raw.githubusercontent.com/rainlanguage/rain.strategies/2dd27cb680ea4900b70773318b5c23f72a79483f/registry'; export const REMOTE_SETTINGS_URL = - 'https://raw.githubusercontent.com/rainlanguage/rain.strategies/e5fb0899864c9a2b084dd97312f78ccac1444cab/settings.yaml'; + 'https://raw.githubusercontent.com/rainlanguage/rain.strategies/2dd27cb680ea4900b70773318b5c23f72a79483f/settings.yaml'; diff --git a/tauri-app/src/lib/services/loadRemoteSettings.ts b/tauri-app/src/lib/services/loadRemoteSettings.ts index e931afac61..d50b1a322e 100644 --- a/tauri-app/src/lib/services/loadRemoteSettings.ts +++ b/tauri-app/src/lib/services/loadRemoteSettings.ts @@ -1,5 +1,5 @@ const REMOTE_SETTINGS_URL = - 'https://raw.githubusercontent.com/rainlanguage/rain.strategies/e5fb0899864c9a2b084dd97312f78ccac1444cab/settings.yaml'; + 'https://raw.githubusercontent.com/rainlanguage/rain.strategies/2dd27cb680ea4900b70773318b5c23f72a79483f/settings.yaml'; export async function loadRemoteSettings() { const response = await fetch(REMOTE_SETTINGS_URL); From 7b97c7fd6774e57b01910caf536bff9aae7975cb Mon Sep 17 00:00:00 2001 From: Siddharth2207 Date: Wed, 29 Oct 2025 23:09:21 +0530 Subject: [PATCH 88/94] registry --- packages/webapp/src/lib/constants.ts | 4 ++-- tauri-app/src/lib/services/loadRemoteSettings.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/webapp/src/lib/constants.ts b/packages/webapp/src/lib/constants.ts index ea273c538e..5e2e650885 100644 --- a/packages/webapp/src/lib/constants.ts +++ b/packages/webapp/src/lib/constants.ts @@ -1,4 +1,4 @@ export const REGISTRY_URL = - 'https://raw.githubusercontent.com/rainlanguage/rain.strategies/2dd27cb680ea4900b70773318b5c23f72a79483f/registry'; + 'https://raw.githubusercontent.com/rainlanguage/rain.strategies/511b99b98e8ec7dc9c3ab6cb6d946b4581528598/registry'; export const REMOTE_SETTINGS_URL = - 'https://raw.githubusercontent.com/rainlanguage/rain.strategies/2dd27cb680ea4900b70773318b5c23f72a79483f/settings.yaml'; + 'https://raw.githubusercontent.com/rainlanguage/rain.strategies/511b99b98e8ec7dc9c3ab6cb6d946b4581528598/settings.yaml'; diff --git a/tauri-app/src/lib/services/loadRemoteSettings.ts b/tauri-app/src/lib/services/loadRemoteSettings.ts index d50b1a322e..2342139fca 100644 --- a/tauri-app/src/lib/services/loadRemoteSettings.ts +++ b/tauri-app/src/lib/services/loadRemoteSettings.ts @@ -1,5 +1,5 @@ const REMOTE_SETTINGS_URL = - 'https://raw.githubusercontent.com/rainlanguage/rain.strategies/2dd27cb680ea4900b70773318b5c23f72a79483f/settings.yaml'; + 'https://raw.githubusercontent.com/rainlanguage/rain.strategies/511b99b98e8ec7dc9c3ab6cb6d946b4581528598/settings.yaml'; export async function loadRemoteSettings() { const response = await fetch(REMOTE_SETTINGS_URL); From beab91e7ba94435c3d4bdd7231104193862887a7 Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Wed, 29 Oct 2025 17:42:19 +0000 Subject: [PATCH 89/94] update --- flake.lock | 1 - flake.nix | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/flake.lock b/flake.lock index d6cae64b94..fa9aa44c33 100644 --- a/flake.lock +++ b/flake.lock @@ -394,7 +394,6 @@ "original": { "owner": "rainlanguage", "repo": "rainix", - "rev": "8354e4956ed60f33135598750e4442f075a23c10", "type": "github" } }, diff --git a/flake.nix b/flake.nix index 7d9ad1990b..ef1fa50678 100644 --- a/flake.nix +++ b/flake.nix @@ -2,7 +2,7 @@ description = "Flake for development workflows."; inputs = { - rainix.url = "github:rainlanguage/rainix?rev=8354e4956ed60f33135598750e4442f075a23c10"; + rainix.url = "github:rainlanguage/rainix"; rain.url = "github:rainlanguage/rain.cli"; flake-utils.url = "github:numtide/flake-utils"; }; From aae87c0ddec240d1e48a28b6f47026e9606a0242 Mon Sep 17 00:00:00 2001 From: Siddharth2207 Date: Wed, 29 Oct 2025 23:19:28 +0530 Subject: [PATCH 90/94] registry --- packages/webapp/src/lib/constants.ts | 4 ++-- tauri-app/src/lib/services/loadRemoteSettings.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/webapp/src/lib/constants.ts b/packages/webapp/src/lib/constants.ts index 5e2e650885..b5aa1122db 100644 --- a/packages/webapp/src/lib/constants.ts +++ b/packages/webapp/src/lib/constants.ts @@ -1,4 +1,4 @@ export const REGISTRY_URL = - 'https://raw.githubusercontent.com/rainlanguage/rain.strategies/511b99b98e8ec7dc9c3ab6cb6d946b4581528598/registry'; + 'https://raw.githubusercontent.com/rainlanguage/rain.strategies/d57c3aa77b63f90535957947d15146c0182367dc/registry'; export const REMOTE_SETTINGS_URL = - 'https://raw.githubusercontent.com/rainlanguage/rain.strategies/511b99b98e8ec7dc9c3ab6cb6d946b4581528598/settings.yaml'; + 'https://raw.githubusercontent.com/rainlanguage/rain.strategies/d57c3aa77b63f90535957947d15146c0182367dc/settings.yaml'; diff --git a/tauri-app/src/lib/services/loadRemoteSettings.ts b/tauri-app/src/lib/services/loadRemoteSettings.ts index 2342139fca..696b7289f4 100644 --- a/tauri-app/src/lib/services/loadRemoteSettings.ts +++ b/tauri-app/src/lib/services/loadRemoteSettings.ts @@ -1,5 +1,5 @@ const REMOTE_SETTINGS_URL = - 'https://raw.githubusercontent.com/rainlanguage/rain.strategies/511b99b98e8ec7dc9c3ab6cb6d946b4581528598/settings.yaml'; + 'https://raw.githubusercontent.com/rainlanguage/rain.strategies/d57c3aa77b63f90535957947d15146c0182367dc/settings.yaml'; export async function loadRemoteSettings() { const response = await fetch(REMOTE_SETTINGS_URL); From 4b19fa17cdb75189e4bfeb35a9a9d7af7eebf662 Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Wed, 29 Oct 2025 17:54:03 +0000 Subject: [PATCH 91/94] Update fullDeployment.test.ts --- .../[orderName]/[deploymentKey]/fullDeployment.test.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/webapp/src/routes/deploy/[orderName]/[deploymentKey]/fullDeployment.test.ts b/packages/webapp/src/routes/deploy/[orderName]/[deploymentKey]/fullDeployment.test.ts index c3160504b9..090d4d4a2b 100644 --- a/packages/webapp/src/routes/deploy/[orderName]/[deploymentKey]/fullDeployment.test.ts +++ b/packages/webapp/src/routes/deploy/[orderName]/[deploymentKey]/fullDeployment.test.ts @@ -190,11 +190,11 @@ describe('Full Deployment Tests', () => { // Set vault id for token2 await userEvent.clear(vaultIdInputs[0]); - await userEvent.type(vaultIdInputs[0], '0x123'); + await userEvent.type(vaultIdInputs[0], '0x1230000000000000000000000000000000000000000000000000000000000000'); // Set vault id for token1 await userEvent.clear(vaultIdInputs[1]); - await userEvent.type(vaultIdInputs[1], '0x234'); + await userEvent.type(vaultIdInputs[1], '0x2340000000000000000000000000000000000000000000000000000000000000'); // Click the "Deploy Order" button const deployButton = screen.getByText('Deploy Order'); @@ -211,14 +211,16 @@ describe('Full Deployment Tests', () => { const getDeploymentArgs = async () => { const gui = (await DotrainOrderGui.newWithDeployment(fixedLimitOrder, 'flare')) .value as DotrainOrderGui; + console.log(fixedLimitOrder) await gui.setSelectToken('token1', '0x1D80c49BbBCd1C0911346656B529DF9E5c2F783d'); await gui.setSelectToken('token2', '0x12e605bc104e93B45e1aD99F9e555f659051c2BB'); - gui.setVaultId('output', 'token1', '0x123'); - gui.setVaultId('input', 'token2', '0x234'); + gui.setVaultId('output', 'token1', '0x1230000000000000000000000000000000000000000000000000000000000000'); + gui.setVaultId('input', 'token2', '0x2340000000000000000000000000000000000000000000000000000000000000'); gui.setFieldValue('fixed-io', '10'); const args = await gui.getDeploymentTransactionArgs( '0x999999cf1046e68e36E1aA2E0E07105eDDD1f08E' ); + console.log(args) return args.value; }; await new Promise((resolve) => setTimeout(resolve, 10000)); From e12afd6532216aee5a5734204a3b6f2b52a35b2e Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Wed, 29 Oct 2025 17:56:17 +0000 Subject: [PATCH 92/94] Update fullDeployment.test.ts --- .../deploy/[orderName]/[deploymentKey]/fullDeployment.test.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/webapp/src/routes/deploy/[orderName]/[deploymentKey]/fullDeployment.test.ts b/packages/webapp/src/routes/deploy/[orderName]/[deploymentKey]/fullDeployment.test.ts index 090d4d4a2b..ea5e7a8cd9 100644 --- a/packages/webapp/src/routes/deploy/[orderName]/[deploymentKey]/fullDeployment.test.ts +++ b/packages/webapp/src/routes/deploy/[orderName]/[deploymentKey]/fullDeployment.test.ts @@ -211,7 +211,6 @@ describe('Full Deployment Tests', () => { const getDeploymentArgs = async () => { const gui = (await DotrainOrderGui.newWithDeployment(fixedLimitOrder, 'flare')) .value as DotrainOrderGui; - console.log(fixedLimitOrder) await gui.setSelectToken('token1', '0x1D80c49BbBCd1C0911346656B529DF9E5c2F783d'); await gui.setSelectToken('token2', '0x12e605bc104e93B45e1aD99F9e555f659051c2BB'); gui.setVaultId('output', 'token1', '0x1230000000000000000000000000000000000000000000000000000000000000'); @@ -220,7 +219,6 @@ describe('Full Deployment Tests', () => { const args = await gui.getDeploymentTransactionArgs( '0x999999cf1046e68e36E1aA2E0E07105eDDD1f08E' ); - console.log(args) return args.value; }; await new Promise((resolve) => setTimeout(resolve, 10000)); From c995179487569abf64b641860618cd6eb659bdf2 Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Wed, 29 Oct 2025 18:10:02 +0000 Subject: [PATCH 93/94] fmt --- .../[deploymentKey]/fullDeployment.test.ts | 22 +++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/packages/webapp/src/routes/deploy/[orderName]/[deploymentKey]/fullDeployment.test.ts b/packages/webapp/src/routes/deploy/[orderName]/[deploymentKey]/fullDeployment.test.ts index ea5e7a8cd9..c5440cb74f 100644 --- a/packages/webapp/src/routes/deploy/[orderName]/[deploymentKey]/fullDeployment.test.ts +++ b/packages/webapp/src/routes/deploy/[orderName]/[deploymentKey]/fullDeployment.test.ts @@ -190,11 +190,17 @@ describe('Full Deployment Tests', () => { // Set vault id for token2 await userEvent.clear(vaultIdInputs[0]); - await userEvent.type(vaultIdInputs[0], '0x1230000000000000000000000000000000000000000000000000000000000000'); + await userEvent.type( + vaultIdInputs[0], + '0x1230000000000000000000000000000000000000000000000000000000000000' + ); // Set vault id for token1 await userEvent.clear(vaultIdInputs[1]); - await userEvent.type(vaultIdInputs[1], '0x2340000000000000000000000000000000000000000000000000000000000000'); + await userEvent.type( + vaultIdInputs[1], + '0x2340000000000000000000000000000000000000000000000000000000000000' + ); // Click the "Deploy Order" button const deployButton = screen.getByText('Deploy Order'); @@ -213,8 +219,16 @@ describe('Full Deployment Tests', () => { .value as DotrainOrderGui; await gui.setSelectToken('token1', '0x1D80c49BbBCd1C0911346656B529DF9E5c2F783d'); await gui.setSelectToken('token2', '0x12e605bc104e93B45e1aD99F9e555f659051c2BB'); - gui.setVaultId('output', 'token1', '0x1230000000000000000000000000000000000000000000000000000000000000'); - gui.setVaultId('input', 'token2', '0x2340000000000000000000000000000000000000000000000000000000000000'); + gui.setVaultId( + 'output', + 'token1', + '0x1230000000000000000000000000000000000000000000000000000000000000' + ); + gui.setVaultId( + 'input', + 'token2', + '0x2340000000000000000000000000000000000000000000000000000000000000' + ); gui.setFieldValue('fixed-io', '10'); const args = await gui.getDeploymentTransactionArgs( '0x999999cf1046e68e36E1aA2E0E07105eDDD1f08E' From 85490302c5402efd5b331e18f3b8128d4c56930e Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Wed, 29 Oct 2025 18:35:04 +0000 Subject: [PATCH 94/94] Update fullDeployment.test.ts --- .../[deploymentKey]/fullDeployment.test.ts | 22 ++++--------------- 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/packages/webapp/src/routes/deploy/[orderName]/[deploymentKey]/fullDeployment.test.ts b/packages/webapp/src/routes/deploy/[orderName]/[deploymentKey]/fullDeployment.test.ts index c5440cb74f..c3160504b9 100644 --- a/packages/webapp/src/routes/deploy/[orderName]/[deploymentKey]/fullDeployment.test.ts +++ b/packages/webapp/src/routes/deploy/[orderName]/[deploymentKey]/fullDeployment.test.ts @@ -190,17 +190,11 @@ describe('Full Deployment Tests', () => { // Set vault id for token2 await userEvent.clear(vaultIdInputs[0]); - await userEvent.type( - vaultIdInputs[0], - '0x1230000000000000000000000000000000000000000000000000000000000000' - ); + await userEvent.type(vaultIdInputs[0], '0x123'); // Set vault id for token1 await userEvent.clear(vaultIdInputs[1]); - await userEvent.type( - vaultIdInputs[1], - '0x2340000000000000000000000000000000000000000000000000000000000000' - ); + await userEvent.type(vaultIdInputs[1], '0x234'); // Click the "Deploy Order" button const deployButton = screen.getByText('Deploy Order'); @@ -219,16 +213,8 @@ describe('Full Deployment Tests', () => { .value as DotrainOrderGui; await gui.setSelectToken('token1', '0x1D80c49BbBCd1C0911346656B529DF9E5c2F783d'); await gui.setSelectToken('token2', '0x12e605bc104e93B45e1aD99F9e555f659051c2BB'); - gui.setVaultId( - 'output', - 'token1', - '0x1230000000000000000000000000000000000000000000000000000000000000' - ); - gui.setVaultId( - 'input', - 'token2', - '0x2340000000000000000000000000000000000000000000000000000000000000' - ); + gui.setVaultId('output', 'token1', '0x123'); + gui.setVaultId('input', 'token2', '0x234'); gui.setFieldValue('fixed-io', '10'); const args = await gui.getDeploymentTransactionArgs( '0x999999cf1046e68e36E1aA2E0E07105eDDD1f08E'