From 5db1f4ee74a96b3b07e62c4dbbc2e0fa284f3333 Mon Sep 17 00:00:00 2001 From: Ahmad Kaouk <56095276+ahmadkaouk@users.noreply.github.com> Date: Wed, 17 Sep 2025 14:21:55 +0200 Subject: [PATCH] refactor: cleanup obsolete test folder (#166) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ### Summary Removes the obsolete `operator/test` folder that was no longer being used and contained outdated test scripts. ### Changes - ✅ Deleted `operator/test/` directory and all contents - ✅ Moved `test_message_encoding.sh` script to `operator/scripts/` for proper organization - ✅ Updated comment reference in `contracts/test/MessageEncoding.t.sol` to point to new script location ### Impact - **No breaking changes** - All legitimate test files remain properly organized within their respective pallets - **Cleaner codebase** - Removes unused/obsolete code --- contracts/test/MessageEncoding.t.sol | 2 +- .../scripts/test_message_encoding.sh | 0 operator/test/assets/beacon-relay.json | 26 - operator/test/assets/genesis.json | 61 - operator/test/assets/jwtsecret | 1 - operator/test/config/beefy-relay.json | 24 - .../test/config/zombie-datahaven-local.toml | 21 - operator/test/helpers/getBeefyBlock.js | 57 - operator/test/helpers/package-lock.json | 1158 ----------------- operator/test/helpers/package.json | 15 - operator/test/helpers/submit-checkpoint.js | 95 -- operator/test/scripts/build-binary.sh | 37 - operator/test/scripts/build-contracts.sh | 23 - operator/test/scripts/build-ethereum.sh | 45 - operator/test/scripts/deploy-contracts.sh | 43 - operator/test/scripts/deploy-datahaven.sh | 22 - operator/test/scripts/deploy-ethereum.sh | 122 -- .../test/scripts/force-beacon-checkpoint.sh | 33 - .../test/scripts/generate-beefy-checkpoint.sh | 18 - operator/test/scripts/set-env.sh | 212 --- operator/test/scripts/start-relayer.sh | 87 -- operator/test/scripts/start-testnet.sh | 49 - 22 files changed, 1 insertion(+), 2150 deletions(-) rename operator/{test => }/scripts/test_message_encoding.sh (100%) delete mode 100644 operator/test/assets/beacon-relay.json delete mode 100644 operator/test/assets/genesis.json delete mode 100644 operator/test/assets/jwtsecret delete mode 100644 operator/test/config/beefy-relay.json delete mode 100644 operator/test/config/zombie-datahaven-local.toml delete mode 100755 operator/test/helpers/getBeefyBlock.js delete mode 100644 operator/test/helpers/package-lock.json delete mode 100644 operator/test/helpers/package.json delete mode 100644 operator/test/helpers/submit-checkpoint.js delete mode 100644 operator/test/scripts/build-binary.sh delete mode 100755 operator/test/scripts/build-contracts.sh delete mode 100755 operator/test/scripts/build-ethereum.sh delete mode 100644 operator/test/scripts/deploy-contracts.sh delete mode 100755 operator/test/scripts/deploy-datahaven.sh delete mode 100755 operator/test/scripts/deploy-ethereum.sh delete mode 100755 operator/test/scripts/force-beacon-checkpoint.sh delete mode 100755 operator/test/scripts/generate-beefy-checkpoint.sh delete mode 100755 operator/test/scripts/set-env.sh delete mode 100755 operator/test/scripts/start-relayer.sh delete mode 100755 operator/test/scripts/start-testnet.sh diff --git a/contracts/test/MessageEncoding.t.sol b/contracts/test/MessageEncoding.t.sol index ddce2fea..e258725d 100644 --- a/contracts/test/MessageEncoding.t.sol +++ b/contracts/test/MessageEncoding.t.sol @@ -8,7 +8,7 @@ import {TestUtils} from "./utils/TestUtils.sol"; // This test is used to encode the receive validators message and print the hex string. // Run forge test --match-test testEncodeReceiveValidatorsMessage -vvv to see the hex encoded bytes. -// Use the helper script in operator/test/scripts/test_message_encoding.sh to test the encoding/decoding full cycle. +// Use the helper script in operator/scripts/test_message_encoding.sh to test the encoding/decoding full cycle. contract MessageEncodingTest is Test { function testEncodeReceiveValidatorsMessage() public pure { // Use the utility function for consistency diff --git a/operator/test/scripts/test_message_encoding.sh b/operator/scripts/test_message_encoding.sh similarity index 100% rename from operator/test/scripts/test_message_encoding.sh rename to operator/scripts/test_message_encoding.sh diff --git a/operator/test/assets/beacon-relay.json b/operator/test/assets/beacon-relay.json deleted file mode 100644 index 4bfb2ca2..00000000 --- a/operator/test/assets/beacon-relay.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "source": { - "beacon": { - "endpoint": "http://127.0.0.1:9596", - "stateEndpoint": "http://127.0.0.1:9596", - "spec": { - "syncCommitteeSize": 512, - "slotsInEpoch": 32, - "epochsPerSyncCommitteePeriod": 256, - "denebForkedEpoch": 0 - }, - "datastore": { - "location": "", - "maxEntries": 100 - } - } - }, - "sink": { - "parachain": { - "endpoint": "", - "maxWatchedExtrinsics": 8, - "headerRedundancy": 20 - }, - "updateSlotInterval": 30 - } -} diff --git a/operator/test/assets/genesis.json b/operator/test/assets/genesis.json deleted file mode 100644 index 3ba8ff5d..00000000 --- a/operator/test/assets/genesis.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "config": { - "chainId": 11155111, - "homesteadBlock": 0, - "eip150Block": 0, - "eip155Block": 0, - "eip158Block": 0, - "byzantiumBlock": 0, - "constantinopleBlock": 0, - "petersburgBlock": 0, - "istanbulBlock": 0, - "muirGlacierBlock": 0, - "berlinBlock": 0, - "londonBlock": 0, - "ethash": {}, - "terminalTotalDifficulty": 0, - "ShanghaiTime": 0, - "CancunTime": null, - "terminalTotalDifficultyPassed": true - }, - "difficulty": "0x9FFE0", - "gasLimit": "80000000", - "alloc": { - "90A987B944Cb1dCcE5564e5FDeCD7a54D3de27Fe": { - "balance": "1000000000000000000000000" - }, - "Be68fC2d8249eb60bfCf0e71D5A0d2F2e292c4eD": { - "balance": "100000000000000000000" - }, - "89b4AB1eF20763630df9743ACF155865600daFF2": { - "balance": "100000000000000000000" - }, - "04E00e6D2e9Ea1E2AF553De02A5172120BFA5c3e": { - "balance": "100000000000000000000" - }, - "a255dC78C1510e2c1332fBAC2de848058f479CEE": { - "balance": "100000000000000000000" - }, - "ACbd24742b87c34dED607FB87b22401B2Ede167E": { - "balance": "100000000000000000000" - }, - "01F6749035e02205768f97e6f1d394Fb6769EC20": { - "balance": "100000000000000000000" - }, - "8b66D5499F52D6F1857084A61743dFCB9a712859": { - "balance": "100000000000000000000" - }, - "13e16C4e5787f878f98a610EB321170512b134D4": { - "balance": "100000000000000000000" - }, - "eEBFA6B9242A19f91a0463291A937a20e3355681": { - "balance": "100000000000000000000" - }, - "87D987206180B8f3807Dd90455606eEa85cdB87a": { - "balance": "100000000000000000000" - }, - "0xACbd24742b87c34dED607FB87b22401B2Ede167E": { - "balance": "100000000000000000000" - } - } -} \ No newline at end of file diff --git a/operator/test/assets/jwtsecret b/operator/test/assets/jwtsecret deleted file mode 100644 index 583b13cc..00000000 --- a/operator/test/assets/jwtsecret +++ /dev/null @@ -1 +0,0 @@ -0xdc6457099f127cf0bac78de8b297df04951281909db4f58b43def7c7151e765d \ No newline at end of file diff --git a/operator/test/config/beefy-relay.json b/operator/test/config/beefy-relay.json deleted file mode 100644 index 212ad947..00000000 --- a/operator/test/config/beefy-relay.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "source": { - "polkadot": { - "endpoint": "ws://127.0.0.1:30444" - } - }, - "sink": { - "ethereum": { - "endpoint": "ws://127.0.0.1:8546", - "gas-limit": null - }, - "descendants-until-final": 3, - "contracts": { - "BeefyClient": null, - "Gateway": null - } - }, - "on-demand-sync": { - "asset-hub-channel-id": "0xc173fac324158e77fb5840738a1a541f633cbec8884c6a601c567d2b376a0539", - "max-tokens": 5, - "refill-amount": 1, - "refill-period": 3600 - } -} \ No newline at end of file diff --git a/operator/test/config/zombie-datahaven-local.toml b/operator/test/config/zombie-datahaven-local.toml deleted file mode 100644 index e0700895..00000000 --- a/operator/test/config/zombie-datahaven-local.toml +++ /dev/null @@ -1,21 +0,0 @@ -[settings] -timeout = 120 - -[relaychain] -chain = "local" -default_args = [ - "-l=debug", - "--pruning=archive", - "--enable-offchain-indexing=true", - "--offchain-worker=when-authority", -] -default_command = "${output_bin_dir:-./target/release}/datahaven-node" - -[[relaychain.nodes]] -name = "alice" -validator = true -ws_port = 30444 - -[[relaychain.nodes]] -name = "bob" -validator = true diff --git a/operator/test/helpers/getBeefyBlock.js b/operator/test/helpers/getBeefyBlock.js deleted file mode 100755 index 5b1834d8..00000000 --- a/operator/test/helpers/getBeefyBlock.js +++ /dev/null @@ -1,57 +0,0 @@ -const { ethers } = require('ethers'); - -async function getBeefyBlock(contractAddress, providerUrl) { - // Connect to the network - const provider = new ethers.JsonRpcProvider(providerUrl); - - // BeefyClient ABI - we only need the latestBeefyBlock function - const abi = [ - "function latestBeefyBlock() view returns (uint64)", - "function latestMMRRoot() view returns (bytes32)" - ]; - - // Create contract instance - const beefyClient = new ethers.Contract(contractAddress, abi, provider); - - try { - // Get the latest beefy block - const blockNumber = await beefyClient.latestBeefyBlock(); - const mmrRoot = await beefyClient.latestMMRRoot(); - - console.log('Latest Beefy Block Number:', blockNumber.toString()); - console.log('Latest MMR Root:', mmrRoot); - - return { - blockNumber: blockNumber, - mmrRoot: mmrRoot - }; - } catch (error) { - console.error('Error fetching beefy block:', error); - throw error; - } -} - -// If this file is being run directly (not imported) -if (require.main === module) { - // Get command line arguments - const args = process.argv.slice(2); - const contractAddress = args[0]; - const providerUrl = args[1]; - - if (!contractAddress || !providerUrl) { - console.error('Usage: node beefyBlockClient.js '); - console.error('Example: node beefyBlockClient.js 0x1234... http://localhost:8545'); - process.exit(1); - } - - // Run the script - getBeefyBlock(contractAddress, providerUrl) - .then(() => process.exit(0)) - .catch(error => { - console.error(error); - process.exit(1); - }); -} else { - // Export for use in other files - module.exports = { getBeefyBlock }; -} \ No newline at end of file diff --git a/operator/test/helpers/package-lock.json b/operator/test/helpers/package-lock.json deleted file mode 100644 index 4943454b..00000000 --- a/operator/test/helpers/package-lock.json +++ /dev/null @@ -1,1158 +0,0 @@ -{ - "name": "beefy-client-helpers", - "version": "1.0.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "beefy-client-helpers", - "version": "1.0.0", - "hasInstallScript": true, - "dependencies": { - "@polkadot/api": "15.5.1", - "@polkadot/util": "13.3.1", - "@polkadot/util-crypto": "13.3.1", - "ethers": "^6.11.1" - } - }, - "node_modules/@adraffy/ens-normalize": { - "version": "1.10.1", - "resolved": "https://registry.npmjs.org/@adraffy/ens-normalize/-/ens-normalize-1.10.1.tgz", - "integrity": "sha512-96Z2IP3mYmF1Xg2cDm8f1gWGf/HUVedQ3FMifV4kG/PQ4yEP51xDtRAEfhVNt5f/uzpNkZHwWQuUcu6D6K+Ekw==" - }, - "node_modules/@noble/curves": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.8.1.tgz", - "integrity": "sha512-warwspo+UYUPep0Q+vtdVB4Ugn8GGQj8iyB3gnRWsztmUHTI3S1nhdiWNsPUGL0vud7JlRRk1XEu7Lq1KGTnMQ==", - "dependencies": { - "@noble/hashes": "1.7.1" - }, - "engines": { - "node": "^14.21.3 || >=16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@noble/hashes": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.7.1.tgz", - "integrity": "sha512-B8XBPsn4vT/KJAGqDzbwztd+6Yte3P4V7iafm24bxgDe/mlRuK6xmWPuCNrKt2vDafZ8MfJLlchDG/vYafQEjQ==", - "engines": { - "node": "^14.21.3 || >=16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@polkadot-api/json-rpc-provider": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/@polkadot-api/json-rpc-provider/-/json-rpc-provider-0.0.1.tgz", - "integrity": "sha512-/SMC/l7foRjpykLTUTacIH05H3mr9ip8b5xxfwXlVezXrNVLp3Cv0GX6uItkKd+ZjzVPf3PFrDF2B2/HLSNESA==", - "optional": true - }, - "node_modules/@polkadot-api/json-rpc-provider-proxy": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@polkadot-api/json-rpc-provider-proxy/-/json-rpc-provider-proxy-0.1.0.tgz", - "integrity": "sha512-8GSFE5+EF73MCuLQm8tjrbCqlgclcHBSRaswvXziJ0ZW7iw3UEMsKkkKvELayWyBuOPa2T5i1nj6gFOeIsqvrg==", - "optional": true - }, - "node_modules/@polkadot-api/metadata-builders": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@polkadot-api/metadata-builders/-/metadata-builders-0.3.2.tgz", - "integrity": "sha512-TKpfoT6vTb+513KDzMBTfCb/ORdgRnsS3TDFpOhAhZ08ikvK+hjHMt5plPiAX/OWkm1Wc9I3+K6W0hX5Ab7MVg==", - "optional": true, - "dependencies": { - "@polkadot-api/substrate-bindings": "0.6.0", - "@polkadot-api/utils": "0.1.0" - } - }, - "node_modules/@polkadot-api/observable-client": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@polkadot-api/observable-client/-/observable-client-0.3.2.tgz", - "integrity": "sha512-HGgqWgEutVyOBXoGOPp4+IAq6CNdK/3MfQJmhCJb8YaJiaK4W6aRGrdQuQSTPHfERHCARt9BrOmEvTXAT257Ug==", - "optional": true, - "dependencies": { - "@polkadot-api/metadata-builders": "0.3.2", - "@polkadot-api/substrate-bindings": "0.6.0", - "@polkadot-api/utils": "0.1.0" - }, - "peerDependencies": { - "@polkadot-api/substrate-client": "0.1.4", - "rxjs": ">=7.8.0" - } - }, - "node_modules/@polkadot-api/substrate-bindings": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@polkadot-api/substrate-bindings/-/substrate-bindings-0.6.0.tgz", - "integrity": "sha512-lGuhE74NA1/PqdN7fKFdE5C1gNYX357j1tWzdlPXI0kQ7h3kN0zfxNOpPUN7dIrPcOFZ6C0tRRVrBylXkI6xPw==", - "optional": true, - "dependencies": { - "@noble/hashes": "^1.3.1", - "@polkadot-api/utils": "0.1.0", - "@scure/base": "^1.1.1", - "scale-ts": "^1.6.0" - } - }, - "node_modules/@polkadot-api/substrate-client": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/@polkadot-api/substrate-client/-/substrate-client-0.1.4.tgz", - "integrity": "sha512-MljrPobN0ZWTpn++da9vOvt+Ex+NlqTlr/XT7zi9sqPtDJiQcYl+d29hFAgpaeTqbeQKZwz3WDE9xcEfLE8c5A==", - "optional": true, - "dependencies": { - "@polkadot-api/json-rpc-provider": "0.0.1", - "@polkadot-api/utils": "0.1.0" - } - }, - "node_modules/@polkadot-api/utils": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@polkadot-api/utils/-/utils-0.1.0.tgz", - "integrity": "sha512-MXzWZeuGxKizPx2Xf/47wx9sr/uxKw39bVJUptTJdsaQn/TGq+z310mHzf1RCGvC1diHM8f593KrnDgc9oNbJA==", - "optional": true - }, - "node_modules/@polkadot/api": { - "version": "15.5.1", - "resolved": "https://registry.npmjs.org/@polkadot/api/-/api-15.5.1.tgz", - "integrity": "sha512-vEKXcy8iq2f7UZ7pLiX0z2bXiMEJ6Qp/s2MZNWTixBPPWKKqdq7d98CIIPWmqDpQPhidsWMkzV4r3/GaNLccfQ==", - "dependencies": { - "@polkadot/api-augment": "15.5.1", - "@polkadot/api-base": "15.5.1", - "@polkadot/api-derive": "15.5.1", - "@polkadot/keyring": "^13.3.1", - "@polkadot/rpc-augment": "15.5.1", - "@polkadot/rpc-core": "15.5.1", - "@polkadot/rpc-provider": "15.5.1", - "@polkadot/types": "15.5.1", - "@polkadot/types-augment": "15.5.1", - "@polkadot/types-codec": "15.5.1", - "@polkadot/types-create": "15.5.1", - "@polkadot/types-known": "15.5.1", - "@polkadot/util": "^13.3.1", - "@polkadot/util-crypto": "^13.3.1", - "eventemitter3": "^5.0.1", - "rxjs": "^7.8.1", - "tslib": "^2.8.1" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@polkadot/api-augment": { - "version": "15.5.1", - "resolved": "https://registry.npmjs.org/@polkadot/api-augment/-/api-augment-15.5.1.tgz", - "integrity": "sha512-ZDSiaBcy8OT8FWI5WWnVqdi4jWBcUpiAdSO3FdZarAN9Hp2sbaUSM5zt8NkLsFtnsQxgZXGzVCbxNojBj7XAlg==", - "dependencies": { - "@polkadot/api-base": "15.5.1", - "@polkadot/rpc-augment": "15.5.1", - "@polkadot/types": "15.5.1", - "@polkadot/types-augment": "15.5.1", - "@polkadot/types-codec": "15.5.1", - "@polkadot/util": "^13.3.1", - "tslib": "^2.8.1" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@polkadot/api-base": { - "version": "15.5.1", - "resolved": "https://registry.npmjs.org/@polkadot/api-base/-/api-base-15.5.1.tgz", - "integrity": "sha512-sTcTICj4UEmM9PnIjBFQvHQrZNnRfGA2IipHo6HjzmZ9JpX+9+zjqcq4xZP+4pfP7upKYCzgWN0Si/6BEpNGFw==", - "dependencies": { - "@polkadot/rpc-core": "15.5.1", - "@polkadot/types": "15.5.1", - "@polkadot/util": "^13.3.1", - "rxjs": "^7.8.1", - "tslib": "^2.8.1" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@polkadot/api-derive": { - "version": "15.5.1", - "resolved": "https://registry.npmjs.org/@polkadot/api-derive/-/api-derive-15.5.1.tgz", - "integrity": "sha512-8NO/h/ieYy7c7NubvuK/zpxcwJBoqbB6x4o6LfXTkvsv+ePq7WcPw3W0+c6Qo+QZd+OgtrvfT9OzobfxfzKk6g==", - "dependencies": { - "@polkadot/api": "15.5.1", - "@polkadot/api-augment": "15.5.1", - "@polkadot/api-base": "15.5.1", - "@polkadot/rpc-core": "15.5.1", - "@polkadot/types": "15.5.1", - "@polkadot/types-codec": "15.5.1", - "@polkadot/util": "^13.3.1", - "@polkadot/util-crypto": "^13.3.1", - "rxjs": "^7.8.1", - "tslib": "^2.8.1" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@polkadot/keyring": { - "version": "13.4.3", - "resolved": "https://registry.npmjs.org/@polkadot/keyring/-/keyring-13.4.3.tgz", - "integrity": "sha512-2ePNcvBTznDN2luKbZM5fdxgAnj7V8m276qSTgrHlqKVvg9FsQpRCR6CAU+AjhnHzpe7uiZO+UH+jlXWefI3AA==", - "dependencies": { - "@polkadot/util": "13.4.3", - "@polkadot/util-crypto": "13.4.3", - "tslib": "^2.8.0" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "@polkadot/util": "13.4.3", - "@polkadot/util-crypto": "13.4.3" - } - }, - "node_modules/@polkadot/keyring/node_modules/@polkadot/util": { - "version": "13.4.3", - "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-13.4.3.tgz", - "integrity": "sha512-6v2zvg8l7W22XvjYf7qv9tPQdYl2E6aXY94M4TZKsXZxmlS5BoG+A9Aq0+Gw8zBUjupjEmUkA6Y//msO8Zisug==", - "dependencies": { - "@polkadot/x-bigint": "13.4.3", - "@polkadot/x-global": "13.4.3", - "@polkadot/x-textdecoder": "13.4.3", - "@polkadot/x-textencoder": "13.4.3", - "@types/bn.js": "^5.1.6", - "bn.js": "^5.2.1", - "tslib": "^2.8.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@polkadot/keyring/node_modules/@polkadot/util-crypto": { - "version": "13.4.3", - "resolved": "https://registry.npmjs.org/@polkadot/util-crypto/-/util-crypto-13.4.3.tgz", - "integrity": "sha512-Ml0mjhKVetMrRCIosmVNMa6lbFPa3fSAeOggf34NsDIIQOKt9FL644iGz1ZSMOnBwN9qk2qHYmcFMTDXX2yKVQ==", - "dependencies": { - "@noble/curves": "^1.3.0", - "@noble/hashes": "^1.3.3", - "@polkadot/networks": "13.4.3", - "@polkadot/util": "13.4.3", - "@polkadot/wasm-crypto": "^7.4.1", - "@polkadot/wasm-util": "^7.4.1", - "@polkadot/x-bigint": "13.4.3", - "@polkadot/x-randomvalues": "13.4.3", - "@scure/base": "^1.1.7", - "tslib": "^2.8.0" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "@polkadot/util": "13.4.3" - } - }, - "node_modules/@polkadot/keyring/node_modules/@polkadot/x-randomvalues": { - "version": "13.4.3", - "resolved": "https://registry.npmjs.org/@polkadot/x-randomvalues/-/x-randomvalues-13.4.3.tgz", - "integrity": "sha512-pskXP/S2jROZ6aASExsUFlNp7GbJvQikKogvyvMMCzNIbUYLxpLuquLRa3MOORx2c0SNsENg90cx/zHT+IjPRQ==", - "dependencies": { - "@polkadot/x-global": "13.4.3", - "tslib": "^2.8.0" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "@polkadot/util": "13.4.3", - "@polkadot/wasm-util": "*" - } - }, - "node_modules/@polkadot/keyring/node_modules/@polkadot/x-textdecoder": { - "version": "13.4.3", - "resolved": "https://registry.npmjs.org/@polkadot/x-textdecoder/-/x-textdecoder-13.4.3.tgz", - "integrity": "sha512-k7Wg6csAPxfNtpBt3k5yUuPHYmRl/nl7H2OMr40upMjbZXbQ1RJW9Z3GBkLmQczG7NwwfAXHwQE9FYOMUtbuRQ==", - "dependencies": { - "@polkadot/x-global": "13.4.3", - "tslib": "^2.8.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@polkadot/keyring/node_modules/@polkadot/x-textencoder": { - "version": "13.4.3", - "resolved": "https://registry.npmjs.org/@polkadot/x-textencoder/-/x-textencoder-13.4.3.tgz", - "integrity": "sha512-byl2LbN1rnEXKmnsCzEDaIjSIHAr+1ciSe2yj3M0K+oWEEcaFZEovJaf/uoyzkcjn+/l8rDv3nget6mPuQ/DSw==", - "dependencies": { - "@polkadot/x-global": "13.4.3", - "tslib": "^2.8.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@polkadot/networks": { - "version": "13.4.3", - "resolved": "https://registry.npmjs.org/@polkadot/networks/-/networks-13.4.3.tgz", - "integrity": "sha512-Z+YZkltBt//CtkVH8ZYJ1z66qYxdI0yPamzkzZAqw6gj3gjgSxKtxB4baA/rcAw05QTvN2R3dLkkmKr2mnHovQ==", - "dependencies": { - "@polkadot/util": "13.4.3", - "@substrate/ss58-registry": "^1.51.0", - "tslib": "^2.8.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@polkadot/networks/node_modules/@polkadot/util": { - "version": "13.4.3", - "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-13.4.3.tgz", - "integrity": "sha512-6v2zvg8l7W22XvjYf7qv9tPQdYl2E6aXY94M4TZKsXZxmlS5BoG+A9Aq0+Gw8zBUjupjEmUkA6Y//msO8Zisug==", - "dependencies": { - "@polkadot/x-bigint": "13.4.3", - "@polkadot/x-global": "13.4.3", - "@polkadot/x-textdecoder": "13.4.3", - "@polkadot/x-textencoder": "13.4.3", - "@types/bn.js": "^5.1.6", - "bn.js": "^5.2.1", - "tslib": "^2.8.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@polkadot/networks/node_modules/@polkadot/x-textdecoder": { - "version": "13.4.3", - "resolved": "https://registry.npmjs.org/@polkadot/x-textdecoder/-/x-textdecoder-13.4.3.tgz", - "integrity": "sha512-k7Wg6csAPxfNtpBt3k5yUuPHYmRl/nl7H2OMr40upMjbZXbQ1RJW9Z3GBkLmQczG7NwwfAXHwQE9FYOMUtbuRQ==", - "dependencies": { - "@polkadot/x-global": "13.4.3", - "tslib": "^2.8.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@polkadot/networks/node_modules/@polkadot/x-textencoder": { - "version": "13.4.3", - "resolved": "https://registry.npmjs.org/@polkadot/x-textencoder/-/x-textencoder-13.4.3.tgz", - "integrity": "sha512-byl2LbN1rnEXKmnsCzEDaIjSIHAr+1ciSe2yj3M0K+oWEEcaFZEovJaf/uoyzkcjn+/l8rDv3nget6mPuQ/DSw==", - "dependencies": { - "@polkadot/x-global": "13.4.3", - "tslib": "^2.8.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@polkadot/rpc-augment": { - "version": "15.5.1", - "resolved": "https://registry.npmjs.org/@polkadot/rpc-augment/-/rpc-augment-15.5.1.tgz", - "integrity": "sha512-BuaObrUNH3aXavAoQA4diy8VXUgUpABzsYYIUtlivioA4UHJkFYzCnEYNcQj41Dp3bZE78LC80sYyqFc0ZFJfQ==", - "dependencies": { - "@polkadot/rpc-core": "15.5.1", - "@polkadot/types": "15.5.1", - "@polkadot/types-codec": "15.5.1", - "@polkadot/util": "^13.3.1", - "tslib": "^2.8.1" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@polkadot/rpc-core": { - "version": "15.5.1", - "resolved": "https://registry.npmjs.org/@polkadot/rpc-core/-/rpc-core-15.5.1.tgz", - "integrity": "sha512-rtT7RFQMfRm9bLYgaK34EoTSqSqPzGcD5aKITGv4ZcGi7oRRrKuIq813II1UK7IH5GN7njLWzoeq+LC3JVxW3g==", - "dependencies": { - "@polkadot/rpc-augment": "15.5.1", - "@polkadot/rpc-provider": "15.5.1", - "@polkadot/types": "15.5.1", - "@polkadot/util": "^13.3.1", - "rxjs": "^7.8.1", - "tslib": "^2.8.1" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@polkadot/rpc-provider": { - "version": "15.5.1", - "resolved": "https://registry.npmjs.org/@polkadot/rpc-provider/-/rpc-provider-15.5.1.tgz", - "integrity": "sha512-hDKup24P+L4BtRgu1L4IZRpZlqPOyeK8ryIaiuPABd6ZseQUQ8Oz2OMf3uL2Q43Xc72+q2PP5ylJuxH+wlErDw==", - "dependencies": { - "@polkadot/keyring": "^13.3.1", - "@polkadot/types": "15.5.1", - "@polkadot/types-support": "15.5.1", - "@polkadot/util": "^13.3.1", - "@polkadot/util-crypto": "^13.3.1", - "@polkadot/x-fetch": "^13.3.1", - "@polkadot/x-global": "^13.3.1", - "@polkadot/x-ws": "^13.3.1", - "eventemitter3": "^5.0.1", - "mock-socket": "^9.3.1", - "nock": "^13.5.5", - "tslib": "^2.8.1" - }, - "engines": { - "node": ">=18" - }, - "optionalDependencies": { - "@substrate/connect": "0.8.11" - } - }, - "node_modules/@polkadot/types": { - "version": "15.5.1", - "resolved": "https://registry.npmjs.org/@polkadot/types/-/types-15.5.1.tgz", - "integrity": "sha512-1kpF4xaYvokuXaNt37PESXCIrYWlrNQWQwfopQz1RPVHGKcLioMZ8cc49nYSPjpvRriDSVmE/zhy16uBWANHOw==", - "dependencies": { - "@polkadot/keyring": "^13.3.1", - "@polkadot/types-augment": "15.5.1", - "@polkadot/types-codec": "15.5.1", - "@polkadot/types-create": "15.5.1", - "@polkadot/util": "^13.3.1", - "@polkadot/util-crypto": "^13.3.1", - "rxjs": "^7.8.1", - "tslib": "^2.8.1" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@polkadot/types-augment": { - "version": "15.5.1", - "resolved": "https://registry.npmjs.org/@polkadot/types-augment/-/types-augment-15.5.1.tgz", - "integrity": "sha512-sWO/4Loe7oJldmO/dbJeiTkO7sdEj6TZ6UnHcxpxCC97cPUrqHxcatsyoxrMn1RyLJ/tIlkQEgT25d/LwKbU7Q==", - "dependencies": { - "@polkadot/types": "15.5.1", - "@polkadot/types-codec": "15.5.1", - "@polkadot/util": "^13.3.1", - "tslib": "^2.8.1" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@polkadot/types-codec": { - "version": "15.5.1", - "resolved": "https://registry.npmjs.org/@polkadot/types-codec/-/types-codec-15.5.1.tgz", - "integrity": "sha512-aBI3x9Uv/g6TkVToQwIEuXn9NsRT6oMrlQt9WYN4bWElHayeiKpdEQa3sdSpA48g+X5q4CoWDI7etaj8cV9obw==", - "dependencies": { - "@polkadot/util": "^13.3.1", - "@polkadot/x-bigint": "^13.3.1", - "tslib": "^2.8.1" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@polkadot/types-create": { - "version": "15.5.1", - "resolved": "https://registry.npmjs.org/@polkadot/types-create/-/types-create-15.5.1.tgz", - "integrity": "sha512-qb8lDmWIZeOiw2INIKGFDM6dtMn08kU5WaIfjpIPDBAM+htqhhGNirxIvSwKIY15YuAUqapk4EXelZLnDxHJ8g==", - "dependencies": { - "@polkadot/types-codec": "15.5.1", - "@polkadot/util": "^13.3.1", - "tslib": "^2.8.1" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@polkadot/types-known": { - "version": "15.5.1", - "resolved": "https://registry.npmjs.org/@polkadot/types-known/-/types-known-15.5.1.tgz", - "integrity": "sha512-4FXoN22h9pgEfWf+p23+77PzQGfZPC4oMjLYKB5tJ6z1Wn/QkoaNlidBf/swTaYRTE5KnXU4BHdEyR1N+336sw==", - "dependencies": { - "@polkadot/networks": "^13.3.1", - "@polkadot/types": "15.5.1", - "@polkadot/types-codec": "15.5.1", - "@polkadot/types-create": "15.5.1", - "@polkadot/util": "^13.3.1", - "tslib": "^2.8.1" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@polkadot/types-support": { - "version": "15.5.1", - "resolved": "https://registry.npmjs.org/@polkadot/types-support/-/types-support-15.5.1.tgz", - "integrity": "sha512-EGju43gZszvWQVgmwUQitimdLRL06TJ26ate9HNsTdz2EOhPp9yuYolLwk6qIwBitpF0qup0H6FgiohhIBrc7g==", - "dependencies": { - "@polkadot/util": "^13.3.1", - "tslib": "^2.8.1" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@polkadot/util": { - "version": "13.3.1", - "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-13.3.1.tgz", - "integrity": "sha512-5crLP/rUZOJzuo/W8t73J8PxpibJ5vrxY57rR6V+mIpCZd1ORiw0wxeHcV5F9Adpn7yJyuGBwxPbueNR5Rr1Zw==", - "dependencies": { - "@polkadot/x-bigint": "13.3.1", - "@polkadot/x-global": "13.3.1", - "@polkadot/x-textdecoder": "13.3.1", - "@polkadot/x-textencoder": "13.3.1", - "@types/bn.js": "^5.1.6", - "bn.js": "^5.2.1", - "tslib": "^2.8.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@polkadot/util-crypto": { - "version": "13.3.1", - "resolved": "https://registry.npmjs.org/@polkadot/util-crypto/-/util-crypto-13.3.1.tgz", - "integrity": "sha512-FU6yf3IY++DKlf0eqO9/obe2y1zuZ5rbqRs75fyOME/5VXio1fA3GIpW7aFphyneFRd78G8QLh8kn0oIwBGMNg==", - "dependencies": { - "@noble/curves": "^1.3.0", - "@noble/hashes": "^1.3.3", - "@polkadot/networks": "13.3.1", - "@polkadot/util": "13.3.1", - "@polkadot/wasm-crypto": "^7.4.1", - "@polkadot/wasm-util": "^7.4.1", - "@polkadot/x-bigint": "13.3.1", - "@polkadot/x-randomvalues": "13.3.1", - "@scure/base": "^1.1.7", - "tslib": "^2.8.0" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "@polkadot/util": "13.3.1" - } - }, - "node_modules/@polkadot/util-crypto/node_modules/@polkadot/networks": { - "version": "13.3.1", - "resolved": "https://registry.npmjs.org/@polkadot/networks/-/networks-13.3.1.tgz", - "integrity": "sha512-g/0OmCMUrbbW4RQ/xajTYd2SMJvFKY4kmMvpxtNN57hWQpY7c5oDXSz57jGH2uwvcBWeDfaNokcS+9hJL1RBcA==", - "dependencies": { - "@polkadot/util": "13.3.1", - "@substrate/ss58-registry": "^1.51.0", - "tslib": "^2.8.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@polkadot/util-crypto/node_modules/@polkadot/x-bigint": { - "version": "13.3.1", - "resolved": "https://registry.npmjs.org/@polkadot/x-bigint/-/x-bigint-13.3.1.tgz", - "integrity": "sha512-ewc708a7LUdrT92v9DsSAIbcJQBn3aR9/LavF/iyMOq5lZJyPXDSjAnskfMs818R3RLCrKVKfs+aKkxt2eqo8g==", - "dependencies": { - "@polkadot/x-global": "13.3.1", - "tslib": "^2.8.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@polkadot/util-crypto/node_modules/@polkadot/x-global": { - "version": "13.3.1", - "resolved": "https://registry.npmjs.org/@polkadot/x-global/-/x-global-13.3.1.tgz", - "integrity": "sha512-861TeIw49a3JvkwlUWrddfG+JaUqtFZDsemYxxZIjjcRJLrKOsoKNqHbiHi2OPrwlX8PwAA/wc5I9Q4XRQ7KEg==", - "dependencies": { - "tslib": "^2.8.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@polkadot/util/node_modules/@polkadot/x-bigint": { - "version": "13.3.1", - "resolved": "https://registry.npmjs.org/@polkadot/x-bigint/-/x-bigint-13.3.1.tgz", - "integrity": "sha512-ewc708a7LUdrT92v9DsSAIbcJQBn3aR9/LavF/iyMOq5lZJyPXDSjAnskfMs818R3RLCrKVKfs+aKkxt2eqo8g==", - "dependencies": { - "@polkadot/x-global": "13.3.1", - "tslib": "^2.8.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@polkadot/util/node_modules/@polkadot/x-global": { - "version": "13.3.1", - "resolved": "https://registry.npmjs.org/@polkadot/x-global/-/x-global-13.3.1.tgz", - "integrity": "sha512-861TeIw49a3JvkwlUWrddfG+JaUqtFZDsemYxxZIjjcRJLrKOsoKNqHbiHi2OPrwlX8PwAA/wc5I9Q4XRQ7KEg==", - "dependencies": { - "tslib": "^2.8.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@polkadot/wasm-bridge": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/@polkadot/wasm-bridge/-/wasm-bridge-7.4.1.tgz", - "integrity": "sha512-tdkJaV453tezBxhF39r4oeG0A39sPKGDJmN81LYLf+Fihb7astzwju+u75BRmDrHZjZIv00un3razJEWCxze6g==", - "dependencies": { - "@polkadot/wasm-util": "7.4.1", - "tslib": "^2.7.0" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "@polkadot/util": "*", - "@polkadot/x-randomvalues": "*" - } - }, - "node_modules/@polkadot/wasm-crypto": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/@polkadot/wasm-crypto/-/wasm-crypto-7.4.1.tgz", - "integrity": "sha512-kHN/kF7hYxm1y0WeFLWeWir6oTzvcFmR4N8fJJokR+ajYbdmrafPN+6iLgQVbhZnDdxyv9jWDuRRsDnBx8tPMQ==", - "dependencies": { - "@polkadot/wasm-bridge": "7.4.1", - "@polkadot/wasm-crypto-asmjs": "7.4.1", - "@polkadot/wasm-crypto-init": "7.4.1", - "@polkadot/wasm-crypto-wasm": "7.4.1", - "@polkadot/wasm-util": "7.4.1", - "tslib": "^2.7.0" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "@polkadot/util": "*", - "@polkadot/x-randomvalues": "*" - } - }, - "node_modules/@polkadot/wasm-crypto-asmjs": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/@polkadot/wasm-crypto-asmjs/-/wasm-crypto-asmjs-7.4.1.tgz", - "integrity": "sha512-pwU8QXhUW7IberyHJIQr37IhbB6DPkCG5FhozCiNTq4vFBsFPjm9q8aZh7oX1QHQaiAZa2m2/VjIVE+FHGbvHQ==", - "dependencies": { - "tslib": "^2.7.0" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "@polkadot/util": "*" - } - }, - "node_modules/@polkadot/wasm-crypto-init": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/@polkadot/wasm-crypto-init/-/wasm-crypto-init-7.4.1.tgz", - "integrity": "sha512-AVka33+f7MvXEEIGq5U0dhaA2SaXMXnxVCQyhJTaCnJ5bRDj0Xlm3ijwDEQUiaDql7EikbkkRtmlvs95eSUWYQ==", - "dependencies": { - "@polkadot/wasm-bridge": "7.4.1", - "@polkadot/wasm-crypto-asmjs": "7.4.1", - "@polkadot/wasm-crypto-wasm": "7.4.1", - "@polkadot/wasm-util": "7.4.1", - "tslib": "^2.7.0" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "@polkadot/util": "*", - "@polkadot/x-randomvalues": "*" - } - }, - "node_modules/@polkadot/wasm-crypto-wasm": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/@polkadot/wasm-crypto-wasm/-/wasm-crypto-wasm-7.4.1.tgz", - "integrity": "sha512-PE1OAoupFR0ZOV2O8tr7D1FEUAwaggzxtfs3Aa5gr+yxlSOaWUKeqsOYe1KdrcjmZVV3iINEAXxgrbzCmiuONg==", - "dependencies": { - "@polkadot/wasm-util": "7.4.1", - "tslib": "^2.7.0" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "@polkadot/util": "*" - } - }, - "node_modules/@polkadot/wasm-util": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/@polkadot/wasm-util/-/wasm-util-7.4.1.tgz", - "integrity": "sha512-RAcxNFf3zzpkr+LX/ItAsvj+QyM56TomJ0xjUMo4wKkHjwsxkz4dWJtx5knIgQz/OthqSDMR59VNEycQeNuXzA==", - "dependencies": { - "tslib": "^2.7.0" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "@polkadot/util": "*" - } - }, - "node_modules/@polkadot/x-bigint": { - "version": "13.4.3", - "resolved": "https://registry.npmjs.org/@polkadot/x-bigint/-/x-bigint-13.4.3.tgz", - "integrity": "sha512-8NbjF5Q+5lflhvDFve58wULjCVcvXa932LKFtI5zL2gx5VDhMgyfkNcYRjHB18Ecl21963JuGzvGVTZNkh/i6g==", - "dependencies": { - "@polkadot/x-global": "13.4.3", - "tslib": "^2.8.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@polkadot/x-fetch": { - "version": "13.4.3", - "resolved": "https://registry.npmjs.org/@polkadot/x-fetch/-/x-fetch-13.4.3.tgz", - "integrity": "sha512-EwhcwROqWa7mvNTbLVNH71Hbyp5PW5j9lV2UpII5MZzRO95eYwV4oP/xgtTxC+60nC8lrvzAw0JxEHrmNzmtlg==", - "dependencies": { - "@polkadot/x-global": "13.4.3", - "node-fetch": "^3.3.2", - "tslib": "^2.8.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@polkadot/x-global": { - "version": "13.4.3", - "resolved": "https://registry.npmjs.org/@polkadot/x-global/-/x-global-13.4.3.tgz", - "integrity": "sha512-6c98kxZdoGRct3ua9Dz6/qz8wb3XFRUkaY+4+RzIgehKMPhu19pGWTrzmbJSyY9FtIpThuWKuDaBEvd5KgSxjA==", - "dependencies": { - "tslib": "^2.8.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@polkadot/x-randomvalues": { - "version": "13.3.1", - "resolved": "https://registry.npmjs.org/@polkadot/x-randomvalues/-/x-randomvalues-13.3.1.tgz", - "integrity": "sha512-GIb0au3vIX2U/DRH0PRckM+1I4EIbU8PLX1roGJgN1MAYKWiylJTKPVoBMafMM87o8qauOevJ46uYB/qlfbiWg==", - "dependencies": { - "@polkadot/x-global": "13.3.1", - "tslib": "^2.8.0" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "@polkadot/util": "13.3.1", - "@polkadot/wasm-util": "*" - } - }, - "node_modules/@polkadot/x-randomvalues/node_modules/@polkadot/x-global": { - "version": "13.3.1", - "resolved": "https://registry.npmjs.org/@polkadot/x-global/-/x-global-13.3.1.tgz", - "integrity": "sha512-861TeIw49a3JvkwlUWrddfG+JaUqtFZDsemYxxZIjjcRJLrKOsoKNqHbiHi2OPrwlX8PwAA/wc5I9Q4XRQ7KEg==", - "dependencies": { - "tslib": "^2.8.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@polkadot/x-textdecoder": { - "version": "13.3.1", - "resolved": "https://registry.npmjs.org/@polkadot/x-textdecoder/-/x-textdecoder-13.3.1.tgz", - "integrity": "sha512-g2R9O1p0ZsNDhZ3uEBZh6fQaVLlo3yFr0YNqt15v7e9lBI4APvTJ202EINlo2jB5lz/R438/BdjEA3AL+0zUtQ==", - "dependencies": { - "@polkadot/x-global": "13.3.1", - "tslib": "^2.8.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@polkadot/x-textdecoder/node_modules/@polkadot/x-global": { - "version": "13.3.1", - "resolved": "https://registry.npmjs.org/@polkadot/x-global/-/x-global-13.3.1.tgz", - "integrity": "sha512-861TeIw49a3JvkwlUWrddfG+JaUqtFZDsemYxxZIjjcRJLrKOsoKNqHbiHi2OPrwlX8PwAA/wc5I9Q4XRQ7KEg==", - "dependencies": { - "tslib": "^2.8.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@polkadot/x-textencoder": { - "version": "13.3.1", - "resolved": "https://registry.npmjs.org/@polkadot/x-textencoder/-/x-textencoder-13.3.1.tgz", - "integrity": "sha512-DnHLUdoKDYxekfxopuUuPB+j5Mu7Jemejcduu5gz3/89GP/sYPAu0CAVbq9B+hK1yGjBBj31eA4wkAV1oktYmg==", - "dependencies": { - "@polkadot/x-global": "13.3.1", - "tslib": "^2.8.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@polkadot/x-textencoder/node_modules/@polkadot/x-global": { - "version": "13.3.1", - "resolved": "https://registry.npmjs.org/@polkadot/x-global/-/x-global-13.3.1.tgz", - "integrity": "sha512-861TeIw49a3JvkwlUWrddfG+JaUqtFZDsemYxxZIjjcRJLrKOsoKNqHbiHi2OPrwlX8PwAA/wc5I9Q4XRQ7KEg==", - "dependencies": { - "tslib": "^2.8.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@polkadot/x-ws": { - "version": "13.4.3", - "resolved": "https://registry.npmjs.org/@polkadot/x-ws/-/x-ws-13.4.3.tgz", - "integrity": "sha512-GS0I6MYLD/xNAAjODZi/pbG7Ba0e/5sbvDIrT01iKH3SPGN+PZoyAsc04t2IOXA6QmPa1OBHnaU3N4K8gGmJ+w==", - "dependencies": { - "@polkadot/x-global": "13.4.3", - "tslib": "^2.8.0", - "ws": "^8.18.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@scure/base": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.2.4.tgz", - "integrity": "sha512-5Yy9czTO47mqz+/J8GM6GIId4umdCk1wc1q8rKERQulIoc8VP9pzDcghv10Tl2E7R96ZUx/PhND3ESYUQX8NuQ==", - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@substrate/connect": { - "version": "0.8.11", - "resolved": "https://registry.npmjs.org/@substrate/connect/-/connect-0.8.11.tgz", - "integrity": "sha512-ofLs1PAO9AtDdPbdyTYj217Pe+lBfTLltdHDs3ds8no0BseoLeAGxpz1mHfi7zB4IxI3YyAiLjH6U8cw4pj4Nw==", - "deprecated": "versions below 1.x are no longer maintained", - "optional": true, - "dependencies": { - "@substrate/connect-extension-protocol": "^2.0.0", - "@substrate/connect-known-chains": "^1.1.5", - "@substrate/light-client-extension-helpers": "^1.0.0", - "smoldot": "2.0.26" - } - }, - "node_modules/@substrate/connect-extension-protocol": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/@substrate/connect-extension-protocol/-/connect-extension-protocol-2.2.2.tgz", - "integrity": "sha512-t66jwrXA0s5Goq82ZtjagLNd7DPGCNjHeehRlE/gcJmJ+G56C0W+2plqOMRicJ8XGR1/YFnUSEqUFiSNbjGrAA==", - "optional": true - }, - "node_modules/@substrate/connect-known-chains": { - "version": "1.9.2", - "resolved": "https://registry.npmjs.org/@substrate/connect-known-chains/-/connect-known-chains-1.9.2.tgz", - "integrity": "sha512-uEmm+rKJQQhhbforvmcg74TsDHKFVBkstjPwblGT1RdHMxUKR7Gq7F8vbkGnr5ce9tMK2Ylil760Z7vtX013hw==", - "optional": true - }, - "node_modules/@substrate/light-client-extension-helpers": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@substrate/light-client-extension-helpers/-/light-client-extension-helpers-1.0.0.tgz", - "integrity": "sha512-TdKlni1mBBZptOaeVrKnusMg/UBpWUORNDv5fdCaJklP4RJiFOzBCrzC+CyVI5kQzsXBisZ+2pXm+rIjS38kHg==", - "optional": true, - "dependencies": { - "@polkadot-api/json-rpc-provider": "^0.0.1", - "@polkadot-api/json-rpc-provider-proxy": "^0.1.0", - "@polkadot-api/observable-client": "^0.3.0", - "@polkadot-api/substrate-client": "^0.1.2", - "@substrate/connect-extension-protocol": "^2.0.0", - "@substrate/connect-known-chains": "^1.1.5", - "rxjs": "^7.8.1" - }, - "peerDependencies": { - "smoldot": "2.x" - } - }, - "node_modules/@substrate/ss58-registry": { - "version": "1.51.0", - "resolved": "https://registry.npmjs.org/@substrate/ss58-registry/-/ss58-registry-1.51.0.tgz", - "integrity": "sha512-TWDurLiPxndFgKjVavCniytBIw+t4ViOi7TYp9h/D0NMmkEc9klFTo+827eyEJ0lELpqO207Ey7uGxUa+BS1jQ==" - }, - "node_modules/@types/bn.js": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.6.tgz", - "integrity": "sha512-Xh8vSwUeMKeYYrj3cX4lGQgFSF/N03r+tv4AiLl1SucqV+uTQpxRcnM8AkXKHwYP9ZPXOYXRr2KPXpVlIvqh9w==", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/node": { - "version": "22.7.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.5.tgz", - "integrity": "sha512-jML7s2NAzMWc//QSJ1a3prpk78cOPchGvXJsC3C6R6PSMoooztvRVQEz89gmBTBY1SPMaqo5teB4uNHPdetShQ==", - "dependencies": { - "undici-types": "~6.19.2" - } - }, - "node_modules/aes-js": { - "version": "4.0.0-beta.5", - "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-4.0.0-beta.5.tgz", - "integrity": "sha512-G965FqalsNyrPqgEGON7nIx1e/OVENSgiEIzyC63haUMuvNnwIgIjMs52hlTCKhkBny7A2ORNlfY9Zu+jmGk1Q==" - }, - "node_modules/bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==" - }, - "node_modules/data-uri-to-buffer": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", - "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==", - "engines": { - "node": ">= 12" - } - }, - "node_modules/debug": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", - "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/ethers": { - "version": "6.13.5", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-6.13.5.tgz", - "integrity": "sha512-+knKNieu5EKRThQJWwqaJ10a6HE9sSehGeqWN65//wE7j47ZpFhKAnHB/JJFibwwg61I/koxaPsXbXpD/skNOQ==", - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/ethers-io/" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@adraffy/ens-normalize": "1.10.1", - "@noble/curves": "1.2.0", - "@noble/hashes": "1.3.2", - "@types/node": "22.7.5", - "aes-js": "4.0.0-beta.5", - "tslib": "2.7.0", - "ws": "8.17.1" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/ethers/node_modules/@noble/curves": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.2.0.tgz", - "integrity": "sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==", - "dependencies": { - "@noble/hashes": "1.3.2" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/ethers/node_modules/@noble/hashes": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.2.tgz", - "integrity": "sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==", - "engines": { - "node": ">= 16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/ethers/node_modules/tslib": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz", - "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==" - }, - "node_modules/ethers/node_modules/ws": { - "version": "8.17.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", - "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", - "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": ">=5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, - "node_modules/eventemitter3": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", - "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==" - }, - "node_modules/fetch-blob": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", - "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/jimmywarting" - }, - { - "type": "paypal", - "url": "https://paypal.me/jimmywarting" - } - ], - "dependencies": { - "node-domexception": "^1.0.0", - "web-streams-polyfill": "^3.0.3" - }, - "engines": { - "node": "^12.20 || >= 14.13" - } - }, - "node_modules/formdata-polyfill": { - "version": "4.0.10", - "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", - "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", - "dependencies": { - "fetch-blob": "^3.1.2" - }, - "engines": { - "node": ">=12.20.0" - } - }, - "node_modules/json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==" - }, - "node_modules/mock-socket": { - "version": "9.3.1", - "resolved": "https://registry.npmjs.org/mock-socket/-/mock-socket-9.3.1.tgz", - "integrity": "sha512-qxBgB7Qa2sEQgHFjj0dSigq7fX4k6Saisd5Nelwp2q8mlbAFh5dHV9JTTlF8viYJLSSWgMCZFUom8PJcMNBoJw==", - "engines": { - "node": ">= 8" - } - }, - "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" - }, - "node_modules/nock": { - "version": "13.5.6", - "resolved": "https://registry.npmjs.org/nock/-/nock-13.5.6.tgz", - "integrity": "sha512-o2zOYiCpzRqSzPj0Zt/dQ/DqZeYoaQ7TUonc/xUPjCGl9WeHpNbxgVvOquXYAaJzI0M9BXV3HTzG0p8IUAbBTQ==", - "dependencies": { - "debug": "^4.1.0", - "json-stringify-safe": "^5.0.1", - "propagate": "^2.0.0" - }, - "engines": { - "node": ">= 10.13" - } - }, - "node_modules/node-domexception": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", - "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/jimmywarting" - }, - { - "type": "github", - "url": "https://paypal.me/jimmywarting" - } - ], - "engines": { - "node": ">=10.5.0" - } - }, - "node_modules/node-fetch": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz", - "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==", - "dependencies": { - "data-uri-to-buffer": "^4.0.0", - "fetch-blob": "^3.1.4", - "formdata-polyfill": "^4.0.10" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/node-fetch" - } - }, - "node_modules/propagate": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/propagate/-/propagate-2.0.1.tgz", - "integrity": "sha512-vGrhOavPSTz4QVNuBNdcNXePNdNMaO1xj9yBeH1ScQPjk/rhg9sSlCXPhMkFuaNNW/syTvYqsnbIJxMBfRbbag==", - "engines": { - "node": ">= 8" - } - }, - "node_modules/rxjs": { - "version": "7.8.2", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz", - "integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==", - "dependencies": { - "tslib": "^2.1.0" - } - }, - "node_modules/scale-ts": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/scale-ts/-/scale-ts-1.6.1.tgz", - "integrity": "sha512-PBMc2AWc6wSEqJYBDPcyCLUj9/tMKnLX70jLOSndMtcUoLQucP/DM0vnQo1wJAYjTrQiq8iG9rD0q6wFzgjH7g==", - "optional": true - }, - "node_modules/smoldot": { - "version": "2.0.26", - "resolved": "https://registry.npmjs.org/smoldot/-/smoldot-2.0.26.tgz", - "integrity": "sha512-F+qYmH4z2s2FK+CxGj8moYcd1ekSIKH8ywkdqlOz88Dat35iB1DIYL11aILN46YSGMzQW/lbJNS307zBSDN5Ig==", - "optional": true, - "dependencies": { - "ws": "^8.8.1" - } - }, - "node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" - }, - "node_modules/undici-types": { - "version": "6.19.8", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", - "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==" - }, - "node_modules/web-streams-polyfill": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz", - "integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==", - "engines": { - "node": ">= 8" - } - }, - "node_modules/ws": { - "version": "8.18.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.1.tgz", - "integrity": "sha512-RKW2aJZMXeMxVpnZ6bck+RswznaxmzdULiBr6KY7XkTnW8uvt0iT9H5DkHUChXrc+uurzwa0rVI16n/Xzjdz1w==", - "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": ">=5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - } - } -} diff --git a/operator/test/helpers/package.json b/operator/test/helpers/package.json deleted file mode 100644 index 558467fb..00000000 --- a/operator/test/helpers/package.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "beefy-client-helpers", - "version": "1.0.0", - "description": "Helper scripts for testing BeefyClient", - "scripts": { - "beefy-client": "node getBeefyBlock.js", - "submit-checkpoint": "node submit-checkpoint.js" - }, - "dependencies": { - "ethers": "6.13.5", - "@polkadot/api": "15.5.1", - "@polkadot/util": "13.4.3", - "@polkadot/util-crypto": "13.4.3" - } -} \ No newline at end of file diff --git a/operator/test/helpers/submit-checkpoint.js b/operator/test/helpers/submit-checkpoint.js deleted file mode 100644 index cfa9c661..00000000 --- a/operator/test/helpers/submit-checkpoint.js +++ /dev/null @@ -1,95 +0,0 @@ -// Script to submit a force_checkpoint extrinsic to the datahaven runtime -const { ApiPromise, WsProvider, Keyring } = require("@polkadot/api"); -const { cryptoWaitReady } = require("@polkadot/util-crypto"); -const fs = require("fs"); -const path = require("path"); - -// Configuration -const NODE_URL = "ws://127.0.0.1:30444"; // Default Substrate node WebSocket endpoint - -async function main() { - // Check if checkpoint file path is provided as an argument - if (process.argv.length < 3) { - console.error("Usage: node submit-checkpoint.js "); - console.error("Example: node submit-checkpoint.js ./path/to/checkpoint.json"); - process.exit(1); - } - - const checkpointFilePath = process.argv[2]; - - // Wait for the crypto libraries to be ready - await cryptoWaitReady(); - - // Create a keyring instance (for signing transactions) - const keyring = new Keyring({ type: "sr25519" }); - - // Add the sudo account (//Alice is the default development account with sudo access) - const sudoAccount = keyring.addFromUri("//Alice"); - console.log(`Using account: ${sudoAccount.address}`); - - // Connect to the node - console.log(`Connecting to node at ${NODE_URL}...`); - const provider = new WsProvider(NODE_URL); - const api = await ApiPromise.create({ provider }); - - // Get the chain information - const [chain, nodeName, nodeVersion] = await Promise.all([ - api.rpc.system.chain(), - api.rpc.system.name(), - api.rpc.system.version(), - ]); - console.log(`Connected to chain ${chain} using ${nodeName} v${nodeVersion}`); - - try { - // Read and parse the checkpoint data from the file - const resolvedFilePath = path.resolve(checkpointFilePath); - console.log(`Reading checkpoint data from file: ${resolvedFilePath}`); - - if (!fs.existsSync(resolvedFilePath)) { - console.error(`Error: File not found: ${resolvedFilePath}`); - process.exit(1); - } - - const fileContent = fs.readFileSync(resolvedFilePath, "utf8"); - let checkpointData; - - try { - checkpointData = JSON.parse(fileContent); - console.log("Successfully parsed checkpoint data from file"); - } catch (parseError) { - console.error(`Error parsing JSON file: ${parseError.message}`); - process.exit(1); - } - - // Log the checkpoint data for debugging - console.log("Checkpoint data:", JSON.stringify(checkpointData, null, 2)); - - // Create the extrinsic for force_checkpoint - // We need to use sudo since force_checkpoint requires root privileges - console.log("Creating extrinsic..."); - const extrinsic = api.tx.sudo.sudo(api.tx.ethereumBeaconClient.forceCheckpoint(checkpointData)); - - // Sign and send the transaction - console.log("Submitting extrinsic..."); - const hash = await extrinsic.signAndSend(sudoAccount); - - console.log(`Extrinsic submitted with hash: ${hash.toHex()}`); - } catch (error) { - console.error("Error:", error); - } finally { - // Disconnect from the API - await api.disconnect(); - console.log("Disconnected from the node"); - } -} - -// Run the main function -main() - .then(() => { - console.log("Done!"); - process.exit(0); - }) - .catch((error) => { - console.error("Error in main function:", error); - process.exit(1); - }); diff --git a/operator/test/scripts/build-binary.sh b/operator/test/scripts/build-binary.sh deleted file mode 100644 index fda1c88f..00000000 --- a/operator/test/scripts/build-binary.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env bash -set -eu - -source scripts/set-env.sh - -build_binary() { - pushd $root_dir - check_local_changes $root_dir - - # Check if datahaven binary exists - if [ ! -f "target/release/datahaven-node" ] || [ $changes_detected -eq 1 ]; then - echo "Building datahaven-node..." - cargo build --release --features fast-runtime - fi - - # Copy binary to output directory - cp target/release/datahaven-node "$output_bin_dir" - - popd -} - -changes_detected=0 -check_local_changes() { - local dir=$1 - cd "$dir" - if git status --untracked-files=no --porcelain . | grep .; then - changes_detected=1 - fi - cd - -} - -if [ -z "${from_build_binary:-}" ]; then - echo "Building DataHaven Binary" - trap kill_all SIGINT SIGTERM EXIT - build_binary - echo "DataHaven Binary built" -fi \ No newline at end of file diff --git a/operator/test/scripts/build-contracts.sh b/operator/test/scripts/build-contracts.sh deleted file mode 100755 index 338c1a19..00000000 --- a/operator/test/scripts/build-contracts.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -# Exit on any error -set -e -source scripts/set-env.sh - -build_snowbridge_contracts() { - if [ -d "$relayer_dir" ]; then - echo "Snowbridge contracts seem to be already downloaded. Skipping downloading again" - else - echo "Downloading datahaven-bridge-relayer" - git clone --recurse-submodules https://github.com/Moonsong-Labs/datahaven-bridge-relayer $relayer_dir - fi - - pushd $snowbridge_contracts_dir - forge build - popd -} - -if [ -z "${from_start_services:-}" ]; then - echo "Building snowbridge contracts" - build_snowbridge_contracts -fi \ No newline at end of file diff --git a/operator/test/scripts/build-ethereum.sh b/operator/test/scripts/build-ethereum.sh deleted file mode 100755 index 99a1a00a..00000000 --- a/operator/test/scripts/build-ethereum.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env bash -set -eu -source scripts/set-env.sh - -build_lodestar() { - if [ -d "$lodestar_dir" ]; then - echo "Lodestar seems to be already downloaded. Skipping downloading again" - else - echo "Downloading Lodestar" - git clone https://github.com/ChainSafe/lodestar $lodestar_dir - pushd $lodestar_dir - git fetch && git checkout $LODESTAR_TAG - popd - fi - - echo "Building Lodestar" - pushd $lodestar_dir - yarn install - yarn build - popd -} - -build_geth() { - echo "Downloading geth" - - if [ -d "$geth_dir" ]; then - echo "Geth seems to be already downloaded. Skipping downloading" - else - git clone https://github.com/ethereum/go-ethereum.git $geth_dir - pushd $geth_dir - git fetch && git checkout $GETH_TAG - popd - fi - - echo "Building Geth" - pushd $geth_dir - GOBIN=$output_bin_dir go install ./cmd/geth - GOBIN=$output_bin_dir go install ./cmd/abigen - popd -} - -echo "Building ethereum nodes" -build_lodestar -build_geth -echo "ethereum nodes built!" \ No newline at end of file diff --git a/operator/test/scripts/deploy-contracts.sh b/operator/test/scripts/deploy-contracts.sh deleted file mode 100644 index e76825d8..00000000 --- a/operator/test/scripts/deploy-contracts.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/env bash -set -eu - -source scripts/set-env.sh - -deploy_command() { - local deploy_script=$1 - local contract_dir=$2 - - pushd "$contract_dir" - if [ "$eth_network" != "localhost" ]; then - forge script \ - --rpc-url $eth_endpoint_http \ - --broadcast \ - --verify \ - --etherscan-api-key $etherscan_api_key \ - -vvv \ - $deploy_script - else - forge script \ - --rpc-url $eth_endpoint_http \ - --broadcast \ - -vvv \ - $deploy_script - fi - popd -} - -deploy_snowbridge_contracts() -{ - deploy_command scripts/DeployLocal.sol:DeployLocal $snowbridge_contracts_dir - - pushd "$test_helpers_dir" - contract_dir=$snowbridge_contracts_dir pnpm generateContracts "$output_dir/contracts.json" - popd - - echo "Exported contract artifacts: $output_dir/contracts.json" -} - -if [ -z "${from_start_services:-}" ]; then - echo "Deploying contracts" - deploy_snowbridge_contracts -fi \ No newline at end of file diff --git a/operator/test/scripts/deploy-datahaven.sh b/operator/test/scripts/deploy-datahaven.sh deleted file mode 100755 index 12f9afce..00000000 --- a/operator/test/scripts/deploy-datahaven.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash -set -eu - -source scripts/set-env.sh - -zombienet_launch() { - zombienet spawn config/zombie-datahaven-local.toml --provider=native --dir="$zombienet_data_dir" 2>&1 & - echo "Waiting for nodes to spawn..." - wait_for_port 30444 -} - -deploy_datahaven() { - rm -rf $zombienet_data_dir && zombienet_launch -} - -if [ -z "${from_start_services:-}" ]; then - echo "start datahaven only!" - trap kill_all SIGINT SIGTERM EXIT - deploy_datahaven - echo "datahaven nodes started" - wait -fi \ No newline at end of file diff --git a/operator/test/scripts/deploy-ethereum.sh b/operator/test/scripts/deploy-ethereum.sh deleted file mode 100755 index aee5b295..00000000 --- a/operator/test/scripts/deploy-ethereum.sh +++ /dev/null @@ -1,122 +0,0 @@ -#!/bin/bash - -# Exit on any error -set -e - -# Start ethereum nodes, the nodes must be built first -source scripts/set-env.sh - -start_geth() { - if [ "$reset_ethereum" == "true" ]; then - echo "db reset!" - rm -rf "$ethereum_data_dir" - fi - - echo "Starting geth local node" - local timestamp="0" #start Cancun from genesis - jq \ - --argjson timestamp "$timestamp" \ - ' - .config.CancunTime = $timestamp - ' \ - $assets_dir/genesis.json > $output_dir/genesis.json - geth init --datadir "$ethereum_data_dir" --state.scheme=hash "$output_dir/genesis.json" - geth --vmdebug --datadir "$ethereum_data_dir" --networkid 11155111 \ - --http --http.api debug,personal,eth,net,web3,txpool,engine,miner --ws --ws.api debug,eth,net,web3 \ - --rpc.allow-unprotected-txs --mine \ - --miner.etherbase=0xBe68fC2d8249eb60bfCf0e71D5A0d2F2e292c4eD \ - --authrpc.addr="127.0.0.1" \ - --http.addr="0.0.0.0" \ - --ws.addr="0.0.0.0" \ - --http.corsdomain '*' \ - --allow-insecure-unlock \ - --authrpc.jwtsecret $assets_dir/jwtsecret \ - --password /dev/null \ - --rpc.gascap 0 \ - --ws.origins "*" \ - --trace "$ethereum_data_dir/trace" \ - --gcmode archive \ - --syncmode=full \ - --state.scheme=hash \ - >"$logs_dir/geth.log" 2>&1 & - echo "geth=$!" >> $artifacts_dir/daemons.pid -} - -start_lodestar() { - echo "Starting lodestar local node" - local genesisHash=$(curl $eth_endpoint_http \ - -X POST \ - -H 'Content-Type: application/json' \ - -d '{"jsonrpc": "2.0", "id": "1", "method": "eth_getBlockByNumber","params": ["0x0", false]}' | jq -r '.result.hash') - echo "genesisHash is: $genesisHash" - # use gdate here for raw macos without nix - local timestamp="" - if [[ "$(uname)" == "Darwin" && -z "${IN_NIX_SHELL:-}" ]]; then - timestamp=$(gdate -d'+10second' +%s) - else - timestamp=$(date -d'+10second' +%s) - fi - - export LODESTAR_PRESET="mainnet" - - pushd $artifacts_dir/lodestar - ./lodestar dev \ - --genesisValidators 8 \ - --genesisTime $timestamp \ - --startValidators "0..7" \ - --enr.ip6 "127.0.0.1" \ - --rest.address "0.0.0.0" \ - --eth1.providerUrls "http://127.0.0.1:8545" \ - --execution.urls "http://127.0.0.1:8551" \ - --dataDir "$ethereum_data_dir" \ - --reset \ - --terminal-total-difficulty-override 0 \ - --genesisEth1Hash $genesisHash \ - --params.ALTAIR_FORK_EPOCH 0 \ - --params.BELLATRIX_FORK_EPOCH 0 \ - --params.CAPELLA_FORK_EPOCH 0 \ - --params.DENEB_FORK_EPOCH 0 \ - --eth1=true \ - --rest.namespace="*" \ - --jwt-secret $assets_dir/jwtsecret \ - --chain.archiveStateEpochFrequency 1 \ - >"$logs_dir/lodestar.log" 2>&1 & - echo "lodestar=$!" >> $artifacts_dir/daemons.pid - popd -} - -wait_for_geth() { - echo "Waiting for geth to finish syncing/indexing..." - while true; do - syncing=$(curl -s -X POST -H "Content-Type: application/json" \ - --data '{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}' http://127.0.0.1:8545 | jq '.result') - if [ "$syncing" = "false" ]; then - echo "Geth is no longer syncing." - break - else - echo "Geth is still syncing: $syncing" - fi - sleep 3 - done -} - -deploy_local() { - # 1. deploy execution client - echo "Starting execution node" - start_geth - - echo "Waiting for geth API to be ready" - sleep 5 - # 2. deploy consensus client - echo "Starting beacon node" - start_lodestar - wait_for_geth -} - -if [ -z "${from_start_services:-}" ]; then - echo "start ethereum only!" - trap kill_all SIGINT SIGTERM EXIT - deploy_local - echo "ethereum local nodes started!" - wait -fi \ No newline at end of file diff --git a/operator/test/scripts/force-beacon-checkpoint.sh b/operator/test/scripts/force-beacon-checkpoint.sh deleted file mode 100755 index 2c9fcbca..00000000 --- a/operator/test/scripts/force-beacon-checkpoint.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env bash -set -eu - -source scripts/set-env.sh - -write_beacon_checkpoint() { - pushd $output_dir > /dev/null - $relayer_bin generate-beacon-checkpoint --config $output_dir/beacon-relay.json --export-json > /dev/null - cat $output_dir/dump-initial-checkpoint.json - popd > /dev/null -} - -wait_beacon_chain_ready() { - local initial_beacon_block="" - while [ -z "$initial_beacon_block" ] || [ "$initial_beacon_block" == "0x0000000000000000000000000000000000000000000000000000000000000000" ]; do - initial_beacon_block=$(curl -s "$beacon_endpoint_http/eth/v1/beacon/states/head/finality_checkpoints" | - jq -r '.data.finalized.root' || true) - sleep 3 - done -} - -submit_beacon_checkpoint() { - pushd "$helpers_dir" > /dev/null - pnpm submit-checkpoint "$1" - popd > /dev/null -} - -wait_beacon_chain_ready -# Get the checkpoint data -write_beacon_checkpoint -# Submit the checkpoint using the helper script -echo "Submitting checkpoint to the chain..." -submit_beacon_checkpoint "$output_dir/dump-initial-checkpoint.json" diff --git a/operator/test/scripts/generate-beefy-checkpoint.sh b/operator/test/scripts/generate-beefy-checkpoint.sh deleted file mode 100755 index 948641ba..00000000 --- a/operator/test/scripts/generate-beefy-checkpoint.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env bash -set -eu - -source scripts/set-env.sh - -generate_beefy_checkpoint() -{ - pushd "$test_helpers_dir" - pnpm install - pnpm generateBeefyCheckpoint - popd -} - -if [ -z "${from_start_services:-}" ]; then - echo "Generating Beefy Checkpoint" - generate_beefy_checkpoint - wait -fi \ No newline at end of file diff --git a/operator/test/scripts/set-env.sh b/operator/test/scripts/set-env.sh deleted file mode 100755 index 6c505ed1..00000000 --- a/operator/test/scripts/set-env.sh +++ /dev/null @@ -1,212 +0,0 @@ -#!/usr/bin/env bash - -root_dir="$(realpath ..)" -export output_dir="${root_dir}/tmp" -export output_bin_dir="$output_dir/bin" -mkdir -p "$output_bin_dir" -export PATH="$output_bin_dir:$PATH" - -scripts_dir="$root_dir/test/scripts" -zombienet_data_dir="$output_dir/zombienet" -ethereum_data_dir="$output_dir/ethereum" -assets_dir="$root_dir/test/assets" -helpers_dir="$root_dir/test/helpers" -artifacts_dir="$output_dir/artifacts" -mkdir -p "$artifacts_dir" -logs_dir="$artifacts_dir/logs" -mkdir -p "$logs_dir" - -LODESTAR_TAG="v1.19.0" -GETH_TAG="v1.14.11" -lodestar_dir="$artifacts_dir/lodestar" -geth_dir="$artifacts_dir/geth" - -relayer_dir="$artifacts_dir/datahaven-bridge-relayer" -relayer_bin="$relayer_dir/relayer/build/datahaven-bridge-relay" -web_dir="$relayer_dir/snowbridge/web" -snowbridge_contracts_dir="$relayer_dir/snowbridge/contracts" -test_helpers_dir="$web_dir/packages/test-helpers" - -eth_network="${ETH_NETWORK:-localhost}" -eth_endpoint_http="${ETH_RPC_ENDPOINT:-http://127.0.0.1:8545}/${INFURA_PROJECT_ID:-}" -eth_endpoint_ws="${ETH_WS_ENDPOINT:-ws://127.0.0.1:8546}/${INFURA_PROJECT_ID:-}" -eth_gas_limit="${ETH_GAS_LIMIT:-5000000}" -etherscan_api_key="${ETHERSCAN_API_KEY:-}" -reset_ethereum="${RESET_ETHEREUM:-true}" - -beefy_relay_eth_key="${BEEFY_RELAY_ETH_KEY:-0x935b65c833ced92c43ef9de6bff30703d941bd92a2637cb00cfad389f5862109}" -beacon_endpoint_http="${BEACON_HTTP_ENDPOINT:-http://127.0.0.1:9596}" -# Beacon relay account (//BeaconRelay 5GWFwdZb6JyU46e6ZiLxjGxogAHe8SenX76btfq8vGNAaq8c in testnet) -beacon_relayer_pub_key="${BEACON_RELAYER_PUB_KEY:-0xc46e141b5083721ad5f5056ba1cded69dce4a65f}" - -export RELAYCHAIN_ENDPOINT=ws://127.0.0.1:30444 -## Deployment key -export PRIVATE_KEY="${DEPLOYER_ETH_KEY:-0x4e9444a6efd6d42725a250b650a781da2737ea308c839eaccb0f7f3dbd2fea77}" -export ETHERSCAN_API_KEY="${ETHERSCAN_API_KEY:-0x0}" - -export BRIDGE_HUB_PARAID="${BRIDGE_HUB_PARAID:-1002}" -export BRIDGE_HUB_AGENT_ID="${BRIDGE_HUB_AGENT_ID:-0x03170a2e7597b7b7e3d84c05391d139a62b157e78786d8c082f29dcf4c111314}" -export ASSET_HUB_PARAID="${ASSET_HUB_PARAID:-1000}" -export ASSET_HUB_AGENT_ID="${ASSET_HUB_AGENT_ID:-0x81c5ab2571199e3188135178f3c2c8e2d268be1313d029b30f534fa579b69b79}" -export ASSET_HUB_CHANNEL_ID="0xc173fac324158e77fb5840738a1a541f633cbec8884c6a601c567d2b376a0539" - -export FOREIGN_TOKEN_DECIMALS=12 -## BeefyClient -# For max safety delay should be MAX_SEED_LOOKAHEAD=4 epochs=4*8*6=192s -# but for rococo-local each session is only 20 slots=120s -# so relax somehow here just for quick test -# for production deployment ETH_RANDAO_DELAY should be configured in a more reasonable sense -export RANDAO_COMMIT_DELAY="${ETH_RANDAO_DELAY:-3}" -export RANDAO_COMMIT_EXP="${ETH_RANDAO_EXP:-3}" -export MINIMUM_REQUIRED_SIGNATURES="${MINIMUM_REQUIRED_SIGNATURES:-16}" - -export REJECT_OUTBOUND_MESSAGES="${REJECT_OUTBOUND_MESSAGES:-false}" - -## Fee -export REGISTER_TOKEN_FEE="${REGISTER_TOKEN_FEE:-200000000000000000}" -export CREATE_ASSET_FEE="${CREATE_ASSET_FEE:-100000000000}" -export RESERVE_TRANSFER_FEE="${RESERVE_TRANSFER_FEE:-100000000000}" -export RESERVE_TRANSFER_MAX_DESTINATION_FEE="${RESERVE_TRANSFER_MAX_DESTINATION_FEE:-10000000000000}" - -## Pricing Parameters -export EXCHANGE_RATE="${EXCHANGE_RATE:-2500000000000000}" -export DELIVERY_COST="${DELIVERY_COST:-10000000000}" -export FEE_MULTIPLIER="${FEE_MULTIPLIER:-1000000000000000000}" - -## Vault -export GATEWAY_PROXY_INITIAL_DEPOSIT="${GATEWAY_PROXY_INITIAL_DEPOSIT:-10000000000000000000}" - -export GATEWAY_STORAGE_KEY="${GATEWAY_STORAGE_KEY:-0xaed97c7854d601808b98ae43079dafb3}" -export GATEWAY_PROXY_CONTRACT="${GATEWAY_PROXY_CONTRACT:-0x87d1f7fdfEe7f651FaBc8bFCB6E086C278b77A7d}" - -address_for() { - jq -r ".contracts.${1}.address" "$output_dir/contracts.json" -} - -kill_all() { - trap - SIGTERM - kill 0 -} - -cleanup() { - echo "Cleaning resource" - rm -rf "$output_dir" - mkdir "$output_dir" - mkdir "$output_bin_dir" - mkdir "$ethereum_data_dir" -} - -check_port() { - nc -z localhost $1 >/dev/null 2>&1 -} - -wait_for_port() { - while ! check_port $1; do - echo "Waiting for port $1 to be available..." - sleep 10 - done -} - -check_node_version() { - local expected_version=$1 - - if ! [ -x "$(command -v node)" ]; then - echo 'Error: NodeJS is not installed.' - exit 1 - fi - - node_version=$(node -v) # This does not seem to work in Git Bash on Windows. - # "node -v" outputs version in the format "v18.12.1" - node_version=${node_version:1} # Remove 'v' at the beginning - node_version=${node_version%\.*} # Remove trailing ".*". - node_version=${node_version%\.*} # Remove trailing ".*". - node_version=$(($node_version)) # Convert the NodeJS version number from a string to an integer. - if [ $node_version -lt "$expected_version" ] - then - echo "NodeJS version is lower than $expected_version (it is $node_version), Please update your node installation!" - exit 1 - fi -} - -vercomp() { - if [[ $1 == $2 ]] - then - echo "Equal" - return - fi - local IFS=. - local i ver1=($1) ver2=($2) - # fill empty fields in ver1 with zeros - for ((i=${#ver1[@]}; i<${#ver2[@]}; i++)) - do - ver1[i]=0 - done - for ((i=0; i<${#ver1[@]}; i++)) - do - if ((10#${ver1[i]:=0} > 10#${ver2[i]:=0})) - then - echo "Greater" - return - fi - if ((10#${ver1[i]} < 10#${ver2[i]})) - then - echo "Less" - return - fi - done -} - -check_go_version() { - local expected_version=$1 - - if ! [ -x "$(command -v go)" ]; then - echo 'Error: Go is not installed.' - exit 1 - fi - - go_version=$(go version | { read _ _ v _; echo ${v#go}; }) - op=$(vercomp "$go_version" "$1") - - if [[ $op = "Less" ]] - then - echo "Go version is lower than $expected_version (it is $go_version), Please update your go installation!" - exit 1 - fi -} - -check_tool() { - if ! [ -x "$(command -v protoc)" ]; then - echo 'Error: protoc is not installed.' - exit 1 - fi - if ! [ -x "$(command -v jq)" ]; then - echo 'Error: jq is not installed.' - exit 1 - fi - if ! [ -x "$(command -v pnpm)" ]; then - echo 'Error: pnpm is not installed.' - exit 1 - fi - if ! [ -x "$(command -v forge)" ]; then - echo 'Error: foundry is not installed.' - exit 1 - fi - if ! [ -x "$(command -v yarn)" ]; then - echo 'Error: yarn is not installed.' - exit 1 - fi - if [[ "$(uname)" == "Darwin" && -z "${IN_NIX_SHELL:-}" ]]; then - if ! [ -x "$(command -v gdate)" ]; then - echo 'Error: gdate (GNU Date) is not installed.' - exit 1 - fi - else - if ! [ -x "$(command -v date)" ]; then - echo 'Error: date is not installed.' - exit 1 - fi - fi - - check_node_version 20 - check_go_version 1.21.2 -} diff --git a/operator/test/scripts/start-relayer.sh b/operator/test/scripts/start-relayer.sh deleted file mode 100755 index 4c5188ac..00000000 --- a/operator/test/scripts/start-relayer.sh +++ /dev/null @@ -1,87 +0,0 @@ -#!/usr/bin/env bash -set -eu - -source scripts/set-env.sh - -config_relayer() { - data_store_dir="$output_dir/relayer_data" - mkdir -p $data_store_dir - - # Configure beefy relay - jq \ - --arg k1 "$(address_for BeefyClient)" \ - --arg k2 "$(address_for GatewayProxy)" \ - --arg eth_endpoint_ws $eth_endpoint_ws \ - --arg eth_gas_limit $eth_gas_limit \ - --arg assetHubChannelID $ASSET_HUB_CHANNEL_ID \ - ' - .sink.contracts.BeefyClient = $k1 - | .sink.contracts.Gateway = $k2 - | .sink.ethereum.endpoint = $eth_endpoint_ws - | .sink.ethereum."gas-limit" = $eth_gas_limit - | ."on-demand-sync"."asset-hub-channel-id" = $assetHubChannelID - ' \ - config/beefy-relay.json >$output_dir/beefy-relay.json - -# Configure beacon relay - local deneb_forked_epoch=0 - jq \ - --arg beacon_endpoint_http $beacon_endpoint_http \ - --argjson deneb_forked_epoch $deneb_forked_epoch \ - --arg relay_chain_endpoint $RELAYCHAIN_ENDPOINT \ - --arg data_store_dir $data_store_dir \ - ' - .source.beacon.endpoint = $beacon_endpoint_http - | .source.beacon.spec.denebForkedEpoch = $deneb_forked_epoch - | .sink.parachain.endpoint = $relay_chain_endpoint - | .source.beacon.datastore.location = $data_store_dir - ' \ - $assets_dir/beacon-relay.json >$output_dir/beacon-relay.json -} - -start_relayer() { - echo "Starting relay services" - # Launch beefy relay - ( - : >"$output_dir"/beefy-relay.log - while :; do - echo "Starting beefy relay at $(date)" - "${relayer_bin}" run beefy \ - --config "$output_dir/beefy-relay.json" \ - --ethereum.private-key $beefy_relay_eth_key \ - >>"$output_dir"/beefy-relay.log 2>&1 || true - sleep 20 - done - ) & - - # Launch beacon relay - ( - : >"$output_dir"/beacon-relay.log - while :; do - echo "Starting beacon relay at $(date)" - "${relayer_bin}" run beacon \ - --config $output_dir/beacon-relay.json \ - --substrate.private-key "//BeaconRelay" \ - >>"$output_dir"/beacon-relay.log 2>&1 || true - sleep 20 - done - ) & -} - -build_relayer() { - echo "Building relayer" - mage -d "$relayer_dir/relayer" build - cp $relayer_bin "$output_bin_dir" -} - -deploy_relayer() { - check_tool && build_relayer && config_relayer && start_relayer -} - -if [ -z "${from_start_services:-}" ]; then - echo "start relayers only!" - trap kill_all SIGINT SIGTERM EXIT - deploy_relayer - - wait -fi \ No newline at end of file diff --git a/operator/test/scripts/start-testnet.sh b/operator/test/scripts/start-testnet.sh deleted file mode 100755 index 127c7af0..00000000 --- a/operator/test/scripts/start-testnet.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/env bash -set -eu - -from_start_services=true - -# Source environment variables -source scripts/set-env.sh -source scripts/build-binary.sh - -trap kill_all SIGINT SIGTERM EXIT - -# 0. check required tools -echo "Check building tools" -check_tool - -# 1. Buid DataHaven Binary -build_binary - -# 2. Start DataHaven Nodes -echo "Starting DataHaven Nodes" -source scripts/deploy-datahaven.sh -deploy_datahaven - -# 3. generate beefy checkpoint -echo "Generate beefy checkpoint" -source scripts/generate-beefy-checkpoint.sh -generate_beefy_checkpoint - -# 4. Start Ethereum Nodes -# source scripts/build-ethereum.sh -# build_lodestar -# build_geth - -# 5. Start Ethereum Nodes -source scripts/deploy-ethereum.sh -echo "Starting Ethereum Nodes" -deploy_local - -# 6. Build Snowbridge Contracts -source scripts/build-contracts.sh -echo "Building Snowbridge Contracts" -build_snowbridge_contracts - -# 7. Deploy Snowbridge Contracts -source scripts/deploy-contracts.sh -echo "Deploying Snowbridge Contracts" -deploy_snowbridge_contracts - -wait \ No newline at end of file