Sponsored:   VC, TLDR and CoinBene Funded "TEMCO: Bitcoin Network (RSK) Suppy Chain! Whitelist KYC Starts Now!!"
Contract Overview
Balance: 0 Ether
Ether Value: $0
Transactions: 148 txns
Misc:
Address Watch: Add To Watch List
Contract Creator: 0xedbbdf2c29ccf6a0272b36b10eadc1b17b8d7e67at txn 0x180ddfb1138c97212919c8e7e4a4e27b6f91df5ce6a54fbdbecdbd45fcdb84c2
Token Balance:
 Latest 25 transactions from a total of 148 transactions
(+1 PendingTxn)

TxHash Age From To Value [TxFee]
0xe042a2bc832ad80de89c48775400e4c4d58041e7710bdbac3328c023fe3ff1da(pending)0xcda5b960dfc27e0906864931e9eb9b8cb4aa562e  IN  0x56c945f90c9cd1aafbcac78936f569e5fd2438bf0 Ether(Pending)
0x0ac15693f8b6101dde24e90118a8ace2e953c8afc6ba1618b65f2b8f281201d51 day 23 hrs ago0x7e00531e14aab83176ec492f6e036ed0722b78d6  IN   0x56c945f90c9cd1aafbcac78936f569e5fd2438bf0 Ether0.000711426
0x71c5f45aa8403e7dbde76deb322dfc5674abb7b1660416e3b1389b1c1177a0261 day 23 hrs ago0x7e00531e14aab83176ec492f6e036ed0722b78d6  IN   0x56c945f90c9cd1aafbcac78936f569e5fd2438bf0 Ether0.000681426
0x5e36a5ddb15ee44a18706d25e04353bc9bca6be4869a3491d5d3395cf176a9942 days 3 hrs ago0x7dbd5f2826a77a8429bd3d87f4cffc44f970bf2b  IN   0x56c945f90c9cd1aafbcac78936f569e5fd2438bf0 Ether0.003201993
0x539096b59e0a1a58cf79540e8a661fedd46d19e8ccc3c1f6479579b7ad941f1d3 days 2 hrs ago0x7e00531e14aab83176ec492f6e036ed0722b78d6  IN   0x56c945f90c9cd1aafbcac78936f569e5fd2438bf0 Ether0.001022331
0xa887b1611c04f1af150b301f02744220f5916a1bcb50d7401be5f7b67ef8faf43 days 9 hrs ago0xe9c2fc60b27fdc7e0b48c49c481f6bc4e9720c54  IN   0x56c945f90c9cd1aafbcac78936f569e5fd2438bf0 Ether0.000197296
0xe839b96aa655ef9d439514acea2d59e8264fa825a464028cc8487d226725dbc93 days 9 hrs ago0xe9c2fc60b27fdc7e0b48c49c481f6bc4e9720c54  IN   0x56c945f90c9cd1aafbcac78936f569e5fd2438bf0 Ether0.00012331
0xfd4b99fcd92d020c8e3454a1fc84407d7266bd5a46838499c27c8e304c7d2dfe3 days 9 hrs ago0xe9c2fc60b27fdc7e0b48c49c481f6bc4e9720c54  IN   0x56c945f90c9cd1aafbcac78936f569e5fd2438bf0 Ether0.00012331
0xbea02b6c0b10dd617cf479aa7ab3c89e7ac4ced76080c38dce08877fcad972583 days 10 hrs ago0xe9c2fc60b27fdc7e0b48c49c481f6bc4e9720c54  IN   0x56c945f90c9cd1aafbcac78936f569e5fd2438bf0 Ether0.000197296
0xab7b4da98ea69ae5f0d7b78fd9925a49f28384ae0cc254dfd49f5fa2c2f2ef8a3 days 10 hrs ago0xe9c2fc60b27fdc7e0b48c49c481f6bc4e9720c54  IN   0x56c945f90c9cd1aafbcac78936f569e5fd2438bf0 Ether0.000098648
0xf9a766f6554ae43ad606dec45ae9e69f018558aab7f9d159802b6b2cad9867983 days 10 hrs ago0xe9c2fc60b27fdc7e0b48c49c481f6bc4e9720c54  IN   0x56c945f90c9cd1aafbcac78936f569e5fd2438bf0 Ether0.00012331
0x2c5e1b784f607d871ceb9cc4e61b1871495a546c09540cf3d447c97c925d08163 days 10 hrs ago0xe9c2fc60b27fdc7e0b48c49c481f6bc4e9720c54  IN   0x56c945f90c9cd1aafbcac78936f569e5fd2438bf0 Ether0.000098648
0xf9f377658118577149364c50aead76e1cec7b54caf91f340aa00fb66004b92e13 days 10 hrs ago0xe9c2fc60b27fdc7e0b48c49c481f6bc4e9720c54  IN   0x56c945f90c9cd1aafbcac78936f569e5fd2438bf0 Ether0.000098648
0x11260b6950f71dfa0a72c9ce3c7343ebf4dd247e1e1be6d29188b119379e48633 days 10 hrs ago0xe9c2fc60b27fdc7e0b48c49c481f6bc4e9720c54  IN   0x56c945f90c9cd1aafbcac78936f569e5fd2438bf0 Ether0.000098648
0x6b7f6de38dfc669233c475eaf3fe83ffa0311eb143579d429400090402680a8c3 days 10 hrs ago0xe9c2fc60b27fdc7e0b48c49c481f6bc4e9720c54  IN   0x56c945f90c9cd1aafbcac78936f569e5fd2438bf0 Ether0.000098648
0x4103ccf303d31edbd1e9be5ed492240aa454dd05a401c397537d56e41c5475773 days 10 hrs ago0xe9c2fc60b27fdc7e0b48c49c481f6bc4e9720c54  IN   0x56c945f90c9cd1aafbcac78936f569e5fd2438bf0 Ether0.00012331
0x6588fe286247ea3913487fea00efac128107b2f245591dd7e5bc120b6dfc8cf83 days 10 hrs ago0xe9c2fc60b27fdc7e0b48c49c481f6bc4e9720c54  IN   0x56c945f90c9cd1aafbcac78936f569e5fd2438bf0 Ether0.00012331
0xccd97d9bcdf1de32d93988b00f24e990400b82eb37c0e1f3198ad4673b12a1af3 days 10 hrs ago0xe9c2fc60b27fdc7e0b48c49c481f6bc4e9720c54  IN   0x56c945f90c9cd1aafbcac78936f569e5fd2438bf0 Ether0.000098648
0x240c0fb167bb4acda9fda9d792a260ec883cae42a928202f2c842f59929a4cfc3 days 10 hrs ago0xe9c2fc60b27fdc7e0b48c49c481f6bc4e9720c54  IN   0x56c945f90c9cd1aafbcac78936f569e5fd2438bf0 Ether0.000049324
0x9f8a6122c67761f9129bd7392da533bfb9b076aff56121334bb8584a8c02cc763 days 10 hrs ago0xe9c2fc60b27fdc7e0b48c49c481f6bc4e9720c54  IN   0x56c945f90c9cd1aafbcac78936f569e5fd2438bf0 Ether0.001423108
0x470c631e8fee0d6bb3952942f243e785b1d8101e731e7beadab6e519f17ab7fa3 days 10 hrs ago0xe9c2fc60b27fdc7e0b48c49c481f6bc4e9720c54  IN   0x56c945f90c9cd1aafbcac78936f569e5fd2438bf0 Ether0.002224662
0x1d0a48f2920d856588f84e602e1f239bbd0838f489ccc24746af72fabd15e5f73 days 10 hrs ago0xe9c2fc60b27fdc7e0b48c49c481f6bc4e9720c54  IN   0x56c945f90c9cd1aafbcac78936f569e5fd2438bf0 Ether0.000073986
0x976b6c13664aee21ea009972a2a2f6191cbc2f8e54c25f39c6fff649171f04243 days 10 hrs ago0xe9c2fc60b27fdc7e0b48c49c481f6bc4e9720c54  IN   0x56c945f90c9cd1aafbcac78936f569e5fd2438bf0 Ether0.001022331
0xcad5dc8fb3ef0eca4ca486a891e4a4c79248d527accb707f1eeafe6c20452b184 days 4 hrs ago0xfddb7e89b9d0b6c66ce3d3eda3087e75a83f119a  IN   0x56c945f90c9cd1aafbcac78936f569e5fd2438bf0 Ether0.001628565
0x18e939b40f3a6f91583ef0fec31104327b1b50738e4f455de572bedfc87429e54 days 4 hrs ago0xfddb7e89b9d0b6c66ce3d3eda3087e75a83f119a  IN   0x56c945f90c9cd1aafbcac78936f569e5fd2438bf0 Ether0.001703885
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
View All
ParentTxHash Block Age From To Value
Contract Source Code Verified (Exact Match)
Contract Name: HeroUp
Compiler Text: v0.4.25+commit.59dbf8f1
Optimization Enabled: Yes
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

pragma solidity ^0.4.24;

// File: node_modules/openzeppelin-solidity/contracts/ownership/Ownable.sol

/**
 * @title Ownable
 * @dev The Ownable contract has an owner address, and provides basic authorization control
 * functions, this simplifies the implementation of "user permissions".
 */
contract Ownable {
  address private _owner;

  event OwnershipTransferred(
    address indexed previousOwner,
    address indexed newOwner
  );

  /**
   * @dev The Ownable constructor sets the original `owner` of the contract to the sender
   * account.
   */
  constructor() internal {
    _owner = msg.sender;
    emit OwnershipTransferred(address(0), _owner);
  }

  /**
   * @return the address of the owner.
   */
  function owner() public view returns(address) {
    return _owner;
  }

  /**
   * @dev Throws if called by any account other than the owner.
   */
  modifier onlyOwner() {
    require(isOwner());
    _;
  }

  /**
   * @return true if `msg.sender` is the owner of the contract.
   */
  function isOwner() public view returns(bool) {
    return msg.sender == _owner;
  }

  /**
   * @dev Allows the current owner to relinquish control of the contract.
   * @notice Renouncing to ownership will leave the contract without an owner.
   * It will not be possible to call the functions with the `onlyOwner`
   * modifier anymore.
   */
  function renounceOwnership() public onlyOwner {
    emit OwnershipTransferred(_owner, address(0));
    _owner = address(0);
  }

  /**
   * @dev Allows the current owner to transfer control of the contract to a newOwner.
   * @param newOwner The address to transfer ownership to.
   */
  function transferOwnership(address newOwner) public onlyOwner {
    _transferOwnership(newOwner);
  }

  /**
   * @dev Transfers control of the contract to a newOwner.
   * @param newOwner The address to transfer ownership to.
   */
  function _transferOwnership(address newOwner) internal {
    require(newOwner != address(0));
    emit OwnershipTransferred(_owner, newOwner);
    _owner = newOwner;
  }
}

// File: node_modules/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol

/**
 * @title ERC20 interface
 * @dev see https://github.com/ethereum/EIPs/issues/20
 */
interface IERC20 {
  function totalSupply() external view returns (uint256);

  function balanceOf(address who) external view returns (uint256);

  function allowance(address owner, address spender)
    external view returns (uint256);

  function transfer(address to, uint256 value) external returns (bool);

  function approve(address spender, uint256 value)
    external returns (bool);

  function transferFrom(address from, address to, uint256 value)
    external returns (bool);

  event Transfer(
    address indexed from,
    address indexed to,
    uint256 value
  );

  event Approval(
    address indexed owner,
    address indexed spender,
    uint256 value
  );
}

// File: lib/CanReclaimToken.sol

/**
 * @title Contracts that should be able to recover tokens
 * @author SylTi
 * @dev This allow a contract to recover any ERC20 token received in a contract by transferring the balance to the contract owner.
 * This will prevent any accidental loss of tokens.
 */
contract CanReclaimToken is Ownable {

  /**
   * @dev Reclaim all ERC20 compatible tokens
   * @param token ERC20 The address of the token contract
   */
  function reclaimToken(IERC20 token) external onlyOwner {
    if (address(token) == address(0)) {
      owner().transfer(address(this).balance);
      return;
    }
    uint256 balance = token.balanceOf(this);
    token.transfer(owner(), balance);
  }

}

// File: contracts/HeroUp.sol

interface HEROES_NEW {
  function mint(address to, uint256 genes, uint256 level) external returns (uint);
  function mint(uint256 tokenId, address to, uint256 genes, uint256 level) external returns (uint);
}


interface HEROES_OLD {
  function getLock(uint256 _tokenId) external view returns (uint256 lockedTo, uint16 lockId);
  function unlock(uint256 _tokenId, uint16 _lockId) external returns (bool);
  function lock(uint256 _tokenId, uint256 _lockedTo, uint16 _lockId) external returns (bool);
  function transferFrom(address _from, address _to, uint256 _tokenId) external;
  function getCharacter(uint256 _tokenId) external view returns (uint256 genes, uint256 mintedAt, uint256 godfather, uint256 mentor, uint32 wins, uint32 losses, uint32 level, uint256 lockedTo, uint16 lockId);
  function ownerOf(uint256 _tokenId) external view returns (address);
}

contract HeroUp is Ownable, CanReclaimToken {
  event HeroUpgraded(uint tokenId, address owner);

  HEROES_OLD public heroesOld;
  HEROES_NEW public heroesNew;
  constructor (HEROES_OLD _heroesOld, HEROES_NEW _heroesNew) public {
    require(address(_heroesOld) != address(0));
    require(address(_heroesNew) != address(0));
    heroesOld = _heroesOld;
    heroesNew = _heroesNew;
  }

  function() public {}

  function setOld(HEROES_OLD _heroesOld) public onlyOwner {
    require(address(_heroesOld) != address(0));
    heroesOld = _heroesOld;
  }

  function setNew(HEROES_NEW _heroesNew) public onlyOwner {
    require(address(_heroesNew) != address(0));
    heroesNew = _heroesNew;
  }

  function upgrade(uint _tokenId) public {
    require(msg.sender == heroesOld.ownerOf(_tokenId));
    uint256 genes;
    uint32 level;
    uint256 lockedTo;
    uint16 lockId;

    //transfer old hero
    (genes,,,,,,level,lockedTo,lockId) = heroesOld.getCharacter(_tokenId);
    heroesOld.unlock(_tokenId, lockId);
    heroesOld.lock(_tokenId, 0, 999);
    heroesOld.transferFrom(msg.sender, address(this), _tokenId);
//    heroesOld.unlock(_tokenId, 999);

    //mint new hero
    heroesNew.mint(_tokenId, msg.sender, genes, level);

    emit HeroUpgraded(_tokenId, msg.sender);
  }
}

    Contract ABI  
[{"constant":false,"inputs":[{"name":"token","type":"address"}],"name":"reclaimToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_heroesOld","type":"address"}],"name":"setOld","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"upgrade","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"heroesNew","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isOwner","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"heroesOld","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_heroesNew","type":"address"}],"name":"setNew","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"_heroesOld","type":"address"},{"name":"_heroesNew","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":false,"stateMutability":"nonpayable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":false,"name":"tokenId","type":"uint256"},{"indexed":false,"name":"owner","type":"address"}],"name":"HeroUpgraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"}]

  Contract Creation Code Switch To Opcodes View
608060405234801561001057600080fd5b50604051604080610aa2833981016040819052815160209092015160008054600160a060020a03191633178082559192600160a060020a0392909216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3600160a060020a038216151561008757600080fd5b600160a060020a038116151561009c57600080fd5b60018054600160a060020a03938416600160a060020a031991821617909155600280549290931691161790556109cb806100d76000396000f3006080604052600436106100a35763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166317ffc32081146100b2578063242d81f0146100d557806345977d03146100f6578063715018a61461010e5780637c2372c9146101235780638da5cb5b146101545780638f32d59b1461016957806397ac0ff814610192578063f2fde38b146101a7578063fecb6707146101c8575b3480156100af57600080fd5b50005b3480156100be57600080fd5b506100d3600160a060020a03600435166101e9565b005b3480156100e157600080fd5b506100d3600160a060020a0360043516610397565b34801561010257600080fd5b506100d36004356103ee565b34801561011a57600080fd5b506100d3610804565b34801561012f57600080fd5b5061013861086e565b60408051600160a060020a039092168252519081900360200190f35b34801561016057600080fd5b5061013861087d565b34801561017557600080fd5b5061017e61088c565b604080519115158252519081900360200190f35b34801561019e57600080fd5b5061013861089d565b3480156101b357600080fd5b506100d3600160a060020a03600435166108ac565b3480156101d457600080fd5b506100d3600160a060020a03600435166108cb565b60006101f361088c565b15156101fe57600080fd5b600160a060020a03821615156102545761021661087d565b604051600160a060020a039190911690303180156108fc02916000818181858888f1935050505015801561024e573d6000803e3d6000fd5b50610393565b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a038416916370a082319160248083019260209291908290030181600087803b1580156102b557600080fd5b505af11580156102c9573d6000803e3d6000fd5b505050506040513d60208110156102df57600080fd5b50519050600160a060020a03821663a9059cbb6102fa61087d565b836040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561036657600080fd5b505af115801561037a573d6000803e3d6000fd5b505050506040513d602081101561039057600080fd5b50505b5050565b61039f61088c565b15156103aa57600080fd5b600160a060020a03811615156103bf57600080fd5b6001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600154604080517f6352211e000000000000000000000000000000000000000000000000000000008152600481018490529051600092839283928392600160a060020a031691636352211e91602480830192602092919082900301818787803b15801561045a57600080fd5b505af115801561046e573d6000803e3d6000fd5b505050506040513d602081101561048457600080fd5b5051600160a060020a0316331461049a57600080fd5b600154604080517fdabb0531000000000000000000000000000000000000000000000000000000008152600481018890529051600160a060020a039092169163dabb053191602480820192610120929091908290030181600087803b15801561050257600080fd5b505af1158015610516573d6000803e3d6000fd5b505050506040513d61012081101561052d57600080fd5b50805160c082015160e083015161010090930151600154604080517fd20e30bc000000000000000000000000000000000000000000000000000000008152600481018c905261ffff8416602482015290519499509297509395509350600160a060020a039092169163d20e30bc9160448083019260209291908290030181600087803b1580156105bc57600080fd5b505af11580156105d0573d6000803e3d6000fd5b505050506040513d60208110156105e657600080fd5b5050600154604080517fb8cfbe1a000000000000000000000000000000000000000000000000000000008152600481018890526000602482018190526103e760448301529151600160a060020a039093169263b8cfbe1a92606480840193602093929083900390910190829087803b15801561066157600080fd5b505af1158015610675573d6000803e3d6000fd5b505050506040513d602081101561068b57600080fd5b5050600154604080517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018890529051600160a060020a03909216916323b872dd9160648082019260009290919082900301818387803b1580156106ff57600080fd5b505af1158015610713573d6000803e3d6000fd5b5050600254604080517fbf2c8a94000000000000000000000000000000000000000000000000000000008152600481018a90523360248201526044810189905263ffffffff881660648201529051600160a060020a03909216935063bf2c8a9492506084808201926020929091908290030181600087803b15801561079757600080fd5b505af11580156107ab573d6000803e3d6000fd5b505050506040513d60208110156107c157600080fd5b50506040805186815233602082015281517fe12cc09b34032a761226d1846b0059d6f8ddae8e633ea1c24382684bd7931095929181900390910190a15050505050565b61080c61088c565b151561081757600080fd5b60008054604051600160a060020a03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36000805473ffffffffffffffffffffffffffffffffffffffff19169055565b600254600160a060020a031681565b600054600160a060020a031690565b600054600160a060020a0316331490565b600154600160a060020a031681565b6108b461088c565b15156108bf57600080fd5b6108c881610922565b50565b6108d361088c565b15156108de57600080fd5b600160a060020a03811615156108f357600080fd5b6002805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600160a060020a038116151561093757600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555600a165627a7a723058207ae8800f55be6fa56301b4b54c361b07ef0a586501cd89c17191917ecd30a12300290000000000000000000000000ba000163959726c90d41c804386d37718d5edc8000000000000000000000000d2bae9a30a40376d25353773010ffe52dba0d688

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

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000000ba000163959726c90d41c804386d37718d5edc8
Arg [1] : 000000000000000000000000d2bae9a30a40376d25353773010ffe52dba0d688


   Swarm Source:
bzzr://7ae8800f55be6fa56301b4b54c361b07ef0a586501cd89c17191917ecd30a123

 

View All
Block Age transaction Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.