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 / token.md
Last active Apr 24, 2019
Token proposal
View token.md
@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 / mistweb3.js
Last active Dec 9, 2018
Mist web3 loading proposal
View mistweb3.js
/*
Basically "web3" comes from Mist,
but "Web3" CAN come from the dapp.
A Dapp has 3 ways to use web3.
2. and 3. would work when in Mist and outside.
*/
// 1. simply use, web3 comes already defined
@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
@frozeman
frozeman / createContract.js
Last active Sep 5, 2018
Deploy contracts on Ethereum and reliable get the contract address
View createContract.js
// -> Soldity
// **********
// Your Soldity contract
event Created(bytes32 indexed identifier);
contract MyContract {
function MyContract(bytes32 identifier) {
Created(identifier);
}
View gist:b3f016de58b04c99cfc3
var page = new WebPage(), testindex = 0, loadInProgress = false;
page.onConsoleMessage = function(msg) {
console.log(msg);
};
page.onLoadStarted = function() {
loadInProgress = true;
console.log("load started");
};
@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 / MyToken.js
Last active Mar 9, 2018
MyToken solidity contract
View MyToken.js
/*
This creates a public tradeable fungible token in the Ethereum Blockchain.
https://github.com/ethereum/wiki/wiki/Standardized_Contract_APIs
Unmodified this will create a cryptoasset with a fixed market cap
wholly owned by the contract creator. You can create any function
to change this contract, like allowing specific rules for the issuance,
destruction and freezing of any assets. This contract is intended for
educational purposes, you are fully responsible for compliance with
present or future regulations of finance, communications and the
@frozeman
frozeman / web3changes.md
Last active Mar 3, 2018
web3.js API changes
View web3changes.md

TODO: update web3.js examples ?

  • uses BN instead of BigNumber
  • added websockets and new events for these providers (web3.currentProvider.on 'connect', 'end', 'error', 'timeout')
  • changed web3.eth.sendRawTransaction -> web3.eth.sendSignedTransaction
  • added web3.eth.subscription
    • web3.eth.subscription('logs', {address: '0x12', topics: [], fromBlock: ''}) allows only fromBlock, use web3.eth.getPastLogs for a specifc range of past blocks.
    • subscriptions return events like:
      • for "logs": "error", "log", "deleted/reverted"
      • for syncing: "error", "started", "processing", "ended"
You can’t perform that action at this time.