Skip to content

Instantly share code, notes, and snippets.

Variable appeal period to avoid unnecessary waiting time on crowdfunding.

Removing ruling options from a dispute, useful for disputes with more than two parties.

Let parties to agree on draw.

Different quorum options for arbitration, instead of only majority.

It's not fair for jurors or crowdfunders when new evidence if submitted to the case. This should be addresses in some way.

@eccentricexit
eccentricexit / KPNK.md
Created August 8, 2019 12:58
KPNK Print guide

For anyone who needs Kovan PNK:

  1. You need the shared wallet imported on metamask.
  2. Go to the PNK contract here: https://kovan.etherscan.io/address/0x1ee318dbc19267dbce08f54a66ab198f73ede356#writeContract
  3. Call the generateTokens function with the address that will be blessed with PNK as the _owner and the amount of tokens you want * 10^18 as _amount
  4. Once metamask pops up, you will notice it predicts that the transaction will fail. That's ok. Click on the Data tab and copy the hex code. It looks similar to this: 0x827f32c00000000000000000000000007cfa255496a7631f5750f6bd94223e6b1759f23e0000000000000000000000000000000000000000000000000de0b6b3a7640000
  5. Go to KlerosLiquid: https://kovan.etherscan.io/address/0x60b2abfdfad9c0873242f59f2a8c32a3cc682f80#writeContract
  6. Call executeGovernorProposal with the parameters:
@Dexaran
Dexaran / ERC20_token_standard_vulnerability_classification.md
Last active June 22, 2024 22:51
ERC20 token standard vulnerability classification.

Previously described at: ERC20 critical problems medium article.

Description.

ERC20 is the most common Ethereum token standard. It should be noted that it is also the first Ethereum's token standard as well.

It is also important that the original ERC20 proposal is a definition of token interface. EIP20 does not define a reference implementation for this token standard. Here is OpenZeppelin implementation of ERC20 token: https://github.com/OpenZeppelin/zeppelin-solidity/tree/master/contracts/token/ERC20

ERC20 token standard implementation assumes two ways of token transferring: (1) transfer function and (2) approve + transferFrom pattern.

@msmfsd
msmfsd / es7-async-await.js
Last active February 4, 2024 17:38
Javascript fetch JSON with ES7 Async Await
// Async/Await requirements: Latest Chrome/FF browser or Babel: https://babeljs.io/docs/plugins/transform-async-to-generator/
// Fetch requirements: Latest Chrome/FF browser or Github fetch polyfill: https://github.com/github/fetch
// async function
async function fetchAsync () {
// await response of fetch call
let response = await fetch('https://api.github.com');
// only proceed once promise is resolved
let data = await response.json();
// only proceed once second promise is resolved
@jamiew
jamiew / tumblr-photo-ripper.rb
Created July 13, 2011 17:46
Download all the images from a Tumblr blog
# Usage:
# [sudo] gem install mechanize
# ruby tumblr-photo-ripper.rb
require 'rubygems'
require 'mechanize'
# Your Tumblr subdomain, e.g. "jamiew" for "jamiew.tumblr.com"
site = "doctorwho"