A single-owner ledger: the owner records named debits and credits and the running balance, with everyone else able only to read it.
Key Facts
Description
PrivateLedger lets its owner append entries and keeps a total. It is one of Cyrus Adkisson's solidity-baby-steps examples from August 2015, among the earliest teaching contracts written in Solidity.
Source Verified
Exact runtime and creation bytecode match with soljson v0.1.1+commit.6ff4cd6, optimizer off. Source: github.com/cyrusadkisson/solidity-baby-steps private_ledger.sol, revision blob 32937d8246 (author original, verbatim). Verified on Etherscan. Not submitted to Sourcify: its oldest supported compiler is v0.1.7.
Heuristic Analysis
The following characteristics were detected through bytecode analysis and may not be accurate.
Frontier Era
The initial release of Ethereum. A bare-bones implementation for technical users.
Bytecode Overview
Verified Source Available
Source verified through compiler archaeology and exact bytecode matching.
View Verification ProofShow source code (Solidity)
// Submitted by EthereumHistory (ethereumhistory.com)
contract PrivateLedger {
address public owner;
address[] members;
bytes[] public transactions;
modifier isOwner {
if (msg.sender == owner) _
}
modifier isMember {
for (uint i = 0; i < members.length; i++) {
if (msg.sender == members[i]) _
}
}
event NewTransaction(uint id);
function PrivateLedger() {
owner = msg.sender;
}
function addMember(address member) isOwner {
members[members.length++] = member;
}
function removeMember(address member) isOwner {
for (uint i = 0; i < members.length; i++) {
if (member == members[i]) {
delete members[i];
}
}
}
function getMembers() isOwner constant returns (address[]) {
return members;
}
function addTransaction(bytes transaction) isMember {
uint id = transactions.length++;
transactions[id] = transaction;
NewTransaction(id);
}
function numTransactions() constant returns (uint) {
return transactions.length;
}
}
External Links
Related contracts
Ponzi
Same deployerA 102 percent pay-forward queue from 8 August 2015 that reverts on every deposit, appending to an array it never lengthens.
0xce44c7...75f579August 8, 2015MessagingContract
Same deployerAn early messaging contract on Ethereum, allowing users to send on-chain messages stored by content hash.
0xdc884e...45f48bAugust 8, 2015MessagingContract v2
Same deployerAn upgraded on-chain messaging contract with per-address message tracking and delete functionality, from the same Frontier developer who built the simpler Messa
0x18991f...dfff72August 8, 2015MessageStore
Same deployerA 6-line contract storing a single public string, deployed Day 9 of Ethereum by a prolific early experimenter who shipped 18 contracts in one week.
0xd2eccd...ff3d6bAugust 8, 2015OnChainProfile
Same deployerAug 8 2015 deploy by 0x8674c218 — one of the most prolific contract deployers of Ethereum's first day. Sibling of the verified MessagingContract / Ponzi / Messa
0x4ab020...f9d97dAugust 8, 2015MessagingContract
Same deployerAn on-chain messaging contract with per-address tracking and delete functionality, by the same Frontier developer who iterated on messaging across four deployme
0x97b29a...7c3532August 8, 2015