ETH Price: $1,949.46 (-1.89%)

Transaction Decoder

Block:
7940623 at Jun-11-2019 11:56:37 PM +UTC
Transaction Fee:
0.000480358000480358 ETH $0.94
Gas Used:
480,358 Gas / 1.000000001 Gwei

Account State Difference:

  Address   Before After State Difference Code
0x00008526...0d60031F2
0 Eth
Nonce: 0
0 Eth
Nonce: 1
From: 0 To: 472150553634979404424631812400922972451541503095341494060608362863298044613895736162271846647575161758868362832790323833465590774010414518369534731803167634202427740006223757653318722646242286034508781357247532126871448324837345245355206076308154141928720129612923512958448403513670173680118372268850654296666951893981827415994447895073693603821701189508556054522534660080586240094082313362269529562494132885250658447466745743068147194530199554452002477248123281191282330930498646532476700089379600362194157082669245630267506878459925784624428429436618366952538033833538066822986414816267489444035344211948359293932231750338605308135411164774349457084623735511727551147869075255355056921142880189881505305960872604564555491130044541693325615842795321866805049447729153356513053435561809855220045389651474918166065316178505475065518241080704722703003875944913626839190500190977099077650880823700647812451272732537607287819764707067932507969152977743778872514587185086969807786594191517390035606477347012659164921330631206520966248982979329280757663658021158535325280140026646853584631344862740827369463061444585638542382732009542654603660355043268311533021127867755526990479190380514608044624161703065495706140997532231194696062954438305167018742029735062606809778331599245606238818412239690085566957518693809889024229226279034748365184055791705124040474015114868534632105358554539669592562219925993732785912973367419823126233373631135721026328929344706772495862568044446312313679399471426111081511051364892520850056521502759468104089922323660870804249724783474829184167939697130590059971400230809124064100382436562251223289330040825993695064591758040738127515760929323621034255969350407574291408500058769327412948126775455940695913328644846052204359473056596033936984391393534611136677076574376702977234276791460772501789009647478979757169830229133561576372577973496287870374327863791642263672119500792234460967023205376414937075763768852924075863633737344048149494299325236228387619535678273314037941397130469652801648832530719169895892842075467891416079852356033944281324970411683902164671709726524624063701912196627643737374635747371364569258969721073931371179256756253417150199654394132810092566196852147160392080321201514007257271962504176765384444573893291514165026910877952466323341129928912350105692418065184032348907862568013185479951421324661427564397410285574704017420072430107370063000223439772098716976168770106264168762178351067097622481262453058587238445252295550695672486160863385538456849323470126264451654823382028600945167491699555159991255307126628929011731274750790575234231825149653560574979314523857285193330443867575839636418028928365979837704349176165746951774927866942323327632865530239844942131191626594394978709285213346056214458159115410439333296755025604001932660494584202213576298523006076580054969327499042004053873395600848886130117540645537982124421255731725409104675179204342802945663049736880440633013590046154640048958137877639326963512380146820523189207661659938716434238187890699342222785824800771976673873275067422929207377845424978201572930136580672778884140046456097321068958788843406782837057694465509180039689197298473478003433269863883773276190090015067284395933971407715187529752662904169094164655597440872964927325475840163201359732765661554289857598078016665208233749254245058889463971691864107660829984985844672807747095909196499291082231453212959240314905284052310789408441486006162060139115472389405572070884400048789068508099636537666265433340589680353805363970116304919111459818557472180537997102416477466462591960720382282295977212075262958980239269901881402853016173872109094285566352937616205065677479250754086790085034247962826807901906179684894604329001
(Spark Pool)
4,392.388944434560945337 Eth4,392.389424792561425695 Eth0.000480358000480358
0x8A065E9d...bdB56EdD4
(TrustToken: Deployer 1)
0.008 Eth
Nonce: 0
0.007519641999519642 Eth
Nonce: 1
0.000480358000480358

Execution Trace

TrueHKD.60806040( )
pragma solidity ^0.4.23;

// File: contracts/Proxy/OwnedUpgradeabilityProxy.sol

/**
 * @title OwnedUpgradeabilityProxy
 * @dev This contract combines an upgradeability proxy with basic authorization control functionalities
 */
contract TrueHKD {
    /**
    * @dev Event to show ownership has been transferred
    * @param previousOwner representing the address of the previous owner
    * @param newOwner representing the address of the new owner
    */
    event ProxyOwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
    * @dev Event to show ownership transfer is pending
    * @param currentOwner representing the address of the current owner
    * @param pendingOwner representing the address of the pending owner
    */
    event NewPendingOwner(address currentOwner, address pendingOwner);
    
    // Storage position of the owner and pendingOwner of the contract
    bytes32 private constant proxyOwnerPosition = 0x694c83c02d0f62c26352cb2d947e2f3d43c28959df09aa728c1937be0db4f629;//keccak256("trueHKD.proxy.owner");
    bytes32 private constant pendingProxyOwnerPosition = 0x6dd3140f324ae1c14ee501ef56b899935ef394e2a1b2a0e41ec6b40fd725799c;//keccak256("trueHKD.pending.proxy.owner");

    /**
    * @dev the constructor sets the original owner of the contract to the sender account.
    */
    constructor() public {
        _setUpgradeabilityOwner(msg.sender);
    }

    /**
    * @dev Throws if called by any account other than the owner.
    */
    modifier onlyProxyOwner() {
        require(msg.sender == proxyOwner(), "only Proxy Owner");
        _;
    }

    /**
    * @dev Throws if called by any account other than the pending owner.
    */
    modifier onlyPendingProxyOwner() {
        require(msg.sender == pendingProxyOwner(), "only pending Proxy Owner");
        _;
    }

    /**
    * @dev Tells the address of the owner
    * @return the address of the owner
    */
    function proxyOwner() public view returns (address owner) {
        bytes32 position = proxyOwnerPosition;
        assembly {
            owner := sload(position)
        }
    }

    /**
    * @dev Tells the address of the owner
    * @return the address of the owner
    */
    function pendingProxyOwner() public view returns (address pendingOwner) {
        bytes32 position = pendingProxyOwnerPosition;
        assembly {
            pendingOwner := sload(position)
        }
    }

    /**
    * @dev Sets the address of the owner
    */
    function _setUpgradeabilityOwner(address newProxyOwner) internal {
        bytes32 position = proxyOwnerPosition;
        assembly {
            sstore(position, newProxyOwner)
        }
    }

    /**
    * @dev Sets the address of the owner
    */
    function _setPendingUpgradeabilityOwner(address newPendingProxyOwner) internal {
        bytes32 position = pendingProxyOwnerPosition;
        assembly {
            sstore(position, newPendingProxyOwner)
        }
    }

    /**
    * @dev Allows the current owner to transfer control of the contract to a newOwner.
    *changes the pending owner to newOwner. But doesn't actually transfer
    * @param newOwner The address to transfer ownership to.
    */
    function transferProxyOwnership(address newOwner) external onlyProxyOwner {
        require(newOwner != address(0));
        _setPendingUpgradeabilityOwner(newOwner);
        emit NewPendingOwner(proxyOwner(), newOwner);
    }

    /**
    * @dev Allows the pendingOwner to claim ownership of the proxy
    */
    function claimProxyOwnership() external onlyPendingProxyOwner {
        emit ProxyOwnershipTransferred(proxyOwner(), pendingProxyOwner());
        _setUpgradeabilityOwner(pendingProxyOwner());
        _setPendingUpgradeabilityOwner(address(0));
    }

    /**
    * @dev Allows the proxy owner to upgrade the current version of the proxy.
    * @param implementation representing the address of the new implementation to be set.
    */
    function upgradeTo(address implementation) external onlyProxyOwner {
        address currentImplementation;
        bytes32 position = implementationPosition;
        assembly {
            currentImplementation := sload(position)
        }
        require(currentImplementation != implementation);
        assembly {
          sstore(position, implementation)
        }
        emit Upgraded(implementation);
    }
    /**
    * @dev This event will be emitted every time the implementation gets upgraded
    * @param implementation representing the address of the upgraded implementation
    */
    event Upgraded(address indexed implementation);

    // Storage position of the address of the current implementation
    bytes32 private constant implementationPosition = 0x3e9d19baa8ecfb799f8603bb69f8a220a1c51ff5c34c24b0d981ca8973276561; //keccak256("trueHKD.proxy.implementation");

    function implementation() public view returns (address impl) {
        bytes32 position = implementationPosition;
        assembly {
            impl := sload(position)
        }
    }

    /**
    * @dev Fallback function allowing to perform a delegatecall to the given implementation.
    * This function will return whatever the implementation call returns
    */
    function() external payable {
        bytes32 position = implementationPosition;
        
        assembly {
            let ptr := mload(0x40)
            calldatacopy(ptr, returndatasize, calldatasize)
            let result := delegatecall(gas, sload(position), ptr, calldatasize, returndatasize, returndatasize)
            returndatacopy(ptr, 0, returndatasize)

            switch result
            case 0 { revert(ptr, returndatasize) }
            default { return(ptr, returndatasize) }
        }
    }
}