Bytecode verified via sibling
This contract shares identical runtime bytecode with Descriptor (0x9fb0b5c0...) which has been verified through compiler archaeology.
A two hundred byte contract that returns a fixed array, from a Solidity teaching series
Historical Significance
A record of what Solidity could not yet do in September 2015, kept on chain by the author of one of the first public Solidity tutorials.
Context
Deployed in the Frontier era, when returning an array between contracts was an open question and people answered it by deploying.
Key Facts
Description
Descriptor does one thing: return a uint16[3] with the values 34, 76 and 48. It is the helper half of 47_array_passer.sol in solidity-baby-steps, Cyrus Adkisson's public series of worked Solidity examples, deployed to try whether one contract could receive a fixed size array back from another. The file's own banner says the experiment did not work. Deployed on 30 September 2015 by 0xcf684dfb8304729355b58315e8019b1aa2ad1bac, the account of Cyrus Adkisson, and recovered from that repository.
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)
// Submitted by EthereumHistory (ethereumhistory.com)
/***
* _ _ ___ ______ _ _ _____ _ _ _____
* | | | |/ _ \ | ___ \ \ | |_ _| \ | | __ \
* | | | / /_\ \| |_/ / \| | | | | \| | | \/
* | |/\| | _ || /| . ` | | | | . ` | | __
* \ /\ / | | || |\ \| |\ |_| |_| |\ | |_\ \
* \/ \/\_| |_/\_| \_\_| \_/\___/\_| \_/\____/
*
* This contract DOES NOT WORK
*/
contract Descriptor {
function getDescription() constant returns (uint16[3]){
uint16[3] somevar;
somevar[0] = 34;
somevar[1] = 76;
somevar[2] = 48;
return somevar;
}
}
contract ArrayPasser {
address creator;
/***
* 1. Declare a 3x3 map of Tiles
***/
uint8 mapsize = 3;
Tile[3][3] tiles;
struct Tile
{
/***
* 2. A tile is comprised of the owner, elevation and a pointer to a
* contract that explains what the tile looks like
****/
address owner;
uint8 elevation;
Descriptor descriptor;
}
/***
* 3. Upon construction, initialize the internal map elevations.
* The Descriptors start uninitialized.
***/
function ArrayPasser(uint8[9] incmap)
{
creator = msg.sender;
uint8 counter = 0;
for(uint8 y = 0; y < mapsize; y++)
{
for(uint8 x = 0; x < mapsize; x++)
{
tiles[x][y].elevation = incmap[counter];
counter = counter + 1;
}
}
}
/***
* 4. After contract mined, check the map elevations
***/
function getElevations() constant returns (uint8[3][3])
{
uint8[3][3] memory elevations;
for(uint8 y = 0; y < mapsize; y++)
{
for(uint8 x = 0; x < mapsize; x++)
{
elevations[x][y] = tiles[x][y].elevation;
}
}
return elevations;
}
/***
* 5. Load descriptors
***/
function loadDescriptors()
{
Descriptor d = new Descriptor();
for(uint8 y = 0; y < mapsize; y++)
{
for(uint8 x = 0; x < mapsize; x++)
{
tiles[x][y].descriptor = d;
}
}
}
/***
* 6. get Description of a tile at x,y
***/
uint16[3] anothervar;
function getTileDescription(uint8 x, uint8 y)
{
Descriptor desc = tiles[x][y].descriptor; // get the descriptor for this tile
anothervar = desc.getDescription(); // get the description from the descriptor
// TODO validate the description
// TODO convert it to JSON
// save it to a variable for constant retrieval elsewhere
return;
}
/***
* 7. retrieve it
***/
function retrieveAnothervar() constant returns (uint16[3])
{
return anothervar;
}
/**********
Standard kill() function to recover funds
**********/
function kill()
{
if (msg.sender == creator)
{
suicide(creator); // kills this contract and sends remaining funds back to creator
}
}
}External Links
Related contracts
GetBalance
Same deployerCyrus Adkisson experimental getter (Sep 2015) exposing the ether balance of a hardcoded address via getMyBalance(). Verified byte-for-byte with soljson v0.1.1.
0x759ad4...239a87August 26, 2015Contract 0xddcd64...a08e7b
Same deployerThe greeter tutorial contract: it stores a greeting set at deployment and can be shut down by its owner.
0xddcd64...a08e7bAugust 26, 2015basicInfoGetter
Same deployerA tour of the EVM globals, carrying the constructor of the file it was copied from
0xad826c...d33547August 31, 2015Contract 0x3ea0db...b922e0
Same deployerThe basic info getter from the solidity-baby-steps tutorials, a read only window onto the block and message globals.
0x3ea0db...b922e0August 31, 2015Contract 0xba575c...78733f
Same deployerA contract built to probe what the msg globals actually return, endowed with 5 ETH, deployed 1 September 2015.
0xba575c...78733fSeptember 1, 2015Contract 0x8b180c...c084df
Same deployerA third deployment of the msgExaminer that records its own creation message
0x8b180c...c084dfSeptember 1, 2015