Skip to content

Instantly share code, notes, and snippets.

💭
ethereum hacking

Paul Pham cryptogoth

💭
ethereum hacking
Block or report user

Report or block cryptogoth

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:edbacf61517bb9100b742b69ccd5fbc1
As for running your own Ethereum node, that's what you might want to do if you are going to be
making many smart contract calls for your users. Most people use Infura's free public nodes for
casual calls or development, but when they have a production system, they have to pay per 1000
smart contract calls or they can run their own dedicated Ethereum nodes. This involves maintaining
a Linux system and syncing the blockchain, and people who do this often use Amazon's hosted service, AWS.
I suspect Infura also uses AWS.
So for the same AWS credits, you could run a subgraph / GraphQL server to index the Ethereum events,
and have your front-end query it much more efficiently each time a user refreshes your website, instead
of calling the Ethereum mapping getter method repeatedly. You'll probably want to run your own subgraph server,
@cryptogoth
cryptogoth / RunYourOwnStatusWhisperNode.md
Last active Oct 7, 2019
Running your own Status Whisper Node
View RunYourOwnStatusWhisperNode.md

Run Your Own Status Whisper Node

Rather than start geth with all the necessary flags and have blockchain syncing going on, you may wish to just run whisper functionality for private messaging in a lightweight way. You should always run your own node using current Whisper v6 or below, as the node administrator is able to sniff your keypairs as they are requested.

To do that, you can use Status's excellent docker image, which sadly has had its documentation taken down from here: https://status.im/docs/run_status_node.html

@cryptogoth
cryptogoth / MyContract.sol
Created Sep 30, 2019
Ethereum Solidity Payable Method Demo
View MyContract.sol
import "./SafeMath.sol";
contract Constants {
uint8 public constant BUY_ID = 1;
uint8 public constant SUBSCRIBE_ID = 2;
}
contract BuyContract is Constants {
uint256 public lastAmount;
@cryptogoth
cryptogoth / gist:57a728dfa49d082257b109530ec0a6fa
Created Sep 28, 2019
Deploying Detroit Arcology DAO with DAOstack
View gist:57a728dfa49d082257b109530ec0a6fa
```
ℹ 0xfa511d8637bddf1f2d9180ee689003cc632b9b80fc14cd740ed1f5d95395fcd9 | 0.05431 ETH | Created new organization.
ℹ 0xb4a8c5f57fc6160f2c84d5593065648d90418f0c7a272a41d9e8a78dee43725d | 0.00186 ETH | GenesisProtocol parameters set.
ℹ 0xce3a5836e42dedafb6340d702822f0007b659e154424784685d9227b24bf17a8 | 0.00186 ETH | GenesisProtocol parameters set.
ℹ 0x43f08bd4a640511da5c0f05c7f69b03a5a11aa1704aae0c311615402574ff7ac | 0.00176 ETH | Scheme Registrar parameters set.
ℹ 0xc91cfcb8033eca38222e9191b398c5e2198fbc8d50fb0b45ca3e7d2c0270453a | 0.00086 ETH | Scheme Registrar parameters set.
ℹ 0x3741155aec40cc69fb8e15664c7e6ea90e2aa5e1bb48fd7fc021fbf46a0d1cab | 0.00072 ETH | Contribution Reward parameters set.
ℹ 0x291d85f6461bba7a68d3ba5260668c1770001f3036bfa014a6197c3e8fb8682d | 0.00316 ETH | DAO schemes set.
{ name: 'DetroitDAO',
Avatar: '0xf931FF012CBff471CccB90A784E3E88B512c890A',
@cryptogoth
cryptogoth / DecentWebWallets.md
Last active Sep 18, 2019
Ethereum / Decentralized Web Wallets, Desiderata and Tradeoffs
View DecentWebWallets.md

Decentralized Web Wallets

After reading about current options for secure browser storage for wallets, https://www.rdegges.com/2018/please-stop-using-local-storage/

I think I understand the tradeoffs of the different approaches, which is helping me write my own web wallet (called Democracy), currently for Ethereum.

I'd like to check my understanding here. Any feedback appreciated below in comments.

@cryptogoth
cryptogoth / InvisibleLibrary.md
Created Mar 26, 2019
Design doc for Invisible Library, an archaeological site to disburse tools and artifacts from the NYC Arcology out into the world
View InvisibleLibrary.md

Invisible Library Design Doc

The NYC Arcology is closing, and we need to find a good home for all of our tools, books, furnitures, artifacts. We prefer to match artifacts with the person who is called to do something arcological with them. Sometimes paying money makes sense, but often the passing on of a physical object is a way of staying connected, and encouraging more communal living in the future.

High-level goals

View gist:f3560b61fc79a4a1b086688cabe9666d
Hi bus drivers,
Thanks for the great framework! I've gotten it to work for my use case and just wanted to give you a shout out.
I'm writing values into statebus from a node client into a node server (running on localhost:80) and accessing
it from a webpage like this
<script type="statebus">
dom.BODY = ->
DIV {},
View createNote(pubKey, 100)
Wallet PubKey "0xdb675e76a87A10F91219F42a084Fb16A3898D5b4"
Wallet PrivKey "0x888c8cf0951a54dc2acf23d465da7dd67dac484c5d339a43e4f400c82f040194"
Note {
"a": "2c67ba01a81f98468bdcf80b90c7e2737586023832561a5f85ebccdb35a4e7c3",
"k": "64",
"gamma": [
"212be8ffc444ad4b5fab2d1f191c74d000a9aa5092f2cbd546fd24f4349bb310",
"117f3a19b0e8e03a98a2d4da0fb33e9b4b087fc2436d3e5767712d15f19b4b5b"
],
"sigma": [
View gist:1eb9610651b99a2bad4c1708e695937b
$ python manage/generate_su2.py
Operator: H
Ancestors: ['H']
Operator: T
Ancestors: ['T']
Operator: Td
Ancestors: ['Td']
BASIS H2
('f', (1, 2)) => [[ 0.+0.j 1.+0.j]
[ 1.+0.j 0.+0.j]]
@cryptogoth
cryptogoth / EthereumNodeGCP.md
Created Oct 22, 2017
How to Run an Ethereum (Geth Light) Node on GCP
View EthereumNodeGCP.md

How to Run an Ethereum Node in GCP

The first step to setting up an Ethereum development environment is running a node. Public nodes run by MyEtherWallet and Augur are great public services. However, you cannot always attach your private keys securely to such a node, and so you are limited to read-only interactions (reading contract variables, checking account balances). Moreover, you cannot always upload contracts reliably due to (Solidity) compiler incompatibilities.

You can’t perform that action at this time.