Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Network Reference

Quick reference for all active Kusama Shield contract deployments.

Active Deployments

Polkadot AssetHub — Mainnet (420420419)

ContractAddress
Shield Pool V70x0D694Da746e73D1e255c1894F90e38170db45809
ZK Verifier0x6A13781E43AEA21918120CD0E7a2ed8614c01e14
Poseidon Hasher0xB8F0C6679D6Cc56450470522Bd96573C3D615052
Deployment Block18460000

Paseo AssetHub — Testnet (420420417)

ContractAddress
Shield Pool V70xbcE09D4De052b2816df1285663ac89528DF45380
ZK Verifier0xcA4cBc5d31eccd08d393C43aF492F729FF30b685
Poseidon Hasher0x1d165f6fE5A30422E0E2140e91C8A9B800380637
Deployment Block11273491

Kusama AssetHub — Mainnet (420420418)

ContractAddress
Shield Pool V50x625159459EB6C50C4F4b126A955B18d5c4DCA573
ZK Verifier0x66988131CFfd10d2804ffaC93Ac302D0886D7829
Deployment Block0

RPC Endpoints

NetworkHTTP (EVM)WSS (Substrate)
Polkadot AHhttps://polkadot-assethub-rpc.laissez-faire.tradewss://asset-hub-polkadot-rpc.polkadot.io
Polkadot AH (alt)https://eth-rpc.polkadot.io/
Paseo AHhttps://paseo-assethub-rpc.laissez-faire.tradewss://asset-hub-paseo-rpc.n.dwellir.com
Kusama AHhttps://kusama-rpc.laissez-faire.tradewss://kusama-asset-hub-rpc.polkadot.io
Kusama AH (alt)https://eth-rpc-kusama.polkadot.io/

Block Explorers

NetworkURL
Polkadot AHhttps://blockscout.polkadot.io/
Paseo AHhttps://testnet.routescan.io/
Kusama AHhttps://blockscout-kusama.polkadot.io/

V7 ABI Reference

// Deposit
function depositNative(bytes32 commitment) external payable
function depositAsset(uint256 assetId, uint256 amount, bytes32 commitment) external
function depositAssetDirect(uint256 assetId, uint256 amount, bytes32 commitment) external

// Withdraw
function withdraw(uint256[2] pA, uint256[2][2] pB, uint256[2] pC, uint[8] pubSignals, address recipient) external
function proxy_withdraw(uint256[2] pA, uint256[2][2] pB, uint256[2] pC, uint[8] pubSignals, address recipient) external

// Queries
function currentRoot() external view returns (uint256)
function treeSize() external view returns (uint256)
function getEscrowBalance(address) external view returns (uint256)
function isNullifierSpent(bytes32) external view returns (bool)
function isKnownRoot(uint256) external view returns (bool)
function verifier() external view returns (address)

// Events
event Deposit(address indexed asset, bytes32 commitment)

V7 Public Signals

pubSignals = [
  newCommitmentHash,       // [0] Change commitment in tree
  existingNullifierHash,   // [1] Marks spent deposit
  contextHash,             // [2] Replay protection
  withdrawnValue,          // [3] Amount withdrawn
  treeDepth,               // [4] = 128
  context,                 // [5] Chain-specific binding
  root,                    // [6] Merkle tree root
  asset,                   // [7] Asset precompile address
]

Proof Format (Groth16)

// pi_a: [bigint, bigint]                              — 2 elements
// pi_b: [[bigint, bigint], [bigint, bigint]]          — 2×2, transposed for Solidity
// pi_c: [bigint, bigint]                              — 2 elements

The pi_b matrix is transposed[[b[0][1], b[0][0]], [b[1][1], b[1][0]]] — matching the snarkJS Solidity verifier convention.

Circuit Artifacts

FilePurpose
withdraw_phase2_fixed_v7.wasmWitness calculator
withdraw_phase2_fixed_v7_0001.zkeyProving key
withdraw_phase2_fixed_v7.circomCircuit source

Deprecated Addresses

These addresses are no longer in use — do not interact with them:

ContractAddressIssue
Old Polkadot Pool0x6f54d64C5619363722e4D1E4E53176F7f2FD57bfUsed incompatible bn254_x5 hasher
Old Polkadot Hasher0x66988131CFfd10d2804ffaC93Ac302D0886D7829Mismatched ZK circuit constants
Old Paseo Pool (V3)0x3099889C1538f0200B831181cbfb532a4e9A418FPre-V7 circuit

BN254 Field Modulus

21888242871839275222246405745257275088548364400416034343698204186575808495617

All Poseidon hashing, Merkle tree arithmetic, and Groth16 proofs operate in this field.

SDK

npm install @kusamashield/shielded-transfers@0.1.4

See Integrate via the SDK for usage instructions.