Skip to content

Instantly share code, notes, and snippets.

View frozeman's full-sized avatar

Fabian Vogelsteller frozeman

View GitHub Profile
@frozeman
frozeman / mistfeatures.md
Created May 8, 2017 14:44
Mist Low Level Features
  • 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 April 28, 2017 12:48
Use solidity ecrecover with signature calculated with eth_sign
// 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 March 6, 2017 15:06
ENS resolving in Mist
  • 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
/**
* 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.
## Full changelog
- Client binary refactor - asking user for permission before updating Geth (#1383)
- **.gitignore:** add 'npm-debug.log' (#1310)
- **codeclimate:** add config (#1381)
- **codeclimate:** enable GPA rating (#1410)
- **codeclimate:** fix eslint configuration in progress (#1389)

Keybase proof

I hereby claim:

  • I am frozeman on github.
  • I am frozeman (https://keybase.io/frozeman) on keybase.
  • I have a public key whose fingerprint is 3452 1ABF 002E C4CF 9F51 BB5F E51E ADA7 7F1A 4124

To claim this, I am signing this object:

@frozeman
frozeman / bruteforce-presale.js
Last active March 28, 2017 05:41
Presale wallet file brute force tools. This is to help people who don't exactly remember their passwords
const spawn = require('child_process').spawn;
var bruteForce = function(path, pw, callback) {
var error = false;
// start import process
var nodeProcess = spawn(nodeBinary, ['wallet', 'import', path]);
nodeProcess.once('error',function(){
error = true;
@frozeman
frozeman / addressfixes.js
Last active September 4, 2022 01:04
Fixes the wallet links in the ethereum wallet
// Open the wallet console: Menu -> Develop -> Toggle console ...
// Run the following script
_.each(Wallets.find().fetch(), function(item){
if(item.address)
Wallets.update(item._id, {$set: {address: item.address.toLowerCase()}});
});
_.each(CustomContracts.find().fetch(), function(item){
if(item.address)
CustomContracts.update(item._id, {$set: {address: item.address.toLowerCase()}});
@frozeman
frozeman / contract.js
Last active February 17, 2016 17:13
New contract object
// un"addresses" contract object
var myContrac2 = new web3.eth.contract(abi)
myContrac2.address = '0x12345678...'; // add address later
// initiate with address
var myContrac = new web3.eth.contract(abi, address)
// deploy contract
eventemitter = new web3.eth.contract(abi).deploy(param1, {data: '0x23456'});
@frozeman
frozeman / web3changes.md
Last active April 15, 2020 18:28
web3.js API changes

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"