klever-dev — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited klever-dev (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
LLM-optimized reference for building on Klever. Use this to produce correct smart contracts, transactions, and dApp integrations.
You are an expert Klever blockchain developer. Your stack:
klever_sc framework, compiled to WASM@klever/connect (TypeScript) or klever-go-sdk (Go)ksc (compiler) + koperator (deploy/invoke/query)You write clean, secure, production-ready code. You always validate against the correctness rules below before writing any code.
Activate this skill when the task involves ANY of the following:
klv1... addresses (bech32 format)klever_sc, WASM)ksc or koperator CLI commands@klever/connect or klever-go-sdk usageUse this to route the task to the correct guide:
What does the task involve?
├─ Writing a smart contract?
│ ├─ New contract from scratch
│ │ └─ Start with Quick Start below, then → 01-smart-contracts.md
│ ├─ Adding storage/state
│ │ └─ → 02-storage.md (mappers, namespaces)
│ ├─ Handling tokens/payments
│ │ └─ → 03-tokens.md (payable endpoints, KLV/KDA)
│ ├─ Emitting events
│ │ └─ → 04-events.md (ONE-DATA rule)
│ └─ Using modules (admin, pause)
│ └─ → 05-modules.md
│
├─ Building or deploying?
│ └─ → 06-deployment.md (ksc build, koperator deploy/invoke/query)
│
├─ Querying on-chain data?
│ └─ → 07-api-reference.md (Node API port 8080, API proxy port 9090)
│
├─ Reviewing for security?
│ └─ → 08-security.md (reentrancy, overflow, access control)
│
└─ Debugging an error?
└─ → 09-troubleshooting.md (common errors and fixes)Validate all code against these facts before outputting.
precision field)klv1... (bech32)use klever_sc::imports::*;#[klever_sc::contract]klever-sc (latest version on crates.io)klever-sc-modules (use same version as klever-sc)--values "TOKEN=amount" (plural, token=amount format)koperator sc invoke ADDRESS FUNCTION#[indexed]These are the most frequent errors. Check your output against this list.
KLV and KFI use 6 decimals. 1 KLV = 1,000,000 units. Never use 18 (that's EVM).
// WRONG: 18 decimals
let one_klv = BigUint::from(1_000_000_000_000_000_000u64);
// CORRECT: 6 decimals
let one_klv = BigUint::from(1_000_000u64);--value instead of --valueskoperator uses --values (plural) with token=amount format.
# WRONG
koperator sc invoke ADDR func --value 1000000
# CORRECT
koperator sc invoke ADDR func --values "KLV=1000000" --sign --await --result-only--function flag instead of positional argumentkoperator uses positional arguments, not flags, for contract address and function name.
# WRONG
koperator sc invoke --contract ADDR --function func
# CORRECT
koperator sc invoke ADDR func --sign --await --result-onlyEvents allow maximum ONE non-indexed parameter. All others must be #[indexed].
// WRONG: two non-indexed params — compile error
#[event("transfer")]
fn transfer_event(&self, from: &ManagedAddress, to: &ManagedAddress, amount: &BigUint);
// CORRECT: only amount is non-indexed
#[event("transfer")]
fn transfer_event(
&self,
#[indexed] from: &ManagedAddress,
#[indexed] to: &ManagedAddress,
amount: &BigUint, // only non-indexed param
);BigUint panics on underflow. Always check before subtracting.
// WRONG: aborts if balance < amount
self.balance(&user).update(|b| *b -= &amount);
// CORRECT: validate first
require!(balance >= amount, "Insufficient balance");
self.balance(&user).update(|b| *b -= &amount);#[upgrade] endpointUpgradeable contracts must define an #[upgrade] function. Without it, contract upgrades will fail.
#[upgrade]
fn upgrade(&self) {}[package]
name = "my-contract"
version = "0.1.0"
edition = "2021"
[lib]
path = "src/lib.rs"
[dependencies.klever-sc]
version = "0.45.1" # use latest from crates.io
[dev-dependencies.klever-sc-scenario]
version = "0.45.1" # use latest from crates.io#![no_std]
use klever_sc::imports::*;
#[klever_sc::contract]
pub trait MyContract {
#[init]
fn init(&self) {}
#[upgrade]
fn upgrade(&self) {}
#[endpoint]
fn set_value(&self, value: u64) {
self.stored_value().set(value);
}
#[view(getValue)]
fn get_value(&self) -> u64 {
self.stored_value().get()
}
#[storage_mapper("storedValue")]
fn stored_value(&self) -> SingleValueMapper<u64>;
}# Update dependencies (after bumping versions in Cargo.toml)
~/klever-sdk/ksc all update
# Build
~/klever-sdk/ksc all build
# Deploy
~/klever-sdk/koperator sc create \
--wasm="output/contract.wasm" \
--upgradeable --readable --payable --payableBySC \
--sign --await --result-only# State-changing call (invoke)
~/klever-sdk/koperator sc invoke CONTRACT_ADDR set_value \
--args "u64:42" \
--sign --await --result-only
# Read-only call (query)
~/klever-sdk/koperator sc query CONTRACT_ADDR getValue| Type | Example |
|---|---|
| Address | --args "Address:klv1abc..." |
| TokenIdentifier | --args "TokenIdentifier:KLV" |
| String | --args "String:hello" |
| u32 / u64 | --args "u32:42" |
| BigUint | --args "bi:1000000" |
| Bool | --args "bool:true" |
| Hex | --args "hex:deadbeef" |
| Network | Node URL | API URL |
|---|---|---|
| Mainnet | https://node.mainnet.klever.org | https://api.mainnet.klever.org |
| Testnet | https://node.testnet.klever.org | https://api.testnet.klever.org |
| Devnet | https://node.devnet.klever.org | https://api.devnet.klever.org |
| Local | http://localhost:8080 | http://localhost:9090 |
For AI-assisted development, connect to the Klever MCP Server:
# npm (local stdio mode)
npx @klever/mcp-server
# Docker
docker run -p 3000:3000 kleverapp/mcp-klever-vm:latest
# Remote (no install)
# URL: https://mcp.klever.org/mcpKnowledge tools: search_documentation, query_context, get_context, find_similar, get_knowledge_stats, enhance_with_context, analyze_contract
Project tools: init_klever_project, add_helper_scripts
Other tools: add_context
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.