An earlier draft of the solidity-baby-steps Pong, before the value moved into the constructor.
Historical Significance
The ethereum.org token tutorial is where most people who deployed a token in this period started, and this is its opening form: a balance mapping, a guarded subtraction and the metadata a wallet needs to show a name. It has no allowance, so nothing can spend on a holder's behalf and no exchange or escrow can be given a limit. That gap is exactly what ERC-20 was written to close, and copies like this one are the before picture.
Context
Deployed 4 September 2015, during the Frontier era.
Key Facts
Description
An earlier revision of example 45 of the solidity-baby-steps tutorial series, deployed by the author the day before the version that is also onchain at 0x34fe101a03b6889ce2091e36b22783139ca79ad8. Here the constructor takes no argument and only records the creator, and the signed byte the example passes back and forth is set afterwards through setPongval. The later revision moves that value into the constructor and adds the flag that lets a caller tell whether the transactional getter ran. Both are the Pong half of a pair written to test whether one contract can read a non-constant return value from another.
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)
// Supposedly, contracts can get non-constant return values from other contracts. (Whereas you can't from web3/geth.)
// These two contracts are meant to test this. Like so:
// 1. Deploy Pong.
// 2. Deploy Ping, giving it the address of Pong.
// 3. Set a variable in Pong.
// 4. Retrieve the variable in Pong *through Ping*, using a sendTransaction from geth -> Ping -> Pong.
// 5. If successful Ping.getPongval() should return the value from step 3.
contract Pong {
address creator;
int8 pongval;
/*********
Step 1: Deploy Pong
*********/
function Pong()
{
creator = msg.sender;
}
/*********
Step 3. Set pongval.
*********/
function setPongval(int8 _pongval)
{
pongval = _pongval;
}
/*********
Step 4b. Transactionally return pongval.
*********/
function getPongval() returns (int8)
{
return pongval;
}
function getPongvalConstant() constant returns (int8)
{
return pongval;
}
/**********
Standard kill() function to recover funds
**********/
function kill()
{
if (msg.sender == creator)
{
suicide(creator); // kills this contract and sends remaining funds back to creator
}
}
}
/*
var pongContract = web3.eth.contract([{
"constant": false,
"inputs": [{
"name": "_pongval",
"type": "int8"
}],
"name": "setPongval",
"outputs": [],
"type": "function"
}, {
"constant": false,
"inputs": [],
"name": "kill",
"outputs": [],
"type": "function"
}, {
"constant": false,
"inputs": [],
"name": "getPongval",
"outputs": [{
"name": "",
"type": "int8"
}],
"type": "function"
}, {
"inputs": [],
"type": "constructor"
}]);
var pong = pongContract.new({
from: web3.eth.accounts[0],
data: '60606040525b33600060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055505b610184806100406000396000f30060606040526000357c01000000000000000000000000000000000000000000000000000000009004806323a1c2711461004f57806341c0e1b5146100625780638bc889e71461006f5761004d565b005b610060600480359060200150610093565b005b61006d6004506100f0565b005b61007a6004506100d4565b604051808260000b815260200191505060405180910390f35b80600060146101000a81548160ff02191690837f01000000000000000000000000000000000000000000000000000000000000009081020402179055505b50565b6000600060149054906101000a900460000b90506100ed565b90565b600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561018157600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16ff5b5b56',
gas: 1000000
}, function(e, contract) {
if (typeof contract.address != 'undefined') {
console.log(e, contract);
console.log('Contract mined! address: ' + contract.address + ' transactionHash: ' + contract.transactionHash);
}
});
0x83e61a143f7b9e281948ce53f4c46c7124ec9dab
*/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