From eb8900c77c428748aafaa42c12d3a625830eff2b Mon Sep 17 00:00:00 2001 From: MOZGIII Date: Tue, 17 Dec 2024 14:07:20 -0300 Subject: [PATCH] Add junk utils to aid with testing --- junk/.gitignore | 1 + junk/run-chain | 20 ++++++++++++++++++++ junk/send-tx | 10 ++++++++++ junk/tx-failed.txt | 1 + junk/tx-success.txt | 1 + 5 files changed, 33 insertions(+) create mode 100644 junk/.gitignore create mode 100755 junk/run-chain create mode 100755 junk/send-tx create mode 100644 junk/tx-failed.txt create mode 100644 junk/tx-success.txt diff --git a/junk/.gitignore b/junk/.gitignore new file mode 100644 index 000000000..f65e5817d --- /dev/null +++ b/junk/.gitignore @@ -0,0 +1 @@ +wasm diff --git a/junk/run-chain b/junk/run-chain new file mode 100755 index 000000000..0218c83a0 --- /dev/null +++ b/junk/run-chain @@ -0,0 +1,20 @@ +#!/bin/bash +set -euo pipefail + +cd -- "$(dirname -- "${BASH_SOURCE[0]}")" + +ROOT_DIR=".." + +WASM="wasm" + +rm -rf "$WASM" +mkdir "$WASM" + +cp "$ROOT_DIR/target/debug/wbuild/humanode-runtime/humanode_runtime.wasm" "$WASM" + +export RUST_LOG="${RUST_LOG:-"info,evm=debug"}" +"$ROOT_DIR/target/debug/humanode-peer" \ + --chain genesis/patched-chain-exported-10507907.json \ + --alice \ + --tmp \ + --wasm-runtime-overrides "$WASM" diff --git a/junk/send-tx b/junk/send-tx new file mode 100755 index 000000000..9c5cc223a --- /dev/null +++ b/junk/send-tx @@ -0,0 +1,10 @@ +#!/bin/bash +set -euo pipefail + +cd -- "$(dirname -- "${BASH_SOURCE[0]}")" + +export ETH_RPC_URL=http://localhost:9944 + +TX=$(cat "tx-failed.txt") + +cast publish "$TX" diff --git a/junk/tx-failed.txt b/junk/tx-failed.txt new file mode 100644 index 000000000..2fc826e0d --- /dev/null +++ b/junk/tx-failed.txt @@ -0,0 +1 @@ +0x02f901938214728202a980860926dbbcf10083b71b0094f803e8ca755ae4770b5e6072a1e3cb97631d76ee80b9012444fe12d80000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c59900000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000b577261707065642042544300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045742544300000000000000000000000000000000000000000000000000000000c001a0e51da282774759a799867ba2bdf036a013f14e70736cc3f002f455bc17fc5674a0249020bd9e9a10638f45bb58c3eaff5ea216d5bb36bdf58e65f7cf59a3263023 diff --git a/junk/tx-success.txt b/junk/tx-success.txt new file mode 100644 index 000000000..5528743f1 --- /dev/null +++ b/junk/tx-success.txt @@ -0,0 +1 @@ +0x02f901938214728201c3808612309ce54000834c4b4094f803e8ca755ae4770b5e6072a1e3cb97631d76ee80b9012444fe12d8000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000d577261707065642045746865720000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045745544800000000000000000000000000000000000000000000000000000000c001a07c1b43dfdd4d4303e67a8f52f9ba81a82716462d92e77157f4fad0a9ced80bbda05d0d5c06e726ff152540c92940076c9931c5b6a028ae31b9b63673e55c7aa232