ETH Price: $2,035.09 (-0.36%)

Contract

0xe36eefAB46f2fa5d4452F3E4D2C13108bF0c6b01
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Set User54427072018-04-15 3:11:012886 days ago1523761861IN
0xe36eefAB...8bF0c6b01
0 ETH0.000049150.5
Set User54427072018-04-15 3:11:012886 days ago1523761861IN
0xe36eefAB...8bF0c6b01
0 ETH0.000049150.5
Set User54427072018-04-15 3:11:012886 days ago1523761861IN
0xe36eefAB...8bF0c6b01
0 ETH0.000049150.5
Set User54427072018-04-15 3:11:012886 days ago1523761861IN
0xe36eefAB...8bF0c6b01
0 ETH0.000049150.5
Set User54427072018-04-15 3:11:012886 days ago1523761861IN
0xe36eefAB...8bF0c6b01
0 ETH0.000048990.5
Set User54427072018-04-15 3:11:012886 days ago1523761861IN
0xe36eefAB...8bF0c6b01
0 ETH0.000057260.5
Set User54427072018-04-15 3:11:012886 days ago1523761861IN
0xe36eefAB...8bF0c6b01
0 ETH0.000089470.5
Set User54427072018-04-15 3:11:012886 days ago1523761861IN
0xe36eefAB...8bF0c6b01
0 ETH0.000057610.5
Set User54427072018-04-15 3:11:012886 days ago1523761861IN
0xe36eefAB...8bF0c6b01
0 ETH0.000078720.5
Set User54427072018-04-15 3:11:012886 days ago1523761861IN
0xe36eefAB...8bF0c6b01
0 ETH0.000057480.5
Set User54427072018-04-15 3:11:012886 days ago1523761861IN
0xe36eefAB...8bF0c6b01
0 ETH0.000048990.5
Set User54427072018-04-15 3:11:012886 days ago1523761861IN
0xe36eefAB...8bF0c6b01
0 ETH0.000057480.5
Set User54427072018-04-15 3:11:012886 days ago1523761861IN
0xe36eefAB...8bF0c6b01
0 ETH0.00007860.5
Set User54427042018-04-15 3:10:462886 days ago1523761846IN
0xe36eefAB...8bF0c6b01
0 ETH0.000057160.5
Set User54426992018-04-15 3:09:272886 days ago1523761767IN
0xe36eefAB...8bF0c6b01
0 ETH0.000057480.5
Set User54426922018-04-15 3:07:592886 days ago1523761679IN
0xe36eefAB...8bF0c6b01
0 ETH0.000057480.5
Set User54426742018-04-15 3:02:012886 days ago1523761321IN
0xe36eefAB...8bF0c6b01
0 ETH0.000057290.5
Set User54426682018-04-15 2:59:472886 days ago1523761187IN
0xe36eefAB...8bF0c6b01
0 ETH0.000057580.5

Advanced mode:
Parent Transaction Hash Method Block
From
To
View All Internal Transactions
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
WineSupplyChain

Compiler Version
v0.4.21+commit.dfe3193c

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
/**
 *Submitted for verification at Etherscan.io on 2018-04-15
*/

pragma solidity ^0.4.13;

contract Commons {

    int256 constant INT256_MIN = int256((uint256(1) << 255));
    int256 constant INT256_MAX = int256(~((uint256(1) << 255)));
    uint256 constant UINT256_MIN = 0;
    uint256 constant UINT256_MAX = ~uint256(0);

    struct IndexElem {
        bytes32 mappingId;
        int nOp;
    }

    function Commons() internal { }
}

contract Ownable {

    address internal owner;

    event LogTransferOwnership(address previousOwner, address newOwner);

    /**
    * @dev The Ownable constructor sets the original `owner` of the contract to the sender
    * account.
    */
    function Ownable() internal
    {
        owner = msg.sender;
    }

    /**
    * @dev Throws if called by any account other than the owner.
    */
    modifier ownerOnly()
    {
        require(msg.sender == owner);
        _;
    }

    /**
    * @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) external
        ownerOnly
    {
        require(_newOwner != address(0));
        emit LogTransferOwnership(owner, _newOwner);
        owner = _newOwner;
    }

    /**
     *
     */
    function getOwner() external view returns (address) {
        return owner;
    }
}

contract Authorized is Ownable {

    struct User {
        string friendlyName;
        string offChainIdentity;
        bool isRegulator;
        bool isProducer;
        bool isWinery;
    }

    mapping (address => User) public onChainIdentities;    
    mapping (bytes32 => address) public onChainAddresses;

    event LogSetUser
    (
        address account, 
        string oldFriendlyName, 
        string oldOffChainIdentity, 
        bool oldIsProducer, 
        bool oldIsWinery, 
        bool oldIsRegulator, 
        address indexed operationSender
    );

    event LogSetWinery
    (
        address winery, 
        bool oldIsValid, 
        bool isValid, 
        address indexed operationSender
    );

    event LogSetRegulator
    (
        address regulator, 
        bool oldValue, 
        bool value, 
        address indexed operationSender
    );

    event LogSetProducer
    (
        address producer, 
        bool oldValue, 
        bool value, 
        address indexed operationSender
    );

    function Authorized() internal { }

    modifier producersOnly() {
        require(onChainIdentities[msg.sender].isProducer);
        _;
    }

    modifier wineriesOnly() {
        require(onChainIdentities[msg.sender].isWinery);
        _;
    }

    modifier regulatorsOnly() {
        require(onChainIdentities[msg.sender].isRegulator);
        _;
    }

    function setUser(
        address _address,
        string _friendlyName,
        string _offChainIdentity,
        bool _isRegulator,
        bool _isProducer,
        bool _isWinery
    ) 
        public
        ownerOnly
    {
        emit LogSetUser (
            _address, 
            onChainIdentities[_address].friendlyName, 
            onChainIdentities[_address].offChainIdentity, 
            onChainIdentities[_address].isProducer, 
            onChainIdentities[_address].isWinery, 
            onChainIdentities[_address].isRegulator, 
            msg.sender
        );
        onChainAddresses[keccak256(_offChainIdentity)] = _address;
        onChainIdentities[_address].friendlyName = _friendlyName;
        onChainIdentities[_address].offChainIdentity = _offChainIdentity;
        onChainIdentities[_address].isRegulator = _isRegulator;
        onChainIdentities[_address].isProducer = _isProducer;
        onChainIdentities[_address].isWinery = _isWinery;
    }

    function getOffChainIdentity(address _address) internal view returns (string offChainIdentity)
    {
        return onChainIdentities[_address].offChainIdentity;
    }

    function getUser(address _address)
        external view
        returns (
            string friendlyName, 
            string offChainIdentity, 
            bool isRegulator, 
            bool isProducer, 
            bool isWinery
        ) 
    {
        return (
            onChainIdentities[_address].friendlyName,
            onChainIdentities[_address].offChainIdentity,
            onChainIdentities[_address].isRegulator,
            onChainIdentities[_address].isProducer,
            onChainIdentities[_address].isWinery
        );
    }

    function getAddress(string _offChainIdentity) public view returns (address) {
        return onChainAddresses[keccak256(_offChainIdentity)];
    }

    function setRegulator(address _address, bool _newValue) external ownerOnly {
        emit LogSetRegulator(_address, onChainIdentities[_address].isRegulator, _newValue, msg.sender);
        onChainIdentities[_address].isRegulator = _newValue;
    }

    function setProducer(address _address, bool _newValue) external ownerOnly {
        emit LogSetProducer(_address, onChainIdentities[_address].isProducer, _newValue, msg.sender);
        onChainIdentities[_address].isProducer = _newValue;
    }

    function setWinery(address _address, bool _newValue) external ownerOnly {
        emit LogSetProducer(_address, onChainIdentities[_address].isWinery, _newValue, msg.sender);
        onChainIdentities[_address].isWinery = _newValue;
    }

}

contract WineryOperations is Commons, Authorized {

    uint256 constant OPERATION_SEARCH_MAX = uint(INT256_MAX);

    struct WineryOperation {
        address operationSender;
        string offChainIdentity;   //cuaa
        string operationID;        // hash (offChainIdentity, operationDate, operationCode)
        string operationCode;      //Es. IMBO
        uint operationDate;
        uint16 areaCode;           // mapping
        string codeICQRF;          // codice_icqrf_stabilimento
        string attributes;
        Product[] prods;
        IndexElem[] parentList;
        IndexElem[] childList;        
    }

    struct Product {
        string productID;      // codice_primario + codice_secondario
        string quantity;        // 1,345 kg
        string attributes;      // dsda; dasd;; sadas;
    }

    mapping(bytes32 => WineryOperation[]) public wineries;

    event LogAddWineryOperation(
        string _trackID,
        address operationSender,
        address indexed onChainIdentity,
        string operationID,      
        uint index
    );

    event LogAddProduct(
        string _trackID,
        address operationSender,
        address indexed onChainIdentity,
        string indexed operationID,
        string productID
    );

    function WineryOperations() internal { }
    
    // ============================================================================================
    // External functions for wineries
    // ============================================================================================

    function addWineryOperation(
        string _trackID,
        string _operationID,
        string _operationCode,
        uint _operationDate,
        uint16 _areaCode,
        string _codeICQRF
    )
        external
        wineriesOnly
        returns (bool success)
    {
        bytes32 _mappingID = keccak256(_trackID, msg.sender);
        addWineryOperation(
            _mappingID,
            msg.sender,
            onChainIdentities[msg.sender].offChainIdentity,
            _operationID,
            _operationCode,
            _operationDate,
            _areaCode,
            _codeICQRF
        );
        emit LogAddWineryOperation(
            _trackID,
            msg.sender,
            msg.sender,
            _operationID,
            wineries[_mappingID].length
        );
        return true;
    }

    function addProduct(
        string _trackID,
        uint _index,
        string _productID,
        string _quantity,
        string _attributes
    )
        external
        wineriesOnly
        returns (bool success)
    {
        bytes32 _mappingID = keccak256(_trackID, msg.sender);
        addProduct(
            _mappingID,
            _index,
            _productID,
            _quantity,
            _attributes
        );
        emit LogAddProduct(
            _trackID,
            msg.sender,
            msg.sender,
            wineries[_mappingID][_index].operationID,
            _productID
        );
        return true;
    }

    function addReferenceParentWineryOperation(
        string _trackID,
        uint _numCurOperation,
        string _parentTrackID,
        address _parentWinery,
        int _numParent        
    )
        external
        wineriesOnly
        returns (bool success)
    {
        addRelationshipBindingWineryOperation(
            keccak256(_trackID, msg.sender),
            _numCurOperation,
            keccak256(_parentTrackID, _parentWinery),
            _numParent
        );
        return true;
    }

    function setOperationAttributes(
        string _trackID,
        uint _operationIndex,
        string attributes
    )
        external
        wineriesOnly
        returns (bool success)
    {
        bytes32 _mappingID = keccak256(_trackID, msg.sender);
        wineries[_mappingID][_operationIndex].attributes = attributes;
        return true;
    }

    function setProductAttributes(
        string _trackID,
        uint _operationIndex,
        uint _productIndex,
        string attributes
    )
        external
        wineriesOnly
        returns (bool success)
    {
        bytes32 _mappingID = keccak256(_trackID, msg.sender);
        wineries[_mappingID][_operationIndex].prods[_productIndex].attributes = attributes;
        return true;
    }

    // ============================================================================================
    // External functions for regulators
    // ============================================================================================

    function addWineryOperationByRegulator(
        string _trackID,
        string _offChainIdentity,
        string _operationID,
        string _operationCode,
        uint _operationDate,
        uint16 _areaCode,
        string _codeICQRF
    )
        external
        regulatorsOnly
    {
        address _winery = getAddress(_offChainIdentity);
        bytes32 _mappingID = keccak256(_trackID, _winery);
        addWineryOperation(
            _mappingID,
            msg.sender,
            _offChainIdentity,
            _operationID,
            _operationCode,
            _operationDate,
            _areaCode,
            _codeICQRF
        );
        emit LogAddWineryOperation(
            _trackID,
            msg.sender,
            _winery,
            _operationID,
            wineries[_mappingID].length
        );
    }
    
    function addProductByRegulator(
        string _trackID,
        uint _index,
        string _offChainIdentity,
        string _productID,
        string _quantity,
        string _attributes
    )
        external
        regulatorsOnly
    {
        address _winery = getAddress(_offChainIdentity);
        bytes32 _mappingID = keccak256(_trackID, _winery);
        addProduct(
            _mappingID,
            _index,
            _productID,
            _quantity,
            _attributes
        );
        emit LogAddProduct(
            _trackID,
            msg.sender,
            _winery,
            wineries[_mappingID][_index].operationID,
            _productID
        );
    }

    function setOperationAttributesByRegulator(
        string _trackID,
        string _offChainIdentity,
        uint _operationIndex,
        string attributes
    )
        external
        regulatorsOnly
        returns (bool success)
    {     
        address _winery = getAddress(_offChainIdentity);
        bytes32 _mappingID = keccak256(_trackID, _winery);
        wineries[_mappingID][_operationIndex].attributes = attributes;
        return true;
    }

    function setProductAttributesByRegulator(
        string _trackID,
        string _offChainIdentity,
        uint _operationIndex,
        uint _productIndex,
        string attributes
    )
        external
        regulatorsOnly
        returns (bool success)
    {
        address _winery = getAddress(_offChainIdentity);
        bytes32 _mappingID = keccak256(_trackID, _winery);
        wineries[_mappingID][_operationIndex].prods[_productIndex].attributes = attributes;
        return true;
    }

    function addReferenceParentWineryOperationByRegulator(
        string _trackID,
        string _offChainIdentity,
        uint _numCurOperation,
        string _parentTrackID,
        string _parentOffChainIdentity,
        int _numParent        
    )
        external
        regulatorsOnly
        returns (bool success)
    {
        address _winery = getAddress(_offChainIdentity);
        address _parentWinery = getAddress(_parentOffChainIdentity);
        addRelationshipBindingWineryOperation(
            keccak256(_trackID, _winery),
            _numCurOperation,
            keccak256(_parentTrackID, _parentWinery),
            _numParent
        );
        return true;
    }

    // ============================================================================================
    // Helpers for ÐApps
    // ============================================================================================
    
    /// @notice ****
    function getWineryOperation(string _trackID, address _winery, uint _index)
        external view
        returns (
            address operationSender,
            string offChainIdentity,
            string operationID,
            string operationCode,
            uint operationDate,
            uint16 areaCode,
            string codeICQRF,
            string attributes
        )
    {
        bytes32 _mappingID = keccak256(_trackID, _winery);
        operationSender = wineries[_mappingID][_index].operationSender;
        offChainIdentity = wineries[_mappingID][_index].offChainIdentity;
        operationID = wineries[_mappingID][_index].operationID;
        operationCode = wineries[_mappingID][_index].operationCode;
        operationDate = wineries[_mappingID][_index].operationDate;
        areaCode = wineries[_mappingID][_index].areaCode;
        codeICQRF = wineries[_mappingID][_index].codeICQRF;
        attributes = wineries[_mappingID][_index].attributes;
    }

    function getProductOperation(string _trackID, address _winery, uint _index, uint _productIndex)
        external view
        returns (
            string productID,
            string quantity,
            string attributes
        )
    {
        bytes32 _mappingID = keccak256(_trackID, _winery);
        productID = wineries[_mappingID][_index].prods[_productIndex].productID;
        quantity = wineries[_mappingID][_index].prods[_productIndex].quantity;
        attributes = wineries[_mappingID][_index].prods[_productIndex].attributes;
    }

    function getNumPositionOperation(string _trackID, address _winery, string _operationID)
        external view
        returns (int position)
    {
        bytes32 _mappingID = keccak256(_trackID, _winery);
        for (uint i = 0; i < wineries[_mappingID].length && i < OPERATION_SEARCH_MAX; i++) {
            if (keccak256(wineries[_mappingID][i].operationID) == keccak256(_operationID)) {
                return int(i);
            }
        }
        return -1;
    }

    // ============================================================================================
    // Private functions
    // ============================================================================================

    /// @notice TODO Commenti
    function addWineryOperation(
        bytes32 _mappingID,
        address _operationSender,
        string _offChainIdentity,
        string _operationID,
        string _operationCode,
        uint _operationDate,
        uint16 _areaCode,
        string _codeICQRF
    )
        private
    {
        uint size = wineries[_mappingID].length;
        wineries[_mappingID].length++;
        wineries[_mappingID][size].operationSender = _operationSender;
        wineries[_mappingID][size].offChainIdentity = _offChainIdentity;
        wineries[_mappingID][size].operationID = _operationID;
        wineries[_mappingID][size].operationCode = _operationCode;
        wineries[_mappingID][size].operationDate = _operationDate;
        wineries[_mappingID][size].areaCode = _areaCode;
        wineries[_mappingID][size].codeICQRF = _codeICQRF;
    }

    /// @notice TODO Commenti
    function addProduct(
        bytes32 _mappingID,
        uint _index,
        string _productID,
        string _quantity,
        string _attributes
    )
        private
    {
        wineries[_mappingID][_index].prods.push(
            Product(
                _productID,
                _quantity,
                _attributes
            )
        );
    }

    function addRelationshipBindingWineryOperation(
        bytes32 _mappingID,
        uint _numCurOperation,
        bytes32 _parentMappingID,        
        int _numParent        
    )
        private
    {
        require(_numCurOperation < OPERATION_SEARCH_MAX);
        require(_numParent >= 0);
        uint _parentIndex = uint(_numParent);
        int _numCurOperationINT = int(_numCurOperation);
        wineries[_mappingID][_numCurOperation].parentList.push(IndexElem(_parentMappingID, _numParent));
        wineries[_parentMappingID][_parentIndex].childList.push(IndexElem(_mappingID, _numCurOperationINT));
    }

  /*
    
    // ======================================================================================
    // ÐApps helpers
    // ======================================================================================




    function getParentOperation(bytes32 _mappingID, uint8 _index, uint8 _nParent) external view returns (bytes32 id, int num) {
        id = wineries[_mappingID][_index].parentList[_nParent].mappingId;
        num = wineries[_mappingID][_index].parentList[_nParent].nOp;
    }

    function getNumParentOperation(bytes32 _mappingID, uint8 _index) external view returns (uint num) {
        num = wineries[_mappingID][_index].parentList.length;
    }

    function getChildOperation(bytes32 _mappingID, uint8 _index, uint8 _nParent) external view returns (bytes32 id, int num) {
        id = wineries[_mappingID][_index].childList[_nParent].mappingId;
        num = wineries[_mappingID][_index].childList[_nParent].nOp;
    }

    function getNumChildOperation(bytes32 _mappingID, uint8 _index) external view returns (uint num) {
        num = wineries[_mappingID][_index].childList.length;
    }
    
    function getNumPositionProduct(bytes32 _mappingID, uint8 _nPosOp, string _productId) external view returns (int position) {
        position = -1;
        for (uint8 i = 0; i < wineries[_mappingID][_nPosOp].prods.length; i++) {
            if (keccak256(wineries[_mappingID][_nPosOp].prods[i].productID) == keccak256(_productId))
                position = i;
        }
    }

    function getNumWineryOperation(bytes32 _mappingID) external view returns (uint num) {
        num = wineries[_mappingID].length;
    }

    */

}

contract ProducerOperations is Commons, Authorized {

    // ============================================================================================
    // Producer operations
    // ============================================================================================

    struct HarvestOperation {
        address operationSender;
        string offChainIdentity;
        string operationID;    // codice_allegato
        uint32 quantity;        // uva_rivendicata (kg)
        uint24 areaCode;        // cod_istat regione_provenienza_uve, mapping
        uint16 year;            // anno raccolta
        string attributes;      
        IndexElem child;
        Vineyard[] vineyards;
    }

    struct Vineyard {
        uint16 variety;        // varietà mapping descrizione_varieta
        uint24 areaCode;       // codice_istat_comune, mapping dal quale si ricaverà anche prov. e descrizione
        uint32 usedSurface;    // vigneto utilizzato (superficie_utilizzata) mq2
        uint16 plantingYear;
    }

    mapping(bytes32 => HarvestOperation) public harvests;
    
    event LogStoreHarvestOperation(
        string trackIDs,
        address operationSender,
        address indexed onChainIdentity,
        string operationID
    );

    event LogAddVineyard(
        string trackIDs,
        address operationSender,
        address indexed onChainIdentity,
        uint24 indexed areaCode       
    );

    function ProducerOperations() internal { }
    
    // ============================================================================================
    // External functions for producers
    // ============================================================================================

    /// @notice ****
    /// @dev ****
    /// @param _trackIDs ****
    /// @return true if operation is successful
    function storeHarvestOperation(
        string _trackIDs,
        string _operationID,
        uint32 _quantity,
        uint16 _areaCode,
        uint16 _year,
        string _attributes
    )
        external
        producersOnly
        returns (bool success)
    {
        storeHarvestOperation(
            keccak256(_trackIDs, msg.sender),
            msg.sender,
            getOffChainIdentity(msg.sender),
            _operationID,            
            _quantity,
            _areaCode,
            _year,
            _attributes
        );
        emit LogStoreHarvestOperation(
            _trackIDs,
            msg.sender,
            msg.sender,
            _operationID
        );
        return true;
    }

    /// @notice ****
    /// @dev ****
    /// @param _trackIDs ****
    /// @return true if operation is successful
    function addVineyard(
        string _trackIDs,
        uint16 _variety,
        uint24 _areaCode,
        uint32 _usedSurface,
        uint16 _plantingYear
    )
        external
        producersOnly
        returns (bool success)
    {
        addVineyard(
            keccak256(_trackIDs, msg.sender),
            _variety,
            _areaCode,            
            _usedSurface,
            _plantingYear
        );
        emit LogAddVineyard(_trackIDs, msg.sender, msg.sender, _areaCode);
        return true;
    }

    // ============================================================================================
    // External functions for regulators
    // ============================================================================================

    function storeHarvestOperationByRegulator(
        string _trackIDs,
        string _offChainIdentity,
        string _operationID,
        uint32 _quantity,
        uint16 _areaCode,
        uint16 _year,
        string _attributes
    )
        external
        regulatorsOnly
        returns (bool success)
    {
        address _producer = getAddress(_offChainIdentity);
        storeHarvestOperation(
            keccak256(_trackIDs,_producer),
            msg.sender,
            _offChainIdentity,
            _operationID,
            _quantity,
            _areaCode,
            _year,
            _attributes
        );
        emit LogStoreHarvestOperation(
            _trackIDs,
            msg.sender,
            _producer,
            _operationID
        );
        return true;
    }

    function addVineyardByRegulator(
        string _trackIDs,
        string _offChainIdentity,
        uint16 _variety,
        uint24 _areaCode,
        uint32 _usedSurface,
        uint16 _plantingYear
    )
        external
        regulatorsOnly
        returns (bool success)
    {
        address _producer = getAddress(_offChainIdentity);
        require(_producer != address(0));
        addVineyard(
            keccak256(_trackIDs,_producer),
            _variety,
            _areaCode,
            _usedSurface,
            _plantingYear
        );
        emit LogAddVineyard(_trackIDs, msg.sender, _producer, _areaCode);
        return true;
    }

    // ============================================================================================
    // Helpers for ÐApps
    // ============================================================================================

    function getHarvestOperation(string _trackID, address _producer)
        external view
        returns (
            address operationSender,
            string offChainIdentity,
            string operationID,
            uint32 quantity,
            uint24 areaCode,
            uint16 year,
            string attributes
        )
    {
        bytes32 _mappingID32 = keccak256(_trackID, _producer);
        operationSender = harvests[_mappingID32].operationSender;
        offChainIdentity = harvests[_mappingID32].offChainIdentity;
        operationID = harvests[_mappingID32].operationID;
        quantity = harvests[_mappingID32].quantity;
        areaCode = harvests[_mappingID32].areaCode;
        year = harvests[_mappingID32].year;
        attributes = harvests[_mappingID32].attributes;
    }

    function getVineyard(string _trackID, address _producer, uint _index)
        external view
        returns (
            uint32 variety,
            uint32 areaCode,
            uint32 usedSurface,
            uint16 plantingYear
        )
    {
        bytes32 _mappingID32 = keccak256(_trackID, _producer);
        variety = harvests[_mappingID32].vineyards[_index].variety;
        areaCode = harvests[_mappingID32].vineyards[_index].areaCode;
        usedSurface = harvests[_mappingID32].vineyards[_index].usedSurface;
        plantingYear = harvests[_mappingID32].vineyards[_index].plantingYear;
    }

    function getVineyardCount(string _trackID, address _producer)
        external view
        returns (uint numberOfVineyards)
    {
        bytes32 _mappingID32 = keccak256(_trackID, _producer);
        numberOfVineyards = harvests[_mappingID32].vineyards.length;
    }

    // ============================================================================================
    // Private functions
    // ============================================================================================

    function storeHarvestOperation(
        bytes32 _mappingID,
        address _operationSender,
        string _offChainIdentity,
        string _operationID,
        uint32 _quantity,
        uint24 _areaCode,        
        uint16 _year,
        string _attributes
    )
        private
    {
        harvests[_mappingID].operationSender = _operationSender;
        harvests[_mappingID].offChainIdentity = _offChainIdentity;
        harvests[_mappingID].operationID = _operationID;
        harvests[_mappingID].quantity = _quantity;
        harvests[_mappingID].areaCode = _areaCode;
        harvests[_mappingID].year = _year;
        harvests[_mappingID].attributes = _attributes;
    }

    function addVineyard(
        bytes32 _mappingID,
        uint16 _variety,
        uint24 _areaCode,
        uint32 _usedSurface,
        uint16 _plantingYear        
    )
        private
    {
        harvests[_mappingID].vineyards.push(
            Vineyard(_variety, _areaCode, _usedSurface, _plantingYear)
        );
    }
    
}

contract Upgradable is Ownable {

    address public newAddress;
    uint    public deprecatedSince;
    string  public version;
    string  public newVersion;
    string  public reason;

    event LogSetDeprecated(address newAddress, string newVersion, string reason);

    /**
     *
     */
    function Upgradable(string _version) internal
    {
        version = _version;
    }

    /**
     *
     */
    function setDeprecated(address _newAddress, string _newVersion, string _reason) external
        ownerOnly
        returns (bool success)
    {
        require(!isDeprecated());
        require(_newAddress != address(this));
        require(!Upgradable(_newAddress).isDeprecated());
        deprecatedSince = now;
        newAddress = _newAddress;
        newVersion = _newVersion;
        reason = _reason;
        emit LogSetDeprecated(_newAddress, _newVersion, _reason);
        return true;
    }

    /**
     * @notice check if the contract is deprecated
     */
    function isDeprecated() public view returns (bool deprecated)
    {
        return (deprecatedSince != 0);
    }
}

contract SmartBinding is Authorized {

    mapping (bytes32 => bytes32) public bindingSmartIdentity;
 
    event LogBindSmartIdentity (
        string _trackIDs,
        address operationSender,
        address onChainIdentity,
        string smartIdentity
    );

    function SmartBinding() internal { }

    // ============================================================================================
    // External functions for wineries
    // ============================================================================================

    /// @notice ****
    /// @dev ****
    /// @param _trackIDs ****
    /// @return true if operation is successful
    function bindSmartIdentity(string _trackIDs, string _smartIdentity)
        external
        wineriesOnly
    {
        bindingSmartIdentity[keccak256(_smartIdentity, msg.sender)] = keccak256(_trackIDs, msg.sender);
        emit LogBindSmartIdentity(_trackIDs, msg.sender, msg.sender, _smartIdentity);
    }

    // ============================================================================================
    // External functions for regulators
    // ============================================================================================
    
    /// @notice ****
    /// @dev ****
    /// @param _trackIDs ****
    /// @return true if operation is successful
    function bindSmartIdentityByRegulator(
        string _trackIDs,
        string _offChainIdentity,  
        string _smartIdentity
    )
        external
        regulatorsOnly
    {
        address winery = getAddress(_offChainIdentity);
        bindingSmartIdentity[keccak256(_smartIdentity, winery)] = keccak256(_trackIDs, winery);
        emit LogBindSmartIdentity(_trackIDs, msg.sender, winery, _smartIdentity);
    }

    // ======================================================================================
    // ÐApps helpers
    // ======================================================================================

    function getWineryMappingID(string _smartIdentity, string _offChainIdentity)
        external view
        returns (bytes32 wineryMappingID)
    {
        bytes32 index = keccak256(_smartIdentity, getAddress(_offChainIdentity));
        wineryMappingID = bindingSmartIdentity[index];
    }

}

contract WineSupplyChain is
    Commons,
    Authorized,
    Upgradable,
    ProducerOperations,
    WineryOperations,
    SmartBinding
{

    address public endorsements;

    function WineSupplyChain(address _endorsements) Upgradable("1.0.0") public {
        endorsements = _endorsements;
    }

    // ============================================================================================
    // External functions for regulators
    // ============================================================================================

    /// @notice TODO Inserire commenti
    function startWineryProductByRegulator(
        string _harvestTrackID,
        string _producerOffChainIdentity,
        string _wineryOperationTrackIDs,
        string _wineryOffChainIdentity,
        int _productIndex
    )
        external
        regulatorsOnly
        returns (bool success)
    {
        require(_productIndex >= 0);
        address producer = getAddress(_producerOffChainIdentity);
        bytes32 harvestMappingID = keccak256(_harvestTrackID, producer);
        address winery = getAddress(_wineryOffChainIdentity);
        bytes32 wineryOperationMappingID = keccak256(_wineryOperationTrackIDs, winery);
        harvests[harvestMappingID].child = IndexElem(wineryOperationMappingID, _productIndex);
        wineries[wineryOperationMappingID][uint(_productIndex)].parentList.push(
            IndexElem(harvestMappingID, -1));
        return true;
    }

    /// @notice TODO Commenti
    // TOCHECK AGGIUNGERE REQUIRE SU TIPO_OPERAZIONE = 'CASD' ???
    function startWinery(
        string _harvestTrackID,
        string _offChainProducerIdentity,
        string _wineryTrackID,
        uint _productIndex
    )
        external
        wineriesOnly
    {
        require(_productIndex >= 0);
        address producer = getAddress(_offChainProducerIdentity);
        bytes32 harvestMappingID = keccak256(_harvestTrackID, producer);
        bytes32 wineryOperationMappingID = keccak256(_wineryTrackID, msg.sender);
        wineries[wineryOperationMappingID][_productIndex].parentList.push(
            IndexElem(harvestMappingID, -1));
    }

    /// @notice TODO Commenti
    // TOCHECK AGGIUNGERE REQUIRE SU TIPO_OPERAZIONE = 'CASD' ???
    function startProduct(
        string _harvestTrackID,
        string _wineryTrackID,
        string _offChainWineryIdentity,
        int _productIndex
    )
        external
        producersOnly
    {
        require(_productIndex > 0);
        bytes32 harvestMappingID = keccak256(_harvestTrackID, msg.sender);
        address winery = getAddress(_offChainWineryIdentity);
        bytes32 wineryOperationMappingID = keccak256(_wineryTrackID, winery);
        harvests[harvestMappingID].child = IndexElem(wineryOperationMappingID, _productIndex);
    }

    /// @notice ***
    /// @dev ****
    /// @param _trackIDs **
    /// @param _address **
    /// @return mappingID if ***
    function getMappingID(string _trackIDs, address _address)
        external pure
        returns (bytes32 mappingID)
    {
        mappingID = keccak256(_trackIDs, _address);
    }

}

Contract Security Audit

Contract ABI

API
[{"constant":false,"inputs":[{"name":"_trackID","type":"string"},{"name":"_operationIndex","type":"uint256"},{"name":"_productIndex","type":"uint256"},{"name":"attributes","type":"string"}],"name":"setProductAttributes","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"harvests","outputs":[{"name":"operationSender","type":"address"},{"name":"offChainIdentity","type":"string"},{"name":"operationID","type":"string"},{"name":"quantity","type":"uint32"},{"name":"areaCode","type":"uint24"},{"name":"year","type":"uint16"},{"name":"attributes","type":"string"},{"components":[{"name":"mappingId","type":"bytes32"},{"name":"nOp","type":"int256"}],"name":"child","type":"tuple"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_trackID","type":"string"},{"name":"_index","type":"uint256"},{"name":"_productID","type":"string"},{"name":"_quantity","type":"string"},{"name":"_attributes","type":"string"}],"name":"addProduct","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"bindingSmartIdentity","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_trackID","type":"string"},{"name":"_offChainIdentity","type":"string"},{"name":"_operationID","type":"string"},{"name":"_operationCode","type":"string"},{"name":"_operationDate","type":"uint256"},{"name":"_areaCode","type":"uint16"},{"name":"_codeICQRF","type":"string"}],"name":"addWineryOperationByRegulator","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_trackID","type":"string"},{"name":"_winery","type":"address"},{"name":"_index","type":"uint256"},{"name":"_productIndex","type":"uint256"}],"name":"getProductOperation","outputs":[{"name":"productID","type":"string"},{"name":"quantity","type":"string"},{"name":"attributes","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_trackIDs","type":"string"},{"name":"_smartIdentity","type":"string"}],"name":"bindSmartIdentity","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_trackID","type":"string"},{"name":"_offChainIdentity","type":"string"},{"name":"_numCurOperation","type":"uint256"},{"name":"_parentTrackID","type":"string"},{"name":"_parentOffChainIdentity","type":"string"},{"name":"_numParent","type":"int256"}],"name":"addReferenceParentWineryOperationByRegulator","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_trackID","type":"string"},{"name":"_operationIndex","type":"uint256"},{"name":"attributes","type":"string"}],"name":"setOperationAttributes","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_trackID","type":"string"},{"name":"_offChainIdentity","type":"string"},{"name":"_operationIndex","type":"uint256"},{"name":"_productIndex","type":"uint256"},{"name":"attributes","type":"string"}],"name":"setProductAttributesByRegulator","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_address","type":"address"},{"name":"_newValue","type":"bool"}],"name":"setRegulator","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_trackID","type":"string"},{"name":"_offChainIdentity","type":"string"},{"name":"_operationIndex","type":"uint256"},{"name":"attributes","type":"string"}],"name":"setOperationAttributesByRegulator","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"newVersion","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"},{"name":"","type":"uint256"}],"name":"wineries","outputs":[{"name":"operationSender","type":"address"},{"name":"offChainIdentity","type":"string"},{"name":"operationID","type":"string"},{"name":"operationCode","type":"string"},{"name":"operationDate","type":"uint256"},{"name":"areaCode","type":"uint16"},{"name":"codeICQRF","type":"string"},{"name":"attributes","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_newAddress","type":"address"},{"name":"_newVersion","type":"string"},{"name":"_reason","type":"string"}],"name":"setDeprecated","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_trackID","type":"string"},{"name":"_winery","type":"address"},{"name":"_operationID","type":"string"}],"name":"getNumPositionOperation","outputs":[{"name":"position","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_trackIDs","type":"string"},{"name":"_address","type":"address"}],"name":"getMappingID","outputs":[{"name":"mappingID","type":"bytes32"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"version","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"deprecatedSince","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_trackID","type":"string"},{"name":"_winery","type":"address"},{"name":"_index","type":"uint256"}],"name":"getWineryOperation","outputs":[{"name":"operationSender","type":"address"},{"name":"offChainIdentity","type":"string"},{"name":"operationID","type":"string"},{"name":"operationCode","type":"string"},{"name":"operationDate","type":"uint256"},{"name":"areaCode","type":"uint16"},{"name":"codeICQRF","type":"string"},{"name":"attributes","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_address","type":"address"}],"name":"getUser","outputs":[{"name":"friendlyName","type":"string"},{"name":"offChainIdentity","type":"string"},{"name":"isRegulator","type":"bool"},{"name":"isProducer","type":"bool"},{"name":"isWinery","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_trackIDs","type":"string"},{"name":"_variety","type":"uint16"},{"name":"_areaCode","type":"uint24"},{"name":"_usedSurface","type":"uint32"},{"name":"_plantingYear","type":"uint16"}],"name":"addVineyard","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_trackIDs","type":"string"},{"name":"_offChainIdentity","type":"string"},{"name":"_variety","type":"uint16"},{"name":"_areaCode","type":"uint24"},{"name":"_usedSurface","type":"uint32"},{"name":"_plantingYear","type":"uint16"}],"name":"addVineyardByRegulator","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_address","type":"address"},{"name":"_friendlyName","type":"string"},{"name":"_offChainIdentity","type":"string"},{"name":"_isRegulator","type":"bool"},{"name":"_isProducer","type":"bool"},{"name":"_isWinery","type":"bool"}],"name":"setUser","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_trackIDs","type":"string"},{"name":"_offChainIdentity","type":"string"},{"name":"_smartIdentity","type":"string"}],"name":"bindSmartIdentityByRegulator","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_smartIdentity","type":"string"},{"name":"_offChainIdentity","type":"string"}],"name":"getWineryMappingID","outputs":[{"name":"wineryMappingID","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_trackID","type":"string"},{"name":"_numCurOperation","type":"uint256"},{"name":"_parentTrackID","type":"string"},{"name":"_parentWinery","type":"address"},{"name":"_numParent","type":"int256"}],"name":"addReferenceParentWineryOperation","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getOwner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_trackID","type":"string"},{"name":"_producer","type":"address"}],"name":"getVineyardCount","outputs":[{"name":"numberOfVineyards","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"onChainAddresses","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_harvestTrackID","type":"string"},{"name":"_wineryTrackID","type":"string"},{"name":"_offChainWineryIdentity","type":"string"},{"name":"_productIndex","type":"int256"}],"name":"startProduct","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_trackID","type":"string"},{"name":"_producer","type":"address"},{"name":"_index","type":"uint256"}],"name":"getVineyard","outputs":[{"name":"variety","type":"uint32"},{"name":"areaCode","type":"uint32"},{"name":"usedSurface","type":"uint32"},{"name":"plantingYear","type":"uint16"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_harvestTrackID","type":"string"},{"name":"_producerOffChainIdentity","type":"string"},{"name":"_wineryOperationTrackIDs","type":"string"},{"name":"_wineryOffChainIdentity","type":"string"},{"name":"_productIndex","type":"int256"}],"name":"startWineryProductByRegulator","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_trackID","type":"string"},{"name":"_producer","type":"address"}],"name":"getHarvestOperation","outputs":[{"name":"operationSender","type":"address"},{"name":"offChainIdentity","type":"string"},{"name":"operationID","type":"string"},{"name":"quantity","type":"uint32"},{"name":"areaCode","type":"uint24"},{"name":"year","type":"uint16"},{"name":"attributes","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"endorsements","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_offChainIdentity","type":"string"}],"name":"getAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_trackIDs","type":"string"},{"name":"_offChainIdentity","type":"string"},{"name":"_operationID","type":"string"},{"name":"_quantity","type":"uint32"},{"name":"_areaCode","type":"uint16"},{"name":"_year","type":"uint16"},{"name":"_attributes","type":"string"}],"name":"storeHarvestOperationByRegulator","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"isDeprecated","outputs":[{"name":"deprecated","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_harvestTrackID","type":"string"},{"name":"_offChainProducerIdentity","type":"string"},{"name":"_wineryTrackID","type":"string"},{"name":"_productIndex","type":"uint256"}],"name":"startWinery","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"newAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_trackID","type":"string"},{"name":"_index","type":"uint256"},{"name":"_offChainIdentity","type":"string"},{"name":"_productID","type":"string"},{"name":"_quantity","type":"string"},{"name":"_attributes","type":"string"}],"name":"addProductByRegulator","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_address","type":"address"},{"name":"_newValue","type":"bool"}],"name":"setProducer","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_trackID","type":"string"},{"name":"_operationID","type":"string"},{"name":"_operationCode","type":"string"},{"name":"_operationDate","type":"uint256"},{"name":"_areaCode","type":"uint16"},{"name":"_codeICQRF","type":"string"}],"name":"addWineryOperation","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_address","type":"address"},{"name":"_newValue","type":"bool"}],"name":"setWinery","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"reason","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_trackIDs","type":"string"},{"name":"_operationID","type":"string"},{"name":"_quantity","type":"uint32"},{"name":"_areaCode","type":"uint16"},{"name":"_year","type":"uint16"},{"name":"_attributes","type":"string"}],"name":"storeHarvestOperation","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"onChainIdentities","outputs":[{"name":"friendlyName","type":"string"},{"name":"offChainIdentity","type":"string"},{"name":"isRegulator","type":"bool"},{"name":"isProducer","type":"bool"},{"name":"isWinery","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_endorsements","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_trackIDs","type":"string"},{"indexed":false,"name":"operationSender","type":"address"},{"indexed":false,"name":"onChainIdentity","type":"address"},{"indexed":false,"name":"smartIdentity","type":"string"}],"name":"LogBindSmartIdentity","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_trackID","type":"string"},{"indexed":false,"name":"operationSender","type":"address"},{"indexed":true,"name":"onChainIdentity","type":"address"},{"indexed":false,"name":"operationID","type":"string"},{"indexed":false,"name":"index","type":"uint256"}],"name":"LogAddWineryOperation","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_trackID","type":"string"},{"indexed":false,"name":"operationSender","type":"address"},{"indexed":true,"name":"onChainIdentity","type":"address"},{"indexed":true,"name":"operationID","type":"string"},{"indexed":false,"name":"productID","type":"string"}],"name":"LogAddProduct","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"trackIDs","type":"string"},{"indexed":false,"name":"operationSender","type":"address"},{"indexed":true,"name":"onChainIdentity","type":"address"},{"indexed":false,"name":"operationID","type":"string"}],"name":"LogStoreHarvestOperation","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"trackIDs","type":"string"},{"indexed":false,"name":"operationSender","type":"address"},{"indexed":true,"name":"onChainIdentity","type":"address"},{"indexed":true,"name":"areaCode","type":"uint24"}],"name":"LogAddVineyard","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"newAddress","type":"address"},{"indexed":false,"name":"newVersion","type":"string"},{"indexed":false,"name":"reason","type":"string"}],"name":"LogSetDeprecated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"account","type":"address"},{"indexed":false,"name":"oldFriendlyName","type":"string"},{"indexed":false,"name":"oldOffChainIdentity","type":"string"},{"indexed":false,"name":"oldIsProducer","type":"bool"},{"indexed":false,"name":"oldIsWinery","type":"bool"},{"indexed":false,"name":"oldIsRegulator","type":"bool"},{"indexed":true,"name":"operationSender","type":"address"}],"name":"LogSetUser","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"winery","type":"address"},{"indexed":false,"name":"oldIsValid","type":"bool"},{"indexed":false,"name":"isValid","type":"bool"},{"indexed":true,"name":"operationSender","type":"address"}],"name":"LogSetWinery","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"regulator","type":"address"},{"indexed":false,"name":"oldValue","type":"bool"},{"indexed":false,"name":"value","type":"bool"},{"indexed":true,"name":"operationSender","type":"address"}],"name":"LogSetRegulator","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"producer","type":"address"},{"indexed":false,"name":"oldValue","type":"bool"},{"indexed":false,"name":"value","type":"bool"},{"indexed":true,"name":"operationSender","type":"address"}],"name":"LogSetProducer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"previousOwner","type":"address"},{"indexed":false,"name":"newOwner","type":"address"}],"name":"LogTransferOwnership","type":"event"}]

606060405234156200001057600080fd5b60405160208062005dc883398101604052808051915060409050805190810160405260058082527f312e302e30000000000000000000000000000000000000000000000000000000602083015260008054600160a060020a03191633600160a060020a03161790558180516200008b929160200190620000b3565b5050600b8054600160a060020a031916600160a060020a039290921691909117905562000158565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620000f657805160ff191683800117855562000126565b8280016001018555821562000126579182015b828111156200012657825182559160200191906001019062000109565b506200013492915062000138565b5090565b6200015591905b808211156200013457600081556001016200013f565b90565b615c6080620001686000396000f3006060604052600436106102445763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041662ba3e508114610249578063012defec1461028f57806302879f9c1461042d57806309d84fc4146104735780630db790031461049b5780630eb51018146104f757806311c0f9311461067357806312de8a121461069d5780631c566ef2146106e65780631c638376146107145780631e5bd14a1461075257806321cbed351461077657806329cdda23146107b057806338c338621461083a5780633fcce62614610a9e5780634562426014610ad5578063508cde1314610b0c57806354fd4d5014610b385780636dd2824114610b4b5780636eabb2f614610b5e5780636f77926b14610b8d57806373a75c1f14610ca8578063750732ec14610ce85780637aa1688e14610d3257806384d62f4714610de5578063884095f614610e1b578063887bae7414610e45578063893d20e814610e825780639b71dec314610eb1578063a29f9fb914610edd578063a584d8cc14610ef3578063ab5f338014610f2c578063b0dc63eb14610f91578063b241b3b514610fd6578063b5ae451914611181578063bf40fac114611194578063c1ef098b146111e5578063c717823014611241578063ca6cf79614611254578063ccdb3f451461128d578063cd22f536146112a0578063cf46dca7146112f2578063d36dbc0c14611316578063d9bf823814611364578063e134e33d14611388578063e8aa377b1461139b578063f2fde38b146113eb578063f7c42ac81461140a575b600080fd5b341561025457600080fd5b61027b60246004803582810192908201359181359160443591606435918201910135611429565b604051901515815260200160405180910390f35b341561029a57600080fd5b6102a5600435611506565b604051600160a060020a038916815263ffffffff8616606082015262ffffff8516608082015261ffff841660a082015260e081018290526101006020820181815290604083019060c084019084018b818151815260200191508051906020019080838360005b8381101561032357808201518382015260200161030b565b50505050905090810190601f1680156103505780820380516001836020036101000a031916815260200191505b5084810383528a818151815260200191508051906020019080838360005b8381101561038657808201518382015260200161036e565b50505050905090810190601f1680156103b35780820380516001836020036101000a031916815260200191505b50848103825286818151815260200191508051906020019080838360005b838110156103e95780820151838201526020016103d1565b50505050905090810190601f1680156104165780820380516001836020036101000a031916815260200191505b509b50505050505050505050505060405180910390f35b341561043857600080fd5b61027b602460048035828101929082013591813591604435808201929081013591606435808201929081013591608435908101910135611760565b341561047e57600080fd5b61048960043561199a565b60405190815260200160405180910390f35b34156104a657600080fd5b6104f560246004803582810192908201359181358083019290820135916044358083019290820135916064358083019290820135916084359161ffff60a435169160c4359182019101356119ac565b005b341561050257600080fd5b6105296024600480358281019291013590600160a060020a03903516604435606435611be1565b60405180806020018060200180602001848103845287818151815260200191508051906020019080838360005b8381101561056e578082015183820152602001610556565b50505050905090810190601f16801561059b5780820380516001836020036101000a031916815260200191505b50848103835286818151815260200191508051906020019080838360005b838110156105d15780820151838201526020016105b9565b50505050905090810190601f1680156105fe5780820380516001836020036101000a031916815260200191505b50848103825285818151815260200191508051906020019080838360005b8381101561063457808201518382015260200161061c565b50505050905090810190601f1680156106615780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390f35b341561067e57600080fd5b6104f56024600480358281019290820135918135918201910135611efb565b34156106a857600080fd5b61027b60246004803582810192908201359181358083019290820135916044359160643580820192908101359160843590810191013560a435612054565b34156106f157600080fd5b61027b60246004803582810192908201359181359160443590810191013561218d565b341561071f57600080fd5b61027b6024600480358281019290820135918135808301929082013591604435916064359160843591820191013561224b565b341561075d57600080fd5b6104f5600160a060020a03600435166024351515612361565b341561078157600080fd5b61027b602460048035828101929082013591813580830192908201359160443591606435908101910135612425565b34156107bb57600080fd5b6107c361251c565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156107ff5780820151838201526020016107e7565b50505050905090810190601f16801561082c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561084557600080fd5b6108536004356024356125ba565b6040518089600160a060020a0316600160a060020a031681526020018060200180602001806020018881526020018761ffff1661ffff168152602001806020018060200186810386528d818151815260200191508051906020019080838360005b838110156108cc5780820151838201526020016108b4565b50505050905090810190601f1680156108f95780820380516001836020036101000a031916815260200191505b5086810385528c818151815260200191508051906020019080838360005b8381101561092f578082015183820152602001610917565b50505050905090810190601f16801561095c5780820380516001836020036101000a031916815260200191505b5086810384528b818151815260200191508051906020019080838360005b8381101561099257808201518382015260200161097a565b50505050905090810190601f1680156109bf5780820380516001836020036101000a031916815260200191505b50868103835288818151815260200191508051906020019080838360005b838110156109f55780820151838201526020016109dd565b50505050905090810190601f168015610a225780820380516001836020036101000a031916815260200191505b50868103825287818151815260200191508051906020019080838360005b83811015610a58578082015183820152602001610a40565b50505050905090810190601f168015610a855780820380516001836020036101000a031916815260200191505b509d505050505050505050505050505060405180910390f35b3415610aa957600080fd5b61027b60048035600160a060020a03169060248035808201929081013591604435908101910135612937565b3415610ae057600080fd5b610489602460048035828101929082013591600160a060020a0382351691604435908101910135612acd565b3415610b1757600080fd5b6104896024600480358281019291013590600160a060020a03903516612c30565b3415610b4357600080fd5b6107c3612c78565b3415610b5657600080fd5b610489612ce3565b3415610b6957600080fd5b6108536024600480358281019291013590600160a060020a03903516604435612ce9565b3415610b9857600080fd5b610bac600160a060020a03600435166131fb565b60405183151560408201528215156060820152811515608082015260a080825281906020820190820188818151815260200191508051906020019080838360005b83811015610c05578082015183820152602001610bed565b50505050905090810190601f168015610c325780820380516001836020036101000a031916815260200191505b50838103825287818151815260200191508051906020019080838360005b83811015610c68578082015183820152602001610c50565b50505050905090810190601f168015610c955780820380516001836020036101000a031916815260200191505b5097505050505050505060405180910390f35b3415610cb357600080fd5b61027b602460048035828101929101359061ffff903581169062ffffff604435169063ffffffff606435169060843516613396565b3415610cf357600080fd5b61027b602460048035828101929082013591813591820191013561ffff60443581169062ffffff606435169063ffffffff608435169060a43516613489565b3415610d3d57600080fd5b6104f560048035600160a060020a03169060446024803590810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284378201915050505050509190803590602001908201803590602001908080601f016020809104026020016040519081016040528181529291906020840183838082843750949650505050823515159260208101351515925060400135151590506135cb565b3415610df057600080fd5b6104f560246004803582810192908201359181358083019290820135916044359182019101356138b6565b3415610e2657600080fd5b6104896024600480358281019290820135918135918201910135613a46565b3415610e5057600080fd5b61027b602460048035828101929082013591813591604435908101910135600160a060020a0360643516608435613ad7565b3415610e8d57600080fd5b610e95613b8b565b604051600160a060020a03909116815260200160405180910390f35b3415610ebc57600080fd5b6104896024600480358281019291013590600160a060020a03903516613b9b565b3415610ee857600080fd5b610e95600435613bf7565b3415610efe57600080fd5b6104f56024600480358281019290820135918135808301929082013591604435918201910135606435613c12565b3415610f3757600080fd5b610f5b6024600480358281019291013590600160a060020a03903516604435613d4b565b60405163ffffffff94851681529284166020840152921660408083019190915261ffff9092166060820152608001905180910390f35b3415610f9c57600080fd5b61027b6024600480358281019290820135918135808301929082013591604435808301929082013591606435918201910135608435613e88565b3415610fe157600080fd5b6110026024600480358281019291013590600160a060020a03903516614078565b604051600160a060020a038816815263ffffffff8516606082015262ffffff8416608082015261ffff831660a082015260e06020820181815290604083019060c084019084018a818151815260200191508051906020019080838360005b83811015611078578082015183820152602001611060565b50505050905090810190601f1680156110a55780820380516001836020036101000a031916815260200191505b50848103835289818151815260200191508051906020019080838360005b838110156110db5780820151838201526020016110c3565b50505050905090810190601f1680156111085780820380516001836020036101000a031916815260200191505b50848103825285818151815260200191508051906020019080838360005b8381101561113e578082015183820152602001611126565b50505050905090810190601f16801561116b5780820380516001836020036101000a031916815260200191505b509a505050505050505050505060405180910390f35b341561118c57600080fd5b610e95614338565b341561119f57600080fd5b610e9560046024813581810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284375094965061434795505050505050565b34156111f057600080fd5b61027b602460048035828101929082013591813580830192908201359160443580830192908201359163ffffffff606435169161ffff60843581169260a4359091169160c4359081019101356143ca565b341561124c57600080fd5b61027b6145ab565b341561125f57600080fd5b6104f560246004803582810192908201359181358083019290820135916044359182019101356064356145b3565b341561129857600080fd5b610e95614732565b34156112ab57600080fd5b6104f560246004803582810192908201359181359160443580820192908101359160643580820192908101359160843580820192908101359160a435908101910135614741565b34156112fd57600080fd5b6104f5600160a060020a036004351660243515156149ad565b341561132157600080fd5b61027b60246004803582810192908201359181358083019290820135916044358083019290820135916064359161ffff608435169160a435918201910135614a8e565b341561136f57600080fd5b6104f5600160a060020a03600435166024351515614d20565b341561139357600080fd5b6107c3614e03565b34156113a657600080fd5b61027b602460048035828101929082013591813580830192908201359163ffffffff604435169161ffff6064358116926084359091169160a435908101910135614e6e565b34156113f657600080fd5b6104f5600160a060020a0360043516614fec565b341561141557600080fd5b610bac600160a060020a036004351661509d565b33600160a060020a0316600090815260016020526040812060020154819062010000900460ff16151561145b57600080fd5b87873360405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a0281526014019350505050604051908190039020600081815260096020526040902080549192508591859190899081106114bb57fe5b90600052602060002090600b0201600801878154811015156114d957fe5b906000526020600020906003020160020191906114f79291906158a6565b50600198975050505050505050565b60086020528060005260406000206000915090508060000160009054906101000a9004600160a060020a031690806001018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156115cb5780601f106115a0576101008083540402835291602001916115cb565b820191906000526020600020905b8154815290600101906020018083116115ae57829003601f168201915b505050505090806002018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156116695780601f1061163e57610100808354040283529160200191611669565b820191906000526020600020905b81548152906001019060200180831161164c57829003601f168201915b505050506003830154600484018054939463ffffffff831694640100000000840462ffffff16945067010000000000000090930461ffff1692909190600261010060018316150260001901909116046020601f820181900481020160405190810160405280929190818152602001828054600181600116156101000203166002900480156117385780601f1061170d57610100808354040283529160200191611738565b820191906000526020600020905b81548152906001019060200180831161171b57829003601f168201915b5050505050908060050160408051908101604052815481526001909101546020820152905088565b33600160a060020a0316600090815260016020526040812060020154819062010000900460ff16151561179257600080fd5b8a8a3360405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a02815260140193505050506040518091039020905061186f818a8a8a8080601f016020809104026020016040519081016040528181529291906020840183838082843782019150505050505089898080601f016020809104026020016040519081016040528181529291906020840183838082843782019150505050505088888080601f01602080910402602001604051908101604052818152929190602084018383808284375061520d945050505050565b600081815260096020526040902080548a90811061188957fe5b90600052602060002090600b020160020160405180828054600181600116156101000203166002900480156118f55780601f106118d35761010080835404028352918201916118f5565b820191906000526020600020905b8154815290600101906020018083116118e1575b5050915050604051809103902033600160a060020a03167fdedf3b88b7ff3467683a7370c9e412b6564ae72f61d19346f1f118d82dce8b208d8d338d8d604051600160a060020a03841660208201526060808252810185905280604081016080820188888082843790910184810383528581526020019050858580828437820191505097505050505050505060405180910390a35060019a9950505050505050505050565b600a6020526000908152604090205481565b600160a060020a033316600090815260016020526040812060020154819060ff1615156119d857600080fd5b611a108c8c8080601f016020809104026020016040519081016040528181529291906020840183838082843750614347945050505050565b91508d8d8360405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a028152601401935050505060405180910390209050611b2381338e8e8080601f01602080910402602001604051908101604052818152929190602084018383808284378201915050505050508d8d8080601f01602080910402602001604051908101604052818152929190602084018383808284378201915050505050508c8c8080601f01602080910402602001604051908101604052818152929190602084018383808284378201915050505050508b8b8b8b8080601f0160208091040260200160405190810160405281815292919060208401838380828437506152ce945050505050565b81600160a060020a03167f6af891641e71b5b3ce69aa42d772855f554c0674b8f2e40b038e735dfb819ce38f8f338e8e60096000896000191660001916815260200190815260200160002080549050604051600160a060020a03851660208201526060810182905260808082528101869052806040810160a082018989808284379091018481038352868152602001905086868082843782019150509850505050505050505060405180910390a25050505050505050505050505050565b611be9615924565b611bf1615924565b611bf9615924565b600088888860405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a0281526014019350505050604051908190039020600081815260096020526040902080549192509087908110611c5757fe5b90600052602060002090600b020160080185815481101515611c7557fe5b90600052602060002090600302016000018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611d1a5780601f10611cef57610100808354040283529160200191611d1a565b820191906000526020600020905b815481529060010190602001808311611cfd57829003601f168201915b505050600084815260096020526040902080549397509289925082109050611d3e57fe5b90600052602060002090600b020160080185815481101515611d5c57fe5b90600052602060002090600302016001018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611e015780601f10611dd657610100808354040283529160200191611e01565b820191906000526020600020905b815481529060010190602001808311611de457829003601f168201915b505050600084815260096020526040902080549396509289925082109050611e2557fe5b90600052602060002090600b020160080185815481101515611e4357fe5b90600052602060002090600302016002018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611ee85780601f10611ebd57610100808354040283529160200191611ee8565b820191906000526020600020905b815481529060010190602001808311611ecb57829003601f168201915b5050505050915050955095509592505050565b33600160a060020a031660009081526001602052604090206002015462010000900460ff161515611f2b57600080fd5b83833360405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a02815260140193505050506040518091039020600a600084843360405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a028152601401935050505060405180910390206000191660001916815260200190815260200160002081600019169055507f2a32a3690bbbfacd5c1aa6ddac597f0068af35a0df62471960d6dd4b52a90362848433338686604051600160a060020a0380861660208301528416604082015260808082528101869052806060810160a082018989808284379091018481038352858152602001905085858082843782019150509850505050505050505060405180910390a150505050565b600160a060020a0333166000908152600160205260408120600201548190819060ff16151561208257600080fd5b6120ba8b8b8080601f016020809104026020016040519081016040528181529291906020840183838082843750614347945050505050565b91506120f486868080601f016020809104026020016040519081016040528181529291906020840183838082843750614347945050505050565b905061217a8d8d8460405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a028152601401935050505060405180910390208a8a8a8560405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a02815260140193505050506040518091039020876154cf565b5060019c9b505050505050505050505050565b33600160a060020a0316600090815260016020526040812060020154819062010000900460ff1615156121bf57600080fd5b86863360405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a02815260140193505050506040519081900390206000818152600960205260409020805491925085918591908890811061221f57fe5b90600052602060002090600b0201600701919061223d9291906158a6565b506001979650505050505050565b600160a060020a0333166000908152600160205260408120600201548190819060ff16151561227957600080fd5b6122b189898080601f016020809104026020016040519081016040528181529291906020840183838082843750614347945050505050565b91508a8a8360405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a02815260140193505050506040519081900390206000818152600960205260409020805491925086918691908a90811061231357fe5b90600052602060002090600b02016008018881548110151561233157fe5b9060005260206000209060030201600201919061234f9291906158a6565b5060019b9a5050505050505050505050565b60005433600160a060020a0390811691161461237c57600080fd5b600160a060020a03828116600090815260016020526040908190206002015433909216917fe529778f4b84395157625a0deeede3e61c1c965e4962e51b6e0681127089ca0c91859160ff1690859051600160a060020a039093168352901515602083015215156040808301919091526060909101905180910390a2600160a060020a03919091166000908152600160205260409020600201805460ff1916911515919091179055565b600160a060020a0333166000908152600160205260408120600201548190819060ff16151561245357600080fd5b61248b88888080601f016020809104026020016040519081016040528181529291906020840183838082843750614347945050505050565b915089898360405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a0281526014019350505050604051908190039020600081815260096020526040902080549192508691869190899081106124ed57fe5b90600052602060002090600b0201600701919061250b9291906158a6565b5060019a9950505050505050505050565b60068054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156125b25780601f10612587576101008083540402835291602001916125b2565b820191906000526020600020905b81548152906001019060200180831161259557829003601f168201915b505050505081565b6009602052816000526040600020818154811015156125d557fe5b90600052602060002090600b0201600091509150508060000160009054906101000a9004600160a060020a031690806001018054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561269b5780601f106126705761010080835404028352916020019161269b565b820191906000526020600020905b81548152906001019060200180831161267e57829003601f168201915b505050505090806002018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156127395780601f1061270e57610100808354040283529160200191612739565b820191906000526020600020905b81548152906001019060200180831161271c57829003601f168201915b505050505090806003018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156127d75780601f106127ac576101008083540402835291602001916127d7565b820191906000526020600020905b8154815290600101906020018083116127ba57829003601f168201915b5050505050908060040154908060050160009054906101000a900461ffff1690806006018054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561288f5780601f106128645761010080835404028352916020019161288f565b820191906000526020600020905b81548152906001019060200180831161287257829003601f168201915b505050505090806007018054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561292d5780601f106129025761010080835404028352916020019161292d565b820191906000526020600020905b81548152906001019060200180831161291057829003601f168201915b5050505050905088565b6000805433600160a060020a0390811691161461295357600080fd5b61295b6145ab565b1561296557600080fd5b30600160a060020a031686600160a060020a03161415151561298657600080fd5b85600160a060020a031663c71782306040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15156129dc57600080fd5b5af115156129e957600080fd5b50505060405180511590506129fd57600080fd5b426004556003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038816179055612a35600686866158a6565b50612a42600784846158a6565b507f654e038ea4a97cea608e29255a98575c2b8ab0c3234daa842de658e7930222308686868686604051600160a060020a0386168152606060208201818152908201859052604082016080830187878082843790910184810383528581526020019050858580828437820191505097505050505050505060405180910390a150600195945050505050565b600080600087878760405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a028152601401935050505060405180910390209150600090505b60008281526009602052604090205481108015612b5257507f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81105b15612c1f578484604051808383808284378201915050925050506040519081900390206000838152600960205260409020805483908110612b8f57fe5b90600052602060002090600b02016002016040518082805460018160011615610100020316600290048015612bfb5780601f10612bd9576101008083540402835291820191612bfb565b820191906000526020600020905b815481529060010190602001808311612be7575b50509150506040519081900390201415612c1757809250612c25565b600101612b16565b60001992505b505095945050505050565b600083838360405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a0281526014019350505050604051809103902090509392505050565b60058054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156125b25780601f10612587576101008083540402835291602001916125b2565b60045481565b6000612cf3615924565b612cfb615924565b612d03615924565b600080612d0e615924565b612d16615924565b60008c8c8c60405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a028152601401935050505060405190819003902060008181526009602052604090208054919250908b908110612d7457fe5b60009182526020808320600b90920290910154838352600990915260409091208054600160a060020a039092169a50908b908110612dae57fe5b90600052602060002090600b02016001018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015612e535780601f10612e2857610100808354040283529160200191612e53565b820191906000526020600020905b815481529060010190602001808311612e3657829003601f168201915b50505060008481526009602052604090208054939b50928d925082109050612e7757fe5b90600052602060002090600b02016002018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015612f1c5780601f10612ef157610100808354040283529160200191612f1c565b820191906000526020600020905b815481529060010190602001808311612eff57829003601f168201915b50505060008481526009602052604090208054939a50928d925082109050612f4057fe5b90600052602060002090600b02016003018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015612fe55780601f10612fba57610100808354040283529160200191612fe5565b820191906000526020600020905b815481529060010190602001808311612fc857829003601f168201915b50505060008481526009602052604090208054939950928d92508210905061300957fe5b600091825260208083206004600b909302019190910154838352600990915260409091208054919650908b90811061303d57fe5b600091825260208083206005600b90930201919091015483835260099091526040909120805461ffff9092169550908b90811061307657fe5b90600052602060002090600b02016006018054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561311b5780601f106130f05761010080835404028352916020019161311b565b820191906000526020600020905b8154815290600101906020018083116130fe57829003601f168201915b50505060008481526009602052604090208054939650928d92508210905061313f57fe5b90600052602060002090600b02016007018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156131e45780601f106131b9576101008083540402835291602001916131e4565b820191906000526020600020905b8154815290600101906020018083116131c757829003601f168201915b505050505091505094995094995094999196509450565b613203615924565b61320b615924565b600160a060020a038316600090815260016020818152604080842060028082015482548796879694958682019560ff80861696610100808804831697620100009004909216958a95811615909202600019019091160491601f83018290048202909101905190810160405280929190818152602001828054600181600116156101000203166002900480156132e15780601f106132b6576101008083540402835291602001916132e1565b820191906000526020600020905b8154815290600101906020018083116132c457829003601f168201915b50505050509450838054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561337d5780601f106133525761010080835404028352916020019161337d565b820191906000526020600020905b81548152906001019060200180831161336057829003601f168201915b50989f939e50959c50939a509198509650505050505050565b33600160a060020a0316600090815260016020526040812060020154610100900460ff1615156133c557600080fd5b61340e87873360405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a0281526014019350505050604051809103902086868686615604565b8362ffffff1633600160a060020a03167f49245fb271765f5d70bba37945838ad4e257819dcace5ed29daffd187abdcc2f898933604051600160a060020a0382166020820152604080825281018390528060608101858580828437820191505094505050505060405180910390a35060019695505050505050565b600160a060020a033316600090815260016020526040812060020154819060ff1615156134b557600080fd5b6134ed88888080601f016020809104026020016040519081016040528181529291906020840183838082843750614347945050505050565b9050600160a060020a038116151561350457600080fd5b61354d8a8a8360405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a0281526014019350505050604051809103902087878787615604565b8462ffffff1681600160a060020a03167f49245fb271765f5d70bba37945838ad4e257819dcace5ed29daffd187abdcc2f8c8c33604051600160a060020a0382166020820152604080825281018390528060608101858580828437820191505094505050505060405180910390a35060019998505050505050505050565b60005433600160a060020a039081169116146135e657600080fd5b600160a060020a0386811660009081526001602081905260409182902060028101543394909416937f0d9b77a50f176e95519018b9b975779f9dfb88496c854dca909bc2ace09a753c938b9383019160ff6101008204811692620100008304821692919091169051600160a060020a03871681528315156060820152821515608082015281151560a082015260c06020820181815287546002600019610100600184161502019091160491830182905290604083019060e0840190899080156136f05780601f106136c5576101008083540402835291602001916136f0565b820191906000526020600020905b8154815290600101906020018083116136d357829003601f168201915b50508381038252875460026000196101006001841615020190911604808252602090910190889080156137645780601f1061373957610100808354040283529160200191613764565b820191906000526020600020905b81548152906001019060200180831161374757829003601f168201915b50509850505050505050505060405180910390a28560026000866040518082805190602001908083835b602083106137ad5780518252601f19909201916020918201910161378e565b6001836020036101000a0380198251168184511617909252505050919091019250604091505051908190039020815260208082019290925260409081016000908120805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03958616179055928916835260019091529020858051613833929160200190615936565b50600160a060020a038616600090815260016020819052604090912001848051613861929160200190615936565b50600160a060020a0390951660009081526001602052604090206002018054951515620100000262ff0000199215156101000261ff001994151560ff1990981697909717939093169590951716179092555050565b600160a060020a03331660009081526001602052604081206002015460ff1615156138e057600080fd5b61391885858080601f016020809104026020016040519081016040528181529291906020840183838082843750614347945050505050565b905086868260405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a02815260140193505050506040518091039020600a600085858560405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a028152601401935050505060405180910390206000191660001916815260200190815260200160002081600019169055507f2a32a3690bbbfacd5c1aa6ddac597f0068af35a0df62471960d6dd4b52a90362878733848787604051600160a060020a0380861660208301528416604082015260808082528101869052806060810160a082018989808284379091018481038352858152602001905085858082843782019150509850505050505050505060405180910390a150505050505050565b6000808585613a8386868080601f016020809104026020016040519081016040528181529291906020840183838082843750614347945050505050565b60405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a02815260140193505050506040519081900390206000908152600a60205260409020549695505050505050565b33600160a060020a031660009081526001602052604081206002015462010000900460ff161515613b0757600080fd5b61223d88883360405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a028152601401935050505060405180910390208787878760405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a02815260140193505050506040518091039020856154cf565b600054600160a060020a03165b90565b60008084848460405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a028152601401935050505060405190819003902060009081526008602052604090206007015495945050505050565b600260205260009081526040902054600160a060020a031681565b33600160a060020a031660009081526001602052604081206002015481908190610100900460ff161515613c4557600080fd5b60008413613c5257600080fd5b89893360405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a028152601401935050505060405180910390209250613cc986868080601f016020809104026020016040519081016040528181529291906020840183838082843750614347945050505050565b915087878360405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a028152601401935050505060405180910390209050604080519081016040908152828252602080830187905260008681526008909152206005018151815560208201516001909101555050505050505050505050565b600080600080600088888860405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a0281526014019350505050604051908190039020600081815260086020526040902060070180549192509087908110613db257fe5b600091825260208083209091015483835260089091526040909120600701805461ffff90921696509087908110613de557fe5b6000918252602080832091909101548383526008909152604090912060070180546201000090920462ffffff1695509087908110613e1f57fe5b6000918252602080832091909101548383526008909152604090912060070180546501000000000090920463ffffffff1694509087908110613e5d57fe5b906000526020600020900160000160099054906101000a900461ffff16915050945094509450949050565b600160a060020a033316600090815260016020526040812060020154819081908190819060ff161515613eba57600080fd5b6000861215613ec857600080fd5b613f008c8c8080601f016020809104026020016040519081016040528181529291906020840183838082843750614347945050505050565b93508d8d8560405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a028152601401935050505060405180910390209250613f7988888080601f016020809104026020016040519081016040528181529291906020840183838082843750614347945050505050565b915089898360405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a0281526014019350505050604051809103902090506040805190810160409081528282526020808301899052600086815260089091522060050181518155602082015160019091015550600081815260096020526040902080548790811061400957fe5b90600052602060002090600b0201600901805480600101828161402c91906159a4565b9160005260206000209060020201600060408051908101604052868152600019602082015291905081518155602082015160019182015596505050505050509998505050505050505050565b6000614082615924565b61408a615924565b6000806000614097615924565b60008a8a8a60405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a0281526014019350505050604051908190039020600081815260086020908152604091829020805460019182018054600160a060020a039092169d509495506002918116156101000260001901160491601f83018290048202909101905190810160405280929190818152602001828054600181600116156101000203166002900480156141925780601f1061416757610100808354040283529160200191614192565b820191906000526020600020905b81548152906001019060200180831161417557829003601f168201915b50505060008481526008602090815260409182902060029081018054969d50956101006001821615026000190116049350601f840181900481020191505190810160405280929190818152602001828054600181600116156101000203166002900480156142415780601f1061421657610100808354040283529160200191614241565b820191906000526020600020905b81548152906001019060200180831161422457829003601f168201915b505050600084815260086020908152604091829020600381015460049091018054969c5063ffffffff82169b50640100000000820462ffffff169a5067010000000000000090910461ffff16985094600260001961010060018416150201909116049350601f840181900481020191505190810160405280929190818152602001828054600181600116156101000203166002900480156143235780601f106142f857610100808354040283529160200191614323565b820191906000526020600020905b81548152906001019060200180831161430657829003601f168201915b50505050509150509397509397509397909450565b600b54600160a060020a031681565b600060026000836040518082805190602001908083835b6020831061437d5780518252601f19909201916020918201910161435e565b6001836020036101000a03801982511681845116179092525050509190910192506040915050519081900390208152602081019190915260400160002054600160a060020a031692915050565b600160a060020a033316600090815260016020526040812060020154819060ff1615156143f657600080fd5b61442e8b8b8080601f016020809104026020016040519081016040528181529291906020840183838082843750614347945050505050565b90506145118d8d8360405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a02815260140193505050506040518091039020338d8d8080601f01602080910402602001604051908101604052818152929190602084018383808284378201915050505050508c8c8080601f01602080910402602001604051908101604052818152929190602084018383808284378201915050505050508b8b61ffff168b8b8b8080601f0160208091040260200160405190810160405281815292919060208401838380828437506156fd945050505050565b80600160a060020a03167ff9afa3de5083c38826783adbbea1d994ff36456b25ef72f7e75a07b1a3859e578e8e338d8d604051600160a060020a03841660208201526060808252810185905280604081016080820188888082843790910184810383528581526020019050858580828437820191505097505050505050505060405180910390a25060019c9b505050505050505050505050565b600454151590565b33600160a060020a03166000908152600160205260408120600201548190819062010000900460ff1615156145e757600080fd5b60008410156145f557600080fd5b61462d88888080601f016020809104026020016040519081016040528181529291906020840183838082843750614347945050505050565b925089898460405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a02815260140193505050506040518091039020915085853360405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a02815260140193505050506040519081900390206000818152600960205260409020805491925090859081106146ca57fe5b90600052602060002090600b020160090180548060010182816146ed91906159a4565b91600052602060002090600202016000604080519081016040528581526000196020820152919050815181556020820151816001015550505050505050505050505050565b600354600160a060020a031681565b600160a060020a033316600090815260016020526040812060020154819060ff16151561476d57600080fd5b6147a58a8a8080601f016020809104026020016040519081016040528181529291906020840183838082843750614347945050505050565b91508c8c8360405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a028152601401935050505060405180910390209050614884818c8a8a8080601f016020809104026020016040519081016040528181529291906020840183838082843782019150505050505089898080601f016020809104026020016040519081016040528181529291906020840183838082843782019150505050505088888080601f01602080910402602001604051908101604052818152929190602084018383808284375061520d945050505050565b600081815260096020526040902080548c90811061489e57fe5b90600052602060002090600b0201600201604051808280546001816001161561010002031660029004801561490a5780601f106148e857610100808354040283529182019161490a565b820191906000526020600020905b8154815290600101906020018083116148f6575b5050915050604051809103902082600160a060020a03167fdedf3b88b7ff3467683a7370c9e412b6564ae72f61d19346f1f118d82dce8b208f8f338d8d604051600160a060020a03841660208201526060808252810185905280604081016080820188888082843790910184810383528581526020019050858580828437820191505097505050505050505060405180910390a350505050505050505050505050565b60005433600160a060020a039081169116146149c857600080fd5b33600160a060020a03167f26f57461703d2ce008105a644fd78ba5affe61badbeb36b793f3e0e0ea89004c836001600086600160a060020a0316600160a060020a0316815260200190815260200160002060020160019054906101000a900460ff1684604051600160a060020a039093168352901515602083015215156040808301919091526060909101905180910390a2600160a060020a03909116600090815260016020526040902060020180549115156101000261ff0019909216919091179055565b33600160a060020a0316600090815260016020526040812060020154819062010000900460ff161515614ac057600080fd5b8b8b3360405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a028152601401935050505060405180910390209050614c6081336001600033600160a060020a0316600160a060020a031681526020019081526020016000206001018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015614bc05780601f10614b9557610100808354040283529160200191614bc0565b820191906000526020600020905b815481529060010190602001808311614ba357829003601f168201915b50505050508d8d8080601f01602080910402602001604051908101604052818152929190602084018383808284378201915050505050508c8c8080601f01602080910402602001604051908101604052818152929190602084018383808284378201915050505050508b8b8b8b8080601f0160208091040260200160405190810160405281815292919060208401838380828437506152ce945050505050565b33600160a060020a03167f6af891641e71b5b3ce69aa42d772855f554c0674b8f2e40b038e735dfb819ce38d8d338e8e60096000896000191660001916815260200190815260200160002080549050604051600160a060020a03851660208201526060810182905260808082528101869052806040810160a082018989808284379091018481038352868152602001905086868082843782019150509850505050505050505060405180910390a25060019b9a5050505050505050505050565b60005433600160a060020a03908116911614614d3b57600080fd5b33600160a060020a03167f26f57461703d2ce008105a644fd78ba5affe61badbeb36b793f3e0e0ea89004c836001600086600160a060020a0316600160a060020a0316815260200190815260200160002060020160029054906101000a900460ff1684604051600160a060020a039093168352901515602083015215156040808301919091526060909101905180910390a2600160a060020a0390911660009081526001602052604090206002018054911515620100000262ff000019909216919091179055565b60078054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156125b25780601f10612587576101008083540402835291602001916125b2565b33600160a060020a0316600090815260016020526040812060020154610100900460ff161515614e9d57600080fd5b614f558a8a3360405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a0281526014019350505050604051809103902033614ee7336157d6565b8b8b8080601f01602080910402602001604051908101604052818152929190602084018383808284378201915050505050508a8a61ffff168a8a8a8080601f0160208091040260200160405190810160405281815292919060208401838380828437506156fd945050505050565b33600160a060020a03167ff9afa3de5083c38826783adbbea1d994ff36456b25ef72f7e75a07b1a3859e578b8b338c8c604051600160a060020a03841660208201526060808252810185905280604081016080820188888082843790910184810383528581526020019050858580828437820191505097505050505050505060405180910390a25060019998505050505050505050565b60005433600160a060020a0390811691161461500757600080fd5b600160a060020a038116151561501c57600080fd5b6000547f64b29884510e05067b4ed2199d3b82647dd4377a1a9b5d8c0bd88bbe23ec4dc690600160a060020a031682604051600160a060020a039283168152911660208201526040908101905180910390a16000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6001602052806000526040600020600091509050806000018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156151495780601f1061511e57610100808354040283529160200191615149565b820191906000526020600020905b81548152906001019060200180831161512c57829003601f168201915b505050505090806001018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156151e75780601f106151bc576101008083540402835291602001916151e7565b820191906000526020600020905b8154815290600101906020018083116151ca57829003601f168201915b5050506002909301549192505060ff808216916101008104821691620100009091041685565b600085815260096020526040902080548590811061522757fe5b90600052602060002090600b0201600801805480600101828161524a91906159d5565b916000526020600020906003020160006060604051908101604090815287825260208201879052810185905291905081518190805161528d929160200190615936565b506020820151816001019080516152a8929160200190615936565b506040820151816002019080516152c3929160200190615936565b505050505050505050565b600088815260096020526040902080549081906152ee9060018301615a01565b50600089815260096020526040902080548991908390811061530c57fe5b60009182526020808320600b92909202909101805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0394909416939093179092558a815260099091526040902080548891908390811061536657fe5b90600052602060002090600b0201600101908051615388929160200190615936565b5060008981526009602052604090208054879190839081106153a657fe5b90600052602060002090600b02016002019080516153c8929160200190615936565b5060008981526009602052604090208054869190839081106153e657fe5b90600052602060002090600b0201600301908051615408929160200190615936565b50600089815260096020526040902080548591908390811061542657fe5b600091825260208083206004600b9093020191909101929092558a815260099091526040902080548491908390811061545b57fe5b60009182526020808320600b92909202909101600501805461ffff191661ffff94909416939093179092558a81526009909152604090208054839190839081106154a157fe5b90600052602060002090600b02016006019080516154c3929160200190615936565b50505050505050505050565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff85106154fe57600080fd5b600083121561550c57600080fd5b505060008481526009602052604090208054829185918290811061552c57fe5b90600052602060002090600b0201600901805480600101828161554f91906159a4565b916000526020600020906002020160006040805190810160405287815260208101879052919050815181556020820151600190910155505060008481526009602052604090208054839081106155a157fe5b90600052602060002090600b0201600a0180548060010182816155c491906159a4565b9160005260206000209060020201600060408051908101604052898152602081018590529190508151815560208201518160010155505050505050505050565b60008581526008602052604090206007018054600181016156258382615a2d565b916000526020600020900160006080604051908101604090815261ffff808a16835262ffffff8916602084015263ffffffff881691830191909152851660608201529190508151815461ffff191661ffff919091161781556020820151815462ffffff91909116620100000264ffffff0000199091161781556040820151815463ffffffff91909116650100000000000268ffffffff0000000000199091161781556060820151815461ffff919091166901000000000000000000026affff0000000000000000001990911617905550505050505050565b6000888152600860205260409020805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038916178155600101868051615745929160200190615936565b506000888152600860205260409020600201858051615768929160200190615936565b50600088815260086020526040902060038101805463ffffffff191663ffffffff87161766ffffff00000000191664010000000062ffffff8716021768ffff00000000000000191667010000000000000061ffff8616021790556004018180516152c3929160200190615936565b6157de615924565b6001600083600160a060020a0316600160a060020a031681526020019081526020016000206001018054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561589a5780601f1061586f5761010080835404028352916020019161589a565b820191906000526020600020905b81548152906001019060200180831161587d57829003601f168201915b50505050509050919050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106158e75782800160ff19823516178555615914565b82800160010185558215615914579182015b828111156159145782358255916020019190600101906158f9565b50615920929150615a51565b5090565b60206040519081016040526000815290565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061597757805160ff1916838001178555615914565b82800160010185558215615914579182015b82811115615914578251825591602001919060010190615989565b8154818355818115116159d0576002028160020283600052602060002091820191016159d09190615a6b565b505050565b8154818355818115116159d0576003028160030283600052602060002091820191016159d09190615a8b565b8154818355818115116159d057600b0281600b0283600052602060002091820191016159d09190615aca565b8154818355818115116159d0576000838152602090206159d0918101908301615b83565b613b9891905b808211156159205760008155600101615a57565b613b9891905b808211156159205760008082556001820155600201615a71565b613b9891905b80821115615920576000615aa58282615bab565b615ab3600183016000615bab565b615ac1600283016000615bab565b50600301615a91565b613b9891905b8082111561592057805473ffffffffffffffffffffffffffffffffffffffff191681556000615b026001830182615bab565b615b10600283016000615bab565b615b1e600383016000615bab565b60006004830181905560058301805461ffff19169055615b42906006840190615bab565b615b50600783016000615bab565b615b5e600883016000615bf2565b615b6c600983016000615c13565b615b7a600a83016000615c13565b50600b01615ad0565b613b9891905b808211156159205780546affffffffffffffffffffff19168155600101615b89565b50805460018160011615610100020316600290046000825580601f10615bd15750615bef565b601f016020900490600052602060002090810190615bef9190615a51565b50565b5080546000825560030290600052602060002090810190615bef9190615a8b565b5080546000825560020290600052602060002090810190615bef9190615a6b5600a165627a7a7230582015b751ca2cdc8d2e42688448fc5b1487eb75f59e3ff823656e5a5d4695b3af7c00290000000000000000000000006b817b127a5a72956919a9360f92727d1cf1dd52

Deployed Bytecode

0x6060604052600436106102445763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041662ba3e508114610249578063012defec1461028f57806302879f9c1461042d57806309d84fc4146104735780630db790031461049b5780630eb51018146104f757806311c0f9311461067357806312de8a121461069d5780631c566ef2146106e65780631c638376146107145780631e5bd14a1461075257806321cbed351461077657806329cdda23146107b057806338c338621461083a5780633fcce62614610a9e5780634562426014610ad5578063508cde1314610b0c57806354fd4d5014610b385780636dd2824114610b4b5780636eabb2f614610b5e5780636f77926b14610b8d57806373a75c1f14610ca8578063750732ec14610ce85780637aa1688e14610d3257806384d62f4714610de5578063884095f614610e1b578063887bae7414610e45578063893d20e814610e825780639b71dec314610eb1578063a29f9fb914610edd578063a584d8cc14610ef3578063ab5f338014610f2c578063b0dc63eb14610f91578063b241b3b514610fd6578063b5ae451914611181578063bf40fac114611194578063c1ef098b146111e5578063c717823014611241578063ca6cf79614611254578063ccdb3f451461128d578063cd22f536146112a0578063cf46dca7146112f2578063d36dbc0c14611316578063d9bf823814611364578063e134e33d14611388578063e8aa377b1461139b578063f2fde38b146113eb578063f7c42ac81461140a575b600080fd5b341561025457600080fd5b61027b60246004803582810192908201359181359160443591606435918201910135611429565b604051901515815260200160405180910390f35b341561029a57600080fd5b6102a5600435611506565b604051600160a060020a038916815263ffffffff8616606082015262ffffff8516608082015261ffff841660a082015260e081018290526101006020820181815290604083019060c084019084018b818151815260200191508051906020019080838360005b8381101561032357808201518382015260200161030b565b50505050905090810190601f1680156103505780820380516001836020036101000a031916815260200191505b5084810383528a818151815260200191508051906020019080838360005b8381101561038657808201518382015260200161036e565b50505050905090810190601f1680156103b35780820380516001836020036101000a031916815260200191505b50848103825286818151815260200191508051906020019080838360005b838110156103e95780820151838201526020016103d1565b50505050905090810190601f1680156104165780820380516001836020036101000a031916815260200191505b509b50505050505050505050505060405180910390f35b341561043857600080fd5b61027b602460048035828101929082013591813591604435808201929081013591606435808201929081013591608435908101910135611760565b341561047e57600080fd5b61048960043561199a565b60405190815260200160405180910390f35b34156104a657600080fd5b6104f560246004803582810192908201359181358083019290820135916044358083019290820135916064358083019290820135916084359161ffff60a435169160c4359182019101356119ac565b005b341561050257600080fd5b6105296024600480358281019291013590600160a060020a03903516604435606435611be1565b60405180806020018060200180602001848103845287818151815260200191508051906020019080838360005b8381101561056e578082015183820152602001610556565b50505050905090810190601f16801561059b5780820380516001836020036101000a031916815260200191505b50848103835286818151815260200191508051906020019080838360005b838110156105d15780820151838201526020016105b9565b50505050905090810190601f1680156105fe5780820380516001836020036101000a031916815260200191505b50848103825285818151815260200191508051906020019080838360005b8381101561063457808201518382015260200161061c565b50505050905090810190601f1680156106615780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390f35b341561067e57600080fd5b6104f56024600480358281019290820135918135918201910135611efb565b34156106a857600080fd5b61027b60246004803582810192908201359181358083019290820135916044359160643580820192908101359160843590810191013560a435612054565b34156106f157600080fd5b61027b60246004803582810192908201359181359160443590810191013561218d565b341561071f57600080fd5b61027b6024600480358281019290820135918135808301929082013591604435916064359160843591820191013561224b565b341561075d57600080fd5b6104f5600160a060020a03600435166024351515612361565b341561078157600080fd5b61027b602460048035828101929082013591813580830192908201359160443591606435908101910135612425565b34156107bb57600080fd5b6107c361251c565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156107ff5780820151838201526020016107e7565b50505050905090810190601f16801561082c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561084557600080fd5b6108536004356024356125ba565b6040518089600160a060020a0316600160a060020a031681526020018060200180602001806020018881526020018761ffff1661ffff168152602001806020018060200186810386528d818151815260200191508051906020019080838360005b838110156108cc5780820151838201526020016108b4565b50505050905090810190601f1680156108f95780820380516001836020036101000a031916815260200191505b5086810385528c818151815260200191508051906020019080838360005b8381101561092f578082015183820152602001610917565b50505050905090810190601f16801561095c5780820380516001836020036101000a031916815260200191505b5086810384528b818151815260200191508051906020019080838360005b8381101561099257808201518382015260200161097a565b50505050905090810190601f1680156109bf5780820380516001836020036101000a031916815260200191505b50868103835288818151815260200191508051906020019080838360005b838110156109f55780820151838201526020016109dd565b50505050905090810190601f168015610a225780820380516001836020036101000a031916815260200191505b50868103825287818151815260200191508051906020019080838360005b83811015610a58578082015183820152602001610a40565b50505050905090810190601f168015610a855780820380516001836020036101000a031916815260200191505b509d505050505050505050505050505060405180910390f35b3415610aa957600080fd5b61027b60048035600160a060020a03169060248035808201929081013591604435908101910135612937565b3415610ae057600080fd5b610489602460048035828101929082013591600160a060020a0382351691604435908101910135612acd565b3415610b1757600080fd5b6104896024600480358281019291013590600160a060020a03903516612c30565b3415610b4357600080fd5b6107c3612c78565b3415610b5657600080fd5b610489612ce3565b3415610b6957600080fd5b6108536024600480358281019291013590600160a060020a03903516604435612ce9565b3415610b9857600080fd5b610bac600160a060020a03600435166131fb565b60405183151560408201528215156060820152811515608082015260a080825281906020820190820188818151815260200191508051906020019080838360005b83811015610c05578082015183820152602001610bed565b50505050905090810190601f168015610c325780820380516001836020036101000a031916815260200191505b50838103825287818151815260200191508051906020019080838360005b83811015610c68578082015183820152602001610c50565b50505050905090810190601f168015610c955780820380516001836020036101000a031916815260200191505b5097505050505050505060405180910390f35b3415610cb357600080fd5b61027b602460048035828101929101359061ffff903581169062ffffff604435169063ffffffff606435169060843516613396565b3415610cf357600080fd5b61027b602460048035828101929082013591813591820191013561ffff60443581169062ffffff606435169063ffffffff608435169060a43516613489565b3415610d3d57600080fd5b6104f560048035600160a060020a03169060446024803590810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284378201915050505050509190803590602001908201803590602001908080601f016020809104026020016040519081016040528181529291906020840183838082843750949650505050823515159260208101351515925060400135151590506135cb565b3415610df057600080fd5b6104f560246004803582810192908201359181358083019290820135916044359182019101356138b6565b3415610e2657600080fd5b6104896024600480358281019290820135918135918201910135613a46565b3415610e5057600080fd5b61027b602460048035828101929082013591813591604435908101910135600160a060020a0360643516608435613ad7565b3415610e8d57600080fd5b610e95613b8b565b604051600160a060020a03909116815260200160405180910390f35b3415610ebc57600080fd5b6104896024600480358281019291013590600160a060020a03903516613b9b565b3415610ee857600080fd5b610e95600435613bf7565b3415610efe57600080fd5b6104f56024600480358281019290820135918135808301929082013591604435918201910135606435613c12565b3415610f3757600080fd5b610f5b6024600480358281019291013590600160a060020a03903516604435613d4b565b60405163ffffffff94851681529284166020840152921660408083019190915261ffff9092166060820152608001905180910390f35b3415610f9c57600080fd5b61027b6024600480358281019290820135918135808301929082013591604435808301929082013591606435918201910135608435613e88565b3415610fe157600080fd5b6110026024600480358281019291013590600160a060020a03903516614078565b604051600160a060020a038816815263ffffffff8516606082015262ffffff8416608082015261ffff831660a082015260e06020820181815290604083019060c084019084018a818151815260200191508051906020019080838360005b83811015611078578082015183820152602001611060565b50505050905090810190601f1680156110a55780820380516001836020036101000a031916815260200191505b50848103835289818151815260200191508051906020019080838360005b838110156110db5780820151838201526020016110c3565b50505050905090810190601f1680156111085780820380516001836020036101000a031916815260200191505b50848103825285818151815260200191508051906020019080838360005b8381101561113e578082015183820152602001611126565b50505050905090810190601f16801561116b5780820380516001836020036101000a031916815260200191505b509a505050505050505050505060405180910390f35b341561118c57600080fd5b610e95614338565b341561119f57600080fd5b610e9560046024813581810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284375094965061434795505050505050565b34156111f057600080fd5b61027b602460048035828101929082013591813580830192908201359160443580830192908201359163ffffffff606435169161ffff60843581169260a4359091169160c4359081019101356143ca565b341561124c57600080fd5b61027b6145ab565b341561125f57600080fd5b6104f560246004803582810192908201359181358083019290820135916044359182019101356064356145b3565b341561129857600080fd5b610e95614732565b34156112ab57600080fd5b6104f560246004803582810192908201359181359160443580820192908101359160643580820192908101359160843580820192908101359160a435908101910135614741565b34156112fd57600080fd5b6104f5600160a060020a036004351660243515156149ad565b341561132157600080fd5b61027b60246004803582810192908201359181358083019290820135916044358083019290820135916064359161ffff608435169160a435918201910135614a8e565b341561136f57600080fd5b6104f5600160a060020a03600435166024351515614d20565b341561139357600080fd5b6107c3614e03565b34156113a657600080fd5b61027b602460048035828101929082013591813580830192908201359163ffffffff604435169161ffff6064358116926084359091169160a435908101910135614e6e565b34156113f657600080fd5b6104f5600160a060020a0360043516614fec565b341561141557600080fd5b610bac600160a060020a036004351661509d565b33600160a060020a0316600090815260016020526040812060020154819062010000900460ff16151561145b57600080fd5b87873360405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a0281526014019350505050604051908190039020600081815260096020526040902080549192508591859190899081106114bb57fe5b90600052602060002090600b0201600801878154811015156114d957fe5b906000526020600020906003020160020191906114f79291906158a6565b50600198975050505050505050565b60086020528060005260406000206000915090508060000160009054906101000a9004600160a060020a031690806001018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156115cb5780601f106115a0576101008083540402835291602001916115cb565b820191906000526020600020905b8154815290600101906020018083116115ae57829003601f168201915b505050505090806002018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156116695780601f1061163e57610100808354040283529160200191611669565b820191906000526020600020905b81548152906001019060200180831161164c57829003601f168201915b505050506003830154600484018054939463ffffffff831694640100000000840462ffffff16945067010000000000000090930461ffff1692909190600261010060018316150260001901909116046020601f820181900481020160405190810160405280929190818152602001828054600181600116156101000203166002900480156117385780601f1061170d57610100808354040283529160200191611738565b820191906000526020600020905b81548152906001019060200180831161171b57829003601f168201915b5050505050908060050160408051908101604052815481526001909101546020820152905088565b33600160a060020a0316600090815260016020526040812060020154819062010000900460ff16151561179257600080fd5b8a8a3360405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a02815260140193505050506040518091039020905061186f818a8a8a8080601f016020809104026020016040519081016040528181529291906020840183838082843782019150505050505089898080601f016020809104026020016040519081016040528181529291906020840183838082843782019150505050505088888080601f01602080910402602001604051908101604052818152929190602084018383808284375061520d945050505050565b600081815260096020526040902080548a90811061188957fe5b90600052602060002090600b020160020160405180828054600181600116156101000203166002900480156118f55780601f106118d35761010080835404028352918201916118f5565b820191906000526020600020905b8154815290600101906020018083116118e1575b5050915050604051809103902033600160a060020a03167fdedf3b88b7ff3467683a7370c9e412b6564ae72f61d19346f1f118d82dce8b208d8d338d8d604051600160a060020a03841660208201526060808252810185905280604081016080820188888082843790910184810383528581526020019050858580828437820191505097505050505050505060405180910390a35060019a9950505050505050505050565b600a6020526000908152604090205481565b600160a060020a033316600090815260016020526040812060020154819060ff1615156119d857600080fd5b611a108c8c8080601f016020809104026020016040519081016040528181529291906020840183838082843750614347945050505050565b91508d8d8360405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a028152601401935050505060405180910390209050611b2381338e8e8080601f01602080910402602001604051908101604052818152929190602084018383808284378201915050505050508d8d8080601f01602080910402602001604051908101604052818152929190602084018383808284378201915050505050508c8c8080601f01602080910402602001604051908101604052818152929190602084018383808284378201915050505050508b8b8b8b8080601f0160208091040260200160405190810160405281815292919060208401838380828437506152ce945050505050565b81600160a060020a03167f6af891641e71b5b3ce69aa42d772855f554c0674b8f2e40b038e735dfb819ce38f8f338e8e60096000896000191660001916815260200190815260200160002080549050604051600160a060020a03851660208201526060810182905260808082528101869052806040810160a082018989808284379091018481038352868152602001905086868082843782019150509850505050505050505060405180910390a25050505050505050505050505050565b611be9615924565b611bf1615924565b611bf9615924565b600088888860405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a0281526014019350505050604051908190039020600081815260096020526040902080549192509087908110611c5757fe5b90600052602060002090600b020160080185815481101515611c7557fe5b90600052602060002090600302016000018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611d1a5780601f10611cef57610100808354040283529160200191611d1a565b820191906000526020600020905b815481529060010190602001808311611cfd57829003601f168201915b505050600084815260096020526040902080549397509289925082109050611d3e57fe5b90600052602060002090600b020160080185815481101515611d5c57fe5b90600052602060002090600302016001018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611e015780601f10611dd657610100808354040283529160200191611e01565b820191906000526020600020905b815481529060010190602001808311611de457829003601f168201915b505050600084815260096020526040902080549396509289925082109050611e2557fe5b90600052602060002090600b020160080185815481101515611e4357fe5b90600052602060002090600302016002018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611ee85780601f10611ebd57610100808354040283529160200191611ee8565b820191906000526020600020905b815481529060010190602001808311611ecb57829003601f168201915b5050505050915050955095509592505050565b33600160a060020a031660009081526001602052604090206002015462010000900460ff161515611f2b57600080fd5b83833360405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a02815260140193505050506040518091039020600a600084843360405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a028152601401935050505060405180910390206000191660001916815260200190815260200160002081600019169055507f2a32a3690bbbfacd5c1aa6ddac597f0068af35a0df62471960d6dd4b52a90362848433338686604051600160a060020a0380861660208301528416604082015260808082528101869052806060810160a082018989808284379091018481038352858152602001905085858082843782019150509850505050505050505060405180910390a150505050565b600160a060020a0333166000908152600160205260408120600201548190819060ff16151561208257600080fd5b6120ba8b8b8080601f016020809104026020016040519081016040528181529291906020840183838082843750614347945050505050565b91506120f486868080601f016020809104026020016040519081016040528181529291906020840183838082843750614347945050505050565b905061217a8d8d8460405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a028152601401935050505060405180910390208a8a8a8560405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a02815260140193505050506040518091039020876154cf565b5060019c9b505050505050505050505050565b33600160a060020a0316600090815260016020526040812060020154819062010000900460ff1615156121bf57600080fd5b86863360405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a02815260140193505050506040519081900390206000818152600960205260409020805491925085918591908890811061221f57fe5b90600052602060002090600b0201600701919061223d9291906158a6565b506001979650505050505050565b600160a060020a0333166000908152600160205260408120600201548190819060ff16151561227957600080fd5b6122b189898080601f016020809104026020016040519081016040528181529291906020840183838082843750614347945050505050565b91508a8a8360405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a02815260140193505050506040519081900390206000818152600960205260409020805491925086918691908a90811061231357fe5b90600052602060002090600b02016008018881548110151561233157fe5b9060005260206000209060030201600201919061234f9291906158a6565b5060019b9a5050505050505050505050565b60005433600160a060020a0390811691161461237c57600080fd5b600160a060020a03828116600090815260016020526040908190206002015433909216917fe529778f4b84395157625a0deeede3e61c1c965e4962e51b6e0681127089ca0c91859160ff1690859051600160a060020a039093168352901515602083015215156040808301919091526060909101905180910390a2600160a060020a03919091166000908152600160205260409020600201805460ff1916911515919091179055565b600160a060020a0333166000908152600160205260408120600201548190819060ff16151561245357600080fd5b61248b88888080601f016020809104026020016040519081016040528181529291906020840183838082843750614347945050505050565b915089898360405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a0281526014019350505050604051908190039020600081815260096020526040902080549192508691869190899081106124ed57fe5b90600052602060002090600b0201600701919061250b9291906158a6565b5060019a9950505050505050505050565b60068054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156125b25780601f10612587576101008083540402835291602001916125b2565b820191906000526020600020905b81548152906001019060200180831161259557829003601f168201915b505050505081565b6009602052816000526040600020818154811015156125d557fe5b90600052602060002090600b0201600091509150508060000160009054906101000a9004600160a060020a031690806001018054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561269b5780601f106126705761010080835404028352916020019161269b565b820191906000526020600020905b81548152906001019060200180831161267e57829003601f168201915b505050505090806002018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156127395780601f1061270e57610100808354040283529160200191612739565b820191906000526020600020905b81548152906001019060200180831161271c57829003601f168201915b505050505090806003018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156127d75780601f106127ac576101008083540402835291602001916127d7565b820191906000526020600020905b8154815290600101906020018083116127ba57829003601f168201915b5050505050908060040154908060050160009054906101000a900461ffff1690806006018054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561288f5780601f106128645761010080835404028352916020019161288f565b820191906000526020600020905b81548152906001019060200180831161287257829003601f168201915b505050505090806007018054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561292d5780601f106129025761010080835404028352916020019161292d565b820191906000526020600020905b81548152906001019060200180831161291057829003601f168201915b5050505050905088565b6000805433600160a060020a0390811691161461295357600080fd5b61295b6145ab565b1561296557600080fd5b30600160a060020a031686600160a060020a03161415151561298657600080fd5b85600160a060020a031663c71782306040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15156129dc57600080fd5b5af115156129e957600080fd5b50505060405180511590506129fd57600080fd5b426004556003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038816179055612a35600686866158a6565b50612a42600784846158a6565b507f654e038ea4a97cea608e29255a98575c2b8ab0c3234daa842de658e7930222308686868686604051600160a060020a0386168152606060208201818152908201859052604082016080830187878082843790910184810383528581526020019050858580828437820191505097505050505050505060405180910390a150600195945050505050565b600080600087878760405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a028152601401935050505060405180910390209150600090505b60008281526009602052604090205481108015612b5257507f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81105b15612c1f578484604051808383808284378201915050925050506040519081900390206000838152600960205260409020805483908110612b8f57fe5b90600052602060002090600b02016002016040518082805460018160011615610100020316600290048015612bfb5780601f10612bd9576101008083540402835291820191612bfb565b820191906000526020600020905b815481529060010190602001808311612be7575b50509150506040519081900390201415612c1757809250612c25565b600101612b16565b60001992505b505095945050505050565b600083838360405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a0281526014019350505050604051809103902090509392505050565b60058054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156125b25780601f10612587576101008083540402835291602001916125b2565b60045481565b6000612cf3615924565b612cfb615924565b612d03615924565b600080612d0e615924565b612d16615924565b60008c8c8c60405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a028152601401935050505060405190819003902060008181526009602052604090208054919250908b908110612d7457fe5b60009182526020808320600b90920290910154838352600990915260409091208054600160a060020a039092169a50908b908110612dae57fe5b90600052602060002090600b02016001018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015612e535780601f10612e2857610100808354040283529160200191612e53565b820191906000526020600020905b815481529060010190602001808311612e3657829003601f168201915b50505060008481526009602052604090208054939b50928d925082109050612e7757fe5b90600052602060002090600b02016002018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015612f1c5780601f10612ef157610100808354040283529160200191612f1c565b820191906000526020600020905b815481529060010190602001808311612eff57829003601f168201915b50505060008481526009602052604090208054939a50928d925082109050612f4057fe5b90600052602060002090600b02016003018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015612fe55780601f10612fba57610100808354040283529160200191612fe5565b820191906000526020600020905b815481529060010190602001808311612fc857829003601f168201915b50505060008481526009602052604090208054939950928d92508210905061300957fe5b600091825260208083206004600b909302019190910154838352600990915260409091208054919650908b90811061303d57fe5b600091825260208083206005600b90930201919091015483835260099091526040909120805461ffff9092169550908b90811061307657fe5b90600052602060002090600b02016006018054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561311b5780601f106130f05761010080835404028352916020019161311b565b820191906000526020600020905b8154815290600101906020018083116130fe57829003601f168201915b50505060008481526009602052604090208054939650928d92508210905061313f57fe5b90600052602060002090600b02016007018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156131e45780601f106131b9576101008083540402835291602001916131e4565b820191906000526020600020905b8154815290600101906020018083116131c757829003601f168201915b505050505091505094995094995094999196509450565b613203615924565b61320b615924565b600160a060020a038316600090815260016020818152604080842060028082015482548796879694958682019560ff80861696610100808804831697620100009004909216958a95811615909202600019019091160491601f83018290048202909101905190810160405280929190818152602001828054600181600116156101000203166002900480156132e15780601f106132b6576101008083540402835291602001916132e1565b820191906000526020600020905b8154815290600101906020018083116132c457829003601f168201915b50505050509450838054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561337d5780601f106133525761010080835404028352916020019161337d565b820191906000526020600020905b81548152906001019060200180831161336057829003601f168201915b50989f939e50959c50939a509198509650505050505050565b33600160a060020a0316600090815260016020526040812060020154610100900460ff1615156133c557600080fd5b61340e87873360405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a0281526014019350505050604051809103902086868686615604565b8362ffffff1633600160a060020a03167f49245fb271765f5d70bba37945838ad4e257819dcace5ed29daffd187abdcc2f898933604051600160a060020a0382166020820152604080825281018390528060608101858580828437820191505094505050505060405180910390a35060019695505050505050565b600160a060020a033316600090815260016020526040812060020154819060ff1615156134b557600080fd5b6134ed88888080601f016020809104026020016040519081016040528181529291906020840183838082843750614347945050505050565b9050600160a060020a038116151561350457600080fd5b61354d8a8a8360405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a0281526014019350505050604051809103902087878787615604565b8462ffffff1681600160a060020a03167f49245fb271765f5d70bba37945838ad4e257819dcace5ed29daffd187abdcc2f8c8c33604051600160a060020a0382166020820152604080825281018390528060608101858580828437820191505094505050505060405180910390a35060019998505050505050505050565b60005433600160a060020a039081169116146135e657600080fd5b600160a060020a0386811660009081526001602081905260409182902060028101543394909416937f0d9b77a50f176e95519018b9b975779f9dfb88496c854dca909bc2ace09a753c938b9383019160ff6101008204811692620100008304821692919091169051600160a060020a03871681528315156060820152821515608082015281151560a082015260c06020820181815287546002600019610100600184161502019091160491830182905290604083019060e0840190899080156136f05780601f106136c5576101008083540402835291602001916136f0565b820191906000526020600020905b8154815290600101906020018083116136d357829003601f168201915b50508381038252875460026000196101006001841615020190911604808252602090910190889080156137645780601f1061373957610100808354040283529160200191613764565b820191906000526020600020905b81548152906001019060200180831161374757829003601f168201915b50509850505050505050505060405180910390a28560026000866040518082805190602001908083835b602083106137ad5780518252601f19909201916020918201910161378e565b6001836020036101000a0380198251168184511617909252505050919091019250604091505051908190039020815260208082019290925260409081016000908120805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03958616179055928916835260019091529020858051613833929160200190615936565b50600160a060020a038616600090815260016020819052604090912001848051613861929160200190615936565b50600160a060020a0390951660009081526001602052604090206002018054951515620100000262ff0000199215156101000261ff001994151560ff1990981697909717939093169590951716179092555050565b600160a060020a03331660009081526001602052604081206002015460ff1615156138e057600080fd5b61391885858080601f016020809104026020016040519081016040528181529291906020840183838082843750614347945050505050565b905086868260405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a02815260140193505050506040518091039020600a600085858560405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a028152601401935050505060405180910390206000191660001916815260200190815260200160002081600019169055507f2a32a3690bbbfacd5c1aa6ddac597f0068af35a0df62471960d6dd4b52a90362878733848787604051600160a060020a0380861660208301528416604082015260808082528101869052806060810160a082018989808284379091018481038352858152602001905085858082843782019150509850505050505050505060405180910390a150505050505050565b6000808585613a8386868080601f016020809104026020016040519081016040528181529291906020840183838082843750614347945050505050565b60405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a02815260140193505050506040519081900390206000908152600a60205260409020549695505050505050565b33600160a060020a031660009081526001602052604081206002015462010000900460ff161515613b0757600080fd5b61223d88883360405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a028152601401935050505060405180910390208787878760405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a02815260140193505050506040518091039020856154cf565b600054600160a060020a03165b90565b60008084848460405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a028152601401935050505060405190819003902060009081526008602052604090206007015495945050505050565b600260205260009081526040902054600160a060020a031681565b33600160a060020a031660009081526001602052604081206002015481908190610100900460ff161515613c4557600080fd5b60008413613c5257600080fd5b89893360405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a028152601401935050505060405180910390209250613cc986868080601f016020809104026020016040519081016040528181529291906020840183838082843750614347945050505050565b915087878360405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a028152601401935050505060405180910390209050604080519081016040908152828252602080830187905260008681526008909152206005018151815560208201516001909101555050505050505050505050565b600080600080600088888860405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a0281526014019350505050604051908190039020600081815260086020526040902060070180549192509087908110613db257fe5b600091825260208083209091015483835260089091526040909120600701805461ffff90921696509087908110613de557fe5b6000918252602080832091909101548383526008909152604090912060070180546201000090920462ffffff1695509087908110613e1f57fe5b6000918252602080832091909101548383526008909152604090912060070180546501000000000090920463ffffffff1694509087908110613e5d57fe5b906000526020600020900160000160099054906101000a900461ffff16915050945094509450949050565b600160a060020a033316600090815260016020526040812060020154819081908190819060ff161515613eba57600080fd5b6000861215613ec857600080fd5b613f008c8c8080601f016020809104026020016040519081016040528181529291906020840183838082843750614347945050505050565b93508d8d8560405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a028152601401935050505060405180910390209250613f7988888080601f016020809104026020016040519081016040528181529291906020840183838082843750614347945050505050565b915089898360405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a0281526014019350505050604051809103902090506040805190810160409081528282526020808301899052600086815260089091522060050181518155602082015160019091015550600081815260096020526040902080548790811061400957fe5b90600052602060002090600b0201600901805480600101828161402c91906159a4565b9160005260206000209060020201600060408051908101604052868152600019602082015291905081518155602082015160019182015596505050505050509998505050505050505050565b6000614082615924565b61408a615924565b6000806000614097615924565b60008a8a8a60405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a0281526014019350505050604051908190039020600081815260086020908152604091829020805460019182018054600160a060020a039092169d509495506002918116156101000260001901160491601f83018290048202909101905190810160405280929190818152602001828054600181600116156101000203166002900480156141925780601f1061416757610100808354040283529160200191614192565b820191906000526020600020905b81548152906001019060200180831161417557829003601f168201915b50505060008481526008602090815260409182902060029081018054969d50956101006001821615026000190116049350601f840181900481020191505190810160405280929190818152602001828054600181600116156101000203166002900480156142415780601f1061421657610100808354040283529160200191614241565b820191906000526020600020905b81548152906001019060200180831161422457829003601f168201915b505050600084815260086020908152604091829020600381015460049091018054969c5063ffffffff82169b50640100000000820462ffffff169a5067010000000000000090910461ffff16985094600260001961010060018416150201909116049350601f840181900481020191505190810160405280929190818152602001828054600181600116156101000203166002900480156143235780601f106142f857610100808354040283529160200191614323565b820191906000526020600020905b81548152906001019060200180831161430657829003601f168201915b50505050509150509397509397509397909450565b600b54600160a060020a031681565b600060026000836040518082805190602001908083835b6020831061437d5780518252601f19909201916020918201910161435e565b6001836020036101000a03801982511681845116179092525050509190910192506040915050519081900390208152602081019190915260400160002054600160a060020a031692915050565b600160a060020a033316600090815260016020526040812060020154819060ff1615156143f657600080fd5b61442e8b8b8080601f016020809104026020016040519081016040528181529291906020840183838082843750614347945050505050565b90506145118d8d8360405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a02815260140193505050506040518091039020338d8d8080601f01602080910402602001604051908101604052818152929190602084018383808284378201915050505050508c8c8080601f01602080910402602001604051908101604052818152929190602084018383808284378201915050505050508b8b61ffff168b8b8b8080601f0160208091040260200160405190810160405281815292919060208401838380828437506156fd945050505050565b80600160a060020a03167ff9afa3de5083c38826783adbbea1d994ff36456b25ef72f7e75a07b1a3859e578e8e338d8d604051600160a060020a03841660208201526060808252810185905280604081016080820188888082843790910184810383528581526020019050858580828437820191505097505050505050505060405180910390a25060019c9b505050505050505050505050565b600454151590565b33600160a060020a03166000908152600160205260408120600201548190819062010000900460ff1615156145e757600080fd5b60008410156145f557600080fd5b61462d88888080601f016020809104026020016040519081016040528181529291906020840183838082843750614347945050505050565b925089898460405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a02815260140193505050506040518091039020915085853360405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a02815260140193505050506040519081900390206000818152600960205260409020805491925090859081106146ca57fe5b90600052602060002090600b020160090180548060010182816146ed91906159a4565b91600052602060002090600202016000604080519081016040528581526000196020820152919050815181556020820151816001015550505050505050505050505050565b600354600160a060020a031681565b600160a060020a033316600090815260016020526040812060020154819060ff16151561476d57600080fd5b6147a58a8a8080601f016020809104026020016040519081016040528181529291906020840183838082843750614347945050505050565b91508c8c8360405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a028152601401935050505060405180910390209050614884818c8a8a8080601f016020809104026020016040519081016040528181529291906020840183838082843782019150505050505089898080601f016020809104026020016040519081016040528181529291906020840183838082843782019150505050505088888080601f01602080910402602001604051908101604052818152929190602084018383808284375061520d945050505050565b600081815260096020526040902080548c90811061489e57fe5b90600052602060002090600b0201600201604051808280546001816001161561010002031660029004801561490a5780601f106148e857610100808354040283529182019161490a565b820191906000526020600020905b8154815290600101906020018083116148f6575b5050915050604051809103902082600160a060020a03167fdedf3b88b7ff3467683a7370c9e412b6564ae72f61d19346f1f118d82dce8b208f8f338d8d604051600160a060020a03841660208201526060808252810185905280604081016080820188888082843790910184810383528581526020019050858580828437820191505097505050505050505060405180910390a350505050505050505050505050565b60005433600160a060020a039081169116146149c857600080fd5b33600160a060020a03167f26f57461703d2ce008105a644fd78ba5affe61badbeb36b793f3e0e0ea89004c836001600086600160a060020a0316600160a060020a0316815260200190815260200160002060020160019054906101000a900460ff1684604051600160a060020a039093168352901515602083015215156040808301919091526060909101905180910390a2600160a060020a03909116600090815260016020526040902060020180549115156101000261ff0019909216919091179055565b33600160a060020a0316600090815260016020526040812060020154819062010000900460ff161515614ac057600080fd5b8b8b3360405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a028152601401935050505060405180910390209050614c6081336001600033600160a060020a0316600160a060020a031681526020019081526020016000206001018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015614bc05780601f10614b9557610100808354040283529160200191614bc0565b820191906000526020600020905b815481529060010190602001808311614ba357829003601f168201915b50505050508d8d8080601f01602080910402602001604051908101604052818152929190602084018383808284378201915050505050508c8c8080601f01602080910402602001604051908101604052818152929190602084018383808284378201915050505050508b8b8b8b8080601f0160208091040260200160405190810160405281815292919060208401838380828437506152ce945050505050565b33600160a060020a03167f6af891641e71b5b3ce69aa42d772855f554c0674b8f2e40b038e735dfb819ce38d8d338e8e60096000896000191660001916815260200190815260200160002080549050604051600160a060020a03851660208201526060810182905260808082528101869052806040810160a082018989808284379091018481038352868152602001905086868082843782019150509850505050505050505060405180910390a25060019b9a5050505050505050505050565b60005433600160a060020a03908116911614614d3b57600080fd5b33600160a060020a03167f26f57461703d2ce008105a644fd78ba5affe61badbeb36b793f3e0e0ea89004c836001600086600160a060020a0316600160a060020a0316815260200190815260200160002060020160029054906101000a900460ff1684604051600160a060020a039093168352901515602083015215156040808301919091526060909101905180910390a2600160a060020a0390911660009081526001602052604090206002018054911515620100000262ff000019909216919091179055565b60078054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156125b25780601f10612587576101008083540402835291602001916125b2565b33600160a060020a0316600090815260016020526040812060020154610100900460ff161515614e9d57600080fd5b614f558a8a3360405180848480828437820191505082600160a060020a0316600160a060020a0316606060020a0281526014019350505050604051809103902033614ee7336157d6565b8b8b8080601f01602080910402602001604051908101604052818152929190602084018383808284378201915050505050508a8a61ffff168a8a8a8080601f0160208091040260200160405190810160405281815292919060208401838380828437506156fd945050505050565b33600160a060020a03167ff9afa3de5083c38826783adbbea1d994ff36456b25ef72f7e75a07b1a3859e578b8b338c8c604051600160a060020a03841660208201526060808252810185905280604081016080820188888082843790910184810383528581526020019050858580828437820191505097505050505050505060405180910390a25060019998505050505050505050565b60005433600160a060020a0390811691161461500757600080fd5b600160a060020a038116151561501c57600080fd5b6000547f64b29884510e05067b4ed2199d3b82647dd4377a1a9b5d8c0bd88bbe23ec4dc690600160a060020a031682604051600160a060020a039283168152911660208201526040908101905180910390a16000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6001602052806000526040600020600091509050806000018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156151495780601f1061511e57610100808354040283529160200191615149565b820191906000526020600020905b81548152906001019060200180831161512c57829003601f168201915b505050505090806001018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156151e75780601f106151bc576101008083540402835291602001916151e7565b820191906000526020600020905b8154815290600101906020018083116151ca57829003601f168201915b5050506002909301549192505060ff808216916101008104821691620100009091041685565b600085815260096020526040902080548590811061522757fe5b90600052602060002090600b0201600801805480600101828161524a91906159d5565b916000526020600020906003020160006060604051908101604090815287825260208201879052810185905291905081518190805161528d929160200190615936565b506020820151816001019080516152a8929160200190615936565b506040820151816002019080516152c3929160200190615936565b505050505050505050565b600088815260096020526040902080549081906152ee9060018301615a01565b50600089815260096020526040902080548991908390811061530c57fe5b60009182526020808320600b92909202909101805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0394909416939093179092558a815260099091526040902080548891908390811061536657fe5b90600052602060002090600b0201600101908051615388929160200190615936565b5060008981526009602052604090208054879190839081106153a657fe5b90600052602060002090600b02016002019080516153c8929160200190615936565b5060008981526009602052604090208054869190839081106153e657fe5b90600052602060002090600b0201600301908051615408929160200190615936565b50600089815260096020526040902080548591908390811061542657fe5b600091825260208083206004600b9093020191909101929092558a815260099091526040902080548491908390811061545b57fe5b60009182526020808320600b92909202909101600501805461ffff191661ffff94909416939093179092558a81526009909152604090208054839190839081106154a157fe5b90600052602060002090600b02016006019080516154c3929160200190615936565b50505050505050505050565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff85106154fe57600080fd5b600083121561550c57600080fd5b505060008481526009602052604090208054829185918290811061552c57fe5b90600052602060002090600b0201600901805480600101828161554f91906159a4565b916000526020600020906002020160006040805190810160405287815260208101879052919050815181556020820151600190910155505060008481526009602052604090208054839081106155a157fe5b90600052602060002090600b0201600a0180548060010182816155c491906159a4565b9160005260206000209060020201600060408051908101604052898152602081018590529190508151815560208201518160010155505050505050505050565b60008581526008602052604090206007018054600181016156258382615a2d565b916000526020600020900160006080604051908101604090815261ffff808a16835262ffffff8916602084015263ffffffff881691830191909152851660608201529190508151815461ffff191661ffff919091161781556020820151815462ffffff91909116620100000264ffffff0000199091161781556040820151815463ffffffff91909116650100000000000268ffffffff0000000000199091161781556060820151815461ffff919091166901000000000000000000026affff0000000000000000001990911617905550505050505050565b6000888152600860205260409020805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038916178155600101868051615745929160200190615936565b506000888152600860205260409020600201858051615768929160200190615936565b50600088815260086020526040902060038101805463ffffffff191663ffffffff87161766ffffff00000000191664010000000062ffffff8716021768ffff00000000000000191667010000000000000061ffff8616021790556004018180516152c3929160200190615936565b6157de615924565b6001600083600160a060020a0316600160a060020a031681526020019081526020016000206001018054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561589a5780601f1061586f5761010080835404028352916020019161589a565b820191906000526020600020905b81548152906001019060200180831161587d57829003601f168201915b50505050509050919050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106158e75782800160ff19823516178555615914565b82800160010185558215615914579182015b828111156159145782358255916020019190600101906158f9565b50615920929150615a51565b5090565b60206040519081016040526000815290565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061597757805160ff1916838001178555615914565b82800160010185558215615914579182015b82811115615914578251825591602001919060010190615989565b8154818355818115116159d0576002028160020283600052602060002091820191016159d09190615a6b565b505050565b8154818355818115116159d0576003028160030283600052602060002091820191016159d09190615a8b565b8154818355818115116159d057600b0281600b0283600052602060002091820191016159d09190615aca565b8154818355818115116159d0576000838152602090206159d0918101908301615b83565b613b9891905b808211156159205760008155600101615a57565b613b9891905b808211156159205760008082556001820155600201615a71565b613b9891905b80821115615920576000615aa58282615bab565b615ab3600183016000615bab565b615ac1600283016000615bab565b50600301615a91565b613b9891905b8082111561592057805473ffffffffffffffffffffffffffffffffffffffff191681556000615b026001830182615bab565b615b10600283016000615bab565b615b1e600383016000615bab565b60006004830181905560058301805461ffff19169055615b42906006840190615bab565b615b50600783016000615bab565b615b5e600883016000615bf2565b615b6c600983016000615c13565b615b7a600a83016000615c13565b50600b01615ad0565b613b9891905b808211156159205780546affffffffffffffffffffff19168155600101615b89565b50805460018160011615610100020316600290046000825580601f10615bd15750615bef565b601f016020900490600052602060002090810190615bef9190615a51565b50565b5080546000825560030290600052602060002090810190615bef9190615a8b565b5080546000825560020290600052602060002090810190615bef9190615a6b5600a165627a7a7230582015b751ca2cdc8d2e42688448fc5b1487eb75f59e3ff823656e5a5d4695b3af7c0029

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

0000000000000000000000006b817b127a5a72956919a9360f92727d1cf1dd52

-----Decoded View---------------
Arg [0] : _endorsements (address): 0x6B817b127A5a72956919a9360F92727D1Cf1DD52

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000006b817b127a5a72956919a9360f92727d1cf1dd52


Swarm Source

bzzr://15b751ca2cdc8d2e42688448fc5b1487eb75f59e3ff823656e5a5d4695b3af7c

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
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.