Skip to content

Instantly share code, notes, and snippets.

package main
import (
"github.com/syndtr/goleveldb/leveldb"
"fmt"
"encoding/binary"
"github.com/ethereum/go-ethereum/core/types"
"bytes"
"github.com/ethereum/go-ethereum/rlp"
)
package main
import (
"github.com/syndtr/goleveldb/leveldb"
"fmt"
"encoding/binary"
"github.com/ethereum/go-ethereum/core/types"
"bytes"
"github.com/ethereum/go-ethereum/rlp"
)
@vietlq
vietlq / test_v3_scrypt_aes_128_ctr_utc.json
Created October 14, 2017 13:01
VISCHub: Sample UTC JSON file for Ethereum Wallet
{
"version": 3,
"id": "f50f0234-d25c-42a9-8c2f-e777fafe5c2a",
"address": "389d46c0d5d20c8220ad236b5a25b348c67e3021",
"Crypto": {
"ciphertext": "7cc66b5740d2ce0942b5beef2a997f5d85a9ab0e10a166a9f31cc16372c72204",
"cipherparams": {
"iv": "d8acc1c0a3a18c61acc33ca05eeb19bf"
},
"cipher": "aes-128-ctr",
@vietlq
vietlq / rinkeby_01.txt
Created October 5, 2017 20:43
Ether for Rinkeby
0x827c4C5789957dfd8A6a90d904bef931CE1B8Fee
@vietlq
vietlq / Rinkeby.md
Created October 5, 2017 20:33 — forked from learner-long-life/Rinkeby.md
How to get on Rinkeby Testnet in less than 10 minutes

How to get on Rinkeby Testnet in less than 10 minutes

Following instructions from the excellent https://www.rinkeby.io/

Synchronizing a Full Node

A full node lets you access all state. There is a light node (state-on-demand) and wallet-only (no state) instructions as well,

@vietlq
vietlq / arduinoclock.cpp
Created August 23, 2017 18:51 — forked from Bravo555/arduinoclock.cpp
Arduino clock project
#include <Wire.h>
#include <TimeLib.h>
#include <DS1307RTC.h>
#include <LiquidCrystal_I2C.h>
int budzikGodzina = 7, budzikMinuta = 0;
LiquidCrystal_I2C lcd(0x27, 16, 2);
tmElements_t tm;
@vietlq
vietlq / 000_README.md
Last active August 8, 2017 08:00
Floats and Doubles for Dummies: Understanding Floating Points
@tomw1808
tomw1808 / send_transfer_call.sol
Last active December 6, 2018 08:46
This is an example of the difference between "address.send()", "address.call.value()()" and "address.transfer()" in Solidity. If you like this example, then checkout my courses I do on Udemy (https://vomtom.at/tag/course/)
pragma solidity ^0.4.13;
contract someContract {
mapping(address => uint) balances;
function deposit() payable {
balances[msg.sender] += msg.value;
}
@izqui
izqui / forwarder.sol
Last active October 21, 2021 04:24
Very cheap to deploy (66k gas) forwarder contracts that can clone any contract and still have their own storage
// Bytecode origin https://www.reddit.com/r/ethereum/comments/6ic49q/any_assembly_programmers_willing_to_write_a/dj5ceuw/
// Modified version of Vitalik's https://www.reddit.com/r/ethereum/comments/6c1jui/delegatecall_forwarders_how_to_save_5098_on/
// Credits to Jordi Baylina for this way of deploying contracts https://gist.github.com/jbaylina/e8ac19b8e7478fd10cf0363ad1a5a4b3
// Forwarder is slightly modified to only return 256 bytes (8 normal returns)
// Deployed Factory in Kovan: https://kovan.etherscan.io/address/0xaebc118657099e2110c90494f48b3d21329b23eb
// Example of a Forwarder deploy using the Factory: https://kovan.etherscan.io/tx/0xe995dd023c8336685cb819313d933ae8938009f9c8c0e1af6c57b8be06986957
// Just 66349 gas per contract
@nikhedonia
nikhedonia / EitherAsmAnalysis.cpp
Created May 16, 2017 11:39
analysing Assembly generated by Eithers
#include <type_traits>
template<class L>
struct Left {
L const value;
};
template<class R>
struct Right {
R const value;