Skip to content

Instantly share code, notes, and snippets.

anonymous
anonymous / Coin
Created July 28, 2016 14:44
Created using browser-solidity: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://ethereum.github.io/browser-solidity/#version=soljson-latest.js&optimize=undefined&gist=
contract Coin {
// The keyword "public" makes those variables
// readable from outside.
// declares a state variable of type address that
// is publicly accessible,
// does not allow any arithmetic operations. It is
// suitable for storing addresses of contracts or
// keypairs belonging to external persons
address public minter;
mapping (address => uint) public balances;
anonymous
anonymous / Simple Storage
Created July 28, 2016 14:30
Created using browser-solidity: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://ethereum.github.io/browser-solidity/#version=soljson-latest.js&optimize=undefined&gist=
/**
* collection of code (its functions) and data (its state)
* that resides at a specific address on the Ethereum blockchain.
* think of it as a single slot in a database that can be
* queried and altered by calling functions of the code that
* manages the database
* **/
contract SimpleStorage {
//declares a state variable called storedData of type
//uint (unsigned integer of 256 bits)