Skip to content

Instantly share code, notes, and snippets.

View PaulRBerg's full-sized avatar

Paul Razvan Berg PaulRBerg

View GitHub Profile
@PaulRBerg
PaulRBerg / PlasmaAnnotations.md
Created November 9, 2018 14:00
Annotations on the original Plasma white paper

Annotations

Preface

The Plasma white paper written by Joseph Poon and Vitalik Buterin spurred a large wave of innovation, but it equally created confusion on many topics. One year later, Plasma slightly departed from its original vision, having now a rather expansive definition, with several different proposed implementations.

Let's briefly describe the recent history of Plasma, as it rolled out over the last year! Minimum Viable Plasma was introduced as a model adhering to most of the procedures outlined in the white paper, but it turned out that some parts, such as the multi-step process of state transitions, could be dramatically improved. Shortly after, Plasma Cash did just that by the means of non-fungible tokens, enabling simple, reliable and low-cost transactions. It is in particular applicable to high throughput but low or medium-state applications, like micropayments and exchanges. Other notable examples include Plasma Debit, Plasma Xt and More Viable Plasma.

Due to this amalgam of implementa

@PaulRBerg
PaulRBerg / S3StaticWebsitePolicy.json
Created December 26, 2018 21:35
Sample policy for a static website hosted on S3
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "S3StaticWebsitePolicy",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
"Action": "s3:GetObject",
@PaulRBerg
PaulRBerg / CloudFrontStaticWebsiteConfig.json
Created December 26, 2018 22:47
CloudFront static website config
{
"CallerReference": "CloudFrontStaticWebsitConfig",
"Aliases": {
"Quantity": 1,
"Items": [
"example.com"
]
},
"DefaultRootObject": "",
"Origins": {
@PaulRBerg
PaulRBerg / TruffleV5Report.txt
Last active December 30, 2018 13:23
Console output after running migrations
Starting migrations...
======================
> Network name: 'development'
> Network id: 7923
> Block gas limit: 6721975
1_initial_migration.js
======================
@PaulRBerg
PaulRBerg / webpack.common.js
Created April 24, 2019 09:31
Webpack Common Config File
const CleanWebpackPlugin = require('clean-webpack-plugin');
const path = require('path');
const webpack = require('webpack');
module.exports = {
entry: './src/index.js',
module: {
rules: [
{
enforce: 'pre',
@PaulRBerg
PaulRBerg / Parent.jsx
Last active May 18, 2019 21:46
Parent component for StackOverflow question
import React, { Component } from "react";
import classnames from "classnames";
import PropTypes from "prop-types";
import ReactGA from "react-ga";
import ReactTooltip from "react-tooltip";
import { connect } from "react-redux";
import { push } from "connected-react-router";
import { Query } from "react-apollo";
import { withTranslation } from "react-i18next";
@PaulRBerg
PaulRBerg / Child.jsx
Created May 18, 2019 21:46
Child component for StackOverflow question
import React, { Component } from "react";
import classnames from "classnames";
import PropTypes from "prop-types";
import Slider from "rc-slider/lib/Slider";
import { withApollo } from "react-apollo";
import { withTranslation } from "react-i18next";
import Modal from "../../../components/Modal";
import PrimaryButton from "../../../components/PrimaryButton";
@PaulRBerg
PaulRBerg / Child.jsx
Created May 18, 2019 21:46
Child component for StackOverflow question
import React, { Component } from "react";
import classnames from "classnames";
import PropTypes from "prop-types";
import Slider from "rc-slider/lib/Slider";
import { withApollo } from "react-apollo";
import { withTranslation } from "react-i18next";
import Modal from "../../../components/Modal";
import PrimaryButton from "../../../components/PrimaryButton";
@PaulRBerg
PaulRBerg / queries.js
Created May 18, 2019 21:47
Apollo query for StackOverflow question
import gql from "graphql-tag";
export const GET_STREAMS = gql`
query Streams($owner: String!) {
streams(orderBy: id, orderDirection: desc, where: { owner: $owner }) {
id
flow
owner
rawStream {
id
@PaulRBerg
PaulRBerg / streamIds.md
Last active August 12, 2019 22:22
Recovery stream ids

The number in the right hand side is the "streamId" associated to your Ethereum address.

Copy this value and return to the Medium article.

{
  "0x02b0e3ccf41270fb5294ec229667c56c0bb14a95": {
    "balance": "1.68185019434433791 DAI",
    "streamId": [36]
 },