diff --git a/Cargo.lock b/Cargo.lock index 13b78f887e..65eaaec120 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6628,7 +6628,8 @@ dependencies = [ "tracing-subscriber 0.3.19", "url", "validator", - "wasm-bindgen-utils 0.0.10 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen", + "wasm-bindgen-utils 0.0.10 (git+https://github.com/rainlanguage/rain.wasm?rev=06990d85a0b7c55378a1c8cca4dd9e2bc34a596a)", ] [[package]] diff --git a/foundry.toml b/foundry.toml index 10d77c9f3f..618d99ba72 100644 --- a/foundry.toml +++ b/foundry.toml @@ -18,7 +18,7 @@ evm_version = "paris" optimizer = true # this is a bit low, was set to 1000000 previously but this caused deployment # code size cap to be hit. -optimizer_runs = 9000 +optimizer_runs = 2000 bytecode_hash = "none" cbor_metadata = false diff --git a/lib/rain.interpreter b/lib/rain.interpreter index 7212a7e969..474fc03745 160000 --- a/lib/rain.interpreter +++ b/lib/rain.interpreter @@ -1 +1 @@ -Subproject commit 7212a7e96959ecfd4b7a31df3b0c1e6357d52ffa +Subproject commit 474fc0374534388993d0b712673a476636eb5488 diff --git a/lib/rain.orderbook.interface b/lib/rain.orderbook.interface index 46ec53183a..21f3e97c03 160000 --- a/lib/rain.orderbook.interface +++ b/lib/rain.orderbook.interface @@ -1 +1 @@ -Subproject commit 46ec53183a0ae214847e30bf0bf10ec819b34233 +Subproject commit 21f3e97c033e1533641be27f7b21e9f828b42ce8 diff --git a/packages/orderbook/test/js_api/raindexClient.test.ts b/packages/orderbook/test/js_api/raindexClient.test.ts index be96fdd9cf..6de35da11f 100644 --- a/packages/orderbook/test/js_api/raindexClient.test.ts +++ b/packages/orderbook/test/js_api/raindexClient.test.ts @@ -829,7 +829,7 @@ describe('Rain Orderbook JS API Package Bindgen Tests - Raindex Client', async f ratio: '0x0000000000000000000000000000000000000000000000000000000000000002', maxInput: '0x0000000000000000000000000000000000000000000000000000000000000002', maxOutput: '0x0000000000000000000000000000000000000000000000000000000000000001', - inverseRatio: '0xffffffda000000000000000000000000259da6542d43623d04c5112000000000', + inverseRatio: '0xffffffbd2f7a53a390f4323b0f54bbbb472fa8c5db448df40000000000000000', formattedInverseRatio: '0.5', formattedMaxInput: '2', diff --git a/src/generated/OrderBookSubParser.pointers.sol b/src/generated/OrderBookSubParser.pointers.sol index 5ec397e551..52c8cc9290 100644 --- a/src/generated/OrderBookSubParser.pointers.sol +++ b/src/generated/OrderBookSubParser.pointers.sol @@ -10,7 +10,7 @@ pragma solidity =0.8.25; /// @dev Hash of the known bytecode. -bytes32 constant BYTECODE_HASH = bytes32(0x14fcea81300c2900d35b488e9a0f7b9e1de913764ae6e26810568ea39e6ca651); +bytes32 constant BYTECODE_HASH = bytes32(0x465eca8482d85ed5246c5e85b7d63e794670cd4c58774dabe2086cad0ea33b11); /// @dev The hash of the meta that describes the contract. bytes32 constant DESCRIBED_BY_META_HASH = bytes32(0x3457291434660c589b0e6c287e12b513e5194a5129c75fa47d01ce03fbc52178); @@ -50,7 +50,7 @@ bytes constant SUB_PARSER_WORD_PARSERS = /// These positional indexes all map to the same indexes looked up in the parse /// meta. bytes constant OPERAND_HANDLER_FUNCTION_POINTERS = - hex"1d191d191d191d191d191d191d191d191d191d191d191d191d191d191d191d191d191d5e1e5d1d191d191d191d191d191d191d191d191d191d191d19"; + hex"1cfb1cfb1cfb1cfb1cfb1cfb1cfb1cfb1cfb1cfb1cfb1cfb1cfb1cfb1cfb1cfb1cfb1d401e3f1cfb1cfb1cfb1cfb1cfb1cfb1cfb1cfb1cfb1cfb1cfb"; /// @dev Every two bytes is a function pointer for a literal parser. /// Literal dispatches are determined by the first byte(s) of the literal diff --git a/tauri-app/src-tauri/Cargo.lock b/tauri-app/src-tauri/Cargo.lock index 9f5bc24882..5004b4ac89 100644 --- a/tauri-app/src-tauri/Cargo.lock +++ b/tauri-app/src-tauri/Cargo.lock @@ -8811,7 +8811,8 @@ dependencies = [ "tracing-subscriber 0.3.19", "url", "validator", - "wasm-bindgen-utils 0.0.10 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen", + "wasm-bindgen-utils 0.0.10 (git+https://github.com/rainlanguage/rain.wasm?rev=06990d85a0b7c55378a1c8cca4dd9e2bc34a596a)", ] [[package]] diff --git a/test/concrete/ob/OrderBook.clear.handleIO.revert.t.sol b/test/concrete/ob/OrderBook.clear.handleIO.revert.t.sol index 5cb2b38e11..e68dee82b7 100644 --- a/test/concrete/ob/OrderBook.clear.handleIO.revert.t.sol +++ b/test/concrete/ob/OrderBook.clear.handleIO.revert.t.sol @@ -148,9 +148,9 @@ contract OrderBookClearHandleIORevertTest is OrderBookExternalRealTest { // This is a bit fragile but the error message includes the inner // executable bytecode only, not the outer parsed bytecode. bytes memory aliceErr = - abi.encodeWithSelector(SourceIndexOutOfBounds.selector, 1, hex"010000020200023710000001100000"); + abi.encodeWithSelector(SourceIndexOutOfBounds.selector, 1, hex"010000020200023e10000001100000"); bytes memory bobErr = - abi.encodeWithSelector(SourceIndexOutOfBounds.selector, 1, hex"010000020200023710000001100000"); + abi.encodeWithSelector(SourceIndexOutOfBounds.selector, 1, hex"010000020200023e10000001100000"); checkClearOrderHandleIO(aliceString, bobString, aliceErr, bobErr); } @@ -164,9 +164,9 @@ contract OrderBookClearHandleIORevertTest is OrderBookExternalRealTest { // This is a bit fragile but the error message includes the inner // executable bytecode only, not the outer parsed bytecode. bytes memory aliceErr = - abi.encodeWithSelector(SourceIndexOutOfBounds.selector, 1, hex"010000020200023710000001100000"); + abi.encodeWithSelector(SourceIndexOutOfBounds.selector, 1, hex"010000020200023e10000001100000"); bytes memory bobErr = - abi.encodeWithSelector(SourceIndexOutOfBounds.selector, 1, hex"010000020200023710000001100000"); + abi.encodeWithSelector(SourceIndexOutOfBounds.selector, 1, hex"010000020200023e10000001100000"); checkClearOrderHandleIO(aliceString, bobString, aliceErr, bobErr); } @@ -180,9 +180,9 @@ contract OrderBookClearHandleIORevertTest is OrderBookExternalRealTest { // This is a bit fragile but the error message includes the inner // executable bytecode only, not the outer parsed bytecode. bytes memory aliceErr = - abi.encodeWithSelector(SourceIndexOutOfBounds.selector, 1, hex"010000020200023710000001100000"); + abi.encodeWithSelector(SourceIndexOutOfBounds.selector, 1, hex"010000020200023e10000001100000"); bytes memory bobErr = - abi.encodeWithSelector(SourceIndexOutOfBounds.selector, 1, hex"010000020200023710000001100000"); + abi.encodeWithSelector(SourceIndexOutOfBounds.selector, 1, hex"010000020200023e10000001100000"); checkClearOrderHandleIO(aliceString, bobString, aliceErr, bobErr); } diff --git a/test/concrete/ob/OrderBook.deposit.entask.t.sol b/test/concrete/ob/OrderBook.deposit.entask.t.sol index 217fbe737f..45e3b171a5 100644 --- a/test/concrete/ob/OrderBook.deposit.entask.t.sol +++ b/test/concrete/ob/OrderBook.deposit.entask.t.sol @@ -232,7 +232,7 @@ contract OrderBookDepositEnactTest is OrderBookExternalRealTest { string.concat( usingWordsFrom, ":ensure(equal-to(deposit-vault-before() ", - preDepositAmount.toDecimalString(), + preDepositAmount.toDecimalString(9), ") \"vault balance before\");" ) ); @@ -240,7 +240,7 @@ contract OrderBookDepositEnactTest is OrderBookExternalRealTest { string.concat( usingWordsFrom, ":ensure(equal-to(deposit-vault-after() ", - preDepositAmount.add(depositAmount).toDecimalString(), + preDepositAmount.add(depositAmount).toDecimalString(9), ") \"vault balance after\");" ) ); diff --git a/test/concrete/ob/OrderBook.withdraw.entask.t.sol b/test/concrete/ob/OrderBook.withdraw.entask.t.sol index a5b614a311..8d96237355 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(), + depositAmount.toDecimalString(9), ") \"vault before\");" ) ); @@ -385,7 +385,7 @@ contract OrderBookWithdrawEvalTest is OrderBookExternalRealTest { string.concat( usingWordsFrom, ":ensure(equal-to(withdraw-vault-after() ", - depositAmount.sub(withdrawAmount).toDecimalString(), + depositAmount.sub(withdrawAmount).toDecimalString(9), ") \"balance after\");" ) ); @@ -394,7 +394,7 @@ contract OrderBookWithdrawEvalTest is OrderBookExternalRealTest { string.concat( usingWordsFrom, ":ensure(equal-to(withdraw-target-amount() ", - LibFormatDecimalFloat.toDecimalString(targetAmount), + targetAmount.toDecimalString(9), ") \"target amount\");" ) );