Sponsored Link:   Buy your 1st Ethereum in 5 minutes. Trusted by more than 100k buyers.
Contract Overview
ETH Balance: 0 Ether
ETH USD Value: $0
No Of Transactions: 72 txns
Misc
Address Watch Add To Watch List
Contract Creator 0xea03ee7110fafb324d4a931979ef4578bffb6a00at txn 0x0abe8759a01da79b23cd0ac180541eb917ebb47210e8e872a68a18977793afbd
Token Tracker
  Latest 25 txns from a total Of 72 transactions View All

TxHash Age From To Value [TxFee]
0x55aa3d7cb1da05c29cd37ae5487c70607b0e93cc51f5c632db8883f9cc07c1e932 days 2 hrs ago0x945d6fa51d11edb34731136c44b7afdcbe83f270  IN   0x553b4546d26f383d4f4a056b7f50dadff07fb2520 Ether0.001172346
0x9a5a4fb9cb306224e644862fb2ff9062a5122ee191bf28169ef2555a40c79f5332 days 18 hrs ago0x5524357074d68f41087f2de8e63f6b867e1ea40d  IN   0x553b4546d26f383d4f4a056b7f50dadff07fb2520 Ether0.002046849
0x935b9c6465e34b27c342753f783f0b7a39fe8ecad2756cb6b0149ac075abccea45 days 2 hrs ago0x13e29140e988d80fc53f00e7f9ebcc7eb0abecdf  IN   0x553b4546d26f383d4f4a056b7f50dadff07fb2520 Ether0.00007381
0xd55e0a7def2fac81c07c65b14d0605eeff5b13a2f4056bac1482db481a43054345 days 2 hrs ago0x866b158c050587a281e82f815135f9191b92048d  IN   0x553b4546d26f383d4f4a056b7f50dadff07fb2520 Ether0.00007381
0x2ee678103ff78fd2f8d2b5c1b668ede919ef67530e8c21afdcbbd2f35d54571b45 days 2 hrs ago0xf26bfac28cd1311074dcf3f1bb47eb2d65ef5bc2  IN   0x553b4546d26f383d4f4a056b7f50dadff07fb2520 Ether0.000097469
0xd2a23e7201c568baad154172ff312c2ce0fe7cfe8bc22a518a71afc60ed750d647 days 3 hrs ago0xf26bfac28cd1311074dcf3f1bb47eb2d65ef5bc2  IN   0x553b4546d26f383d4f4a056b7f50dadff07fb2520 Ether0.000066392
0xa82a8dc48d90626f3c2dc90e3413d52ee5b30d1b1c18fa80b45336421a2f350a47 days 3 hrs ago0x13e29140e988d80fc53f00e7f9ebcc7eb0abecdf  IN   0x553b4546d26f383d4f4a056b7f50dadff07fb2520 Ether0.000066833
0x072089d60b5850c9ad0a4f916c7b81af993af52f718354302fed54ba1673f95347 days 3 hrs ago0x866b158c050587a281e82f815135f9191b92048d  IN   0x553b4546d26f383d4f4a056b7f50dadff07fb2520 Ether0.000066833
0x689fa3fd782a56437051ef1f865af5a01c814752a852c1baefef6dbd12acf1cd47 days 3 hrs ago0xf26bfac28cd1311074dcf3f1bb47eb2d65ef5bc2  IN   0x553b4546d26f383d4f4a056b7f50dadff07fb2520 Ether0.000133666
0x9f0b5021df88d0271b9cf17c23e2fd608b53cc924b68e823af543c4c6ab2238e50 days 10 hrs ago0x5a39136b583981c3d114b1d80af263b1c985c556  IN   0x553b4546d26f383d4f4a056b7f50dadff07fb2520 Ether0.00171507
0x8a75a925ad96a90f18bed1070aa4b751a929712b2e74d4092943270e41bb4bb152 days 3 hrs ago0x945d6fa51d11edb34731136c44b7afdcbe83f270  IN   0x553b4546d26f383d4f4a056b7f50dadff07fb2520 Ether0.001380351
0x2182e984b57e0e915e4b797b46ce4d94f727534188b9695d261c5e8d2d987e1253 days 1 hr ago0x5524357074d68f41087f2de8e63f6b867e1ea40d  IN   0x553b4546d26f383d4f4a056b7f50dadff07fb2520 Ether0.001403493
0x1c7dad3635641098d09e159b29d02286185209ced2856426c401b85d930906ec53 days 1 hr ago0x5524357074d68f41087f2de8e63f6b867e1ea40d  IN   0x553b4546d26f383d4f4a056b7f50dadff07fb2520 Ether0.001402149
0x044e05fb7a526595bb7e68cda288e88d547f4205ee09604c349e29aeff4d3a5053 days 3 hrs ago0x945d6fa51d11edb34731136c44b7afdcbe83f270  IN   0x553b4546d26f383d4f4a056b7f50dadff07fb2520 Ether0.002315943
0xa6c0665cdf9ed463aca1b4f5b3205c50a7e550b02761e750fa32fb61573e8af253 days 4 hrs ago0xd29397cb66e491b7168cf32460ac1e13d5702305  IN   0x553b4546d26f383d4f4a056b7f50dadff07fb2520 Ether0.00444273
0x70e07b0b6119684770e1f215c0aaeefeb84ce4ea578efc836e70f5eba48368f253 days 4 hrs ago0xd29397cb66e491b7168cf32460ac1e13d5702305  IN   0x553b4546d26f383d4f4a056b7f50dadff07fb2520 Ether0.00148962
0x757491c6baa7651cf18babf6f6f2fed67f5236e0a52eab9543460b3b67efdfa753 days 5 hrs ago0x5524357074d68f41087f2de8e63f6b867e1ea40d  IN   0x553b4546d26f383d4f4a056b7f50dadff07fb2520 Ether0.001402149
0xd747de92037417d843650e5e519bcf106d172d95c399227accb5337c211937d653 days 5 hrs ago0x5524357074d68f41087f2de8e63f6b867e1ea40d  IN   0x553b4546d26f383d4f4a056b7f50dadff07fb2520 Ether0.001402149
0x45f21a39813b9a6762adeb4bd260ae6c97196e082844adf38819ac2beaa4308353 days 5 hrs ago0x8698327a7e55446f7558f03faaff08ab6bb45a76  IN   0x553b4546d26f383d4f4a056b7f50dadff07fb2520 Ether0.000539406
0x1c1e49bc56bc5b9016dc4e6c2215b27a3b028699879287f9a41080e98cc3d58953 days 5 hrs ago0x8698327a7e55446f7558f03faaff08ab6bb45a76  IN   0x553b4546d26f383d4f4a056b7f50dadff07fb2520 Ether0.001779732
0x31cdd6c74a5b42d33c92902c13f6a9e639dbad59847c7c768238ae175d40c67053 days 8 hrs ago0xf37ee9c98233ef762a5d1934a1099b34daf7928f  IN   0x553b4546d26f383d4f4a056b7f50dadff07fb2520 Ether0.131700345
0x8215d73cb0beef923696a584fb1e99e6d3e564ea8ff2b42c18a52320a3ed507d53 days 14 hrs ago0xa589fee9a293790b2ffa97ce168037d4534f4841  IN   0x553b4546d26f383d4f4a056b7f50dadff07fb2520 Ether0.000659274
0x20c39ed16b30c8d3eb4382e37d46028f5d58e3c4470c14ef99b1ae720706c71653 days 14 hrs ago0x8698327a7e55446f7558f03faaff08ab6bb45a76  IN   0x553b4546d26f383d4f4a056b7f50dadff07fb2520 Ether0.00109241
0x3e946c38d3d716472e0f0550291bb23836260ebd3670c835fab76a7842ecdfd253 days 15 hrs ago0xedee11f4ea2533831d4309df10bfb6bc47d066ba  IN   0x553b4546d26f383d4f4a056b7f50dadff07fb2520 Ether0.006210624
0x9245633f5c999606206c0383a9a65ecc868010e1be12434c042e0ab314f778a353 days 16 hrs ago0xc6fc6835ce16679c89567c0b33604d1e9a71bf99  IN   0x553b4546d26f383d4f4a056b7f50dadff07fb2520 Ether0.00057561
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
View All
ParentTxHash Block Age From To Value
Warning: The compiled contract might be susceptible to ZeroFunctionSelector (very low-severity) Solidity compiler bugs.

Contract Source Code Verified
Contract Name: BattleOfThermopylae
Compiler Version: v0.4.17+commit.bdeb9e52
Optimization Enabled: Yes
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts
/*******************************************************************************
*********************    BATTLE OF THERMOPYLAE v1.1  ***************************
********************************************************************************

Battle smart contract is a platform/ecosystem for gaming built on top of a
decentralized smart contract, allowing anyone to use a Warrior tokens: entities
which exists on the Ethereum Network, which can be traded or used to enter the
battle with other Warrior tokens holders, for profit or just for fun!

********************************************************************************
**************************           RULES           ***************************
********************************************************************************

- This first battle contract accepts Persians, Spartans (300 Tokens), Immortals
  and Athenians as warriors.
- Every warrior token has a proper value in **Battle Point (BP)** that represent
  his strength on the battle contract.
- Persians and Immortals represent the Persian faction, Spartans and Athenians
  the Greek one.
- During the first phase players send tokens to the battle contract
  (NOTE: before calling the proper contract's function that assigning warriors
  to the battlefiled, players NEED TO CALL APPROVE on their token contract to
  allow Battle contract to move their tokens.
- Once sent, troops can't be retired form the battlefield
- The battle will last for several days
- When the battle period is over, following results can happpen:
    -- When the battle ends in a draw:
        (*) 10% of main troops of both sides lie on the ground
        (*) 90% of them can be retrieved by each former owner
        (*) No slaves are assigned
    -- When the battle ends with a winning factions:
        (*) 10% of main troops of both sides lie on the ground
        (*) 90% of them can be retrieved by each former owner
        (*) Surviving warriors of the loosing faction are assigned as slaves
            to winners
        (*) Slaves are computed based on the BP contributed by each sender
- Persians and Spartans are main troops.
- Immortals and Athenians are support troops: there will be no casualties in
  their row, and they will be retrieved without losses by original senders.
- Only Persians and Spartans can be slaves. Immortals and Athenians WILL NOT
  be sent back as slaves to winners.

********************************************************************************
**************************      TOKEN ADDRESSES      ***************************
********************************************************************************

        Persians    (PRS)   0x163733bcc28dbf26B41a8CfA83e369b5B3af741b
        Immortals   (IMT)   0x22E5F62D0FA19974749faa194e3d3eF6d89c08d7
        Spartans    (300)   0xaEc98A708810414878c3BCDF46Aad31dEd4a4557
        Athenians   (ATH)   0x17052d51E954592C1046320c2371AbaB6C73Ef10
        Battles     (BTL)   Set after the deployment of this contract

*******************************************************************************/
pragma solidity ^0.4.15;

contract TokenEIP20 {

    function balanceOf(address _owner) constant returns (uint256 balance);
    function transfer(address _to, uint256 _value) returns (bool success);
    function transferFrom(address _from, address _to, uint256 _value) returns (bool success);
    function approve(address _spender, uint256 _value) returns (bool success);
    function allowance(address _owner, address _spender) constant returns (uint256 remaining);

    event Transfer(address indexed _from, address indexed _to, uint256 _value);
    event Approval(address indexed _owner, address indexed _spender, uint256 _value);
    
}

contract Timed {
    
    uint256 public startTime;           //seconds since Unix epoch time
    uint256 public endTime;             //seconds since Unix epoch time
    uint256 public avarageBlockTime;    //seconds

    // This check is an helper function for ÐApp to check the effect of the NEXT transaction, NOT simply the current state of the contract
    function isInTime() constant returns (bool inTime) {
        return block.timestamp >= (startTime - avarageBlockTime) && !isTimeExpired();
    }

    // This check is an helper function for ÐApp to check the effect of the NEXT transacion, NOT simply the current state of the contract
    function isTimeExpired() constant returns (bool timeExpired) {
        return block.timestamp + avarageBlockTime >= endTime;
    }

    modifier onlyIfInTime {
        require(block.timestamp >= startTime && block.timestamp <= endTime); _;
    }

    modifier onlyIfTimePassed {
        require(block.timestamp > endTime); _;
    }

    function Timed(uint256 _startTime, uint256 life, uint8 _avarageBlockTime) {
        startTime = _startTime;
        endTime = _startTime + life;
        avarageBlockTime = _avarageBlockTime;
    }
}

library SafeMathLib {

    uint constant WAD = 10 ** 18;
    uint constant RAY = 10 ** 27;

    function add(uint x, uint y) internal returns (uint z) {
        require((z = x + y) >= x);
    }

    function sub(uint x, uint y) internal returns (uint z) {
        require((z = x - y) <= x);
    }

    function mul(uint x, uint y) internal returns (uint z) {
        require(y == 0 || (z = x * y) / y == x);
    }

    function per(uint x, uint y) internal constant returns (uint z) {
        return mul((x / 100), y);
    }

    function min(uint x, uint y) internal returns (uint z) {
        return x <= y ? x : y;
    }

    function max(uint x, uint y) internal returns (uint z) {
        return x >= y ? x : y;
    }

    function imin(int x, int y) internal returns (int z) {
        return x <= y ? x : y;
    }

    function imax(int x, int y) internal returns (int z) {
        return x >= y ? x : y;
    }

    function wmul(uint x, uint y) internal returns (uint z) {
        z = add(mul(x, y), WAD / 2) / WAD;
    }

    function rmul(uint x, uint y) internal returns (uint z) {
        z = add(mul(x, y), RAY / 2) / RAY;
    }

    function wdiv(uint x, uint y) internal returns (uint z) {
        z = add(mul(x, WAD), y / 2) / y;
    }

    function rdiv(uint x, uint y) internal returns (uint z) {
        z = add(mul(x, RAY), y / 2) / y;
    }

    function wper(uint x, uint y) internal constant returns (uint z) {
        return wmul(wdiv(x, 100), y);
    }

    // This famous algorithm is called "exponentiation by squaring"
    // and calculates x^n with x as fixed-point and n as regular unsigned.
    //
    // It's O(log n), instead of O(n) for naive repeated multiplication.
    //
    // These facts are why it works:
    //
    //  If n is even, then x^n = (x^2)^(n/2).
    //  If n is odd,  then x^n = x * x^(n-1),
    //   and applying the equation for even x gives
    //    x^n = x * (x^2)^((n-1) / 2).
    //
    //  Also, EVM division is flooring and
    //    floor[(n-1) / 2] = floor[n / 2].
    //
    function rpow(uint x, uint n) internal returns (uint z) {
        z = n % 2 != 0 ? x : RAY;

        for (n /= 2; n != 0; n /= 2) {
            x = rmul(x, x);

            if (n % 2 != 0) {
                z = rmul(z, x);
            }
        }
    }

}

contract Owned {

    address owner;
    
    function Owned() { owner = msg.sender; }

    modifier onlyOwner {
        require(msg.sender == owner);
        _;
    }
}

contract Upgradable is Owned {

    string  public VERSION;
    bool    public deprecated;
    string  public newVersion;
    address public newAddress;

    function Upgradable(string _version) {
        VERSION = _version;
    }

    function setDeprecated(string _newVersion, address _newAddress) onlyOwner returns (bool success) {
        require(!deprecated);
        deprecated = true;
        newVersion = _newVersion;
        newAddress = _newAddress;
        return true;
    }
}

contract BattleOfThermopylae is Timed, Upgradable {
    using SafeMathLib for uint;
  
    uint    public constant MAX_PERSIANS            = 300000 * 10**18;  // 300.000
    uint    public constant MAX_SPARTANS            = 300 * 10**18;     // 300
    uint    public constant MAX_IMMORTALS           = 100;              // 100
    uint    public constant MAX_ATHENIANS           = 100 * 10**18;     // 100

    uint8   public constant BP_PERSIAN              = 1;                // Each Persian worths 1 Battle Point
    uint8   public constant BP_IMMORTAL             = 100;              // Each Immortal worths 100 Battle Points
    uint16  public constant BP_SPARTAN              = 1000;             // Each Spartan worths 1000 Battle Points
    uint8   public constant BP_ATHENIAN             = 100;              // Each Athenians worths 100 Battle Points

    uint8   public constant BTL_PERSIAN              = 1;               // Each Persian worths 1 Battle Token
    uint16  public constant BTL_IMMORTAL             = 2000;            // Each Immortal worths 2000 Battle Tokens
    uint16  public constant BTL_SPARTAN              = 1000;            // Each Spartan worths 1000 Battle Tokens
    uint16  public constant BTL_ATHENIAN             = 2000;            // Each Athenians worths 2000 Battle Tokens

    uint    public constant WAD                     = 10**18;           // Shortcut for 1.000.000.000.000.000.000
    uint8   public constant BATTLE_POINT_DECIMALS   = 18;               // Battle points decimal positions
    uint8   public constant BATTLE_CASUALTIES       = 10;               // Percentage of Persian and Spartan casualties
    
    address public persians;                                            // Address of the Persian Tokens
    address public immortals;                                           // Address of the Immortal Tokens
    address public spartans;                                            // Address of the 300 Tokens
    address public athenians;                                           // Address of the Athenian Tokens
    address public battles;                                             // Address of the Battle Tokens
    address public battlesOwner;                                        // Owner of the Battle Token contract

    mapping (address => mapping (address => uint))   public  warriorsByPlayer;               // Troops currently allocated by each player
    mapping (address => uint)                        public  warriorsOnTheBattlefield;       // Total troops fighting in the battle

    event WarriorsAssignedToBattlefield (address indexed _from, address _faction, uint _battlePointsIncrementForecast);
    event WarriorsBackToHome            (address indexed _to, address _faction, uint _survivedWarriors);

    function BattleOfThermopylae(uint _startTime, uint _life, uint8 _avarageBlockTime, address _persians, address _immortals, address _spartans, address _athenians) Timed(_startTime, _life, _avarageBlockTime) Upgradable("1.0.0") {
        persians = _persians;
        immortals = _immortals;
        spartans = _spartans;
        athenians = _athenians;
    }

    function setBattleTokenAddress(address _battleTokenAddress, address _battleTokenOwner) onlyOwner {
        battles = _battleTokenAddress;
        battlesOwner = _battleTokenOwner;
    }

    function assignPersiansToBattle(uint _warriors) onlyIfInTime external returns (bool success) {
        assignWarriorsToBattle(msg.sender, persians, _warriors, MAX_PERSIANS);
        sendBattleTokens(msg.sender, _warriors.mul(BTL_PERSIAN));
        // Persians are divisible with 18 decimals and their value is 1 BP
        WarriorsAssignedToBattlefield(msg.sender, persians, _warriors / WAD);
        return true;
    }

    function assignImmortalsToBattle(uint _warriors) onlyIfInTime external returns (bool success) {
        assignWarriorsToBattle(msg.sender, immortals, _warriors, MAX_IMMORTALS);
        sendBattleTokens(msg.sender, _warriors.mul(WAD).mul(BTL_IMMORTAL));
        // Immortals are not divisible and their value is 100 BP
        WarriorsAssignedToBattlefield(msg.sender, immortals, _warriors.mul(BP_IMMORTAL));
        return true;
    }

    function assignSpartansToBattle(uint _warriors) onlyIfInTime external returns (bool success) {
        assignWarriorsToBattle(msg.sender, spartans, _warriors, MAX_SPARTANS);
        sendBattleTokens(msg.sender, _warriors.mul(BTL_SPARTAN));
        // Spartans are divisible with 18 decimals and their value is 1.000 BP
        WarriorsAssignedToBattlefield(msg.sender, spartans, (_warriors / WAD).mul(BP_SPARTAN));
        return true;
    }

    function assignAtheniansToBattle(uint _warriors) onlyIfInTime external returns (bool success) {
        assignWarriorsToBattle(msg.sender, athenians, _warriors, MAX_ATHENIANS);
        sendBattleTokens(msg.sender, _warriors.mul(BTL_ATHENIAN));
        // Athenians are divisible with 18 decimals and their value is 100 BP
        WarriorsAssignedToBattlefield(msg.sender, athenians, (_warriors / WAD).mul(BP_ATHENIAN));
        return true;
    }

    function redeemWarriors() onlyIfTimePassed external returns (bool success) {
        if (getPersiansBattlePoints() > getGreeksBattlePoints()) {
            // Persians won, compute slaves
            uint spartanSlaves = computeSlaves(msg.sender, spartans);
            if (spartanSlaves > 0) {
                // Send back Spartan slaves to winner
                sendWarriors(msg.sender, spartans, spartanSlaves);
            }
            // Send back Persians but casualties
            retrieveWarriors(msg.sender, persians, BATTLE_CASUALTIES);
        } else if (getPersiansBattlePoints() < getGreeksBattlePoints()) {
            //Greeks won, send back Persian slaves
            uint persianSlaves = computeSlaves(msg.sender, persians);
            if (persianSlaves > 0) {
                // Send back Persians slaves to winner
                sendWarriors(msg.sender, persians, persianSlaves);                
            }
            // Send back Spartans but casualties
            retrieveWarriors(msg.sender, spartans, BATTLE_CASUALTIES);
        } else {
            // It's a draw, send back Persians and Spartans but casualties
            retrieveWarriors(msg.sender, persians, BATTLE_CASUALTIES);
            retrieveWarriors(msg.sender, spartans, BATTLE_CASUALTIES);
        }
        // Send back Immortals untouched
        retrieveWarriors(msg.sender, immortals, 0);
        // Send back Athenians untouched
        retrieveWarriors(msg.sender, athenians, 0);
        return true;
    }

    function assignWarriorsToBattle(address _player, address _faction, uint _warriors, uint _maxWarriors) private {
        require(warriorsOnTheBattlefield[_faction].add(_warriors) <= _maxWarriors);
        require(TokenEIP20(_faction).transferFrom(_player, address(this), _warriors));
        warriorsByPlayer[_player][_faction] = warriorsByPlayer[_player][_faction].add(_warriors);
        warriorsOnTheBattlefield[_faction] = warriorsOnTheBattlefield[_faction].add(_warriors);
    }

    function retrieveWarriors(address _player, address _faction, uint8 _deadPercentage) private {
        if (warriorsByPlayer[_player][_faction] > 0) {
            uint _warriors = warriorsByPlayer[_player][_faction];
            if (_deadPercentage > 0) {
                _warriors = _warriors.sub(_warriors.wper(_deadPercentage));
            }
            warriorsByPlayer[_player][_faction] = 0;
            sendWarriors(_player, _faction, _warriors);
            WarriorsBackToHome(_player, _faction, _warriors);
        }
    }

    function sendWarriors(address _player, address _faction, uint _warriors) private {
        require(TokenEIP20(_faction).transfer(_player, _warriors));
    }

    function sendBattleTokens(address _player, uint _value) private {
        require(TokenEIP20(battles).transferFrom(battlesOwner, _player, _value));
    }

    function getPersiansOnTheBattlefield(address _player) constant returns (uint persiansOnTheBattlefield) {
        return warriorsByPlayer[_player][persians];
    }

    function getImmortalsOnTheBattlefield(address _player) constant returns (uint immortalsOnTheBattlefield) {
        return warriorsByPlayer[_player][immortals];
    }

    function getSpartansOnTheBattlefield(address _player) constant returns (uint spartansOnTheBattlefield) {
        return warriorsByPlayer[_player][spartans];
    }

    function getAtheniansOnTheBattlefield(address _player) constant returns (uint atheniansOnTheBattlefield) {
        return warriorsByPlayer[_player][athenians];
    }

    function getPersiansBattlePoints() constant returns (uint persiansBattlePoints) {
        return (warriorsOnTheBattlefield[persians].mul(BP_PERSIAN) + warriorsOnTheBattlefield[immortals].mul(WAD).mul(BP_IMMORTAL));
    }

    function getGreeksBattlePoints() constant returns (uint greeksBattlePoints) {
        return (warriorsOnTheBattlefield[spartans].mul(BP_SPARTAN) + warriorsOnTheBattlefield[athenians].mul(BP_ATHENIAN));
    }

    function getPersiansBattlePointsBy(address _player) constant returns (uint playerBattlePoints) {
        return (getPersiansOnTheBattlefield(_player).mul(BP_PERSIAN) + getImmortalsOnTheBattlefield(_player).mul(WAD).mul(BP_IMMORTAL));
    }

    function getGreeksBattlePointsBy(address _player) constant returns (uint playerBattlePoints) {
        return (getSpartansOnTheBattlefield(_player).mul(BP_SPARTAN) + getAtheniansOnTheBattlefield(_player).mul(BP_ATHENIAN));
    }

    function computeSlaves(address _player, address _loosingMainTroops) constant returns (uint slaves) {
        if (_loosingMainTroops == spartans) {
            return getPersiansBattlePointsBy(_player).wdiv(getPersiansBattlePoints()).wmul(getTotalSlaves(spartans));
        } else {
            return getGreeksBattlePointsBy(_player).wdiv(getGreeksBattlePoints()).wmul(getTotalSlaves(persians));
        }
    }

    function getTotalSlaves(address _faction) constant returns (uint slaves) {
        return warriorsOnTheBattlefield[_faction].sub(warriorsOnTheBattlefield[_faction].wper(BATTLE_CASUALTIES));
    }

    function isInProgress() constant returns (bool inProgress) {
        return !isTimeExpired();
    }

    function isEnded() constant returns (bool ended) {
        return isTimeExpired();
    }

    function isDraw() constant returns (bool draw) {
        return (getPersiansBattlePoints() == getGreeksBattlePoints());
    }

    function getTemporaryWinningFaction() constant returns (string temporaryWinningFaction) {
        if (isDraw()) {
            return "It's currently a draw, but the battle is still in progress!";
        }
        return getPersiansBattlePoints() > getGreeksBattlePoints() ?
            "Persians are winning, but the battle is still in progress!" : "Greeks are winning, but the battle is still in progress!";
    }

    function getWinningFaction() constant returns (string winningFaction) {
        if (isInProgress()) {
            return "The battle is still in progress";
        }
        if (isDraw()) {
            return "The battle ended in a draw!";
        }
        return getPersiansBattlePoints() > getGreeksBattlePoints() ? "Persians" : "Greeks";
    }

}

    Contract ABI  
[{"constant":true,"inputs":[],"name":"getGreeksBattlePoints","outputs":[{"name":"greeksBattlePoints","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MAX_ATHENIANS","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_warriors","type":"uint256"}],"name":"assignAtheniansToBattle","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"immortals","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"deprecated","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"BTL_IMMORTAL","outputs":[{"name":"","type":"uint16"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_player","type":"address"}],"name":"getImmortalsOnTheBattlefield","outputs":[{"name":"immortalsOnTheBattlefield","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"BTL_PERSIAN","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"newVersion","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"endTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_faction","type":"address"}],"name":"getTotalSlaves","outputs":[{"name":"slaves","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_warriors","type":"uint256"}],"name":"assignImmortalsToBattle","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"athenians","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"BATTLE_POINT_DECIMALS","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getTemporaryWinningFaction","outputs":[{"name":"temporaryWinningFaction","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"battles","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_player","type":"address"}],"name":"getPersiansOnTheBattlefield","outputs":[{"name":"persiansOnTheBattlefield","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isInTime","outputs":[{"name":"inTime","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_battleTokenAddress","type":"address"},{"name":"_battleTokenOwner","type":"address"}],"name":"setBattleTokenAddress","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"BTL_SPARTAN","outputs":[{"name":"","type":"uint16"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"WAD","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isInProgress","outputs":[{"name":"inProgress","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"redeemWarriors","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"startTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"BTL_ATHENIAN","outputs":[{"name":"","type":"uint16"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isTimeExpired","outputs":[{"name":"timeExpired","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"BP_ATHENIAN","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"avarageBlockTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"persians","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_player","type":"address"}],"name":"getAtheniansOnTheBattlefield","outputs":[{"name":"atheniansOnTheBattlefield","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"warriorsOnTheBattlefield","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_player","type":"address"}],"name":"getGreeksBattlePointsBy","outputs":[{"name":"playerBattlePoints","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_player","type":"address"},{"name":"_loosingMainTroops","type":"address"}],"name":"computeSlaves","outputs":[{"name":"slaves","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isEnded","outputs":[{"name":"ended","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"},{"name":"","type":"address"}],"name":"warriorsByPlayer","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"spartans","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getPersiansBattlePoints","outputs":[{"name":"persiansBattlePoints","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_player","type":"address"}],"name":"getPersiansBattlePointsBy","outputs":[{"name":"playerBattlePoints","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_player","type":"address"}],"name":"getSpartansOnTheBattlefield","outputs":[{"name":"spartansOnTheBattlefield","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"BATTLE_CASUALTIES","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MAX_PERSIANS","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_newVersion","type":"string"},{"name":"_newAddress","type":"address"}],"name":"setDeprecated","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"MAX_SPARTANS","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getWinningFaction","outputs":[{"name":"winningFaction","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"newAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"BP_PERSIAN","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MAX_IMMORTALS","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"battlesOwner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"BP_IMMORTAL","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"BP_SPARTAN","outputs":[{"name":"","type":"uint16"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_warriors","type":"uint256"}],"name":"assignSpartansToBattle","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"isDraw","outputs":[{"name":"draw","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_warriors","type":"uint256"}],"name":"assignPersiansToBattle","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"VERSION","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_startTime","type":"uint256"},{"name":"_life","type":"uint256"},{"name":"_avarageBlockTime","type":"uint8"},{"name":"_persians","type":"address"},{"name":"_immortals","type":"address"},{"name":"_spartans","type":"address"},{"name":"_athenians","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_from","type":"address"},{"indexed":false,"name":"_faction","type":"address"},{"indexed":false,"name":"_battlePointsIncrementForecast","type":"uint256"}],"name":"WarriorsAssignedToBattlefield","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_to","type":"address"},{"indexed":false,"name":"_faction","type":"address"},{"indexed":false,"name":"_survivedWarriors","type":"uint256"}],"name":"WarriorsBackToHome","type":"event"}]

  Contract Creation Code Switch To Opcodes View
606060405234156200001057600080fd5b60405160e08062001b70833981016040528080519190602001805191906020018051919060200180519190602001805191906020018051919060200180519150604090508051908101604052600581527f312e302e300000000000000000000000000000000000000000000000000000006020820152600088905586880160015560ff861660025560038054600160a060020a03191633600160a060020a03161790556004818051620000c892916020019062000122565b505060088054600160a060020a03958616600160a060020a0319918216179091556009805494861694821694909417909355600a805492851692841692909217909155600b805491909316911617905550620001c7915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200016557805160ff191683800117855562000195565b8280016001018555821562000195579182015b828111156200019557825182559160200191906001019062000178565b50620001a3929150620001a7565b5090565b620001c491905b80821115620001a35760008155600101620001ae565b90565b61199980620001d76000396000f3006060604052361561026c5763ffffffff60e060020a600035041663069f7e8581146102715780630a790e19146102965780630c8e3166146102a95780630d869ada146102d35780630e136b19146103025780632113aab41461031557806321db0f0d1461033f57806326cf53b91461035e57806329cdda23146103875780633197cbb61461041157806336c2d72d146104245780633830901a1461044357806338471dd6146104595780633abdf7921461046c5780633da06d6c1461047f57806347aef0a914610492578063526b8462146104a557806358226a76146104c45780635ef4ed42146104d7578063636ce4d7146104fe5780636a146024146105115780636dfc2fa8146105245780636f3c85661461053757806378e979251461054a5780638297d46d146103155780638c7d58aa1461055d5780638d81a88f146105705780638e74a528146105835780638e821b2414610596578063912f6ba4146105a95780639178732f146105c85780639f0be144146105e7578063a066094314610606578063a4fd6f561461062b578063a4ff83f51461063e578063aa141ee214610663578063b646962014610676578063b887817114610689578063ba53d9f3146106a8578063bbbf9384146106c7578063be48acc4146106da578063c39513af146106ed578063c4b5455114610749578063c8f98db81461075c578063ccdb3f451461076f578063d209a5661461035e578063d437196814610782578063d727647914610795578063e26a687f14610570578063e7e481c5146104fe578063f8228f14146107a8578063f84fce56146107be578063fb9ec0a8146107d1578063ffa1ad74146107e7575b600080fd5b341561027c57600080fd5b6102846107fa565b60405190815260200160405180910390f35b34156102a157600080fd5b61028461085a565b34156102b457600080fd5b6102bf600435610867565b604051901515815260200160405180910390f35b34156102de57600080fd5b6102e661092a565b604051600160a060020a03909116815260200160405180910390f35b341561030d57600080fd5b6102bf610939565b341561032057600080fd5b610328610942565b60405161ffff909116815260200160405180910390f35b341561034a57600080fd5b610284600160a060020a0360043516610948565b341561036957600080fd5b610371610974565b60405160ff909116815260200160405180910390f35b341561039257600080fd5b61039a610979565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156103d65780820151838201526020016103be565b50505050905090810190601f1680156104035780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561041c57600080fd5b610284610a17565b341561042f57600080fd5b610284600160a060020a0360043516610a1d565b341561044e57600080fd5b6102bf600435610a76565b341561046457600080fd5b6102e6610b0f565b341561047757600080fd5b610371610b1e565b341561048a57600080fd5b61039a610b23565b341561049d57600080fd5b6102e6610c76565b34156104b057600080fd5b610284600160a060020a0360043516610c85565b34156104cf57600080fd5b6102bf610cb1565b34156104e257600080fd5b6104fc600160a060020a0360043581169060243516610cd2565b005b341561050957600080fd5b610328610d28565b341561051c57600080fd5b610284610d2e565b341561052f57600080fd5b6102bf610d3a565b341561054257600080fd5b6102bf610d44565b341561055557600080fd5b610284610e9d565b341561056857600080fd5b6102bf610ea3565b341561057b57600080fd5b610371610eb0565b341561058e57600080fd5b610284610eb5565b34156105a157600080fd5b6102e6610ebb565b34156105b457600080fd5b610284600160a060020a0360043516610eca565b34156105d357600080fd5b610284600160a060020a0360043516610ef6565b34156105f257600080fd5b610284600160a060020a0360043516610f08565b341561061157600080fd5b610284600160a060020a0360043581169060243516610f2e565b341561063657600080fd5b6102bf610fc0565b341561064957600080fd5b610284600160a060020a0360043581169060243516610fca565b341561066e57600080fd5b6102e6610fe7565b341561068157600080fd5b610284610ff6565b341561069457600080fd5b610284600160a060020a036004351661105c565b34156106b357600080fd5b610284600160a060020a0360043516611084565b34156106d257600080fd5b6103716110b0565b34156106e557600080fd5b6102846110b5565b34156106f857600080fd5b6102bf60046024813581810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284375094965050509235600160a060020a031692506110c3915050565b341561075457600080fd5b610284611145565b341561076757600080fd5b61039a611152565b341561077a57600080fd5b6102e6611271565b341561078d57600080fd5b610284610eb0565b34156107a057600080fd5b6102e6611280565b34156107b357600080fd5b6102bf60043561128f565b34156107c957600080fd5b6102bf61131c565b34156107dc57600080fd5b6102bf600435611334565b34156107f257600080fd5b61039a6113e0565b600b54600160a060020a03166000908152600f602052604081205461082690606463ffffffff61144b16565b600a54600160a060020a03166000908152600f6020526040902054610853906103e863ffffffff61144b16565b0190505b90565b68056bc75e2d6310000081565b60008054421015801561087c57506001544211155b151561088757600080fd5b600b546108a9903390600160a060020a03168468056bc75e2d63100000611473565b6108c4336108bf846107d063ffffffff61144b16565b6115d4565b600b54600160a060020a033381169160008051602061194e83398151915291166109016064670de0b6b3a7640000875b049063ffffffff61144b16565b604051600160a060020a03909216825260208201526040908101905180910390a2506001919050565b600954600160a060020a031681565b60055460ff1681565b6107d081565b600160a060020a039081166000908152600e602090815260408083206009549094168352929052205490565b600181565b60068054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610a0f5780601f106109e457610100808354040283529160200191610a0f565b820191906000526020600020905b8154815290600101906020018083116109f257829003601f168201915b505050505081565b60015481565b600160a060020a0381166000908152600f6020526040812054610a7090610a4b90600a63ffffffff61167116565b600160a060020a0384166000908152600f60205260409020549063ffffffff61168e16565b92915050565b600080544210158015610a8b57506001544211155b1515610a9657600080fd5b600954610ab0903390600160a060020a0316846064611473565b610ade336108bf6107d0610ad286670de0b6b3a764000063ffffffff61144b16565b9063ffffffff61144b16565b600954600160a060020a033381169160008051602061194e833981519152911661090185606463ffffffff61144b16565b600b54600160a060020a031681565b601281565b610b2b6118a3565b610b3361131c565b15610b9c57606060405190810160405280603b81526020017f497427732063757272656e746c79206120647261772c2062757420746865206281526020017f6174746c65206973207374696c6c20696e2070726f67726573732100000000008152509050610857565b610ba46107fa565b610bac610ff6565b11610c1357606060405190810160405280603881526020017f477265656b73206172652077696e6e696e672c2062757420746865206261747481526020017f6c65206973207374696c6c20696e2070726f6772657373210000000000000000815250610c71565b606060405190810160405280603a81526020017f5065727369616e73206172652077696e6e696e672c206275742074686520626181526020017f74746c65206973207374696c6c20696e2070726f6772657373210000000000008152505b905090565b600c54600160a060020a031681565b600160a060020a039081166000908152600e602090815260408083206008549094168352929052205490565b6000600254600054034210158015610c715750610ccc610ea3565b15905090565b60035433600160a060020a03908116911614610ced57600080fd5b600c8054600160a060020a0393841673ffffffffffffffffffffffffffffffffffffffff1991821617909155600d8054929093169116179055565b6103e881565b670de0b6b3a764000081565b6000610ccc610ea3565b600080600060015442111515610d5957600080fd5b610d616107fa565b610d69610ff6565b1115610dc757600a54610d86903390600160a060020a0316610f2e565b91506000821115610da957600a54610da9903390600160a060020a03168461169e565b600854610dc2903390600160a060020a0316600a611726565b610e62565b610dcf6107fa565b610dd7610ff6565b1015610e3057600854610df4903390600160a060020a0316610f2e565b90506000811115610e1757600854610e17903390600160a060020a03168361169e565b600a8054610dc2913391600160a060020a031690611726565b600854610e49903390600160a060020a0316600a611726565b600a8054610e62913391600160a060020a031690611726565b600954610e7b903390600160a060020a03166000611726565b600b54610e94903390600160a060020a03166000611726565b60019250505090565b60005481565b6001546002544201101590565b606481565b60025481565b600854600160a060020a031681565b600160a060020a039081166000908152600e60209081526040808320600b549094168352929052205490565b600f6020526000908152604090205481565b6000610f186064610ad284610eca565b610f276103e8610ad285611084565b0192915050565b600a54600090600160a060020a0383811691161415610f9357600a54610f8c90610f6090600160a060020a0316610a1d565b610f80610f6b610ff6565b610f748761105c565b9063ffffffff61183816565b9063ffffffff61186b16565b9050610a70565b600854610f8c90610fac90600160a060020a0316610a1d565b610f80610fb76107fa565b610f7487610f08565b6000610c71610ea3565b600e60209081526000928352604080842090915290825290205481565b600a54600160a060020a031681565b600954600160a060020a03166000908152600f602052604081205461103090606490610ad290670de0b6b3a764000063ffffffff61144b16565b600854600160a060020a03166000908152600f602052604090205461085390600163ffffffff61144b16565b60006110766064610ad2670de0b6b3a76400008186610948565b610f276001610ad285610c85565b600160a060020a039081166000908152600e60209081526040808320600a549094168352929052205490565b600a81565b693f870857a3e0e380000081565b60035460009033600160a060020a039081169116146110e157600080fd5b60055460ff16156110f157600080fd5b6005805460ff1916600117905560068380516111119291602001906118b5565b505060078054600160a060020a03831673ffffffffffffffffffffffffffffffffffffffff19909116179055600192915050565b681043561a882930000081565b61115a6118a3565b611162610d3a565b156111a25760408051908101604052601f81527f54686520626174746c65206973207374696c6c20696e2070726f67726573730060208201529050610857565b6111aa61131c565b156111ea5760408051908101604052601b81527f54686520626174746c6520656e64656420696e2061206472617721000000000060208201529050610857565b6111f26107fa565b6111fa610ff6565b116112385760408051908101604052600681527f477265656b7300000000000000000000000000000000000000000000000000006020820152610c71565b60408051908101604052600881527f5065727369616e730000000000000000000000000000000000000000000000006020820152905090565b600754600160a060020a031681565b600d54600160a060020a031681565b6000805442101580156112a457506001544211155b15156112af57600080fd5b600a546112d1903390600160a060020a031684681043561a8829300000611473565b6112e7336108bf846103e863ffffffff61144b16565b600a54600160a060020a033381169160008051602061194e83398151915291166109016103e8670de0b6b3a7640000876108f4565b60006113266107fa565b61132e610ff6565b14905090565b60008054421015801561134957506001544211155b151561135457600080fd5b600854611377903390600160a060020a031684693f870857a3e0e3800000611473565b61138c336108bf84600163ffffffff61144b16565b600854600160a060020a033381169160008051602061194e8339815191529116670de0b6b3a76400008504604051600160a060020a03909216825260208201526040908101905180910390a2506001919050565b60048054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610a0f5780601f106109e457610100808354040283529160200191610a0f565b600081158061146857505080820282828281151561146557fe5b04145b1515610a7057600080fd5b600160a060020a0383166000908152600f6020526040902054819061149e908463ffffffff61189316565b11156114a957600080fd5b82600160a060020a03166323b872dd85308560006040516020015260405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401602060405180830381600087803b151561151357600080fd5b6102c65a03f1151561152457600080fd5b50505060405180519050151561153957600080fd5b600160a060020a038085166000908152600e602090815260408083209387168352929052205461156f908363ffffffff61189316565b600160a060020a038086166000908152600e60209081526040808320938816835292815282822093909355600f9092529020546115b2908363ffffffff61189316565b600160a060020a039093166000908152600f6020526040902092909255505050565b600c54600d54600160a060020a03918216916323b872dd9116848460006040516020015260405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401602060405180830381600087803b151561164757600080fd5b6102c65a03f1151561165857600080fd5b50505060405180519050151561166d57600080fd5b5050565b6000611687611681846064611838565b8361186b565b9392505050565b80820382811115610a7057600080fd5b81600160a060020a031663a9059cbb848360006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b15156116fb57600080fd5b6102c65a03f1151561170c57600080fd5b50505060405180519050151561172157600080fd5b505050565b600160a060020a038084166000908152600e60209081526040808320938616835292905290812054819011156118325750600160a060020a038084166000908152600e602090815260408083209386168352929052908120549060ff831611156117b0576117ad6117a08260ff851663ffffffff61167116565b829063ffffffff61168e16565b90505b600160a060020a038085166000908152600e602090815260408083209387168352929052908120556117e384848361169e565b83600160a060020a03167fc7c2aa25ce150e3d33efbdc7dd97f6c464a91ff4b82046f8f8ce10dfa5a6b5c48483604051600160a060020a03909216825260208201526040908101905180910390a25b50505050565b60008161185a61185085670de0b6b3a764000061144b565b6002855b04611893565b81151561186357fe5b049392505050565b6000670de0b6b3a764000061185a611883858561144b565b6002670de0b6b3a7640000611854565b80820182811015610a7057600080fd5b60206040519081016040526000815290565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106118f657805160ff1916838001178555611923565b82800160010185558215611923579182015b82811115611923578251825591602001919060010190611908565b5061192f929150611933565b5090565b61085791905b8082111561192f57600081556001016119395600e8ab245b4399453398b3c3d158ff1a8600e48feb7ce168e7640c373b0876c784a165627a7a72305820a4086f431589d9f590f38c7b1c48830270196564a6f198aa5ddf681a4b20ca8700290000000000000000000000000000000000000000000000000000000059ee828000000000000000000000000000000000000000000000000000000000000a8c00000000000000000000000000000000000000000000000000000000000000000f000000000000000000000000163733bcc28dbf26b41a8cfa83e369b5b3af741b00000000000000000000000022e5f62d0fa19974749faa194e3d3ef6d89c08d7000000000000000000000000aec98a708810414878c3bcdf46aad31ded4a455700000000000000000000000017052d51e954592c1046320c2371abab6c73ef10

    Constructor Arguments (ABI-encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000000000000000000000000000000000059ee828000000000000000000000000000000000000000000000000000000000000a8c00000000000000000000000000000000000000000000000000000000000000000f000000000000000000000000163733bcc28dbf26b41a8cfa83e369b5b3af741b00000000000000000000000022e5f62d0fa19974749faa194e3d3ef6d89c08d7000000000000000000000000aec98a708810414878c3bcdf46aad31ded4a455700000000000000000000000017052d51e954592c1046320c2371abab6c73ef10

-----Decoded View---------------
Found 7 constructor arguments :
Arg [0] : 0000000000000000000000000000000000000000000000000000000059ee8280
Arg [1] : 00000000000000000000000000000000000000000000000000000000000a8c00
Arg [2] : 000000000000000000000000000000000000000000000000000000000000000f
Arg [3] : 000000000000000000000000163733bcc28dbf26b41a8cfa83e369b5b3af741b
Arg [4] : 00000000000000000000000022e5f62d0fa19974749faa194e3d3ef6d89c08d7
Arg [5] : 000000000000000000000000aec98a708810414878c3bcdf46aad31ded4a4557
Arg [6] : 00000000000000000000000017052d51e954592c1046320c2371abab6c73ef10


   Swarm Source:
bzzr://a4086f431589d9f590f38c7b1c48830270196564a6f198aa5ddf681a4b20ca87

 

View All
Block Age txn Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward
Make sure to use the "downvote" button for any spammy posts, and the "upvote" for interesting conversations.