Smart contract overview
InheritanceVault is the core Solidity contract. It owns vault configuration, liveness timestamps, per-owner accounting, ERC20 token tracking, claim activation, and cleanup.
Contract summary
InheritanceVault is written in Solidity 0.8.24 and uses OpenZeppelin IERC20, SafeERC20, Ownable, Pausable, and ReentrancyGuard. The current version is profiled for Arc Testnet and Circle-native USDC language.
The contract is GPL-3.0-only. The protocol logic is intentionally compact: one vault struct per owner, separate native and token accounting, strict role checks, and no unbounded token claim loop.
Vault struct
Every owner has a single Vault struct keyed by owner address.
struct Vault {
address owner;
address heir;
uint256 inactivityPeriod;
uint256 gracePeriod;
uint256 lastCheckIn;
bool exists;
bool claimed;
}Storage maps
Core storage is split between vault metadata and balances.
Events
Events make lifecycle and accounting activity indexable by explorers or future offchain services.
VaultCreated
HeirUpdated
InactivityPeriodUpdated
GracePeriodUpdated
CheckedIn
USDCDeposited
USDCWithdrawn
TokenDeposited
TokenWithdrawn
InheritanceActivated
InheritanceUSDCClaimed
InheritanceTokenClaimed
VaultDisabledCustom errors
Custom errors are used instead of long revert strings. Frontends should map these to user-readable copy. For example, VaultClaimable should be shown as owner controls are frozen because the inheritance window is open, not as a generic gas failure.
VaultAlreadyExists(address owner)
VaultDoesNotExist(address owner)
VaultAlreadyClaimed(address owner)
InvalidHeir()
InvalidReceiver()
InvalidToken()
InvalidPeriod()
Unauthorized()
ZeroAmount()
ZeroReceivedAmount()
InsufficientBalance()
VaultClaimable(address owner)
VaultNotClaimable(address owner)
AssetBalanceNotZero(address owner)
ArrayLengthMismatch()
NativeUSDCTransferFailed()Admin controls
The contract owner can pause and unpause. Pausing blocks state-changing user functions marked whenNotPaused. It does not grant the admin heir rights or permission to drain user vaults.
pause()
unpause()