From 35e4c6e78be183550dcab7961a0a4ddf30820979 Mon Sep 17 00:00:00 2001 From: open-junius Date: Tue, 20 May 2025 14:37:59 +0800 Subject: [PATCH] udpate readme --- evm-tests/README.md | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/evm-tests/README.md b/evm-tests/README.md index 7d01034bd8..83dc8f326f 100644 --- a/evm-tests/README.md +++ b/evm-tests/README.md @@ -1,15 +1,30 @@ # type-test -test with ts +The evm-tests folder includes all typescript code to test the basic EVM function +like token transfer, and all precompile contracts in Subtensor. It is +implemented in typescript, use both ethers and viem lib to interact with +contracts. The polkadot API is used to call extrinsic, get storage in Subtensor +. The developers can use it to verify the code change in precompile contracts. + +It is also included in the CI process, all test cases are executed for new +commit. CI flow can get catch any failed test cases. The polkadot API get the +latest metadata from the runtime, the case also can find out any incompatibility +between runtime and precompile contracts. ## polkadot api +To get the metadata, you need start the localnet via run +`./scripts/localnet.sh`. then run following command to get metadata, a folder +name .papi will be created, which include the metadata and type definitions. + ```bash -npx papi add devnet -w ws://10.0.0.11:9944 +npx papi add devnet -w ws://localhost:9944 ``` ## get the new metadata +If the runtime is upgrade, need to get the metadata again. + ```bash sh get-metadata.sh ```