ETH Price: $2,688.36 (-1.79%)
Gas: 0.96 Gwei

Contract

0x68FDDc1e4588EF3f13e31CdecaC1C0ACdF2f33E8
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
0x60806040176614952023-07-10 6:29:59414 days ago1688970599IN
 Contract Creation
0 ETH0.0050060515

Advanced mode:
Parent Transaction Hash Block From To
View All Internal Transactions
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0xc0EF8a7F...f6e5EEF41
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
RPGTokenProxy

Compiler Version
v0.5.17+commit.d19bba13

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2023-07-10
*/

// SPDX-License-Identifier: MIT
pragma solidity ^0.5.0;

/**
 * @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.
     * It will not be possible to call the functions with the `onlyOwner`
     * modifier anymore.
     * @notice Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    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;
    }
    
    function initOwner(address addr) public {
        require(_owner == address(0),'initOwner can only run once');

        _transferOwnership(addr);
    }
}

interface IERC20 {
    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);

    function totalSupply() external view returns (uint256);

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

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

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

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

// File: zos-lib/contracts/upgradeability/Proxy.sol

/**
 * @title Proxy
 * @dev Implements delegation of calls to other contracts, with proper
 * forwarding of return values and bubbling of failures.
 * It defines a fallback function that delegates all calls to the address
 * returned by the abstract _implementation() internal function.
 */
contract Proxy {
  /**
   * @dev Fallback function.
   * Implemented entirely in `_fallback`.
   */
  function () payable external {
    _fallback();
  }

  /**
   * @return The Address of the implementation.
   */
  function _implementation() internal view returns (address);

  /**
   * @dev Delegates execution to an implementation contract.
   * This is a low level function that doesn't return to its internal call site.
   * It will return to the external caller whatever the implementation returns.
   * @param implementation Address to delegate.
   */
  function _delegate(address implementation) internal {
    assembly {
        let ptr := mload(0x00)
      // Copy msg.data. We take full control of memory in this inline assembly
      // block because it will not return to Solidity code. We overwrite the
      // Solidity scratch pad at memory position 0.
      calldatacopy(ptr, 0, calldatasize)

      // Call the implementation.
      // out and outsize are 0 because we don't know the size yet.
      let result := delegatecall(gas, implementation, ptr, calldatasize, 0, 0)

      // Copy the returned data.
      returndatacopy(ptr, 0, returndatasize)

      switch result
      // delegatecall returns 0 on error.
      case 0 { revert(ptr, returndatasize) }
      default { return(ptr, returndatasize) }
    }
  }

  /**
   * @dev Function that is run as the first thing in the fallback function.
   * Can be redefined in derived contracts to add functionality.
   * Redefinitions must call super._willFallback().
   */
  function _willFallback() internal {
  }

  /**
   * @dev fallback implementation.
   * Extracted to enable manual triggering.
   */
  function _fallback() internal {
    _willFallback();
    _delegate(_implementation());
  }
}

// File: openzeppelin-solidity/contracts/AddressUtils.sol

/**
 * Utility library of inline functions on addresses
 */
library AddressUtils {

  /**
   * Returns whether the target address is a contract
   * @dev This function will return false if invoked during the constructor of a contract,
   * as the code is not actually created until after the constructor finishes.
   * @param addr address to check
   * @return whether the target address is a contract
   */
  function isContract(address addr) internal view returns (bool) {
    uint256 size;
    // XXX Currently there is no better way to check if there is a contract in an address
    // than to check the size of the code at that address.
    // See https://ethereum.stackexchange.com/a/14016/36603
    // for more details about how this works.
    // TODO Check this again before the Serenity release, because all addresses will be
    // contracts then.
    // solium-disable-next-line security/no-inline-assembly
    assembly { size := extcodesize(addr) }
    return size > 0;
  }

}

// File: zos-lib/contracts/upgradeability/UpgradeabilityProxy.sol

/**
 * @title UpgradeabilityProxy
 * @dev This contract implements a proxy that allows to change the
 * implementation address to which it will delegate.
 * Such a change is called an implementation upgrade.
 */
contract UpgradeabilityProxy is Proxy {
  /**
   * @dev Emitted when the implementation is upgraded.
   * @param implementation Address of the new implementation.
   */
  event Upgraded(address implementation);

  /**
   * @dev Storage slot with the address of the current implementation.
   * This is the keccak-256 hash of "org.zeppelinos.proxy.implementation", and is
   * validated in the constructor.
   */
  bytes32 private constant IMPLEMENTATION_SLOT = 0x7050c9e0f4ca769c69bd3a8ef740bc37934f8e2c036e5a723fd8ee048ed3f8c3;

  /**
   * @dev Contract constructor.
   * @param _implementation Address of the initial implementation.
   */
  constructor(address _implementation) public {
    assert(IMPLEMENTATION_SLOT == keccak256("org.zeppelinos.proxy.implementation"));

    _setImplementation(_implementation);
  }

  /**
   * @dev Returns the current implementation.
   * @return Address of the current implementation
   */
  function _implementation() internal view returns (address impl) {
    bytes32 slot = IMPLEMENTATION_SLOT;
    assembly {
      impl := sload(slot)
    }
  }

  /**
   * @dev Upgrades the proxy to a new implementation.
   * @param newImplementation Address of the new implementation.
   */
  function _upgradeTo(address newImplementation) internal {
    _setImplementation(newImplementation);
    emit Upgraded(newImplementation);
  }

  /**
   * @dev Sets the implementation address of the proxy.
   * @param newImplementation Address of the new implementation.
   */
  function _setImplementation(address newImplementation) private {
    require(AddressUtils.isContract(newImplementation), "Cannot set a proxy implementation to a non-contract address");

    bytes32 slot = IMPLEMENTATION_SLOT;

    assembly {
      sstore(slot, newImplementation)
    }
  }
}

// File: zos-lib/contracts/upgradeability/AdminUpgradeabilityProxy.sol

/**
 * @title AdminUpgradeabilityProxy
 * @dev This contract combines an upgradeability proxy with an authorization
 * mechanism for administrative tasks.
 * All external functions in this contract must be guarded by the
 * `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity
 * feature proposal that would enable this to be done automatically.
 */
contract AdminUpgradeabilityProxy is UpgradeabilityProxy {
  /**
   * @dev Emitted when the administration has been transferred.
   * @param previousAdmin Address of the previous admin.
   * @param newAdmin Address of the new admin.
   */
  event AdminChanged(address previousAdmin, address newAdmin);

  /**
   * @dev Storage slot with the admin of the contract.
   * This is the keccak-256 hash of "org.zeppelinos.proxy.admin", and is
   * validated in the constructor.
   */
  bytes32 private constant ADMIN_SLOT = 0x10d6a54a4754c8869d6886b5f5d7fbfa5b4522237ea5c60d11bc4e7a1ff9390b;

  /**
   * @dev Modifier to check whether the `msg.sender` is the admin.
   * If it is, it will run the function. Otherwise, it will delegate the call
   * to the implementation.
   */
  modifier ifAdmin() {
    if (msg.sender == _admin()) {
      _;
    } else {
      _fallback();
    }
  }

  /**
   * Contract constructor.
   * It sets the `msg.sender` as the proxy administrator.
   * @param _implementation address of the initial implementation.
   */
  constructor(address _implementation) UpgradeabilityProxy(_implementation) public {
    assert(ADMIN_SLOT == keccak256("org.zeppelinos.proxy.admin"));

    _setAdmin(msg.sender);
  }

  /**
   * @return The address of the proxy admin.
   */
  function admin() external view returns (address) {
    return _admin();
  }

  /**
   * @return The address of the implementation.
   */
  function implementation() external view returns (address) {
    return _implementation();
  }

  /**
   * @dev Changes the admin of the proxy.
   * Only the current admin can call this function.
   * @param newAdmin Address to transfer proxy administration to.
   */
  function changeAdmin(address newAdmin) external ifAdmin {
    require(newAdmin != address(0), "Cannot change the admin of a proxy to the zero address");
    emit AdminChanged(_admin(), newAdmin);
    _setAdmin(newAdmin);
  }

  /**
   * @dev Upgrade the backing implementation of the proxy.
   * Only the admin can call this function.
   * @param newImplementation Address of the new implementation.
   */
  function upgradeTo(address newImplementation) external ifAdmin {
    _upgradeTo(newImplementation);
  }

  /**
   * @dev Upgrade the backing implementation of the proxy and call a function
   * on the new implementation.
   * This is useful to initialize the proxied contract.
   * @param newImplementation Address of the new implementation.
   * @param data Data to send as msg.data in the low level call.
   * It should include the signature and the parameters of the function to be
   * called, as described in
   * https://solidity.readthedocs.io/en/develop/abi-spec.html#function-selector-and-argument-encoding.
   */
//   function upgradeToAndCall(address newImplementation, bytes data) payable external ifAdmin {
//     _upgradeTo(newImplementation);
//     require(address(this).call.value(msg.value)(data));
//   }

  /**
   * @return The admin slot.
   */
  function _admin() internal view returns (address adm) {
    bytes32 slot = ADMIN_SLOT;
    assembly {
      adm := sload(slot)
    }
  }

  /**
   * @dev Sets the address of the proxy admin.
   * @param newAdmin Address of the new proxy admin.
   */
  function _setAdmin(address newAdmin) internal {
    bytes32 slot = ADMIN_SLOT;

    assembly {
      sstore(slot, newAdmin)
    }
  }

  /**
   * @dev Only fall back when the sender is not the admin.
   */
  function _willFallback() internal {
    //require(msg.sender != _admin(), "Cannot call fallback function from the proxy admin");
    super._willFallback();
  }
}

/**
* Copyright CENTRE SECZ 2018
*
* Permission is hereby granted, free of charge, to any person obtaining a copy 
* of this software and associated documentation files (the "Software"), to deal 
* in the Software without restriction, including without limitation the rights 
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 
* copies of the Software, and to permit persons to whom the Software is furnished to 
* do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all 
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

//pragma solidity ^0.5.0;


/**
 * @title RPGTokenProxy
 * @dev This contract proxies RPGToken calls and enables RPGToken upgrades
*/ 
contract RPGTokenProxy is AdminUpgradeabilityProxy {
    constructor(address _implementation) public AdminUpgradeabilityProxy(_implementation) {
    }
}

contract TokenMove is Ownable{
		address public g_Token;
		address payable public g_Fee;
		
		event E_MoveAndBurn(address from ,address to, uint256 amount,uint256 fee);
		
	constructor() public{
    }

    function init(address token,address owner,address payable feeaddr) external{
        require(token != address(0) ,'rpg address err');
        
        g_Token = token;
        g_Fee = feeaddr;
        initOwner(owner);
    }

    function MoveAndBurn(address from ,address to, uint256 amount) payable external {
        require(msg.sender == from                                     ,'MoveAndBurn msg.sender wrong');
        require(msg.value > 0										   ,'MoveAndBurn must have fee');
        require(IERC20(g_Token).balanceOf(from) >= amount              ,'MoveAndBurn balanceOf err');
        require(IERC20(g_Token).allowance(from,address(this)) >= amount,'MoveAndBurn allowance err');
        
        g_Fee.transfer(msg.value);
        IERC20(g_Token).transferFrom(from,address(this),amount);
        
        emit E_MoveAndBurn(from,to,amount,msg.value);
    }

    function Burn(uint256 amount) external onlyOwner {
        require(IERC20(g_Token).balanceOf(address(this)) >= amount,'Burn amount err');

        IERC20(g_Token).transfer(0x000000000000000000000000000000000000dEaD,amount);
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_implementation","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"constant":true,"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"newAdmin","type":"address"}],"name":"changeAdmin","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"implementation","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"newImplementation","type":"address"}],"name":"upgradeTo","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]

Deployed Bytecode

0x60806040526004361061003f5760003560e01c80633659cfe6146100495780635c60da1b1461007c5780638f283970146100ad578063f851a440146100e0575b6100476100f5565b005b34801561005557600080fd5b506100476004803603602081101561006c57600080fd5b50356001600160a01b031661010f565b34801561008857600080fd5b50610091610149565b604080516001600160a01b039092168252519081900360200190f35b3480156100b957600080fd5b50610047600480360360208110156100d057600080fd5b50356001600160a01b0316610158565b3480156100ec57600080fd5b50610091610212565b6100fd61021c565b61010d610108610224565b610249565b565b61011761026d565b6001600160a01b0316336001600160a01b0316141561013e5761013981610292565b610146565b6101466100f5565b50565b6000610153610224565b905090565b61016061026d565b6001600160a01b0316336001600160a01b0316141561013e576001600160a01b0381166101be5760405162461bcd60e51b815260040180806020018281038252603681526020018061036d6036913960400191505060405180910390fd5b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6101e761026d565b604080516001600160a01b03928316815291841660208301528051918290030190a1610139816102da565b600061015361026d565b61010d61010d565b7f7050c9e0f4ca769c69bd3a8ef740bc37934f8e2c036e5a723fd8ee048ed3f8c35490565b60005136600082376000803683855af43d6000833e808015610269573d83f35b3d83fd5b7f10d6a54a4754c8869d6886b5f5d7fbfa5b4522237ea5c60d11bc4e7a1ff9390b5490565b61029b816102fe565b604080516001600160a01b038316815290517fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b9181900360200190a150565b7f10d6a54a4754c8869d6886b5f5d7fbfa5b4522237ea5c60d11bc4e7a1ff9390b55565b61030781610366565b6103425760405162461bcd60e51b815260040180806020018281038252603b8152602001806103a3603b913960400191505060405180910390fd5b7f7050c9e0f4ca769c69bd3a8ef740bc37934f8e2c036e5a723fd8ee048ed3f8c355565b3b15159056fe43616e6e6f74206368616e6765207468652061646d696e206f6620612070726f787920746f20746865207a65726f206164647265737343616e6e6f742073657420612070726f787920696d706c656d656e746174696f6e20746f2061206e6f6e2d636f6e74726163742061646472657373a265627a7a72315820d32faf2e905ced55280c27029d7f6f66fd5bcb86e275646673f455a04b7adc3064736f6c63430005110032

Deployed Bytecode Sourcemap

13936:155:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3607:11;:9;:11::i;:::-;13936:155;11130:105;;8:9:-1;5:2;;;30:1;27;20:12;5:2;11130:105:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;11130:105:0;-1:-1:-1;;;;;11130:105:0;;:::i;10433:95::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;10433:95:0;;;:::i;:::-;;;;-1:-1:-1;;;;;10433:95:0;;;;;;;;;;;;;;10711:228;;8:9:-1;5:2;;;30:1;27;20:12;5:2;10711:228:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;10711:228:0;-1:-1:-1;;;;;10711:228:0;;:::i;10287:77::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;10287:77:0;;;:::i;5195:93::-;5232:15;:13;:15::i;:::-;5254:28;5264:17;:15;:17::i;:::-;5254:9;:28::i;:::-;5195:93::o;11130:105::-;9794:8;:6;:8::i;:::-;-1:-1:-1;;;;;9780:22:0;:10;-1:-1:-1;;;;;9780:22:0;;9776:80;;;11200:29;11211:17;11200:10;:29::i;:::-;9776:80;;;9837:11;:9;:11::i;:::-;11130:105;:::o;10433:95::-;10482:7;10505:17;:15;:17::i;:::-;10498:24;;10433:95;:::o;10711:228::-;9794:8;:6;:8::i;:::-;-1:-1:-1;;;;;9780:22:0;:10;-1:-1:-1;;;;;9780:22:0;;9776:80;;;-1:-1:-1;;;;;10782:22:0;;10774:89;;;;-1:-1:-1;;;10774:89:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10875:32;10888:8;:6;:8::i;:::-;10875:32;;;-1:-1:-1;;;;;10875:32:0;;;;;;;;;;;;;;;;;;;;;10914:19;10924:8;10914:9;:19::i;10287:77::-;10327:7;10350:8;:6;:8::i;12502:162::-;12637:21;:19;:21::i;7621:161::-;7134:66;7759:11;;7742:35::o;4046:792::-;4142:4;4136:11;4387:12;4384:1;4379:3;4366:34;4583:1;4580;4566:12;4561:3;4545:14;4540:3;4527:58;4652:14;4649:1;4644:3;4629:38;4684:6;4741:38;;;;4809:14;4804:3;4797:27;4741:38;4762:14;4757:3;4750:27;12020:141;9487:66;12138:11;;12122:34::o;7923:145::-;7986:37;8005:17;7986:18;:37::i;:::-;8035:27;;;-1:-1:-1;;;;;8035:27:0;;;;;;;;;;;;;;;7923:145;:::o;12283:139::-;9487:66;12388:22;12379:38::o;8211:297::-;8289:42;8313:17;8289:23;:42::i;:::-;8281:114;;;;-1:-1:-1;;;8281:114:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7134:66;8465:31;8456:47::o;5778:587::-;6319:17;6351:8;;;5778:587::o

Swarm Source

bzzr://d32faf2e905ced55280c27029d7f6f66fd5bcb86e275646673f455a04b7adc30

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.