Skip to content

Instantly share code, notes, and snippets.

pragma solidity ^0.4.0;
contract myico {
address public admin;
mapping(address => uint) balance;
uint public initial_supply = 1000000;
string public tokenName = "ICO";
function myico() public{
admin = msg.sender;
0x0123123123123123
0x6a6401AEb4a3beb93820904E761b0d86364bb39E
import { RNS3 } from 'react-native-aws3';
// ....
stringGen(len){
// for generating random strings obviously
let text = "";
let charset = "abcdefghijklmnopqrstuvwxyz0123456789";
for( var i=0; i < len; i++ )
text += charset.charAt(Math.floor(Math.random() * charset.length));
krocks method
parkingSpots
id: A93F93J
parkinLocations
id: F39f2m29
1. install testrpc (this allows you to run an ethereum block chain in your terminal) and run it
$ npm install -g ethereumjs-testrpc
$ testrpc
2. install truffle - a web framework that compiles solidity to bytecode that you can use on the internet
$ npm install -g truffle
3. clone the repo from bitbucket
$ git clone (repo clone url here)
$ npm install
firebase.auth().createUserWithEmailAndPassword("[email protected]","uniquepasword123*").then(user => {
var yao = firebase.database().ref('profiles');
var profileDeets = {
name: "dude"
};
yao.child(user.uid).set(profileDeets).then(function(e){
alert("worked...");
}).catch(e => {
alert(e.message);
})
let onecut = {
description: this.state.description,
name: this.state.name
};
let currentUid = firebase.auth().currentUser.uid;
let q = firebase.database().ref("profiles/" + currentUid + '/haircuts');
q.push(onecut).then((f) => {
alert("success");
}).catch((e) => {
alert("error");
pragma solidity ^0.4.12;
contract PassToken {
uint x = 123;
mapping(address => uint) balance;
function whats_x() constant returns(uint){
return x;
}
pragma solidity ^0.4.11;
contract PassToken {
string public constant name = "PassToken";
string public constant symbol = "PASS";
// 1 ether = 50 PAC
uint public constant price = 50;
uint public initial_supply = 12000000;
// limit 2 million for sale