ETH Price: $2,402.24 (-1.52%)

Transaction Decoder

Block:
9879929 at Apr-15-2020 11:12:35 PM +UTC
Transaction Fee:
0.000201338 ETH $0.48
Gas Used:
100,669 Gas / 2 Gwei

Emitted Events:

134 AuctionityProxy_V1.0xa9901f1c527863f563f527e8921928a7a2524bdd592a18c45b58a553b1a1c4e4( 0xa9901f1c527863f563f527e8921928a7a2524bdd592a18c45b58a553b1a1c4e4, bfd9e774e9a8848727c641520b50dd565dfdb28668ac35e570715804fff7a844 )

Account State Difference:

  Address   Before After State Difference Code
(FKPool: Old Address)
63.901951130218549301 Eth63.902152468218549301 Eth0.000201338
0x757FE86F...CE4D8a3D6
0.033300008 Eth
Nonce: 473
0.14878667 Eth
Nonce: 474
0.115486662
0xBdC18219...9c575666f
(Auctionity)
59.121427989588260544 Eth59.005739989588260544 Eth0.115688

Execution Trace

AuctionityProxy_V1.12bc14bf( )
  • 0xd75ff5435a94a5a35b641d455296af90875068b1.12bc14bf( )
    • AuctionityPausable_V1.DELEGATECALL( )
      • AuctionityOwnable_V1.DELEGATECALL( )
      • Null: 0x000...001.74211f67( )
      • AuctionityOracable_V1.DELEGATECALL( )
      • ETH 0.115688 0x757fe86fbddcb3dbcbc679005d53f10ce4d8a3d6.CALL( )
        File 1 of 4: AuctionityProxy_V1
        {"AuctionityLibrary_V1.sol":{"content":"pragma solidity ^0.5.4;\n\nimport \"./AuctionityStorage0.sol\";\n\n/// @title Auction library for delegate for some delegated function\ncontract AuctionityLibrary_V1 is AuctionityStorage0 {\n    /// @notice get delegated addrss from a selector\n    /// @param _selector byte4\n    /// @return _contractDelegate address\n    function getDelegate_V1(bytes4 _selector)\n        public\n        view\n        returns (address _contractDelegate)\n    {\n        return delegates[_selector];\n    }\n\n    /// @notice call delegated function\n    /// @param _calldata bytes : data sended to delegated contract\n    /// @param _contractFallback address: address of fallback if selector is not exist, address(0) if no fallback\n    /// @return uint return pointer and uint return size of callData return\n    function _callDelegated_V1(\n        bytes memory _calldata,\n        address _contractFallback\n    ) internal returns (uint returnPtr, uint returnSize) {\n        /// @dev get selector from _calldata\n        bytes4 _selector;\n        assembly {\n            _selector := mload(add(_calldata, 0x20))\n        }\n\n        /// @dev get address of delegated from selector\n        address _contractDelegate = getDelegate_V1(_selector);\n\n        /// @dev if _contractDelegate not found set _contractFallback into _contractFallback\n        if (_contractDelegate == address(0)) {\n            _contractDelegate = _contractFallback;\n        }\n\n        require(\n            _contractDelegate != address(0),\n            \"Auctionity function does not exist.\"\n        );\n\n        /// @dev delegate call and return result, or the eventual revert\n        assembly {\n            let result := delegatecall(\n                gas,\n                _contractDelegate,\n                add(_calldata, 0x20),\n                mload(_calldata),\n                0,\n                0\n            )\n            returnSize := returndatasize\n            returnPtr := mload(0x40)\n            returndatacopy(returnPtr, 0, returnSize)\n            if eq(result, 0) {\n                revert(returnPtr, returnSize)\n            }\n        }\n\n        /// @dev return returndatacopy\n        return (returnPtr, returnSize);\n\n    }\n\n    /// @notice delegate IsContractOwner_V1\n    /// @return  _isContractOwner\n    function delegatedSendIsContractOwner_V1()\n        public\n        returns (bool _isContractOwner)\n    {\n        uint returnPtr;\n        uint returnSize;\n\n        (returnPtr, returnSize) = _callDelegated_V1(\n            abi.encodeWithSelector(\n                bytes4(keccak256(\"delegatedReceiveIsContractOwner_V1()\"))\n            ),\n            address(0)\n        );\n\n        assembly {\n            _isContractOwner := mload(returnPtr)\n        }\n\n        return _isContractOwner;\n    }\n\n    modifier delegatedSendIsOracle_V1() {\n        require(\n            msg.sender == delegatedSendGetOracle_V1(),\n            \"Sender must be oracle\"\n        );\n        _;\n    }\n\n    /// @notice delegate getOracle_V1\n    /// @return address _oracle\n    function delegatedSendGetOracle_V1() public returns (address _oracle) {\n        uint returnPtr;\n        uint returnSize;\n\n        (returnPtr, returnSize) = _callDelegated_V1(\n            abi.encodeWithSelector(\n                bytes4(keccak256(\"delegatedReceiveGetOracle_V1()\"))\n            ),\n            address(0)\n        );\n\n        assembly {\n            _oracle := mload(returnPtr)\n        }\n        return _oracle;\n\n    }\n\n    /// @notice delegate getPaused_V1\n    /// @return bool _isPaused\n    function delegatedSendGetPaused_V1() public returns (bool _isPaused) {\n        uint returnPtr;\n        uint returnSize;\n\n        (returnPtr, returnSize) = _callDelegated_V1(\n            abi.encodeWithSelector(\n                bytes4(keccak256(\"delegatedReceiveGetPaused_V1()\"))\n            ),\n            address(0)\n        );\n        assembly {\n            _isPaused := mload(returnPtr)\n        }\n        return _isPaused;\n\n    }\n\n    /// @notice delegate lockDeposit_V1\n    /// @param _tokenContractAddress address\n    /// @param _tokenId uint256\n    /// @param _amount uint256\n    /// @param _auctionId uint256\n    /// @param _refundUser address\n    /// @return bool _isPaused\n    function delegatedLockDeposit_V1(\n        address _tokenContractAddress,\n        uint256 _tokenId,\n        uint256 _amount,\n        uint256 _auctionId,\n        address _refundUser\n    ) public returns (bool _success) {\n        uint returnPtr;\n        uint returnSize;\n\n        (returnPtr, returnSize) = _callDelegated_V1(\n            abi.encodeWithSelector(\n                bytes4(\n                    keccak256(\n                        \"lockDeposit_V1(address,uint256,uint256,uint256,address)\"\n                    )\n                ),\n                _tokenContractAddress,\n                _tokenId,\n                _amount,\n                _auctionId,\n                _refundUser\n            ),\n            address(0)\n        );\n\n        assembly {\n            _success := mload(returnPtr)\n        }\n        return _success;\n\n    }\n\n    /// @notice verify if _contractAddress is a contract\n    /// @param _contractAddress address\n    /// @return _isContract\n    function isContract_V1(address _contractAddress)\n        internal\n        view\n        returns (bool _isContract)\n    {\n        uint _size;\n        assembly {\n            _size := extcodesize(_contractAddress)\n        }\n        return _size \u003e 0;\n    }\n\n    /// @notice cast a bytesmemory into a uint256\n    /// @param b bytes\n    /// @return uint256\n    function bytesToUint_V1(bytes memory b) internal pure returns (uint256) {\n        uint256 _number;\n        for (uint i = 0; i \u003c b.length; i++) {\n            _number = _number + uint8(b[i]) * (2 ** (8 * (b.length - (i + 1))));\n        }\n        return _number;\n    }\n}\n"},"AuctionityProxy_V1.sol":{"content":"pragma solidity ^0.5.4;\n\nimport \"./AuctionityLibrary_V1.sol\";\n\n/**\n * @title Proxy\n * @dev Gives the possibility to delegate any call to a foreign implementation.\n */\ncontract AuctionityProxy_V1 is AuctionityLibrary_V1 {\n    /// @notice init contract by calling `_auctionityProxyUpdate.initProxyContract_V1(auctionityProxyUpdate,_ownable)`,\n    /// adding the first delegate functions and set _ownable as the contract responsible for\n    /// contract ownership.\n    /// @param _auctionityProxyUpdate address : contract proxyUpdate\n    /// @param _ownable address : contract ownable\n    constructor(address _auctionityProxyUpdate, address _ownable) public {\n        /// @dev encode initProxyContract_V1 selector with parametters\n        bytes memory _calldata = abi.encodeWithSelector(\n            bytes4(keccak256(\"initProxyContract_V1(address,address)\")),\n            _auctionityProxyUpdate,\n            _ownable\n        );\n\n        /// @dev deletatecall initProxyContract_V1 to _auctionityProxyUpdate\n        /// @return return the delegtecall return, or the eventual revert\n        assembly {\n            let result := delegatecall(\n                gas,\n                _auctionityProxyUpdate,\n                add(_calldata, 0x20),\n                mload(_calldata),\n                0,\n                0\n            )\n            let size := returndatasize\n            returndatacopy(_calldata, 0, size)\n            if eq(result, 0) {\n                revert(_calldata, size)\n            }\n        }\n    }\n\n    // @notice Fallback payable proxy function\n    /// @return return the _callDelegated_V1 return, or the eventual revert\n    function() external payable {\n        uint returnPtr;\n        uint returnSize;\n\n        (returnPtr, returnSize) = _callDelegated_V1(\n            msg.data,\n            proxyFallbackContract\n        );\n\n        assembly {\n            return(returnPtr, returnSize)\n        }\n\n    }\n}\n"},"AuctionityStorage0.sol":{"content":"pragma solidity ^0.5.4;\n\ncontract AuctionityStorage0 {\n    // selector =\u003e delegate contract\n    mapping(bytes4 =\u003e address) internal delegates;\n\n    // If selector not found, fallback contract address\n    address public proxyFallbackContract;\n\n    address public contractOwner;\n    address public oracle;\n\n    bool public paused;\n\n    uint8 public ethereumChainId;\n    uint8 public auctionityChainId;\n}\n"}}

        File 2 of 4: AuctionityPausable_V1
        {"AuctionityLibrary_V1.sol":{"content":"pragma solidity ^0.5.4;\n\nimport \"./AuctionityStorage0.sol\";\n\n/// @title Auction library for delegate for some delegated function\ncontract AuctionityLibrary_V1 is AuctionityStorage0 {\n    /// @notice get delegated addrss from a selector\n    /// @param _selector byte4\n    /// @return _contractDelegate address\n    function getDelegate_V1(bytes4 _selector)\n        public\n        view\n        returns (address _contractDelegate)\n    {\n        return delegates[_selector];\n    }\n\n    /// @notice call delegated function\n    /// @param _calldata bytes : data sended to delegated contract\n    /// @param _contractFallback address: address of fallback if selector is not exist, address(0) if no fallback\n    /// @return uint return pointer and uint return size of callData return\n    function _callDelegated_V1(\n        bytes memory _calldata,\n        address _contractFallback\n    ) internal returns (uint returnPtr, uint returnSize) {\n        /// @dev get selector from _calldata\n        bytes4 _selector;\n        assembly {\n            _selector := mload(add(_calldata, 0x20))\n        }\n\n        /// @dev get address of delegated from selector\n        address _contractDelegate = getDelegate_V1(_selector);\n\n        /// @dev if _contractDelegate not found set _contractFallback into _contractFallback\n        if (_contractDelegate == address(0)) {\n            _contractDelegate = _contractFallback;\n        }\n\n        require(\n            _contractDelegate != address(0),\n            \"Auctionity function does not exist.\"\n        );\n\n        /// @dev delegate call and return result, or the eventual revert\n        assembly {\n            let result := delegatecall(\n                gas,\n                _contractDelegate,\n                add(_calldata, 0x20),\n                mload(_calldata),\n                0,\n                0\n            )\n            returnSize := returndatasize\n            returnPtr := mload(0x40)\n            returndatacopy(returnPtr, 0, returnSize)\n            if eq(result, 0) {\n                revert(returnPtr, returnSize)\n            }\n        }\n\n        /// @dev return returndatacopy\n        return (returnPtr, returnSize);\n\n    }\n\n    /// @notice delegate IsContractOwner_V1\n    /// @return  _isContractOwner\n    function delegatedSendIsContractOwner_V1()\n        public\n        returns (bool _isContractOwner)\n    {\n        uint returnPtr;\n        uint returnSize;\n\n        (returnPtr, returnSize) = _callDelegated_V1(\n            abi.encodeWithSelector(\n                bytes4(keccak256(\"delegatedReceiveIsContractOwner_V1()\"))\n            ),\n            address(0)\n        );\n\n        assembly {\n            _isContractOwner := mload(returnPtr)\n        }\n\n        return _isContractOwner;\n    }\n\n    modifier delegatedSendIsOracle_V1() {\n        require(\n            msg.sender == delegatedSendGetOracle_V1(),\n            \"Sender must be oracle\"\n        );\n        _;\n    }\n\n    /// @notice delegate getOracle_V1\n    /// @return address _oracle\n    function delegatedSendGetOracle_V1() public returns (address _oracle) {\n        uint returnPtr;\n        uint returnSize;\n\n        (returnPtr, returnSize) = _callDelegated_V1(\n            abi.encodeWithSelector(\n                bytes4(keccak256(\"delegatedReceiveGetOracle_V1()\"))\n            ),\n            address(0)\n        );\n\n        assembly {\n            _oracle := mload(returnPtr)\n        }\n        return _oracle;\n\n    }\n\n    /// @notice delegate getPaused_V1\n    /// @return bool _isPaused\n    function delegatedSendGetPaused_V1() public returns (bool _isPaused) {\n        uint returnPtr;\n        uint returnSize;\n\n        (returnPtr, returnSize) = _callDelegated_V1(\n            abi.encodeWithSelector(\n                bytes4(keccak256(\"delegatedReceiveGetPaused_V1()\"))\n            ),\n            address(0)\n        );\n        assembly {\n            _isPaused := mload(returnPtr)\n        }\n        return _isPaused;\n\n    }\n\n    /// @notice delegate lockDeposit_V1\n    /// @param _tokenContractAddress address\n    /// @param _tokenId uint256\n    /// @param _amount uint256\n    /// @param _auctionId uint256\n    /// @param _refundUser address\n    /// @return bool _isPaused\n    function delegatedLockDeposit_V1(\n        address _tokenContractAddress,\n        uint256 _tokenId,\n        uint256 _amount,\n        uint256 _auctionId,\n        address _refundUser\n    ) public returns (bool _success) {\n        uint returnPtr;\n        uint returnSize;\n\n        (returnPtr, returnSize) = _callDelegated_V1(\n            abi.encodeWithSelector(\n                bytes4(\n                    keccak256(\n                        \"lockDeposit_V1(address,uint256,uint256,uint256,address)\"\n                    )\n                ),\n                _tokenContractAddress,\n                _tokenId,\n                _amount,\n                _auctionId,\n                _refundUser\n            ),\n            address(0)\n        );\n\n        assembly {\n            _success := mload(returnPtr)\n        }\n        return _success;\n\n    }\n\n    /// @notice verify if _contractAddress is a contract\n    /// @param _contractAddress address\n    /// @return _isContract\n    function isContract_V1(address _contractAddress)\n        internal\n        view\n        returns (bool _isContract)\n    {\n        uint _size;\n        assembly {\n            _size := extcodesize(_contractAddress)\n        }\n        return _size \u003e 0;\n    }\n\n    /// @notice cast a bytesmemory into a uint256\n    /// @param b bytes\n    /// @return uint256\n    function bytesToUint_V1(bytes memory b) internal pure returns (uint256) {\n        uint256 _number;\n        for (uint i = 0; i \u003c b.length; i++) {\n            _number = _number + uint8(b[i]) * (2 ** (8 * (b.length - (i + 1))));\n        }\n        return _number;\n    }\n}\n"},"AuctionityPausable_V1.sol":{"content":"pragma solidity ^0.5.4;\n\nimport \"./AuctionityLibrary_V1.sol\";\n\n/// @title Pausable\n/// @dev Base contract which allows children to implement an emergency stop mechanism.\n\ncontract AuctionityPausable_V1 is AuctionityLibrary_V1 {\n    event LogPaused_V1(bool paused);\n\n    /// @notice constructor, default is false, no incidence if called by proxy\n    constructor() public {\n        paused = false;\n    }\n\n    /// @notice delegate receive of get Paused\n    /// @return _isPaused bool\n    function delegatedReceiveGetPaused_V1()\n        public\n        payable\n        returns (bool _isPaused)\n    {\n        return getPaused_V1();\n    }\n\n    /// @notice verify if is paused\n    /// @return _isPaused bool\n    function getPaused_V1() public returns (bool _isPaused) {\n        if (delegatedSendIsContractOwner_V1() == true) {\n            return false;\n        }\n        return paused;\n    }\n\n    /// @dev Modifier to make a function callable only when the contract is not paused.\n    modifier whenNotPaused_V1() {\n        require(!delegatedSendGetPaused_V1(), \"Contrat is paused\");\n        _;\n    }\n\n    /// @dev Modifier to make a function callable only when the contract is paused.\n    modifier whenPaused_V1() {\n        require(delegatedSendGetPaused_V1(), \"Contrat is not paused\");\n        _;\n    }\n\n    /// @notice called by the owner to pause, triggers stopped state\n    /// @param _paused bool\n    function setPaused_V1(bool _paused) public {\n        require(delegatedSendIsContractOwner_V1(), \"Not Contract owner\");\n        paused = _paused;\n        emit LogPaused_V1(_paused);\n    }\n}\n"},"AuctionityStorage0.sol":{"content":"pragma solidity ^0.5.4;\n\ncontract AuctionityStorage0 {\n    // selector =\u003e delegate contract\n    mapping(bytes4 =\u003e address) internal delegates;\n\n    // If selector not found, fallback contract address\n    address public proxyFallbackContract;\n\n    address public contractOwner;\n    address public oracle;\n\n    bool public paused;\n\n    uint8 public ethereumChainId;\n    uint8 public auctionityChainId;\n}\n"}}

        File 3 of 4: AuctionityOwnable_V1
        {"AuctionityLibrary_V1.sol":{"content":"pragma solidity ^0.5.4;\n\nimport \"./AuctionityStorage0.sol\";\n\n/// @title Auction library for delegate for some delegated function\ncontract AuctionityLibrary_V1 is AuctionityStorage0 {\n    /// @notice get delegated addrss from a selector\n    /// @param _selector byte4\n    /// @return _contractDelegate address\n    function getDelegate_V1(bytes4 _selector)\n        public\n        view\n        returns (address _contractDelegate)\n    {\n        return delegates[_selector];\n    }\n\n    /// @notice call delegated function\n    /// @param _calldata bytes : data sended to delegated contract\n    /// @param _contractFallback address: address of fallback if selector is not exist, address(0) if no fallback\n    /// @return uint return pointer and uint return size of callData return\n    function _callDelegated_V1(\n        bytes memory _calldata,\n        address _contractFallback\n    ) internal returns (uint returnPtr, uint returnSize) {\n        /// @dev get selector from _calldata\n        bytes4 _selector;\n        assembly {\n            _selector := mload(add(_calldata, 0x20))\n        }\n\n        /// @dev get address of delegated from selector\n        address _contractDelegate = getDelegate_V1(_selector);\n\n        /// @dev if _contractDelegate not found set _contractFallback into _contractFallback\n        if (_contractDelegate == address(0)) {\n            _contractDelegate = _contractFallback;\n        }\n\n        require(\n            _contractDelegate != address(0),\n            \"Auctionity function does not exist.\"\n        );\n\n        /// @dev delegate call and return result, or the eventual revert\n        assembly {\n            let result := delegatecall(\n                gas,\n                _contractDelegate,\n                add(_calldata, 0x20),\n                mload(_calldata),\n                0,\n                0\n            )\n            returnSize := returndatasize\n            returnPtr := mload(0x40)\n            returndatacopy(returnPtr, 0, returnSize)\n            if eq(result, 0) {\n                revert(returnPtr, returnSize)\n            }\n        }\n\n        /// @dev return returndatacopy\n        return (returnPtr, returnSize);\n\n    }\n\n    /// @notice delegate IsContractOwner_V1\n    /// @return  _isContractOwner\n    function delegatedSendIsContractOwner_V1()\n        public\n        returns (bool _isContractOwner)\n    {\n        uint returnPtr;\n        uint returnSize;\n\n        (returnPtr, returnSize) = _callDelegated_V1(\n            abi.encodeWithSelector(\n                bytes4(keccak256(\"delegatedReceiveIsContractOwner_V1()\"))\n            ),\n            address(0)\n        );\n\n        assembly {\n            _isContractOwner := mload(returnPtr)\n        }\n\n        return _isContractOwner;\n    }\n\n    modifier delegatedSendIsOracle_V1() {\n        require(\n            msg.sender == delegatedSendGetOracle_V1(),\n            \"Sender must be oracle\"\n        );\n        _;\n    }\n\n    /// @notice delegate getOracle_V1\n    /// @return address _oracle\n    function delegatedSendGetOracle_V1() public returns (address _oracle) {\n        uint returnPtr;\n        uint returnSize;\n\n        (returnPtr, returnSize) = _callDelegated_V1(\n            abi.encodeWithSelector(\n                bytes4(keccak256(\"delegatedReceiveGetOracle_V1()\"))\n            ),\n            address(0)\n        );\n\n        assembly {\n            _oracle := mload(returnPtr)\n        }\n        return _oracle;\n\n    }\n\n    /// @notice delegate getPaused_V1\n    /// @return bool _isPaused\n    function delegatedSendGetPaused_V1() public returns (bool _isPaused) {\n        uint returnPtr;\n        uint returnSize;\n\n        (returnPtr, returnSize) = _callDelegated_V1(\n            abi.encodeWithSelector(\n                bytes4(keccak256(\"delegatedReceiveGetPaused_V1()\"))\n            ),\n            address(0)\n        );\n        assembly {\n            _isPaused := mload(returnPtr)\n        }\n        return _isPaused;\n\n    }\n\n    /// @notice delegate lockDeposit_V1\n    /// @param _tokenContractAddress address\n    /// @param _tokenId uint256\n    /// @param _amount uint256\n    /// @param _auctionId uint256\n    /// @param _refundUser address\n    /// @return bool _isPaused\n    function delegatedLockDeposit_V1(\n        address _tokenContractAddress,\n        uint256 _tokenId,\n        uint256 _amount,\n        uint256 _auctionId,\n        address _refundUser\n    ) public returns (bool _success) {\n        uint returnPtr;\n        uint returnSize;\n\n        (returnPtr, returnSize) = _callDelegated_V1(\n            abi.encodeWithSelector(\n                bytes4(\n                    keccak256(\n                        \"lockDeposit_V1(address,uint256,uint256,uint256,address)\"\n                    )\n                ),\n                _tokenContractAddress,\n                _tokenId,\n                _amount,\n                _auctionId,\n                _refundUser\n            ),\n            address(0)\n        );\n\n        assembly {\n            _success := mload(returnPtr)\n        }\n        return _success;\n\n    }\n\n    /// @notice verify if _contractAddress is a contract\n    /// @param _contractAddress address\n    /// @return _isContract\n    function isContract_V1(address _contractAddress)\n        internal\n        view\n        returns (bool _isContract)\n    {\n        uint _size;\n        assembly {\n            _size := extcodesize(_contractAddress)\n        }\n        return _size \u003e 0;\n    }\n\n    /// @notice cast a bytesmemory into a uint256\n    /// @param b bytes\n    /// @return uint256\n    function bytesToUint_V1(bytes memory b) internal pure returns (uint256) {\n        uint256 _number;\n        for (uint i = 0; i \u003c b.length; i++) {\n            _number = _number + uint8(b[i]) * (2 ** (8 * (b.length - (i + 1))));\n        }\n        return _number;\n    }\n}\n"},"AuctionityOwnable_V1.sol":{"content":"pragma solidity ^0.5.4;\n\nimport \"./AuctionityStorage0.sol\";\n\n/// @title Ownable\n/// @dev The Ownable contract has an owner address, and provides basic authorization control\n/// functions, this simplifies the implementation of \"user permissions\".\n\ncontract AuctionityOwnable_V1 is AuctionityStorage0 {\n    event OwnershipRenounced_V1(address indexed previousOwner);\n    event OwnershipTransferred_V1(\n        address indexed previousOwner,\n        address indexed newOwner\n    );\n\n    /// @notice get contract owner address\n    /// @return _contractOwner address\n    function getContractOwner_V1()\n        public\n        view\n        returns (address _contractOwner)\n    {\n        return contractOwner;\n    }\n\n    /// @notice delegate receive of isContractOwner\n    /// @return  _isContractOwner bool\n    function delegatedReceiveIsContractOwner_V1()\n        public\n        payable\n        returns (bool _isContractOwner)\n    {\n        return isContractOwner_V1();\n    }\n\n    /// @notice verify if msg.sender is contract owner\n    /// @return _isContractOwner bool\n    function isContractOwner_V1() public view returns (bool _isContractOwner) {\n        return msg.sender == contractOwner;\n    }\n\n    /// @notice Renouncing to ownership will leave the contract without an owner.\n    function renounceOwnership_V1() public {\n        require(isContractOwner_V1(), \"Not the owner\");\n        emit OwnershipRenounced_V1(contractOwner);\n        contractOwner = address(0);\n    }\n\n    /// @notice Allows the current owner to transfer control of the contract to a newOwner.\n    /// @param newOwner The address to transfer ownership to.\n    function transferOwnership_V1(address newOwner) public {\n        require(isContractOwner_V1(), \"Not the owner\");\n        _transferOwnership_V1(newOwner);\n    }\n\n    /// @notice Transfers control of the contract to a newOwner.\n    /// @param newOwner The address to transfer ownership to.\n    function _transferOwnership_V1(address newOwner) internal {\n        require(newOwner != address(0));\n        emit OwnershipTransferred_V1(contractOwner, newOwner);\n        contractOwner = newOwner;\n    }\n}\n"},"AuctionityStorage0.sol":{"content":"pragma solidity ^0.5.4;\n\ncontract AuctionityStorage0 {\n    // selector =\u003e delegate contract\n    mapping(bytes4 =\u003e address) internal delegates;\n\n    // If selector not found, fallback contract address\n    address public proxyFallbackContract;\n\n    address public contractOwner;\n    address public oracle;\n\n    bool public paused;\n\n    uint8 public ethereumChainId;\n    uint8 public auctionityChainId;\n}\n"}}

        File 4 of 4: AuctionityOracable_V1
        {"AuctionityLibrary_V1.sol":{"content":"pragma solidity ^0.5.4;\n\nimport \"./AuctionityStorage0.sol\";\n\n/// @title Auction library for delegate for some delegated function\ncontract AuctionityLibrary_V1 is AuctionityStorage0 {\n    /// @notice get delegated addrss from a selector\n    /// @param _selector byte4\n    /// @return _contractDelegate address\n    function getDelegate_V1(bytes4 _selector)\n        public\n        view\n        returns (address _contractDelegate)\n    {\n        return delegates[_selector];\n    }\n\n    /// @notice call delegated function\n    /// @param _calldata bytes : data sended to delegated contract\n    /// @param _contractFallback address: address of fallback if selector is not exist, address(0) if no fallback\n    /// @return uint return pointer and uint return size of callData return\n    function _callDelegated_V1(\n        bytes memory _calldata,\n        address _contractFallback\n    ) internal returns (uint returnPtr, uint returnSize) {\n        /// @dev get selector from _calldata\n        bytes4 _selector;\n        assembly {\n            _selector := mload(add(_calldata, 0x20))\n        }\n\n        /// @dev get address of delegated from selector\n        address _contractDelegate = getDelegate_V1(_selector);\n\n        /// @dev if _contractDelegate not found set _contractFallback into _contractFallback\n        if (_contractDelegate == address(0)) {\n            _contractDelegate = _contractFallback;\n        }\n\n        require(\n            _contractDelegate != address(0),\n            \"Auctionity function does not exist.\"\n        );\n\n        /// @dev delegate call and return result, or the eventual revert\n        assembly {\n            let result := delegatecall(\n                gas,\n                _contractDelegate,\n                add(_calldata, 0x20),\n                mload(_calldata),\n                0,\n                0\n            )\n            returnSize := returndatasize\n            returnPtr := mload(0x40)\n            returndatacopy(returnPtr, 0, returnSize)\n            if eq(result, 0) {\n                revert(returnPtr, returnSize)\n            }\n        }\n\n        /// @dev return returndatacopy\n        return (returnPtr, returnSize);\n\n    }\n\n    /// @notice delegate IsContractOwner_V1\n    /// @return  _isContractOwner\n    function delegatedSendIsContractOwner_V1()\n        public\n        returns (bool _isContractOwner)\n    {\n        uint returnPtr;\n        uint returnSize;\n\n        (returnPtr, returnSize) = _callDelegated_V1(\n            abi.encodeWithSelector(\n                bytes4(keccak256(\"delegatedReceiveIsContractOwner_V1()\"))\n            ),\n            address(0)\n        );\n\n        assembly {\n            _isContractOwner := mload(returnPtr)\n        }\n\n        return _isContractOwner;\n    }\n\n    modifier delegatedSendIsOracle_V1() {\n        require(\n            msg.sender == delegatedSendGetOracle_V1(),\n            \"Sender must be oracle\"\n        );\n        _;\n    }\n\n    /// @notice delegate getOracle_V1\n    /// @return address _oracle\n    function delegatedSendGetOracle_V1() public returns (address _oracle) {\n        uint returnPtr;\n        uint returnSize;\n\n        (returnPtr, returnSize) = _callDelegated_V1(\n            abi.encodeWithSelector(\n                bytes4(keccak256(\"delegatedReceiveGetOracle_V1()\"))\n            ),\n            address(0)\n        );\n\n        assembly {\n            _oracle := mload(returnPtr)\n        }\n        return _oracle;\n\n    }\n\n    /// @notice delegate getPaused_V1\n    /// @return bool _isPaused\n    function delegatedSendGetPaused_V1() public returns (bool _isPaused) {\n        uint returnPtr;\n        uint returnSize;\n\n        (returnPtr, returnSize) = _callDelegated_V1(\n            abi.encodeWithSelector(\n                bytes4(keccak256(\"delegatedReceiveGetPaused_V1()\"))\n            ),\n            address(0)\n        );\n        assembly {\n            _isPaused := mload(returnPtr)\n        }\n        return _isPaused;\n\n    }\n\n    /// @notice delegate lockDeposit_V1\n    /// @param _tokenContractAddress address\n    /// @param _tokenId uint256\n    /// @param _amount uint256\n    /// @param _auctionId uint256\n    /// @param _refundUser address\n    /// @return bool _isPaused\n    function delegatedLockDeposit_V1(\n        address _tokenContractAddress,\n        uint256 _tokenId,\n        uint256 _amount,\n        uint256 _auctionId,\n        address _refundUser\n    ) public returns (bool _success) {\n        uint returnPtr;\n        uint returnSize;\n\n        (returnPtr, returnSize) = _callDelegated_V1(\n            abi.encodeWithSelector(\n                bytes4(\n                    keccak256(\n                        \"lockDeposit_V1(address,uint256,uint256,uint256,address)\"\n                    )\n                ),\n                _tokenContractAddress,\n                _tokenId,\n                _amount,\n                _auctionId,\n                _refundUser\n            ),\n            address(0)\n        );\n\n        assembly {\n            _success := mload(returnPtr)\n        }\n        return _success;\n\n    }\n\n    /// @notice verify if _contractAddress is a contract\n    /// @param _contractAddress address\n    /// @return _isContract\n    function isContract_V1(address _contractAddress)\n        internal\n        view\n        returns (bool _isContract)\n    {\n        uint _size;\n        assembly {\n            _size := extcodesize(_contractAddress)\n        }\n        return _size \u003e 0;\n    }\n\n    /// @notice cast a bytesmemory into a uint256\n    /// @param b bytes\n    /// @return uint256\n    function bytesToUint_V1(bytes memory b) internal pure returns (uint256) {\n        uint256 _number;\n        for (uint i = 0; i \u003c b.length; i++) {\n            _number = _number + uint8(b[i]) * (2 ** (8 * (b.length - (i + 1))));\n        }\n        return _number;\n    }\n}\n"},"AuctionityOracable_V1.sol":{"content":"pragma solidity ^0.5.4;\n\nimport \"./AuctionityLibrary_V1.sol\";\n\n/// @title AuctionityOracable_V1\ncontract AuctionityOracable_V1 is AuctionityLibrary_V1 {\n    /// @notice event LogOracleTransfered_V1\n    event LogOracleTransfered_V1(\n        address indexed previousOracle,\n        address indexed newOracle\n    );\n\n    /// @notice delegate receive of getOracle\n    /// @return  _oracle address\n    function delegatedReceiveGetOracle_V1()\n        public\n        payable\n        returns (address _oracle)\n    {\n        return getOracle_V1();\n    }\n\n    /// @notice getter oracle address\n    /// @return  _oracle address\n    function getOracle_V1() public view returns (address _oracle) {\n        return oracle;\n    }\n\n    /// @notice verify if msg.sender is oracle\n    /// @return _isOracle bool\n    function isOracle_V1() public view returns (bool _isOracle) {\n        return msg.sender == oracle;\n    }\n\n    /**\n     * @return true if `_oracle` is the oracle of the contract.\n     */\n\n    /// @notice verify oracle address\n    /// @param _oracle address : address to compare\n    /// @return _isOracle bool\n    function verifyOracle_V1(address _oracle)\n        public\n        view\n        returns (bool _isOracle)\n    {\n        return _oracle == oracle;\n    }\n\n    /// @notice Allows the current oracle or owner to set a new oracle.\n    /// @param _newOracle The address to transfer oracleship to.\n    function transferOracle_V1(address _newOracle) public {\n        require(\n            isOracle_V1() || delegatedSendIsContractOwner_V1(),\n            \"Is not Oracle or Owner\"\n        );\n        _transferOracle_V1(_newOracle);\n    }\n\n    /// @notice Transfers control of the contract to a newOracle.\n    /// @param _newOracle The address to transfer oracleship to.\n    function _transferOracle_V1(address _newOracle) internal {\n        require(_newOracle != address(0), \"Oracle can\u0027t be 0x0\");\n        emit LogOracleTransfered_V1(oracle, _newOracle);\n        oracle = _newOracle;\n    }\n}\n"},"AuctionityStorage0.sol":{"content":"pragma solidity ^0.5.4;\n\ncontract AuctionityStorage0 {\n    // selector =\u003e delegate contract\n    mapping(bytes4 =\u003e address) internal delegates;\n\n    // If selector not found, fallback contract address\n    address public proxyFallbackContract;\n\n    address public contractOwner;\n    address public oracle;\n\n    bool public paused;\n\n    uint8 public ethereumChainId;\n    uint8 public auctionityChainId;\n}\n"}}