Skip to content

Instantly share code, notes, and snippets.

@thiagosouza
Last active February 14, 2019 18:42
Show Gist options
  • Save thiagosouza/0a611abcd6aa2073f91f320d2c135c02 to your computer and use it in GitHub Desktop.
Save thiagosouza/0a611abcd6aa2073f91f320d2c135c02 to your computer and use it in GitHub Desktop.
Smart Contracts usando Node.js, web3 e Serverless
mkdir mvp-blockchain-serverless
#install nvm and put a nvmrc file on the directory
touch .nvmrc && echo "8" >! .nvmrc && cd .
#initialize npm package
npm init
npm install firebase-functions@latest firebase-admin@latest --save
npm install -g firebase-tools
#firebase login
firebase login
firebase init #or firebase init functions
#select functions
#language = javascript
#ESLint = y
#install packages = y
#Project creation is only available from the Firebase Console
#Please visit https://console.firebase.google.com to create a new project, then run firebase use --add
#dashboard
#https://console.firebase.google.com/project/mvp-blockchain-serverless/overview
#https://console.cloud.google.com/home/dashboard?project=mvp-blockchain-serverless&folder=&organizationId=
#firebase functions
#https://console.firebase.google.com/u/0/project/mvp-blockchain-serverless/functions
#https://console.cloud.google.com/functions/list?project=mvp-blockchain-serverless&folder&organizationId
#firebase pricing
#https://cloud.google.com/functions/pricing
firebase use --add mvp-blockchain-serverless
#https://firebase.google.com/docs/functions/get-started
#metamask
#Breaking Change: No Accounts Exposed by Default
#https://medium.com/metamask/https-medium-com-metamask-breaking-change-injecting-web3-7722797916a8
#ethereum dependencies
npm install -S web3
#npm install --only=prod
#https://github.com/88insurtech/ethereum/blob/master/test/TestSmartProtectionPolicy.js
#https://repl.it/@thiagosouza87/mvp-blockchain-front-end
#https://repl.it/@thiagosouza87/mvp-blockchain-back-end
#https://codesandbox.io/s/x3vq438ow
#https://www.youtube.com/watch?v=Trj_UU6J3-A
nvm use 8
npm install -g ganache-cli
#https://github.com/trufflesuite/ganache/releases
#https://github.com/trufflesuite/ganache/releases/download/v1.3.0/ganache-1.3.0-x86_64.AppImage
chmod a+x ~/ganache-1.3.0-x86_64.AppImage
./ganache-1.3.0-x86_64.AppImage
#https://remix.ethereum.org/
#https://cointelegraph.com/explained/erc-20-tokens-explained
firebase init
#hosting
jsbin.com
https://jsfiddle.net/
https://jsfiddle.net/user/thiagosouza/fiddles/
https://codepen.io/thiagosouza/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment