Skip to content

Instantly share code, notes, and snippets.

Fabian Vogelsteller frozeman

Block or report user

Report or block frozeman

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 test.js
Refundable ICO
Test 1
allocation phase
--------
blockNumber: 0
Current Flow: 0.1
investorETH: 100
projectETH: 0
available for project: 0
ETH in RICO: 100
@frozeman
frozeman / rico.md
Last active Jan 3, 2019
Reversible ICO - RICO
View rico.md

Reversible ICO

To increase fairness and responsibility in the ICO space, we propose a new model for an ICO, which we call a ”Reversible ICO” (RICO). This type of ICO improves the power balance between coin buyer and project by flowing funds slowly to the project and allowing coin buyers to withdraw their funds at any point in time.

The ERC 20 Token Standard [Fab] spurred a new era of projects that run ICOs on th Ethereum Blockchain. This is mainly due to the flexibility of a smart contract interface standard, meaning it only defines how to interact with it, but not how it should internally work. This flexibility allows ERC 20 tokens to be used in all kind of smart contract based protocol, and be issued by other smart contracts, like an ICO smart contract.

Current ICOs deploy a smart contract that receives ETH and return tokens (cryptocurrencies, assets, utility tokens, protocol tokens, access tokens, etc.) based on a set ratio. This ratio is sometimes changing over time while the ICO is running, and ma

@frozeman
frozeman / whisper-api-test.js
Created Jun 27, 2017
Whisper web3.js 1.0 api test
View whisper-api-test.js
var net = require('net');
var Web3 = require('./src/index.js'); var web3 = new Web3(new Web3.providers.IpcProvider('/Users/frozeman/Library/Ethereum/geth.ipc', net));
var shh = web3.shh;
var identities = [];
var subscription = null;
Promise.all([
shh.newSymKey().then((id) => {identities.push(id);}),
shh.newKeyPair().then((id) => {identities.push(id);})
@frozeman
frozeman / chat.js
Created Jun 19, 2017 — forked from bas-vk/chat.js
whisper chat demo
View chat.js
var chat = {
username: "<not set>",
topic: "0xfeedbabe",
key: "",
identity: "",
pollInterval: null,
filter: null,
setUsername: function(name) {
this.username = name;
@frozeman
frozeman / rpc-test.js
Last active Jan 18, 2018
Test RPC in node.js
View rpc-test.js
/*
- $ geth --shh
- install node.js and npm
- $ mkdir testFolder
- $ npm install oboe
- $ node
- copy the code below
- exceute: send('eth_blockNumber', []);
*/
@frozeman
frozeman / whisper-api-v5.md
Last active May 17, 2017
Whisper API spec
View whisper-api-v5.md

Whisper API 5.0

This is the proposed API for whisper v5.

Specs

shh_version

Returns the current semver version number.

@frozeman
frozeman / mistfeatures.md
Created May 8, 2017
Mist Low Level Features
View mistfeatures.md
  • swarm integration
  • secure webviews
  • Mist UI
  • starting of nodes, switching networks etc
  • IPC proxy to the node
  • accounts/dapp permissions
  • preloader logic to inject stuff
  • node updatelogic
  • mist update logic
  • onboarding screen
@frozeman
frozeman / ercevocer.js
Created Apr 28, 2017 — forked from bas-vk/ercevocer.js
Use solidity ecrecover with signature calculated with eth_sign
View ercevocer.js
// Change accountToSignWith to the address of your account.
var Web3 = require('web3');
var web3 = new Web3();
web3.setProvider(new web3.providers.HttpProvider('http://localhost:8545'));
var accountToSignWith = '0xbedcf417ff2752d996d2ade98b97a6f0bef4beb9';
var message = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Tubulum fuisse, qua illum, cuius is condemnatus est rogatione, P. Eaedem res maneant alio modo.'
@frozeman
frozeman / ENSresolving.md
Created Mar 6, 2017
ENS resolving in Mist
View ENSresolving.md
  • eth://inigomontoya.eth -> calls resolver.addr() -> shows account page with balance or something
  • http://inigomontoya.eth -> calls resolver.a() -> will resolve a normal DNS ip
  • bzz://inigomontoya.eth -> calls resolver.multiHash() -> will resoslve using swarm
  • ipfs://inigomontoya.eth -> calls resolver.multiHash() -> will resoslve using ipfs
  • inigomontoya.eth -> will default to swarm and calls resolver.multiHash() -> will resoslve using swarm
View upgradeable.sol
/**
* Base contract that all upgradeable contracts should use.
*
* Contracts implementing this interface are all called using delegatecall from
* a dispatcher. As a result, the _sizes and _dest variables are shared with the
* dispatcher contract, which allows the called contract to update these at will.
*
* _sizes is a map of function signatures to return value sizes. Due to EVM
* limitations, these need to be populated by the target contract, so the
* dispatcher knows how many bytes of data to return from called functions.
You can’t perform that action at this time.