diff --git a/eth-rpc/.gitignore b/eth-rpc/.gitignore index 82054e2..96ccea9 100644 --- a/eth-rpc/.gitignore +++ b/eth-rpc/.gitignore @@ -18,6 +18,7 @@ abi/* evm/* pvm/* !.gitkeep +src/samples # Editor directories and files .vscode/* diff --git a/eth-rpc/contracts/Errors.sol b/eth-rpc/contracts/Errors.sol index abbdba8..88f7df9 100644 --- a/eth-rpc/contracts/Errors.sol +++ b/eth-rpc/contracts/Errors.sol @@ -2,11 +2,11 @@ pragma solidity ^0.8.0; contract Errors { - bool public state; + bool public state; - // Payable function that can be used to test insufficient funds errors + // Payable function that can be used to test insufficient funds errors function valueMatch(uint256 value) public payable { - require(msg.value == value , "msg.value does not match value"); + require(msg.value == value, 'msg.value does not match value'); } function setState(bool newState) public { @@ -15,7 +15,7 @@ contract Errors { // Trigger a require statement failure with a custom error message function triggerRequireError() public pure { - require(false, "This is a require error"); + require(false, 'This is a require error'); } // Trigger an assert statement failure @@ -25,7 +25,7 @@ contract Errors { // Trigger a revert statement with a custom error message function triggerRevertError() public pure { - revert("This is a revert error"); + revert('This is a revert error'); } // Trigger a division by zero error @@ -45,7 +45,6 @@ contract Errors { error CustomError(string message); function triggerCustomError() public pure { - revert CustomError("This is a custom error"); + revert CustomError('This is a custom error'); } } - diff --git a/eth-rpc/contracts/Event.sol b/eth-rpc/contracts/Event.sol index 1e4ce7c..7a6207b 100644 --- a/eth-rpc/contracts/Event.sol +++ b/eth-rpc/contracts/Event.sol @@ -6,8 +6,7 @@ contract EventExample { function triggerEvent() public { uint256 value = 12345; - string memory message = "Hello world"; + string memory message = 'Hello world'; emit ExampleEvent(msg.sender, value, message); } } - diff --git a/eth-rpc/contracts/Flipper.sol b/eth-rpc/contracts/Flipper.sol index 3dc8e12..9566af6 100644 --- a/eth-rpc/contracts/Flipper.sol +++ b/eth-rpc/contracts/Flipper.sol @@ -36,4 +36,3 @@ contract FlipperCaller { return Flipper(flipperAddress).getValue(); } } - diff --git a/eth-rpc/contracts/PiggyBank.sol b/eth-rpc/contracts/PiggyBank.sol index 13a003b..c50f551 100644 --- a/eth-rpc/contracts/PiggyBank.sol +++ b/eth-rpc/contracts/PiggyBank.sol @@ -2,7 +2,6 @@ pragma solidity ^0.8.0; contract PiggyBank { - uint256 private balance; address public owner; @@ -20,13 +19,14 @@ contract PiggyBank { return balance; } - function withdraw(uint256 withdrawAmount) public returns (uint256 remainingBal) { - require(msg.sender == owner, "You are not the owner"); + function withdraw( + uint256 withdrawAmount + ) public returns (uint256 remainingBal) { + require(msg.sender == owner, 'You are not the owner'); balance -= withdrawAmount; - (bool success, ) = payable(msg.sender).call{value: withdrawAmount}(""); - require(success, "Transfer failed"); + (bool success, ) = payable(msg.sender).call{value: withdrawAmount}(''); + require(success, 'Transfer failed'); return balance; } } - diff --git a/eth-rpc/contracts/Pretrace.sol b/eth-rpc/contracts/Pretrace.sol new file mode 100644 index 0000000..29b8bce --- /dev/null +++ b/eth-rpc/contracts/Pretrace.sol @@ -0,0 +1,69 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +/// @title PretraceFixture +/// @notice A simple contract to exercise storage, balance, and nonce changes +contract PretraceFixture { + uint256 public value; + mapping(address => uint256) public balances; + + constructor() payable { + balances[msg.sender] = msg.value; + value = 42; + } + + function writeStorage(uint256 _value) external { + value = _value; + } + + function readStorage() external view returns (uint256) { + return value; + } + + function deposit() external payable { + balances[msg.sender] += msg.value; + } + + function withdraw(uint256 amount) external { + require(balances[msg.sender] >= amount, 'Insufficient balance'); + balances[msg.sender] -= amount; + (bool sent, ) = msg.sender.call{value: amount}(''); + require(sent, 'Transfer failed'); + } + + function getContractBalance() external view returns (uint256) { + return address(this).balance; + } + + function getExternalBalance( + address account + ) external view returns (uint256) { + return account.balance; + } + + function createChild() external returns (address) { + PretraceFixtureChild c = new PretraceFixtureChild(); + return address(c); + } + + function callContract(address childAddr) external { + PretraceFixtureChild(childAddr).increment(); + } + + function delegatecallContract(address childAddr) external { + (bool success, ) = childAddr.delegatecall( + abi.encodeWithSelector(PretraceFixtureChild.increment.selector) + ); + require(success, "Delegatecall failed"); + }} + +/// @title Child +/// @notice A disposable child contract used to test contract deployment and calls +contract PretraceFixtureChild { + uint256 public value = 1; + + function increment() external { + value += 1; + } + +} diff --git a/eth-rpc/contracts/Redstone.sol b/eth-rpc/contracts/Redstone.sol index a8d2a9b..2020b71 100644 --- a/eth-rpc/contracts/Redstone.sol +++ b/eth-rpc/contracts/Redstone.sol @@ -2,17 +2,22 @@ pragma solidity ^0.8.4; -import "@redstone-finance/evm-connector/contracts/data-services/RapidDemoConsumerBase.sol"; +// TODO restore once https://github.com/paritytech/revive/pull/343 is released +// import '@redstone-finance/evm-connector/contracts/data-services/PrimaryProdDataServiceConsumerBase.sol'; +import './node_modules/@redstone-finance/evm-connector/contracts/data-services/PrimaryProdDataServiceConsumerBase.sol'; -contract ExampleRedstoneShowroom is RapidDemoConsumerBase { - function getPrices() public view returns(uint256[] memory) { - bytes32[] memory dataFeedIds = new bytes32[](6); - dataFeedIds[0] = bytes32("BTC"); - dataFeedIds[1] = bytes32("ETH"); - dataFeedIds[2] = bytes32("BNB"); - dataFeedIds[3] = bytes32("AR"); - dataFeedIds[4] = bytes32("AVAX"); - dataFeedIds[5] = bytes32("CELO"); - return getOracleNumericValuesFromTxMsg(dataFeedIds); - } +contract ExampleRedstoneShowroom is PrimaryProdDataServiceConsumerBase { + function getPrices() public view returns (uint256[] memory) { + bytes32[] memory dataFeedIds = new bytes32[](6); + dataFeedIds[0] = bytes32('BTC'); + dataFeedIds[1] = bytes32('ETH'); + dataFeedIds[2] = bytes32('BNB'); + dataFeedIds[3] = bytes32('AR'); + dataFeedIds[4] = bytes32('AVAX'); + dataFeedIds[5] = bytes32('CELO'); + return getOracleNumericValuesFromTxMsg(dataFeedIds); + } } + + + diff --git a/eth-rpc/contracts/Storage.sol b/eth-rpc/contracts/Storage.sol new file mode 100644 index 0000000..4d6ed2f --- /dev/null +++ b/eth-rpc/contracts/Storage.sol @@ -0,0 +1,30 @@ +// SPDX-License-Identifier: GPL-3.0 + +pragma solidity >=0.8.2 <0.9.0; + +/** + * @title Storage + * @dev Store & retrieve value in a variable + * @custom:dev-run-script ./scripts/deploy_with_ethers.ts + */ +contract Storage { + uint256 public n1; + uint256 public n2; + + constructor() { + n1 = 42; + n2 = 100; + } + + /** + * @dev Store value in variable + * @param num value to store + */ + function write_n1_read_n2(uint256 num) public { + n1 = num + n2; + } + + function write_n2(uint256 num) public { + n2 = num; + } +} diff --git a/eth-rpc/contracts/Tester.sol b/eth-rpc/contracts/Tester.sol index 48ded9b..06e2ab8 100644 --- a/eth-rpc/contracts/Tester.sol +++ b/eth-rpc/contracts/Tester.sol @@ -11,7 +11,7 @@ contract Tester { constructor() payable { emit TesterDeployed(msg.sender); value = 42; - name = "Hello world"; + name = 'Hello world'; } function setValue(uint256 v) external { @@ -21,6 +21,4 @@ contract Tester { function setName(string memory v) external { name = v; } - } - diff --git a/eth-rpc/contracts/Tracing.sol b/eth-rpc/contracts/Tracing.sol index 76c18fc..c35d86a 100644 --- a/eth-rpc/contracts/Tracing.sol +++ b/eth-rpc/contracts/Tracing.sol @@ -2,31 +2,42 @@ pragma solidity ^0.8.0; contract TracingCaller { - event TraceEvent(uint256 value, string message); + event TraceEvent(uint256 value, string message); address payable public callee; - constructor(address payable _callee) payable { - require(_callee != address(0), "Callee address cannot be zero"); + constructor(address payable _callee) payable { + require(_callee != address(0), 'Callee address cannot be zero'); callee = _callee; } function start(uint256 counter) external { if (counter == 0) { - return; + return; } uint256 paymentAmount = 0.01 ether; callee.transfer(paymentAmount); - emit TraceEvent(counter, "before"); - TracingCallee(callee).consumeGas(counter); - emit TraceEvent(counter, "after"); + emit TraceEvent(counter, 'before'); + TracingCallee(callee).consumeGas(counter); + emit TraceEvent(counter, 'after'); - try TracingCallee(callee).failingFunction{value: paymentAmount}() { - } catch { - } + try + TracingCallee(callee).failingFunction{value: paymentAmount}() + {} catch {} + + this.start(counter - 1); + } - this.start(counter - 1); + function create() external returns (address) { + TracingCallee newCallee = new TracingCallee(); + return address(newCallee); + } + + function create2() external returns (address) { + bytes32 salt = bytes32(uint256(0x42)); + TracingCallee newCallee = new TracingCallee{salt: salt}(); + return address(newCallee); } } @@ -34,19 +45,18 @@ contract TracingCallee { event CalleeCalled(uint256 counter); function consumeGas(uint256 counter) external { - // burn some gas + // burn some gas for (uint256 i = 0; i < 10; i++) { - uint256(keccak256(abi.encodePacked(i))); + uint256(keccak256(abi.encodePacked(i))); } emit CalleeCalled(counter); } - function failingFunction() external payable { - require(false, "This function always fails"); + function failingFunction() external payable { + require(false, 'This function always fails'); } - // Enable contract to receive Ether + // Enable contract to receive Ether receive() external payable {} } - diff --git a/eth-rpc/package-lock.json b/eth-rpc/package-lock.json index d98116a..1cccc14 100644 --- a/eth-rpc/package-lock.json +++ b/eth-rpc/package-lock.json @@ -8,16 +8,19 @@ "name": "demo", "version": "0.0.0", "dependencies": { - "@parity/revive": "^0.0.14", - "@redstone-finance/evm-connector": "^0.6.2", + "@parity/resolc": "^0.2.0", + "@redstone-finance/evm-connector": "^0.8.0", + "@redstone-finance/sdk": "^0.8.0", "ethers": "^5.6.9", "prettier": "^3.5.1", "solc": "^0.8.28", - "solhint": "^5.0.5", "viem": "^2.22.4", "vitest": "^3.0.6" }, "devDependencies": { + "prettier": "^3.5.1", + "prettier-plugin-solidity": "^1.4.2", + "solhint": "^5.0.5", "typescript": "^5.7.2" } }, @@ -31,6 +34,7 @@ "version": "7.26.2", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==", + "dev": true, "license": "MIT", "dependencies": { "@babel/helper-validator-identifier": "^7.25.9", @@ -45,6 +49,7 @@ "version": "7.25.9", "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", + "dev": true, "license": "MIT", "engines": { "node": ">=6.9.0" @@ -69,9 +74,9 @@ "license": "MIT" }, "node_modules/@esbuild/aix-ppc64": { - "version": "0.25.0", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.0.tgz", - "integrity": "sha512-O7vun9Sf8DFjH2UtqK8Ku3LkquL9SZL8OLY1T5NZkA34+wG3OQF7cl4Ql8vdNzM6fzBbYfLaiRLIOZ+2FOCgBQ==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.4.tgz", + "integrity": "sha512-1VCICWypeQKhVbE9oW/sJaAmjLxhVqacdkvPLEjwlttjfwENRSClS8EjBz0KzRyFSCPDIkuXW34Je/vk7zdB7Q==", "cpu": [ "ppc64" ], @@ -85,9 +90,9 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.25.0", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.0.tgz", - "integrity": "sha512-PTyWCYYiU0+1eJKmw21lWtC+d08JDZPQ5g+kFyxP0V+es6VPPSUhM6zk8iImp2jbV6GwjX4pap0JFbUQN65X1g==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.4.tgz", + "integrity": "sha512-QNdQEps7DfFwE3hXiU4BZeOV68HHzYwGd0Nthhd3uCkkEKK7/R6MTgM0P7H7FAs5pU/DIWsviMmEGxEoxIZ+ZQ==", "cpu": [ "arm" ], @@ -101,9 +106,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.25.0", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.0.tgz", - "integrity": "sha512-grvv8WncGjDSyUBjN9yHXNt+cq0snxXbDxy5pJtzMKGmmpPxeAmAhWxXI+01lU5rwZomDgD3kJwulEnhTRUd6g==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.4.tgz", + "integrity": "sha512-bBy69pgfhMGtCnwpC/x5QhfxAz/cBgQ9enbtwjf6V9lnPI/hMyT9iWpR1arm0l3kttTr4L0KSLpKmLp/ilKS9A==", "cpu": [ "arm64" ], @@ -117,9 +122,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.25.0", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.0.tgz", - "integrity": "sha512-m/ix7SfKG5buCnxasr52+LI78SQ+wgdENi9CqyCXwjVR2X4Jkz+BpC3le3AoBPYTC9NHklwngVXvbJ9/Akhrfg==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.4.tgz", + "integrity": "sha512-TVhdVtQIFuVpIIR282btcGC2oGQoSfZfmBdTip2anCaVYcqWlZXGcdcKIUklfX2wj0JklNYgz39OBqh2cqXvcQ==", "cpu": [ "x64" ], @@ -133,9 +138,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.25.0", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.0.tgz", - "integrity": "sha512-mVwdUb5SRkPayVadIOI78K7aAnPamoeFR2bT5nszFUZ9P8UpK4ratOdYbZZXYSqPKMHfS1wdHCJk1P1EZpRdvw==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.4.tgz", + "integrity": "sha512-Y1giCfM4nlHDWEfSckMzeWNdQS31BQGs9/rouw6Ub91tkK79aIMTH3q9xHvzH8d0wDru5Ci0kWB8b3up/nl16g==", "cpu": [ "arm64" ], @@ -149,9 +154,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.25.0", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.0.tgz", - "integrity": "sha512-DgDaYsPWFTS4S3nWpFcMn/33ZZwAAeAFKNHNa1QN0rI4pUjgqf0f7ONmXf6d22tqTY+H9FNdgeaAa+YIFUn2Rg==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.4.tgz", + "integrity": "sha512-CJsry8ZGM5VFVeyUYB3cdKpd/H69PYez4eJh1W/t38vzutdjEjtP7hB6eLKBoOdxcAlCtEYHzQ/PJ/oU9I4u0A==", "cpu": [ "x64" ], @@ -165,9 +170,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.25.0", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.0.tgz", - "integrity": "sha512-VN4ocxy6dxefN1MepBx/iD1dH5K8qNtNe227I0mnTRjry8tj5MRk4zprLEdG8WPyAPb93/e4pSgi1SoHdgOa4w==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.4.tgz", + "integrity": "sha512-yYq+39NlTRzU2XmoPW4l5Ifpl9fqSk0nAJYM/V/WUGPEFfek1epLHJIkTQM6bBs1swApjO5nWgvr843g6TjxuQ==", "cpu": [ "arm64" ], @@ -181,9 +186,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.25.0", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.0.tgz", - "integrity": "sha512-mrSgt7lCh07FY+hDD1TxiTyIHyttn6vnjesnPoVDNmDfOmggTLXRv8Id5fNZey1gl/V2dyVK1VXXqVsQIiAk+A==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.4.tgz", + "integrity": "sha512-0FgvOJ6UUMflsHSPLzdfDnnBBVoCDtBTVyn/MrWloUNvq/5SFmh13l3dvgRPkDihRxb77Y17MbqbCAa2strMQQ==", "cpu": [ "x64" ], @@ -197,9 +202,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.25.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.0.tgz", - "integrity": "sha512-vkB3IYj2IDo3g9xX7HqhPYxVkNQe8qTK55fraQyTzTX/fxaDtXiEnavv9geOsonh2Fd2RMB+i5cbhu2zMNWJwg==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.4.tgz", + "integrity": "sha512-kro4c0P85GMfFYqW4TWOpvmF8rFShbWGnrLqlzp4X1TNWjRY3JMYUfDCtOxPKOIY8B0WC8HN51hGP4I4hz4AaQ==", "cpu": [ "arm" ], @@ -213,9 +218,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.25.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.0.tgz", - "integrity": "sha512-9QAQjTWNDM/Vk2bgBl17yWuZxZNQIF0OUUuPZRKoDtqF2k4EtYbpyiG5/Dk7nqeK6kIJWPYldkOcBqjXjrUlmg==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.4.tgz", + "integrity": "sha512-+89UsQTfXdmjIvZS6nUnOOLoXnkUTB9hR5QAeLrQdzOSWZvNSAXAtcRDHWtqAUtAmv7ZM1WPOOeSxDzzzMogiQ==", "cpu": [ "arm64" ], @@ -229,9 +234,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.25.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.0.tgz", - "integrity": "sha512-43ET5bHbphBegyeqLb7I1eYn2P/JYGNmzzdidq/w0T8E2SsYL1U6un2NFROFRg1JZLTzdCoRomg8Rvf9M6W6Gg==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.4.tgz", + "integrity": "sha512-yTEjoapy8UP3rv8dB0ip3AfMpRbyhSN3+hY8mo/i4QXFeDxmiYbEKp3ZRjBKcOP862Ua4b1PDfwlvbuwY7hIGQ==", "cpu": [ "ia32" ], @@ -245,9 +250,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.25.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.0.tgz", - "integrity": "sha512-fC95c/xyNFueMhClxJmeRIj2yrSMdDfmqJnyOY4ZqsALkDrrKJfIg5NTMSzVBr5YW1jf+l7/cndBfP3MSDpoHw==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.4.tgz", + "integrity": "sha512-NeqqYkrcGzFwi6CGRGNMOjWGGSYOpqwCjS9fvaUlX5s3zwOtn1qwg1s2iE2svBe4Q/YOG1q6875lcAoQK/F4VA==", "cpu": [ "loong64" ], @@ -261,9 +266,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.25.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.0.tgz", - "integrity": "sha512-nkAMFju7KDW73T1DdH7glcyIptm95a7Le8irTQNO/qtkoyypZAnjchQgooFUDQhNAy4iu08N79W4T4pMBwhPwQ==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.4.tgz", + "integrity": "sha512-IcvTlF9dtLrfL/M8WgNI/qJYBENP3ekgsHbYUIzEzq5XJzzVEV/fXY9WFPfEEXmu3ck2qJP8LG/p3Q8f7Zc2Xg==", "cpu": [ "mips64el" ], @@ -277,9 +282,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.25.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.0.tgz", - "integrity": "sha512-NhyOejdhRGS8Iwv+KKR2zTq2PpysF9XqY+Zk77vQHqNbo/PwZCzB5/h7VGuREZm1fixhs4Q/qWRSi5zmAiO4Fw==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.4.tgz", + "integrity": "sha512-HOy0aLTJTVtoTeGZh4HSXaO6M95qu4k5lJcH4gxv56iaycfz1S8GO/5Jh6X4Y1YiI0h7cRyLi+HixMR+88swag==", "cpu": [ "ppc64" ], @@ -293,9 +298,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.25.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.0.tgz", - "integrity": "sha512-5S/rbP5OY+GHLC5qXp1y/Mx//e92L1YDqkiBbO9TQOvuFXM+iDqUNG5XopAnXoRH3FjIUDkeGcY1cgNvnXp/kA==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.4.tgz", + "integrity": "sha512-i8JUDAufpz9jOzo4yIShCTcXzS07vEgWzyX3NH2G7LEFVgrLEhjwL3ajFE4fZI3I4ZgiM7JH3GQ7ReObROvSUA==", "cpu": [ "riscv64" ], @@ -309,9 +314,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.25.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.0.tgz", - "integrity": "sha512-XM2BFsEBz0Fw37V0zU4CXfcfuACMrppsMFKdYY2WuTS3yi8O1nFOhil/xhKTmE1nPmVyvQJjJivgDT+xh8pXJA==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.4.tgz", + "integrity": "sha512-jFnu+6UbLlzIjPQpWCNh5QtrcNfMLjgIavnwPQAfoGx4q17ocOU9MsQ2QVvFxwQoWpZT8DvTLooTvmOQXkO51g==", "cpu": [ "s390x" ], @@ -325,9 +330,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.25.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.0.tgz", - "integrity": "sha512-9yl91rHw/cpwMCNytUDxwj2XjFpxML0y9HAOH9pNVQDpQrBxHy01Dx+vaMu0N1CKa/RzBD2hB4u//nfc+Sd3Cw==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.4.tgz", + "integrity": "sha512-6e0cvXwzOnVWJHq+mskP8DNSrKBr1bULBvnFLpc1KY+d+irZSgZ02TGse5FsafKS5jg2e4pbvK6TPXaF/A6+CA==", "cpu": [ "x64" ], @@ -341,9 +346,9 @@ } }, "node_modules/@esbuild/netbsd-arm64": { - "version": "0.25.0", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.0.tgz", - "integrity": "sha512-RuG4PSMPFfrkH6UwCAqBzauBWTygTvb1nxWasEJooGSJ/NwRw7b2HOwyRTQIU97Hq37l3npXoZGYMy3b3xYvPw==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.4.tgz", + "integrity": "sha512-vUnkBYxZW4hL/ie91hSqaSNjulOnYXE1VSLusnvHg2u3jewJBz3YzB9+oCw8DABeVqZGg94t9tyZFoHma8gWZQ==", "cpu": [ "arm64" ], @@ -357,9 +362,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.25.0", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.0.tgz", - "integrity": "sha512-jl+qisSB5jk01N5f7sPCsBENCOlPiS/xptD5yxOx2oqQfyourJwIKLRA2yqWdifj3owQZCL2sn6o08dBzZGQzA==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.4.tgz", + "integrity": "sha512-XAg8pIQn5CzhOB8odIcAm42QsOfa98SBeKUdo4xa8OvX8LbMZqEtgeWE9P/Wxt7MlG2QqvjGths+nq48TrUiKw==", "cpu": [ "x64" ], @@ -373,9 +378,9 @@ } }, "node_modules/@esbuild/openbsd-arm64": { - "version": "0.25.0", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.0.tgz", - "integrity": "sha512-21sUNbq2r84YE+SJDfaQRvdgznTD8Xc0oc3p3iW/a1EVWeNj/SdUCbm5U0itZPQYRuRTW20fPMWMpcrciH2EJw==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.4.tgz", + "integrity": "sha512-Ct2WcFEANlFDtp1nVAXSNBPDxyU+j7+tId//iHXU2f/lN5AmO4zLyhDcpR5Cz1r08mVxzt3Jpyt4PmXQ1O6+7A==", "cpu": [ "arm64" ], @@ -389,9 +394,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.25.0", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.0.tgz", - "integrity": "sha512-2gwwriSMPcCFRlPlKx3zLQhfN/2WjJ2NSlg5TKLQOJdV0mSxIcYNTMhk3H3ulL/cak+Xj0lY1Ym9ysDV1igceg==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.4.tgz", + "integrity": "sha512-xAGGhyOQ9Otm1Xu8NT1ifGLnA6M3sJxZ6ixylb+vIUVzvvd6GOALpwQrYrtlPouMqd/vSbgehz6HaVk4+7Afhw==", "cpu": [ "x64" ], @@ -405,9 +410,9 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.25.0", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.0.tgz", - "integrity": "sha512-bxI7ThgLzPrPz484/S9jLlvUAHYMzy6I0XiU1ZMeAEOBcS0VePBFxh1JjTQt3Xiat5b6Oh4x7UC7IwKQKIJRIg==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.4.tgz", + "integrity": "sha512-Mw+tzy4pp6wZEK0+Lwr76pWLjrtjmJyUB23tHKqEDP74R3q95luY/bXqXZeYl4NYlvwOqoRKlInQialgCKy67Q==", "cpu": [ "x64" ], @@ -421,9 +426,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.25.0", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.0.tgz", - "integrity": "sha512-ZUAc2YK6JW89xTbXvftxdnYy3m4iHIkDtK3CLce8wg8M2L+YZhIvO1DKpxrd0Yr59AeNNkTiic9YLf6FTtXWMw==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.4.tgz", + "integrity": "sha512-AVUP428VQTSddguz9dO9ngb+E5aScyg7nOeJDrF1HPYu555gmza3bDGMPhmVXL8svDSoqPCsCPjb265yG/kLKQ==", "cpu": [ "arm64" ], @@ -437,9 +442,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.25.0", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.0.tgz", - "integrity": "sha512-eSNxISBu8XweVEWG31/JzjkIGbGIJN/TrRoiSVZwZ6pkC6VX4Im/WV2cz559/TXLcYbcrDN8JtKgd9DJVIo8GA==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.4.tgz", + "integrity": "sha512-i1sW+1i+oWvQzSgfRcxxG2k4I9n3O9NRqy8U+uugaT2Dy7kLO9Y7wI72haOahxceMX8hZAzgGou1FhndRldxRg==", "cpu": [ "ia32" ], @@ -453,9 +458,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.25.0", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.0.tgz", - "integrity": "sha512-ZENoHJBxA20C2zFzh6AI4fT6RraMzjYw4xKWemRTRmRVtN9c5DcH9r/f2ihEkMjOW5eGgrwCslG/+Y/3bL+DHQ==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.4.tgz", + "integrity": "sha512-nOT2vZNw6hJ+z43oP1SPea/G/6AbN6X+bGNhNuq8NtRHy4wsMhw765IKLNmnjek7GvjWBYQ8Q5VBoYTFg9y1UQ==", "cpu": [ "x64" ], @@ -1259,15 +1264,29 @@ "integrity": "sha512-z0zMCjyhhp4y7XKAcDAi3Vgms4T2PstwBdahiO0+9NaGICQKjynK3wduSRplTgk4LXmoO1yfDGO5RbjKYxtuxA==", "license": "MIT" }, - "node_modules/@parity/revive": { - "version": "0.0.14", - "resolved": "https://registry.npmjs.org/@parity/revive/-/revive-0.0.14.tgz", - "integrity": "sha512-eEIzBNcrTrgB/44zPBvhtGuMvggp1ieF1ie78xVY1l++ybo9iOTDQtddryk6b5vdx1/sMfhVI7ad6Tyl3ksHug==", + "node_modules/@parity/resolc": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@parity/resolc/-/resolc-0.2.0.tgz", + "integrity": "sha512-5IGnWNzLNj/5unM61aIFKUXbvveqMmhiz/tPX0W3w434flDDOwfU5ER8hls1F9o9I79l0N00D83ZTkcWjyJhUQ==", "license": "Apache-2.0", "dependencies": { "@types/node": "^22.9.0", + "commander": "^13.1.0", "package-json": "^10.0.1", - "solc": "^0.8.28" + "resolve-pkg": "^2.0.0", + "solc": ">=0.8.0 <=0.8.30" + }, + "bin": { + "resolc": "dist/bin.js" + } + }, + "node_modules/@parity/resolc/node_modules/commander": { + "version": "13.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-13.1.0.tgz", + "integrity": "sha512-/rFeCpNJQbhSZjGVwO9RFV3xPqbnERS8MmIQzCtD/zl6gpJuV/bMLuN92oG3F7d8oDEHHRrujSXNUr8fpjntKw==", + "license": "MIT", + "engines": { + "node": ">=18" } }, "node_modules/@pnpm/config.env-replace": { @@ -1305,80 +1324,75 @@ "node": ">=12" } }, - "node_modules/@polka/url": { - "version": "1.0.0-next.28", - "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.28.tgz", - "integrity": "sha512-8LduaNlMZGwdZ6qWrKlfa+2M4gahzFkprZiAt2TF8uS0qQgBizKXpXURqvTJ4WtmupWxaLqjRb2UCTe72mu+Aw==", - "license": "MIT", - "optional": true, - "peer": true - }, "node_modules/@redstone-finance/evm-connector": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/@redstone-finance/evm-connector/-/evm-connector-0.6.2.tgz", - "integrity": "sha512-bETkpZuc9huSbPPhJ1FEQNFsNlWMez4KCC/geEZLVBus0odRlaQz5hNEiHQS7B0bNxoaOKkOczF6Uq/YeOnoFA==", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@redstone-finance/evm-connector/-/evm-connector-0.8.0.tgz", + "integrity": "sha512-AXzMhojyJN4OJiYSHyDR0SCuTHL7YPpZuSC/9HHJxXmZLlfbO99VFjqTAfHJY4ip/yRhwrQcHJMLsbN2RWK6QQ==", "license": "MIT", "dependencies": { "@chainlink/contracts": "^0.6.1", "@openzeppelin/contracts": "^4.8.1", - "@redstone-finance/protocol": "0.6.2", - "@redstone-finance/sdk": "0.6.2", - "@redstone-finance/utils": "0.6.2", - "axios": "^1.6.2", + "@redstone-finance/protocol": "0.8.0", + "@redstone-finance/sdk": "0.8.0", + "@redstone-finance/utils": "0.8.0", + "axios": "^1.7.9", "ethers": "^5.7.2" } }, "node_modules/@redstone-finance/oracles-smartweave-contracts": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/@redstone-finance/oracles-smartweave-contracts/-/oracles-smartweave-contracts-0.6.2.tgz", - "integrity": "sha512-lXNPgXDKAOl5uShB/nZ9WUDcLWKuq4OZYumPR6HqckEYHGMULIiI2tB2egZl8SVWcpkBZ5RFs47j9bZ22pkm2g==", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@redstone-finance/oracles-smartweave-contracts/-/oracles-smartweave-contracts-0.8.0.tgz", + "integrity": "sha512-7lRYSIFeOdLkamUNTzGW5oaP07eXZtfa1jnyuloyIFTgEhSKA2JiAAo7tGqAFvI10Z3kdrLPp1XM4AEVxEMlNQ==", "license": "MIT" }, "node_modules/@redstone-finance/protocol": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/@redstone-finance/protocol/-/protocol-0.6.2.tgz", - "integrity": "sha512-s5rQNfrAH4A7aObOMZ4G6w/fhxgjoa2KBKqmw9d7pizl2Edzxp1ctrjeKngSPmBRyZcrXPyTiX2Wpwpze2mqxg==", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@redstone-finance/protocol/-/protocol-0.8.0.tgz", + "integrity": "sha512-QnNjRnMVn8IgGJvPjNet/E5Y0h7+OngqxdboKHBf9DKxmewOdDR/iYFQAfynDafoqUmsTp/+6caAZbhVkBZvYQ==", "license": "MIT", "dependencies": { "decimal.js": "^10.4.3", - "ethers": "^5.7.2" + "ethers": "^5.7.2", + "secp256k1": "^5.0.1" } }, "node_modules/@redstone-finance/sdk": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/@redstone-finance/sdk/-/sdk-0.6.2.tgz", - "integrity": "sha512-c4mXLYGK7k2zo1t+0biitAZbXdIiex2K9zVQMuo/rrBHjUOdVf/CRKRk7DDG1ZyFZNZV2RWo2FGKAMlbTgaSog==", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@redstone-finance/sdk/-/sdk-0.8.0.tgz", + "integrity": "sha512-yVVbIuZFi7u8ROWQ0php3h44z6SB1U6jVNsMxRt/nfq/jy/+CGdTkAfDX5s7CJDzgV8z9apEycLoJCHaPZL0QQ==", "license": "MIT", "dependencies": { "@ethersproject/bytes": "^5.6.1", "@ethersproject/strings": "^5.7.0", - "@redstone-finance/oracles-smartweave-contracts": "0.6.2", - "@redstone-finance/protocol": "0.6.2", - "@redstone-finance/utils": "0.6.2", + "@redstone-finance/oracles-smartweave-contracts": "0.8.0", + "@redstone-finance/protocol": "0.8.0", + "@redstone-finance/utils": "0.8.0", "@types/lodash": "^4.14.195", - "axios": "^1.6.2", + "axios": "^1.7.9", "ethers": "^5.7.2", "lodash": "^4.17.21", "zod": "^3.22.4" } }, "node_modules/@redstone-finance/utils": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/@redstone-finance/utils/-/utils-0.6.2.tgz", - "integrity": "sha512-VRrop0uwgh0jc5QHjbDCO7kdG6qbY7iem6tFBYB2JfdrT5N8re42hdjbdiMoWbXJFqbjmAPvsB4JPPGQhVC6IA==", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@redstone-finance/utils/-/utils-0.8.0.tgz", + "integrity": "sha512-GT+G5gYDQ2tPD9cgnIa3a3m9EK3n2fVJbl7FSfqU4q5aSpMUWFW/CY20L243bb2bz76e151RFq01p6GXn/Cs7Q==", "license": "MIT", "dependencies": { - "axios": "^1.6.2", + "@types/lodash": "^4.14.195", + "axios": "^1.7.9", "consola": "^2.15.3", "decimal.js": "^10.4.3", "ethers": "^5.7.2", + "lodash": "^4.17.21", "zod": "^3.22.4" } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.34.9", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.34.9.tgz", - "integrity": "sha512-qZdlImWXur0CFakn2BJ2znJOdqYZKiedEPEVNTBrpfPjc/YuTGcaYZcdmNFTkUj3DU0ZM/AElcM8Ybww3xVLzA==", + "version": "4.40.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.40.2.tgz", + "integrity": "sha512-JkdNEq+DFxZfUwxvB58tHMHBHVgX23ew41g1OQinthJ+ryhdRk67O31S7sYw8u2lTjHUPFxwar07BBt1KHp/hg==", "cpu": [ "arm" ], @@ -1389,9 +1403,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.34.9", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.34.9.tgz", - "integrity": "sha512-4KW7P53h6HtJf5Y608T1ISKvNIYLWRKMvfnG0c44M6In4DQVU58HZFEVhWINDZKp7FZps98G3gxwC1sb0wXUUg==", + "version": "4.40.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.40.2.tgz", + "integrity": "sha512-13unNoZ8NzUmnndhPTkWPWbX3vtHodYmy+I9kuLxN+F+l+x3LdVF7UCu8TWVMt1POHLh6oDHhnOA04n8oJZhBw==", "cpu": [ "arm64" ], @@ -1402,9 +1416,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.34.9", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.34.9.tgz", - "integrity": "sha512-0CY3/K54slrzLDjOA7TOjN1NuLKERBgk9nY5V34mhmuu673YNb+7ghaDUs6N0ujXR7fz5XaS5Aa6d2TNxZd0OQ==", + "version": "4.40.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.40.2.tgz", + "integrity": "sha512-Gzf1Hn2Aoe8VZzevHostPX23U7N5+4D36WJNHK88NZHCJr7aVMG4fadqkIf72eqVPGjGc0HJHNuUaUcxiR+N/w==", "cpu": [ "arm64" ], @@ -1415,9 +1429,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.34.9", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.34.9.tgz", - "integrity": "sha512-eOojSEAi/acnsJVYRxnMkPFqcxSMFfrw7r2iD9Q32SGkb/Q9FpUY1UlAu1DH9T7j++gZ0lHjnm4OyH2vCI7l7Q==", + "version": "4.40.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.40.2.tgz", + "integrity": "sha512-47N4hxa01a4x6XnJoskMKTS8XZ0CZMd8YTbINbi+w03A2w4j1RTlnGHOz/P0+Bg1LaVL6ufZyNprSg+fW5nYQQ==", "cpu": [ "x64" ], @@ -1428,9 +1442,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.34.9", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.34.9.tgz", - "integrity": "sha512-2lzjQPJbN5UnHm7bHIUKFMulGTQwdvOkouJDpPysJS+QFBGDJqcfh+CxxtG23Ik/9tEvnebQiylYoazFMAgrYw==", + "version": "4.40.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.40.2.tgz", + "integrity": "sha512-8t6aL4MD+rXSHHZUR1z19+9OFJ2rl1wGKvckN47XFRVO+QL/dUSpKA2SLRo4vMg7ELA8pzGpC+W9OEd1Z/ZqoQ==", "cpu": [ "arm64" ], @@ -1441,9 +1455,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.34.9", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.34.9.tgz", - "integrity": "sha512-SLl0hi2Ah2H7xQYd6Qaiu01kFPzQ+hqvdYSoOtHYg/zCIFs6t8sV95kaoqjzjFwuYQLtOI0RZre/Ke0nPaQV+g==", + "version": "4.40.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.40.2.tgz", + "integrity": "sha512-C+AyHBzfpsOEYRFjztcYUFsH4S7UsE9cDtHCtma5BK8+ydOZYgMmWg1d/4KBytQspJCld8ZIujFMAdKG1xyr4Q==", "cpu": [ "x64" ], @@ -1454,9 +1468,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.34.9", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.34.9.tgz", - "integrity": "sha512-88I+D3TeKItrw+Y/2ud4Tw0+3CxQ2kLgu3QvrogZ0OfkmX/DEppehus7L3TS2Q4lpB+hYyxhkQiYPJ6Mf5/dPg==", + "version": "4.40.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.40.2.tgz", + "integrity": "sha512-de6TFZYIvJwRNjmW3+gaXiZ2DaWL5D5yGmSYzkdzjBDS3W+B9JQ48oZEsmMvemqjtAFzE16DIBLqd6IQQRuG9Q==", "cpu": [ "arm" ], @@ -1467,9 +1481,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.34.9", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.34.9.tgz", - "integrity": "sha512-3qyfWljSFHi9zH0KgtEPG4cBXHDFhwD8kwg6xLfHQ0IWuH9crp005GfoUUh/6w9/FWGBwEHg3lxK1iHRN1MFlA==", + "version": "4.40.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.40.2.tgz", + "integrity": "sha512-urjaEZubdIkacKc930hUDOfQPysezKla/O9qV+O89enqsqUmQm8Xj8O/vh0gHg4LYfv7Y7UsE3QjzLQzDYN1qg==", "cpu": [ "arm" ], @@ -1480,9 +1494,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.34.9", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.34.9.tgz", - "integrity": "sha512-6TZjPHjKZUQKmVKMUowF3ewHxctrRR09eYyvT5eFv8w/fXarEra83A2mHTVJLA5xU91aCNOUnM+DWFMSbQ0Nxw==", + "version": "4.40.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.40.2.tgz", + "integrity": "sha512-KlE8IC0HFOC33taNt1zR8qNlBYHj31qGT1UqWqtvR/+NuCVhfufAq9fxO8BMFC22Wu0rxOwGVWxtCMvZVLmhQg==", "cpu": [ "arm64" ], @@ -1493,9 +1507,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.34.9", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.34.9.tgz", - "integrity": "sha512-LD2fytxZJZ6xzOKnMbIpgzFOuIKlxVOpiMAXawsAZ2mHBPEYOnLRK5TTEsID6z4eM23DuO88X0Tq1mErHMVq0A==", + "version": "4.40.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.40.2.tgz", + "integrity": "sha512-j8CgxvfM0kbnhu4XgjnCWJQyyBOeBI1Zq91Z850aUddUmPeQvuAy6OiMdPS46gNFgy8gN1xkYyLgwLYZG3rBOg==", "cpu": [ "arm64" ], @@ -1506,9 +1520,9 @@ ] }, "node_modules/@rollup/rollup-linux-loongarch64-gnu": { - "version": "4.34.9", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.34.9.tgz", - "integrity": "sha512-dRAgTfDsn0TE0HI6cmo13hemKpVHOEyeciGtvlBTkpx/F65kTvShtY/EVyZEIfxFkV5JJTuQ9tP5HGBS0hfxIg==", + "version": "4.40.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.40.2.tgz", + "integrity": "sha512-Ybc/1qUampKuRF4tQXc7G7QY9YRyeVSykfK36Y5Qc5dmrIxwFhrOzqaVTNoZygqZ1ZieSWTibfFhQ5qK8jpWxw==", "cpu": [ "loong64" ], @@ -1519,9 +1533,9 @@ ] }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.34.9", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.34.9.tgz", - "integrity": "sha512-PHcNOAEhkoMSQtMf+rJofwisZqaU8iQ8EaSps58f5HYll9EAY5BSErCZ8qBDMVbq88h4UxaNPlbrKqfWP8RfJA==", + "version": "4.40.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.40.2.tgz", + "integrity": "sha512-3FCIrnrt03CCsZqSYAOW/k9n625pjpuMzVfeI+ZBUSDT3MVIFDSPfSUgIl9FqUftxcUXInvFah79hE1c9abD+Q==", "cpu": [ "ppc64" ], @@ -1532,9 +1546,22 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.34.9", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.34.9.tgz", - "integrity": "sha512-Z2i0Uy5G96KBYKjeQFKbbsB54xFOL5/y1P5wNBsbXB8yE+At3oh0DVMjQVzCJRJSfReiB2tX8T6HUFZ2k8iaKg==", + "version": "4.40.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.40.2.tgz", + "integrity": "sha512-QNU7BFHEvHMp2ESSY3SozIkBPaPBDTsfVNGx3Xhv+TdvWXFGOSH2NJvhD1zKAT6AyuuErJgbdvaJhYVhVqrWTg==", + "cpu": [ + "riscv64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.40.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.40.2.tgz", + "integrity": "sha512-5W6vNYkhgfh7URiXTO1E9a0cy4fSgfE4+Hl5agb/U1sa0kjOLMLC1wObxwKxecE17j0URxuTrYZZME4/VH57Hg==", "cpu": [ "riscv64" ], @@ -1545,9 +1572,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.34.9", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.34.9.tgz", - "integrity": "sha512-U+5SwTMoeYXoDzJX5dhDTxRltSrIax8KWwfaaYcynuJw8mT33W7oOgz0a+AaXtGuvhzTr2tVKh5UO8GVANTxyQ==", + "version": "4.40.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.40.2.tgz", + "integrity": "sha512-B7LKIz+0+p348JoAL4X/YxGx9zOx3sR+o6Hj15Y3aaApNfAshK8+mWZEf759DXfRLeL2vg5LYJBB7DdcleYCoQ==", "cpu": [ "s390x" ], @@ -1558,9 +1585,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.34.9", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.34.9.tgz", - "integrity": "sha512-FwBHNSOjUTQLP4MG7y6rR6qbGw4MFeQnIBrMe161QGaQoBQLqSUEKlHIiVgF3g/mb3lxlxzJOpIBhaP+C+KP2A==", + "version": "4.40.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.40.2.tgz", + "integrity": "sha512-lG7Xa+BmBNwpjmVUbmyKxdQJ3Q6whHjMjzQplOs5Z+Gj7mxPtWakGHqzMqNER68G67kmCX9qX57aRsW5V0VOng==", "cpu": [ "x64" ], @@ -1571,9 +1598,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.34.9", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.34.9.tgz", - "integrity": "sha512-cYRpV4650z2I3/s6+5/LONkjIz8MBeqrk+vPXV10ORBnshpn8S32bPqQ2Utv39jCiDcO2eJTuSlPXpnvmaIgRA==", + "version": "4.40.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.40.2.tgz", + "integrity": "sha512-tD46wKHd+KJvsmije4bUskNuvWKFcTOIM9tZ/RrmIvcXnbi0YK/cKS9FzFtAm7Oxi2EhV5N2OpfFB348vSQRXA==", "cpu": [ "x64" ], @@ -1584,9 +1611,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.34.9", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.34.9.tgz", - "integrity": "sha512-z4mQK9dAN6byRA/vsSgQiPeuO63wdiDxZ9yg9iyX2QTzKuQM7T4xlBoeUP/J8uiFkqxkcWndWi+W7bXdPbt27Q==", + "version": "4.40.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.40.2.tgz", + "integrity": "sha512-Bjv/HG8RRWLNkXwQQemdsWw4Mg+IJ29LK+bJPW2SCzPKOUaMmPEppQlu/Fqk1d7+DX3V7JbFdbkh/NMmurT6Pg==", "cpu": [ "arm64" ], @@ -1597,9 +1624,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.34.9", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.34.9.tgz", - "integrity": "sha512-KB48mPtaoHy1AwDNkAJfHXvHp24H0ryZog28spEs0V48l3H1fr4i37tiyHsgKZJnCmvxsbATdZGBpbmxTE3a9w==", + "version": "4.40.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.40.2.tgz", + "integrity": "sha512-dt1llVSGEsGKvzeIO76HToiYPNPYPkmjhMHhP00T9S4rDern8P2ZWvWAQUEJ+R1UdMWJ/42i/QqJ2WV765GZcA==", "cpu": [ "ia32" ], @@ -1610,9 +1637,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.34.9", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.34.9.tgz", - "integrity": "sha512-AyleYRPU7+rgkMWbEh71fQlrzRfeP6SyMnRf9XX4fCdDPAJumdSBqYEcWPMzVQ4ScAl7E4oFfK0GUVn77xSwbw==", + "version": "4.40.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.40.2.tgz", + "integrity": "sha512-bwspbWB04XJpeElvsp+DCylKfF4trJDa2Y9Go8O6A7YLX2LIKGcNK/CYImJN6ZP4DcuOHB4Utl3iCbnR62DudA==", "cpu": [ "x64" ], @@ -1662,6 +1689,7 @@ "version": "5.6.0", "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-5.6.0.tgz", "integrity": "sha512-TV7t8GKYaJWsn00tFDqBw8+Uqmr8A0fRU1tvTQhyZzGv0sJCGRQL3JGMI3ucuKo3XIZdUP+Lx7/gh2t3lewy7g==", + "dev": true, "license": "MIT", "engines": { "node": ">=14.16" @@ -1674,12 +1702,14 @@ "version": "0.19.0", "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.19.0.tgz", "integrity": "sha512-RV16k/qIxW/wWc+mLzV3ARyKUaMUTBy9tOLMzFhtNSKYeTAanQ3a5MudJKf/8arIFnA2L27SNjarQKmFg0w/jA==", + "dev": true, "license": "MIT" }, "node_modules/@szmarczak/http-timer": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-5.0.1.tgz", "integrity": "sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw==", + "dev": true, "license": "MIT", "dependencies": { "defer-to-connect": "^2.0.1" @@ -1689,21 +1719,22 @@ } }, "node_modules/@types/estree": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", - "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.7.tgz", + "integrity": "sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==", "license": "MIT" }, "node_modules/@types/http-cache-semantics": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz", "integrity": "sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA==", + "dev": true, "license": "MIT" }, "node_modules/@types/lodash": { - "version": "4.17.16", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.16.tgz", - "integrity": "sha512-HX7Em5NYQAXKW+1T+FiuG27NGwzJfCX3s1GjOa7ujxZa52kjJLOr4FUxT+giF6Tgxv1e+/czV/iTtBw27WTU9g==", + "version": "4.17.17", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.17.tgz", + "integrity": "sha512-RRVJ+J3J+WmyOTqnz3PiBLA501eKwXl2noseKOrNo/6+XEHjTAxO4xHvxQB6QuNm+s4WRbn6rSiap8+EA+ykFQ==", "license": "MIT" }, "node_modules/@types/node": { @@ -1716,13 +1747,13 @@ } }, "node_modules/@vitest/expect": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-3.0.6.tgz", - "integrity": "sha512-zBduHf/ja7/QRX4HdP1DSq5XrPgdN+jzLOwaTq/0qZjYfgETNFCKf9nOAp2j3hmom3oTbczuUzrzg9Hafh7hNg==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-3.1.3.tgz", + "integrity": "sha512-7FTQQuuLKmN1Ig/h+h/GO+44Q1IlglPlR2es4ab7Yvfx+Uk5xsv+Ykk+MEt/M2Yn/xGmzaLKxGw2lgy2bwuYqg==", "license": "MIT", "dependencies": { - "@vitest/spy": "3.0.6", - "@vitest/utils": "3.0.6", + "@vitest/spy": "3.1.3", + "@vitest/utils": "3.1.3", "chai": "^5.2.0", "tinyrainbow": "^2.0.0" }, @@ -1789,12 +1820,12 @@ } }, "node_modules/@vitest/mocker": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-3.0.6.tgz", - "integrity": "sha512-KPztr4/tn7qDGZfqlSPQoF2VgJcKxnDNhmfR3VgZ6Fy1bO8T9Fc1stUiTXtqz0yG24VpD00pZP5f8EOFknjNuQ==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-3.1.3.tgz", + "integrity": "sha512-PJbLjonJK82uCWHjzgBJZuR7zmAOrSvKk1QBxrennDIgtH4uK0TB1PvYmc0XBCigxxtiAVPfWtAdy4lpz8SQGQ==", "license": "MIT", "dependencies": { - "@vitest/spy": "3.0.6", + "@vitest/spy": "3.1.3", "estree-walker": "^3.0.3", "magic-string": "^0.30.17" }, @@ -1815,9 +1846,9 @@ } }, "node_modules/@vitest/pretty-format": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-3.0.6.tgz", - "integrity": "sha512-Zyctv3dbNL+67qtHfRnUE/k8qxduOamRfAL1BurEIQSyOEFffoMvx2pnDSSbKAAVxY0Ej2J/GH2dQKI0W2JyVg==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-3.1.3.tgz", + "integrity": "sha512-i6FDiBeJUGLDKADw2Gb01UtUNb12yyXAqC/mmRWuYl+m/U9GS7s8us5ONmGkGpUUo7/iAYzI2ePVfOZTYvUifA==", "license": "MIT", "dependencies": { "tinyrainbow": "^2.0.0" @@ -1827,12 +1858,12 @@ } }, "node_modules/@vitest/runner": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-3.0.6.tgz", - "integrity": "sha512-JopP4m/jGoaG1+CBqubV/5VMbi7L+NQCJTu1J1Pf6YaUbk7bZtaq5CX7p+8sY64Sjn1UQ1XJparHfcvTTdu9cA==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-3.1.3.tgz", + "integrity": "sha512-Tae+ogtlNfFei5DggOsSUvkIaSuVywujMj6HzR97AHK6XK8i3BuVyIifWAm/sE3a15lF5RH9yQIrbXYuo0IFyA==", "license": "MIT", "dependencies": { - "@vitest/utils": "3.0.6", + "@vitest/utils": "3.1.3", "pathe": "^2.0.3" }, "funding": { @@ -1840,12 +1871,12 @@ } }, "node_modules/@vitest/snapshot": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-3.0.6.tgz", - "integrity": "sha512-qKSmxNQwT60kNwwJHMVwavvZsMGXWmngD023OHSgn873pV0lylK7dwBTfYP7e4URy5NiBCHHiQGA9DHkYkqRqg==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-3.1.3.tgz", + "integrity": "sha512-XVa5OPNTYUsyqG9skuUkFzAeFnEzDp8hQu7kZ0N25B1+6KjGm4hWLtURyBbsIAOekfWQ7Wuz/N/XXzgYO3deWQ==", "license": "MIT", "dependencies": { - "@vitest/pretty-format": "3.0.6", + "@vitest/pretty-format": "3.1.3", "magic-string": "^0.30.17", "pathe": "^2.0.3" }, @@ -1854,9 +1885,9 @@ } }, "node_modules/@vitest/spy": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-3.0.6.tgz", - "integrity": "sha512-HfOGx/bXtjy24fDlTOpgiAEJbRfFxoX3zIGagCqACkFKKZ/TTOE6gYMKXlqecvxEndKFuNHcHqP081ggZ2yM0Q==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-3.1.3.tgz", + "integrity": "sha512-x6w+ctOEmEXdWaa6TO4ilb7l9DxPR5bwEb6hILKuxfU1NqWT2mpJD9NJN7t3OTfxmVlOMrvtoFJGdgyzZ605lQ==", "license": "MIT", "dependencies": { "tinyspy": "^3.0.2" @@ -1865,36 +1896,13 @@ "url": "https://opencollective.com/vitest" } }, - "node_modules/@vitest/ui": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/@vitest/ui/-/ui-3.0.6.tgz", - "integrity": "sha512-N4M2IUG2Q5LCeX4OWs48pQF4P3qsFejmDTc6QWGRFTLPrEe5EvM5HN0WSUnGAmuzQpSWv7ItfSsIJIWaEM2wpQ==", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "@vitest/utils": "3.0.6", - "fflate": "^0.8.2", - "flatted": "^3.3.2", - "pathe": "^2.0.3", - "sirv": "^3.0.1", - "tinyglobby": "^0.2.11", - "tinyrainbow": "^2.0.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - }, - "peerDependencies": { - "vitest": "3.0.6" - } - }, "node_modules/@vitest/utils": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-3.0.6.tgz", - "integrity": "sha512-18ktZpf4GQFTbf9jK543uspU03Q2qya7ZGya5yiZ0Gx0nnnalBvd5ZBislbl2EhLjM8A8rt4OilqKG7QwcGkvQ==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-3.1.3.tgz", + "integrity": "sha512-2Ltrpht4OmHO9+c/nmHtF09HWiyWdworqnHIwjfvDyWjuwKbdkcS9AnhsDn+8E2RM4x++foD1/tNuLPVvWG1Rg==", "license": "MIT", "dependencies": { - "@vitest/pretty-format": "3.0.6", + "@vitest/pretty-format": "3.1.3", "loupe": "^3.1.3", "tinyrainbow": "^2.0.0" }, @@ -1939,6 +1947,7 @@ "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.1", @@ -1955,6 +1964,7 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -1964,6 +1974,7 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, "license": "MIT", "dependencies": { "color-convert": "^2.0.1" @@ -1979,6 +1990,7 @@ "version": "4.13.2", "resolved": "https://registry.npmjs.org/antlr4/-/antlr4-4.13.2.tgz", "integrity": "sha512-QiVbZhyy4xAZ17UPEuG3YTOt8ZaoeOR1CvEAqrEsDBsOqINslaB147i9xqljZqoyf5S+EUlGStaj+t22LT9MOg==", + "dev": true, "license": "BSD-3-Clause", "engines": { "node": ">=16" @@ -1988,6 +2000,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, "license": "Python-2.0" }, "node_modules/assertion-error": { @@ -2003,12 +2016,14 @@ "version": "0.0.1", "resolved": "https://registry.npmjs.org/ast-parents/-/ast-parents-0.0.1.tgz", "integrity": "sha512-XHusKxKz3zoYk1ic8Un640joHbFMhbqneyoZfoKnEGtf2ey9Uh/IdpcQplODdO/kENaMIWsD0nJm4+wX3UNLHA==", + "dev": true, "license": "MIT" }, "node_modules/astral-regex": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -2021,9 +2036,9 @@ "license": "MIT" }, "node_modules/axios": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.8.1.tgz", - "integrity": "sha512-NN+fvwH/kV01dYUQ3PTOZns4LWtWhOFCAhQ/pHb88WQ1hNe5V/dvFwc4VJcDL11LT9xSX0QtsR8sWUuyOuOq7g==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.9.0.tgz", + "integrity": "sha512-re4CqKTJaURpzbLHtIi6XpDv20/CnpXOtjRY5/CU32L8gU8ek9UIivcfvSWvmKEngmVbrUtPpdDwWDWL7DNHvg==", "license": "MIT", "dependencies": { "follow-redirects": "^1.15.6", @@ -2035,6 +2050,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, "license": "MIT" }, "node_modules/bech32": { @@ -2053,6 +2069,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" @@ -2086,6 +2103,7 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-7.0.0.tgz", "integrity": "sha512-+qJyx4xiKra8mZrcwhjMRMUhD5NR1R8esPkzIYxX96JiecFoxAXFuz/GpR3+ev4PE1WamHip78wV0vcmPQtp8w==", + "dev": true, "license": "MIT", "engines": { "node": ">=14.16" @@ -2095,6 +2113,7 @@ "version": "10.2.14", "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-10.2.14.tgz", "integrity": "sha512-zkDT5WAF4hSSoUgyfg5tFIxz8XQK+25W/TLVojJTMKBaxevLBBtLxgqguAuVQB8PVW79FVjHcU+GJ9tVbDZ9mQ==", + "dev": true, "license": "MIT", "dependencies": { "@types/http-cache-semantics": "^4.0.2", @@ -2126,6 +2145,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -2153,6 +2173,7 @@ "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", @@ -2181,6 +2202,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, "license": "MIT", "dependencies": { "color-name": "~1.1.4" @@ -2193,6 +2215,7 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, "license": "MIT" }, "node_modules/combined-stream": { @@ -2242,6 +2265,7 @@ "version": "8.3.6", "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.3.6.tgz", "integrity": "sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==", + "dev": true, "license": "MIT", "dependencies": { "import-fresh": "^3.3.0", @@ -2291,6 +2315,7 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", + "dev": true, "license": "MIT", "dependencies": { "mimic-response": "^3.1.0" @@ -2306,6 +2331,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", + "dev": true, "license": "MIT", "engines": { "node": ">=10" @@ -2339,6 +2365,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz", "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==", + "dev": true, "license": "MIT", "engines": { "node": ">=10" @@ -2392,12 +2419,14 @@ "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, "license": "MIT" }, "node_modules/error-ex": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, "license": "MIT", "dependencies": { "is-arrayish": "^0.2.1" @@ -2422,9 +2451,9 @@ } }, "node_modules/es-module-lexer": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.6.0.tgz", - "integrity": "sha512-qqnD1yMU6tk/jnaMosogGySTZP8YtUgAffA9nMN+E/rjxcfRQ6IEk7IiozUjgxKoFHBGjTLnrHB/YC45r/59EQ==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.7.0.tgz", + "integrity": "sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==", "license": "MIT" }, "node_modules/es-object-atoms": { @@ -2455,9 +2484,9 @@ } }, "node_modules/esbuild": { - "version": "0.25.0", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.0.tgz", - "integrity": "sha512-BXq5mqc8ltbaN34cDqWuYKyNhX8D/Z0J1xdtdQ8UcIIIyJyz+ZMKUt58tF3SrZ85jcfN/PZYhjR5uDQAYNVbuw==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.4.tgz", + "integrity": "sha512-8pgjLUcUjcgDg+2Q4NYXnPbo/vncAY4UmyaCm0jZevERqCHZIaWwdJHkf8XQtu4AxSKCdvrUbT0XUr1IdZzI8Q==", "hasInstallScript": true, "license": "MIT", "bin": { @@ -2467,31 +2496,31 @@ "node": ">=18" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.25.0", - "@esbuild/android-arm": "0.25.0", - "@esbuild/android-arm64": "0.25.0", - "@esbuild/android-x64": "0.25.0", - "@esbuild/darwin-arm64": "0.25.0", - "@esbuild/darwin-x64": "0.25.0", - "@esbuild/freebsd-arm64": "0.25.0", - "@esbuild/freebsd-x64": "0.25.0", - "@esbuild/linux-arm": "0.25.0", - "@esbuild/linux-arm64": "0.25.0", - "@esbuild/linux-ia32": "0.25.0", - "@esbuild/linux-loong64": "0.25.0", - "@esbuild/linux-mips64el": "0.25.0", - "@esbuild/linux-ppc64": "0.25.0", - "@esbuild/linux-riscv64": "0.25.0", - "@esbuild/linux-s390x": "0.25.0", - "@esbuild/linux-x64": "0.25.0", - "@esbuild/netbsd-arm64": "0.25.0", - "@esbuild/netbsd-x64": "0.25.0", - "@esbuild/openbsd-arm64": "0.25.0", - "@esbuild/openbsd-x64": "0.25.0", - "@esbuild/sunos-x64": "0.25.0", - "@esbuild/win32-arm64": "0.25.0", - "@esbuild/win32-ia32": "0.25.0", - "@esbuild/win32-x64": "0.25.0" + "@esbuild/aix-ppc64": "0.25.4", + "@esbuild/android-arm": "0.25.4", + "@esbuild/android-arm64": "0.25.4", + "@esbuild/android-x64": "0.25.4", + "@esbuild/darwin-arm64": "0.25.4", + "@esbuild/darwin-x64": "0.25.4", + "@esbuild/freebsd-arm64": "0.25.4", + "@esbuild/freebsd-x64": "0.25.4", + "@esbuild/linux-arm": "0.25.4", + "@esbuild/linux-arm64": "0.25.4", + "@esbuild/linux-ia32": "0.25.4", + "@esbuild/linux-loong64": "0.25.4", + "@esbuild/linux-mips64el": "0.25.4", + "@esbuild/linux-ppc64": "0.25.4", + "@esbuild/linux-riscv64": "0.25.4", + "@esbuild/linux-s390x": "0.25.4", + "@esbuild/linux-x64": "0.25.4", + "@esbuild/netbsd-arm64": "0.25.4", + "@esbuild/netbsd-x64": "0.25.4", + "@esbuild/openbsd-arm64": "0.25.4", + "@esbuild/openbsd-x64": "0.25.4", + "@esbuild/sunos-x64": "0.25.4", + "@esbuild/win32-arm64": "0.25.4", + "@esbuild/win32-ia32": "0.25.4", + "@esbuild/win32-x64": "0.25.4" } }, "node_modules/estree-walker": { @@ -2558,9 +2587,9 @@ "license": "MIT" }, "node_modules/expect-type": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.2.0.tgz", - "integrity": "sha512-80F22aiJ3GLyVnS/B3HzgR6RelZVumzj9jkL0Rhz4h0xYbNW9PjlQz5h3J/SShErbXBc295vseR4/MIbVmUbeA==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.2.1.tgz", + "integrity": "sha512-/kP8CAwxzLVEeFrMm4kMmy4CCDlpipyA7MYLVrdJIkV0fYF0UaigQHRsxHiuY/GEea+bh4KSv3TIlgr+2UL6bw==", "license": "Apache-2.0", "engines": { "node": ">=12.0.0" @@ -2570,24 +2599,28 @@ "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, "license": "MIT" }, "node_modules/fast-diff": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz", "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", + "dev": true, "license": "Apache-2.0" }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true, "license": "MIT" }, "node_modules/fast-uri": { "version": "3.0.6", "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.6.tgz", "integrity": "sha512-Atfo14OibSv5wAp4VWNsFYE1AchQRTv9cBGWET4pZWHzYshFSS9NQI6I57rdKn9croWVMbYFbLhJ+yJvmZIIHw==", + "dev": true, "funding": [ { "type": "github", @@ -2601,12 +2634,10 @@ "license": "BSD-3-Clause" }, "node_modules/fdir": { - "version": "6.4.3", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.3.tgz", - "integrity": "sha512-PMXmW2y1hDDfTSRc9gaXIuCCRpuoz3Kaz8cUelp3smouvfT632ozg2vrT6lJsHKKOF59YLbOGfAWGUcKEfRMQw==", + "version": "6.4.4", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.4.tgz", + "integrity": "sha512-1NZP+GK4GfuAv3PqKvxQRDMjdSRZjnkq7KfhlNrCNNlZ0ygQFpebfrnfnq/W7fpUnAv9aGWmY1zKx7FYL3gwhg==", "license": "MIT", - "optional": true, - "peer": true, "peerDependencies": { "picomatch": "^3 || ^4" }, @@ -2616,22 +2647,6 @@ } } }, - "node_modules/fflate": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.8.2.tgz", - "integrity": "sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A==", - "license": "MIT", - "optional": true, - "peer": true - }, - "node_modules/flatted": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", - "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", - "license": "ISC", - "optional": true, - "peer": true - }, "node_modules/follow-redirects": { "version": "1.15.9", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", @@ -2671,6 +2686,7 @@ "version": "2.1.4", "resolved": "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-2.1.4.tgz", "integrity": "sha512-yDYSgNMraqvnxiEXO4hi88+YZxaHC6QKzb5N84iRCTDeRO7ZALpir/lVmf/uXUhnwUr2O4HU8s/n6x+yNjQkHw==", + "dev": true, "license": "MIT", "engines": { "node": ">= 14.17" @@ -2680,6 +2696,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true, "license": "ISC" }, "node_modules/fsevents": { @@ -2755,6 +2772,7 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, "license": "MIT", "engines": { "node": ">=10" @@ -2768,6 +2786,7 @@ "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", @@ -2799,6 +2818,7 @@ "version": "12.6.1", "resolved": "https://registry.npmjs.org/got/-/got-12.6.1.tgz", "integrity": "sha512-mThBblvlAF1d4O5oqyvN+ZxLAYwIJK7bpMxgYqPD9okW0C3qm5FFn7k811QrcuEBwaogR3ngOFoCfs6mRv7teQ==", + "dev": true, "license": "MIT", "dependencies": { "@sindresorhus/is": "^5.2.0", @@ -2830,6 +2850,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -2899,12 +2920,14 @@ "version": "4.1.1", "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==", + "dev": true, "license": "BSD-2-Clause" }, "node_modules/http2-wrapper": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-2.2.1.tgz", "integrity": "sha512-V5nVw1PAOgfI3Lmeaj2Exmeg7fenjhRUgz1lPSezy1CuhPYbgQtbQj4jZfEAEMlaL+vupsvhjqCyjzob0yxsmQ==", + "dev": true, "license": "MIT", "dependencies": { "quick-lru": "^5.1.1", @@ -2918,6 +2941,7 @@ "version": "5.3.2", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, "license": "MIT", "engines": { "node": ">= 4" @@ -2927,6 +2951,7 @@ "version": "3.3.1", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", + "dev": true, "license": "MIT", "dependencies": { "parent-module": "^1.0.0", @@ -2944,6 +2969,7 @@ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dev": true, "license": "ISC", "dependencies": { "once": "^1.3.0", @@ -2966,12 +2992,14 @@ "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true, "license": "MIT" }, "node_modules/is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -3002,12 +3030,14 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true, "license": "MIT" }, "node_modules/js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, "license": "MIT", "dependencies": { "argparse": "^2.0.1" @@ -3020,24 +3050,28 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true, "license": "MIT" }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true, "license": "MIT" }, "node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, "license": "MIT" }, "node_modules/keyv": { "version": "4.5.4", "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, "license": "MIT", "dependencies": { "json-buffer": "3.0.1" @@ -3059,6 +3093,7 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-7.0.0.tgz", "integrity": "sha512-KvNT4XqAMzdcL6ka6Tl3i2lYeFDgXNCuIX+xNx6ZMVR1dFq+idXd9FLKNMOIx0t9mJ9/HudyX4oZWXZQ0UJHeg==", + "dev": true, "license": "MIT", "dependencies": { "package-json": "^8.1.0" @@ -3074,6 +3109,7 @@ "version": "8.1.1", "resolved": "https://registry.npmjs.org/package-json/-/package-json-8.1.1.tgz", "integrity": "sha512-cbH9IAIJHNj9uXi196JVsRlt7cHKak6u/e6AkL/bkRelZ7rlL3X1YKxsZwa36xipOEKAsdtmaG6aAJoM1fx2zA==", + "dev": true, "license": "MIT", "dependencies": { "got": "^12.1.0", @@ -3092,6 +3128,7 @@ "version": "1.2.4", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true, "license": "MIT" }, "node_modules/lodash": { @@ -3104,6 +3141,7 @@ "version": "4.4.2", "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", "integrity": "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==", + "dev": true, "license": "MIT" }, "node_modules/loupe": { @@ -3119,6 +3157,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-3.0.0.tgz", "integrity": "sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ==", + "dev": true, "license": "MIT", "engines": { "node": "^12.20.0 || ^14.13.1 || >=16.0.0" @@ -3178,6 +3217,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-4.0.0.tgz", "integrity": "sha512-e5ISH9xMYU0DzrT+jl8q2ze9D6eWBto+I8CNpe+VI+K2J/F/k3PdkdTdz4wvGVH4NTpo+NRYTVIuMQEMMcsLqg==", + "dev": true, "license": "MIT", "engines": { "node": "^12.20.0 || ^14.13.1 || >=16.0.0" @@ -3202,6 +3242,7 @@ "version": "5.1.6", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dev": true, "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" @@ -3219,17 +3260,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/mrmime": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-2.0.1.tgz", - "integrity": "sha512-Y3wQdFg2Va6etvQ5I82yUhGdsKrcYox6p7FfL1LbK2J4V01F9TGlepTIhnK24t7koZibmg82KGglhA1XK5IsLQ==", - "license": "MIT", - "optional": true, - "peer": true, - "engines": { - "node": ">=10" - } - }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -3237,9 +3267,9 @@ "license": "MIT" }, "node_modules/nanoid": { - "version": "3.3.8", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz", - "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==", + "version": "3.3.11", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", + "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", "funding": [ { "type": "github", @@ -3254,10 +3284,28 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, + "node_modules/node-addon-api": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.1.0.tgz", + "integrity": "sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==", + "license": "MIT" + }, + "node_modules/node-gyp-build": { + "version": "4.8.4", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.4.tgz", + "integrity": "sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==", + "license": "MIT", + "bin": { + "node-gyp-build": "bin.js", + "node-gyp-build-optional": "optional.js", + "node-gyp-build-test": "build-test.js" + } + }, "node_modules/normalize-url": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-8.0.1.tgz", "integrity": "sha512-IO9QvjUMWxPQQhs60oOu10CRkWCiZzSUkzbXGGV9pviYl1fXYcvkzQ5jV9z8Y6un8ARoVRl4EtC6v6jNqbaJ/w==", + "dev": true, "license": "MIT", "engines": { "node": ">=14.16" @@ -3270,6 +3318,7 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, "license": "ISC", "dependencies": { "wrappy": "1" @@ -3317,6 +3366,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-3.0.0.tgz", "integrity": "sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw==", + "dev": true, "license": "MIT", "engines": { "node": ">=12.20" @@ -3344,6 +3394,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, "license": "MIT", "dependencies": { "callsites": "^3.0.0" @@ -3356,6 +3407,7 @@ "version": "5.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, "license": "MIT", "dependencies": { "@babel/code-frame": "^7.0.0", @@ -3374,6 +3426,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -3405,8 +3458,6 @@ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", "license": "MIT", - "optional": true, - "peer": true, "engines": { "node": ">=12" }, @@ -3418,6 +3469,7 @@ "version": "8.0.0", "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", + "dev": true, "license": "MIT", "engines": { "node": ">=4" @@ -3455,6 +3507,7 @@ "version": "3.5.3", "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.5.3.tgz", "integrity": "sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==", + "dev": true, "license": "MIT", "bin": { "prettier": "bin/prettier.cjs" @@ -3466,6 +3519,30 @@ "url": "https://github.com/prettier/prettier?sponsor=1" } }, + "node_modules/prettier-plugin-solidity": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/prettier-plugin-solidity/-/prettier-plugin-solidity-1.4.3.tgz", + "integrity": "sha512-Mrr/iiR9f9IaeGRMZY2ApumXcn/C5Gs3S7B7hWB3gigBFML06C0yEyW86oLp0eqiA0qg+46FaChgLPJCj/pIlg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@solidity-parser/parser": "^0.20.1", + "semver": "^7.7.1" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "prettier": ">=2.3.0" + } + }, + "node_modules/prettier-plugin-solidity/node_modules/@solidity-parser/parser": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.20.1.tgz", + "integrity": "sha512-58I2sRpzaQUN+jJmWbHfbWf9AKfzqCI8JAdFB0vbyY+u8tBRcuTt9LxzasvR0LGQpcRv97eyV7l61FQ3Ib7zVw==", + "dev": true, + "license": "MIT" + }, "node_modules/proto-list": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", @@ -3482,6 +3559,7 @@ "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -3491,6 +3569,7 @@ "version": "5.1.1", "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", + "dev": true, "license": "MIT", "engines": { "node": ">=10" @@ -3545,6 +3624,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -3554,21 +3634,45 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz", "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==", + "dev": true, "license": "MIT" }, "node_modules/resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, "license": "MIT", "engines": { "node": ">=4" } }, + "node_modules/resolve-pkg": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg/-/resolve-pkg-2.0.0.tgz", + "integrity": "sha512-+1lzwXehGCXSeryaISr6WujZzowloigEofRB+dj75y9RRa/obVcYgbHJd53tdYw8pvZj8GojXaaENws8Ktw/hQ==", + "license": "MIT", + "dependencies": { + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve-pkg/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/responselike": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/responselike/-/responselike-3.0.0.tgz", "integrity": "sha512-40yHxbNcl2+rzXvZuVkrYohathsSJlMTXKryG5y8uciHv1+xDLHQpgjG64JUO9nrEq2jGLH6IZ8BcZyw3wrweg==", + "dev": true, "license": "MIT", "dependencies": { "lowercase-keys": "^3.0.0" @@ -3581,12 +3685,12 @@ } }, "node_modules/rollup": { - "version": "4.34.9", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.34.9.tgz", - "integrity": "sha512-nF5XYqWWp9hx/LrpC8sZvvvmq0TeTjQgaZHYmAgwysT9nh8sWnZhBnM8ZyVbbJFIQBLwHDNoMqsBZBbUo4U8sQ==", + "version": "4.40.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.40.2.tgz", + "integrity": "sha512-tfUOg6DTP4rhQ3VjOO6B4wyrJnGOX85requAXvqYTHsOgb2TFJdZ3aWpT8W2kPoypSGP7dZUyzxJ9ee4buM5Fg==", "license": "MIT", "dependencies": { - "@types/estree": "1.0.6" + "@types/estree": "1.0.7" }, "bin": { "rollup": "dist/bin/rollup" @@ -3596,25 +3700,26 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.34.9", - "@rollup/rollup-android-arm64": "4.34.9", - "@rollup/rollup-darwin-arm64": "4.34.9", - "@rollup/rollup-darwin-x64": "4.34.9", - "@rollup/rollup-freebsd-arm64": "4.34.9", - "@rollup/rollup-freebsd-x64": "4.34.9", - "@rollup/rollup-linux-arm-gnueabihf": "4.34.9", - "@rollup/rollup-linux-arm-musleabihf": "4.34.9", - "@rollup/rollup-linux-arm64-gnu": "4.34.9", - "@rollup/rollup-linux-arm64-musl": "4.34.9", - "@rollup/rollup-linux-loongarch64-gnu": "4.34.9", - "@rollup/rollup-linux-powerpc64le-gnu": "4.34.9", - "@rollup/rollup-linux-riscv64-gnu": "4.34.9", - "@rollup/rollup-linux-s390x-gnu": "4.34.9", - "@rollup/rollup-linux-x64-gnu": "4.34.9", - "@rollup/rollup-linux-x64-musl": "4.34.9", - "@rollup/rollup-win32-arm64-msvc": "4.34.9", - "@rollup/rollup-win32-ia32-msvc": "4.34.9", - "@rollup/rollup-win32-x64-msvc": "4.34.9", + "@rollup/rollup-android-arm-eabi": "4.40.2", + "@rollup/rollup-android-arm64": "4.40.2", + "@rollup/rollup-darwin-arm64": "4.40.2", + "@rollup/rollup-darwin-x64": "4.40.2", + "@rollup/rollup-freebsd-arm64": "4.40.2", + "@rollup/rollup-freebsd-x64": "4.40.2", + "@rollup/rollup-linux-arm-gnueabihf": "4.40.2", + "@rollup/rollup-linux-arm-musleabihf": "4.40.2", + "@rollup/rollup-linux-arm64-gnu": "4.40.2", + "@rollup/rollup-linux-arm64-musl": "4.40.2", + "@rollup/rollup-linux-loongarch64-gnu": "4.40.2", + "@rollup/rollup-linux-powerpc64le-gnu": "4.40.2", + "@rollup/rollup-linux-riscv64-gnu": "4.40.2", + "@rollup/rollup-linux-riscv64-musl": "4.40.2", + "@rollup/rollup-linux-s390x-gnu": "4.40.2", + "@rollup/rollup-linux-x64-gnu": "4.40.2", + "@rollup/rollup-linux-x64-musl": "4.40.2", + "@rollup/rollup-win32-arm64-msvc": "4.40.2", + "@rollup/rollup-win32-ia32-msvc": "4.40.2", + "@rollup/rollup-win32-x64-msvc": "4.40.2", "fsevents": "~2.3.2" } }, @@ -3624,6 +3729,21 @@ "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==", "license": "MIT" }, + "node_modules/secp256k1": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-5.0.1.tgz", + "integrity": "sha512-lDFs9AAIaWP9UCdtWrotXWWF9t8PWgQDcxqgAnpM9rMqxb3Oaq2J0thzPVSxBwdJgyQtkU/sYtFtbM1RSt/iYA==", + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "elliptic": "^6.5.7", + "node-addon-api": "^5.0.0", + "node-gyp-build": "^4.2.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, "node_modules/semver": { "version": "7.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", @@ -3642,26 +3762,11 @@ "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", "license": "ISC" }, - "node_modules/sirv": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/sirv/-/sirv-3.0.1.tgz", - "integrity": "sha512-FoqMu0NCGBLCcAkS1qA+XJIQTR6/JHfQXl+uGteNCQ76T91DMUjPa9xfmeqMY3z80nLSg9yQmNjK0Px6RWsH/A==", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "@polka/url": "^1.0.0-next.24", - "mrmime": "^2.0.0", - "totalist": "^3.0.0" - }, - "engines": { - "node": ">=18" - } - }, "node_modules/slice-ansi": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", + "dev": true, "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", @@ -3676,9 +3781,9 @@ } }, "node_modules/solc": { - "version": "0.8.28", - "resolved": "https://registry.npmjs.org/solc/-/solc-0.8.28.tgz", - "integrity": "sha512-AFCiJ+b4RosyyNhnfdVH4ZR1+TxiL91iluPjw0EJslIu4LXGM9NYqi2z5y8TqochC4tcH9QsHfwWhOIC9jPDKA==", + "version": "0.8.29", + "resolved": "https://registry.npmjs.org/solc/-/solc-0.8.29.tgz", + "integrity": "sha512-M1hmcsejAtT1RWC+wy45Oi8a82nSnDl65wDzA3/8uWTC7R7VcnrMVIHv6/LHqnQPZ7OM2RIeKh3zpNo4E5lYbw==", "license": "MIT", "dependencies": { "command-exists": "^1.2.8", @@ -3693,7 +3798,7 @@ "solcjs": "solc.js" }, "engines": { - "node": ">=10.0.0" + "node": ">=12.0.0" } }, "node_modules/solc/node_modules/semver": { @@ -3709,6 +3814,7 @@ "version": "5.0.5", "resolved": "https://registry.npmjs.org/solhint/-/solhint-5.0.5.tgz", "integrity": "sha512-WrnG6T+/UduuzSWsSOAbfq1ywLUDwNea3Gd5hg6PS+pLUm8lz2ECNr0beX609clBxmDeZ3676AiA9nPDljmbJQ==", + "dev": true, "license": "MIT", "dependencies": { "@solidity-parser/parser": "^0.19.0", @@ -3741,6 +3847,7 @@ "version": "10.0.1", "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", + "dev": true, "license": "MIT", "engines": { "node": ">=14" @@ -3750,6 +3857,7 @@ "version": "2.8.8", "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "dev": true, "license": "MIT", "optional": true, "bin": { @@ -3778,15 +3886,16 @@ "license": "MIT" }, "node_modules/std-env": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.8.0.tgz", - "integrity": "sha512-Bc3YwwCB+OzldMxOXJIIvC6cPRWr/LxOp48CdQTOkPyk/t4JWWJbrilwBd7RJzKV8QW7tJkcgAmeuLLJugl5/w==", + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.9.0.tgz", + "integrity": "sha512-UGvjygr6F6tpH7o2qyqR6QYpwraIjKSdtzyBdyytFOHmPZY917kwdwLG0RbOjWOnKmnm3PeHjaoLLMie7kPLQw==", "license": "MIT" }, "node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, "license": "MIT", "dependencies": { "emoji-regex": "^8.0.0", @@ -3801,6 +3910,7 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, "license": "MIT", "dependencies": { "ansi-regex": "^5.0.1" @@ -3822,6 +3932,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, "license": "MIT", "dependencies": { "has-flag": "^4.0.0" @@ -3834,6 +3945,7 @@ "version": "6.9.0", "resolved": "https://registry.npmjs.org/table/-/table-6.9.0.tgz", "integrity": "sha512-9kY+CygyYM6j02t5YFHbNz2FN5QmYGv9zAjVp4lCDjlCw7amdckXlEt/bjMhUIfj4ThGRE4gCUH5+yGnNuPo5A==", + "dev": true, "license": "BSD-3-Clause", "dependencies": { "ajv": "^8.0.1", @@ -3850,6 +3962,7 @@ "version": "8.17.1", "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", + "dev": true, "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.3", @@ -3866,12 +3979,14 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true, "license": "MIT" }, "node_modules/text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true, "license": "MIT" }, "node_modules/tinybench": { @@ -3887,14 +4002,12 @@ "license": "MIT" }, "node_modules/tinyglobby": { - "version": "0.2.12", - "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.12.tgz", - "integrity": "sha512-qkf4trmKSIiMTs/E63cxH+ojC2unam7rJ0WrauAzpT3ECNTxGRMlaXxVbfxMUC/w0LaYk6jQ4y/nGR9uBO3tww==", + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.13.tgz", + "integrity": "sha512-mEwzpUgrLySlveBwEVDMKk5B57bhLPYovRfPAXD5gA/98Opn0rCDj3GtLwFvCvH5RK9uPCExUROW5NjDwvqkxw==", "license": "MIT", - "optional": true, - "peer": true, "dependencies": { - "fdir": "^6.4.3", + "fdir": "^6.4.4", "picomatch": "^4.0.2" }, "engines": { @@ -3943,17 +4056,6 @@ "node": ">=0.6.0" } }, - "node_modules/totalist": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/totalist/-/totalist-3.0.1.tgz", - "integrity": "sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==", - "license": "MIT", - "optional": true, - "peer": true, - "engines": { - "node": ">=6" - } - }, "node_modules/type-detect": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz", @@ -3987,6 +4089,7 @@ "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, "license": "BSD-2-Clause", "dependencies": { "punycode": "^2.1.0" @@ -4023,14 +4126,17 @@ } }, "node_modules/vite": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/vite/-/vite-6.2.0.tgz", - "integrity": "sha512-7dPxoo+WsT/64rDcwoOjk76XHj+TqNTIvHKcuMQ1k4/SeHDaQt5GFAeLYzrimZrMpn/O6DtdI03WUjdxuPM0oQ==", + "version": "6.3.5", + "resolved": "https://registry.npmjs.org/vite/-/vite-6.3.5.tgz", + "integrity": "sha512-cZn6NDFE7wdTpINgs++ZJ4N49W2vRp8LCKrn3Ob1kYNtOo21vfDoaV5GzBfLU4MovSAB8uNRm4jgzVQZ+mBzPQ==", "license": "MIT", "dependencies": { "esbuild": "^0.25.0", + "fdir": "^6.4.4", + "picomatch": "^4.0.2", "postcss": "^8.5.3", - "rollup": "^4.30.1" + "rollup": "^4.34.9", + "tinyglobby": "^0.2.13" }, "bin": { "vite": "bin/vite.js" @@ -4094,14 +4200,14 @@ } }, "node_modules/vite-node": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-3.0.6.tgz", - "integrity": "sha512-s51RzrTkXKJrhNbUzQRsarjmAae7VmMPAsRT7lppVpIg6mK3zGthP9Hgz0YQQKuNcF+Ii7DfYk3Fxz40jRmePw==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-3.1.3.tgz", + "integrity": "sha512-uHV4plJ2IxCl4u1up1FQRrqclylKAogbtBfOTwcuJ28xFi+89PZ57BRh+naIRvH70HPwxy5QHYzg1OrEaC7AbA==", "license": "MIT", "dependencies": { "cac": "^6.7.14", "debug": "^4.4.0", - "es-module-lexer": "^1.6.0", + "es-module-lexer": "^1.7.0", "pathe": "^2.0.3", "vite": "^5.0.0 || ^6.0.0" }, @@ -4116,30 +4222,31 @@ } }, "node_modules/vitest": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-3.0.6.tgz", - "integrity": "sha512-/iL1Sc5VeDZKPDe58oGK4HUFLhw6b5XdY1MYawjuSaDA4sEfYlY9HnS6aCEG26fX+MgUi7MwlduTBHHAI/OvMA==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-3.1.3.tgz", + "integrity": "sha512-188iM4hAHQ0km23TN/adso1q5hhwKqUpv+Sd6p5sOuh6FhQnRNW3IsiIpvxqahtBabsJ2SLZgmGSpcYK4wQYJw==", "license": "MIT", "dependencies": { - "@vitest/expect": "3.0.6", - "@vitest/mocker": "3.0.6", - "@vitest/pretty-format": "^3.0.6", - "@vitest/runner": "3.0.6", - "@vitest/snapshot": "3.0.6", - "@vitest/spy": "3.0.6", - "@vitest/utils": "3.0.6", + "@vitest/expect": "3.1.3", + "@vitest/mocker": "3.1.3", + "@vitest/pretty-format": "^3.1.3", + "@vitest/runner": "3.1.3", + "@vitest/snapshot": "3.1.3", + "@vitest/spy": "3.1.3", + "@vitest/utils": "3.1.3", "chai": "^5.2.0", "debug": "^4.4.0", - "expect-type": "^1.1.0", + "expect-type": "^1.2.1", "magic-string": "^0.30.17", "pathe": "^2.0.3", - "std-env": "^3.8.0", + "std-env": "^3.9.0", "tinybench": "^2.9.0", "tinyexec": "^0.3.2", + "tinyglobby": "^0.2.13", "tinypool": "^1.0.2", "tinyrainbow": "^2.0.0", "vite": "^5.0.0 || ^6.0.0", - "vite-node": "3.0.6", + "vite-node": "3.1.3", "why-is-node-running": "^2.3.0" }, "bin": { @@ -4155,8 +4262,8 @@ "@edge-runtime/vm": "*", "@types/debug": "^4.1.12", "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", - "@vitest/browser": "3.0.6", - "@vitest/ui": "3.0.6", + "@vitest/browser": "3.1.3", + "@vitest/ui": "3.1.3", "happy-dom": "*", "jsdom": "*" }, @@ -4262,6 +4369,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true, "license": "ISC" }, "node_modules/ws": { diff --git a/eth-rpc/package.json b/eth-rpc/package.json index e0b50c2..5a2323e 100644 --- a/eth-rpc/package.json +++ b/eth-rpc/package.json @@ -5,22 +5,26 @@ "type": "module", "scripts": { "build": "npx tsx src/build-contracts.ts", - "test": "vitest --test-timeout=30000 --no-file-parallelism", - "test-init": "vitest run --test-timeout=30000 --no-file-parallelism", - "prettier": "prettier --write .", + "test": "vitest --test-timeout=30000 --no-file-parallelism --bail 1", + "test:update": "START_GETH=1 vitest run --reporter=verbose --test-timeout=30000 --no-file-parallelism --update", + "test-init": "vitest run --reporter=verbose --test-timeout=30000 --no-file-parallelism", + "lint": "prettier --plugin=prettier-plugin-solidity --check . --write", "solhint": "solhint \"contracts/**/*.sol\"" }, "dependencies": { - "@parity/revive": "^0.0.14", - "@redstone-finance/evm-connector": "^0.6.2", + "@parity/resolc": "^0.2.0", + "@redstone-finance/evm-connector": "^0.8.0", + "@redstone-finance/sdk": "^0.8.0", "ethers": "^5.6.9", "prettier": "^3.5.1", "solc": "^0.8.28", - "solhint": "^5.0.5", "viem": "^2.22.4", "vitest": "^3.0.6" }, "devDependencies": { - "typescript": "^5.7.2" + "typescript": "^5.7.2", + "solhint": "^5.0.5", + "prettier": "^3.5.1", + "prettier-plugin-solidity": "^1.4.2" } } diff --git a/eth-rpc/revive_chain.metadata b/eth-rpc/revive_chain.metadata new file mode 100644 index 0000000..5b41455 Binary files /dev/null and b/eth-rpc/revive_chain.metadata differ diff --git a/eth-rpc/src/build-contracts.ts b/eth-rpc/src/build-contracts.ts index 4b8e4c0..0123f68 100644 --- a/eth-rpc/src/build-contracts.ts +++ b/eth-rpc/src/build-contracts.ts @@ -1,6 +1,6 @@ /// -import { compile, SolcOutput, tryResolveImport } from '@parity/revive' +import { compile, SolcOutput, tryResolveImport } from '@parity/resolc' import { format } from 'prettier' import { parseArgs } from 'node:util' import solc from 'solc' @@ -81,11 +81,13 @@ for (const file of input) { for (const contracts of Object.values(reviveOut.contracts)) { for (const [name, contract] of Object.entries(contracts)) { - console.log(`📜 Add PVM contract ${name}`) - writeFileSync( - join(pvmDir, `${name}.polkavm`), - Buffer.from(contract.evm.bytecode.object, 'hex') - ) + if (contract?.evm?.bytecode?.object) { + console.log(`📜 Add PVM contract ${name}`) + writeFileSync( + join(pvmDir, `${name}.polkavm`), + Buffer.from(contract.evm.bytecode.object, 'hex') + ) + } } } } diff --git a/eth-rpc/src/errors.test.ts b/eth-rpc/src/errors.test.ts new file mode 100644 index 0000000..975bef9 --- /dev/null +++ b/eth-rpc/src/errors.test.ts @@ -0,0 +1,127 @@ +import { + jsonRpcErrors, + getByteCode, + createEnv, + memoizedDeploy, +} from './util.ts' +import { afterEach, describe, expect, inject, test } from 'vitest' +import { fail } from 'node:assert' +import { ErrorsAbi } from '../abi/Errors.ts' + +afterEach(() => { + jsonRpcErrors.length = 0 +}) + +const envs = await Promise.all(inject('envs').map(createEnv)) +for (const env of envs) { + const getErrorTesterAddr = memoizedDeploy(env, () => + env.serverWallet.deployContract({ + abi: ErrorsAbi, + bytecode: getByteCode('Errors', env.evm), + }) + ) + + describe(env.serverWallet.chain.name, () => { + test('triggerAssertError', async () => { + try { + await env.accountWallet.readContract({ + address: await getErrorTesterAddr(), + abi: ErrorsAbi, + functionName: 'triggerAssertError', + }) + fail('Expect call to fail') + } catch (err) { + const lastJsonRpcError = jsonRpcErrors.pop() + expect(lastJsonRpcError?.code).toBe(3) + expect(lastJsonRpcError?.data).toBe( + '0x4e487b710000000000000000000000000000000000000000000000000000000000000001' + ) + expect(lastJsonRpcError?.message).toBeOneOf([ + 'execution reverted: assert(false)', + 'execution reverted: panic: assertion failed (0x01)', + ]) + } + }) + + test('triggerRevertError', async () => { + try { + await env.accountWallet.readContract({ + address: await getErrorTesterAddr(), + abi: ErrorsAbi, + functionName: 'triggerRevertError', + }) + fail('Expect call to fail') + } catch (err) { + const lastJsonRpcError = jsonRpcErrors.pop() + expect(lastJsonRpcError?.code).toBe(3) + expect(lastJsonRpcError?.message).toBeOneOf([ + 'execution reverted: This is a revert error', + 'execution reverted: revert: This is a revert error', + ]) + expect(lastJsonRpcError?.data).toBe( + '0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001654686973206973206120726576657274206572726f7200000000000000000000' + ) + } + }) + + test('triggerDivisionByZero', async () => { + try { + await env.accountWallet.readContract({ + address: await getErrorTesterAddr(), + abi: ErrorsAbi, + functionName: 'triggerDivisionByZero', + }) + expect.assertions(3) + } catch (err) { + const lastJsonRpcError = jsonRpcErrors.pop() + expect(lastJsonRpcError?.code).toBe(3) + expect(lastJsonRpcError?.data).toBe( + '0x4e487b710000000000000000000000000000000000000000000000000000000000000012' + ) + expect(lastJsonRpcError?.message).toBeOneOf([ + 'execution reverted: division or modulo by zero', + 'execution reverted: panic: division or modulo by zero (0x12)', + ]) + } + }) + + test('triggerOutOfBoundsError', async () => { + try { + await env.accountWallet.readContract({ + address: await getErrorTesterAddr(), + abi: ErrorsAbi, + functionName: 'triggerOutOfBoundsError', + }) + fail('Expect call to fail') + } catch (err) { + const lastJsonRpcError = jsonRpcErrors.pop() + expect(lastJsonRpcError?.code).toBe(3) + expect(lastJsonRpcError?.data).toBe( + '0x4e487b710000000000000000000000000000000000000000000000000000000000000032' + ) + expect(lastJsonRpcError?.message).toBeOneOf([ + 'execution reverted: out-of-bounds access of an array or bytesN', + 'execution reverted: panic: array out-of-bounds access (0x32)', + ]) + } + }) + + test('triggerCustomError', async () => { + try { + await env.accountWallet.readContract({ + address: await getErrorTesterAddr(), + abi: ErrorsAbi, + functionName: 'triggerCustomError', + }) + fail('Expect call to fail') + } catch (err) { + const lastJsonRpcError = jsonRpcErrors.pop() + expect(lastJsonRpcError?.code).toBe(3) + expect(lastJsonRpcError?.data).toBe( + '0x8d6ea8be0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001654686973206973206120637573746f6d206572726f7200000000000000000000' + ) + expect(lastJsonRpcError?.message).toBe('execution reverted') + } + }) + }) +} diff --git a/eth-rpc/src/fixtures/debug_traceCall.json b/eth-rpc/src/fixtures/debug_traceCall.json deleted file mode 100644 index d85f121..0000000 --- a/eth-rpc/src/fixtures/debug_traceCall.json +++ /dev/null @@ -1,147 +0,0 @@ -{ - "from": "0x0000000000000000000000000000000000000000", - "gas": "0x42", - "gasUsed": "0x42", - "to": "", - "input": "0x95805dad0000000000000000000000000000000000000000000000000000000000000002", - "calls": [ - { - "from": "", - "gas": "0x42", - "gasUsed": "0x42", - "to": "", - "input": "0x", - "value": "0x2386f26fc10000", - "type": "CALL" - }, - { - "from": "", - "gas": "0x42", - "gasUsed": "0x42", - "to": "", - "input": "0xa329e8de0000000000000000000000000000000000000000000000000000000000000002", - "logs": [ - { - "address": "", - "topics": [ - "0xa07465e8ec189714f79f3786a8f616baf78ebd9cb1769bd61f18de45f2567360" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000002", - "position": "0x0" - } - ], - "value": "0x0", - "type": "CALL" - }, - { - "from": "", - "gas": "0x42", - "gasUsed": "0x42", - "to": "", - "input": "0xd1b96663", - "output": "0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001a546869732066756e6374696f6e20616c77617973206661696c73000000000000", - "error": "execution reverted", - "revertReason": "This function always fails", - "value": "0x2386f26fc10000", - "type": "CALL" - }, - { - "from": "", - "gas": "0x42", - "gasUsed": "0x42", - "to": "", - "input": "0x95805dad0000000000000000000000000000000000000000000000000000000000000001", - "calls": [ - { - "from": "", - "gas": "0x42", - "gasUsed": "0x42", - "to": "", - "input": "0x", - "value": "0x2386f26fc10000", - "type": "CALL" - }, - { - "from": "", - "gas": "0x42", - "gasUsed": "0x42", - "to": "", - "input": "0xa329e8de0000000000000000000000000000000000000000000000000000000000000001", - "logs": [ - { - "address": "", - "topics": [ - "0xa07465e8ec189714f79f3786a8f616baf78ebd9cb1769bd61f18de45f2567360" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "position": "0x0" - } - ], - "value": "0x0", - "type": "CALL" - }, - { - "from": "", - "gas": "0x42", - "gasUsed": "0x42", - "to": "", - "input": "0xd1b96663", - "output": "0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001a546869732066756e6374696f6e20616c77617973206661696c73000000000000", - "error": "execution reverted", - "revertReason": "This function always fails", - "value": "0x2386f26fc10000", - "type": "CALL" - }, - { - "from": "", - "gas": "0x42", - "gasUsed": "0x42", - "to": "", - "input": "0x95805dad0000000000000000000000000000000000000000000000000000000000000000", - "value": "0x0", - "type": "CALL" - } - ], - "logs": [ - { - "address": "", - "topics": [ - "0x25d760f35a7a9cb2bffd2ea8756913655b3786c642f300a702e2934062763549" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000066265666f72650000000000000000000000000000000000000000000000000000", - "position": "0x1" - }, - { - "address": "", - "topics": [ - "0x25d760f35a7a9cb2bffd2ea8756913655b3786c642f300a702e2934062763549" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000056166746572000000000000000000000000000000000000000000000000000000", - "position": "0x2" - } - ], - "value": "0x0", - "type": "CALL" - } - ], - "logs": [ - { - "address": "", - "topics": [ - "0x25d760f35a7a9cb2bffd2ea8756913655b3786c642f300a702e2934062763549" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000066265666f72650000000000000000000000000000000000000000000000000000", - "position": "0x1" - }, - { - "address": "", - "topics": [ - "0x25d760f35a7a9cb2bffd2ea8756913655b3786c642f300a702e2934062763549" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000056166746572000000000000000000000000000000000000000000000000000000", - "position": "0x2" - } - ], - "value": "0x0", - "type": "CALL" -} diff --git a/eth-rpc/src/fixtures/trace_block.json b/eth-rpc/src/fixtures/trace_block.json deleted file mode 100644 index 813f032..0000000 --- a/eth-rpc/src/fixtures/trace_block.json +++ /dev/null @@ -1,152 +0,0 @@ -[ - { - "txHash": "", - "result": { - "from": "", - "gas": "0x42", - "gasUsed": "0x42", - "to": "", - "input": "0x95805dad0000000000000000000000000000000000000000000000000000000000000002", - "calls": [ - { - "from": "", - "gas": "0x42", - "gasUsed": "0x42", - "to": "", - "input": "0x", - "value": "0x2386f26fc10000", - "type": "CALL" - }, - { - "from": "", - "gas": "0x42", - "gasUsed": "0x42", - "to": "", - "input": "0xa329e8de0000000000000000000000000000000000000000000000000000000000000002", - "logs": [ - { - "address": "", - "topics": [ - "0xa07465e8ec189714f79f3786a8f616baf78ebd9cb1769bd61f18de45f2567360" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000002", - "position": "0x0" - } - ], - "value": "0x0", - "type": "CALL" - }, - { - "from": "", - "gas": "0x42", - "gasUsed": "0x42", - "to": "", - "input": "0xd1b96663", - "output": "0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001a546869732066756e6374696f6e20616c77617973206661696c73000000000000", - "error": "execution reverted", - "revertReason": "This function always fails", - "value": "0x2386f26fc10000", - "type": "CALL" - }, - { - "from": "", - "gas": "0x42", - "gasUsed": "0x42", - "to": "", - "input": "0x95805dad0000000000000000000000000000000000000000000000000000000000000001", - "calls": [ - { - "from": "", - "gas": "0x42", - "gasUsed": "0x42", - "to": "", - "input": "0x", - "value": "0x2386f26fc10000", - "type": "CALL" - }, - { - "from": "", - "gas": "0x42", - "gasUsed": "0x42", - "to": "", - "input": "0xa329e8de0000000000000000000000000000000000000000000000000000000000000001", - "logs": [ - { - "address": "", - "topics": [ - "0xa07465e8ec189714f79f3786a8f616baf78ebd9cb1769bd61f18de45f2567360" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "position": "0x0" - } - ], - "value": "0x0", - "type": "CALL" - }, - { - "from": "", - "gas": "0x42", - "gasUsed": "0x42", - "to": "", - "input": "0xd1b96663", - "output": "0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001a546869732066756e6374696f6e20616c77617973206661696c73000000000000", - "error": "execution reverted", - "revertReason": "This function always fails", - "value": "0x2386f26fc10000", - "type": "CALL" - }, - { - "from": "", - "gas": "0x42", - "gasUsed": "0x42", - "to": "", - "input": "0x95805dad0000000000000000000000000000000000000000000000000000000000000000", - "value": "0x0", - "type": "CALL" - } - ], - "logs": [ - { - "address": "", - "topics": [ - "0x25d760f35a7a9cb2bffd2ea8756913655b3786c642f300a702e2934062763549" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000066265666f72650000000000000000000000000000000000000000000000000000", - "position": "0x1" - }, - { - "address": "", - "topics": [ - "0x25d760f35a7a9cb2bffd2ea8756913655b3786c642f300a702e2934062763549" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000056166746572000000000000000000000000000000000000000000000000000000", - "position": "0x2" - } - ], - "value": "0x0", - "type": "CALL" - } - ], - "logs": [ - { - "address": "", - "topics": [ - "0x25d760f35a7a9cb2bffd2ea8756913655b3786c642f300a702e2934062763549" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000066265666f72650000000000000000000000000000000000000000000000000000", - "position": "0x1" - }, - { - "address": "", - "topics": [ - "0x25d760f35a7a9cb2bffd2ea8756913655b3786c642f300a702e2934062763549" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000056166746572000000000000000000000000000000000000000000000000000000", - "position": "0x2" - } - ], - "value": "0x0", - "type": "CALL" - } - } -] diff --git a/eth-rpc/src/fixtures/trace_transaction.json b/eth-rpc/src/fixtures/trace_transaction.json deleted file mode 100644 index d9e9a6f..0000000 --- a/eth-rpc/src/fixtures/trace_transaction.json +++ /dev/null @@ -1,147 +0,0 @@ -{ - "from": "", - "gas": "0x42", - "gasUsed": "0x42", - "to": "", - "input": "0x95805dad0000000000000000000000000000000000000000000000000000000000000002", - "calls": [ - { - "from": "", - "gas": "0x42", - "gasUsed": "0x42", - "to": "", - "input": "0x", - "value": "0x2386f26fc10000", - "type": "CALL" - }, - { - "from": "", - "gas": "0x42", - "gasUsed": "0x42", - "to": "", - "input": "0xa329e8de0000000000000000000000000000000000000000000000000000000000000002", - "logs": [ - { - "address": "", - "topics": [ - "0xa07465e8ec189714f79f3786a8f616baf78ebd9cb1769bd61f18de45f2567360" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000002", - "position": "0x0" - } - ], - "value": "0x0", - "type": "CALL" - }, - { - "from": "", - "gas": "0x42", - "gasUsed": "0x42", - "to": "", - "input": "0xd1b96663", - "output": "0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001a546869732066756e6374696f6e20616c77617973206661696c73000000000000", - "error": "execution reverted", - "revertReason": "This function always fails", - "value": "0x2386f26fc10000", - "type": "CALL" - }, - { - "from": "", - "gas": "0x42", - "gasUsed": "0x42", - "to": "", - "input": "0x95805dad0000000000000000000000000000000000000000000000000000000000000001", - "calls": [ - { - "from": "", - "gas": "0x42", - "gasUsed": "0x42", - "to": "", - "input": "0x", - "value": "0x2386f26fc10000", - "type": "CALL" - }, - { - "from": "", - "gas": "0x42", - "gasUsed": "0x42", - "to": "", - "input": "0xa329e8de0000000000000000000000000000000000000000000000000000000000000001", - "logs": [ - { - "address": "", - "topics": [ - "0xa07465e8ec189714f79f3786a8f616baf78ebd9cb1769bd61f18de45f2567360" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "position": "0x0" - } - ], - "value": "0x0", - "type": "CALL" - }, - { - "from": "", - "gas": "0x42", - "gasUsed": "0x42", - "to": "", - "input": "0xd1b96663", - "output": "0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001a546869732066756e6374696f6e20616c77617973206661696c73000000000000", - "error": "execution reverted", - "revertReason": "This function always fails", - "value": "0x2386f26fc10000", - "type": "CALL" - }, - { - "from": "", - "gas": "0x42", - "gasUsed": "0x42", - "to": "", - "input": "0x95805dad0000000000000000000000000000000000000000000000000000000000000000", - "value": "0x0", - "type": "CALL" - } - ], - "logs": [ - { - "address": "", - "topics": [ - "0x25d760f35a7a9cb2bffd2ea8756913655b3786c642f300a702e2934062763549" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000066265666f72650000000000000000000000000000000000000000000000000000", - "position": "0x1" - }, - { - "address": "", - "topics": [ - "0x25d760f35a7a9cb2bffd2ea8756913655b3786c642f300a702e2934062763549" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000056166746572000000000000000000000000000000000000000000000000000000", - "position": "0x2" - } - ], - "value": "0x0", - "type": "CALL" - } - ], - "logs": [ - { - "address": "", - "topics": [ - "0x25d760f35a7a9cb2bffd2ea8756913655b3786c642f300a702e2934062763549" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000066265666f72650000000000000000000000000000000000000000000000000000", - "position": "0x1" - }, - { - "address": "", - "topics": [ - "0x25d760f35a7a9cb2bffd2ea8756913655b3786c642f300a702e2934062763549" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000056166746572000000000000000000000000000000000000000000000000000000", - "position": "0x2" - } - ], - "value": "0x0", - "type": "CALL" -} diff --git a/eth-rpc/src/geth-diff.test.ts b/eth-rpc/src/geth-diff.test.ts deleted file mode 100644 index 19991dc..0000000 --- a/eth-rpc/src/geth-diff.test.ts +++ /dev/null @@ -1,463 +0,0 @@ -import { - jsonRpcErrors, - getByteCode, - visit, - createEnv, - deployFactory, -} from './util.ts' -import { afterEach, describe, expect, inject, test } from 'vitest' -import fs from 'node:fs' -import { fail } from 'node:assert' - -import { encodeFunctionData, parseEther, decodeEventLog } from 'viem' -import { ErrorsAbi } from '../abi/Errors.ts' -import { EventExampleAbi } from '../abi/EventExample.ts' -import { TracingCallerAbi } from '../abi/TracingCaller.ts' -import { TracingCalleeAbi } from '../abi/TracingCallee.ts' - -afterEach(() => { - jsonRpcErrors.length = 0 -}) - -const envs = await Promise.all(inject('envs').map(createEnv)) -for (const env of envs) { - const [getErrorTesterAddr] = deployFactory(env, () => - env.serverWallet.deployContract({ - abi: ErrorsAbi, - bytecode: getByteCode('Errors', env.evm), - }) - ) - - const [getEventExampleAddr] = deployFactory(env, async () => - env.serverWallet.deployContract({ - abi: EventExampleAbi, - bytecode: getByteCode('EventExample', env.evm), - }) - ) - - const [getTracingCalleeAddr] = deployFactory(env, async () => - env.serverWallet.deployContract({ - abi: TracingCalleeAbi, - bytecode: getByteCode('TracingCallee', env.evm), - }) - ) - - const [getTracingCallerAddr] = deployFactory(env, async () => - env.serverWallet.deployContract({ - abi: TracingCallerAbi, - args: [await getTracingCalleeAddr()], - bytecode: getByteCode('TracingCaller', env.evm), - value: parseEther('10'), - }) - ) - describe(`${env.serverWallet.chain.name}`, () => { - test('triggerAssertError', async () => { - try { - await env.accountWallet.readContract({ - address: await getErrorTesterAddr(), - abi: ErrorsAbi, - functionName: 'triggerAssertError', - }) - fail('Expect call to fail') - } catch (err) { - const lastJsonRpcError = jsonRpcErrors.pop() - expect(lastJsonRpcError?.code).toBe(3) - expect(lastJsonRpcError?.data).toBe( - '0x4e487b710000000000000000000000000000000000000000000000000000000000000001' - ) - expect(lastJsonRpcError?.message).toBeOneOf([ - 'execution reverted: assert(false)', - 'execution reverted: panic: assertion failed (0x01)', - ]) - } - }) - - test('triggerRevertError', async () => { - try { - await env.accountWallet.readContract({ - address: await getErrorTesterAddr(), - abi: ErrorsAbi, - functionName: 'triggerRevertError', - }) - fail('Expect call to fail') - } catch (err) { - const lastJsonRpcError = jsonRpcErrors.pop() - expect(lastJsonRpcError?.code).toBe(3) - expect(lastJsonRpcError?.message).toBeOneOf([ - 'execution reverted: This is a revert error', - 'execution reverted: revert: This is a revert error', - ]) - expect(lastJsonRpcError?.data).toBe( - '0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001654686973206973206120726576657274206572726f7200000000000000000000' - ) - } - }) - - test('triggerDivisionByZero', async () => { - try { - await env.accountWallet.readContract({ - address: await getErrorTesterAddr(), - abi: ErrorsAbi, - functionName: 'triggerDivisionByZero', - }) - expect.assertions(3) - } catch (err) { - const lastJsonRpcError = jsonRpcErrors.pop() - expect(lastJsonRpcError?.code).toBe(3) - expect(lastJsonRpcError?.data).toBe( - '0x4e487b710000000000000000000000000000000000000000000000000000000000000012' - ) - expect(lastJsonRpcError?.message).toBeOneOf([ - 'execution reverted: division or modulo by zero', - 'execution reverted: panic: division or modulo by zero (0x12)', - ]) - } - }) - - test('triggerOutOfBoundsError', async () => { - try { - await env.accountWallet.readContract({ - address: await getErrorTesterAddr(), - abi: ErrorsAbi, - functionName: 'triggerOutOfBoundsError', - }) - fail('Expect call to fail') - } catch (err) { - const lastJsonRpcError = jsonRpcErrors.pop() - expect(lastJsonRpcError?.code).toBe(3) - expect(lastJsonRpcError?.data).toBe( - '0x4e487b710000000000000000000000000000000000000000000000000000000000000032' - ) - expect(lastJsonRpcError?.message).toBeOneOf([ - 'execution reverted: out-of-bounds access of an array or bytesN', - 'execution reverted: panic: array out-of-bounds access (0x32)', - ]) - } - }) - - test('triggerCustomError', async () => { - try { - await env.accountWallet.readContract({ - address: await getErrorTesterAddr(), - abi: ErrorsAbi, - functionName: 'triggerCustomError', - }) - fail('Expect call to fail') - } catch (err) { - const lastJsonRpcError = jsonRpcErrors.pop() - expect(lastJsonRpcError?.code).toBe(3) - expect(lastJsonRpcError?.data).toBe( - '0x8d6ea8be0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001654686973206973206120637573746f6d206572726f7200000000000000000000' - ) - expect(lastJsonRpcError?.message).toBe('execution reverted') - } - }) - - test('eth_call (not enough funds)', async () => { - try { - await env.emptyWallet.simulateContract({ - address: await getErrorTesterAddr(), - abi: ErrorsAbi, - functionName: 'valueMatch', - value: parseEther('10'), - args: [parseEther('10')], - }) - fail('Expect call to fail') - } catch (err) { - const lastJsonRpcError = jsonRpcErrors.pop() - expect(lastJsonRpcError?.code).toBe(-32000) - expect(lastJsonRpcError?.message).to.include( - 'insufficient funds' - ) - expect(lastJsonRpcError?.data).toBeUndefined() - } - }) - - test('eth_call transfer (not enough funds)', async () => { - const value = parseEther('10') - const balance = await env.emptyWallet.getBalance( - env.emptyWallet.account - ) - expect(balance, 'Balance should be less than 10').toBeLessThan( - value - ) - try { - await env.emptyWallet.sendTransaction({ - to: '0x75E480dB528101a381Ce68544611C169Ad7EB342', - value, - }) - fail('Expect call to fail') - } catch (err) { - const lastJsonRpcError = jsonRpcErrors.pop() - expect(lastJsonRpcError?.code).toBe(-32000) - expect(lastJsonRpcError?.message).to.include( - 'insufficient funds' - ) - expect(lastJsonRpcError?.data).toBeUndefined() - } - }) - - test('eth_estimate (not enough funds)', async () => { - try { - await env.emptyWallet.estimateContractGas({ - address: await getErrorTesterAddr(), - abi: ErrorsAbi, - functionName: 'valueMatch', - value: parseEther('10'), - args: [parseEther('10')], - }) - fail('Expect call to fail') - } catch (err) { - const lastJsonRpcError = jsonRpcErrors.pop() - expect(lastJsonRpcError?.code).toBe(-32000) - expect(lastJsonRpcError?.message).to.include( - 'insufficient funds' - ) - expect(lastJsonRpcError?.data).toBeUndefined() - } - }) - - test('eth_estimate call caller (not enough funds)', async () => { - try { - await env.emptyWallet.estimateContractGas({ - address: await getErrorTesterAddr(), - abi: ErrorsAbi, - functionName: 'valueMatch', - value: parseEther('10'), - args: [parseEther('10')], - }) - fail('Expect call to fail') - } catch (err) { - const lastJsonRpcError = jsonRpcErrors.pop() - expect(lastJsonRpcError?.code).toBe(-32000) - expect(lastJsonRpcError?.message).to.include( - 'insufficient funds' - ) - expect(lastJsonRpcError?.data).toBeUndefined() - } - }) - - test('eth_estimate (revert)', async () => { - try { - await env.serverWallet.estimateContractGas({ - address: await getErrorTesterAddr(), - abi: ErrorsAbi, - functionName: 'valueMatch', - value: parseEther('11'), - args: [parseEther('10')], - }) - fail('Expect call to fail') - } catch (err) { - const lastJsonRpcError = jsonRpcErrors.pop() - expect(lastJsonRpcError?.code).toBe(3) - expect(lastJsonRpcError?.message).toBeOneOf([ - 'execution reverted: msg.value does not match value', - 'execution reverted: revert: msg.value does not match value', - ]) - expect(lastJsonRpcError?.data).toBe( - '0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001e6d73672e76616c756520646f6573206e6f74206d617463682076616c75650000' - ) - } - }) - - test('eth_get_balance (no account)', async () => { - const balance = await env.serverWallet.getBalance({ - address: '0x0000000000000000000000000000000000000123', - }) - expect(balance).toBe(0n) - }) - - test('eth_estimate (not enough funds to cover gas specified)', async () => { - let balance = await env.serverWallet.getBalance( - env.emptyWallet.account - ) - expect(balance).toBe(0n) - try { - await env.emptyWallet.estimateContractGas({ - address: await getErrorTesterAddr(), - abi: ErrorsAbi, - functionName: 'setState', - args: [true], - }) - fail('Expect call to fail') - } catch (err) { - const lastJsonRpcError = jsonRpcErrors.pop() - expect(lastJsonRpcError?.code).toBe(-32000) - expect(lastJsonRpcError?.message).to.include( - 'insufficient funds' - ) - expect(lastJsonRpcError?.data).toBeUndefined() - } - }) - - test('eth_estimate (no gas specified)', async () => { - let balance = await env.serverWallet.getBalance( - env.emptyWallet.account - ) - expect(balance).toBe(0n) - - const data = encodeFunctionData({ - abi: ErrorsAbi, - functionName: 'setState', - args: [true], - }) - - await env.emptyWallet.request({ - method: 'eth_estimateGas', - params: [ - { - data, - from: env.emptyWallet.account.address, - to: await getErrorTesterAddr(), - }, - ], - }) - }) - - test('logs', async () => { - let address = await getEventExampleAddr() - let { request } = await env.serverWallet.simulateContract({ - address, - abi: EventExampleAbi, - functionName: 'triggerEvent', - }) - - let hash = await env.serverWallet.writeContract(request) - let receipt = await env.serverWallet.waitForTransactionReceipt({ - hash, - }) - const logs = await env.serverWallet.getLogs({ - address, - blockHash: receipt.blockHash, - }) - expect(logs).toHaveLength(1) - expect(logs[0]).toMatchObject({ - address, - data: '0x00000000000000000000000000000000000000000000000000000000000030390000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000b48656c6c6f20776f726c64000000000000000000000000000000000000000000', - transactionHash: hash, - }) - - expect( - decodeEventLog({ - abi: EventExampleAbi, - data: logs[0].data, - topics: logs[0].topics, - }) - ).toEqual({ - eventName: 'ExampleEvent', - args: { - sender: env.serverWallet.account.address, - value: 12345n, - message: 'Hello world', - }, - }) - }) - - test('tracing', async () => { - const calleeAddr = await getTracingCalleeAddr() - const callerAddr = await getTracingCallerAddr() - - const receipt = await (async () => { - const { request } = await env.serverWallet.simulateContract({ - address: callerAddr, - abi: TracingCallerAbi, - functionName: 'start', - args: [2n], - }) - const hash = await env.serverWallet.writeContract(request) - return await env.serverWallet.waitForTransactionReceipt({ - hash, - }) - })() - - const visitor: Parameters[1] = (key, value) => { - switch (key) { - case 'address': - case 'from': - case 'to': { - if (value === callerAddr) { - return '' - } else if (value === calleeAddr) { - return '' - } else if ( - value == - env.serverWallet.account.address.toLowerCase() - ) { - return '' - } - - return value - } - case 'revertReason': - return value.startsWith('revert: ') - ? value.slice('revert: '.length) - : value - - case 'gas': - case 'gasUsed': { - return '0x42' - } - case 'txHash': { - return '' - } - default: { - return value - } - } - } - - // test debug_traceTransaction - { - const fixture = JSON.parse( - fs.readFileSync( - './src/fixtures/trace_transaction.json', - 'utf-8' - ) - ) - - const res = await env.debugClient.traceTransaction( - receipt.transactionHash, - { - withLog: true, - } - ) - expect(visit(res, visitor)).toEqual(fixture) - } - - // test debug_traceBlock - { - const res = await env.debugClient.traceBlock( - receipt.blockNumber, - { withLog: true } - ) - const fixture = JSON.parse( - fs.readFileSync('./src/fixtures/trace_block.json', 'utf-8') - ) - - expect(visit(res, visitor)).toEqual(fixture) - } - - // test debug_traceCall - { - const fixture = JSON.parse( - fs.readFileSync( - './src/fixtures/debug_traceCall.json', - 'utf-8' - ) - ) - const res = await env.debugClient.traceCall( - { - to: callerAddr, - data: encodeFunctionData({ - abi: TracingCallerAbi, - functionName: 'start', - args: [2n], - }), - }, - { withLog: true } - ) - expect(visit(res, visitor)).toEqual(fixture) - } - }) - }) -} diff --git a/eth-rpc/src/methods.test.ts b/eth-rpc/src/methods.test.ts index c746a11..39b89ff 100644 --- a/eth-rpc/src/methods.test.ts +++ b/eth-rpc/src/methods.test.ts @@ -5,21 +5,24 @@ import { hexToNumber, parseEther, } from 'viem' -import { createEnv, deployFactory, getByteCode } from './util.ts' +import { createEnv, getByteCode, memoizedTx } from './util.ts' import { describe, expect, inject, test } from 'vitest' import { TesterAbi } from '../abi/Tester.ts' const envs = await Promise.all(inject('envs').map(createEnv)) for (const env of envs) { - const [getTesterAddr, getTesterReceipt] = deployFactory(env, async () => + const getTesterReceipt = memoizedTx(env, async () => env.serverWallet.deployContract({ abi: TesterAbi, bytecode: getByteCode('Tester', env.evm), value: parseEther('2'), }) ) - describe(`${env.serverWallet.chain.name}`, () => { + const getTesterAddr = () => + getTesterReceipt().then((r) => r.contractAddress!) + + describe(env.serverWallet.chain.name, () => { test('eth_accounts works', async () => { const addresses = await env.debugClient.request({ method: 'eth_accounts', @@ -133,15 +136,9 @@ for (const env of envs) { }) // revive store value as little endian. When this change in the compiler, or the runtime API, we can amend this test - if (env.evm) { - expect(storage).toEqual( - '0x48656c6c6f20776f726c64000000000000000000000000000000000000000016' - ) - } else { - expect(storage).toEqual( - '0x160000000000000000000000000000000000000000646c726f77206f6c6c6548' - ) - } + expect(storage).toEqual( + '0x48656c6c6f20776f726c64000000000000000000000000000000000000000016' + ) }) test('get_transaction_by_block_hash_and_index, eth_getTransactionByBlockNumberAndIndex and eth_getTransactionByHash works', async () => { @@ -237,5 +234,26 @@ for (const env of envs) { }) expect(res).toBeTruthy() }) + + test('eth_feeHistory works', async () => { + // just to get some transactions + await getTesterAddr() + + const feeHistory = await env.serverWallet.getFeeHistory({ + blockCount: 4, + blockTag: 'latest', + rewardPercentiles: [25, 75], + }) + + expect(feeHistory.oldestBlock).toBeGreaterThanOrEqual(0) + expect(feeHistory.gasUsedRatio.length).toBeGreaterThanOrEqual(0) + expect(feeHistory.reward?.length).toEqual( + feeHistory.gasUsedRatio.length + ) + + expect(feeHistory.baseFeePerGas).toHaveLength( + feeHistory.gasUsedRatio.length + 1 + ) + }) }) } diff --git a/eth-rpc/src/others.test.ts b/eth-rpc/src/others.test.ts new file mode 100644 index 0000000..7e8e70f --- /dev/null +++ b/eth-rpc/src/others.test.ts @@ -0,0 +1,235 @@ +import { + jsonRpcErrors, + getByteCode, + createEnv, + memoizedDeploy, +} from './util.ts' +import { afterEach, describe, expect, inject, test } from 'vitest' +import { fail } from 'node:assert' + +import { encodeFunctionData, parseEther, decodeEventLog } from 'viem' +import { ErrorsAbi } from '../abi/Errors.ts' +import { EventExampleAbi } from '../abi/EventExample.ts' + +afterEach(() => { + jsonRpcErrors.length = 0 +}) + +const envs = await Promise.all(inject('envs').map(createEnv)) +for (const env of envs) { + const getErrorTesterAddr = memoizedDeploy(env, () => + env.serverWallet.deployContract({ + abi: ErrorsAbi, + bytecode: getByteCode('Errors', env.evm), + }) + ) + + const getEventExampleAddr = memoizedDeploy(env, async () => + env.serverWallet.deployContract({ + abi: EventExampleAbi, + bytecode: getByteCode('EventExample', env.evm), + }) + ) + + describe(env.serverWallet.chain.name, () => { + test('eth_call (not enough funds)', async () => { + try { + await env.emptyWallet.simulateContract({ + address: await getErrorTesterAddr(), + abi: ErrorsAbi, + functionName: 'valueMatch', + value: parseEther('10'), + args: [parseEther('10')], + }) + fail('Expect call to fail') + } catch (err) { + const lastJsonRpcError = jsonRpcErrors.pop() + expect(lastJsonRpcError?.code).toBe(-32000) + expect(lastJsonRpcError?.message).to.include( + 'insufficient funds' + ) + expect(lastJsonRpcError?.data).toBeUndefined() + } + }) + + test('eth_call transfer (not enough funds)', async () => { + const value = parseEther('10') + const balance = await env.emptyWallet.getBalance( + env.emptyWallet.account + ) + expect(balance, 'Balance should be less than 10').toBeLessThan( + value + ) + try { + await env.emptyWallet.sendTransaction({ + to: '0x75E480dB528101a381Ce68544611C169Ad7EB342', + value, + }) + fail('Expect call to fail') + } catch (err) { + const lastJsonRpcError = jsonRpcErrors.pop() + expect(lastJsonRpcError?.code).toBe(-32000) + expect(lastJsonRpcError?.message).to.include( + 'insufficient funds' + ) + expect(lastJsonRpcError?.data).toBeUndefined() + } + }) + + test('eth_estimate (not enough funds)', async () => { + try { + await env.emptyWallet.estimateContractGas({ + address: await getErrorTesterAddr(), + abi: ErrorsAbi, + functionName: 'valueMatch', + value: parseEther('10'), + args: [parseEther('10')], + }) + fail('Expect call to fail') + } catch (err) { + const lastJsonRpcError = jsonRpcErrors.pop() + expect(lastJsonRpcError?.code).toBe(-32000) + expect(lastJsonRpcError?.message).to.include( + 'insufficient funds' + ) + expect(lastJsonRpcError?.data).toBeUndefined() + } + }) + + test('eth_estimate call caller (not enough funds)', async () => { + try { + await env.emptyWallet.estimateContractGas({ + address: await getErrorTesterAddr(), + abi: ErrorsAbi, + functionName: 'valueMatch', + value: parseEther('10'), + args: [parseEther('10')], + }) + fail('Expect call to fail') + } catch (err) { + const lastJsonRpcError = jsonRpcErrors.pop() + expect(lastJsonRpcError?.code).toBe(-32000) + expect(lastJsonRpcError?.message).to.include( + 'insufficient funds' + ) + expect(lastJsonRpcError?.data).toBeUndefined() + } + }) + + test('eth_estimate (revert)', async () => { + try { + await env.serverWallet.estimateContractGas({ + address: await getErrorTesterAddr(), + abi: ErrorsAbi, + functionName: 'valueMatch', + value: parseEther('11'), + args: [parseEther('10')], + }) + fail('Expect call to fail') + } catch (err) { + const lastJsonRpcError = jsonRpcErrors.pop() + expect(lastJsonRpcError?.code).toBe(3) + expect(lastJsonRpcError?.message).toBeOneOf([ + 'execution reverted: msg.value does not match value', + 'execution reverted: revert: msg.value does not match value', + ]) + expect(lastJsonRpcError?.data).toBe( + '0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001e6d73672e76616c756520646f6573206e6f74206d617463682076616c75650000' + ) + } + }) + + test('eth_get_balance (no account)', async () => { + const balance = await env.serverWallet.getBalance({ + address: '0x0000000000000000000000000000000000000123', + }) + expect(balance).toBe(0n) + }) + + test('eth_estimate (not enough funds to cover gas specified)', async () => { + let balance = await env.serverWallet.getBalance( + env.emptyWallet.account + ) + expect(balance).toBe(0n) + try { + await env.emptyWallet.estimateContractGas({ + address: await getErrorTesterAddr(), + abi: ErrorsAbi, + functionName: 'setState', + args: [true], + }) + fail('Expect call to fail') + } catch (err) { + const lastJsonRpcError = jsonRpcErrors.pop() + expect(lastJsonRpcError?.code).toBe(-32000) + expect(lastJsonRpcError?.message).to.include( + 'insufficient funds' + ) + expect(lastJsonRpcError?.data).toBeUndefined() + } + }) + + test('eth_estimate (no gas specified)', async () => { + let balance = await env.serverWallet.getBalance( + env.emptyWallet.account + ) + expect(balance).toBe(0n) + + const data = encodeFunctionData({ + abi: ErrorsAbi, + functionName: 'setState', + args: [true], + }) + + await env.emptyWallet.request({ + method: 'eth_estimateGas', + params: [ + { + data, + from: env.emptyWallet.account.address, + to: await getErrorTesterAddr(), + }, + ], + }) + }) + + test('logs', async () => { + let address = await getEventExampleAddr() + let { request } = await env.serverWallet.simulateContract({ + address, + abi: EventExampleAbi, + functionName: 'triggerEvent', + }) + + let hash = await env.serverWallet.writeContract(request) + let receipt = await env.serverWallet.waitForTransactionReceipt({ + hash, + }) + const logs = await env.serverWallet.getLogs({ + address, + blockHash: receipt.blockHash, + }) + expect(logs).toHaveLength(1) + expect(logs[0]).toMatchObject({ + address, + data: '0x00000000000000000000000000000000000000000000000000000000000030390000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000b48656c6c6f20776f726c64000000000000000000000000000000000000000000', + transactionHash: hash, + }) + + expect( + decodeEventLog({ + abi: EventExampleAbi, + data: logs[0].data, + topics: logs[0].topics, + }) + ).toEqual({ + eventName: 'ExampleEvent', + args: { + sender: env.serverWallet.account.address, + value: 12345n, + message: 'Hello world', + }, + }) + }) + }) +} diff --git a/eth-rpc/src/redstone.test.ts b/eth-rpc/src/redstone.test.ts index 54a21fb..e54e961 100644 --- a/eth-rpc/src/redstone.test.ts +++ b/eth-rpc/src/redstone.test.ts @@ -1,8 +1,12 @@ import { ExampleRedstoneShowroomAbi } from '../abi/ExampleRedstoneShowroom.ts' -import { createEnv, deployFactory, getByteCode } from './util.ts' +import { createEnv, memoizedDeploy, getByteCode } from './util.ts' import { Contract, providers } from 'ethers' import { WrapperBuilder } from '@redstone-finance/evm-connector' import { describe, expect, inject, test } from 'vitest' +import { + getOracleRegistryState, + getSignersForDataServiceId, +} from '@redstone-finance/sdk' const envs = await Promise.all(inject('envs').map(createEnv)) @@ -15,14 +19,14 @@ for (const env of envs) { } ) - const [getContractAddr] = deployFactory(env, () => + const getContractAddr = memoizedDeploy(env, () => env.serverWallet.deployContract({ abi: ExampleRedstoneShowroomAbi, bytecode: getByteCode('ExampleRedstoneShowroom', env.evm), }) ) - describe(`${env.serverWallet.chain.name}`, () => { + describe(env.serverWallet.chain.name, () => { test('getTokensPrices works', async () => { const contract = new Contract( await getContractAddr(), @@ -32,9 +36,13 @@ for (const env of envs) { const wrappedContract = WrapperBuilder.wrap( contract ).usingDataService({ - dataServiceId: 'redstone-rapid-demo', - uniqueSignersCount: 1, + dataServiceId: 'redstone-primary-prod', + uniqueSignersCount: 3, dataPackagesIds: ['BTC', 'ETH', 'BNB', 'AR', 'AVAX', 'CELO'], + authorizedSigners: getSignersForDataServiceId( + await getOracleRegistryState(), + 'redstone-primary-prod' + ), }) const tokenPrices = await wrappedContract.getPrices() expect(tokenPrices).toHaveLength(6) diff --git a/eth-rpc/src/snapshots/call_tracer/debug_deploy_traceTransaction.snap b/eth-rpc/src/snapshots/call_tracer/debug_deploy_traceTransaction.snap new file mode 100644 index 0000000..f6fd1ed --- /dev/null +++ b/eth-rpc/src/snapshots/call_tracer/debug_deploy_traceTransaction.snap @@ -0,0 +1,10 @@ +{ + "from": "", + "gas": "0x42", + "gasUsed": "0x42", + "input": "0x6080604052348015600e575f5ffd5b5061029b8061001c5f395ff3fe60806040526004361061002c575f3560e01c8063a329e8de14610037578063d1b966631461005f57610033565b3661003357005b5f5ffd5b348015610042575f5ffd5b5061005d60048036038101906100589190610160565b610069565b005b6100676100e7565b005b5f5f90505b600a8110156100ac578060405160200161008891906101ab565b6040516020818303038152906040528051906020012050808060010191505061006e565b507fa07465e8ec189714f79f3786a8f616baf78ebd9cb1769bd61f18de45f2567360816040516100dc91906101d4565b60405180910390a150565b5f610127576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161011e90610247565b60405180910390fd5b565b5f5ffd5b5f819050919050565b61013f8161012d565b8114610149575f5ffd5b50565b5f8135905061015a81610136565b92915050565b5f6020828403121561017557610174610129565b5b5f6101828482850161014c565b91505092915050565b5f819050919050565b6101a56101a08261012d565b61018b565b82525050565b5f6101b68284610194565b60208201915081905092915050565b6101ce8161012d565b82525050565b5f6020820190506101e75f8301846101c5565b92915050565b5f82825260208201905092915050565b7f546869732066756e6374696f6e20616c77617973206661696c730000000000005f82015250565b5f610231601a836101ed565b915061023c826101fd565b602082019050919050565b5f6020820190508181035f83015261025e81610225565b905091905056fea2646970667358221220862215ad968eeee4d6a790f87540c0c4088794dae2b10725a4f81dff392f239364736f6c634300081d0033", + "output": "0x60806040526004361061002c575f3560e01c8063a329e8de14610037578063d1b966631461005f57610033565b3661003357005b5f5ffd5b348015610042575f5ffd5b5061005d60048036038101906100589190610160565b610069565b005b6100676100e7565b005b5f5f90505b600a8110156100ac578060405160200161008891906101ab565b6040516020818303038152906040528051906020012050808060010191505061006e565b507fa07465e8ec189714f79f3786a8f616baf78ebd9cb1769bd61f18de45f2567360816040516100dc91906101d4565b60405180910390a150565b5f610127576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161011e90610247565b60405180910390fd5b565b5f5ffd5b5f819050919050565b61013f8161012d565b8114610149575f5ffd5b50565b5f8135905061015a81610136565b92915050565b5f6020828403121561017557610174610129565b5b5f6101828482850161014c565b91505092915050565b5f819050919050565b6101a56101a08261012d565b61018b565b82525050565b5f6101b68284610194565b60208201915081905092915050565b6101ce8161012d565b82525050565b5f6020820190506101e75f8301846101c5565b92915050565b5f82825260208201905092915050565b7f546869732066756e6374696f6e20616c77617973206661696c730000000000005f82015250565b5f610231601a836101ed565b915061023c826101fd565b602082019050919050565b5f6020820190508181035f83015261025e81610225565b905091905056fea2646970667358221220862215ad968eeee4d6a790f87540c0c4088794dae2b10725a4f81dff392f239364736f6c634300081d0033", + "to": "", + "type": "CREATE", + "value": "0x0", +} \ No newline at end of file diff --git a/eth-rpc/src/snapshots/call_tracer/debug_traceBlock.snap b/eth-rpc/src/snapshots/call_tracer/debug_traceBlock.snap new file mode 100644 index 0000000..cf32dd4 --- /dev/null +++ b/eth-rpc/src/snapshots/call_tracer/debug_traceBlock.snap @@ -0,0 +1,152 @@ +[ + { + "result": { + "calls": [ + { + "from": "", + "gas": "0x42", + "gasUsed": "0x42", + "input": "0x", + "to": "", + "type": "CALL", + "value": "0x2386f26fc10000", + }, + { + "from": "", + "gas": "0x42", + "gasUsed": "0x42", + "input": "0xa329e8de0000000000000000000000000000000000000000000000000000000000000002", + "logs": [ + { + "address": "", + "data": "0x0000000000000000000000000000000000000000000000000000000000000002", + "position": "0x0", + "topics": [ + "0xa07465e8ec189714f79f3786a8f616baf78ebd9cb1769bd61f18de45f2567360", + ], + }, + ], + "to": "", + "type": "CALL", + "value": "0x0", + }, + { + "error": "execution reverted", + "from": "", + "gas": "0x42", + "gasUsed": "0x42", + "input": "0xd1b96663", + "output": "0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001a546869732066756e6374696f6e20616c77617973206661696c73000000000000", + "revertReason": "This function always fails", + "to": "", + "type": "CALL", + "value": "0x2386f26fc10000", + }, + { + "calls": [ + { + "from": "", + "gas": "0x42", + "gasUsed": "0x42", + "input": "0x", + "to": "", + "type": "CALL", + "value": "0x2386f26fc10000", + }, + { + "from": "", + "gas": "0x42", + "gasUsed": "0x42", + "input": "0xa329e8de0000000000000000000000000000000000000000000000000000000000000001", + "logs": [ + { + "address": "", + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "position": "0x0", + "topics": [ + "0xa07465e8ec189714f79f3786a8f616baf78ebd9cb1769bd61f18de45f2567360", + ], + }, + ], + "to": "", + "type": "CALL", + "value": "0x0", + }, + { + "error": "execution reverted", + "from": "", + "gas": "0x42", + "gasUsed": "0x42", + "input": "0xd1b96663", + "output": "0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001a546869732066756e6374696f6e20616c77617973206661696c73000000000000", + "revertReason": "This function always fails", + "to": "", + "type": "CALL", + "value": "0x2386f26fc10000", + }, + { + "from": "", + "gas": "0x42", + "gasUsed": "0x42", + "input": "0x95805dad0000000000000000000000000000000000000000000000000000000000000000", + "to": "", + "type": "CALL", + "value": "0x0", + }, + ], + "from": "", + "gas": "0x42", + "gasUsed": "0x42", + "input": "0x95805dad0000000000000000000000000000000000000000000000000000000000000001", + "logs": [ + { + "address": "", + "data": "0x0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000066265666f72650000000000000000000000000000000000000000000000000000", + "position": "0x1", + "topics": [ + "0x25d760f35a7a9cb2bffd2ea8756913655b3786c642f300a702e2934062763549", + ], + }, + { + "address": "", + "data": "0x0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000056166746572000000000000000000000000000000000000000000000000000000", + "position": "0x2", + "topics": [ + "0x25d760f35a7a9cb2bffd2ea8756913655b3786c642f300a702e2934062763549", + ], + }, + ], + "to": "", + "type": "CALL", + "value": "0x0", + }, + ], + "from": "", + "gas": "0x42", + "gasUsed": "0x42", + "input": "0x95805dad0000000000000000000000000000000000000000000000000000000000000002", + "logs": [ + { + "address": "", + "data": "0x0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000066265666f72650000000000000000000000000000000000000000000000000000", + "position": "0x1", + "topics": [ + "0x25d760f35a7a9cb2bffd2ea8756913655b3786c642f300a702e2934062763549", + ], + }, + { + "address": "", + "data": "0x0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000056166746572000000000000000000000000000000000000000000000000000000", + "position": "0x2", + "topics": [ + "0x25d760f35a7a9cb2bffd2ea8756913655b3786c642f300a702e2934062763549", + ], + }, + ], + "to": "", + "type": "CALL", + "value": "0x0", + }, + "txHash": "", + }, +] \ No newline at end of file diff --git a/eth-rpc/src/snapshots/call_tracer/debug_traceCall.snap b/eth-rpc/src/snapshots/call_tracer/debug_traceCall.snap new file mode 100644 index 0000000..69b3ded --- /dev/null +++ b/eth-rpc/src/snapshots/call_tracer/debug_traceCall.snap @@ -0,0 +1,147 @@ +{ + "calls": [ + { + "from": "", + "gas": "0x42", + "gasUsed": "0x42", + "input": "0x", + "to": "", + "type": "CALL", + "value": "0x2386f26fc10000", + }, + { + "from": "", + "gas": "0x42", + "gasUsed": "0x42", + "input": "0xa329e8de0000000000000000000000000000000000000000000000000000000000000002", + "logs": [ + { + "address": "", + "data": "0x0000000000000000000000000000000000000000000000000000000000000002", + "position": "0x0", + "topics": [ + "0xa07465e8ec189714f79f3786a8f616baf78ebd9cb1769bd61f18de45f2567360", + ], + }, + ], + "to": "", + "type": "CALL", + "value": "0x0", + }, + { + "error": "execution reverted", + "from": "", + "gas": "0x42", + "gasUsed": "0x42", + "input": "0xd1b96663", + "output": "0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001a546869732066756e6374696f6e20616c77617973206661696c73000000000000", + "revertReason": "This function always fails", + "to": "", + "type": "CALL", + "value": "0x2386f26fc10000", + }, + { + "calls": [ + { + "from": "", + "gas": "0x42", + "gasUsed": "0x42", + "input": "0x", + "to": "", + "type": "CALL", + "value": "0x2386f26fc10000", + }, + { + "from": "", + "gas": "0x42", + "gasUsed": "0x42", + "input": "0xa329e8de0000000000000000000000000000000000000000000000000000000000000001", + "logs": [ + { + "address": "", + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "position": "0x0", + "topics": [ + "0xa07465e8ec189714f79f3786a8f616baf78ebd9cb1769bd61f18de45f2567360", + ], + }, + ], + "to": "", + "type": "CALL", + "value": "0x0", + }, + { + "error": "execution reverted", + "from": "", + "gas": "0x42", + "gasUsed": "0x42", + "input": "0xd1b96663", + "output": "0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001a546869732066756e6374696f6e20616c77617973206661696c73000000000000", + "revertReason": "This function always fails", + "to": "", + "type": "CALL", + "value": "0x2386f26fc10000", + }, + { + "from": "", + "gas": "0x42", + "gasUsed": "0x42", + "input": "0x95805dad0000000000000000000000000000000000000000000000000000000000000000", + "to": "", + "type": "CALL", + "value": "0x0", + }, + ], + "from": "", + "gas": "0x42", + "gasUsed": "0x42", + "input": "0x95805dad0000000000000000000000000000000000000000000000000000000000000001", + "logs": [ + { + "address": "", + "data": "0x0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000066265666f72650000000000000000000000000000000000000000000000000000", + "position": "0x1", + "topics": [ + "0x25d760f35a7a9cb2bffd2ea8756913655b3786c642f300a702e2934062763549", + ], + }, + { + "address": "", + "data": "0x0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000056166746572000000000000000000000000000000000000000000000000000000", + "position": "0x2", + "topics": [ + "0x25d760f35a7a9cb2bffd2ea8756913655b3786c642f300a702e2934062763549", + ], + }, + ], + "to": "", + "type": "CALL", + "value": "0x0", + }, + ], + "from": "0x0000000000000000000000000000000000000000", + "gas": "0x42", + "gasUsed": "0x42", + "input": "0x95805dad0000000000000000000000000000000000000000000000000000000000000002", + "logs": [ + { + "address": "", + "data": "0x0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000066265666f72650000000000000000000000000000000000000000000000000000", + "position": "0x1", + "topics": [ + "0x25d760f35a7a9cb2bffd2ea8756913655b3786c642f300a702e2934062763549", + ], + }, + { + "address": "", + "data": "0x0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000056166746572000000000000000000000000000000000000000000000000000000", + "position": "0x2", + "topics": [ + "0x25d760f35a7a9cb2bffd2ea8756913655b3786c642f300a702e2934062763549", + ], + }, + ], + "to": "", + "type": "CALL", + "value": "0x0", +} \ No newline at end of file diff --git a/eth-rpc/src/snapshots/call_tracer/debug_traceTransaction.snap b/eth-rpc/src/snapshots/call_tracer/debug_traceTransaction.snap new file mode 100644 index 0000000..855e802 --- /dev/null +++ b/eth-rpc/src/snapshots/call_tracer/debug_traceTransaction.snap @@ -0,0 +1,147 @@ +{ + "calls": [ + { + "from": "", + "gas": "0x42", + "gasUsed": "0x42", + "input": "0x", + "to": "", + "type": "CALL", + "value": "0x2386f26fc10000", + }, + { + "from": "", + "gas": "0x42", + "gasUsed": "0x42", + "input": "0xa329e8de0000000000000000000000000000000000000000000000000000000000000002", + "logs": [ + { + "address": "", + "data": "0x0000000000000000000000000000000000000000000000000000000000000002", + "position": "0x0", + "topics": [ + "0xa07465e8ec189714f79f3786a8f616baf78ebd9cb1769bd61f18de45f2567360", + ], + }, + ], + "to": "", + "type": "CALL", + "value": "0x0", + }, + { + "error": "execution reverted", + "from": "", + "gas": "0x42", + "gasUsed": "0x42", + "input": "0xd1b96663", + "output": "0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001a546869732066756e6374696f6e20616c77617973206661696c73000000000000", + "revertReason": "This function always fails", + "to": "", + "type": "CALL", + "value": "0x2386f26fc10000", + }, + { + "calls": [ + { + "from": "", + "gas": "0x42", + "gasUsed": "0x42", + "input": "0x", + "to": "", + "type": "CALL", + "value": "0x2386f26fc10000", + }, + { + "from": "", + "gas": "0x42", + "gasUsed": "0x42", + "input": "0xa329e8de0000000000000000000000000000000000000000000000000000000000000001", + "logs": [ + { + "address": "", + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "position": "0x0", + "topics": [ + "0xa07465e8ec189714f79f3786a8f616baf78ebd9cb1769bd61f18de45f2567360", + ], + }, + ], + "to": "", + "type": "CALL", + "value": "0x0", + }, + { + "error": "execution reverted", + "from": "", + "gas": "0x42", + "gasUsed": "0x42", + "input": "0xd1b96663", + "output": "0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001a546869732066756e6374696f6e20616c77617973206661696c73000000000000", + "revertReason": "This function always fails", + "to": "", + "type": "CALL", + "value": "0x2386f26fc10000", + }, + { + "from": "", + "gas": "0x42", + "gasUsed": "0x42", + "input": "0x95805dad0000000000000000000000000000000000000000000000000000000000000000", + "to": "", + "type": "CALL", + "value": "0x0", + }, + ], + "from": "", + "gas": "0x42", + "gasUsed": "0x42", + "input": "0x95805dad0000000000000000000000000000000000000000000000000000000000000001", + "logs": [ + { + "address": "", + "data": "0x0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000066265666f72650000000000000000000000000000000000000000000000000000", + "position": "0x1", + "topics": [ + "0x25d760f35a7a9cb2bffd2ea8756913655b3786c642f300a702e2934062763549", + ], + }, + { + "address": "", + "data": "0x0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000056166746572000000000000000000000000000000000000000000000000000000", + "position": "0x2", + "topics": [ + "0x25d760f35a7a9cb2bffd2ea8756913655b3786c642f300a702e2934062763549", + ], + }, + ], + "to": "", + "type": "CALL", + "value": "0x0", + }, + ], + "from": "", + "gas": "0x42", + "gasUsed": "0x42", + "input": "0x95805dad0000000000000000000000000000000000000000000000000000000000000002", + "logs": [ + { + "address": "", + "data": "0x0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000066265666f72650000000000000000000000000000000000000000000000000000", + "position": "0x1", + "topics": [ + "0x25d760f35a7a9cb2bffd2ea8756913655b3786c642f300a702e2934062763549", + ], + }, + { + "address": "", + "data": "0x0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000056166746572000000000000000000000000000000000000000000000000000000", + "position": "0x2", + "topics": [ + "0x25d760f35a7a9cb2bffd2ea8756913655b3786c642f300a702e2934062763549", + ], + }, + ], + "to": "", + "type": "CALL", + "value": "0x0", +} \ No newline at end of file diff --git a/eth-rpc/src/snapshots/prestate_tracer/call_contract.diff.snap b/eth-rpc/src/snapshots/prestate_tracer/call_contract.diff.snap new file mode 100644 index 0000000..89bcc25 --- /dev/null +++ b/eth-rpc/src/snapshots/prestate_tracer/call_contract.diff.snap @@ -0,0 +1,26 @@ +{ + "post": { + "": { + "nonce": "", + }, + "": { + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000000": "0x0000000000000000000000000000000000000000000000000000000000000002", + }, + }, + }, + "pre": { + "": { + "balance": "", + "nonce": "", + }, + "": { + "balance": "", + "code": "", + "nonce": "", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000000": "0x0000000000000000000000000000000000000000000000000000000000000001", + }, + }, + }, +} \ No newline at end of file diff --git a/eth-rpc/src/snapshots/prestate_tracer/call_contract.no_diff.snap b/eth-rpc/src/snapshots/prestate_tracer/call_contract.no_diff.snap new file mode 100644 index 0000000..b77d5dd --- /dev/null +++ b/eth-rpc/src/snapshots/prestate_tracer/call_contract.no_diff.snap @@ -0,0 +1,22 @@ +{ + "": { + "balance": "", + "nonce": "", + }, + "": { + "balance": "", + }, + "": { + "balance": "", + "code": "", + "nonce": "", + }, + "": { + "balance": "", + "code": "", + "nonce": "", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000000": "0x0000000000000000000000000000000000000000000000000000000000000001", + }, + }, +} \ No newline at end of file diff --git a/eth-rpc/src/snapshots/prestate_tracer/delegate_call_contract.diff.snap b/eth-rpc/src/snapshots/prestate_tracer/delegate_call_contract.diff.snap new file mode 100644 index 0000000..89bcc25 --- /dev/null +++ b/eth-rpc/src/snapshots/prestate_tracer/delegate_call_contract.diff.snap @@ -0,0 +1,26 @@ +{ + "post": { + "": { + "nonce": "", + }, + "": { + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000000": "0x0000000000000000000000000000000000000000000000000000000000000002", + }, + }, + }, + "pre": { + "": { + "balance": "", + "nonce": "", + }, + "": { + "balance": "", + "code": "", + "nonce": "", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000000": "0x0000000000000000000000000000000000000000000000000000000000000001", + }, + }, + }, +} \ No newline at end of file diff --git a/eth-rpc/src/snapshots/prestate_tracer/delegate_call_contract.no_diff.snap b/eth-rpc/src/snapshots/prestate_tracer/delegate_call_contract.no_diff.snap new file mode 100644 index 0000000..b77d5dd --- /dev/null +++ b/eth-rpc/src/snapshots/prestate_tracer/delegate_call_contract.no_diff.snap @@ -0,0 +1,22 @@ +{ + "": { + "balance": "", + "nonce": "", + }, + "": { + "balance": "", + }, + "": { + "balance": "", + "code": "", + "nonce": "", + }, + "": { + "balance": "", + "code": "", + "nonce": "", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000000": "0x0000000000000000000000000000000000000000000000000000000000000001", + }, + }, +} \ No newline at end of file diff --git a/eth-rpc/src/snapshots/prestate_tracer/deploy_contract.diff.snap b/eth-rpc/src/snapshots/prestate_tracer/deploy_contract.diff.snap new file mode 100644 index 0000000..45a42ca --- /dev/null +++ b/eth-rpc/src/snapshots/prestate_tracer/deploy_contract.diff.snap @@ -0,0 +1,13 @@ +{ + "post": { + "": { + "nonce": "", + }, + }, + "pre": { + "": { + "balance": "", + "nonce": "", + }, + }, +} \ No newline at end of file diff --git a/eth-rpc/src/snapshots/prestate_tracer/deploy_contract.no_diff.snap b/eth-rpc/src/snapshots/prestate_tracer/deploy_contract.no_diff.snap new file mode 100644 index 0000000..6932444 --- /dev/null +++ b/eth-rpc/src/snapshots/prestate_tracer/deploy_contract.no_diff.snap @@ -0,0 +1,14 @@ +{ + "": { + "balance": "", + "nonce": "", + }, + "": { + "balance": "", + }, + "": { + "balance": "", + "code": "", + "nonce": "", + }, +} \ No newline at end of file diff --git a/eth-rpc/src/snapshots/prestate_tracer/deposit.diff.snap b/eth-rpc/src/snapshots/prestate_tracer/deposit.diff.snap new file mode 100644 index 0000000..cb8b155 --- /dev/null +++ b/eth-rpc/src/snapshots/prestate_tracer/deposit.diff.snap @@ -0,0 +1,28 @@ +{ + "post": { + "": { + "balance": "", + "nonce": "", + }, + "": { + "balance": "", + "storage": { + "": "0x00000000000000000000000000000000000000000000000098a7d9b8314c0000", + }, + }, + }, + "pre": { + "": { + "balance": "", + "nonce": "", + }, + "": { + "balance": "", + "code": "", + "nonce": "", + "storage": { + "": "0x0000000000000000000000000000000000000000000000008ac7230489e80000", + }, + }, + }, +} \ No newline at end of file diff --git a/eth-rpc/src/snapshots/prestate_tracer/deposit.no_diff.snap b/eth-rpc/src/snapshots/prestate_tracer/deposit.no_diff.snap new file mode 100644 index 0000000..1af970a --- /dev/null +++ b/eth-rpc/src/snapshots/prestate_tracer/deposit.no_diff.snap @@ -0,0 +1,17 @@ +{ + "": { + "balance": "", + "nonce": "", + }, + "": { + "balance": "", + }, + "": { + "balance": "", + "code": "", + "nonce": "", + "storage": { + "": "0x0000000000000000000000000000000000000000000000008ac7230489e80000", + }, + }, +} \ No newline at end of file diff --git a/eth-rpc/src/snapshots/prestate_tracer/get_balance.diff.snap b/eth-rpc/src/snapshots/prestate_tracer/get_balance.diff.snap new file mode 100644 index 0000000..45a42ca --- /dev/null +++ b/eth-rpc/src/snapshots/prestate_tracer/get_balance.diff.snap @@ -0,0 +1,13 @@ +{ + "post": { + "": { + "nonce": "", + }, + }, + "pre": { + "": { + "balance": "", + "nonce": "", + }, + }, +} \ No newline at end of file diff --git a/eth-rpc/src/snapshots/prestate_tracer/get_balance.no_diff.snap b/eth-rpc/src/snapshots/prestate_tracer/get_balance.no_diff.snap new file mode 100644 index 0000000..6932444 --- /dev/null +++ b/eth-rpc/src/snapshots/prestate_tracer/get_balance.no_diff.snap @@ -0,0 +1,14 @@ +{ + "": { + "balance": "", + "nonce": "", + }, + "": { + "balance": "", + }, + "": { + "balance": "", + "code": "", + "nonce": "", + }, +} \ No newline at end of file diff --git a/eth-rpc/src/snapshots/prestate_tracer/get_external_balance.diff.snap b/eth-rpc/src/snapshots/prestate_tracer/get_external_balance.diff.snap new file mode 100644 index 0000000..45a42ca --- /dev/null +++ b/eth-rpc/src/snapshots/prestate_tracer/get_external_balance.diff.snap @@ -0,0 +1,13 @@ +{ + "post": { + "": { + "nonce": "", + }, + }, + "pre": { + "": { + "balance": "", + "nonce": "", + }, + }, +} \ No newline at end of file diff --git a/eth-rpc/src/snapshots/prestate_tracer/get_external_balance.no_diff.snap b/eth-rpc/src/snapshots/prestate_tracer/get_external_balance.no_diff.snap new file mode 100644 index 0000000..0f13e85 --- /dev/null +++ b/eth-rpc/src/snapshots/prestate_tracer/get_external_balance.no_diff.snap @@ -0,0 +1,19 @@ +{ + "": { + "balance": "", + "nonce": "", + }, + "": { + "balance": "", + }, + "": { + "balance": "", + "code": "", + "nonce": "", + }, + "": { + "balance": "", + "code": "", + "nonce": "", + }, +} \ No newline at end of file diff --git a/eth-rpc/src/snapshots/prestate_tracer/read_storage.diff.snap b/eth-rpc/src/snapshots/prestate_tracer/read_storage.diff.snap new file mode 100644 index 0000000..45a42ca --- /dev/null +++ b/eth-rpc/src/snapshots/prestate_tracer/read_storage.diff.snap @@ -0,0 +1,13 @@ +{ + "post": { + "": { + "nonce": "", + }, + }, + "pre": { + "": { + "balance": "", + "nonce": "", + }, + }, +} \ No newline at end of file diff --git a/eth-rpc/src/snapshots/prestate_tracer/read_storage.no_diff.snap b/eth-rpc/src/snapshots/prestate_tracer/read_storage.no_diff.snap new file mode 100644 index 0000000..c752df4 --- /dev/null +++ b/eth-rpc/src/snapshots/prestate_tracer/read_storage.no_diff.snap @@ -0,0 +1,17 @@ +{ + "": { + "balance": "", + "nonce": "", + }, + "": { + "balance": "", + }, + "": { + "balance": "", + "code": "", + "nonce": "", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000000": "0x000000000000000000000000000000000000000000000000000000000000002a", + }, + }, +} \ No newline at end of file diff --git a/eth-rpc/src/snapshots/prestate_tracer/trace_block_write_storage_twice.diff.snap b/eth-rpc/src/snapshots/prestate_tracer/trace_block_write_storage_twice.diff.snap new file mode 100644 index 0000000..9a8ff8b --- /dev/null +++ b/eth-rpc/src/snapshots/prestate_tracer/trace_block_write_storage_twice.diff.snap @@ -0,0 +1,74 @@ +[ + { + "result": { + "post": { + "": { + "balance": "", + "nonce": "", + }, + "": { + "balance": "", + }, + "": { + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000000": "0x000000000000000000000000000000000000000000000000000000000000002b", + }, + }, + }, + "pre": { + "": { + "balance": "", + "nonce": "", + }, + "": { + "balance": "", + }, + "": { + "balance": "", + "code": "", + "nonce": "", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000000": "0x000000000000000000000000000000000000000000000000000000000000002a", + }, + }, + }, + }, + "txHash": "", + }, + { + "result": { + "post": { + "": { + "balance": "", + "nonce": "", + }, + "": { + "balance": "", + }, + "": { + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000000": "0x000000000000000000000000000000000000000000000000000000000000002c", + }, + }, + }, + "pre": { + "": { + "balance": "", + "nonce": "", + }, + "": { + "balance": "", + }, + "": { + "balance": "", + "code": "", + "nonce": "", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000000": "0x000000000000000000000000000000000000000000000000000000000000002b", + }, + }, + }, + }, + "txHash": "", + }, +] \ No newline at end of file diff --git a/eth-rpc/src/snapshots/prestate_tracer/trace_block_write_storage_twice.no_diff.snap b/eth-rpc/src/snapshots/prestate_tracer/trace_block_write_storage_twice.no_diff.snap new file mode 100644 index 0000000..9a6b48d --- /dev/null +++ b/eth-rpc/src/snapshots/prestate_tracer/trace_block_write_storage_twice.no_diff.snap @@ -0,0 +1,42 @@ +[ + { + "result": { + "": { + "balance": "", + "nonce": "", + }, + "": { + "balance": "", + }, + "": { + "balance": "", + "code": "", + "nonce": "", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000000": "0x000000000000000000000000000000000000000000000000000000000000002c", + }, + }, + }, + "txHash": "", + }, + { + "result": { + "": { + "balance": "", + "nonce": "", + }, + "": { + "balance": "", + }, + "": { + "balance": "", + "code": "", + "nonce": "", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000000": "0x000000000000000000000000000000000000000000000000000000000000002d", + }, + }, + }, + "txHash": "", + }, +] \ No newline at end of file diff --git a/eth-rpc/src/snapshots/prestate_tracer/trace_tx_write_storage_twice.diff.snap b/eth-rpc/src/snapshots/prestate_tracer/trace_tx_write_storage_twice.diff.snap new file mode 100644 index 0000000..615fc02 --- /dev/null +++ b/eth-rpc/src/snapshots/prestate_tracer/trace_tx_write_storage_twice.diff.snap @@ -0,0 +1,33 @@ +{ + "post": { + "": { + "balance": "", + "nonce": "", + }, + "": { + "balance": "", + }, + "": { + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000000": "0x000000000000000000000000000000000000000000000000000000000000002c", + }, + }, + }, + "pre": { + "": { + "balance": "", + "nonce": "", + }, + "": { + "balance": "", + }, + "": { + "balance": "", + "code": "", + "nonce": "", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000000": "0x000000000000000000000000000000000000000000000000000000000000002b", + }, + }, + }, +} \ No newline at end of file diff --git a/eth-rpc/src/snapshots/prestate_tracer/trace_tx_write_storage_twice.no_diff.snap b/eth-rpc/src/snapshots/prestate_tracer/trace_tx_write_storage_twice.no_diff.snap new file mode 100644 index 0000000..c54843d --- /dev/null +++ b/eth-rpc/src/snapshots/prestate_tracer/trace_tx_write_storage_twice.no_diff.snap @@ -0,0 +1,17 @@ +{ + "": { + "balance": "", + "nonce": "", + }, + "": { + "balance": "", + }, + "": { + "balance": "", + "code": "", + "nonce": "", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000000": "0x000000000000000000000000000000000000000000000000000000000000002d", + }, + }, +} \ No newline at end of file diff --git a/eth-rpc/src/snapshots/prestate_tracer/withdraw.diff.snap b/eth-rpc/src/snapshots/prestate_tracer/withdraw.diff.snap new file mode 100644 index 0000000..cb8b155 --- /dev/null +++ b/eth-rpc/src/snapshots/prestate_tracer/withdraw.diff.snap @@ -0,0 +1,28 @@ +{ + "post": { + "": { + "balance": "", + "nonce": "", + }, + "": { + "balance": "", + "storage": { + "": "0x00000000000000000000000000000000000000000000000098a7d9b8314c0000", + }, + }, + }, + "pre": { + "": { + "balance": "", + "nonce": "", + }, + "": { + "balance": "", + "code": "", + "nonce": "", + "storage": { + "": "0x0000000000000000000000000000000000000000000000008ac7230489e80000", + }, + }, + }, +} \ No newline at end of file diff --git a/eth-rpc/src/snapshots/prestate_tracer/withdraw.no_diff.snap b/eth-rpc/src/snapshots/prestate_tracer/withdraw.no_diff.snap new file mode 100644 index 0000000..1af970a --- /dev/null +++ b/eth-rpc/src/snapshots/prestate_tracer/withdraw.no_diff.snap @@ -0,0 +1,17 @@ +{ + "": { + "balance": "", + "nonce": "", + }, + "": { + "balance": "", + }, + "": { + "balance": "", + "code": "", + "nonce": "", + "storage": { + "": "0x0000000000000000000000000000000000000000000000008ac7230489e80000", + }, + }, +} \ No newline at end of file diff --git a/eth-rpc/src/snapshots/prestate_tracer/write_storage.diff.snap b/eth-rpc/src/snapshots/prestate_tracer/write_storage.diff.snap new file mode 100644 index 0000000..9cfd4eb --- /dev/null +++ b/eth-rpc/src/snapshots/prestate_tracer/write_storage.diff.snap @@ -0,0 +1,26 @@ +{ + "post": { + "": { + "nonce": "", + }, + "": { + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000000": "0x0000000000000000000000000000000000000000000000000000000000000002", + }, + }, + }, + "pre": { + "": { + "balance": "", + "nonce": "", + }, + "": { + "balance": "", + "code": "", + "nonce": "", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000000": "0x000000000000000000000000000000000000000000000000000000000000002a", + }, + }, + }, +} \ No newline at end of file diff --git a/eth-rpc/src/snapshots/prestate_tracer/write_storage.no_diff.snap b/eth-rpc/src/snapshots/prestate_tracer/write_storage.no_diff.snap new file mode 100644 index 0000000..c752df4 --- /dev/null +++ b/eth-rpc/src/snapshots/prestate_tracer/write_storage.no_diff.snap @@ -0,0 +1,17 @@ +{ + "": { + "balance": "", + "nonce": "", + }, + "": { + "balance": "", + }, + "": { + "balance": "", + "code": "", + "nonce": "", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000000": "0x000000000000000000000000000000000000000000000000000000000000002a", + }, + }, +} \ No newline at end of file diff --git a/eth-rpc/src/snapshots/prestate_tracer/write_storage_from_0.diff.snap b/eth-rpc/src/snapshots/prestate_tracer/write_storage_from_0.diff.snap new file mode 100644 index 0000000..5c54645 --- /dev/null +++ b/eth-rpc/src/snapshots/prestate_tracer/write_storage_from_0.diff.snap @@ -0,0 +1,25 @@ +{ + "post": { + "0x0000000000000000000000000000000000000000": { + "nonce": "", + }, + "": { + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000000": "0x0000000000000000000000000000000000000000000000000000000000000002", + }, + }, + }, + "pre": { + "0x0000000000000000000000000000000000000000": { + "balance": "", + }, + "": { + "balance": "", + "code": "", + "nonce": "", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000000": "0x000000000000000000000000000000000000000000000000000000000000002a", + }, + }, + }, +} \ No newline at end of file diff --git a/eth-rpc/src/snapshots/prestate_tracer/write_storage_from_0.no_diff.snap b/eth-rpc/src/snapshots/prestate_tracer/write_storage_from_0.no_diff.snap new file mode 100644 index 0000000..455a35b --- /dev/null +++ b/eth-rpc/src/snapshots/prestate_tracer/write_storage_from_0.no_diff.snap @@ -0,0 +1,16 @@ +{ + "0x0000000000000000000000000000000000000000": { + "balance": "", + }, + "": { + "balance": "", + }, + "": { + "balance": "", + "code": "", + "nonce": "", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000000": "0x000000000000000000000000000000000000000000000000000000000000002a", + }, + }, +} \ No newline at end of file diff --git a/eth-rpc/src/spammer.ts b/eth-rpc/src/spammer.ts index 8ebef9b..ea14401 100644 --- a/eth-rpc/src/spammer.ts +++ b/eth-rpc/src/spammer.ts @@ -49,6 +49,25 @@ const flipperAddr = deployReceipt.contractAddress let nonce = await wallet.getTransactionCount(wallet.account) +setInterval(async () => { + await env.serverWallet.getFeeHistory({ + blockCount: 4, + blockTag: 'latest', + rewardPercentiles: [25, 75], + }) +}, 10) + +setInterval(async () => { + await Promise.all([ + env.serverWallet.getBlock({ + blockTag: 'latest', + }), + env.serverWallet.getBlock({ + blockTag: 'finalized', + }), + ]) +}, 10) + console.log('🔄 Starting loop...') console.log('Starting nonce:', nonce) try { diff --git a/eth-rpc/src/test-setup.ts b/eth-rpc/src/test-setup.ts index 668fde8..d619347 100644 --- a/eth-rpc/src/test-setup.ts +++ b/eth-rpc/src/test-setup.ts @@ -24,6 +24,8 @@ export default async function setup(project: TestProject) { '--http.port', '8546', '--dev', + '--dev.period', + '2', '--verbosity', '0', ] diff --git a/eth-rpc/src/tracing-call-trace.test.ts b/eth-rpc/src/tracing-call-trace.test.ts new file mode 100644 index 0000000..dc89a7c --- /dev/null +++ b/eth-rpc/src/tracing-call-trace.test.ts @@ -0,0 +1,220 @@ +import { + getByteCode, + visit, + createEnv, + memoizedDeploy, + Visitor, + memoizedTx, +} from './util.ts' +import { describe, expect, inject, test } from 'vitest' +import { encodeFunctionData, parseEther } from 'viem' +import { TracingCallerAbi } from '../abi/TracingCaller.ts' +import { TracingCalleeAbi } from '../abi/TracingCallee.ts' +import path from 'node:path' +import { mkdirSync, writeFileSync } from 'node:fs' + +const envs = await Promise.all(inject('envs').map(createEnv)) + +for (const env of envs) { + const TRACING_CALLEE_BYTECODE = getByteCode('TracingCallee', env.evm) + const getDeployTracingCalleeReceipt = memoizedTx(env, async () => + env.accountWallet.deployContract({ + abi: TracingCalleeAbi, + bytecode: TRACING_CALLEE_BYTECODE, + }) + ) + + const getTracingCalleeAddr = async () => { + const receipt = await getDeployTracingCalleeReceipt() + return receipt.contractAddress! + } + + const getTracingCallerAddr = memoizedDeploy(env, async () => + env.accountWallet.deployContract({ + abi: TracingCallerAbi, + args: [await getTracingCalleeAddr()], + bytecode: getByteCode('TracingCaller', env.evm), + value: parseEther('10'), + }) + ) + + const getStartReceipt = memoizedTx(env, async () => { + const { request } = await env.accountWallet.simulateContract({ + address: await getTracingCallerAddr(), + abi: TracingCallerAbi, + functionName: 'start', + args: [2n], + }) + return await env.accountWallet.writeContract(request) + }) + + const getCreateReceipt = memoizedTx(env, async () => { + const { request } = await env.accountWallet.simulateContract({ + address: await getTracingCallerAddr(), + abi: TracingCallerAbi, + functionName: 'create', + }) + return await env.accountWallet.writeContract(request) + }) + + const getCreate2Receipt = memoizedTx(env, async () => { + const { request } = await env.accountWallet.simulateContract({ + address: await getTracingCallerAddr(), + abi: TracingCallerAbi, + functionName: 'create2', + }) + return await env.accountWallet.writeContract(request) + }) + + const getVisitor = async (): Promise => { + const callerAddr = await getTracingCallerAddr() + const calleeAddr = await getTracingCalleeAddr() + return (key, value) => { + switch (key) { + case 'address': + case 'from': + case 'to': { + if (value === callerAddr) { + return [key, ''] + } else if (value === calleeAddr) { + return [key, ''] + } else if ( + value == env.accountWallet.account.address.toLowerCase() + ) { + return [key, ''] + } + + return [key, value] + } + case 'revertReason': + return [ + key, + value.startsWith('revert: ') + ? value.slice('revert: '.length) + : value, + ] + + case 'gas': + case 'gasUsed': { + return [key, '0x42'] + } + case 'txHash': { + return [key, ''] + } + default: { + return [key, value] + } + } + } + } + + describe(env.accountWallet.chain.name, () => { + const matchFixture = async (res: any, fixtureName: string) => { + const visitor = await getVisitor() + + if (process.env.DEBUG) { + const __dirname = path.dirname(__filename) + const dir = `${__dirname}/samples/call_tracer/` + mkdirSync(dir, { recursive: true }) + writeFileSync( + `${dir}/${fixtureName}.${env.chain.name}.json`, + JSON.stringify(res, null, 2) + ) + } + + await expect(visit(res, visitor)).toMatchFileSnapshot( + `snapshots/call_tracer/${fixtureName}.snap` + ) + } + + test('debug_traceTransaction', async ({ task }) => { + const receipt = await getStartReceipt() + const res = await env.debugClient.traceTransaction( + receipt.transactionHash, + 'callTracer', + { + withLog: true, + } + ) + await matchFixture(res, task.name) + }) + + test('debug_deploy_traceTransaction', async ({ task }) => { + const receipt = await getDeployTracingCalleeReceipt() + + const res = await env.debugClient.traceTransaction( + receipt.transactionHash, + 'callTracer', + { + withLog: true, + } + ) + await matchFixture(res, task.name) + }) + + test('debug_create', async () => { + const receipt = await getCreateReceipt() + + const res = await env.debugClient.traceTransaction( + receipt.transactionHash, + 'callTracer', + { + withLog: true, + } + ) + + expect(res.calls[0].type).toEqual('CREATE') + const code = await env.serverWallet.getCode({ + address: res.calls[0].to, + }) + expect(code).toBeTruthy() + }) + + test('debug_create2', async () => { + const receipt = await getCreate2Receipt() + + const res = await env.debugClient.traceTransaction( + receipt.transactionHash, + 'callTracer', + { + withLog: true, + } + ) + expect(res.calls[0].type).toEqual('CREATE2') + expect(res.calls[0].input).toEqual(TRACING_CALLEE_BYTECODE) + const code = await env.serverWallet.getCode({ + address: res.calls[0].to, + }) + expect(code).toBeTruthy() + }) + + test('debug_traceBlock', async ({ task }) => { + const receipt = await getStartReceipt() + const res = await env.debugClient.traceBlock( + receipt.blockNumber, + 'callTracer', + { + withLog: true, + } + ) + await matchFixture(res, task.name) + }) + + test('debug_traceCall', async ({ task }) => { + const res = await env.debugClient.traceCall( + { + to: await getTracingCallerAddr(), + data: encodeFunctionData({ + abi: TracingCallerAbi, + functionName: 'start', + args: [2n], + }), + }, + 'callTracer', + { withLog: true } + ) + + await matchFixture(res, task.name) + }) + }) +} diff --git a/eth-rpc/src/tracing-prestate.test.ts b/eth-rpc/src/tracing-prestate.test.ts new file mode 100644 index 0000000..387c5cc --- /dev/null +++ b/eth-rpc/src/tracing-prestate.test.ts @@ -0,0 +1,360 @@ +import { + getByteCode, + createEnv, + memoizedDeploy, + visit, + Visitor, + computeMappingSlot, +} from './util.ts' +import { describe, expect, inject, test } from 'vitest' +import { encodeFunctionData, parseEther } from 'viem' +import { PretraceFixtureAbi } from '../abi/PretraceFixture.ts' +import { PretraceFixtureChildAbi } from '../abi/PretraceFixtureChild.ts' +import { mkdirSync, writeFileSync } from 'node:fs' +import path from 'node:path' + +const envs = await Promise.all(inject('envs').map(createEnv)) + +for (const env of envs) { + const addr = await memoizedDeploy(env, async () => { + return env.accountWallet.deployContract({ + abi: PretraceFixtureAbi, + bytecode: getByteCode('PretraceFixture', env.evm), + value: parseEther('10'), + }) + })() + + const addr2 = await memoizedDeploy(env, async () => + env.accountWallet.deployContract({ + abi: PretraceFixtureChildAbi, + bytecode: getByteCode('PretraceFixtureChild', env.evm), + }) + )() + + const block = await env.publicClient.getBlock({ + blockTag: 'latest', + }) + + const getVisitor = async (): Promise => { + let { miner: coinbaseAddr } = block + const walletbalanceStorageSlot = await computeMappingSlot( + env.accountWallet.account.address, + 1 + ) + let mappedKeys = { + [walletbalanceStorageSlot]: ``, + [coinbaseAddr.toLowerCase()]: ``, + [env.accountWallet.account.address.toLowerCase()]: ``, + [addr.toLowerCase()]: ``, + [addr2.toLowerCase()]: ``, + } + + return (key, value) => { + key = mappedKeys[key] ?? key + switch (key) { + case 'code': { + return [key, ''] + } + case 'nonce': { + return [key, ''] + } + case 'balance': { + return [key, ''] + } + case 'txHash': { + return [key, ''] + } + case '': { + // Nonce on substrate will start at 0 and thus be stripped from the output + // So we remove it for the coinbase address + delete value?.nonce + return [key, value] + } + default: { + return [key, value] + } + } + } + } + for (const config of [ + { diffMode: true }, + { diffMode: false }, + ]) { + const diffMode = config.diffMode ? 'diff' : 'no_diff' + + describe(env.serverWallet.chain.name, () => { + describe(diffMode, () => { + const matchFixture = async (res: any, fixtureName: string) => { + const visitor = await getVisitor() + if (process.env.DEBUG) { + const __dirname = path.dirname(__filename) + const dir = `${__dirname}/samples/prestate_tracer/` + mkdirSync(dir, { recursive: true }) + writeFileSync( + `${dir}/${fixtureName}.${env.chain.name}.${diffMode}.json`, + JSON.stringify(res, null, 2) + ) + } + + await expect(visit(res, visitor)).toMatchFileSnapshot( + `snapshots/prestate_tracer//${fixtureName}.${diffMode}.snap` + ) + } + + test('write_storage', async ({ task }) => { + const res = await env.debugClient.traceCall( + { + from: env.accountWallet.account.address, + to: addr, + data: encodeFunctionData({ + abi: PretraceFixtureAbi, + functionName: 'writeStorage', + args: [2n], + }), + }, + 'prestateTracer', + config, + block.hash + ) + + await matchFixture(res, task.name) + }) + + test('write_storage_from_0', async ({ task }) => { + const res = await env.debugClient.traceCall( + { + to: addr, + data: encodeFunctionData({ + abi: PretraceFixtureAbi, + functionName: 'writeStorage', + args: [2n], + }), + }, + 'prestateTracer', + config, + block.hash + ) + + await matchFixture(res, task.name) + }) + + test('read_storage', async ({ task }) => { + const res = await env.debugClient.traceCall( + { + from: env.accountWallet.account.address, + to: addr, + data: encodeFunctionData({ + abi: PretraceFixtureAbi, + functionName: 'readStorage', + }), + }, + 'prestateTracer', + config, + block.hash + ) + + await matchFixture(res, task.name) + }) + + test('deposit', async ({ task }) => { + const res = await env.debugClient.traceCall( + { + from: env.accountWallet.account.address, + to: addr, + value: parseEther('1'), + data: encodeFunctionData({ + abi: PretraceFixtureAbi, + functionName: 'deposit', + }), + }, + 'prestateTracer', + config, + block.hash + ) + + await matchFixture(res, task.name) + }) + + test('withdraw', async ({ task }) => { + const res = await env.debugClient.traceCall( + { + from: env.accountWallet.account.address, + to: addr, + value: parseEther('1'), + data: encodeFunctionData({ + abi: PretraceFixtureAbi, + functionName: 'deposit', + }), + }, + 'prestateTracer', + config, + block.hash + ) + + await matchFixture(res, task.name) + }) + + test('get_balance', async ({ task }) => { + const res = await env.debugClient.traceCall( + { + from: env.accountWallet.account.address, + to: addr, + data: encodeFunctionData({ + abi: PretraceFixtureAbi, + functionName: 'getContractBalance', + }), + }, + 'prestateTracer', + config, + block.hash + ) + + await matchFixture(res, task.name) + }) + + test('get_external_balance', async ({ task }) => { + const res = await env.debugClient.traceCall( + { + from: env.accountWallet.account.address, + to: addr, + data: encodeFunctionData({ + abi: PretraceFixtureAbi, + functionName: 'getExternalBalance', + args: [addr2], + }), + }, + 'prestateTracer', + config, + block.hash + ) + + await matchFixture(res, task.name) + }) + + test('deploy_contract', async ({ task }) => { + const res = await env.debugClient.traceCall( + { + from: env.accountWallet.account.address, + to: addr, + value: parseEther('1'), + data: encodeFunctionData({ + abi: PretraceFixtureAbi, + functionName: 'createChild', + }), + }, + 'prestateTracer', + config, + block.hash + ) + + await matchFixture(res, task.name) + }) + + test('call_contract', async ({ task }) => { + const res = await env.debugClient.traceCall( + { + from: env.accountWallet.account.address, + to: addr, + data: encodeFunctionData({ + abi: PretraceFixtureAbi, + functionName: 'callContract', + args: [addr2], + }), + }, + 'prestateTracer', + config + ) + + await matchFixture(res, task.name) + }) + + test('delegate_call_contract', async ({ task }) => { + const res = await env.debugClient.traceCall( + { + from: env.accountWallet.account.address, + to: addr, + data: encodeFunctionData({ + abi: PretraceFixtureAbi, + functionName: 'callContract', + args: [addr2], + }), + }, + 'prestateTracer', + config, + block.hash + ) + + await matchFixture(res, task.name) + }) + + test('write_storage_twice', async ({ task }) => { + const nonce = await env.accountWallet.getTransactionCount( + env.accountWallet.account + ) + + const value = await env.accountWallet.readContract({ + address: addr, + abi: PretraceFixtureAbi, + functionName: 'readStorage', + }) + + const requests = await Promise.all( + [nonce, nonce + 1].map(async (nonce, i) => { + const { request } = + await env.accountWallet.simulateContract({ + address: addr, + abi: PretraceFixtureAbi, + functionName: 'writeStorage', + args: [value + BigInt(1 + i)], + nonce, + }) + return request + }) + ) + + const hashes = await Promise.all( + requests.map((request) => + env.accountWallet.writeContract(request) + ) + ) + + const receipts = await Promise.all( + hashes.map((hash) => + env.accountWallet.waitForTransactionReceipt({ + hash, + }) + ) + ) + + expect(receipts).toHaveLength(2) + expect(receipts.every((r) => r.status)).toBeTruthy() + expect(receipts[0].blockNumber).toEqual( + receipts[1].blockNumber + ) + + // Test traceBlock + { + const res = await env.debugClient.traceBlock( + receipts[0].blockNumber, + 'prestateTracer', + config + ) + + await matchFixture(res, `trace_block_${task.name}`) + } + + // Test traceTransaction + { + const res = await env.debugClient.traceTransaction( + receipts[1].transactionHash, + 'prestateTracer', + config + ) + + await matchFixture(res, `trace_tx_${task.name}`) + } + }) + }) + }) + } +} diff --git a/eth-rpc/src/util.ts b/eth-rpc/src/util.ts index 8be7612..1d53ae4 100644 --- a/eth-rpc/src/util.ts +++ b/eth-rpc/src/util.ts @@ -1,8 +1,9 @@ +import fs from 'node:fs' import { spawnSync } from 'node:child_process' import { readFileSync } from 'node:fs' import { - CallParameters, createClient, + createPublicClient, createWalletClient, defineChain, formatTransactionRequest, @@ -11,8 +12,10 @@ import { http, parseEther, publicActions, - TransactionReceipt, + TransactionRequest, } from 'viem' + +import { hexToBytes, concat, keccak256, pad } from 'viem/utils' import { privateKeyToAccount, nonceManager } from 'viem/accounts' export function getByteCode(name: string, evm: boolean = false): Hex { @@ -136,42 +139,58 @@ export async function createEnv(name: 'geth' | 'eth-rpc') { chain, }).extend(publicActions) + type TracerType = 'callTracer' | 'prestateTracer' + type TracerConfig = { + callTracer: { withLog?: boolean; onlyTopCall?: boolean } + prestateTracer: { + diffMode?: boolean + disableCode?: boolean + disableStorage?: boolean + } + } + + const publicClient = createPublicClient({ chain, transport }) + const debugClient = createClient({ chain, transport, }).extend((client) => ({ - async traceTransaction( + async traceTransaction( txHash: Hex, - tracerConfig: { withLog: boolean } - ) { + tracer: Tracer, + tracerConfig?: TracerConfig[Tracer] + ): Promise { return client.request({ method: 'debug_traceTransaction' as any, - params: [txHash, { tracer: 'callTracer', tracerConfig } as any], + params: [txHash, { tracer, tracerConfig } as any], }) }, - async traceBlock( + async traceBlock( blockNumber: bigint, - tracerConfig: { withLog: boolean } - ) { + tracer: Tracer, + tracerConfig?: TracerConfig[Tracer] + ): Promise { return client.request({ method: 'debug_traceBlockByNumber' as any, params: [ `0x${blockNumber.toString(16)}`, - { tracer: 'callTracer', tracerConfig } as any, + { tracer, tracerConfig } as any, ], }) }, - async traceCall( - args: CallParameters, - tracerConfig: { withLog: boolean } - ) { + async traceCall( + args: TransactionRequest, + tracer: Tracer, + tracerConfig: TracerConfig[Tracer], + blockOrTag: 'latest' | Hex = 'latest' + ): Promise { return client.request({ method: 'debug_traceCall' as any, params: [ formatTransactionRequest(args), - 'latest', - { tracer: 'callTracer', tracerConfig } as any, + blockOrTag, + { tracer, tracerConfig } as any, ], }) }, @@ -180,6 +199,7 @@ export async function createEnv(name: 'geth' | 'eth-rpc') { return { chain, debugClient, + publicClient, emptyWallet, serverWallet, accountWallet, @@ -237,13 +257,17 @@ export function waitForHealth(url: string) { export function visit( obj: any, - callback: (key: string, value: any) => any + callback: (key: string, value: any) => [string, any] ): any { if (Array.isArray(obj)) { return obj.map((item) => visit(item, callback)) } else if (typeof obj === 'object' && obj !== null) { return Object.keys(obj).reduce((acc, key) => { - acc[key] = visit(callback(key, obj[key]), callback) + const [mappedKey, mappedValue] = callback(key, obj[key]) + if (mappedKey in acc) { + throw new Error(`visit(): duplicate mapped key “${mappedKey}”`) + } + acc[mappedKey] = visit(mappedValue, callback) return acc }, {} as any) } else { @@ -251,29 +275,47 @@ export function visit( } } -export function deployFactory(env: ChainEnv, deploy: () => Promise) { +export type Visitor = Parameters[1] + +export function memoized(transact: () => Promise) { return (() => { - let address: Hex | null = null - let receipt: TransactionReceipt | null = null - async function getAddress() { - if (address) { - return address + let result: T | null = null + async function getResult() { + if (result) { + return result } - const hash = await deploy() - receipt = await env.serverWallet.waitForTransactionReceipt({ - hash, - }) - address = receipt.contractAddress! - return address - } - async function getReceipt() { - if (receipt) { - return receipt - } - await getAddress() - return receipt! + result = await transact() + return result } - return [getAddress, getReceipt] as const + return getResult })() } + +export function memoizedTx(env: ChainEnv, transact: () => Promise) { + return memoized(async () => { + const hash = await transact() + return await env.serverWallet.waitForTransactionReceipt({ + hash, + }) + }) +} + +export function memoizedDeploy(env: ChainEnv, transact: () => Promise) { + const getReceipt = memoizedTx(env, transact) + return async () => { + const receipt = await getReceipt() + return receipt.contractAddress! + } +} + +export async function computeMappingSlot(addressKey: Hex, slotIndex: number) { + const keyBytes = pad(hexToBytes(addressKey), { size: 32 }) + const slotBytes = pad(hexToBytes(`0x${slotIndex.toString(16)}`), { + size: 32, + }) + + const unhashedKey = concat([keyBytes, slotBytes]) + const storageSlot = keccak256(unhashedKey) + return storageSlot +} diff --git a/package.json b/package.json index 203de2e..d9d73d7 100644 --- a/package.json +++ b/package.json @@ -33,5 +33,6 @@ "hardhat-exposed": "^0.3.16", "hardhat-ignore-warnings": "^0.2.12", "solidity-docgen": "^0.6.0-beta.36" - } + }, + "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" }