Skip to content

Instantly share code, notes, and snippets.

View rfikki's full-sized avatar

Rocky Fikki rfikki

View GitHub Profile
<html>
<head>
<script type="text/javascript" src="bignumber.min.js"></script>
<script type="text/javascript" src="ethereum.js"></script>
<script type="text/javascript">
var web3 = require('web3');
web3.setProvider(new web3.providers.HttpSyncProvider('http://localhost:8080'));
@rfikki
rfikki / rinkeby-peers-latest.txt
Last active December 9, 2020 04:21
Updated DEC/08/2020 - IMPORTANT RUN THE LATEST RELEASE OF THE CLIENT - https://geth.ethereum.org/downloads/
admin.addPeer("enode://343149e4feefa15d882d9fe4ac7d88f885bd05ebb735e547f12e12080a9fa07c8014ca6fd7f373123488102fe5e34111f8509cf0b7de3f5b44339c9f25e87cb8@52.3.158.184:30303");
admin.addPeer("enode://3338fd63203ca8f079c79c3fc5bcdaa9ee8ad8f64a48ddfb0022b77f623768eb08e82576fc1c8356a0f588ad9162989704d16e9fc0e6f0bd9feb8f7e80ed1b5f@5.189.149.113:35555");
Generate state:
bazel run //tools/genesis-state-gen --define=ssz=mainnet -- \
--num-validators=64 \
--output-ssz=/tmp/genesis.ssz \
--mainnet-config
BN1:
bazel run //beacon-chain --define ssz=mainnet -- \
--http-web3provider \
pragma solidity ^0.4.0;
import './SafeMath.sol';
/**
* Here is an example of upgradable contract, consisting of three parts:
* - Data contract keeps the resources (data) and is controlled by the Handler contract;
* - Handler contract (implements Handler interface) defines operations and provides services. This contract can be upgraded;
* - Upgrader contract (optional) deals with the voting mechanism and upgrades the Handler contract. The voters are pre-defined
* by the contract owner.
admin.getPeers(function(e,r){r.forEach(function(i){console.log('admin.addPeer("enode://'+i.id+'@'+i.network.remoteAddress + '");')})})
Rocky@ASUS MINGW64 /c/projects/truffle-3
$ mkdir truffle-init-webpack
Rocky@ASUS MINGW64 /c/projects/truffle-3
$ cd truffle-init-webpack
Rocky@ASUS MINGW64 /c/projects/truffle-3/truffle-init-webpack
$ truffle init webpack
Downloading project...
Installing dependencies...
{
"config": {
"chainId": 64789054323,
"homesteadBlock":0,
"eip150Block":0,
"eip155Block":10,
"eip158Block":10,
"eip160Block":10
},
"nonce": "0x0000000000000042",
pragma solidity ^0.4.0;
contract AbstractENS {
function owner(bytes32 node) constant returns(address);
function resolver(bytes32 node) constant returns(address);
function ttl(bytes32 node) constant returns(uint64);
function setOwner(bytes32 node, address owner);
function setSubnodeOwner(bytes32 node, bytes32 label, address owner);
function setResolver(bytes32 node, address resolver);
function setTTL(bytes32 node, uint64 ttl);
function namehash(name) {
var node = '0x0000000000000000000000000000000000000000000000000000000000000000';
if(name != '') {
var labels = name.split(".");
for(var i = labels.length - 1; i >= 0; i--) {
node = web3.sha3(node + web3.sha3(labels[i]).slice(2), {encoding: 'hex'});
}
}
return node.toString();
}
Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. All rights reserved.
C:\Windows\System32>cd c:\projects\cakeshop
c:\projects\cakeshop>java -jar cakeshop.war
Defaulting to spring profile: local
Extracting geth to C:\projects\cakeshop\data\geth
INFO 2016-12-20 21:01:59,467 [main] (StartupInfoLogger.java:48 ) Starting SpringBootApplication on ASUS with PID 9244 (started by Rocky in c:\projects\cakeshop)
INFO 2016-12-20 21:01:59,469 [main] (SpringApplication.java:670) The following profiles are active: container,spring-boot,local