Verified contractPartial
Wallet
Address0xc4083aa42ffa100f8b2a2443a79915ea2661a9d4
- Balance
0 ETH
- Transactions
2
- Compiler
solc 0.2.0
- Same code
Only this contract
Details
- Compiler
- solc 0.2.0+commit.4dc2445e
- Language
- solidity
- Optimization
- No
- License
- Not stated
- Match
- Partialcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 747,939
- Creation transaction
- 0xf79f2fd62e…45f454931a
Wallet.sol
// Recovered by EthereumHistory (ethereumhistory.com) -sw
contract Wallet {
struct Transaction {
address to;
uint value;
mapping (address => bool) voted;
uint approvals;
uint rejections;
}
mapping (address => bool) owners;
uint x;
Transaction[] transactions;
uint required;
address notify;
function Wallet(address[] _owners, address _notify) {
for (uint i = 0; i < _owners.length; i++) {
owners[_owners[i]] = true;
}
required = _owners.length;
notify = _notify;
}
function() {
throw;
}
function new_owner() {
address sender = tx.origin;
owners[sender] = true;
required++;
notify_message();
}
function receive() {
notify_message();
return;
}
function send(uint amount, address to) returns (uint) {
address sender = tx.origin;
if (owners[sender]) {
if (amount > this.balance) throw;
transactions.push(Transaction(to, amount, 1, 0));
uint id = transactions.length - 1;
notify_message();
return id;
}
else throw;
}
function approve(uint id, bool yes) {
address sender = tx.origin;
if (yes == true) transactions[id].approvals++;
else transactions[id].rejections++;
uint total = transactions[id].approvals + transactions[id].rejections;
if (total > required) {
if (transactions[id].approvals > required) {
transactions[id].to.send(transactions[id].value);
notify_message();
}
}
throw;
}
function notify_message() {
notify.send(1);
}
}
Compiler settingsShow
{
"optimizer": {
"runs": 200,
"enabled": false
}
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.