Skip to content

Instantly share code, notes, and snippets.


Alexander C. ice09

View GitHub Profile
ice09 / circles.csv
Created Apr 25, 2021
Some CirclesUBI Numbers
View circles.csv
We can make this file beautiful and searchable if this error is corrected: It looks like row 3 should actually have 1 column, instead of 2. in line 2.
# Users with most outgoing trusts
# MATCH (tr:User)-[r:TRUSTS]->(te:User)
# RETURN tr AS Truster, COUNT(r)
ice09 / anyblock_analytics_sql.sql
Last active Apr 1, 2021 — forked from jugf/load_events_from_csv.cypher
Visualizing Trust: Trustgraphs of CirclesUBI in Neo4j
View anyblock_analytics_sql.sql
SELECT event.block_number, args->0->>'hex' as "from",
args->1->>'hex' as "to",
CAST(args->2->'num' AS NUMERIC) AS "value"
FROM event
WHERE event.address = '0x29b9a7fBb8995b2423a71cC17cf9810798F6C543'
AND event.event = 'Trust'
AND event.block_number > 12529458
order by event.block_number desc

Evaluating xDai Stable Chain for B2B Use Cases

The xDai Stable Chain is an Ethereum sidechain with a native stable coin and a bridge to the Ethereum Mainnet for the native currency xDai, which represents DAI on the Ethereum Mainnet.

A native stable coin is a distinctive feature for financial and other Enterprise use cases which could profit of decentralized aspects of Blockchains, but cannot accept the usage of a highly volatile native crypto currencies.

The xDai Stable Chain is very cheap in transaction fees and very fast, but lacks other important features of the Ethereum Mainnet. This post will try to give enough information to enable the reader to decide if the xDai Stable Chain can be of use for her prototype, PoC, MVP or even a working product.


View ICirclesToken.sol
// SPDX-License-Identifier: AGPL
pragma solidity ^0.7.0;
abstract contract ICirclesToken {
function look() virtual public view returns (uint256);
/// @notice receive a ubi payout
/// @dev this is the method to actually update storage with new token balance
function update() virtual public;
ice09 /
Last active Oct 11, 2020
MerkleTree Implementation with very simple testing, implements proofPath creation and proofPath validation. Is heavily influenced by
package tech.blockchainers.crypyapi.http.common;
import org.web3j.utils.Numeric;
// taken from
public class BinaryTreePrinter {
View gist:4e2568520e473ef878914f65c6c82fba
This post links my 3Box profile to my Github account! Web3 social profiles by 3Box.
✅ did:3:bafyreigdyuhhpczzveh5lf2gxqhys7gldhxh3qcscdremttjpdvdxl5i7i ✅
Create your profile today to start building social connection and trust online at
ice09 /
Last active Jul 19, 2021
Creates a signature from a private key, signs a message and ecrecover in Java. Hashes are equal to Solidity and recoverSigner works with values generated in Java in Solidity ECTools below. Uses web3j.
public class ECRecover {
private void pkDisplay() {
String privateKey1 = "c87509a1c067bbde78beb793e6fa76530b6382a4c0241e5e4a9ec0a0f44dc0d3";
Credentials credentials = Credentials.create(privateKey1);
System.out.println("pk:" + Numeric.toHexStringNoPrefix(credentials.getEcKeyPair().getPublicKey()));
String message = "now that's a text";
String label = "\u0019Ethereum Signed Message:\n"+ String.valueOf(message.getBytes().length) + message;
ice09 / extra-accounts.json
Created May 22, 2018
Cliquebait, start Geth private network in docker with customizable extra accounts (to sync eg. with Rinkeby without changing app code)
View extra-accounts.json
"keystore": {
ice09 /
Last active Jan 14, 2021
uRaiden balance proof with web3j
private void pkDisplay(Web3j web3j) throws Exception {
String privateKey1 = "1587352d059682a7ebb86e4aecc86f73cf418d33f9af4178ce344a3dd41a813b";
Credentials credentials = Credentials.create(privateKey1);"Address: " + credentials.getAddress());
List<String> labels = Arrays.asList(
"string message_id",
"address receiver",
"uint32 block_created",
"uint192 balance",
View addr.eth