mvx-property-testing
Use property-based testing and fuzzing to find edge cases in smart contract logic.
Skill by multiversx
Chalk Labs
Need help deploying mvx-property-testing?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/multiversx-mvx-property-testing
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: documents, testing, writing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/mvx-property-testing
What's inside
- Skill name
mvx-property-testing- Description
- Use property-based testing and fuzzing to find edge cases in smart contract logic. Use when writing comprehensive tests, verifying invariants, or searching for unexpected behavior with random inputs.
- License
- MIT
- Instructions
- 374 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# MultiversX Property Testing
> **Note**: `proptest` is an external crate (not part of the MultiversX SDK). Add it as a dev-dependency in your `Cargo.toml`.
Use property-based testing (fuzzing) to automatically discover edge cases and invariant violations in MultiversX smart contract logic. This approach generates random inputs to find bugs that manual testing misses.
## When to Use
- Writing comprehensive test suites
- Verifying mathematical invariants hold
- Testing complex state machines
- Finding edge cases in business logic
- Validating input handling across ranges
## 1. Tools and Setup
### Rust Property Testing Libraries
**proptest** - Most commonly used:
```toml
# Cargo.toml (dev-dependencies)
[dev-dependencies]
proptest = "1.4"
```
**cargo-fuzz** - LLVM-based fuzzing:
```bash
# Install
cargo install cargo-fuzz
# Initialize fuzz targets
cargo fuzz init
```
### MultiversX Test Environment
```toml
[dev-dependencies]
multiversx-sc-scenario = "0.64.0"
```
## 2. Defining Invariants
Invariants are properties that must ALWAYS hold, regardless of inputs or state.
### Common Smart Contract Invariants
| Invariant | Description | Example |
|-----------|-------------|---------|
| Conservation | Sum of parts equals total | Total supply == sum of all balances |
| Monotonicity | Value only moves one direction | Stake amount never decreases without explicit unstake |
| Bounds | Values stay within limits | User balance <= total supply |
| Consistency | Related values stay in sync | Whitelist count == whitelist set length |
| Idempotency | Repeated calls have same effect | Double-claim returns 0 second time |
### Defining Invariants in Code
```rust
// Invariant: Total supply equals sum of all balances
fn check_supply_invariant(state: &ContractState) -> bool {
let total_supply = state.total_supply;
let sum_of_balances: BigUint = state.balances.values().sum();
total_supply == sum_of_balances
}
// Invariant: User balance never exceeds total supply
fn check_balance_bounds(state: &ContractState, user: &Address) -> bool {
let user_balance = state.balances.get(user).unwrap_or_default();
user_balance <= state.total_supply
}
```
## 3. Property Testing with proptest
### Basic Property Test
```rust
use proptest::prelude::*;
proptest! {
#[test]
fn test_deposit_increases_balance(amount in 1u64..1_000_000u64) {
let mut setup = TestSetup::new();
let initial_balance = setup.get_balance();
setup.deposit(amount);
let final_balance = setup.get_balance();
prop_assert_eq!(final_balance, initial_balance + amount);
}
}
```
### Testing with Multiple Inputs
```rust
proptest! {
#[test]
fn test_transfer_conservation(
sender_initial in 1000u64..1_000_000u64,
amount in 1u64..1000u64
) {
prop_assume!(amount <= sender_initial); // Precondition
let mut setup = TestSetup::new();
setup.set_balance(SENDER, sender_initial);
setup.set_balance(RECEIVER, 0);
let total_before = sender_initial;
setup.transfer(SENDER, RECEIVER, amount);
let sender_after = setup.get_balance(SENDER);
let receiver_after = setup.get_balance(RECEIVER);
let total_after = sender_after + receiver_after;
// Conservation invariant
prop_assert_eq!(total_before, total_after);
}
}
```
### Custom StrategiesFrom multiversx/mx-ai-skills, MIT.
More from multiversx/mx-ai-skills
- 0.544score
mvx-cross-contract-calls
multiversx
Make cross-contract calls in MultiversX smart contracts.
SkillCFreshness: C★ 12Claude Code +9 - 0.544score
mvx-debug-tx
multiversx
Debug and analyze MultiversX transactions.
SkillCFreshness: C★ 12Claude Code +9 - 0.544score
mvx-project-architecture
multiversx
Production-grade project structure patterns for MultiversX smart contracts.
SkillCFreshness: C★ 12Claude Code +9 - 0.544score
mvx-deploy-flow
multiversx
Deploy MultiversX smart contracts with pre-flight checks, verification, and post-deployment validation.
SkillCFreshness: C★ 12Claude Code +9 - 0.544score
mvx-payment-handling
multiversx
Handle payments in MultiversX smart contracts.
SkillCFreshness: C★ 12Claude Code +9 - 0.544score
mvx-audit-onchain
multiversx
Perform a comprehensive on-chain security audit of a deployed MultiversX smart contract.
SkillCFreshness: C★ 12Claude Code +9 - 0.544score
mvx-blockchain-data
multiversx
Read on-chain state in MultiversX smart contracts.
SkillCFreshness: C★ 12Claude Code +9 - 0.544score
mvx-cache-patterns
multiversx
Gas-optimized cache patterns for MultiversX smart contracts using Drop-based write-back caches.
SkillCFreshness: C★ 12Claude Code +9 - 0.544score
mvx-clarification-expert
multiversx
Identify ambiguous requirements and ask targeted clarifying questions for MultiversX development.
SkillCFreshness: C★ 12Claude Code +9 - 0.544score
mvx-test-contract
multiversx
Perform automated on-chain testing of a deployed MultiversX smart contract.
SkillCFreshness: C★ 12Claude Code +9 - 0.544score
mvx-constant-time
multiversx
Verify cryptographic operations execute in constant time to prevent timing attacks.
SkillCFreshness: C★ 12Claude Code +9 - 0.544score
mvx-cross-contract-storage
multiversx
Read another contract's storage directly without async calls using storage_mapper_from_address.
SkillCFreshness: C★ 12Claude Code +9
Signals
- Stars
- 12
- Forks
- 4
- Open issues
- 0
- Last commit (this folder)
- Jul 2, 2026 (4 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/multiversx/mx-ai-skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from multiversx
- 0.544score
mvx-deploy-flow
multiversx
Deploy MultiversX smart contracts with pre-flight checks, verification, and post-deployment validation.
SkillCFreshness: C★ 12Claude Code +9 - 0.544score
mvx-debug-tx
multiversx
Debug and analyze MultiversX transactions.
SkillCFreshness: C★ 12Claude Code +9 - 0.544score
mvx-project-architecture
multiversx
Production-grade project structure patterns for MultiversX smart contracts.
SkillCFreshness: C★ 12Claude Code +9 - 0.544score
mvx-test-contract
multiversx
Perform automated on-chain testing of a deployed MultiversX smart contract.
SkillCFreshness: C★ 12Claude Code +9 - 0.544score
mvx-payment-handling
multiversx
Handle payments in MultiversX smart contracts.
SkillCFreshness: C★ 12Claude Code +9 - 0.544score
mvx-audit-onchain
multiversx
Perform a comprehensive on-chain security audit of a deployed MultiversX smart contract.
SkillCFreshness: C★ 12Claude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get mvx-property-testing running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
mvx-property-testing skill. Agent Mart. https://agentmart.dev/skills/multiversx-mvx-property-testing (last updated 2026-10-24)