diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 1fea637ae9..1e35d2106c 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -86,6 +86,8 @@ jobs: - name: "Install: Foundry" uses: foundry-rs/foundry-toolchain@v1 + with: + version: nightly-c07d504b4ae67754584f4e05ff0c547a43c50f7b - name: 'Install dependencies' run: yarn workspaces focus gear-js @gear-js/api @@ -153,7 +155,7 @@ jobs: if: steps.changed-vara-eth.outputs.any_changed == 'true' uses: foundry-rs/foundry-toolchain@v1 with: - version: v1.5.0-rc1 + version: nightly-c07d504b4ae67754584f4e05ff0c547a43c50f7b - name: 'Install dependencies' if: steps.changed-vara-eth.outputs.any_changed == 'true' diff --git a/apis/vara-eth/CHANGELOG.md b/apis/vara-eth/CHANGELOG.md index 07e9d4b61f..b6a5fa7613 100644 --- a/apis/vara-eth/CHANGELOG.md +++ b/apis/vara-eth/CHANGELOG.md @@ -4,6 +4,21 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). +## [0.3.1] + +### Added + +- `RouterClient.requestCodeValidation()` method (previously private and unimplemented) for uploading Wasm program code as an EIP-7594 blob transaction (https://github.com/gear-tech/gear-js/pull/2405) +- EIP-7594 multi-blob encoding via `simpleSidecarEncode()` — replaces the old single-blob `prepareBlob()` and correctly encodes arbitrary-length data across multiple blobs following the Simple Sidecar Encoding format (https://github.com/gear-tech/gear-js/pull/2405) +- `computeCellsAndKzgProofs` KZG hook required by EIP-7594 (https://github.com/gear-tech/gear-js/pull/2405) + +### Changed + +- Peer dependency `viem` switched from `^2.39.0` to `@vara-eth/viem@2.47.7-1` — a temporary fork at https://github.com/StackOverflowExcept1on/viem/tree/feat/eip-7594-support-for-blob-txs that adds EIP-7594 blob transaction support not yet available upstream; will revert to the official package once merged (https://github.com/gear-tech/gear-js/pull/2405) +- `requestCodeValidation` blob transactions now use `blobVersion: '7594'` (EIP-7594) instead of the standard EIP-4844 format (https://github.com/gear-tech/gear-js/pull/2405) +- `maxFeePerBlobGas` is now derived dynamically from `getFeeHistory` (3× the latest base fee) instead of the previous hardcoded value (https://github.com/gear-tech/gear-js/pull/2405) +- Gas limit for code validation transactions is now estimated via `estimateGas` instead of a hardcoded value (https://github.com/gear-tech/gear-js/pull/2405) + ## [0.3.0] ### Added diff --git a/apis/vara-eth/Cargo.lock b/apis/vara-eth/Cargo.lock index 7c0b232ee5..bc5b044c64 100644 --- a/apis/vara-eth/Cargo.lock +++ b/apis/vara-eth/Cargo.lock @@ -89,6 +89,7 @@ dependencies = [ "const-hex", "derive_more 2.1.1", "foldhash 0.2.0", + "hashbrown 0.16.1", "indexmap", "itoa", "k256", @@ -680,6 +681,9 @@ name = "bytes" version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" +dependencies = [ + "serde", +] [[package]] name = "camino" @@ -881,14 +885,14 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "counter" -version = "0.0.1" +version = "0.1.0" dependencies = [ "sails-rs", ] [[package]] name = "counter-idl" -version = "0.0.1" +version = "0.1.0" dependencies = [ "counter", "sails-rs", @@ -1423,7 +1427,7 @@ dependencies = [ [[package]] name = "ethexe-common" version = "1.10.0" -source = "git+https://github.com/gear-tech/gear#ce5cfd53e0e1b13eedbb0cc18b1561d3fa0c212b" +source = "git+https://github.com/gear-tech/gear#e82ef2dff7df95127d1a2cc0a728076a8392a1f9" dependencies = [ "alloy-primitives", "anyhow", @@ -1765,7 +1769,7 @@ dependencies = [ [[package]] name = "gear-core" version = "1.10.0" -source = "git+https://github.com/gear-tech/gear#ce5cfd53e0e1b13eedbb0cc18b1561d3fa0c212b" +source = "git+https://github.com/gear-tech/gear#e82ef2dff7df95127d1a2cc0a728076a8392a1f9" dependencies = [ "blake2", "bytemuck", @@ -1809,7 +1813,7 @@ dependencies = [ [[package]] name = "gear-core-errors" version = "1.10.0" -source = "git+https://github.com/gear-tech/gear#ce5cfd53e0e1b13eedbb0cc18b1561d3fa0c212b" +source = "git+https://github.com/gear-tech/gear#e82ef2dff7df95127d1a2cc0a728076a8392a1f9" dependencies = [ "enum-iterator", "gear-workspace-hack", @@ -1848,7 +1852,7 @@ dependencies = [ [[package]] name = "gear-ss58" version = "1.10.0" -source = "git+https://github.com/gear-tech/gear#ce5cfd53e0e1b13eedbb0cc18b1561d3fa0c212b" +source = "git+https://github.com/gear-tech/gear#e82ef2dff7df95127d1a2cc0a728076a8392a1f9" dependencies = [ "blake2", "bs58", @@ -1899,7 +1903,7 @@ dependencies = [ [[package]] name = "gear-wasm-instrument" version = "1.10.0" -source = "git+https://github.com/gear-tech/gear#ce5cfd53e0e1b13eedbb0cc18b1561d3fa0c212b" +source = "git+https://github.com/gear-tech/gear#e82ef2dff7df95127d1a2cc0a728076a8392a1f9" dependencies = [ "derive_more 2.1.1", "enum-iterator", @@ -2017,7 +2021,7 @@ dependencies = [ [[package]] name = "gprimitives" version = "1.10.0" -source = "git+https://github.com/gear-tech/gear#ce5cfd53e0e1b13eedbb0cc18b1561d3fa0c212b" +source = "git+https://github.com/gear-tech/gear#e82ef2dff7df95127d1a2cc0a728076a8392a1f9" dependencies = [ "bytemuck", "derive_more 2.1.1", @@ -2046,7 +2050,7 @@ dependencies = [ [[package]] name = "gsigner" version = "1.10.0" -source = "git+https://github.com/gear-tech/gear#ce5cfd53e0e1b13eedbb0cc18b1561d3fa0c212b" +source = "git+https://github.com/gear-tech/gear#e82ef2dff7df95127d1a2cc0a728076a8392a1f9" dependencies = [ "alloy-primitives", "anyhow", @@ -2119,7 +2123,7 @@ dependencies = [ [[package]] name = "gsys" version = "1.10.0" -source = "git+https://github.com/gear-tech/gear#ce5cfd53e0e1b13eedbb0cc18b1561d3fa0c212b" +source = "git+https://github.com/gear-tech/gear#e82ef2dff7df95127d1a2cc0a728076a8392a1f9" dependencies = [ "bytemuck", "gear-workspace-hack", @@ -2198,6 +2202,11 @@ name = "hashbrown" version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" +dependencies = [ + "foldhash 0.2.0", + "serde", + "serde_core", +] [[package]] name = "heapless" @@ -2460,7 +2469,7 @@ dependencies = [ [[package]] name = "injected" -version = "0.0.1" +version = "0.1.0" dependencies = [ "ethexe-common", "gear-core 1.10.0 (git+https://github.com/gear-tech/gear)", @@ -2840,7 +2849,7 @@ dependencies = [ [[package]] name = "numerated" version = "1.10.0" -source = "git+https://github.com/gear-tech/gear#ce5cfd53e0e1b13eedbb0cc18b1561d3fa0c212b" +source = "git+https://github.com/gear-tech/gear#e82ef2dff7df95127d1a2cc0a728076a8392a1f9" dependencies = [ "derive_more 2.1.1", "gear-workspace-hack", @@ -3296,6 +3305,7 @@ checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" dependencies = [ "rand_chacha 0.9.0", "rand_core 0.9.5", + "serde", ] [[package]] @@ -3334,6 +3344,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" dependencies = [ "getrandom 0.3.4", + "serde", ] [[package]] diff --git a/apis/vara-eth/Cargo.toml b/apis/vara-eth/Cargo.toml index da44d9ee36..1a5596041d 100644 --- a/apis/vara-eth/Cargo.toml +++ b/apis/vara-eth/Cargo.toml @@ -1,5 +1,5 @@ [workspace.package] -version = "0.0.1" +version = "0.1.0" authors = ["Gear Technologies"] edition = "2024" license = "GPL-3.0" diff --git a/apis/vara-eth/README.md b/apis/vara-eth/README.md index 43865cbd7b..ca824d67c3 100644 --- a/apis/vara-eth/README.md +++ b/apis/vara-eth/README.md @@ -46,9 +46,11 @@ npm install @vara-eth/api Install required peer dependencies: ```bash -npm install viem@^2.39.0 kzg-wasm@1.0.0 +npm install viem@npm:@vara-eth/viem@2.47.7-1 kzg-wasm@1.0.0 ``` +> **Note:** `@vara-eth/viem` is a temporary fork of [viem](https://viem.sh) that adds support for [EIP-7594](https://eips.ethereum.org/EIPS/eip-7594), which is not yet available in the upstream package. Once EIP-7594 support lands in the official viem release, this library will switch back to the original package. + ## Quick Start ```typescript diff --git a/apis/vara-eth/contracts/Counter.sol b/apis/vara-eth/contracts/Counter.sol index 45d37e95d8..2f69a62c9b 100644 --- a/apis/vara-eth/contracts/Counter.sol +++ b/apis/vara-eth/contracts/Counter.sol @@ -53,7 +53,7 @@ contract CounterCaller is ICounterCallbacks { _; } - function _onlyVaraEthProgram() internal { + function _onlyVaraEthProgram() internal view { if (msg.sender != address(VAR_ETH_PROGRAM)) { revert UnauthorizedCaller(); } diff --git a/apis/vara-eth/package.json b/apis/vara-eth/package.json index 4ce6e2d158..fd3fee5a79 100644 --- a/apis/vara-eth/package.json +++ b/apis/vara-eth/package.json @@ -1,6 +1,6 @@ { "name": "@vara-eth/api", - "version": "0.3.0", + "version": "0.3.1", "description": "Typescript library for interacting with Vara.Eth network", "repository": { "type": "git", @@ -39,12 +39,12 @@ }, "peerDependencies": { "kzg-wasm": "1.0.0", - "viem": "^2.39.0" + "viem": "*" }, "devDependencies": { "@types/ws": "8.18.1", "kzg-wasm": "1.0.0", - "viem": "2.47.4", + "viem": "npm:@vara-eth/viem@2.47.7-1", "ws": "8.18.3" }, "files": [ diff --git a/apis/vara-eth/programs/injected/src/main.rs b/apis/vara-eth/programs/injected/src/main.rs index 2a21d9c5c6..dcd91a7f81 100644 --- a/apis/vara-eth/programs/injected/src/main.rs +++ b/apis/vara-eth/programs/injected/src/main.rs @@ -1,8 +1,8 @@ use ethexe_common::{ + ToDigest, ecdsa::{PrivateKey, Signature, SignedMessage}, gprimitives::{ActorId, H256}, injected::{InjectedTransaction, Promise}, - ToDigest, }; use gear_core::rpc::ReplyInfo; use gear_core_errors::{ReplyCode, SuccessReplyReason}; @@ -15,10 +15,10 @@ pub fn main() { let tx = InjectedTransaction { destination: ActorId::zero(), - payload: Vec::from([0, 1, 2]).into(), + payload: Vec::from([0, 1, 2]).try_into().unwrap(), value: 256, reference_block: H256::zero(), - salt: Vec::from([3, 4, 5]).into(), + salt: Vec::from([3, 4, 5]).try_into().unwrap(), }; println!("hash: <{:?}>", tx.to_digest()); diff --git a/apis/vara-eth/src/eth/router.ts b/apis/vara-eth/src/eth/router.ts index f8213b371e..7e5e39914a 100644 --- a/apis/vara-eth/src/eth/router.ts +++ b/apis/vara-eth/src/eth/router.ts @@ -1,5 +1,5 @@ import type { Address, Hex, TransactionRequest } from 'viem'; -import { toHex, zeroAddress, numberToBytes, hexToBytes, bytesToHex, encodeFunctionData } from 'viem'; +import { toHex, zeroAddress, hexToBytes, bytesToHex, encodeFunctionData } from 'viem'; import { randomBytes } from '@noble/hashes/utils'; import { loadKZG } from 'kzg-wasm'; @@ -225,8 +225,7 @@ export class RouterClient extends BaseContractClient implements IRouterContract * @returns A transaction manager with validation-specific helper functions, including * the code ID and a function to wait for the code to be validated */ - private async requestCodeValidation(code: Uint8Array): Promise> { - throw new Error('Not implemented'); + public async requestCodeValidation(code: Uint8Array): Promise> { const codeId = generateCodeHash(code); const data = encodeFunctionData({ @@ -235,21 +234,29 @@ export class RouterClient extends BaseContractClient implements IRouterContract args: [codeId], }); - const blob = prepareBlob(code); + const blobs = simpleSidecarEncode(code); + const kzg = await loadKZG(); - if (blob.length != 4096 * 32) { - throw new Error('Invalid blob size'); - } + const feeHistory = await this._pc.getFeeHistory({ + blockCount: 2, + rewardPercentiles: [], + blockTag: 'latest', + }); - const kzg = await loadKZG(); + const baseFeePerBlobGas = (feeHistory.baseFeePerBlobGas ?? []).at(-1); + if (!baseFeePerBlobGas) { + throw new Error('Failed to get baseFeePerBlobGas'); + } + const maxFeePerBlobGas = baseFeePerBlobGas * 3n; const tx = { type: 'eip4844' as const, + blobVersion: '7594' as const, data, to: this.address, - gas: 5_000_000n, - maxFeePerBlobGas: 400_000_000_000n, - blobs: [blob], + gas: 100_000n, + maxFeePerBlobGas, + blobs, kzg: { blobToKzgCommitment: (blob: Uint8Array) => { const result = kzg.blobToKZGCommitment(bytesToHex(blob)) as Hex; @@ -259,13 +266,17 @@ export class RouterClient extends BaseContractClient implements IRouterContract const result = kzg.computeBlobKZGProof(bytesToHex(blob), bytesToHex(commitment)) as Hex; return hexToBytes(result); }, + computeCellsAndKzgProofs: (blob: Uint8Array): [Uint8Array[], Uint8Array[]] => { + const [cells, proofs] = kzg.computeCellsAndProofs(bytesToHex(blob)) as [Hex[], Hex[]]; + return [cells.map((cell) => hexToBytes(cell)), proofs.map((proof) => hexToBytes(proof))]; + }, }, chain: null, }; - const request = await this._pc.prepareTransactionRequest(tx); + tx.gas = await this._pc.estimateGas(tx); - console.log(request); + await this._pc.prepareTransactionRequest(tx); const txManager: ITxManager = new TxManager(this._pc, this._signer!, tx, IROUTER_ABI, undefined, { codeId, @@ -381,25 +392,49 @@ export function getRouterClient(params: ContractClientParams): RouterClient { return new RouterClient(params); } -function prepareBlob(data: Uint8Array) { - // https://docs.rs/alloy/latest/alloy/consensus/struct.SimpleCoder.html#behavior - const BLOB_SIZE = 131_072; - const paddedData = new Uint8Array(BLOB_SIZE); - - const dataLength = numberToBytes(data.length, { size: 32 }); - const length = new Uint8Array(32); - length.set(dataLength, 0); - - paddedData.set(length, 0); - - let offset = 32; - - while (data.length > 0) { - const chunk = data.slice(0, 31); - paddedData.set(chunk, offset + 1); - offset += 32; - data = data.slice(31); +const BYTES_PER_BLOB = 131_072; +const FIELD_ELEMENTS_PER_BLOB = 4096; +const FE_BYTES = 32; +const USABLE_BYTES_PER_FE = 31; + +function simpleSidecarEncode(data: Uint8Array): Uint8Array[] { + const blobs: Uint8Array[] = []; + let feCount = 0; + + const pushEmptyBlob = () => { + blobs.push(new Uint8Array(BYTES_PER_BLOB)); + }; + + const currentBlob = () => { + const index = Math.floor(feCount / FIELD_ELEMENTS_PER_BLOB); + while (blobs.length <= index) pushEmptyBlob(); + return blobs[index]; + }; + + const feOffsetInCurrentBlob = () => (feCount % FIELD_ELEMENTS_PER_BLOB) * FE_BYTES; + + const ingestFE = (fe: Uint8Array) => { + const blob = currentBlob(); + const offset = feOffsetInCurrentBlob(); + blob.set(fe, offset); + feCount++; + }; + + if (data.length === 0) return blobs; + + const lenFE = new Uint8Array(FE_BYTES); + const lenBytes = new DataView(lenFE.buffer); + lenBytes.setBigUint64(1, BigInt(data.length)); + ingestFE(lenFE); + + let offset = 0; + while (offset < data.length) { + const fe = new Uint8Array(FE_BYTES); + const chunkSize = Math.min(USABLE_BYTES_PER_FE, data.length - offset); + fe.set(data.subarray(offset, offset + chunkSize), 1); + offset += chunkSize; + ingestFE(fe); } - return paddedData; + return blobs; } diff --git a/apis/vara-eth/test/router.test.ts b/apis/vara-eth/test/router.test.ts index b643590e6e..15dfeec625 100644 --- a/apis/vara-eth/test/router.test.ts +++ b/apis/vara-eth/test/router.test.ts @@ -7,15 +7,16 @@ import path from 'path'; import { CodeState, getMirrorClient, getRouterClient, RouterClient, type ITransactionSigner } from '../src'; import { config } from './config'; import { walletClientToSigner } from '../src/signer'; +import { waitNBlocks } from './common'; -// const code = fs.readFileSync(path.join(config.targetDir, 'counter.opt.wasm')); -let codeId: `0x${string}`; +const code = fs.readFileSync(path.join(config.targetDir, 'counter.opt.wasm')); +let codeId: Hex; let publicClient: PublicClient; let walletClient: WalletClient; let signer: ITransactionSigner; let router: RouterClient; -// let codeValidatedPromise: Promise; +let codeValidatedPromise: Promise; beforeAll(async () => { const transport = webSocket(config.wsRpc); @@ -41,24 +42,24 @@ afterAll(async () => { describe('router', () => { describe('upload code', () => { - // test.skip('should request code validation', async () => { - // const tx = await ethereumClient.router.requestCodeValidation(code); - // codeId = tx.codeId; - // const receipt = await tx.sendAndWaitForReceipt(); - // expect(receipt.blockHash).toBeDefined(); - // codeValidatedPromise = tx.waitForCodeGotValidated(); - // }, 60_000); - - // test.skip( - // 'should wait when code got validated', - // async () => { - // expect(await codeValidatedPromise).toBeTruthy(); - // await waitNBlocks(5); - - // console.log(codeId); - // }, - // config.longRunningTestTimeout, - // ); + test('should request code validation', async () => { + const tx = await router.requestCodeValidation(code); + codeId = tx.codeId; + const receipt = await tx.sendAndWaitForReceipt(); + expect(receipt.blockHash).toBeDefined(); + codeValidatedPromise = tx.waitForCodeGotValidated(); + }, 60_000); + + test.skip( + 'should wait when code got validated', + async () => { + expect(await codeValidatedPromise).toBeTruthy(); + await waitNBlocks(5); + + console.log(codeId); + }, + config.longRunningTestTimeout, + ); test('should check that code state is Validated', async () => { expect(await router.codeState(codeId)).toBe(CodeState.Validated); @@ -96,7 +97,7 @@ describe('router', () => { const receipt = await publicClient.waitForTransactionReceipt({ hash: deployHash }); - const contractAddr = receipt.contractAddress?.toLowerCase() as `0x${string}` | undefined; + const contractAddr = receipt.contractAddress?.toLowerCase() as Hex | undefined; if (!contractAddr) { throw new Error('Counter ABI deployment failed'); @@ -231,14 +232,14 @@ describe('router', () => { test('should check if addresses are validators', async () => { const validators = await router.validators(); - const isValid = await router.areValidators(validators as `0x${string}`[]); + const isValid = await router.areValidators(validators as Hex[]); expect(isValid).toBeDefined(); expect(typeof isValid).toBe('boolean'); }); test('should return false for non-validator addresses', async () => { const notValidator = '0x0000000000000000000000000000000000000001'; - const isValid = await router.areValidators([notValidator as `0x${string}`]); + const isValid = await router.areValidators([notValidator as Hex]); expect(isValid).toBe(false); }); diff --git a/apis/vara-eth/test/setup/setup.ts b/apis/vara-eth/test/setup/setup.ts index c0364ff02c..d461912f6e 100644 --- a/apis/vara-eth/test/setup/setup.ts +++ b/apis/vara-eth/test/setup/setup.ts @@ -1,7 +1,7 @@ import * as fs from 'fs'; import { config } from 'dotenv'; import { generateCodeHash } from '../../src/util/hash'; -import { execSync, spawn } from 'child_process'; +import { spawn } from 'child_process'; if (typeof WebSocket === 'undefined') { import('ws').then((module) => { @@ -13,11 +13,7 @@ config({ quiet: true }); const BLOCK_TIME = 1; const COUNTER_CODE = 'target/wasm32-gear/release/counter.opt.wasm'; -const ANVIL_RPC = 'ws://127.0.0.1:8545'; let routerAddress: string; -// Anvil default account #2 address, derived from the default mnemonic: -// "test test test test test test test test test test test junk" -const SENDER_ADDRESS = '0x3c44cdddb6a900fa2b585dd299e03d12fa4293bc'; let keyStore: string; const pathToEthexeBin = process.env.PATH_TO_ETHEXE!; @@ -43,6 +39,10 @@ async function setupVaraEth() { { stdio: 'pipe', detached: true, + env: { + ...process.env, + RUST_LOG: 'debug', + }, }, ); @@ -100,17 +100,8 @@ async function setupVaraEth() { process.env.ROUTER_ADDRESS = routerAddress; } -function uploadCode() { - execSync( - `${pathToEthexeBin} tx --ethereum-rpc ${ANVIL_RPC} --ethereum-router ${routerAddress} --sender ${SENDER_ADDRESS} --key-store "${keyStore}" upload ${COUNTER_CODE} -w`, - { stdio: 'inherit' }, - ); -} - export default async () => { setupCodeId(); await setupVaraEth(); - - uploadCode(); }; diff --git a/idea/gear/faucet/package.json b/idea/gear/faucet/package.json index fc2962800f..a23239bd7f 100644 --- a/idea/gear/faucet/package.json +++ b/idea/gear/faucet/package.json @@ -27,7 +27,7 @@ "reflect-metadata": "0.2.2", "swagger-ui-express": "5.0.1", "typeorm": "0.3.28", - "viem": "^2.40.2", + "viem": "npm:@vara-eth/viem@2.47.7-1", "winston": "3.19.0", "xxhashjs": "0.2.2", "yamljs": "0.3.0" diff --git a/idea/vara-eth/frontend/package.json b/idea/vara-eth/frontend/package.json index 19a4551346..cc502b973c 100644 --- a/idea/vara-eth/frontend/package.json +++ b/idea/vara-eth/frontend/package.json @@ -26,7 +26,7 @@ "react-syntax-highlighter": "15.6.6", "sails-js": "0.5.1", "sails-js-parser": "0.5.1", - "viem": "2.47.4", + "viem": "npm:@vara-eth/viem@2.47.7-1", "wagmi": "2.19.4", "zod": "4.3.6" }, diff --git a/idea/vara-eth/indexer/package.json b/idea/vara-eth/indexer/package.json index 69916e3940..50bd586d6c 100644 --- a/idea/vara-eth/indexer/package.json +++ b/idea/vara-eth/indexer/package.json @@ -36,7 +36,7 @@ "reflect-metadata": "^0.2.2", "rxjs": "^7.8.2", "typeorm": "0.3.28", - "viem": "2.47.4", + "viem": "npm:@vara-eth/viem@2.47.7-1", "xxhash-addon": "^2.0.3" }, "devDependencies": { diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 9e0a4d7840..5bc1bb0b75 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] -channel = "1.91" +channel = "stable" targets = ["wasm32-unknown-unknown", "wasm32v1-none"] components = ["rustfmt", "clippy", "rust-src", "llvm-tools"] diff --git a/yarn.lock b/yarn.lock index b0b331a31a..5922e3bfb3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10429,11 +10429,11 @@ __metadata: "@noble/hashes": "npm:1.8.0" "@types/ws": "npm:8.18.1" kzg-wasm: "npm:1.0.0" - viem: "npm:2.47.4" + viem: "npm:@vara-eth/viem@2.47.7-1" ws: "npm:8.18.3" peerDependencies: kzg-wasm: 1.0.0 - viem: ^2.39.0 + viem: "*" languageName: unknown linkType: soft @@ -16271,7 +16271,7 @@ __metadata: supertest: "npm:^7.1.4" swagger-ui-express: "npm:5.0.1" typeorm: "npm:0.3.28" - viem: "npm:^2.40.2" + viem: "npm:@vara-eth/viem@2.47.7-1" winston: "npm:3.19.0" xxhashjs: "npm:0.2.2" yamljs: "npm:0.3.0" @@ -20844,6 +20844,27 @@ __metadata: languageName: node linkType: hard +"ox@npm:0.14.7": + version: 0.14.7 + resolution: "ox@npm:0.14.7" + dependencies: + "@adraffy/ens-normalize": "npm:^1.11.0" + "@noble/ciphers": "npm:^1.3.0" + "@noble/curves": "npm:1.9.1" + "@noble/hashes": "npm:^1.8.0" + "@scure/bip32": "npm:^1.7.0" + "@scure/bip39": "npm:^1.6.0" + abitype: "npm:^1.2.3" + eventemitter3: "npm:5.0.1" + peerDependencies: + typescript: ">=5.4.0" + peerDependenciesMeta: + typescript: + optional: true + checksum: 10c0/c4bc216b4e689a0d4e6d6640be30bcc7e82209e4d69c1dd2d2c10c6b3b709f658c6b3e7ebe68e590602d6b0ef15785090d890b75cc7e67a094fe50d84778b9f9 + languageName: node + linkType: hard + "ox@npm:0.6.7": version: 0.6.7 resolution: "ox@npm:0.6.7" @@ -25746,7 +25767,7 @@ __metadata: react-syntax-highlighter: "npm:15.6.6" sails-js: "npm:0.5.1" sails-js-parser: "npm:0.5.1" - viem: "npm:2.47.4" + viem: "npm:@vara-eth/viem@2.47.7-1" wagmi: "npm:2.19.4" zod: "npm:4.3.6" languageName: unknown @@ -25780,7 +25801,7 @@ __metadata: reflect-metadata: "npm:^0.2.2" rxjs: "npm:^7.8.2" typeorm: "npm:0.3.28" - viem: "npm:2.47.4" + viem: "npm:@vara-eth/viem@2.47.7-1" xxhash-addon: "npm:^2.0.3" languageName: unknown linkType: soft @@ -25813,7 +25834,7 @@ __metadata: languageName: node linkType: hard -"viem@npm:2.47.4, viem@npm:>=2.29.0, viem@npm:>=2.45.0, viem@npm:^2.1.1, viem@npm:^2.21.26, viem@npm:^2.27.2, viem@npm:^2.31.7, viem@npm:^2.40.2": +"viem@npm:>=2.29.0, viem@npm:>=2.45.0, viem@npm:^2.1.1, viem@npm:^2.21.26, viem@npm:^2.27.2, viem@npm:^2.31.7": version: 2.47.4 resolution: "viem@npm:2.47.4" dependencies: @@ -25834,6 +25855,27 @@ __metadata: languageName: node linkType: hard +"viem@npm:@vara-eth/viem@2.47.7-1": + version: 2.47.7-1 + resolution: "@vara-eth/viem@npm:2.47.7-1" + dependencies: + "@noble/curves": "npm:1.9.1" + "@noble/hashes": "npm:1.8.0" + "@scure/bip32": "npm:1.7.0" + "@scure/bip39": "npm:1.6.0" + abitype: "npm:1.2.3" + isows: "npm:1.0.7" + ox: "npm:0.14.7" + ws: "npm:8.18.3" + peerDependencies: + typescript: ">=5.0.4" + peerDependenciesMeta: + typescript: + optional: true + checksum: 10c0/52ee49f8aaebcf80d38384ba887f820f589f7e210eae24438ba4d89fdd50049659eaa6c3be025ab53a94ff9cdedf9abbaec41ed5f23f5e9497df5626b3b0b4d2 + languageName: node + linkType: hard + "vite-plugin-checker@npm:0.12.0": version: 0.12.0 resolution: "vite-plugin-checker@npm:0.12.0"