View truffle-config.js
const { mnemonic, secret, password, email } = require('./faucet.json'); | |
module.exports = { | |
networks: { | |
development: { | |
host: 'https://carthagenet.smartpy.io', | |
port: 443, | |
network_id: '*', | |
secret, | |
mnemonic, |
View use-balance-state.js v1
import {useState} from 'react' | |
export function useBalanceState(address = '') { | |
const [balance, setBalance] = useState(0); | |
const [error, setError] = useState(''); | |
const [loading, setLoading] = useState(false); | |
... | |
return {balance, error, loading}; |
View use-wallet.js
import { useState } from 'react'; | |
import { Tezos } from '@taquito/taquito'; | |
import { BeaconWallet } from '@taquito/beacon-wallet'; | |
export function useWallet() { | |
const [initialized, setInit] = useState(false); | |
const [address, setAddress] = useState(''); | |
const [error, setError] = useState(''); | |
const [loading, setLoading] = useState(false); |
View create_tezos_services.sh
#!/bin/bash | |
# TODO | |
# 1. Add vpn option (to Wants and After) | |
# openvpn-client@<vpnprovider>.service | |
NODE_SERVICE_FILE=/etc/systemd/system/tezos-node.service | |
BAKER_SERVICE_FILE=/etc/systemd/system/tezos-baker.service | |
ACCUSER_SERVICE_FILE=/etc/systemd/system/tezos-accuser.service |
View page-wrapper.js
import React, { Fragment } from 'react'; | |
import { BrowserRouter, Route, Redirect } from 'react-router-dom'; | |
// this is the actual code snippet, everything afterwards is used for example | |
export function pageWrapper(Component) { | |
// can use a stateless function component, but this is easier to extend and add prop types | |
return class PageWrapper extends React.Component { | |
render() { | |
const { | |
history: { push }, |
View gist:0f78f21b67310f022d98e7bcb28c1d5c
Traceback (most recent call last): | |
File "/opt/google_appengine/google/appengine/runtime/wsgi.py", line 267, in Handle | |
result = handler(dict(self._environ), self._StartResponse) | |
File "/home/chaim/repos/coligu/coligu-web/lib/flask/app.py", line 1994, in __call__ | |
return self.wsgi_app(environ, start_response) | |
File "/home/chaim/repos/coligu/coligu-web/lib/flask/app.py", line 1985, in wsgi_app | |
response = self.handle_exception(e) | |
File "/home/chaim/repos/coligu/coligu-web/lib/flask/app.py", line 1540, in handle_exception | |
reraise(exc_type, exc_value, tb) | |
File "/home/chaim/repos/coligu/coligu-web/lib/flask/app.py", line 1982, in wsgi_app |