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 useSWR from 'swr' | |
| // ===================== 원본 ============================= | |
| const useUser = (id) => { | |
| const result = useQuery(`/user/${id}`, (url) => { | |
| fetch(url).then(res => | |
| return res.json(); | |
| ) | |
| }); |
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 Caver from 'caver-js' | |
| const BAOBAB_TESTNET_RPC_URL = 'https://api.baobab.klaytn.net:8651/' | |
| const rpcURL = BAOBAB_TESTNET_RPC_URL | |
| const caver = new Caver(rpcURL) | |
| const OracleContract = DEPLOYED_ABI | |
| && DEPLOYED_ADDRESS |
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.5.0; | |
| contract JonburTest{ | |
| struct Jonbur{ | |
| uint date; | |
| string comment; | |
| uint amount; | |
| } | |
| address public owner; |
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
| #!/bin/bash | |
| # Starts 2 redis instances at ports 6379 and 6380 for testing | |
| # Kills whatever's already running at 6379 and 6380 | |
| if lsof -Pi :6379 -sTCP:LISTEN -t >/dev/null ; then | |
| redis-cli -p 6379 shutdown | |
| fi | |
| redis-server --port 6379 --daemonize yes &> /dev/null | |
| redis-cli -p 6379 flushall |
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
| #!/bin/bash | |
| # Starts 2 redis instances at ports 6379 and 6380 for testing | |
| # Kills whatever's already running at 6379 and 6380 | |
| if lsof -Pi :6379 -sTCP:LISTEN -t >/dev/null ; then | |
| redis-cli -p 6379 shutdown | |
| fi | |
| redis-server --port 6379 --daemonize yes &> /dev/null | |
| redis-cli -p 6379 flushall |