Skip to content

Instantly share code, notes, and snippets.

View danfinlay's full-sized avatar

Dan Finlay danfinlay

View GitHub Profile
@danfinlay
danfinlay / truffle-metamask.md
Last active April 6, 2024 04:32
Developing Ethereum Dapps with Truffle and Metamask

Truffle and Metamask If you're interested in building web apps with the Ethereum blockchain, you may have found the Truffle web framework to be a nice fit for your needs.

For many types of Dapps (Distributed Apps), Truffle does everything you could want: It compiles your blockchain contracts, injects them into your web app, and can even run a test suite against them!

This is all great for you, but what about your users? Truffle has some great defaults for users who are willing to run a local Ethereum JSON RPC server on their computer, but what about your users who just want to sign on and get started?

With Metamask, all your users need to do is install our Chrome plugin, and they will have their own secure blockchain accounts right there in the conven

@danfinlay
danfinlay / How to download streaming video.md
Last active March 23, 2024 03:32
How to download a streaming video with Google Chrome

How to download streaming video

Streaming just means a download that they don't want you to keep. But Chrome's developer tools make it easy to access what's really going on under the hood.

Open Developer Tools

From the page where you want to download some things, go into your chrome menu to open the developer tools. You can either:

1.  (On a mac): Command-option-J
2. (On a PC): Control-alt-J
@danfinlay
danfinlay / collateral-cash.md
Last active September 29, 2023 15:43
A code-free introduction to a blockchain-minimized digital social collateral system.

CounterFactual Social Collateral Cash

A code-free introduction to a blockchain-minimized digital social collateral system.

Imagine a situation where Alice has an account with $100 in it. This is a special kind of account that allows her to give out special spending limit codes to her friends which allow them to in turn to give out their own spending-limit codes.

For example, imagine this set of signed messages:

  • “Bob may withdraw up to $100 from my account” - Alice, signed 5/8/2018
  • “Carol may withdraw up to $50 of my allowance from Alice” - Bob, signed 7/6/2018 (includes reference to previous Alice message)
@danfinlay
danfinlay / event-resources.md
Created June 16, 2023 15:37
Here are some resources you can use when listing me on your event page

Dan Finlay Event Resources

Here are some resources you can use when listing me on your event page:

Avatar

avatar

Bio

@danfinlay
danfinlay / sociology-101.md
Last active August 30, 2022 12:44
Sociology 101 by Holly Wood

Sociology 101

A list of books recommended by Holly Wood

Other

@danfinlay
danfinlay / an-address.txt
Created April 25, 2017 21:34
rinkeby faucet gist
0xF61807b9488374c44a8fE022273855B5fA7E61f3
@danfinlay
danfinlay / capped_wisps.md
Last active April 13, 2020 21:04
Capped Wisp Account
  • Goal:
    • An [[Ethereum]] smart account architecture composed from a very small and simple pattern of flexible delegation with maximally off-chain, low-state contracts.
  • Axioms / Dependencies / Prior Art / Prerequisites & Tools
    • [[gnosis-safe style module]]s
      • Each module can call any function on the parent contract.
    • [[create2]] deterministic addressing
      • Account can delegate to unpublished contracts.
    • [[Will-o-wisps]]
  • Stateless delegations can clean themselves up, leaving no state-bloat on-chain.
@danfinlay
danfinlay / eth_raw_sign.md
Created March 9, 2020 19:17
Low level signing method roadmap
  • low-level signing method
    • Things that need to be done
      • Consider this kind of raw signing from security. Ask [[Christian Lundkvist]]
      • Consider drafting an EIP for this, so it can get broader security consideration.
    • Code that would need to be changed
  • MetaMask Controller
@danfinlay
danfinlay / map-func-identity.js
Created November 21, 2019 19:40
Proof that JavaScript maps index functions by identity, not source string.
const funcString = '() => "foo"';
const funcA = new Function(funcString);
const funcB = new Function(funcString);
const map = new Map();
map.set(funcA, 'a');
map.set(funcB, 'b');
const aVal = map.get(funcA);
console.log(aVal === 'a');
did:muport:QmRirsVfbq9KhAYjrTeWKBcEyTaJ6LLtjLBQkJX2cGwjQo