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
# default configuration for interactive bash sessions | |
# modify as needed | |
# current hostname | |
export HOSTNAME="$(hostname)" | |
# setup system paths | |
export PATH="${HOME}/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:." | |
export MANPATH="/usr/share/man:/usr/local/man" | |
export LD_LIBRARY_PATH="" |
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
const express = require('express') | |
const fs = require('fs') | |
const https = require('https') | |
const opts = { key: fs.readFileSync('server_key.pem'), | |
cert: fs.readFileSync('server_cert.pem'), | |
requestCert: true, | |
rejectUnauthorized: false, | |
ca: [ fs.readFileSync('server_cert.pem') ] | |
} |
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 experimental ABIEncoderV2; | |
// Uncomment for console.log support | |
import "@nomiclabs/buidler/console.sol"; | |
contract PaymentHub { | |
// Mapping for finding a user's groups | |
mapping (address => Group[]) public userToGroups; |
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 experimental ABIEncoderV2; | |
contract PaymentHub { | |
// Mapping for finding a user's groups | |
mapping (address => Group[]) public userToGroups; | |
mapping (address => int256) public userToBalance; | |
mapping (address => Member) public userToMember; | |
Group[] public groups; // The contract stores all groups, serves as a hub. Various groups will not interact with each other |
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 React, { useEffect, useState, useContext } from "react"; | |
import { DrizzleContext } from "@drizzle/react-plugin"; | |
export default () => { | |
const drizzleContext = useContext(DrizzleContext.Context); | |
const [dataKey, setDataKey] = useState(null); | |
const [group, setGroup] = useState(null); | |
const account = drizzleContext.drizzleState.accounts[0]; |
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 React, { useEffect, useState } from "react"; | |
export default ({drizzle, drizzleState}) => { | |
const [dataKey, setDataKey] = useState(null); | |
useEffect(() => { | |
const contract = drizzle.contracts.ComplexStorage; | |
// get the value of string1 from the contract | |
const dataKey = contract.methods["userToGroup"].cacheCall(); |
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.4.21 <0.7.0; | |
contract ComplexStorage { | |
mapping (address => Group) public userToGroup; | |
Group[] public groupArray; | |
Group public singleGroup; | |
struct Group { | |
string name; |
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
{ | |
"name": "portfolio-app", | |
"version": "0.1.0", | |
"private": true, | |
"homepage": "https://caseykey.github.io/", | |
"dependencies": { | |
"@caseykey/react-read-more-read-less": "^1.0.7", | |
"@testing-library/jest-dom": "^4.2.4", | |
"@testing-library/react": "^9.4.0", | |
"@testing-library/user-event": "^7.2.1", |