Sponsored:   VC, TLDR and CoinBene Funded "TEMCO: Bitcoin Network (RSK) Suppy Chain! Whitelist KYC Starts Now!!"
Contract Overview
Balance: 0 Ether
Ether Value: $0
Transactions: 3 txns
Misc:
Address Watch: Add To Watch List
Contract Creator: 0xdfe24ebc2f44abc42f47cc9a6829787ff80ca144at txn 0xbc5cc0970a375756213fa619b55524569d5376d921ff88dfdee74d2abfd77eb0
 Latest 3 txns

TxHash Age From To Value [TxFee]
0x43fcb7438242066e75a809102f8505627d02a28408b5f8038e156e482106d44b621 days 1 hr ago0xdfe24ebc2f44abc42f47cc9a6829787ff80ca144  IN   0x0bd78821368ca2d679e2d3a792b194465b3d0c280 Ether0.000997747939
0xdb13f49756cba450b7dbfaa489630863deebd3625675fba39adf8f3014061b6e621 days 2 hrs ago0xdfe24ebc2f44abc42f47cc9a6829787ff80ca144  IN   0x0bd78821368ca2d679e2d3a792b194465b3d0c280 Ether0.0008
0xbc5cc0970a375756213fa619b55524569d5376d921ff88dfdee74d2abfd77eb0621 days 3 hrs ago0xdfe24ebc2f44abc42f47cc9a6829787ff80ca144  IN    Contract Creation0 Ether0.029180963508
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
View All
ParentTxHash Block Age From To Value
Contract Name: AgriChainMasterContract
Compiler Text: v0.4.10+commit.f0d539ae
Optimization Enabled: Yes
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

pragma solidity ^0.4.10; 
//v.1609rev17032301 Ezlab 2016 all-rights reseved [email protected]
//special purpose contract for CantinaVolpone further info https://agrichain.it/d/0x160564d346f6e9fb3d93c034f207ecf9791b7739

//common base contract
contract BaseAgriChainContract {
    address creator; 
    bool public isSealed;
    function BaseAgriChainContract() public    {  creator = msg.sender; EventCreated(this,creator); }
    modifier onlyIfNotSealed() //semantic when sealed is not possible to change sensible data
    {
        if (isSealed)
            throw;
        _;
    }

    modifier onlyBy(address _account) //semantic only _account can operate
    {
        if (msg.sender != _account)
            throw;
        _;
    }
    
    function kill() onlyBy(creator)   { suicide(creator); }     
    function setCreator(address _creator)  onlyBy(creator)  { creator = _creator;     }
    function setSealed()  onlyBy(creator)  { isSealed = true;  EventSealed(this);   } //seal down contract not reversible

    event EventCreated(address self,address creator);
    event EventSealed(address self); //invoked when contract is sealed
    event EventChanged(address self,string property); // generic property change
    event EventChangedInt32(address self,string property,int32 value); //Int32 property change
    event EventChangedString(address self,string property,string value); //string property Change
    event EventChangedAddress(address self,string property,address value); //address property Changed
    
  
}


//ChainedContract
contract AgriChainContract   is BaseAgriChainContract    
{     string public AgriChainType;
      address public  AgriChainNextData;
      address public  AgriChainPrevData;
      address public  AgriChainRootData;
    
    function   AgriChainDataContract() public
    {
        AgriChainNextData=address(this);
        AgriChainPrevData=address(this);
        AgriChainRootData=address(this);
    }
    
     
      
      
      
    function setChain(string _Type,address _Next,address _Prev, address _Root)  onlyBy(creator)  
    {
         AgriChainType=_Type;
         AgriChainNextData=_Next;
         AgriChainPrevData=_Prev;
         AgriChainRootData=_Root;
         EventChanged(this,'Chain');
    }
    
     function setChainNext(address _Next)  onlyBy(creator)  
    {
         AgriChainNextData=_Next;
         EventChangedAddress(this,'ChainNext',_Next);
    }
   

    function setChainPrev(address _Prev)  onlyBy(creator)  
    {
         AgriChainPrevData=_Prev;
         EventChangedAddress(this,'ChainNext',_Prev);
    }
    
   
   function setChainRoot(address _Root)  onlyBy(creator)  
    {
         AgriChainRootData=_Root;
         EventChangedAddress(this,'ChainRoot',_Root);
    }
    
     function setChainType(string _Type)  onlyBy(creator)  
    {
         AgriChainType=_Type;
         EventChangedString(this,'ChainType',_Type);
    }
      
}


// Master activities 
contract AgriChainMasterContract   is AgriChainContract    
{  
    address public  AgriChainContext;  //Context Data Chain
    address public  AgriChainCultivation;  //Cultivation Data Chain
    address public  AgriChainProduction;   //Production Data Chain
    address public  AgriChainDistribution; //Distribution Data Chain
    address public  AgriChainDocuments; //Distribution Data Chain

    function   AgriChainMasterContract() public
    { 
       AgriChainContext=address(this);
       AgriChainCultivation=address(this);
       AgriChainProduction=address(this);
       AgriChainDistribution=address(this);
       
    }
    function setAgriChainProduction(address _AgriChain)  onlyBy(creator) onlyIfNotSealed()
    {
         AgriChainProduction = _AgriChain;
         EventChangedAddress(this,'AgriChainProduction',_AgriChain);
    }
    function setAgriChainCultivation(address _AgriChain)  onlyBy(creator) onlyIfNotSealed()
    {
         AgriChainCultivation = _AgriChain;
         EventChangedAddress(this,'AgriChainCultivation',_AgriChain);
    }
    function setAgriChainDistribution(address _AgriChain)  onlyBy(creator) onlyIfNotSealed()
    {
         AgriChainDistribution = _AgriChain;
         EventChangedAddress(this,'AgriChainDistribution',_AgriChain);
    }
    
    function setAgriChainDocuments(address _AgriChain)  onlyBy(creator) onlyIfNotSealed()
    {
         AgriChainDocuments = _AgriChain;
         EventChangedAddress(this,'AgriChainDocuments',_AgriChain);
    }
    function setAgriChainContext(address _AgriChain)  onlyBy(creator) onlyIfNotSealed()
    {
         AgriChainContext = _AgriChain;
         EventChangedAddress(this,'AgriChainContext',_AgriChain);
    }
    
}



// legacy production contract 
contract AgriChainProductionContract   is BaseAgriChainContract    
{  
    string  public  Organization;      //Production Organization
    string  public  Product ;          //Product
    string  public  Description ;      //Description
    address public  AgriChainData;     //ProductionData
    string  public  AgriChainSeal;     //SecuritySeal
    string  public  Notes ;
    
    function   AgriChainProductionContract() public
    { 
       AgriChainData=address(this);
    }
    
    function setOrganization(string _Organization)  onlyBy(creator)  onlyIfNotSealed()
    {
          Organization = _Organization;
          EventChangedString(this,'Organization',_Organization);

    }
    
    function setProduct(string _Product)  onlyBy(creator) onlyIfNotSealed()
    {
          Product = _Product;
          EventChangedString(this,'Product',_Product);
        
    }
    
    function setDescription(string _Description)  onlyBy(creator) onlyIfNotSealed()
    {
          Description = _Description;
          EventChangedString(this,'Description',_Description);
    }
    function setAgriChainData(address _AgriChainData)  onlyBy(creator) onlyIfNotSealed()
    {
         AgriChainData = _AgriChainData;
         EventChangedAddress(this,'AgriChainData',_AgriChainData);
    }
    
    
    function setAgriChainSeal(string _AgriChainSeal)  onlyBy(creator) onlyIfNotSealed()
    {
         AgriChainSeal = _AgriChainSeal;
         EventChangedString(this,'AgriChainSeal',_AgriChainSeal);
    }
    
    
     
    function setNotes(string _Notes)  onlyBy(creator)
    {
         Notes =  _Notes;
         EventChanged(this,'Notes');
    }
}



//LoggedData
contract AgriChainDataContract   is AgriChainContract    
{  
      string public AgriChainLabel;
      string public AgriChainLabelInt;
      string public AgriChainDescription;
      string public AgriChainDescriptionInt;
      
    
    //main language data  
    function setData(string _Label,string _Description)  onlyBy(creator) onlyIfNotSealed()
    {
         
          AgriChainLabel=_Label;
          AgriChainDescription=_Description;
          EventChanged(this,'Data');
    }
   
    //International language data
    function setDataInt(string _LabelInt,string _DescriptionInt)  onlyBy(creator) onlyIfNotSealed()
    {
          
          AgriChainLabelInt=_LabelInt;
          AgriChainDescriptionInt=_DescriptionInt;
          EventChanged(this,'DataInt');
    }
   
      
}

//External DocumentData
//the extenal document is hashed  and chained as described by this contract
contract AgriChainDocumentContract   is AgriChainDataContract    
{  
     
    string  public  Emitter;      //Organization

    string  public  Name;         //Name
    string  public  NameInt;         //Name International

    string  public  FileName;     //FileName
    string  public  FileHash;     //FileHash
    string  public  FileData;     //FileData
   
    string  public  FileNameInt;  //FileName International
    string  public  FileHashInt;  //FileHash International
    string  public  FileDataInt;  //FileData International

    string  public  Notes ;
    address public  CurrentRevision; 
    
    function   AgriChainDocumentContract() public
    {
        CurrentRevision=address(this);
    }
    
    function setDocumentData(string _Emitter,string _Name, string _FileName,string _FileHash,string _FileData)  onlyBy(creator) onlyIfNotSealed()
    {
          Emitter=_Emitter;
          Name=_Name;
          FileName=_FileName;
          FileHash=_FileHash;
          FileData=_FileData;          
          EventChanged(this,'setDocumentData');
       
    } 
    
    function setCurrentRevision(address _Revision)  onlyBy(creator)  
    {
          CurrentRevision = _Revision;
          EventChangedAddress(this,'CurrentRevision',_Revision);
        
    } 
     
     
    function setNotes(string _Notes)  onlyBy(creator)
    {
         Notes =  _Notes;
         
    }
}


//Production Quntity counter contract
//the spedified production si accounted by this contract
contract AgriChainProductionLotContract   is AgriChainDataContract    
{  
    
     int32  public QuantityInitial;
     int32  public QuantityAvailable;
     string public QuantityUnit;
    
    function InitQuantity(int32 _Initial,string _Unit)  onlyBy(creator)  onlyIfNotSealed()
    {
          QuantityInitial = _Initial;
          QuantityAvailable = _Initial;
          QuantityUnit = _Unit;
          EventChangedInt32(this,'QuantityInitial',_Initial);

    }
  
    function UseQuantity(int32 _Use)  onlyBy(creator)  
    {
          QuantityAvailable = QuantityAvailable-_Use;
          EventChangedInt32(this,'QuantityAvailable',QuantityAvailable);

    }
  
}

    Contract ABI  
[{"constant":false,"inputs":[{"name":"_Type","type":"string"}],"name":"setChainType","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"AgriChainNextData","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_AgriChain","type":"address"}],"name":"setAgriChainProduction","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_Root","type":"address"}],"name":"setChainRoot","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"AgriChainContext","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_AgriChain","type":"address"}],"name":"setAgriChainContext","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_Prev","type":"address"}],"name":"setChainPrev","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"AgriChainDistribution","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"AgriChainRootData","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_creator","type":"address"}],"name":"setCreator","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"kill","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"setSealed","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"isSealed","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_AgriChain","type":"address"}],"name":"setAgriChainDocuments","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_AgriChain","type":"address"}],"name":"setAgriChainCultivation","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_Type","type":"string"},{"name":"_Next","type":"address"},{"name":"_Prev","type":"address"},{"name":"_Root","type":"address"}],"name":"setChain","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"AgriChainCultivation","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_AgriChain","type":"address"}],"name":"setAgriChainDistribution","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"AgriChainProduction","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_Next","type":"address"}],"name":"setChainNext","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"AgriChainDataContract","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"AgriChainType","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"AgriChainPrevData","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"AgriChainDocuments","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"inputs":[],"payable":false,"type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"self","type":"address"},{"indexed":false,"name":"creator","type":"address"}],"name":"EventCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"self","type":"address"}],"name":"EventSealed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"self","type":"address"},{"indexed":false,"name":"property","type":"string"}],"name":"EventChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"self","type":"address"},{"indexed":false,"name":"property","type":"string"},{"indexed":false,"name":"value","type":"int32"}],"name":"EventChangedInt32","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"self","type":"address"},{"indexed":false,"name":"property","type":"string"},{"indexed":false,"name":"value","type":"string"}],"name":"EventChangedString","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"self","type":"address"},{"indexed":false,"name":"property","type":"string"},{"indexed":false,"name":"value","type":"address"}],"name":"EventChangedAddress","type":"event"}]

  Contract Creation Code Switch To Opcodes View
6060604052341561000c57fe5b5b5b60008054600160a060020a03191633600160a060020a03908116919091179182905560408051308316815292909116602083015280517feccebe7b9eb846e30e8b21dfb66cad3313d87176fcd3b0a708737943afdaf8209281900390910190a15b60058054600160a060020a033016600160a060020a0319918216811790925560068054821683179055600780548216831790556008805490911690911790555b5b610fe6806100bf6000396000f300606060405236156101225763ffffffff60e060020a6000350416630851d08c8114610124578063091691c51461017c57806315b7ab02146101a857806317653b6e146101c6578063208b7427146101e4578063225cf99014610210578063385af1c31461022e5780633cbe73091461024c5780633ea3e42f146102785780633f516018146102a457806341c0e1b5146102c2578063449c198d146102d4578063631f9852146102e65780636b550dd31461030a5780639976f9e114610328578063a5c0249314610346578063d3257034146103b8578063d3b5305c146103e4578063dc72052814610402578063e4cfcbf71461042e578063e81766e81461044c578063e98fe5ce1461045e578063f4250f75146104ee578063fe2622a51461051a575bfe5b341561012c57fe5b61017a600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284375094965061054695505050505050565b005b341561018457fe5b61018c610676565b60408051600160a060020a039092168252519081900360200190f35b34156101b057fe5b61017a600160a060020a0360043516610685565b005b34156101ce57fe5b61017a600160a060020a0360043516610740565b005b34156101ec57fe5b61018c6107e2565b60408051600160a060020a039092168252519081900360200190f35b341561021857fe5b61017a600160a060020a03600435166107f1565b005b341561023657fe5b61017a600160a060020a03600435166108ac565b005b341561025457fe5b61018c61093d565b60408051600160a060020a039092168252519081900360200190f35b341561028057fe5b61018c61094c565b60408051600160a060020a039092168252519081900360200190f35b34156102ac57fe5b61017a600160a060020a036004351661095b565b005b34156102ca57fe5b61017a610999565b005b34156102dc57fe5b61017a6109c8565b005b34156102ee57fe5b6102f6610a4a565b604080519115158252519081900360200190f35b341561031257fe5b61017a600160a060020a0360043516610a5a565b005b341561033057fe5b61017a600160a060020a0360043516610b15565b005b341561034e57fe5b61017a600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284375094965050600160a060020a03853581169560208101358216955060400135169250610bd0915050565b005b34156103c057fe5b61018c610cad565b60408051600160a060020a039092168252519081900360200190f35b34156103ec57fe5b61017a600160a060020a0360043516610cbc565b005b341561040a57fe5b61018c610d77565b60408051600160a060020a039092168252519081900360200190f35b341561043657fe5b61017a600160a060020a0360043516610d86565b005b341561045457fe5b61017a610e17565b005b341561046657fe5b61046e610e4f565b6040805160208082528351818301528351919283929083019185019080838382156104b4575b8051825260208311156104b457601f199092019160209182019101610494565b505050905090810190601f1680156104e05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156104f657fe5b61018c610edc565b60408051600160a060020a039092168252519081900360200190f35b341561052257fe5b61018c610eeb565b60408051600160a060020a039092168252519081900360200190f35b600054600160a060020a0390811690331681146105635760006000fd5b8151610576906001906020850190610efa565b507f27014c59ab8a768328bd67417d43113a91fd393255e26d39084bc71577e8836030836040518083600160a060020a0316600160a060020a031681526020018060200180602001838103835260098152602001807f436861696e547970650000000000000000000000000000000000000000000000815250602001838103825284818151815260200191508051906020019080838360008314610635575b80518252602083111561063557601f199092019160209182019101610615565b505050905090810190601f1680156106615780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a15b5b5050565b600254600160a060020a031681565b600054600160a060020a0390811690331681146106a25760006000fd5b60005460a060020a900460ff16156106ba5760006000fd5b60078054600160a060020a03808516600160a060020a0319909216821790925560408051309093168352828101919091526060602083018190526013908301527f41677269436861696e50726f64756374696f6e00000000000000000000000000608083015251600080516020610f9b8339815191529181900360a00190a15b5b5b5050565b600054600160a060020a03908116903316811461075d5760006000fd5b60048054600160a060020a03808516600160a060020a0319909216821790925560408051309093168352828101919091526060602083018190526009908301527f436861696e526f6f740000000000000000000000000000000000000000000000608083015251600080516020610f9b8339815191529181900360a00190a15b5b5050565b600554600160a060020a031681565b600054600160a060020a03908116903316811461080e5760006000fd5b60005460a060020a900460ff16156108265760006000fd5b60058054600160a060020a03808516600160a060020a0319909216821790925560408051309093168352828101919091526060602083018190526010908301527f41677269436861696e436f6e7465787400000000000000000000000000000000608083015251600080516020610f9b8339815191529181900360a00190a15b5b5b5050565b600054600160a060020a0390811690331681146108c95760006000fd5b60038054600160a060020a03808516600160a060020a03199092168217909255604080513090931683528281019190915260606020830181905260099083015260ba60020a6810da185a5b93995e1d02608083015251600080516020610f9b8339815191529181900360a00190a15b5b5050565b600854600160a060020a031681565b600454600160a060020a031681565b600054600160a060020a0390811690331681146109785760006000fd5b60008054600160a060020a031916600160a060020a0384161790555b5b5050565b600054600160a060020a0390811690331681146109b65760006000fd5b600054600160a060020a0316ff5b5b50565b600054600160a060020a0390811690331681146109e55760006000fd5b6000805474ff0000000000000000000000000000000000000000191660a060020a17905560408051600160a060020a033016815290517f4eb6783909ea07b0aa366e4b899fdbcd45aef4172ea91e7d25c878f2ac4a11419181900360200190a15b5b50565b60005460a060020a900460ff1681565b600054600160a060020a039081169033168114610a775760006000fd5b60005460a060020a900460ff1615610a8f5760006000fd5b60098054600160a060020a03808516600160a060020a0319909216821790925560408051309093168352828101919091526060602083018190526012908301527f41677269436861696e446f63756d656e74730000000000000000000000000000608083015251600080516020610f9b8339815191529181900360a00190a15b5b5b5050565b600054600160a060020a039081169033168114610b325760006000fd5b60005460a060020a900460ff1615610b4a5760006000fd5b60068054600160a060020a03808516600160a060020a0319909216821790925560408051309093168352828101919091526060602083018190526014908301527f41677269436861696e43756c7469766174696f6e000000000000000000000000608083015251600080516020610f9b8339815191529181900360a00190a15b5b5b5050565b600054600160a060020a039081169033168114610bed5760006000fd5b8451610c00906001906020880190610efa565b5060028054600160a060020a03808716600160a060020a0319928316179092556003805486841690831617905560048054858416921691909117905560408051309092168252602082018190526005828201527f436861696e0000000000000000000000000000000000000000000000000000006060830152517fc369f63de1d5f3c6fb34244b8048b56c7f691d209c46248607b0768bf133d9109181900360800190a15b5b5050505050565b600654600160a060020a031681565b600054600160a060020a039081169033168114610cd95760006000fd5b60005460a060020a900460ff1615610cf15760006000fd5b60088054600160a060020a03808516600160a060020a0319909216821790925560408051309093168352828101919091526060602083018190526015908301527f41677269436861696e446973747269627574696f6e0000000000000000000000608083015251600080516020610f9b8339815191529181900360a00190a15b5b5b5050565b600754600160a060020a031681565b600054600160a060020a039081169033168114610da35760006000fd5b60028054600160a060020a03808516600160a060020a03199092168217909255604080513090931683528281019190915260606020830181905260099083015260ba60020a6810da185a5b93995e1d02608083015251600080516020610f9b8339815191529181900360a00190a15b5b5050565b60028054600160a060020a033016600160a060020a03199182168117909255600380548216831790556004805490911690911790555b565b60018054604080516020600284861615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610ed45780601f10610ea957610100808354040283529160200191610ed4565b820191906000526020600020905b815481529060010190602001808311610eb757829003601f168201915b505050505081565b600354600160a060020a031681565b600954600160a060020a031681565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610f3b57805160ff1916838001178555610f68565b82800160010185558215610f68579182015b82811115610f68578251825591602001919060010190610f4d565b5b50610f75929150610f79565b5090565b610f9791905b80821115610f755760008155600101610f7f565b5090565b905600bea4680ef8e3ba6c7e20e3eacc548d71c261efd6a8eb9520152a25b0e25b6c3fa165627a7a723058203b87a19aceb46f03fb838039616da102b58b22007ede4f71333122976d3e24f10029

   Swarm Source:
bzzr://3b87a19aceb46f03fb838039616da102b58b22007ede4f71333122976d3e24f1

 

View All
Block Age transaction Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.