Test contract for Piper Merriam's Ethereum Alarm Clock, deployed December 2015. Verifies the scheduler can execute set/register/do calls correctly.
Historical Significance
Predates the first tagged release of the Ethereum Alarm Clock and is one of the earliest non-trivial test contracts on Ethereum, period. The Alarm Clock itself was the first general-purpose scheduled-transaction service on Ethereum, years before Chainlink Keepers, Gelato, or OpenZeppelin Defender. TestCallExecution shows how on-chain TDD was practiced in the Frontier era: deploy a test target, schedule calls against it, then read back wasSuccessful from off-chain to confirm the scheduler delivered the call on the target block.
Context
Deployed 23 December 2015, four months after Ethereum's Frontier launch (30 July 2015). Solidity was at v0.1.6, the inline assembly keyword didn't exist yet, and throw was the only error mechanism. Piper's pipermerriam/ethereum-alarm-clock repo would not see its v0.1.0 tag until 11 January 2016. Compiler: Solidity 0.1.6, commit d6e77ce0.
Key Facts
Description
TestCallExecution is one of Piper Merriam's earliest on-chain test fixtures for the Ethereum Alarm Clock, deployed 23 December 2015 at block 737,976, about three weeks before the first tagged release (v0.1.0) of the project. The contract is a deliberately-passive call sink: every method writes a flag or value into storage so an off-chain or on-chain caller can verify that a scheduled call landed correctly.
The public surface is built from three groups of methods. The set* group (setBool, setUInt, setInt, setAddress, setBytes32, setBytes, setMany) writes the supplied argument into a per-type storage slot exposed via the auto-generated getters v_bool, v_uint, etc. The register* group (registerBool, registerUInt, registerInt, registerBytes32, registerBytes, registerAddress, registerMany, registerData) makes a low-level to.call(bytes4(sha3('registerData()')), ...) to push the value to an external DataRegistry, then flips wasSuccessful to 1 on success or 2 on failure. The do* group exercises the alarm-clock pathways themselves: doExecution(address to) calls to.execute() and records success in wasSuccessful; doLoops(uint iterations) runs a tight loop of address(this).send(1) to stress the scheduler under nested calls. reset() zeroes wasSuccessful.
Two additional helpers, scheduleSetBool(address, uint, bool) and scheduleSetUInt(address, uint, uint, uint), encode a call to setBool or setUInt and submit it to a Scheduler at the supplied address with the supplied target block. These two selectors appear in the deployed bytecode but are not present in any tagged release of Testers.sol, suggesting they lived in an untagged Dec 2015 commit that was later refactored.
The contract holds 4.896 ETH as of May 2026, accumulated from years of doLoops runs feeding 1 wei back to the contract itself with no withdrawal path. The deployer 0xd3CdA913deB6f67967B99D67aCDFa1712C293601 is Piper Merriam, who later became an Ethereum Foundation core developer and creator of py-evm, py-libp2p, and most of the python-ethereum tooling stack.
Source Verified
Identified by exact selector match against TestCallExecution ABI in pipermerriam/ethereum-alarm-canary build artifacts (canary/versions/v0.6/build/contracts.json). The published Testers.sol in tagged releases covers the bulk of the contract; two helpers (scheduleSetBool, scheduleSetUInt) appear in the on-chain bytecode but in no tagged release. NOT a byte-for-byte crack: the closest reconstruction (Testers_reconstructed.sol with v0.1.6 optimizer ON) produces 3,932 bytes vs the on-chain 4,005 bytes (73 bytes short). See proofs/testcallexecution-0x685308c3/CRACK_ATTEMPT.md for diff analysis.
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 code published by the original contract author.
View Verification ProofShow source code (Solidity)
contract TestCallExecution {
uint8 public wasSuccessful;
function doExecution(address to) {
bool result = to.call(bytes4(sha3("execute()")));
if (result) {
wasSuccessful = 1;
}
else {
wasSuccessful = 2;
}
}
function doLoops(uint iterations) {
for (uint i = 0; i < iterations; i++) {
address(this).send(1);
}
}
bool public v_bool;
function setBool() public {
v_bool = true;
}
uint public v_uint;
function setUInt(uint v) public {
v_uint = v;
}
int public v_int;
function setInt(int v) public {
v_int = v;
}
address public v_address;
function setAddress(address v) public {
v_address = v;
}
bytes32 public v_bytes32;
function setBytes32(bytes32 v) public {
v_bytes32 = v;
}
bytes public v_bytes;
function setBytes(bytes v) public {
Bytes(v);
Bytes(msg.data);
v_bytes = v;
}
uint public vm_a;
int public vm_b;
uint public vm_c;
bytes20 public vm_d;
address public vm_e;
bytes public vm_f;
event Bytes(bytes f);
function setMany(uint a, int b, uint c, bytes20 d, address e, bytes f) public {
Bytes(f);
Bytes(msg.data);
vm_a = a;
vm_b = b;
vm_c = c;
vm_d = d;
vm_e = e;
vm_f = f;
}
// ---- register family from TestDataRegistry merged in ----
function reset() public {
wasSuccessful = 0;
}
function registerUInt(address to, uint v) public {
bool result = to.call(bytes4(sha3("registerData()")), v);
if (result) { wasSuccessful = 1; } else { wasSuccessful = 2; }
}
function registerInt(address to, int v) public {
bool result = to.call(bytes4(sha3("registerData()")), v);
if (result) { wasSuccessful = 1; } else { wasSuccessful = 2; }
}
function registerBool(address to, bool v) public {
bool result = to.call(bytes4(sha3("registerData()")), v);
if (result) { wasSuccessful = 1; } else { wasSuccessful = 2; }
}
function registerBytes32(address to, bytes32 v) public {
bool result = to.call(bytes4(sha3("registerData()")), v);
if (result) { wasSuccessful = 1; } else { wasSuccessful = 2; }
}
function registerBytes(address to, bytes v) public {
bool result = to.call(bytes4(sha3("registerData()")), v.length, v);
if (result) { wasSuccessful = 1; } else { wasSuccessful = 2; }
}
function registerAddress(address to, address v) public {
bool result = to.call(bytes4(sha3("registerData()")), v);
if (result) { wasSuccessful = 1; } else { wasSuccessful = 2; }
}
function registerMany(address to, uint a, int b, uint c, bytes20 d, address e, bytes f) public {
bool result = to.call(bytes4(sha3("registerData()")), a, b, c, d, e, f.length, f);
if (result) { wasSuccessful = 1; } else { wasSuccessful = 2; }
}
function registerData(address to, int arg1, bytes32 arg2, address arg3) public {
bool result = to.call(0xb0f07e44, arg1, arg2, arg3);
if (result) { wasSuccessful = 1; } else { wasSuccessful = 2; }
}
// ---- schedule functions (forward to a scheduler) ----
function scheduleSetBool(address to, uint blockNum, bool value) public {
if (to.call.value(msg.value)(0x01991313, this, bytes4(sha3("setBool()")), blockNum) == false) throw;
to.call(bytes4(sha3("registerData()")), value);
}
function scheduleSetUInt(address to, uint blockNum, uint value) public {
if (to.call.value(msg.value)(0x01991313, this, bytes4(sha3("setUInt(uint256)")), blockNum) == false) throw;
to.call(bytes4(sha3("registerData()")), value);
}
}