ETH Price: $1,986.08 (-3.57%)

Transaction Decoder

Block:
23260891 at Aug-31-2025 11:40:35 AM +UTC
Transaction Fee:
0.000024483861844266 ETH $0.05
Gas Used:
51,411 Gas / 0.476237806 Gwei

Emitted Events:

179 OwnedUpgradeabilityProxy.0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925( 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925, 0x000000000000000000000000fa2a9354c98b09670cb2ee4e512ff9a55e5aefb4, 0x0000000000000000000000001231deb6f5749ef6ce6943a275a1d3e7486f4eae, 000000000000000000000000000000000000000000000000303a451b8b98fc00 )

Account State Difference:

  Address   Before After State Difference Code
(Titan Builder)
20.350898918235374302 Eth20.350917502749592195 Eth0.000018584514217893
0x75231F58...14342a86c
0xFA2a9354...55e5AeFB4
0.00414636 Eth
Nonce: 3
0.004121876138155734 Eth
Nonce: 4
0.000024483861844266

Execution Trace

OwnedUpgradeabilityProxy.095ea7b3( )
  • OKBImplementationV2.approve( spender=0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE, value=3475166047078251520 ) => ( True )
    File 1 of 2: OwnedUpgradeabilityProxy
    {"Address.sol":{"content":"pragma solidity ^0.4.24;\n\nlibrary Address {\n    /**\n     * Returns whether the target address is a contract\n     * @dev This function will return false if invoked during the constructor of a contract,\n     * as the code is not actually created until after the constructor finishes.\n     * @param account address of the account to check\n     * @return whether the target address is a contract\n     */\n    function isContract(address account) internal view returns (bool) {\n        uint256 size;\n        // XXX Currently there is no better way to check if there is a contract in an address\n        // than to check the size of the code at that address.\n        // See https://ethereum.stackexchange.com/a/14016/36603\n        // for more details about how this works.\n        // TODO Check this again before the Serenity release, because all addresses will be\n        // contracts then.\n        // solhint-disable-next-line no-inline-assembly\n        assembly { size := extcodesize(account) }\n        return size \u003e 0;\n    }\n}"},"OwnedUpgradeabilityProxy.sol":{"content":"pragma solidity ^0.4.24;\n\nimport \u0027./UpgradeabilityProxy.sol\u0027;\n\n\n/**\n * @title OwnedUpgradeabilityProxy\n * @dev This contract combines an upgradeability proxy with basic authorization control functionalities\n */\ncontract OwnedUpgradeabilityProxy is UpgradeabilityProxy {\n  /**\n  * @dev Event to show ownership has been transferred\n  * @param previousOwner representing the address of the previous owner\n  * @param newOwner representing the address of the new owner\n  */\n  event ProxyOwnershipTransferred(address previousOwner, address newOwner);\n\n  // Storage position of the owner of the contract\n  bytes32 private constant proxyOwnerPosition = keccak256(\"org.zeppelinos.proxy.owner\");\n\n  /**\n  * @dev the constructor sets the original owner of the contract to the sender account.\n  */\n  constructor() public {\n    setUpgradeabilityOwner(msg.sender);\n  }\n\n  /**\n  * @dev Throws if called by any account other than the owner.\n  */\n  modifier onlyProxyOwner() {\n    require(msg.sender == proxyOwner());\n    _;\n  }\n\n  /**\n   * @dev Tells the address of the owner\n   * @return the address of the owner\n   */\n  function proxyOwner() public view returns (address owner) {\n    bytes32 position = proxyOwnerPosition;\n    assembly {\n      owner := sload(position)\n    }\n  }\n\n  /**\n   * @dev Sets the address of the owner\n   */\n  function setUpgradeabilityOwner(address newProxyOwner) internal {\n    bytes32 position = proxyOwnerPosition;\n    assembly {\n      sstore(position, newProxyOwner)\n    }\n  }\n\n  /**\n   * @dev Allows the current owner to transfer control of the contract to a newOwner.\n   * @param newOwner The address to transfer ownership to.\n   */\n  function transferProxyOwnership(address newOwner) public onlyProxyOwner {\n    require(newOwner != address(0));\n    emit ProxyOwnershipTransferred(proxyOwner(), newOwner);\n    setUpgradeabilityOwner(newOwner);\n  }\n\n  /**\n   * @dev Allows the proxy owner to upgrade the current version of the proxy.\n   * @param implementation representing the address of the new implementation to be set.\n   */\n  function upgradeTo(address implementation) public onlyProxyOwner {\n    _upgradeTo(implementation);\n  }\n\n  /**\n   * @dev Allows the proxy owner to upgrade the current version of the proxy and call the new implementation\n   * to initialize whatever is needed through a low level call.\n   * @param implementation representing the address of the new implementation to be set.\n   * @param data represents the msg.data to bet sent in the low level call. This parameter may include the function\n   * signature of the implementation to be called with the needed payload\n   */\n  function upgradeToAndCall(address implementation, bytes data) payable public onlyProxyOwner {\n    upgradeTo(implementation);\n    require(implementation.delegatecall(data));\n}\n}"},"Proxy.sol":{"content":"pragma solidity ^0.4.24;\n\n/**\n * @title Proxy\n * @dev Gives the possibility to delegate any call to a foreign implementation.\n */\ncontract Proxy {\n  /**\n  * @dev Tells the address of the implementation where every call will be delegated.\n  * @return address of the implementation to which it will be delegated\n  */\n  function implementation() public view returns (address);\n\n  /**\n  * @dev Fallback function allowing to perform a delegatecall to the given implementation.\n  * This function will return whatever the implementation call returns\n  */\n  function () payable public {\n    address _impl = implementation();\n    require(_impl != address(0));\n\n    assembly {\n      let ptr := mload(0x40)\n      calldatacopy(ptr, 0, calldatasize)\n      let result := delegatecall(gas, _impl, ptr, calldatasize, 0, 0)\n      let size := returndatasize\n      returndatacopy(ptr, 0, size)\n\n      switch result\n      case 0 { revert(ptr, size) }\n      default { return(ptr, size) }\n    }\n  }\n}"},"UpgradeabilityProxy.sol":{"content":"pragma solidity ^0.4.24;\n\nimport \u0027./Proxy.sol\u0027;\nimport \u0027./Address.sol\u0027;\n\n\n/**\n * @title UpgradeabilityProxy\n * @dev This contract represents a proxy where the implementation address to which it will delegate can be upgraded\n */\ncontract UpgradeabilityProxy is Proxy {\n  /**\n   * @dev This event will be emitted every time the implementation gets upgraded\n   * @param implementation representing the address of the upgraded implementation\n   */\n  event Upgraded(address indexed implementation);\n\n  // Storage position of the address of the current implementation\n  bytes32 private constant implementationPosition = keccak256(\"org.zeppelinos.proxy.implementation\");\n\n  /**\n   * @dev Constructor function\n   */\n  constructor() public {}\n\n  /**\n   * @dev Tells the address of the current implementation\n   * @return address of the current implementation\n   */\n  function implementation() public view returns (address impl) {\n    bytes32 position = implementationPosition;\n    assembly {\n      impl := sload(position)\n    }\n  }\n\n  /**\n   * @dev Sets the address of the current implementation\n   * @param newImplementation address representing the new implementation to be set\n   */\n  function setImplementation(address newImplementation) internal {\n    require(Address.isContract(newImplementation),\"newImplementation is not a contractAddress\");\n    bytes32 position = implementationPosition;\n    assembly {\n      sstore(position, newImplementation)\n    }\n  }\n\n  /**\n   * @dev Upgrades the implementation address\n   * @param newImplementation representing the address of the new implementation to be set\n   */\n  function _upgradeTo(address newImplementation) internal {\n    address currentImplementation = implementation();\n    require(currentImplementation != newImplementation);\n    setImplementation(newImplementation);\n    emit Upgraded(newImplementation);\n  }\n}"}}

    File 2 of 2: OKBImplementationV2
    pragma solidity ^0.4.24;
    import "./SafeMath.sol";
    /**
     * @title OKBImplementationV2
     * @dev This contract is a decentralized ERC20 token with bridge functionality.
     */
    contract OKBImplementationV2 {
        /**
         * @dev SafeMath library for safe arithmetic operations
         */
        using SafeMath for uint256;
        /*//////////////////////////////////////////////////////////////
                                STORAGE VARIABLES
        //////////////////////////////////////////////////////////////*/
        // INITIALIZATION DATA
        bool private initialized = false;
        // ERC20 BASIC DATA
        mapping(address => uint256) internal balances;
        uint256 internal totalSupply_;
        string public constant name = "OKB";
        string public constant symbol = "OKB";
        uint8 public constant decimals = 18;
        // ERC20 ALLOWANCE DATA
        mapping(address => mapping(address => uint256)) internal _allowed;
        // OWNER DATA
        address public deprecatedOwner;
        // PAUSABILITY DATA
        bool public deprecatedPaused = false;
        // DEPRECATED STORAGE SLOTS (MAINTAINED FOR COMPATIBILITY)
        address public deprecatedRole;
        mapping(address => bool) internal deprecatedMapping;
        address public deprecatedController;
        /*//////////////////////////////////////////////////////////////
                                    EVENTS
        //////////////////////////////////////////////////////////////*/
        /// @notice Emitted when tokens are transferred
        event Transfer(address indexed from, address indexed to, uint256 value);
        /// @notice Emitted when an allowance is set
        event Approval(address indexed owner, address indexed spender, uint256 value);
        /// @notice Emitted when tokens are bridged(supply decreased)
        event SupplyDecreased(address indexed from, uint256 value);
        /*//////////////////////////////////////////////////////////////
                                CONSTRUCTOR
        //////////////////////////////////////////////////////////////*/
        /**
         * @notice Constructor for the implementation contract
         * @dev The constructor is used here to ensure that the implementation
         * contract is initialized. An uncontrolled implementation
         * contract might lead to misleading state
         * for users who accidentally interact with it.
         */
        constructor() public {}
        /*//////////////////////////////////////////////////////////////
                                ERC20 FUNCTIONS
        //////////////////////////////////////////////////////////////*/
        /**
         * @notice Returns the total number of tokens in existence
         * @return The total supply of tokens
         */
        function totalSupply() public view returns (uint256) {
            return totalSupply_;
        }
        /**
         * @notice Transfer tokens to a specified address
         * @param _to The address to transfer to
         * @param _value The amount to be transferred
         * @return True if the transfer was successful
         */
        function transfer(address _to, uint256 _value) public returns (bool) {
            require(_to != address(0), "OKB: cannot transfer to address zero");
            require(_value <= balances[msg.sender], "OKB: insufficient funds");
            balances[msg.sender] = balances[msg.sender].sub(_value);
            balances[_to] = balances[_to].add(_value);
            emit Transfer(msg.sender, _to, _value);
            return true;
        }
        /**
         * @notice Gets the balance of the specified address
         * @param _addr The address to query the balance of
         * @return The amount owned by the passed address
         */
        function balanceOf(address _addr) public view returns (uint256) {
            return balances[_addr];
        }
        /**
         * @notice Transfer tokens from one address to another
         * @param _from The address which you want to send tokens from
         * @param _to The address which you want to transfer to
         * @param _value The amount of tokens to be transferred
         * @return True if the transfer was successful
         */
        function transferFrom(
            address _from,
            address _to,
            uint256 _value
        ) public returns (bool) {
            require(_to != address(0), "OKB: cannot transfer to address zero");
            require(_value <= balances[_from], "OKB: insufficient funds");
            require(_value <= _allowed[_from][msg.sender], "OKB: insufficient allowance");
            balances[_from] = balances[_from].sub(_value);
            balances[_to] = balances[_to].add(_value);
            _allowed[_from][msg.sender] = _allowed[_from][msg.sender].sub(_value);
            emit Transfer(_from, _to, _value);
            return true;
        }
        /**
         * @notice Approve the passed address to spend the specified amount of tokens on behalf of msg.sender
         * @dev Beware that changing an allowance with this method brings the risk that someone may use both the old
         * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
         * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
         * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
         * @param spender The address which will spend the funds
         * @param value The amount of tokens to be spent
         * @return True if the approval was successful
         */
        function approve(address spender, uint256 value) public returns (bool) {
            _approve(msg.sender, spender, value);
            return true;
        }
        /**
         * @dev Internal function to approve an address to spend another addresses' tokens
         * @param _owner The address that owns the tokens
         * @param spender The address that will spend the tokens
         * @param value The number of tokens that can be spent
         */
        function _approve(address _owner, address spender, uint256 value) internal {
            require(spender != address(0) && _owner != address(0), "OKB: not address(0)");
            _allowed[_owner][spender] = value;
            emit Approval(_owner, spender, value);
        }
        /**
         * @notice Function to check the amount of tokens that an owner allowed to a spender
         * @param _owner The address which owns the funds
         * @param spender The address which will spend the funds
         * @return The amount of tokens still available for the spender
         */
        function allowance(address _owner, address spender) public view returns (uint256) {
            return _allowed[_owner][spender];
        }
        /**
         * @notice Increase the amount of tokens that an owner allowed to a spender
         * @dev 
         * @param spender The address which will spend the funds
         * @param addedValue The amount of tokens to increase the allowance by
         * @return True if the operation was successful
         */
        function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
            _approve(msg.sender, spender, _allowed[msg.sender][spender].add(addedValue));
            return true;
        }
        /**
         * @notice Decrease the amount of tokens that an owner allowed to a spender
         * @dev 
         * @param spender The address which will spend the funds
         * @param subtractedValue The amount of tokens to decrease the allowance by
         * @return True if the operation was successful
         */
        function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
            _approve(msg.sender, spender, _allowed[msg.sender][spender].sub(subtractedValue));
            return true;
        }
        /*//////////////////////////////////////////////////////////////
                            TRIGGER BRIDGE FUNCTIONS
        //////////////////////////////////////////////////////////////*/
        /**
         * @notice Trigger the bridge to mint tokens in XLayer
         * @dev This function allows to trigger the bridge to mint tokens in XLayer
         * @dev CAUTION: We strongly suggest to deposit to OKX to make this happen instead of calling by user.
         * @dev CAUTION: Any triggerBridge by the user may cause impermanent asset loss.
         */
        function triggerBridge() public {
            uint256 _balance = balances[msg.sender];
            require(_balance > 0, "OKB: no tokens to bridge");
            balances[msg.sender] = 0;
            totalSupply_ = totalSupply_.sub(_balance);
            
            emit SupplyDecreased(msg.sender, _balance);
            emit Transfer(msg.sender, address(0), _balance);
        }
    } pragma solidity ^0.4.24;
    /**
     * @title SafeMath
     * @dev Math operations with safety checks that throw on error
     */
    library SafeMath {
        /**
        * @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend).
        */
        function sub(uint256 a, uint256 b) internal pure returns (uint256) {
            require(b <= a);
            uint256 c = a - b;
            return c;
        }
        /**
        * @dev Adds two numbers, reverts on overflow.
        */
        function add(uint256 a, uint256 b) internal pure returns (uint256) {
            uint256 c = a + b;
            require(c >= a);
            return c;
        }
    }