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
# --------------------------------------------------------------------------- | |
# | |
# Description: This file holds all my BASH configurations and aliases | |
# | |
# Sections: | |
# 1. Environment Configuration | |
# 2. Make Terminal Better (remapping defaults and adding functionality) | |
# 3. File and Folder Management | |
# 4. Searching | |
# 5. Process Management |
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
# In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env | |
# variable pointing GPG to the gpg-agent socket. This little script, which must be sourced | |
# in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start | |
# gpg-agent or set up the GPG_AGENT_INFO variable if it's already running. | |
# Add the following to your shell init to set up gpg-agent automatically for every shell | |
if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then | |
source ~/.gnupg/.gpg-agent-info | |
export GPG_AGENT_INFO | |
else |
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: process.env.DEVELOPMENT_HOST, | |
port: 8545, | |
network_id: "*", // Match any network id | |
gas: 4700000 | |
}, | |
} | |
}; |
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.0; | |
import './provableAPI_0.5.sol'; | |
contract BitcoinPrice is usingProvable { | |
string public GET_BITCOIN_PRICE_QUERY = "json(https://api.coingecko.com/api/v3/coins/markets?vs_currency=usd&order=market_cap_desc&per_page=1&page=1&sparkline=false).0.current_price"; | |
event LogNewProvableQuery(string description); | |
event LogNewProvableResult(string result); | |
mapping (bytes32 => bool) public pendingQueries; | |
string public result; |
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
FROM node:9-alpine | |
RUN rm -rf /var/cache/apk/* && \ | |
mkdir /app | |
WORKDIR /app | |
RUN apk update && \ | |
apk upgrade && \ | |
apk --update add python py-pip git make g++ && \ | |
apk add --no-cache bash && \ | |
npm install --unsafe-perm -g truffle@5.0.0-beta.2 && \ |
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
FROM node:carbon-alpine | |
RUN apk --virtual dependencies add --update git python make g++ gcc && \ | |
rm -rf /tmp/* /var/cache/apk/* | |
WORKDIR /usr/app | |
RUN git clone https://github.com/provable-things/ethereum-bridge . | |
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
version: '3' | |
services: | |
ganache: | |
image: trufflesuite/ganache-cli:v6.1.0 | |
command: ganache-cli -h 0.0.0.0 | |
ports: | |
- "8545:8545" | |
bridge: | |
build: | |
context: . |
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 BitcoinPrice = artifacts.require("BitcoinPrice"); | |
const sleep = ms => { | |
return new Promise(resolve => { | |
setTimeout(resolve, ms); | |
}); | |
}; | |
const getEventLogByTopic = async eventTopic => { | |
try { |
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
#!/bin/bash | |
echo "Getting the Bitcoin price using contracts on provable:starter container using docker compose" | |
docker-compose -f docker-compose.yml up --build | |
TR=$? | |
echo exitcode=${TR} | |
echo "removing................" | |
docker-compose -f docker-compose.yml rm -f |
OlderNewer