This file contains 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 React, { Component } from 'react' | |
import { Text, View } from 'react-native' | |
export default App extends Component { | |
render(){ | |
return ( | |
<View> | |
<Text>Hello world</Text> | |
</View> | |
) | |
} |
This file contains 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
git clone https://github.com/yangga/sample-hello-node |
This file contains 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
var express = require('express'); | |
var app = express(); | |
app.get('/', function (req, res) { | |
res.send('Hello Socket!'); | |
}); | |
var server = require('http').createServer(app).listen(3000, function() { | |
console.log(`Listening on port 3000 with http`); | |
}); |
This file contains 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
global | |
maxconn 4096 | |
defaults | |
mode http | |
balance roundrobin | |
option redispatch | |
option forwardfor | |
timeout connect 5s |
This file contains 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
$ npm install -g truffle | |
$ npm install -g ganache-cli | |
$ mkdir myproject && cd myproject | |
$ truffle init |
This file contains 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
$ npm init -y | |
$ npm install --save-exact openzeppelin-solidity@2.2.0 | |
$ npm install --save-exact truffle-hdwallet-provider@1.0.6 |
This file contains 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
const HDWalletProvider = require('truffle-hdwallet-provider'); | |
const infuraKey = [PROJECT ID]; | |
const fs = require('fs'); | |
const mnemonic = fs.readFileSync(".secret").toString().trim(); |
This file contains 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
module.exports = { | |
networks: { | |
development: { | |
host: "127.0.0.1", // Localhost (default: none) | |
port: 8545, // Standard Ethereum port (default: none) | |
network_id: "*", // Any network (default: none) | |
}, | |
} | |
} |
This file contains 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
truffle(develop)> let instance = await ToToToken.deployed() | |
truffle(develop)> instance.totalSupply() | |
<BN: 71afd498cfff6> | |
truffle(develop)> let accounts = await web3.eth.getAccounts() | |
truffle(develop)> instance.balanceOf(accounts[0]) | |
<BN: 71afd498cfff6> |
This file contains 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.5.2; | |
import "./CustomToken.sol"; | |
contract ToToToken is CustomToken { | |
uint8 private DECIMALS = 5; //자리수 | |
uint256 private MAX_TOKEN_COUNT = 20000000000; // 총 토큰 개수 | |
uint256 private MAX_SUPPLY = MAX_TOKEN_COUNT * (10 ** uint256(DECIMALS)); //총 발행량 | |
uint256 private INITIAL_SUPPLY = MAX_SUPPLY * 1 / 10; //초기 공급량 |
OlderNewer