Back to Home

Pong

program
0x3a0cc907753d...61b8f4e29fe5
FrontierContract #1,481Exact Bytecode MatchEdit this contract
Deployed September 22, 2015 (10 years ago)Block 274,266

A Pong contract variant that receives ETH via send(), testing value transfer between contracts.

Key Facts

Deployer
Cyrus Adkisson(0xcf684D...AD1Bac)
Deployment Block
274,266
Deployment Date
Sep 22, 2015, 06:22 PM
Code Size
889.0 B
Gas at Deploy
228,907
Transactions by Year
20151

Description

A variant of the Pong tutorial contract from Cyrus Adkisson's solidity-baby-steps series (contract #46) that tests receiving ETH via the send() function. Unlike the basic Pong which only stores an int8 value, this version includes payable functionality to test inter-contract value transfers.

Deployed on September 22, 2015. Part of the Ping/Pong tutorial series exploring different patterns for contract-to-contract communication.

Source Verified

SolidityExact bytecode match(889 bytes)
Compiler: soljson

Exact creation bytecode match. Author Cyrus Adkisson published source at https://github.com/cyrusadkisson/solidity-baby-steps/blob/master/contracts/46_pong_via_send.sol. Batch-matched against 357 deploy TXs from deployer 0xcf684dfb8304729355b58315e8019b1aa2ad1bac.

Heuristic Analysis

The following characteristics were detected through bytecode analysis and may not be accurate.

Detected Type: program

Frontier Era

The initial release of Ethereum. A bare-bones implementation for technical users.

Block span: 01,149,999
July 30, 2015March 14, 2016

Bytecode Overview

Opcodes889
Unique Opcodes79
Jump Instructions31
Storage Operations18

Verified Source Available

Source verified through compiler archaeology and exact bytecode matching.

View Verification Proof
Show source code (Solidity)
/***
 *     _    _  ___  ______ _   _ _____ _   _ _____ 
 *    | |  | |/ _ \ | ___ \ \ | |_   _| \ | |  __ \
 *    | |  | / /_\ \| |_/ /  \| | | | |  \| | |  \/
 *    | |/\| |  _  ||    /| . ` | | | | . ` | | __ 
 *    \  /\  / | | || |\ \| |\  |_| |_| |\  | |_\ \
 *     \/  \/\_| |_/\_| \_\_| \_/\___/\_| \_/\____/
 *                                                 
 *   This contract DOES NOT WORK at the moment. 9/22/2015                                     
 */

// 1. Deploy Pong .
// 2. Deploy Ping, giving it the address of Pong.
// 3. Call Ping.touchPong() using a <pongaddress>.send()
// 4. ... which does... something ...

contract Pong {

    address creator;
    int8 constructortouches = 0;
    int8 namelesstouches = 0;
    
	/*********
 	 Step 1: Deploy Pong
 	 *********/
    function Pong() 
    {
        creator = msg.sender; 
        constructortouches = constructortouches + 1;
    }
	
	/*********
	 Step 4. Accept generic transaction (send(), hopefully)
	 *********/	
	function () 
	{
    	namelesstouches = namelesstouches + 1;
    	return;
    }
    
// ----------------------------------------------------------------------------------------------------------------------------------------
    	
	function getBalance() public constant returns (uint)
	{
		return this.balance;
	}
	
    /*********
	 touches getters
	 *********/
	function getConstructorTouches() public constant returns (int8)
    {
    	return constructortouches;
    } 
	
	function getNamelessTouches() public constant returns (int8)
	{
		return namelesstouches;
	}
	
	/****
	 For double-checking this contract's address
	 ****/
	function getAddress() constant returns (address)
	{
		return this;
	}
	
    /**********
     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