Posts

Showing posts with the label #blockchainDapp

Blockchain versions

Blockchain 1.0: Currency The implementation of distributed ledger technology (DLT) led to its first and obvious application: cryptocurrencies. This allows fincancial transactions based on blockchain technology or DLT  (for the sake of simplicity often seen as synonyms ) to be executed with  Bitcoin  being the most prominent example in this segment. It is being used as “cash for the Internet”, a digital payment system and can be seen as the enabler of an “Internet of Money”.   Blockchain 2.0: Smart Contracts The new key concept are  Smart Contracts,  small computer programs that “live” in the blockchain. They are autonomous computer programs that execute automatically and conditions defined beforehand such as the facilitation, verification or enforcement of the performance of a contract. One big advantage this technlogy offers, is the blockchain making it impossible to tamper or hack Smart Contracts. So Smart Contracts reduce the cost of verification, ...

"Building Security" Solidity Example

Solidity contract to track Building Entries pragma solidity ^0.4.0; contract BuildingSecurity { struct Visitor { string name; string information; string VisitorID; uint8 ID; string fbID; string opencv; address delegate; } //visitor structure for name and information struct TempVisitor{ string name; string id; } Visitor[] EmployeePermanent; //list of permanent entries enum State { ENTRY, EXIT, IN, NON } //building state for visitors struct BuildingDoors { string DoorName; string fullname; string cardnumber; } State public state = State.NON; // initialize on create address buildName; string buildingNameDisplay; mapping(address => TempVisitor) visitors; BuildingDoors[] AllDoors; function BuildingSecurity(uint8 _numEntryLimit, string _buildingDisplay) public { buildName = msg.sender; ...