A lightweight CLI tool for deploying and benchmarking PolkaVM smart contracts using pallet-revive.
This tool runs contracts in-memory without requiring a full blockchain node, making it ideal for:
- Quick contract testing and gas profiling
- Performance benchmarking of PolkaVM bytecode
- Development iteration on Solidity and ink! contracts compiled to PolkaVM
cargo build --release./target/release/revive-bench deploy \
--code contracts/ink/flipper.polkavm \
--ctor-hex ""Output:
address: deployed contract address (H160)code_hash: hash of the deployed code
./target/release/revive-bench call \
--addr <contract-address-hex> \
--data-hex <calldata-hex> \
--gas <optional-gas-limit>Output:
gas_consumed: actual gas usedgas_required: minimum gas neededdid_revert: whether the call revertedreturn_data: return value as hex
./target/release/revive-bench benchmark \
--code contracts/ink/flipper.polkavm \
--data-hex "633aa551" \
--iterations 100Output:
avg_gas: average gas consumed per callavg_time_ns: average execution time in nanoseconds
- All hex inputs should omit the
0xprefix - Contract addresses are H160 format (20 bytes)
- Default iterations for benchmark: 10
We currently have a Mockup Frontend Design Present.
cd apps
pnpm i
pnpm dev