Skip to content

cartoonitunes/coin-stub-verification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Coin (stub) — Bytecode Verification

Byte-for-byte verification of rank 40, the earliest known Coin stub contract on Ethereum mainnet.

Contract

Field Value
Address 0x4fb5acbe16ffdda225cb14c64aa84c7e253b08ae
Block 54,126
Deployer 0x4b0c6f0297cee4b551b6fab3277067b64b238990
Rank #40 (earliest deployed with real code and this bytecode)

Source

contract Coin {
    mapping (address => uint) public coinBalanceOf;
    function sendCoin(address receiver, uint amount) returns(uint sufficient) {}
}

The sendCoin body is empty — sufficient defaults to 0 and is returned implicitly. This is a stub/template deployment of the ethereum.org Coin tutorial, with the transfer logic omitted.

Compiler

  • Compiler: soljson v0.1.1+commit.6ff4cd6 (JavaScript/emscripten)
  • Optimizer: OFF
  • Function: compileJSON(source, 0)

Reproduce

node -e "
var s=require('solc-emscripten-asmjs-v0.1.1+commit.6ff4cd6.js');
var c=s.cwrap('compileJSON','string',['string','number']);
var r=JSON.parse(c(require('fs').readFileSync('Coin.sol','utf8'),0));
var rt=r.contracts.Coin.bytecode;
// extract runtime (after 6000f3 boundary)
var idx=rt.indexOf('6000f3');
var runtime=rt.slice(idx+6);
if(runtime.startsWith('00')) runtime=runtime.slice(2);
console.log(runtime);
"

Verification

Runtime (181 bytes) matches both eth_getCode and the creation TX input extraction exactly.

Part of Awesome Ethereum Proofs and Ethereum History.

About

Bytecode verification for earliest Coin stub contract (rank 40, Frontier 2015)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors