From 034a99fd4e33913018996dee95add38c9c441710 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matev=C5=BE=20Jekovec?= Date: Tue, 20 Feb 2024 12:03:51 +0100 Subject: [PATCH 1/4] ci: Add basic build and test --- .github/workflows/ci-test.yaml | 59 ++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 .github/workflows/ci-test.yaml diff --git a/.github/workflows/ci-test.yaml b/.github/workflows/ci-test.yaml new file mode 100644 index 0000000..32de3ab --- /dev/null +++ b/.github/workflows/ci-test.yaml @@ -0,0 +1,59 @@ +name: ci-test + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + test-backend-frontend: + name: test-backend-frontend + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install Node.js + uses: actions/setup-node@v4 + with: + node-version: 18 + + - uses: pnpm/action-setup@v2.4.0 + name: Install pnpm + id: pnpm-install + with: + version: 8 + run_install: false + + - name: Get pnpm store directory + id: pnpm-cache + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT + + - uses: actions/cache@v4 + name: Setup pnpm cache + with: + path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + + - name: Install dependencies + working-directory: backend + run: pnpm install + + - name: Build backend + working-directory: backend + run: pnpm build + + - name: Test backend + working-directory: backend + run: pnpm test + + - name: Build frontend + working-directory: frontend + run: pnpm build From fe6ac408b28f584e555740ca54cd92b374212b4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matev=C5=BE=20Jekovec?= Date: Tue, 20 Feb 2024 12:04:24 +0100 Subject: [PATCH 2/4] contracts: Require message() call to be signed --- backend/contracts/MessageBox.sol | 11 +++++++++-- backend/test/MessageBox.ts | 2 +- frontend/src/views/HomeView.vue | 4 ++-- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/backend/contracts/MessageBox.sol b/backend/contracts/MessageBox.sol index 366c734..1229c5d 100644 --- a/backend/contracts/MessageBox.sol +++ b/backend/contracts/MessageBox.sol @@ -2,11 +2,18 @@ pragma solidity ^0.8.0; contract MessageBox { - string public message; + string private _message; address public author; function setMessage(string calldata in_message) external { - message = in_message; + _message = in_message; author = msg.sender; } + + function message() external view returns (string memory) { + if (msg.sender!=author) { + revert("not allowed"); + } + return _message; + } } diff --git a/backend/test/MessageBox.ts b/backend/test/MessageBox.ts index f45e838..c1788cd 100644 --- a/backend/test/MessageBox.ts +++ b/backend/test/MessageBox.ts @@ -9,7 +9,7 @@ describe("MessageBox", function () { return { messageBox }; } - it("Should send message", async function () { + it("Should set message", async function () { const {messageBox} = await deployMessageBox(); await messageBox.setMessage("hello world"); diff --git a/frontend/src/views/HomeView.vue b/frontend/src/views/HomeView.vue index bae0685..d08fe9b 100644 --- a/frontend/src/views/HomeView.vue +++ b/frontend/src/views/HomeView.vue @@ -32,8 +32,8 @@ function handleError(error: Error, errorMessage: string) { } async function fetchMessage(): Promise { - const message = await uwMessageBox.value!.message(); - const author = await uwMessageBox.value!.author(); + const message = await messageBox.value!.message(); + const author = await messageBox.value!.author(); return { message, author }; } From 627df364996b170d8f94045f910e156e91650834 Mon Sep 17 00:00:00 2001 From: lubej Date: Tue, 20 Feb 2024 13:10:35 +0100 Subject: [PATCH 3/4] Fix typings --- frontend/src/contracts.ts | 4 ++-- frontend/src/stores/ethereum.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/contracts.ts b/frontend/src/contracts.ts index 0c5f904..c7d06c8 100644 --- a/frontend/src/contracts.ts +++ b/frontend/src/contracts.ts @@ -5,7 +5,7 @@ import { type MessageBox, MessageBox__factory } from '@oasisprotocol/demo-starte export type { MessageBox } from '@oasisprotocol/demo-starter-backend'; import { useEthereumStore } from './stores/ethereum'; -import { VoidSigner } from 'ethers'; +import { type ContractRunner, VoidSigner } from 'ethers'; const addr = import.meta.env.VITE_MESSAGE_BOX_ADDR!; @@ -23,7 +23,7 @@ export function useMessageBox(): ComputedRef { return null; } - return MessageBox__factory.connect(addr, eth.signer); + return MessageBox__factory.connect(addr, eth.signer as ContractRunner); }); } diff --git a/frontend/src/stores/ethereum.ts b/frontend/src/stores/ethereum.ts index 0844dc3..e72e0fc 100644 --- a/frontend/src/stores/ethereum.ts +++ b/frontend/src/stores/ethereum.ts @@ -61,7 +61,7 @@ export function networkName(network?: Network): string { declare global { interface Window { - ethereum?: BrowserProvider & Eip1193Provider & sapphire.SapphireAnnex; + ethereum: BrowserProvider & Eip1193Provider & sapphire.SapphireAnnex; } } @@ -91,7 +91,7 @@ export const useEthereumStore = defineStore('ethereum', () => { throw new MetaMaskNotInstalledError('MetaMask not installed!'); } - return ethProvider; + return ethProvider as unknown as typeof window.ethereum; } async function init(addr: string, eth: Eip1193Provider) { From 26b49a983e40456dfb572299735f3a4979a63121 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matev=C5=BE=20Jekovec?= Date: Wed, 21 Feb 2024 15:45:52 +0100 Subject: [PATCH 4/4] deps: Bump sapphire deps --- backend/package.json | 4 +- frontend/package.json | 2 +- pnpm-lock.yaml | 343 ++++++------------------------------------ 3 files changed, 52 insertions(+), 297 deletions(-) diff --git a/backend/package.json b/backend/package.json index 2b988a7..bbcef65 100644 --- a/backend/package.json +++ b/backend/package.json @@ -42,8 +42,8 @@ }, "devDependencies": { "@nomicfoundation/hardhat-ethers": "^3.0.5", - "@oasisprotocol/sapphire-contracts": "^0.2.6", - "@oasisprotocol/sapphire-hardhat": "^2.16.1", + "@oasisprotocol/sapphire-contracts": "^0.2.7", + "@oasisprotocol/sapphire-hardhat": "^2.19.4", "@typechain/ethers-v6": "^0.5.1", "@typechain/hardhat": "^9.1.0", "@types/chai": "^4.3.4", diff --git a/frontend/package.json b/frontend/package.json index 95f5f4e..6bb7730 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -20,7 +20,7 @@ "@metamask/detect-provider": "^2.0.0", "@metamask/jazzicon": "^2.0.0", "@oasisprotocol/demo-starter-backend": "workspace:^", - "@oasisprotocol/sapphire-paratime": "^1.2.2", + "@oasisprotocol/sapphire-paratime": "^1.3.2", "ethers": "^6.10.0", "pinia": "^2.0.28", "vue": "^3.2.45", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7edf57d..a221ca8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -19,11 +19,11 @@ importers: specifier: ^3.0.5 version: 3.0.5(ethers@6.10.0)(hardhat@2.19.2) '@oasisprotocol/sapphire-contracts': - specifier: ^0.2.6 - version: 0.2.6 + specifier: ^0.2.7 + version: 0.2.7 '@oasisprotocol/sapphire-hardhat': - specifier: ^2.16.1 - version: 2.16.1(hardhat@2.19.2)(ts-node@10.9.1)(typescript@4.9.5) + specifier: ^2.19.4 + version: 2.19.4(hardhat@2.19.2) '@typechain/ethers-v6': specifier: ^0.5.1 version: 0.5.1(ethers@6.10.0)(typechain@8.3.2)(typescript@4.9.5) @@ -88,8 +88,8 @@ importers: specifier: workspace:^ version: link:../backend '@oasisprotocol/sapphire-paratime': - specifier: ^1.2.2 - version: 1.2.2 + specifier: ^1.3.2 + version: 1.3.2 ethers: specifier: ^6.10.0 version: 6.10.0 @@ -347,6 +347,7 @@ packages: '@ethersproject/properties': 5.7.0 '@ethersproject/transactions': 5.7.0 '@ethersproject/web': 5.7.1 + dev: true /@ethersproject/abstract-signer@5.7.0: resolution: {integrity: sha512-a16V8bq1/Cz+TGCkE2OPMTOUDLS3grCpdjoJCYNnVBbdYEMSgKrU0+B90s8b6H+ByYTBZN7a3g76jdIJi7UfKQ==} @@ -356,6 +357,7 @@ packages: '@ethersproject/bytes': 5.7.0 '@ethersproject/logger': 5.7.0 '@ethersproject/properties': 5.7.0 + dev: true /@ethersproject/address@5.7.0: resolution: {integrity: sha512-9wYhYt7aghVGo758POM5nqcOMaE168Q6aRLJZwUmiqSrAungkG74gSSeKEIR7ukixesdRZGPgVqme6vmxs1fkA==} @@ -365,17 +367,20 @@ packages: '@ethersproject/keccak256': 5.7.0 '@ethersproject/logger': 5.7.0 '@ethersproject/rlp': 5.7.0 + dev: true /@ethersproject/base64@5.7.0: resolution: {integrity: sha512-Dr8tcHt2mEbsZr/mwTPIQAf3Ai0Bks/7gTw9dSqk1mQvhW3XvRlmDJr/4n+wg1JmCl16NZue17CDh8xb/vZ0sQ==} dependencies: '@ethersproject/bytes': 5.7.0 + dev: true /@ethersproject/basex@5.7.0: resolution: {integrity: sha512-ywlh43GwZLv2Voc2gQVTKBoVQ1mti3d8HK5aMxsfu/nRDnMmNqaSJ3r3n85HBByT8OpoY96SXM1FogC533T4zw==} dependencies: '@ethersproject/bytes': 5.7.0 '@ethersproject/properties': 5.7.0 + dev: true /@ethersproject/bignumber@5.7.0: resolution: {integrity: sha512-n1CAdIHRWjSucQO3MC1zPSVgV/6dy/fjL9pMrPP9peL+QxEg9wOsVqwD4+818B6LUEtaXzVHQiuivzRoxPxUGw==} @@ -383,16 +388,19 @@ packages: '@ethersproject/bytes': 5.7.0 '@ethersproject/logger': 5.7.0 bn.js: 5.2.1 + dev: true /@ethersproject/bytes@5.7.0: resolution: {integrity: sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A==} dependencies: '@ethersproject/logger': 5.7.0 + dev: true /@ethersproject/constants@5.7.0: resolution: {integrity: sha512-DHI+y5dBNvkpYUMiRQyxRBYBefZkJfo70VUkUAsRjcPs47muV9evftfZ0PJVCXYbAiCgght0DtcF9srFQmIgWA==} dependencies: '@ethersproject/bignumber': 5.7.0 + dev: true /@ethersproject/contracts@5.7.0: resolution: {integrity: sha512-5GJbzEU3X+d33CdfPhcyS+z8MzsTrBGk/sc+G+59+tPa9yFkl6HQ9D6L0QMgNTA9q8dT0XKxxkyp883XsQvbbg==} @@ -421,6 +429,7 @@ packages: '@ethersproject/logger': 5.7.0 '@ethersproject/properties': 5.7.0 '@ethersproject/strings': 5.7.0 + dev: true /@ethersproject/hdnode@5.7.0: resolution: {integrity: sha512-OmyYo9EENBPPf4ERhR7oj6uAtUAhYGqOnIS+jE5pTXvdKBS99ikzq1E7Iv0ZQZ5V36Lqx1qZLeak0Ra16qpeOg==} @@ -462,14 +471,17 @@ packages: dependencies: '@ethersproject/bytes': 5.7.0 js-sha3: 0.8.0 + dev: true /@ethersproject/logger@5.7.0: resolution: {integrity: sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig==} + dev: true /@ethersproject/networks@5.7.1: resolution: {integrity: sha512-n/MufjFYv3yFcUyfhnXotyDlNdFb7onmkSy8aQERi2PjNcnWQ66xXxa3XlS8nCcA8aJKJjIIMNJTC7tu80GwpQ==} dependencies: '@ethersproject/logger': 5.7.0 + dev: true /@ethersproject/pbkdf2@5.7.0: resolution: {integrity: sha512-oR/dBRZR6GTyaofd86DehG72hY6NpAjhabkhxgr3X2FpJtJuodEl2auADWBZfhDHgVCbu3/H/Ocq2uC6dpNjjw==} @@ -482,6 +494,7 @@ packages: resolution: {integrity: sha512-J87jy8suntrAkIZtecpxEPxY//szqr1mlBaYlQ0r4RCaiD2hjheqF9s1LVE8vVuJCXisjIP+JgtK/Do54ej4Sw==} dependencies: '@ethersproject/logger': 5.7.0 + dev: true /@ethersproject/providers@5.7.2: resolution: {integrity: sha512-g34EWZ1WWAVgr4aptGlVBF8mhl3VWjv+8hoAnzStu8Ah22VHBsuGzP17eb6xDVRzw895G4W7vvx60lFFur/1Rg==} @@ -509,18 +522,21 @@ packages: transitivePeerDependencies: - bufferutil - utf-8-validate + dev: true /@ethersproject/random@5.7.0: resolution: {integrity: sha512-19WjScqRA8IIeWclFme75VMXSBvi4e6InrUNuaR4s5pTF2qNhcGdCUwdxUVGtDDqC00sDLCO93jPQoDUH4HVmQ==} dependencies: '@ethersproject/bytes': 5.7.0 '@ethersproject/logger': 5.7.0 + dev: true /@ethersproject/rlp@5.7.0: resolution: {integrity: sha512-rBxzX2vK8mVF7b0Tol44t5Tb8gomOHkj5guL+HhzQ1yBh/ydjGnpw6at+X6Iw0Kp3OzzzkcKp8N9r0W4kYSs9w==} dependencies: '@ethersproject/bytes': 5.7.0 '@ethersproject/logger': 5.7.0 + dev: true /@ethersproject/sha2@5.7.0: resolution: {integrity: sha512-gKlH42riwb3KYp0reLsFTokByAKoJdgFCwI+CCiX/k+Jm2mbNs6oOaCjYQSlI1+XBVejwH2KrmCbMAT/GnRDQw==} @@ -528,6 +544,7 @@ packages: '@ethersproject/bytes': 5.7.0 '@ethersproject/logger': 5.7.0 hash.js: 1.1.7 + dev: true /@ethersproject/signing-key@5.7.0: resolution: {integrity: sha512-MZdy2nL3wO0u7gkB4nA/pEf8lu1TlFswPNmy8AiYkfKTdO6eXBJyUdmHO/ehm/htHw9K/qF8ujnTyUAD+Ry54Q==} @@ -538,6 +555,7 @@ packages: bn.js: 5.2.1 elliptic: 6.5.4 hash.js: 1.1.7 + dev: true /@ethersproject/solidity@5.7.0: resolution: {integrity: sha512-HmabMd2Dt/raavyaGukF4XxizWKhKQ24DoLtdNbBmNKUOPqwjsKQSdV9GQtj9CBEea9DlzETlVER1gYeXXBGaA==} @@ -556,6 +574,7 @@ packages: '@ethersproject/bytes': 5.7.0 '@ethersproject/constants': 5.7.0 '@ethersproject/logger': 5.7.0 + dev: true /@ethersproject/transactions@5.7.0: resolution: {integrity: sha512-kmcNicCp1lp8qanMTC3RIikGgoJ80ztTyvtsFvCYpSCfkjhD0jZ2LOrnbcuxuToLIUYYf+4XwD1rP+B/erDIhQ==} @@ -569,6 +588,7 @@ packages: '@ethersproject/properties': 5.7.0 '@ethersproject/rlp': 5.7.0 '@ethersproject/signing-key': 5.7.0 + dev: true /@ethersproject/units@5.7.0: resolution: {integrity: sha512-pD3xLMy3SJu9kG5xDGI7+xhTEmGXlEqXU4OfNapmfnxLVY4EMSSRp7j1k7eezutBPH7RBN/7QPnwR7hzNlEFeg==} @@ -606,6 +626,7 @@ packages: '@ethersproject/logger': 5.7.0 '@ethersproject/properties': 5.7.0 '@ethersproject/strings': 5.7.0 + dev: true /@ethersproject/wordlists@5.7.0: resolution: {integrity: sha512-S2TFNJNfHWVHNE6cNDjbVlZ6MgE17MIxMbMg2zv3wn+3XSJGosL1m9ZVv3GXCf/2ymSsQ+hRI5IzoMJTG6aoVA==} @@ -725,22 +746,6 @@ packages: fastq: 1.15.0 dev: true - /@nomicfoundation/ethereumjs-block@5.0.1: - resolution: {integrity: sha512-u1Yioemi6Ckj3xspygu/SfFvm8vZEO8/Yx5a1QLzi6nVU0jz3Pg2OmHKJ5w+D9Ogk1vhwRiqEBAqcb0GVhCyHw==} - engines: {node: '>=14'} - dependencies: - '@nomicfoundation/ethereumjs-common': 4.0.1 - '@nomicfoundation/ethereumjs-rlp': 5.0.1 - '@nomicfoundation/ethereumjs-trie': 6.0.1 - '@nomicfoundation/ethereumjs-tx': 5.0.1 - '@nomicfoundation/ethereumjs-util': 9.0.1 - ethereum-cryptography: 0.1.3 - ethers: 5.7.2 - transitivePeerDependencies: - - bufferutil - - utf-8-validate - dev: true - /@nomicfoundation/ethereumjs-block@5.0.2: resolution: {integrity: sha512-hSe6CuHI4SsSiWWjHDIzWhSiAVpzMUcDRpWYzN0T9l8/Rz7xNn3elwVOJ/tAyS0LqL6vitUD78Uk7lQDXZun7Q==} engines: {node: '>=14'} @@ -757,29 +762,6 @@ packages: - utf-8-validate dev: true - /@nomicfoundation/ethereumjs-blockchain@7.0.1: - resolution: {integrity: sha512-NhzndlGg829XXbqJEYrF1VeZhAwSPgsK/OB7TVrdzft3y918hW5KNd7gIZ85sn6peDZOdjBsAXIpXZ38oBYE5A==} - engines: {node: '>=14'} - dependencies: - '@nomicfoundation/ethereumjs-block': 5.0.1 - '@nomicfoundation/ethereumjs-common': 4.0.1 - '@nomicfoundation/ethereumjs-ethash': 3.0.1 - '@nomicfoundation/ethereumjs-rlp': 5.0.1 - '@nomicfoundation/ethereumjs-trie': 6.0.1 - '@nomicfoundation/ethereumjs-tx': 5.0.1 - '@nomicfoundation/ethereumjs-util': 9.0.1 - abstract-level: 1.0.3 - debug: 4.3.4(supports-color@8.1.1) - ethereum-cryptography: 0.1.3 - level: 8.0.0 - lru-cache: 5.1.1 - memory-level: 1.0.0 - transitivePeerDependencies: - - bufferutil - - supports-color - - utf-8-validate - dev: true - /@nomicfoundation/ethereumjs-blockchain@7.0.2: resolution: {integrity: sha512-8UUsSXJs+MFfIIAKdh3cG16iNmWzWC/91P40sazNvrqhhdR/RtGDlFk2iFTGbBAZPs2+klZVzhRX8m2wvuvz3w==} engines: {node: '>=14'} @@ -803,13 +785,6 @@ packages: - utf-8-validate dev: true - /@nomicfoundation/ethereumjs-common@4.0.1: - resolution: {integrity: sha512-OBErlkfp54GpeiE06brBW/TTbtbuBJV5YI5Nz/aB2evTDo+KawyEzPjBlSr84z/8MFfj8wS2wxzQX1o32cev5g==} - dependencies: - '@nomicfoundation/ethereumjs-util': 9.0.1 - crc-32: 1.2.2 - dev: true - /@nomicfoundation/ethereumjs-common@4.0.2: resolution: {integrity: sha512-I2WGP3HMGsOoycSdOTSqIaES0ughQTueOsddJ36aYVpI3SN8YSusgRFLwzDJwRFVIYDKx/iJz0sQ5kBHVgdDwg==} dependencies: @@ -817,21 +792,6 @@ packages: crc-32: 1.2.2 dev: true - /@nomicfoundation/ethereumjs-ethash@3.0.1: - resolution: {integrity: sha512-KDjGIB5igzWOp8Ik5I6QiRH5DH+XgILlplsHR7TEuWANZA759G6krQ6o8bvj+tRUz08YygMQu/sGd9mJ1DYT8w==} - engines: {node: '>=14'} - dependencies: - '@nomicfoundation/ethereumjs-block': 5.0.1 - '@nomicfoundation/ethereumjs-rlp': 5.0.1 - '@nomicfoundation/ethereumjs-util': 9.0.1 - abstract-level: 1.0.3 - bigint-crypto-utils: 3.3.0 - ethereum-cryptography: 0.1.3 - transitivePeerDependencies: - - bufferutil - - utf-8-validate - dev: true - /@nomicfoundation/ethereumjs-ethash@3.0.2: resolution: {integrity: sha512-8PfoOQCcIcO9Pylq0Buijuq/O73tmMVURK0OqdjhwqcGHYC2PwhbajDh7GZ55ekB0Px197ajK3PQhpKoiI/UPg==} engines: {node: '>=14'} @@ -847,24 +807,6 @@ packages: - utf-8-validate dev: true - /@nomicfoundation/ethereumjs-evm@2.0.1: - resolution: {integrity: sha512-oL8vJcnk0Bx/onl+TgQOQ1t/534GKFaEG17fZmwtPFeH8S5soiBYPCLUrvANOl4sCp9elYxIMzIiTtMtNNN8EQ==} - engines: {node: '>=14'} - dependencies: - '@ethersproject/providers': 5.7.2 - '@nomicfoundation/ethereumjs-common': 4.0.1 - '@nomicfoundation/ethereumjs-tx': 5.0.1 - '@nomicfoundation/ethereumjs-util': 9.0.1 - debug: 4.3.4(supports-color@8.1.1) - ethereum-cryptography: 0.1.3 - mcl-wasm: 0.7.9 - rustbn.js: 0.2.0 - transitivePeerDependencies: - - bufferutil - - supports-color - - utf-8-validate - dev: true - /@nomicfoundation/ethereumjs-evm@2.0.2: resolution: {integrity: sha512-rBLcUaUfANJxyOx9HIdMX6uXGin6lANCulIm/pjMgRqfiCRMZie3WKYxTSd8ZE/d+qT+zTedBF4+VHTdTSePmQ==} engines: {node: '>=14'} @@ -883,33 +825,12 @@ packages: - utf-8-validate dev: true - /@nomicfoundation/ethereumjs-rlp@5.0.1: - resolution: {integrity: sha512-xtxrMGa8kP4zF5ApBQBtjlSbN5E2HI8m8FYgVSYAnO6ssUoY5pVPGy2H8+xdf/bmMa22Ce8nWMH3aEW8CcqMeQ==} - engines: {node: '>=14'} - hasBin: true - dev: true - /@nomicfoundation/ethereumjs-rlp@5.0.2: resolution: {integrity: sha512-QwmemBc+MMsHJ1P1QvPl8R8p2aPvvVcKBbvHnQOKBpBztEo0omN0eaob6FeZS/e3y9NSe+mfu3nNFBHszqkjTA==} engines: {node: '>=14'} hasBin: true dev: true - /@nomicfoundation/ethereumjs-statemanager@2.0.1: - resolution: {integrity: sha512-B5ApMOnlruVOR7gisBaYwFX+L/AP7i/2oAahatssjPIBVDF6wTX1K7Qpa39E/nzsH8iYuL3krkYeUFIdO3EMUQ==} - dependencies: - '@nomicfoundation/ethereumjs-common': 4.0.1 - '@nomicfoundation/ethereumjs-rlp': 5.0.1 - debug: 4.3.4(supports-color@8.1.1) - ethereum-cryptography: 0.1.3 - ethers: 5.7.2 - js-sdsl: 4.4.2 - transitivePeerDependencies: - - bufferutil - - supports-color - - utf-8-validate - dev: true - /@nomicfoundation/ethereumjs-statemanager@2.0.2: resolution: {integrity: sha512-dlKy5dIXLuDubx8Z74sipciZnJTRSV/uHG48RSijhgm1V7eXYFC567xgKtsKiVZB1ViTP9iFL4B6Je0xD6X2OA==} dependencies: @@ -925,17 +846,6 @@ packages: - utf-8-validate dev: true - /@nomicfoundation/ethereumjs-trie@6.0.1: - resolution: {integrity: sha512-A64It/IMpDVODzCgxDgAAla8jNjNtsoQZIzZUfIV5AY6Coi4nvn7+VReBn5itlxMiL2yaTlQr9TRWp3CSI6VoA==} - engines: {node: '>=14'} - dependencies: - '@nomicfoundation/ethereumjs-rlp': 5.0.1 - '@nomicfoundation/ethereumjs-util': 9.0.1 - '@types/readable-stream': 2.3.15 - ethereum-cryptography: 0.1.3 - readable-stream: 3.6.2 - dev: true - /@nomicfoundation/ethereumjs-trie@6.0.2: resolution: {integrity: sha512-yw8vg9hBeLYk4YNg5MrSJ5H55TLOv2FSWUTROtDtTMMmDGROsAu+0tBjiNGTnKRi400M6cEzoFfa89Fc5k8NTQ==} engines: {node: '>=14'} @@ -947,21 +857,6 @@ packages: readable-stream: 3.6.2 dev: true - /@nomicfoundation/ethereumjs-tx@5.0.1: - resolution: {integrity: sha512-0HwxUF2u2hrsIM1fsasjXvlbDOq1ZHFV2dd1yGq8CA+MEYhaxZr8OTScpVkkxqMwBcc5y83FyPl0J9MZn3kY0w==} - engines: {node: '>=14'} - dependencies: - '@chainsafe/ssz': 0.9.4 - '@ethersproject/providers': 5.7.2 - '@nomicfoundation/ethereumjs-common': 4.0.1 - '@nomicfoundation/ethereumjs-rlp': 5.0.1 - '@nomicfoundation/ethereumjs-util': 9.0.1 - ethereum-cryptography: 0.1.3 - transitivePeerDependencies: - - bufferutil - - utf-8-validate - dev: true - /@nomicfoundation/ethereumjs-tx@5.0.2: resolution: {integrity: sha512-T+l4/MmTp7VhJeNloMkM+lPU3YMUaXdcXgTGCf8+ZFvV9NYZTRLFekRwlG6/JMmVfIfbrW+dRRJ9A6H5Q/Z64g==} engines: {node: '>=14'} @@ -977,15 +872,6 @@ packages: - utf-8-validate dev: true - /@nomicfoundation/ethereumjs-util@9.0.1: - resolution: {integrity: sha512-TwbhOWQ8QoSCFhV/DDfSmyfFIHjPjFBj957219+V3jTZYZ2rf9PmDtNOeZWAE3p3vlp8xb02XGpd0v6nTUPbsA==} - engines: {node: '>=14'} - dependencies: - '@chainsafe/ssz': 0.10.2 - '@nomicfoundation/ethereumjs-rlp': 5.0.1 - ethereum-cryptography: 0.1.3 - dev: true - /@nomicfoundation/ethereumjs-util@9.0.2: resolution: {integrity: sha512-4Wu9D3LykbSBWZo8nJCnzVIYGvGCuyiYLIJa9XXNVt1q1jUzHdB+sJvx95VGCpPkCT+IbLecW6yfzy3E1bQrwQ==} engines: {node: '>=14'} @@ -1138,147 +1024,35 @@ packages: '@nomicfoundation/solidity-analyzer-win32-x64-msvc': 0.1.1 dev: true - /@oasislabs/ethereumjs-vm@7.0.1: - resolution: {integrity: sha512-ki1vaaXjOAqMOW6nyb7KgT3tShR+TERMQAae9MljGEvNpFyLzDdOxyRdjoDbTxjysa6651pl+KhZ8LUjKNuqiQ==} - engines: {node: '>=14'} - dependencies: - '@nomicfoundation/ethereumjs-block': 5.0.1 - '@nomicfoundation/ethereumjs-blockchain': 7.0.1 - '@nomicfoundation/ethereumjs-common': 4.0.1 - '@nomicfoundation/ethereumjs-evm': 2.0.1 - '@nomicfoundation/ethereumjs-rlp': 5.0.1 - '@nomicfoundation/ethereumjs-statemanager': 2.0.1 - '@nomicfoundation/ethereumjs-trie': 6.0.1 - '@nomicfoundation/ethereumjs-tx': 5.0.1 - '@nomicfoundation/ethereumjs-util': 9.0.1 - '@oasisprotocol/sapphire-paratime': 1.2.2 - '@types/async-eventemitter': 0.2.2 - async-eventemitter: 0.2.4 - cborg: 1.10.2 - debug: 4.3.4(supports-color@8.1.1) - ethereum-cryptography: 0.1.3 - mcl-wasm: 0.7.9 - rustbn.js: 0.2.0 - tweetnacl: 1.0.3 - transitivePeerDependencies: - - bufferutil - - supports-color - - utf-8-validate - dev: true - - /@oasislabs/hardhat@2.16.1(ts-node@10.9.1)(typescript@4.9.5): - resolution: {integrity: sha512-Gh4+yZBXeCNEhNIROMPa7wU2i2EfQlxmAlas25afl7JDsJaJjsMYzAZ7zcRrjEYn2LaT5wCGkol+slxuzEAcZw==} - engines: {node: '>=14.0.0'} - peerDependencies: - ts-node: '*' - typescript: '*' - peerDependenciesMeta: - ts-node: - optional: true - typescript: - optional: true - dependencies: - '@ethersproject/abi': 5.7.0 - '@ethersproject/bytes': 5.7.0 - '@ethersproject/hash': 5.7.0 - '@metamask/eth-sig-util': 4.0.1 - '@nomicfoundation/ethereumjs-block': 5.0.1 - '@nomicfoundation/ethereumjs-blockchain': 7.0.1 - '@nomicfoundation/ethereumjs-common': 4.0.1 - '@nomicfoundation/ethereumjs-evm': 2.0.1 - '@nomicfoundation/ethereumjs-rlp': 5.0.1 - '@nomicfoundation/ethereumjs-statemanager': 2.0.1 - '@nomicfoundation/ethereumjs-trie': 6.0.1 - '@nomicfoundation/ethereumjs-tx': 5.0.1 - '@nomicfoundation/ethereumjs-util': 9.0.1 - '@nomicfoundation/solidity-analyzer': 0.1.1 - '@oasislabs/ethereumjs-vm': 7.0.1 - '@oasisprotocol/sapphire-paratime': 1.2.2 - '@sentry/node': 5.30.0 - '@types/bn.js': 5.1.2 - '@types/lru-cache': 5.1.1 - abort-controller: 3.0.0 - adm-zip: 0.4.16 - aggregate-error: 3.1.0 - ansi-escapes: 4.3.2 - cborg: 1.10.2 - chalk: 2.4.2 - chokidar: 3.5.3 - ci-info: 2.0.0 - debug: 4.3.4(supports-color@8.1.1) - enquirer: 2.4.1 - env-paths: 2.2.1 - ethereum-cryptography: 1.2.0 - ethereumjs-abi: 0.6.8 - ethers-v5: /ethers@5.7.2 - find-up: 2.1.0 - fp-ts: 1.19.3 - fs-extra: 7.0.1 - glob: 7.2.0 - immutable: 4.3.4 - io-ts: 1.10.4 - keccak: 3.0.4 - lodash: 4.17.21 - mnemonist: 0.38.5 - mocha: 10.2.0 - p-map: 4.0.0 - raw-body: 2.5.2 - resolve: 1.17.0 - semver: 6.3.1 - solc: 0.7.3(debug@4.3.4) - source-map-support: 0.5.21 - stacktrace-parser: 0.1.10 - ts-node: 10.9.1(@types/node@18.14.0)(typescript@4.9.5) - tsort: 0.0.1 - typescript: 4.9.5 - undici: 5.25.2 - uuid: 8.3.2 - ws: 7.5.9 - transitivePeerDependencies: - - bufferutil - - supports-color - - utf-8-validate - dev: true - /@oasisprotocol/deoxysii@0.0.5: resolution: {integrity: sha512-a6wYPjk8ALDIiQW/971AKOTSTY1qSdld+Y05F44gVZvlb3FOyHfgbIxXm7CZnUG1A+jK49g5SCWYP+V3/Tc75Q==} dependencies: bsaes: 0.0.2 uint32: 0.2.1 - /@oasisprotocol/sapphire-contracts@0.2.6: - resolution: {integrity: sha512-idBs0QH1eIr/u17ONDk3gZThBOoDwObpLxvWCS4FFldsFa9+K2xtVIt3FyaFl28K+pKyiafv0sVDVByhXecCIg==} + /@oasisprotocol/sapphire-contracts@0.2.7: + resolution: {integrity: sha512-jMCRA/l9dWKDmvjYzfK+u87/GhTYrEdnmTxG924KHNTAGeJs9y9rpihPEVMhQfe8DeHEdaLULormCsebJVxfdA==} dev: true - /@oasisprotocol/sapphire-hardhat@2.16.1(hardhat@2.19.2)(ts-node@10.9.1)(typescript@4.9.5): - resolution: {integrity: sha512-EhvLHWk1gVDEcBd0NQpM9iM/dYkyUcMxHHolXYtYS/KDg0KOjYZTN2kyO2/2VWLfWXZzXHE+0/08JnWHDD1XKQ==} + /@oasisprotocol/sapphire-hardhat@2.19.4(hardhat@2.19.2): + resolution: {integrity: sha512-gpNRrVN90nDAKZ6O6j76vitp4YPRsaQTNR7xkMNbzBCnHfnlT6BGWvXbLFeyQSPhtia129xUYrrv/gL/X/f+lA==} peerDependencies: - hardhat: ^2.0.0 + hardhat: 2.x dependencies: - '@oasislabs/hardhat': 2.16.1(ts-node@10.9.1)(typescript@4.9.5) - '@oasisprotocol/sapphire-paratime': 1.2.2 + '@oasisprotocol/sapphire-paratime': 1.3.2 hardhat: 2.19.2(ts-node@10.9.1)(typescript@4.9.5) transitivePeerDependencies: - bufferutil - - supports-color - - ts-node - - typescript - utf-8-validate dev: true - /@oasisprotocol/sapphire-paratime@1.2.2: - resolution: {integrity: sha512-rX2JvE0Ra+gJ3fnBzvUn1KVVQ+AD4Qc8i6jr0/IX6DJGdWxodM8SN1XFIZYpYjEdtN50TysMPgUgPvQhU1x0+Q==} + /@oasisprotocol/sapphire-paratime@1.3.2: + resolution: {integrity: sha512-98EQ2BrT0942B0VY50PKcJ6xmUAcz71y8OBMizP6oBJIh0+ogw/z3r5z4veJitMXM4zQbh5wOFaS9eOcKWX5FA==} dependencies: - '@ethersproject/abstract-provider': 5.7.0 - '@ethersproject/abstract-signer': 5.7.0 - '@ethersproject/bignumber': 5.7.0 - '@ethersproject/bytes': 5.7.0 - '@ethersproject/providers': 5.7.2 - '@ethersproject/rlp': 5.7.0 + '@noble/hashes': 1.3.2 '@oasisprotocol/deoxysii': 0.0.5 cborg: 1.10.2 - ethers6: /ethers@6.10.0 - js-sha512: 0.8.0 + ethers: 6.10.0 tweetnacl: 1.0.3 type-fest: 2.19.0 transitivePeerDependencies: @@ -1459,10 +1233,6 @@ packages: typechain: 8.3.2(typescript@4.9.5) dev: true - /@types/async-eventemitter@0.2.2: - resolution: {integrity: sha512-cUFkZN+0TXQ2HYX/vbVUa/0+3/kXtuVrojjzq4Yo8X68UDvwngMf7uOZWT7BcA5P6MhCNd/zOCuczgPAQxsNIQ==} - dev: true - /@types/bn.js@4.11.6: resolution: {integrity: sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==} dependencies: @@ -1900,13 +1670,6 @@ packages: resolution: {integrity: sha512-LEyx4aLEC3x6T0UguF6YILf+ntvmOaWsVfENmIW0E9H09vKlLDGelMjjSm0jkDHALj8A8quZ/HapKNigzwge+Q==} dev: true - /abort-controller@3.0.0: - resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==} - engines: {node: '>=6.5'} - dependencies: - event-target-shim: 5.0.1 - dev: true - /abstract-level@1.0.3: resolution: {integrity: sha512-t6jv+xHy+VYwc4xqZMn2Pa9DjcdzvzZmQGRjTFc8spIbRGHgBrEKbPq+rYXc7CCo0lxgYvSgKVg9qZAhpVQSjA==} engines: {node: '>=12'} @@ -2180,22 +1943,10 @@ packages: engines: {node: '>=8'} dev: true - /async-eventemitter@0.2.4: - resolution: {integrity: sha512-pd20BwL7Yt1zwDFy+8MX8F1+WCT8aQeKj0kQnTrH9WaeRETlRamVhD0JtRPmrV4GfOJ2F9CvdQkZeZhnh2TuHw==} - dependencies: - async: 2.6.4 - dev: true - /async@1.5.2: resolution: {integrity: sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w==} dev: true - /async@2.6.4: - resolution: {integrity: sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==} - dependencies: - lodash: 4.17.21 - dev: true - /at-least-node@1.0.0: resolution: {integrity: sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==} engines: {node: '>= 4.0.0'} @@ -2238,6 +1989,7 @@ packages: /bech32@1.1.4: resolution: {integrity: sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==} + dev: true /bigint-crypto-utils@3.3.0: resolution: {integrity: sha512-jOTSb+drvEDxEq6OuUybOAv/xxoh3cuYRUIPyu8sSHQNKM303UQ2R1DAo45o1AkcIXw6fzbaFI1+xGGdaXs2lg==} @@ -2259,9 +2011,11 @@ packages: /bn.js@4.12.0: resolution: {integrity: sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==} + dev: true /bn.js@5.2.1: resolution: {integrity: sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==} + dev: true /boolbase@1.0.0: resolution: {integrity: sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==} @@ -2289,6 +2043,7 @@ packages: /brorand@1.1.0: resolution: {integrity: sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==} + dev: true /browser-level@1.0.1: resolution: {integrity: sha512-XECYKJ+Dbzw0lbydyQuJzwNXtOpbMSq737qxJN11sIRTErOMShvDpbzTlgju7orJKvx4epULolZAuJGLzCmWRQ==} @@ -3027,6 +2782,7 @@ packages: inherits: 2.0.4 minimalistic-assert: 1.0.1 minimalistic-crypto-utils: 1.0.1 + dev: true /emoji-regex@7.0.3: resolution: {integrity: sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==} @@ -3687,11 +3443,6 @@ packages: strip-hex-prefix: 1.0.0 dev: true - /event-target-shim@5.0.1: - resolution: {integrity: sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==} - engines: {node: '>=6'} - dev: true - /evp_bytestokey@1.0.3: resolution: {integrity: sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==} dependencies: @@ -4263,6 +4014,7 @@ packages: dependencies: inherits: 2.0.4 minimalistic-assert: 1.0.1 + dev: true /he@1.2.0: resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} @@ -4279,6 +4031,7 @@ packages: hash.js: 1.1.7 minimalistic-assert: 1.0.1 minimalistic-crypto-utils: 1.0.1 + dev: true /hosted-git-info@2.8.9: resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} @@ -4361,6 +4114,7 @@ packages: /inherits@2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + dev: true /ini@1.3.8: resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==} @@ -4569,9 +4323,7 @@ packages: /js-sha3@0.8.0: resolution: {integrity: sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==} - - /js-sha512@0.8.0: - resolution: {integrity: sha512-PWsmefG6Jkodqt+ePTvBZCSMFgN7Clckjd0O7su3I0+BW2QWUTJNzjktHsztGLhncP2h8mcF9V9Y2Ha59pAViQ==} + dev: true /js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} @@ -4906,9 +4658,11 @@ packages: /minimalistic-assert@1.0.1: resolution: {integrity: sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==} + dev: true /minimalistic-crypto-utils@1.0.1: resolution: {integrity: sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==} + dev: true /minimatch@3.0.4: resolution: {integrity: sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==} @@ -7166,6 +6920,7 @@ packages: optional: true utf-8-validate: optional: true + dev: true /ws@7.5.9: resolution: {integrity: sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==}