hackquest logo

ChainZap

PLAN. PROTECT. PASS , Seamlessly on Aptos.

Videos

Description

🧾 ChainZap: Plan Your Legacy On-Chain

Lost seed phrases. Locked wallets. No recovery.
But what if you could plan your digital legacy on-chain?

ChainZap is a decentralized, trustless solution built on the Aptos blockchain to help you protect your digital assets—even after you're gone.


contract address : https://explorer.aptoslabs.com/txn/0x9d404816a2803cbc5c86c729412d9de05629f8a7e21835c9cc235fc7a60ecd0d?network=testnet

❓ Why Does This Matter?

What happens to your digital assets if something unexpected happens to you?

In Web3, if you lose access to your wallet, your assets are gone—forever.
There's no customer support, no reset button, and no way for loved ones to claim what you've built.

ChainZap solves that.


🚀 What Is ChainZap?

ChainZap lets you:

  • 🔒 Securely deposit APT tokens into a smart contract will

  • 👤 Assign a recipient to inherit your assets

  • 🛂 Retain full control to update the will anytime

  • ⏱️ Stay active by "pinging" the contract to prove you're alive

  • 🧾 If you don’t ping within the timeout, your recipient can claim the funds

  • ⚙️ All actions are on-chain, automated, and require no third party


📍 Contract Address

View on Aptos Explorer


⚙️ How Does It Work?

Flow
  1. Create Will

    • Specify a recipient and amount.

    • Funds are locked in the contract.

  2. Ping to Prove Activity

    • Regularly ping to signal you’re alive.

    • If you don’t ping within your chosen timeout, your will becomes claimable.

  3. Recipient Claims

    • Recipient can claim your assets after timeout—fully on-chain.


⚡ Why Aptos?

Aptos offers:

  • 🚀 Blazing fast throughput

  • 🔐 Strong safety guarantees via the Move language

  • 💸 Low transaction fees

  • 🌐 A growing ecosystem

It's the ideal foundation for building trustless, secure legacy tools.


✅ Why ChainZap?

  • No lawyers. No paperwork. No centralization.

  • Enforced by smart contracts, not institutions

  • Friendly UI, wallet integration, real-time updates

  • Fully transparent and decentralized


🧭 Table of Contents


🏗️ Current Architecture & Features

Architecture Overview

  • Frontend: Next.js + React

  • Smart Contract: Aptos Move

  • Core Flows: Will creation, ping, claim

Core Features

  • Create and lock funds into a digital will

  • Assign a recipient

  • Ping to keep your will active

  • Recipient can claim after timeout

  • Fully on-chain, secure, and automated


🔁 User Flows

1. Will Creation

  • Connect wallet

  • Enter recipient and amount

  • Sign transaction

  • Funds are locked

2. Ping

  • Click "Ping" from dashboard

  • Updates your last active timestamp

3. Claim

  • Recipient connects wallet

  • If timeout passed, they can claim the assets


📘 Smart Contract API Reference

Entry Functions

Function

Description

initialize_global_registry(account: &signer)

Initialize registry (once)

initialize(account: &signer)

Initialize user's will state

create_will(account: &signer, recipient: address, amount: u64, registry_addr: address)

Create a will and lock funds

ping(account: &signer)

Update user’s activity timestamp

claim(account: &signer, registry_addr: address, owner_index: u64)

Claim will from specific user

claim_single(account: &signer, registry_addr: address)

Claim first (and only) available will

View Functions

Function

Description

get_will(addr: address)

Get will for address

get_wills_for_recipient(recipient: address, registry_addr: address)

Get wills assigned to a recipient

get_claimable_wills_for_recipient(recipient: address, registry_addr: address)

Get all claimable wills

get_will_count_for_recipient(recipient: address, registry_addr: address)

Count of wills for a recipient


🛠️ Environment Variables

Variable

Required

Description

NEXT_MODULE_PUBLISHER_ACCOUNT_ADDRESS

Aptos address to publish

NEXT_MODULE_PUBLISHER_ACCOUNT_PRIVATE_KEY

Publisher’s private key

NEXT_PUBLIC_APP_NETWORK

Aptos network (testnet, mainnet, devnet)

NEXT_PUBLIC_MODULE_ADDRESS

Auto

Published contract address

NEXT_PUBLIC_APTOS_API_KEY

Optional

Aptos API key (if needed)

Example .env

NEXT_MODULE_PUBLISHER_ACCOUNT_ADDRESS=0xabc123...
NEXT_MODULE_PUBLISHER_ACCOUNT_PRIVATE_KEY=0xabcdef...
NEXT_PUBLIC_APP_NETWORK=testnet

⚙️ Setup & Deployment

Prerequisites

  • Node.js (v18+)

  • npm or yarn

  • Aptos CLI

  • Aptos-compatible wallet (Petra, Martian)

Installation

git clone https://github.com/yourusername/chainZap.git
cd chainZap
npm install
# or
yarn install

Running the App

npm run dev
# or
yarn dev

App will be available at: http://localhost:3000

Move Contract Deployment

# Compile Move code
npm run move:compile

# Publish Move module (after setting env variables)
npm run move:publish

# To upgrade
npm run move:upgrade

# To run tests
npm run move:test

💻 Usage

  1. Connect your wallet

  2. Create a will

    • Enter recipient and amount

    • Sign transaction

  3. Ping your will

    • Keep your will active

  4. Claim a will

    • If you're a recipient and the timeout passed, claim the assets

  5. View your claimable wills in the dashboard


🌐 Future Protocol: TLD (Trustless Legacy Distribution)

Our vision for decentralized, community-driven inheritance.

TLD Vision

Planned Features

  • 🗳️ Validator voting for death claims

  • ⏳ Challenge period to raise disputes

  • 🧑‍⚖️ Fallback "super validators"

  • 🛠️ Custom validator sets & thresholds

  • ⚖️ On-chain dispute resolution

Why TLD?

  • Removes single points of failure

  • Enables more complex, secure inheritance logic

  • Makes legacy management fairer and more decentralized


🧩 Troubleshooting & FAQ

Wallet not connecting?

  • Make sure Petra or Martian wallet is installed

  • Refresh the page and try again

Contract error: registry not initialized?

  • Ensure initialize_global_registry() was called by the deployer

Claim fails with too soon?

  • The owner must remain inactive for the full timeout period

Want to update your will?

  • Create a new one—ChainZap will overwrite the old will

Where are assets stored?

  • Locked on-chain in the Move contract until claimed


👨‍💻 Developer Contact Info


✅ Ready to Plan Your Legacy?

Protect your future. Empower your loved ones.
Try ChainZap today — and stay tuned for TLD: the next step in trustless inheritance.


Progress During Hackathon

Progress During Hackathon During the hackathon, we successfully designed, developed, and deployed ChainZap — a decentralized, trustless platform for digital legacy planning on the Aptos blockchain. Ideation & Research: We began by identifying a major issue in Web3: the permanent loss of digital assets due to inaccessible wallets when users become inactive or pass away. After analyzing existing solutions and their limitations, we decided to build a simple yet effective inheritance system that doesn't rely on centralized entities. We chose Aptos for its Move-based safety, scalability, and developer-friendly tools. Development: We implemented the ChainZap smart contract using Move, enabling users to create wills, ping to show activity, and allow recipients to claim assets after a timeout. Simultaneously, we built a Next.js frontend with wallet integrations (Petra and Martian) and a responsive dashboard. Key Features Built: Smart contract to handle will creation, pings, and claims Wallet integration and transaction signing Claim eligibility checking based on activity timeout Real-time UI updates and claimable will viewer Testing & Debugging: We tested all flows thoroughly, including edge cases like early claims, invalid inputs, and multiple wills. Smart contract logic was verified using Aptos CLI on the testnet. Deployment: The Move contract was compiled and deployed to the Aptos testnet. The frontend was configured to interact with the deployed contract and made available for testing. Additional Achievements: Flow diagrams and architecture documentation Fully documented smart contract API Custom environment variable setup for quick redeployments Clean UI/UX for easy onboarding This rapid yet structured development helped us deliver a fully functional MVP, setting the foundation for the future protocol (TLD) with validator-based claim governance.

Tech Stack

Web3
Ethers
Next
React
Move
Rust
Aptos

Fundraising Status

currently having a talk with the Aptos team , in scaling up and shipping to the mainnet

Team LeaderDDebanjan Mondal
Sector
DeFiDAORWA