Address Details
contract
0x6dBf6d253F606325C8D39e36b12834Cc7e213A1B
- Contract Name
- NewWill
- Creator
- 0x4e1856–3b215c at 0x024c30–dbb544
- Balance
- 0 CELO ( )
- Tokens
-
Fetching tokens...
- Transactions
- 2 Transactions
- Transfers
- 0 Transfers
- Gas Used
- 139,916
- Last Balance Update
- 14299983
This contract has been verified via Sourcify.
View contract in Sourcify repository
- Contract name:
- NewWill
- Optimization enabled
- false
- Compiler version
- v0.8.7+commit.e28d00a7
- EVM Version
- london
- Verified at
- 2023-01-26T00:38:25.789002Z
NewWill.sol
// SPDX-License-Identifier: GPL-3.0 pragma solidity >=0.7.0 <0.9.0; contract NewWill { address owner; uint fortune; bool deceased; constructor() payable public { owner = msg.sender; fortune = msg.value; deceased = false; } // Array of Fammily wallets address payable [] famWallets; // mapping family wallets to amount as inheritance mapping(address => uint) famInheritance; // Modifier to confirm if OWNER is the sender modifier isOwner() { require(msg.sender == owner, 'Invalid account'); _; } // Modifier to check if OWNER is deceased modifier isDeceased() { require(deceased == true, 'Owner NOT dead!'); _; } // Set the inheritance function setInherit(address payable wallet, uint amount) public isOwner { famWallets.push(wallet); famInheritance[wallet] = amount; } // Payout inheritance to family wallets function payInheritance() private isDeceased { for(uint i = 0; i < famWallets.length; i++) { famWallets[i].transfer(famInheritance[famWallets[i]]); } } // Approve Payout ONLY if owner is deceased // function approvePayout() public isOwner { // deceased = true; // payInheritance(); // } }
Contract ABI
[{"type":"constructor","stateMutability":"payable","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setInherit","inputs":[{"type":"address","name":"wallet","internalType":"address payable"},{"type":"uint256","name":"amount","internalType":"uint256"}]}]
Deployed ByteCode
0x608060405234801561001057600080fd5b506004361061002b5760003560e01c806358edfa0114610030575b600080fd5b61004a600480360381019061004591906101af565b61004c565b005b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146100da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100d190610212565b60405180910390fd5b6003829080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505050565b600081359050610194816102ad565b92915050565b6000813590506101a9816102c4565b92915050565b600080604083850312156101c6576101c561027f565b5b60006101d485828601610185565b92505060206101e58582860161019a565b9150509250929050565b60006101fc600f83610232565b915061020782610284565b602082019050919050565b6000602082019050818103600083015261022b816101ef565b9050919050565b600082825260208201905092915050565b600061024e82610255565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600080fd5b7f496e76616c6964206163636f756e740000000000000000000000000000000000600082015250565b6102b681610243565b81146102c157600080fd5b50565b6102cd81610275565b81146102d857600080fd5b5056fea2646970667358221220f12037a143984fbea2341e71b808e182e1d99f70c41c6863aed766cbf3244c7964736f6c63430008070033