Frontier-era invoice contract from February 2016 that logs incoming payments and forwards them to a fund manager.
Historical Significance
It is a small, complete record of how an individual developer built payment-handling contracts on Frontier: a working invoice pattern (log, forward, refund via self-destruct) and the rapid version-by-version iteration visible on chain. Its source was reconstructed and reproduced byte for byte.
Context
February 2016 was the final month of the Frontier era, shortly before the Homestead hard fork in March 2016. Solidity was at v0.2.x, there was no payable modifier, and contract wallets and payment forwarders were written by hand by individual developers experimenting on mainnet.
Key Facts
Description
Invoice is a small payment-receiving contract deployed on February 16, 2016, 28 minutes after the otherwise identical 0x068500c7 from the same deployer; the only change is that refund is declared last. The deployer becomes the owner. Every payment triggers the fallback function, which logs an IncomingTx event (block number, sender, value, timestamp) and, once the owner has set a fund manager, forwards the whole balance to it. If no fund manager is set the payment is rejected.
The owner can set the fund manager, transfer ownership, and call refund(investor), which logs a RefundInvoice event and self-destructs the contract to the given address. A getFundManager(address) function, despite its name, has no owner check and overwrites the stored fund manager with its argument, which would let anyone redirect forwarded funds.
The deployer, 0x39afc3556daa4d11a0a8f16ec1a490cd84aa6945, created 107 contracts between January 28 and March 18, 2016. About 40 of them emit the same IncomingTx event, which shows an invoice and payment-forwarding system being rewritten many times over roughly five weeks, sometimes several versions per hour.
Source Verified
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)
contract Invoice {
address owner;
bool fundManagerSet;
address fundManager;
event IncomingTx(uint indexed blockNumber, address sender, uint value, uint timestamp);
event RefundInvoice(address invoiceAddress, uint timestamp);
function Invoice() {
owner = msg.sender;
fundManagerSet = false;
}
function() {
IncomingTx(block.number, msg.sender, msg.value, now);
if (fundManagerSet == true) {
forwardFunds();
} else {
throw;
}
}
function setFundManager(address _fundManager) {
if (msg.sender == owner) {
address fm = _fundManager;
fundManager = fm;
fundManagerSet = true;
} else {
throw;
}
}
function getFundManager(address _fundManager) returns (address) {
address fm = _fundManager;
fundManager = fm;
return fm;
}
function changeOwner(address _newOwner) {
if (msg.sender == owner) {
owner = _newOwner;
} else {
throw;
}
}
function forwardFunds() {
if (fundManagerSet == true) {
fundManager.send(this.balance);
} else {
throw;
}
}
function refund(address investor) {
if (msg.sender == owner) {
RefundInvoice(this, now);
suicide(investor);
} else {
throw;
}
}
}External Links
Related contracts
Invoice
Same deployerFrontier-era invoice contract from February 2016 that logs incoming payments and forwards them to a fund manager.
0x068500...d07d41February 16, 2016Invoice
Same deployerFrontier-era invoice contract from February 2016 that logs payments and forwards them to a fund manager kept in a struct mapping.
0xb16acc...5cee2dFebruary 16, 2016Contract 0xc0beee...dea23d
Same deployerAn ethereum.org tutorial token deployed with no name and no symbol, whose owner can mint further units and freeze accounts, opening supply 1,001 units.
0xc0beee...dea23dMarch 6, 2016owned
Same deployerThe bare owned base contract, deployed alone at 326 bytes on 12 March 2016.
0x2800e7...e5ed72March 12, 2016HonestDice
Same eraOne of the earliest provably-fair dice gambling contracts on Ethereum, deployed August 12, 2015 (day 13 of Frontier). Commit-reveal dice game with 2% house edge
0xc4c51d...1ae9fcAugust 12, 2015WalletProxy
Same era45-byte factory-generated wallet proxy forwarding via CALLCODE to a shared EF multi-sig Wallet (0x4efc6389). Variant without the success-check. Deployed by Fabian Vogelsteller.
0xf6ed6e...f510cfAugust 20, 2015