Posts

Showing posts with the label #UserContract

"User Contract" Example

Image
In this example, i will be using a persons detail and creating a signature (hash value) from it. the hash value will be unique to each user given the assumption that there are no 2 people with the same details except TWINS. Things learned: The Ethereum Virtual Machine has three areas where it can store items.  “memory”, this is used to hold temporary values. It is erased between (external) function calls and is cheaper to use. pragma solidity ^0.4.0; contract UserAresh{ //Declare a struct similar to C++ struct Info{ string firstname; string lastname; string maiden; bytes32 birthday; } //Events event Log(string firstname, string lastname); //Create a mapping array mapping(bytes32 => Info) UserList; //whos the Creator. The Value is the Hex value of the account that consumes GAS/ETHER address creator; //this is a constructor, notice it has the same name as the Contract name functi...