Contract 0xfa48ab1c05ab1e7727e15ab879c88faa8a7357ef

TxHash Block Age From To Value [TxFee]
0xac720689c0a2c748e2daa1693fee00f77824a168d7b6fa6028c3932a8274dbe93186652318 days 15 hrs ago0xbfd04af48c978cc0d9bc5e06d9593cb4fb7f6f98 IN  0xfa48ab1c05ab1e7727e15ab879c88faa8a7357ef0 Ether0.007938216
0x1cff0422b327753a33136b211e3689d52051a81b36a7e663fbad9ce483ad17ef3186592318 days 15 hrs ago0xbfd04af48c978cc0d9bc5e06d9593cb4fb7f6f98 IN  0xfa48ab1c05ab1e7727e15ab879c88faa8a7357ef0 Ether0.004868
0xa9ac2139dfa757a086ec5e964f424231769ec3af8d349d33b5117797a46b8cb63186490318 days 16 hrs ago0xbfd04af48c978cc0d9bc5e06d9593cb4fb7f6f98 IN  0xfa48ab1c05ab1e7727e15ab879c88faa8a7357ef0 Ether0.004537325
0xab462e5afcbf2c08d31d06d14d1956634ae185442702ae413a795f6da69cd9773186457318 days 17 hrs ago0xbfd04af48c978cc0d9bc5e06d9593cb4fb7f6f98 IN  0xfa48ab1c05ab1e7727e15ab879c88faa8a7357ef0 Ether0.00106245
0x9cefa54d3f2ec0270199ab4d82d9de9a18414295d05eed82a7ebaeaa48b5314c3186457318 days 17 hrs ago0xbfd04af48c978cc0d9bc5e06d9593cb4fb7f6f98 IN  0xfa48ab1c05ab1e7727e15ab879c88faa8a7357ef0 Ether0.000619575
0x4089927d40feb0efd485582b1ea7393c914928f86278525198bd358a1d0918b43186457318 days 17 hrs ago0xbfd04af48c978cc0d9bc5e06d9593cb4fb7f6f98 IN  0xfa48ab1c05ab1e7727e15ab879c88faa8a7357ef0 Ether0.000619575
0x9cbb1f065af87c6544507831c72731ac53d442308d9b91899ac7ac8f0a9907d93186457318 days 17 hrs ago0xbfd04af48c978cc0d9bc5e06d9593cb4fb7f6f98 IN  0xfa48ab1c05ab1e7727e15ab879c88faa8a7357ef0 Ether0.000914875
0xcec36fc63dbeffc2ce8411d04ae61a7652dafce5b3ef5e92386b52fa8a5465c63186457318 days 17 hrs ago0xbfd04af48c978cc0d9bc5e06d9593cb4fb7f6f98 IN  0xfa48ab1c05ab1e7727e15ab879c88faa8a7357ef0 Ether0.000619575
0xb63e1b42f300f96bf2f8445873b597dd710f6092ed23a1ea78c4feef3395a1993186457318 days 17 hrs ago0xbfd04af48c978cc0d9bc5e06d9593cb4fb7f6f98 IN  0xfa48ab1c05ab1e7727e15ab879c88faa8a7357ef0 Ether0.000619575
0x6ba32906fc5fd27381d91011a37c8a141b7762d755d9ccb4b91f901d4ec295273186455318 days 17 hrs ago0xbfd04af48c978cc0d9bc5e06d9593cb4fb7f6f98 IN  0xfa48ab1c05ab1e7727e15ab879c88faa8a7357ef0 Ether0.000619575
0xce199a53dd41df768899e1628cf439213500fde73a82265cbe607db8a65ee8683186454318 days 17 hrs ago0xbfd04af48c978cc0d9bc5e06d9593cb4fb7f6f98 IN  0xfa48ab1c05ab1e7727e15ab879c88faa8a7357ef0 Ether0.000619575
0x46c114dd217923ce0b5d37d1492f6f369f21d887b7f973a8fdcc7e7f2cf04c533186447318 days 17 hrs ago0xbfd04af48c978cc0d9bc5e06d9593cb4fb7f6f98 IN  0xfa48ab1c05ab1e7727e15ab879c88faa8a7357ef0 Ether0.004160725
0x9816495d019aa3afcf7987c6536121393bc8c82fba3a40cf44ece821cc7bbf843186442318 days 17 hrs ago0xbfd04af48c978cc0d9bc5e06d9593cb4fb7f6f98 IN  0xfa48ab1c05ab1e7727e15ab879c88faa8a7357ef0 Ether0.001795225
0x63e417df9c2e80d05f38913acf1f4398876edcc2d5e1d5bcddc4dc0fa6327aa83186435318 days 17 hrs ago0xbfd04af48c978cc0d9bc5e06d9593cb4fb7f6f98 IN  0xfa48ab1c05ab1e7727e15ab879c88faa8a7357ef0 Ether0.00147185
0x81bbb32605e0bc6f18c154e36d4e2145fac9d91ce561c2f0b9f05845144456d53186432318 days 17 hrs ago0xbfd04af48c978cc0d9bc5e06d9593cb4fb7f6f98 IN  0xfa48ab1c05ab1e7727e15ab879c88faa8a7357ef0 Ether0.000619575
0x058aa2cecee1c9480842541014848602bce31a0aeb953d2632e7e15e1f3c1b1b3186432318 days 17 hrs ago0xbfd04af48c978cc0d9bc5e06d9593cb4fb7f6f98 IN  0xfa48ab1c05ab1e7727e15ab879c88faa8a7357ef0 Ether0.000619575
0xb7be67832eb0864b1c8c3632b617843efe682a39d84cb3f355d907443d5acfe53186432318 days 17 hrs ago0xbfd04af48c978cc0d9bc5e06d9593cb4fb7f6f98 IN  0xfa48ab1c05ab1e7727e15ab879c88faa8a7357ef0 Ether0.000619575
0x53b39f4031aa51018a4773a47e9c215769b3411854a4abd2d511119a6a1b79263186432318 days 17 hrs ago0xbfd04af48c978cc0d9bc5e06d9593cb4fb7f6f98 IN  0xfa48ab1c05ab1e7727e15ab879c88faa8a7357ef0 Ether0.00106245
0xf5ddbf47338ea7cc21afd99883dc95d89728a510e664a527b5d9e9fb725c855a3186432318 days 17 hrs ago0xbfd04af48c978cc0d9bc5e06d9593cb4fb7f6f98 IN  0xfa48ab1c05ab1e7727e15ab879c88faa8a7357ef0 Ether0.000619575
0xb4a1f75ba65134ae20fba36557009c9ca8c10def0b3818d685869214a5d4b3e23186432318 days 17 hrs ago0xbfd04af48c978cc0d9bc5e06d9593cb4fb7f6f98 IN  0xfa48ab1c05ab1e7727e15ab879c88faa8a7357ef0 Ether0.000619575
0xdd713c9330fb66d770857fb95bef06bdbf5dddd3d3a43a7378d1c7e75c06c1c43186432318 days 17 hrs ago0xbfd04af48c978cc0d9bc5e06d9593cb4fb7f6f98 IN  0xfa48ab1c05ab1e7727e15ab879c88faa8a7357ef0 Ether0.000619575
0x1c82c51066ab46180c711eda70c0e2faf5cc3511183f3d67863d000e6eb87df63186432318 days 17 hrs ago0xbfd04af48c978cc0d9bc5e06d9593cb4fb7f6f98 IN  0xfa48ab1c05ab1e7727e15ab879c88faa8a7357ef0 Ether0.000619575
0x646b6a81f2244a65ea9b3ba122f0d9c442c8f84eef2c1258234b813a2e8fadca3186432318 days 17 hrs ago0xbfd04af48c978cc0d9bc5e06d9593cb4fb7f6f98 IN  0xfa48ab1c05ab1e7727e15ab879c88faa8a7357ef0 Ether0.000619575
0xe46cb1ef5d0fded4a5898377b527e1799f5dbb1b7df51e4418387465d75f919f3186432318 days 17 hrs ago0xbfd04af48c978cc0d9bc5e06d9593cb4fb7f6f98 IN  0xfa48ab1c05ab1e7727e15ab879c88faa8a7357ef0 Ether0.00106245
0xe929afe5b3abd36ac45dbbe412e78d03a60cd8b1a60f7514b6058c8fdbeedb013186432318 days 17 hrs ago0xbfd04af48c978cc0d9bc5e06d9593cb4fb7f6f98 IN  0xfa48ab1c05ab1e7727e15ab879c88faa8a7357ef0 Ether0.000619575
[ Download CSV Export 

Latest 25 internal transaction, Click here to view more Internal Transactions as a result of Contract Execution

Parent TxHash Block Age From To Value
0x1cff0422b327753a33136b211e3689d52051a81b36a7e663fbad9ce483ad17ef3186592318 days 15 hrs ago0xfa48ab1c05ab1e7727e15ab879c88faa8a7357ef0x8b1b6ec2f45e09bdd4e37ddac48ce50b71066cb40 Ether
0x1cff0422b327753a33136b211e3689d52051a81b36a7e663fbad9ce483ad17ef3186592318 days 15 hrs ago0xfa48ab1c05ab1e7727e15ab879c88faa8a7357ef0x671c81d8731f9582f17e7519f46243040e7d96420 Ether
0x1cff0422b327753a33136b211e3689d52051a81b36a7e663fbad9ce483ad17ef3186592318 days 15 hrs ago0xfa48ab1c05ab1e7727e15ab879c88faa8a7357ef0x671c81d8731f9582f17e7519f46243040e7d96420 Ether
0x1cff0422b327753a33136b211e3689d52051a81b36a7e663fbad9ce483ad17ef3186592318 days 15 hrs ago0xfa48ab1c05ab1e7727e15ab879c88faa8a7357ef0xb4cdf2250c24de60b582b946d28f072f3ca875970 Ether
0x1cff0422b327753a33136b211e3689d52051a81b36a7e663fbad9ce483ad17ef3186592318 days 15 hrs ago0xfa48ab1c05ab1e7727e15ab879c88faa8a7357ef0x8b1b6ec2f45e09bdd4e37ddac48ce50b71066cb40 Ether
0x1cff0422b327753a33136b211e3689d52051a81b36a7e663fbad9ce483ad17ef3186592318 days 15 hrs ago0xfa48ab1c05ab1e7727e15ab879c88faa8a7357ef0x8b1b6ec2f45e09bdd4e37ddac48ce50b71066cb40 Ether
0xa9ac2139dfa757a086ec5e964f424231769ec3af8d349d33b5117797a46b8cb63186490318 days 16 hrs ago0xfa48ab1c05ab1e7727e15ab879c88faa8a7357ef0xb4cdf2250c24de60b582b946d28f072f3ca875970 Ether
0xa9ac2139dfa757a086ec5e964f424231769ec3af8d349d33b5117797a46b8cb63186490318 days 16 hrs ago0xfa48ab1c05ab1e7727e15ab879c88faa8a7357ef0xb4cdf2250c24de60b582b946d28f072f3ca875970 Ether
0xa9ac2139dfa757a086ec5e964f424231769ec3af8d349d33b5117797a46b8cb63186490318 days 16 hrs ago0xfa48ab1c05ab1e7727e15ab879c88faa8a7357ef0xb4cdf2250c24de60b582b946d28f072f3ca875970 Ether
0xa9ac2139dfa757a086ec5e964f424231769ec3af8d349d33b5117797a46b8cb63186490318 days 16 hrs ago0xfa48ab1c05ab1e7727e15ab879c88faa8a7357ef0xb4cdf2250c24de60b582b946d28f072f3ca875970 Ether
0xa9ac2139dfa757a086ec5e964f424231769ec3af8d349d33b5117797a46b8cb63186490318 days 16 hrs ago0xfa48ab1c05ab1e7727e15ab879c88faa8a7357ef0xb4cdf2250c24de60b582b946d28f072f3ca875970 Ether
0xa9ac2139dfa757a086ec5e964f424231769ec3af8d349d33b5117797a46b8cb63186490318 days 16 hrs ago0xfa48ab1c05ab1e7727e15ab879c88faa8a7357ef0xb4cdf2250c24de60b582b946d28f072f3ca875970 Ether
0xa9ac2139dfa757a086ec5e964f424231769ec3af8d349d33b5117797a46b8cb63186490318 days 16 hrs ago0xfa48ab1c05ab1e7727e15ab879c88faa8a7357ef0xb4cdf2250c24de60b582b946d28f072f3ca875970 Ether
0xa9ac2139dfa757a086ec5e964f424231769ec3af8d349d33b5117797a46b8cb63186490318 days 16 hrs ago0xfa48ab1c05ab1e7727e15ab879c88faa8a7357ef0xb4cdf2250c24de60b582b946d28f072f3ca875970 Ether
0xa9ac2139dfa757a086ec5e964f424231769ec3af8d349d33b5117797a46b8cb63186490318 days 16 hrs ago0xfa48ab1c05ab1e7727e15ab879c88faa8a7357ef0xb4cdf2250c24de60b582b946d28f072f3ca875970 Ether
0xa9ac2139dfa757a086ec5e964f424231769ec3af8d349d33b5117797a46b8cb63186490318 days 16 hrs ago0xfa48ab1c05ab1e7727e15ab879c88faa8a7357ef0xb4cdf2250c24de60b582b946d28f072f3ca875970 Ether
0xab462e5afcbf2c08d31d06d14d1956634ae185442702ae413a795f6da69cd9773186457318 days 17 hrs ago0xfa48ab1c05ab1e7727e15ab879c88faa8a7357ef0xb4cdf2250c24de60b582b946d28f072f3ca875970 Ether
0xab462e5afcbf2c08d31d06d14d1956634ae185442702ae413a795f6da69cd9773186457318 days 17 hrs ago0xfa48ab1c05ab1e7727e15ab879c88faa8a7357ef0xb4cdf2250c24de60b582b946d28f072f3ca875970 Ether
0xab462e5afcbf2c08d31d06d14d1956634ae185442702ae413a795f6da69cd9773186457318 days 17 hrs ago0xfa48ab1c05ab1e7727e15ab879c88faa8a7357ef0xb4cdf2250c24de60b582b946d28f072f3ca875970 Ether
0xab462e5afcbf2c08d31d06d14d1956634ae185442702ae413a795f6da69cd9773186457318 days 17 hrs ago0xfa48ab1c05ab1e7727e15ab879c88faa8a7357ef0xb4cdf2250c24de60b582b946d28f072f3ca875970 Ether
0xab462e5afcbf2c08d31d06d14d1956634ae185442702ae413a795f6da69cd9773186457318 days 17 hrs ago0xfa48ab1c05ab1e7727e15ab879c88faa8a7357ef0xb4cdf2250c24de60b582b946d28f072f3ca875970 Ether
0xab462e5afcbf2c08d31d06d14d1956634ae185442702ae413a795f6da69cd9773186457318 days 17 hrs ago0xfa48ab1c05ab1e7727e15ab879c88faa8a7357ef0xb4cdf2250c24de60b582b946d28f072f3ca875970 Ether
0xab462e5afcbf2c08d31d06d14d1956634ae185442702ae413a795f6da69cd9773186457318 days 17 hrs ago0xfa48ab1c05ab1e7727e15ab879c88faa8a7357ef0xb4cdf2250c24de60b582b946d28f072f3ca875970 Ether
0x9cefa54d3f2ec0270199ab4d82d9de9a18414295d05eed82a7ebaeaa48b5314c3186457318 days 17 hrs ago0xfa48ab1c05ab1e7727e15ab879c88faa8a7357ef0xb4cdf2250c24de60b582b946d28f072f3ca875970 Ether
0x4089927d40feb0efd485582b1ea7393c914928f86278525198bd358a1d0918b43186457318 days 17 hrs ago0xfa48ab1c05ab1e7727e15ab879c88faa8a7357ef0xb4cdf2250c24de60b582b946d28f072f3ca875970 Ether
[ Download CSV Export 
Contract Self Destruct called at TxHash 0x1cff0422b327753a33136b211e3689d52051a81b36a7e663fbad9ce483ad17ef

Contract Source Code Verified (Exact Match)

Contract Name:
TeamContracts

Compiler Version
v0.4.18+commit.9cf6e910

Optimization Enabled:
Yes

Runs (Optimizer):
200

Contract Source Code

contract ERC20TokenInterface {

    function totalSupply () public constant returns (uint);
    function balanceOf (address tokenOwner) public constant returns (uint balance);
    function transfer (address to, uint tokens) public returns (bool success);
    function transferFrom (address from, address to, uint tokens) public returns (bool success);

}

interface StorageInterface {

    function transferOwnership (address newOwner) public; // Owners only: revoke access from the calling account and grant access to newOwner
    function grantAccess (address newOwner) public; // Owners only: just grant access to newOwner without revoking the access from the current owner
    function revokeAccess (address previousOwner) public; // Just revoke access from the current owner
    function isOwner (address addr) public view returns(bool);
    function getUint (bytes32 record) public view returns (uint);
    function getString (bytes32 record) public view returns (string);
    function getAddress (bytes32 record) public view returns (address);
    function getBytes (bytes32 record) public view returns (bytes);
    function getBoolean (bytes32 record) public view returns (bool);
    function getInt (bytes32 record) public view returns (int);
    function setString (bytes32 record, string value) public;
    function setUint (bytes32 record, uint value) public;
    function setAddress (bytes32 record, address value) public;
    function setBytes (bytes32 record, bytes value) public;
    function setBoolean (bytes32 record, bool value) public;
    function setInt (bytes32 record, int value) public;

}

/**
 * There's no need to deploy this contract. It abstracts the storage logic and is meant for inheritance only.
 * This contract does not handle any logic nor constraints and works with bare storage only.
 */
contract TeamsStorageController {

    address public db;

    /**
     * Storage enumeration for keys readability. Never change an order of the items here when applying to a deployed storage!
     */
    enum Storage {
        teams,
        teamOwner,
        balance
    }

    enum Member {
        agreementMinutes,
        agreementValue,
        payoutDate
    }

    /**
     * A storage is represented as a key-value mapping. This comment describes the value retrieval from this mapping.
     *
     * getUint(Storage.teams) = 42 (number of teams)
     * getAddress(Storage.teamOwner, TEAM_ID) = 0x1520... (team owner address)
     * getUint(Storage.teams, TEAM_ID) = 5 (number of members in a team)
     * getUint(Storage.balance, TEAM_ID) = 100 (number of tokens on a balance of a team)
     * getAddress(Storage.teams, TEAM_ID, MEMBER_INDEX) = 0xF6A2... (team member address)
     * getUint(Storage.teams, TEAM_ID, MEMBER_INDEX, Member.agreementMinutes) = 20160 (number of minutes of agreement)
     * getUint(Storage.teams, TEAM_ID, MEMBER_INDEX, Member.agreementValue) = 50 (number of tokens stashed)
     * getUint(Storage.teams, TEAM_ID, MEMBER_INDEX, Member.payoutDate) = 1519987450 (date when user can receive payout, unix timestamp IN SECONDS)
     * getUint(Storage.teams, TEAM_ID, MEMBER_INDEX) = 10500 (member contract ID)
     * getBool(Storage.teams, TEAM_ID, MEMBER_INDEX) = false (whether to remove player on payout)
     */

    function getNumberOfTeams () public view returns(uint) {
        return StorageInterface(db).getUint(keccak256(Storage.teams));
    }

    function storageGetTeamMemberIndexByContractId (uint teamId, uint contractId) internal view returns(int) {
        int i = 0;
        uint cid;
        do {
            cid = StorageInterface(db).getUint(keccak256(Storage.teams, teamId, i));
            if (cid == contractId)
                return i;
            if (cid == 0)
                return -1;
            ++i;
        } while (true);
    }

    function storageGetTeamMemberAgreementValue (uint teamId, uint memberIndex) internal view returns(uint) {
        return StorageInterface(db).getUint(keccak256(Storage.teams, teamId, memberIndex, Member.agreementValue));
    }

    function storageGetTeamMemberAgreementMinutes (uint teamId, uint memberIndex) internal view returns(uint) {
        return StorageInterface(db).getUint(keccak256(Storage.teams, teamId, memberIndex, Member.agreementMinutes));
    }

    function storageGetTeamMemberPayoutDate (uint teamId, uint memberIndex) internal view returns(uint) {
        return StorageInterface(db).getUint(keccak256(Storage.teams, teamId, memberIndex, Member.payoutDate));
    }

    function storageGetTeamMemberAddress (uint teamId, uint memberIndex) internal view returns(address) {
        return StorageInterface(db).getAddress(keccak256(Storage.teams, teamId, memberIndex));
    }

    function storageGetMemberContractId (uint teamId, uint memberIndex) internal view returns(uint) {
        return StorageInterface(db).getUint(keccak256(Storage.teams, teamId, memberIndex));
    }

    function storageGetNumberOfMembers (uint teamId) internal view returns(uint) {
        return StorageInterface(db).getUint(keccak256(Storage.teams, teamId));
    }

    function storageGetTeamMemberSingleTermAgreement (uint teamId, uint memberIndex) internal view returns(bool) {
        return StorageInterface(db).getBoolean(keccak256(Storage.teams, teamId, memberIndex));
    }

    function storageGetTeamBalance (uint teamId) internal view returns(uint) {
        return StorageInterface(db).getUint(keccak256(Storage.balance, teamId));
    }

    function storageSetTeamMemberPayoutDate (uint teamId, uint memberIndex, uint date) internal {
        StorageInterface(db).setUint(keccak256(Storage.teams, teamId, memberIndex, Member.payoutDate), date);
    }

    // Gas refund applies here for clearing storage
    function storageDeleteTeamMember (uint teamId, uint memberIndex) internal {
        uint numOfMembers = StorageInterface(db).getUint(keccak256(Storage.teams, teamId)) - 1;
        require(memberIndex <= numOfMembers);
        StorageInterface(db).setAddress(
            keccak256(Storage.teams, teamId, memberIndex),
            StorageInterface(db).getAddress(keccak256(Storage.teams, teamId, numOfMembers))
        );
        StorageInterface(db).setAddress(keccak256(Storage.teams, teamId, numOfMembers), 0x0);
        StorageInterface(db).setUint(
            keccak256(Storage.teams, teamId, memberIndex, Member.agreementMinutes),
            StorageInterface(db).getUint(keccak256(Storage.teams, teamId, numOfMembers, Member.agreementMinutes))
        );
        StorageInterface(db).setUint(keccak256(Storage.teams, teamId, numOfMembers, Member.agreementMinutes), 0);
        StorageInterface(db).setUint(
            keccak256(Storage.teams, teamId, memberIndex, Member.agreementValue),
            StorageInterface(db).getUint(keccak256(Storage.teams, teamId, numOfMembers, Member.agreementValue))
        );
        StorageInterface(db).setUint(keccak256(Storage.teams, teamId, numOfMembers, Member.agreementValue), 0);
        StorageInterface(db).setUint(
            keccak256(Storage.teams, teamId, memberIndex, Member.payoutDate),
            StorageInterface(db).getUint(keccak256(Storage.teams, teamId, numOfMembers, Member.payoutDate))
        );
        StorageInterface(db).setUint(keccak256(Storage.teams, teamId, numOfMembers, Member.payoutDate), 0);
        StorageInterface(db).setUint(
            keccak256(Storage.teams, teamId, memberIndex),
            StorageInterface(db).getUint(keccak256(Storage.teams, teamId, numOfMembers))
        );
        StorageInterface(db).setUint(keccak256(Storage.teams, teamId, numOfMembers), 0);
        StorageInterface(db).setBoolean(
            keccak256(Storage.teams, teamId, memberIndex),
            StorageInterface(db).getBoolean(keccak256(Storage.teams, teamId, numOfMembers))
        );
        StorageInterface(db).setBoolean(keccak256(Storage.teams, teamId, numOfMembers), false);
        StorageInterface(db).setUint(keccak256(Storage.teams, teamId), numOfMembers);
    }

    function storageAddTeam (address teamOwnerAccount) internal returns(uint) {
        uint teamId = StorageInterface(db).getUint(keccak256(Storage.teams));
        StorageInterface(db).setUint(keccak256(Storage.teams), teamId + 1);
        StorageInterface(db).setAddress(keccak256(Storage.teamOwner, teamId), teamOwnerAccount);
        return teamId;
    }

    function storageIncTeamBalance (uint teamId, uint toAdd) internal {
        StorageInterface(db).setUint(
            keccak256(Storage.balance, teamId),
            StorageInterface(db).getUint(keccak256(Storage.balance, teamId)) + toAdd
        );
    }

    function storageDecTeamBalance (uint teamId, uint toSub) internal {
        require(StorageInterface(db).getUint(keccak256(Storage.balance, teamId)) >= toSub);
        StorageInterface(db).setUint(
            keccak256(Storage.balance, teamId),
            StorageInterface(db).getUint(keccak256(Storage.balance, teamId)) - toSub
        );
    }

    function storageAddTeamMember (
        uint teamId,
        address memberAccount,
        uint agreementMinutes,
        uint agreementValue,
        bool singleTermAgreement,
        uint contractId // id of the contract with team member
    ) internal returns(uint)
    {
        // require(teamId < StorageInterface(db).getUint(keccak256(Storage.teams)));
        uint numOfMembers = StorageInterface(db).getUint(keccak256(Storage.teams, teamId));
        StorageInterface(db).setAddress(keccak256(Storage.teams, teamId, numOfMembers), memberAccount);
        StorageInterface(db).setUint(
            keccak256(Storage.teams, teamId, numOfMembers, Member.agreementMinutes), 
            agreementMinutes
        );
        StorageInterface(db).setUint(
            keccak256(Storage.teams, teamId, numOfMembers, Member.agreementValue), 
            agreementValue
        );
        StorageInterface(db).setUint(
            keccak256(Storage.teams, teamId, numOfMembers, Member.payoutDate), 
            now + (agreementMinutes * 60) // now + agreementSeconds
        );
        StorageInterface(db).setUint(
            keccak256(Storage.teams, teamId, numOfMembers),
            contractId
        );
        if (singleTermAgreement)
            StorageInterface(db).setBoolean(keccak256(Storage.teams, teamId, numOfMembers), true);
        StorageInterface(db).setUint(keccak256(Storage.teams, teamId), numOfMembers + 1);
    }

    function getTeam (uint teamId) public view returns(
        address[] memberAccounts,
        uint[] payoutDate,
        uint[] agreementMinutes,
        uint[] agreementValue,
        bool[] singleTermAgreement,
        uint teamBalance,
        address teamOwner,
        uint[] contractIds
    ) {
        uint numOfMembers = StorageInterface(db).getUint(keccak256(Storage.teams, teamId));
        memberAccounts = new address[](numOfMembers);
        payoutDate = new uint[](numOfMembers);
        agreementMinutes = new uint[](numOfMembers);
        agreementValue = new uint[](numOfMembers);
        singleTermAgreement = new bool[](numOfMembers);
        teamBalance = StorageInterface(db).getUint(keccak256(Storage.balance, teamId));
        teamOwner = StorageInterface(db).getAddress(keccak256(Storage.teamOwner, teamId));
        contractIds = new uint[](numOfMembers);
        for (
            uint memberIndex = 0; 
            memberIndex < numOfMembers; 
            ++memberIndex
        ) {
            memberAccounts[memberIndex] = StorageInterface(db).getAddress(
                keccak256(Storage.teams, teamId, memberIndex)
            );
            payoutDate[memberIndex] = StorageInterface(db).getUint(
                keccak256(Storage.teams, teamId, memberIndex, Member.payoutDate)
            );
            agreementMinutes[memberIndex] = StorageInterface(db).getUint(
                keccak256(Storage.teams, teamId, memberIndex, Member.agreementMinutes)
            );
            agreementValue[memberIndex] = StorageInterface(db).getUint(
                keccak256(Storage.teams, teamId, memberIndex, Member.agreementValue)
            );
            singleTermAgreement[memberIndex] = StorageInterface(db).getBoolean(
                keccak256(Storage.teams, teamId, memberIndex)
            );
            contractIds[memberIndex] = StorageInterface(db).getUint(
                keccak256(Storage.teams, teamId, memberIndex)
            );
        }
    }

}

contract TeamContracts is TeamsStorageController {

    event TeamCreated(uint indexed teamId);
    event TeamMemberAdded(uint indexed contractId);
    event TeamBalanceRefilled(uint indexed teamId, address payer, uint amount);
    event TeamMemberRemoved(uint indexed contractId, uint amountPaidToMember, uint amountReturnedToTeam);
    event Payout(uint indexed contractId, uint amount, address triggeredBy);
    event ContractCompleted(uint indexed contractId, bool extended); // Boolean extended: whether the contract was extended to a new period
    event ContractProlongationFailed(uint indexed contractId);

    address public erc20TokenAddress; // Address of authorized token
    address public dreamTeamAddress; // Authorized account for managing teams

    modifier dreamTeamOnly {require(msg.sender == dreamTeamAddress); _;} // allows only dreamTeamAddress to trigger fun

    /**
     * Constructor. This is yet the only way to set owner address, token address and storage address.
     */
    function TeamContracts (address dt, address token, address dbAddress) public {
        dreamTeamAddress = dt;
        erc20TokenAddress = token;
        db = dbAddress;
    }

    function createTeam (address teamOwnerAccount) dreamTeamOnly public returns(uint) {
        uint teamId = storageAddTeam(teamOwnerAccount);
        TeamCreated(teamId);
        return teamId;
    }

    /**
     * Adds a new member to a team. Member adding is only possible when team balance covers their first payout period.
     * @param teamId - Team ID to add member to.
     * @param memberAccount - Member address (where token balance live in token contract)
     * @param agreementMinutes - Number of minutes to 
     */
    function addMember (uint teamId, address memberAccount, uint agreementMinutes, uint agreementValue, bool singleTermAgreement, uint contractId) dreamTeamOnly public {
        storageDecTeamBalance(teamId, agreementValue); // throws if balance goes negative
        storageAddTeamMember(teamId, memberAccount, agreementMinutes, agreementValue, singleTermAgreement, contractId);
        TeamMemberAdded(contractId);
    }

    function removeMember (uint teamId, uint contractId) dreamTeamOnly public {

        int memberIndex = storageGetTeamMemberIndexByContractId(teamId, contractId);
        require(memberIndex != -1);

        uint payoutDate = storageGetTeamMemberPayoutDate(teamId, uint(memberIndex));

        if (payoutDate <= now) { // return full amount to the player
            ERC20TokenInterface(erc20TokenAddress).transfer(storageGetTeamMemberAddress(teamId, uint(memberIndex)), agreementValue);
            TeamMemberRemoved(contractId, agreementValue, 0);
        } else { // if (payoutDate > now): return a part of the amount based on the number of days spent in the team, in proportion
            uint agreementMinutes = storageGetTeamMemberAgreementMinutes(teamId, uint(memberIndex));
            uint agreementValue = storageGetTeamMemberAgreementValue(teamId, uint(memberIndex));
            // amountToPayout = numberOfFullDaysSpentInTheTeam * dailyRate; dailyRate = totalValue / numberOfDaysInAgreement
            uint amountToPayout = ((agreementMinutes * 60 - (payoutDate - now)) / 1 days) * (60 * 24 * agreementValue / agreementMinutes);
            if (amountToPayout > 0)
                ERC20TokenInterface(erc20TokenAddress).transfer(storageGetTeamMemberAddress(teamId, uint(memberIndex)), amountToPayout);
            if (amountToPayout < agreementValue)
                storageIncTeamBalance(teamId, agreementValue - amountToPayout); // unlock the rest of the funds
            TeamMemberRemoved(contractId, amountToPayout, agreementValue - amountToPayout);
        }

        // Actually delete team member from a storage
        storageDeleteTeamMember(teamId, uint(memberIndex));

    }

    function payout (uint teamId) public {

        uint value;
        uint contractId;

        // Iterate over all team members and payout to those who need to be paid.
        // This is intended to restrict DreamTeam or anyone else from triggering payout (and thus the contract extension) for 
        // a particular team member only, avoiding paying out other team members. Also since sorting payouts by dates are
        // expensive, we managed that giving a priority of contract extension to the leftmost team members (i = 0, 1, 2, ...)
        // over other members (including those whose contract extension must have happened before the leftmost members) is okay,
        // as we are going to trigger the payout daily and such case is more an exceptional one rather than the dangerous.
        // Even if team owner/member knows how to cheat over payout, the only thing they can do is to fail contract extension
        // for a particular team member (N rightmost team members) due to the lack of funds on the team balance.
        for (uint index = 0; index < storageGetNumberOfMembers(teamId); ++index) {
            if (storageGetTeamMemberPayoutDate(teamId, index) > now)
                continue;
            value = storageGetTeamMemberAgreementValue(teamId, index);
            contractId = storageGetMemberContractId(teamId, index);
            ERC20TokenInterface(erc20TokenAddress).transfer(storageGetTeamMemberAddress(teamId, index), value);
            Payout(contractId, value, msg.sender);
            if (storageGetTeamMemberSingleTermAgreement(teamId, index)) { // Terminate the contract due to a single-term agreement
                storageDeleteTeamMember(teamId, index);
                ContractCompleted(contractId, false);
            } else { // Extend the contract
                if (storageGetTeamBalance(teamId) < value) { // No funds in the team: auto extend is not possible, remove the team member
                    storageDeleteTeamMember(teamId, index);
                    ContractCompleted(contractId, false);
                    ContractProlongationFailed(contractId);
                } else {
                    storageDecTeamBalance(teamId, value);
                    storageSetTeamMemberPayoutDate(
                        teamId, 
                        index, 
                        storageGetTeamMemberPayoutDate(teamId, index) + storageGetTeamMemberAgreementMinutes(teamId, index) * 60
                    );
                    ContractCompleted(contractId, true);
                }
            }
        }

    }

    function batchPayout (uint[] teamIds) public {
        for (uint i = 0; i < teamIds.length; ++i) {
            payout(teamIds[i]);
        }
    }

    /**
     * Refill team balance for a given amount.
     */
    function transferToTeam (uint teamId, uint amount) public {
        // require(teamId < getNumberOfTeams()); // Does not open vulnerabilities but charities :)
        // require(amount > 0); // already tested in ERC20 token + has no sense
        require( // before calling transferToTeam, set allowance msg.sender->contractAddress in ERC20 token. 
            ERC20TokenInterface(erc20TokenAddress).transferFrom(msg.sender, address(this), amount)
        );
        storageIncTeamBalance(teamId, amount);
        TeamBalanceRefilled(teamId, msg.sender, amount);
    }

    /**
     * Destroys the current contract and moves permissions and funds to a new contract.
     * @param newDeployedTeamContracts - Deployed teams contract.
     */
    function upgrade (address newDeployedTeamContracts) dreamTeamOnly public {
        require(TeamContracts(newDeployedTeamContracts).db() == db); // Check whether the switch is performed between contracts linked to the same database
        require(TeamContracts(newDeployedTeamContracts).erc20TokenAddress() == erc20TokenAddress); // Check whether they share the same token as well
        // However, the owner of the contract can be different in the new contract, no restrictions apply here
        StorageInterface(db).transferOwnership(newDeployedTeamContracts); // Revoke access from the current contract and grant access to a new one
        ERC20TokenInterface(erc20TokenAddress).transfer(newDeployedTeamContracts, ERC20TokenInterface(erc20TokenAddress).balanceOf(this)); // Move all funds to a new contract
        selfdestruct(newDeployedTeamContracts);
    }

}

Contract ABI

[{"constant":true,"inputs":[{"name":"teamId","type":"uint256"}],"name":"getTeam","outputs":[{"name":"memberAccounts","type":"address[]"},{"name":"payoutDate","type":"uint256[]"},{"name":"agreementMinutes","type":"uint256[]"},{"name":"agreementValue","type":"uint256[]"},{"name":"singleTermAgreement","type":"bool[]"},{"name":"teamBalance","type":"uint256"},{"name":"teamOwner","type":"address"},{"name":"contractIds","type":"uint256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"dreamTeamAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newDeployedTeamContracts","type":"address"}],"name":"upgrade","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"db","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getNumberOfTeams","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"teamId","type":"uint256"},{"name":"contractId","type":"uint256"}],"name":"removeMember","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"teamOwnerAccount","type":"address"}],"name":"createTeam","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"teamIds","type":"uint256[]"}],"name":"batchPayout","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"teamId","type":"uint256"}],"name":"payout","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"teamId","type":"uint256"},{"name":"memberAccount","type":"address"},{"name":"agreementMinutes","type":"uint256"},{"name":"agreementValue","type":"uint256"},{"name":"singleTermAgreement","type":"bool"},{"name":"contractId","type":"uint256"}],"name":"addMember","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"teamId","type":"uint256"},{"name":"amount","type":"uint256"}],"name":"transferToTeam","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"erc20TokenAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"dt","type":"address"},{"name":"token","type":"address"},{"name":"dbAddress","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"teamId","type":"uint256"}],"name":"TeamCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"contractId","type":"uint256"}],"name":"TeamMemberAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"teamId","type":"uint256"},{"indexed":false,"name":"payer","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"TeamBalanceRefilled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"contractId","type":"uint256"},{"indexed":false,"name":"amountPaidToMember","type":"uint256"},{"indexed":false,"name":"amountReturnedToTeam","type":"uint256"}],"name":"TeamMemberRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"contractId","type":"uint256"},{"indexed":false,"name":"amount","type":"uint256"},{"indexed":false,"name":"triggeredBy","type":"address"}],"name":"Payout","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"contractId","type":"uint256"},{"indexed":false,"name":"extended","type":"bool"}],"name":"ContractCompleted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"contractId","type":"uint256"}],"name":"ContractProlongationFailed","type":"event"}]

Contract Creation Code

6060604052341561000f57600080fd5b60405160608061326583398101604052808051919060200180519190602001805160028054600160a060020a0319908116600160a060020a039788161790915560018054821695871695909517909455600080549094169416939093178255506131e59150819061008090396000f30060606040526004361061009f5763ffffffff60e060020a6000350416628e0f1b81146100a457806304b38d76146102875780630900f010146102b65780634d655aff146102d757806351919abc146102ea5780635cb2384c1461030f578063adfb881e14610328578063dff825cd14610347578063e115234314610396578063f0af52f6146103ac578063f21e7d74146103dc578063f835cd3c146103f5575b600080fd5b34156100af57600080fd5b6100ba600435610408565b60405180806020018060200180602001806020018060200189815260200188600160a060020a0316600160a060020a031681526020018060200187810387528f818151815260200191508051906020019060200280838360005b8381101561012c578082015183820152602001610114565b5050505090500187810386528e818151815260200191508051906020019060200280838360005b8381101561016b578082015183820152602001610153565b5050505090500187810385528d818151815260200191508051906020019060200280838360005b838110156101aa578082015183820152602001610192565b5050505090500187810384528c818151815260200191508051906020019060200280838360005b838110156101e95780820151838201526020016101d1565b5050505090500187810383528b818151815260200191508051906020019060200280838360005b83811015610228578082015183820152602001610210565b50505050905001878103825288818151815260200191508051906020019060200280838360005b8381101561026757808201518382015260200161024f565b505050509050019e50505050505050505050505050505060405180910390f35b341561029257600080fd5b61029a610bd5565b604051600160a060020a03909116815260200160405180910390f35b34156102c157600080fd5b6102d5600160a060020a0360043516610be4565b005b34156102e257600080fd5b61029a610e4e565b34156102f557600080fd5b6102fd610e5d565b60405190815260200160405180910390f35b341561031a57600080fd5b6102d5600435602435610ef7565b341561033357600080fd5b6102fd600160a060020a036004351661113a565b341561035257600080fd5b6102d5600460248135818101908301358060208181020160405190810160405280939291908181526020018383602002808284375094965061119895505050505050565b34156103a157600080fd5b6102d56004356111ce565b34156103b757600080fd5b6102d5600435600160a060020a0360243516604435606435608435151560a435611424565b34156103e757600080fd5b6102d560043560243561148d565b341561040057600080fd5b61029a611572565b6104106131a7565b6104186131a7565b6104206131a7565b6104286131a7565b6104306131a7565b60008061043b6131a7565b600080548190600160a060020a031663bd02d0f5828d6040518083600281111561046157fe5b60ff1660f860020a02815260010182815260200192505050604051809103902060006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b15156104c057600080fd5b6102c65a03f115156104d157600080fd5b505050604051805190509150816040518059106104eb5750595b908082528060200260200182016040525099508160405180591061050c5750595b908082528060200260200182016040525098508160405180591061052d5750595b908082528060200260200182016040525097508160405180591061054e5750595b908082528060200260200182016040525096508160405180591061056f5750595b9080825280602002602001820160405250600054909650600160a060020a031663bd02d0f560028d604051808360028111156105a757fe5b60ff1660f860020a02815260010182815260200192505050604051809103902060006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b151561060657600080fd5b6102c65a03f1151561061757600080fd5b5050506040518051600054909650600160a060020a031690506321f8a72160018d6040518083600281111561064857fe5b60ff1660f860020a02815260010182815260200192505050604051809103902060006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b15156106a757600080fd5b6102c65a03f115156106b857600080fd5b505050604051805190509350816040518059106106d25750595b90808252806020026020018201604052509250600090505b81811015610bc85760008054600160a060020a0316906321f8a721908d846040518084600281111561071857fe5b60ff1660f860020a0281526001018381526020018281526020019350505050604051809103902060006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b151561077e57600080fd5b6102c65a03f1151561078f57600080fd5b505050604051805190508a82815181106107a557fe5b600160a060020a0392831660209182029092010152600080549091169063bd02d0f5908d846002604051808560028111156107dc57fe5b60ff1660f860020a02815260010184815260200183815260200182600281111561080257fe5b60ff1660f860020a028152600101945050505050604051809103902060006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b151561085d57600080fd5b6102c65a03f1151561086e57600080fd5b5050506040518051905089828151811061088457fe5b6020908102909101015260008054600160a060020a03169063bd02d0f5908d8482604051808560028111156108b557fe5b60ff1660f860020a0281526001018481526020018381526020018260028111156108db57fe5b60ff1660f860020a028152600101945050505050604051809103902060006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b151561093657600080fd5b6102c65a03f1151561094757600080fd5b5050506040518051905088828151811061095d57fe5b6020908102909101015260008054600160a060020a03169063bd02d0f5908d8460016040518085600281111561098f57fe5b60ff1660f860020a0281526001018481526020018381526020018260028111156109b557fe5b60ff1660f860020a028152600101945050505050604051809103902060006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b1515610a1057600080fd5b6102c65a03f11515610a2157600080fd5b50505060405180519050878281518110610a3757fe5b6020908102909101015260008054600160a060020a031690633848207a908d8460405180846002811115610a6757fe5b60ff1660f860020a0281526001018381526020018281526020019350505050604051809103902060006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b1515610acd57600080fd5b6102c65a03f11515610ade57600080fd5b50505060405180519050868281518110610af457fe5b91151560209283029091019091015260008054600160a060020a03169063bd02d0f5908d8460405180846002811115610b2957fe5b60ff1660f860020a0281526001018381526020018281526020019350505050604051809103902060006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b1515610b8f57600080fd5b6102c65a03f11515610ba057600080fd5b50505060405180519050838281518110610bb657fe5b602090810290910101526001016106ea565b5050919395975091939597565b600254600160a060020a031681565b60025433600160a060020a03908116911614610bff57600080fd5b60008054600160a060020a039081169190831690634d655aff90604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515610c4e57600080fd5b6102c65a03f11515610c5f57600080fd5b50505060405180519050600160a060020a0316141515610c7e57600080fd5b600154600160a060020a0390811690821663f835cd3c6000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515610ccb57600080fd5b6102c65a03f11515610cdc57600080fd5b50505060405180519050600160a060020a0316141515610cfb57600080fd5b600054600160a060020a031663f2fde38b8260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401600060405180830381600087803b1515610d4b57600080fd5b6102c65a03f11515610d5c57600080fd5b5050600154600160a060020a0316905063a9059cbb82826370a082313060006040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b1515610dc057600080fd5b6102c65a03f11515610dd157600080fd5b5050506040518051905060006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b1515610e2757600080fd5b6102c65a03f11515610e3857600080fd5b50505060405180515050600160a060020a038116ff5b600054600160a060020a031681565b60008054600160a060020a031663bd02d0f58260405180826002811115610e8057fe5b60ff1660f860020a028152600101915050604051809103902060006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b1515610ed857600080fd5b6102c65a03f11515610ee957600080fd5b505050604051805191505090565b600254600090819081908190819033600160a060020a03908116911614610f1d57600080fd5b610f278787611581565b9450600019851415610f3857600080fd5b610f428786611662565b935042841161101057600154600160a060020a031663a9059cbb610f66898861172b565b8460006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b1515610fb357600080fd5b6102c65a03f11515610fc457600080fd5b5050506040518051905050857f41f00253b32318e54d5f0f81f40b55b3e8ff2bfb952105868e1046b390111cfc83600060405191825260208201526040908101905180910390a2611127565b61101a87866117b6565b925061102687866117dc565b915082826105a00281151561103757fe5b0462015180428603603c8602030402905060008111156110d557600154600160a060020a031663a9059cbb61106c898861172b565b8360006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b15156110b957600080fd5b6102c65a03f115156110ca57600080fd5b505050604051805150505b818110156110e9576110e987828403611803565b857f41f00253b32318e54d5f0f81f40b55b3e8ff2bfb952105868e1046b390111cfc8283850360405191825260208201526040908101905180910390a25b611131878661193c565b50505050505050565b600254600090819033600160a060020a0390811691161461115a57600080fd5b611163836126ed565b9050807f015c069c0e6438bd2d98e0c7b6526d4f7596120b3a6ac20fd43f2aa00450b81360405160405180910390a292915050565b60005b81518110156111ca576111c28282815181106111b357fe5b906020019060200201516111ce565b60010161119b565b5050565b600080805b6111dc846128be565b81101561141e57426111ee8583611662565b11156111f957611416565b61120384826117dc565b925061120f8482612961565b600154909250600160a060020a031663a9059cbb61122d868461172b565b8560006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b151561127a57600080fd5b6102c65a03f1151561128b57600080fd5b5050506040518051905050817fd78d084c5d707305e01c7ca79e034f781ff07f60914159409de4f21fd5377c448433604051918252600160a060020a031660208201526040908101905180910390a26112e48482612986565b1561132f576112f3848261193c565b817f278d427d2c34d72a9bcdf368ac6cdb017d7521a4406a04317c555e58f75bf5806000604051901515815260200160405180910390a2611416565b82611339856129ab565b10156113b257611349848261193c565b817f278d427d2c34d72a9bcdf368ac6cdb017d7521a4406a04317c555e58f75bf5806000604051901515815260200160405180910390a2817f4dd5d182c17e392ac815df4c5f3bb9237f6adb39c9d06830008c8caf9cf5c52960405160405180910390a2611416565b6113bc84846129d0565b6113de84826113cb87856117b6565b603c026113d88886611662565b01612b9e565b817f278d427d2c34d72a9bcdf368ac6cdb017d7521a4406a04317c555e58f75bf5806001604051901515815260200160405180910390a25b6001016111d3565b50505050565b60025433600160a060020a0390811691161461143f57600080fd5b61144986846129d0565b611457868686868686612c44565b50807fbed0aa85180c0175e1371d2156b04026b53f15a9c186e24056699c135db4d47060405160405180910390a2505050505050565b600154600160a060020a03166323b872dd33308460006040516020015260405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401602060405180830381600087803b15156114f957600080fd5b6102c65a03f1151561150a57600080fd5b50505060405180519050151561151f57600080fd5b6115298282611803565b817fe215989b6fdf9c02b0e4b6dad21552c72d6888b8463076e04a2ccfa548206e133383604051600160a060020a03909216825260208201526040908101905180910390a25050565b600154600160a060020a031681565b600080805b60008054600160a060020a03169063bd02d0f5908785604051808460028111156115ac57fe5b60ff1660f860020a0281526001018381526020018281526020019350505050604051809103902060006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b151561161257600080fd5b6102c65a03f1151561162357600080fd5b50505060405180519150508381141561163e5781925061165a565b80151561164f57600019925061165a565b600190910190611586565b505092915050565b60008054600160a060020a031663bd02d0f582858560026040518085600281111561168957fe5b60ff1660f860020a0281526001018481526020018381526020018260028111156116af57fe5b60ff1660f860020a028152600101945050505050604051809103902060006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b151561170a57600080fd5b6102c65a03f1151561171b57600080fd5b5050506040518051949350505050565b60008054600160a060020a03166321f8a7218285856040518084600281111561175057fe5b60ff1660f860020a0281526001018381526020018281526020019350505050604051809103902060006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b151561170a57600080fd5b60008054600160a060020a031663bd02d0f5828585826040518085600281111561168957fe5b60008054600160a060020a031663bd02d0f582858560016040518085600281111561168957fe5b600054600160a060020a031663e2a4853a6002846040518083600281111561182757fe5b60ff1660f860020a028152600101828152602001925050506040519081900390206000548490600160a060020a031663bd02d0f56002886040518083600281111561186e57fe5b60ff1660f860020a02815260010182815260200192505050604051809103902060006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b15156118cd57600080fd5b6102c65a03f115156118de57600080fd5b505050604051805190500160405160e060020a63ffffffff851602815260048101929092526024820152604401600060405180830381600087803b151561192457600080fd5b6102c65a03f1151561193557600080fd5b5050505050565b60008054600190600160a060020a031663bd02d0f583866040518083600281111561196357fe5b60ff1660f860020a02815260010182815260200192505050604051809103902060006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b15156119c257600080fd5b6102c65a03f115156119d357600080fd5b505050604051805190500390508082111515156119ef57600080fd5b60008054600160a060020a03169063ca446dd990858560405180846002811115611a1557fe5b60ff1660f860020a028152600101838152602001828152602001935050505060405190819003902060008054600160a060020a0316906321f8a72190888760405180846002811115611a6357fe5b60ff1660f860020a0281526001018381526020018281526020019350505050604051809103902060006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b1515611ac957600080fd5b6102c65a03f11515611ada57600080fd5b5050506040518051905060405160e060020a63ffffffff85160281526004810192909252600160a060020a03166024820152604401600060405180830381600087803b1515611b2857600080fd5b6102c65a03f11515611b3957600080fd5b505060008054600160a060020a0316915063ca446dd990858460405180846002811115611b6257fe5b60ff1660f860020a02815260010183815260200182815260200193505050506040518091039020600060405160e060020a63ffffffff85160281526004810192909252600160a060020a03166024820152604401600060405180830381600087803b1515611bcf57600080fd5b6102c65a03f11515611be057600080fd5b505060008054600160a060020a0316915063e2a4853a9085858260405180856002811115611c0a57fe5b60ff1660f860020a028152600101848152602001838152602001826002811115611c3057fe5b60ff1660f860020a02815260010194505050505060405190819003902060008054600160a060020a03169063bd02d0f59088878260405180856002811115611c7457fe5b60ff1660f860020a028152600101848152602001838152602001826002811115611c9a57fe5b60ff1660f860020a028152600101945050505050604051809103902060006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b1515611cf557600080fd5b6102c65a03f11515611d0657600080fd5b5050506040518051905060405160e060020a63ffffffff851602815260048101929092526024820152604401600060405180830381600087803b1515611d4b57600080fd5b6102c65a03f11515611d5c57600080fd5b505060008054600160a060020a0316915063e2a4853a9085848260405180856002811115611d8657fe5b60ff1660f860020a028152600101848152602001838152602001826002811115611dac57fe5b60ff1660f860020a0281526001019450505050506040518091039020600060405160e060020a63ffffffff851602815260048101929092526024820152604401600060405180830381600087803b1515611e0557600080fd5b6102c65a03f11515611e1657600080fd5b505060008054600160a060020a0316915063e2a4853a908585600160405180856002811115611e4157fe5b60ff1660f860020a028152600101848152602001838152602001826002811115611e6757fe5b60ff1660f860020a02815260010194505050505060405190819003902060008054600160a060020a03169063bd02d0f5908887600160405180856002811115611eac57fe5b60ff1660f860020a028152600101848152602001838152602001826002811115611ed257fe5b60ff1660f860020a028152600101945050505050604051809103902060006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b1515611f2d57600080fd5b6102c65a03f11515611f3e57600080fd5b5050506040518051905060405160e060020a63ffffffff851602815260048101929092526024820152604401600060405180830381600087803b1515611f8357600080fd5b6102c65a03f11515611f9457600080fd5b505060008054600160a060020a0316915063e2a4853a908584600160405180856002811115611fbf57fe5b60ff1660f860020a028152600101848152602001838152602001826002811115611fe557fe5b60ff1660f860020a0281526001019450505050506040518091039020600060405160e060020a63ffffffff851602815260048101929092526024820152604401600060405180830381600087803b151561203e57600080fd5b6102c65a03f1151561204f57600080fd5b505060008054600160a060020a0316915063e2a4853a90858560026040518085600281111561207a57fe5b60ff1660f860020a0281526001018481526020018381526020018260028111156120a057fe5b60ff1660f860020a02815260010194505050505060405190819003902060008054600160a060020a03169063bd02d0f59088876002604051808560028111156120e557fe5b60ff1660f860020a02815260010184815260200183815260200182600281111561210b57fe5b60ff1660f860020a028152600101945050505050604051809103902060006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b151561216657600080fd5b6102c65a03f1151561217757600080fd5b5050506040518051905060405160e060020a63ffffffff851602815260048101929092526024820152604401600060405180830381600087803b15156121bc57600080fd5b6102c65a03f115156121cd57600080fd5b505060008054600160a060020a0316915063e2a4853a9085846002604051808560028111156121f857fe5b60ff1660f860020a02815260010184815260200183815260200182600281111561221e57fe5b60ff1660f860020a0281526001019450505050506040518091039020600060405160e060020a63ffffffff851602815260048101929092526024820152604401600060405180830381600087803b151561227757600080fd5b6102c65a03f1151561228857600080fd5b505060008054600160a060020a0316915063e2a4853a908585604051808460028111156122b157fe5b60ff1660f860020a028152600101838152602001828152602001935050505060405190819003902060008054600160a060020a03169063bd02d0f5908887604051808460028111156122ff57fe5b60ff1660f860020a0281526001018381526020018281526020019350505050604051809103902060006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b151561236557600080fd5b6102c65a03f1151561237657600080fd5b5050506040518051905060405160e060020a63ffffffff851602815260048101929092526024820152604401600060405180830381600087803b15156123bb57600080fd5b6102c65a03f115156123cc57600080fd5b505060008054600160a060020a0316915063e2a4853a908584604051808460028111156123f557fe5b60ff1660f860020a02815260010183815260200182815260200193505050506040518091039020600060405160e060020a63ffffffff851602815260048101929092526024820152604401600060405180830381600087803b151561245957600080fd5b6102c65a03f1151561246a57600080fd5b505060008054600160a060020a0316915063f8715b3e9085856040518084600281111561249357fe5b60ff1660f860020a028152600101838152602001828152602001935050505060405190819003902060008054600160a060020a031690633848207a908887604051808460028111156124e157fe5b60ff1660f860020a0281526001018381526020018281526020019350505050604051809103902060006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b151561254757600080fd5b6102c65a03f1151561255857600080fd5b5050506040518051905060405160e060020a63ffffffff8516028152600481019290925215156024820152604401600060405180830381600087803b151561259f57600080fd5b6102c65a03f115156125b057600080fd5b505060008054600160a060020a0316915063f8715b3e908584604051808460028111156125d957fe5b60ff1660f860020a02815260010183815260200182815260200193505050506040518091039020600060405160e060020a63ffffffff8516028152600481019290925215156024820152604401600060405180830381600087803b151561263f57600080fd5b6102c65a03f1151561265057600080fd5b505060008054600160a060020a0316915063e2a4853a90856040518083600281111561267857fe5b60ff1660f860020a0281526001018281526020019250505060405180910390208360405160e060020a63ffffffff851602815260048101929092526024820152604401600060405180830381600087803b15156126d457600080fd5b6102c65a03f115156126e557600080fd5b505050505050565b600080548190600160a060020a031663bd02d0f5826040518082600281111561271257fe5b60ff1660f860020a028152600101915050604051809103902060006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b151561276a57600080fd5b6102c65a03f1151561277b57600080fd5b505050604051805160008054919350600160a060020a03909116915063e2a4853a90604051808260028111156127ad57fe5b60ff1660f860020a02815260010191505060405180910390208360010160405160e060020a63ffffffff851602815260048101929092526024820152604401600060405180830381600087803b151561280557600080fd5b6102c65a03f1151561281657600080fd5b5050600054600160a060020a0316905063ca446dd96001836040518083600281111561283e57fe5b60ff1660f860020a0281526001018281526020019250505060405180910390208560405160e060020a63ffffffff85160281526004810192909252600160a060020a03166024820152604401600060405180830381600087803b15156128a357600080fd5b6102c65a03f115156128b457600080fd5b5091949350505050565b60008054600160a060020a031663bd02d0f58284604051808360028111156128e257fe5b60ff1660f860020a02815260010182815260200192505050604051809103902060006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b151561294157600080fd5b6102c65a03f1151561295257600080fd5b50505060405180519392505050565b60008054600160a060020a031663bd02d0f58285856040518084600281111561175057fe5b60008054600160a060020a0316633848207a8285856040518084600281111561175057fe5b60008054600160a060020a031663bd02d0f5600284604051808360028111156128e257fe5b6000548190600160a060020a031663bd02d0f5600285604051808360028111156129f657fe5b60ff1660f860020a02815260010182815260200192505050604051809103902060006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b1515612a5557600080fd5b6102c65a03f11515612a6657600080fd5b5050506040518051905010151515612a7d57600080fd5b600054600160a060020a031663e2a4853a60028460405180836002811115612aa157fe5b60ff1660f860020a028152600101828152602001925050506040519081900390206000548490600160a060020a031663bd02d0f560028860405180836002811115612ae857fe5b60ff1660f860020a02815260010182815260200192505050604051809103902060006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b1515612b4757600080fd5b6102c65a03f11515612b5857600080fd5b505050604051805190500360405160e060020a63ffffffff851602815260048101929092526024820152604401600060405180830381600087803b151561192457600080fd5b60008054600160a060020a03169063e2a4853a908585600260405180856002811115612bc657fe5b60ff1660f860020a028152600101848152602001838152602001826002811115612bec57fe5b60ff1660f860020a02815260010194505050505060405180910390208360405160e060020a63ffffffff851602815260048101929092526024820152604401600060405180830381600087803b15156126d457600080fd5b600080548190600160a060020a031663bd02d0f5828a60405180836002811115612c6a57fe5b60ff1660f860020a02815260010182815260200192505050604051809103902060006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b1515612cc957600080fd5b6102c65a03f11515612cda57600080fd5b505050604051805160008054919350600160a060020a03909116915063ca446dd9908a8460405180846002811115612d0e57fe5b60ff1660f860020a028152600101838152602001828152602001935050505060405180910390208960405160e060020a63ffffffff85160281526004810192909252600160a060020a03166024820152604401600060405180830381600087803b1515612d7a57600080fd5b6102c65a03f11515612d8b57600080fd5b505060008054600160a060020a0316915063e2a4853a908a848260405180856002811115612db557fe5b60ff1660f860020a028152600101848152602001838152602001826002811115612ddb57fe5b60ff1660f860020a02815260010194505050505060405180910390208860405160e060020a63ffffffff851602815260048101929092526024820152604401600060405180830381600087803b1515612e3357600080fd5b6102c65a03f11515612e4457600080fd5b505060008054600160a060020a0316915063e2a4853a908a84600160405180856002811115612e6f57fe5b60ff1660f860020a028152600101848152602001838152602001826002811115612e9557fe5b60ff1660f860020a02815260010194505050505060405180910390208760405160e060020a63ffffffff851602815260048101929092526024820152604401600060405180830381600087803b1515612eed57600080fd5b6102c65a03f11515612efe57600080fd5b505060008054600160a060020a0316915063e2a4853a908a84600260405180856002811115612f2957fe5b60ff1660f860020a028152600101848152602001838152602001826002811115612f4f57fe5b60ff1660f860020a028152600101945050505050604051809103902088603c02420160405160e060020a63ffffffff851602815260048101929092526024820152604401600060405180830381600087803b1515612fac57600080fd5b6102c65a03f11515612fbd57600080fd5b505060008054600160a060020a0316915063e2a4853a908a8460405180846002811115612fe657fe5b60ff1660f860020a028152600101838152602001828152602001935050505060405180910390208560405160e060020a63ffffffff851602815260048101929092526024820152604401600060405180830381600087803b151561304957600080fd5b6102c65a03f1151561305a57600080fd5b50505083156131045760008054600160a060020a03169063f8715b3e908a846040518084600281111561308957fe5b60ff1660f860020a02815260010183815260200182815260200193505050506040518091039020600160405160e060020a63ffffffff8516028152600481019290925215156024820152604401600060405180830381600087803b15156130ef57600080fd5b6102c65a03f1151561310057600080fd5b5050505b60008054600160a060020a03169063e2a4853a908a6040518083600281111561312957fe5b60ff1660f860020a0281526001018281526020019250505060405180910390208360010160405160e060020a63ffffffff851602815260048101929092526024820152604401600060405180830381600087803b151561318857600080fd5b6102c65a03f1151561319957600080fd5b505050509695505050505050565b602060405190810160405260008152905600a165627a7a723058201aa0ea857bb3f055b88c9ef0feff0512236802f1aa987a095af4fd8245d481260029000000000000000000000000bfd04af48c978cc0d9bc5e06d9593cb4fb7f6f98000000000000000000000000671c81d8731f9582f17e7519f46243040e7d9642000000000000000000000000b4cdf2250c24de60b582b946d28f072f3ca87597

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

000000000000000000000000bfd04af48c978cc0d9bc5e06d9593cb4fb7f6f98000000000000000000000000671c81d8731f9582f17e7519f46243040e7d9642000000000000000000000000b4cdf2250c24de60b582b946d28f072f3ca87597

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000bfd04af48c978cc0d9bc5e06d9593cb4fb7f6f98
Arg [1] : 000000000000000000000000671c81d8731f9582f17e7519f46243040e7d9642
Arg [2] : 000000000000000000000000b4cdf2250c24de60b582b946d28f072f3ca87597

Swarm Source

bzzr://1aa0ea857bb3f055b88c9ef0feff0512236802f1aa987a095af4fd8245d48126
Block Age Transaction Difficulty GasUsed Reward
Block Age Uncle Number Difficulty GasUsed Reward