This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 0x0123123123123123 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 0x6a6401AEb4a3beb93820904E761b0d86364bb39E |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| krocks method | |
| parkingSpots | |
| id: A93F93J | |
| parkinLocations | |
| id: F39f2m29 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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); | |
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pragma solidity ^0.4.12; | |
| contract PassToken { | |
| uint x = 123; | |
| mapping(address => uint) balance; | |
| function whats_x() constant returns(uint){ | |
| return x; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |