Spaces:
Build error
Build error
| from web3 import Web3 | |
| import json | |
| class BlockchainManager: | |
| def __init__(self): | |
| # Using free public Ethereum testnet | |
| self.w3 = Web3(Web3.HTTPProvider('https://rpc.sepolia.org')) | |
| def create_inheritance_record(self, heir_id, assets): | |
| # Simple smart contract deployment using local signing | |
| contract = self.w3.eth.contract( | |
| abi=self.get_contract_abi(), | |
| bytecode=self.get_contract_bytecode() | |
| ) | |
| return contract.functions.recordInheritance(heir_id, json.dumps(assets)).call() |