Skip to content

Contract Model

The contract object represents a generated inheritance smart contract.

Object Structure

json
{
  "contractCode": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.19;\n...",
  "compiled": {
    "abi": [...],
    "bytecode": "0x608060405...",
    "sourceMap": "..."
  },
  "contractInfo": {
    "name": "InheritanceVault",
    "blockchain": "evm",
    "template": "common-law",
    "beneficiaryCount": 2,
    "hasDeadMansSwitch": true,
    "version": "1.0.0"
  },
  "analysis": {
    "warnings": [],
    "gasEstimate": "2500000",
    "securityScore": "A"
  }
}

Properties

Root Object

PropertyTypeDescription
contractCodestringHuman-readable Solidity/Rust source code
compiledobjectCompilation output
contractInfoobjectContract metadata
analysisobjectSecurity analysis results

Compiled Object

PropertyTypeDescription
abiarrayContract ABI for interaction
bytecodestringCompiled bytecode for deployment
sourceMapstringSource mapping for debugging

ContractInfo Object

PropertyTypeDescription
namestringContract name
blockchainstringTarget blockchain platform
templatestringInheritance template used
beneficiaryCountnumberNumber of beneficiaries
hasDeadMansSwitchbooleanDead man's switch enabled
versionstringContract version

Analysis Object

PropertyTypeDescription
warningsarrayCompilation/security warnings
gasEstimatestringEstimated deployment gas
securityScorestringSecurity rating (A-F)

Blockchain Values

ValueDescription
evmEthereum Virtual Machine chains
solanaSolana blockchain
tonTON blockchain

Template Values

ValueDescription
common-lawCommon law inheritance
civil-lawCivil law (European) inheritance
islamic-mirthIslamic inheritance (Mirth)
customCustom distribution rules

Beneficiary Object

Within the generation request:

json
{
  "name": "Alice Smith",
  "address": "0x742d35Cc6634C0532925a3b844Bc9e7595f5bA2e",
  "percentage": 60,
  "relationship": "spouse"
}
PropertyTypeRequiredDescription
namestringYesBeneficiary name
addressstringYesWallet address
percentagenumberYesInheritance percentage (0-100)
relationshipstringNoRelationship to owner

Dead Man's Switch Object

json
{
  "enabled": true,
  "interval": 31536000,
  "checkInMethod": "manual"
}
PropertyTypeDescription
enabledbooleanWhether switch is active
intervalnumberSeconds until trigger
checkInMethodstringmanual, transaction, oracle

Released under the MIT License.