Skip to content

Instantly share code, notes, and snippets.

View ice09's full-sized avatar

Alexander C. ice09

View GitHub Profile
@ice09
ice09 / xDaiComp.md
Last active February 1, 2021 07:02
xDaiComp

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.

Intention

// 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
ice09 / BinaryTreePrinter.java
Last active October 11, 2020 14:27
MerkleTree Implementation with very simple testing, implements proofPath creation and proofPath validation. Is heavily influenced by https://github.com/SimoneStefani/merkle-tree-java.
package tech.blockchainers.crypyapi.http.common;
import org.web3j.utils.Numeric;
import java.io.PrintStream;
// taken from https://github.com/eugenp/tutorials/blob/master/data-structures/src/main/java/com/baeldung/printbinarytree/BinaryTreePrinter.java
public class BinaryTreePrinter {
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 https://3Box.io/
@ice09
ice09 / ECRecover.java
Last active May 22, 2022 09:18
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() {
//0x627306090abaB3A6e1400e9345bC60c78a8BEf57
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
ice09 / extra-accounts.json
Created May 22, 2018 18:39
Cliquebait, start Geth private network in docker with customizable extra accounts (to sync eg. with Rinkeby without changing app code)
[
{
"password":"123654789",
"keystore": {
"address":"627306090abab3a6e1400e9345bc60c78a8bef57",
"crypto":{
"cipher":"aes-128-ctr",
"ciphertext":"9e1d0c1693db4b0b6a3d0ee8a81ea21e20dc5fa894437144e0b6e72748f2165b",
"cipherparams":{
"iv":"b0da55dd00ecc9f5d161f66b67394ed5"
@ice09
ice09 / uRaiden.java
Last active January 14, 2021 13:45
uRaiden balance proof with web3j
private void pkDisplay(Web3j web3j) throws Exception {
String privateKey1 = "1587352d059682a7ebb86e4aecc86f73cf418d33f9af4178ce344a3dd41a813b";
Credentials credentials = Credentials.create(privateKey1);
log.info("Address: " + credentials.getAddress());
List<String> labels = Arrays.asList(
"string message_id",
"address receiver",
"uint32 block_created",
"uint192 balance",
@ice09
ice09 / addr.eth
Last active October 6, 2017 12:14
0xDbdCDb5972E88E5273E46290C0D6bb3a96c23628
@ice09
ice09 / token.sol
Created September 14, 2017 10:18
just the standard token contract
pragma solidity ^0.4.13;
contract tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData); }
contract MyToken {
/* Public variables of the token */
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;

Keybase proof

I hereby claim:

  • I am ice09 on github.
  • I am ice09 (https://keybase.io/ice09) on keybase.
  • I have a public key whose fingerprint is 0A36 A906 2F16 5F34 4B61 3D96 95E0 239D 9AD5 3D71

To claim this, I am signing this object: