Skip to content

Instantly share code, notes, and snippets.

View RFV's full-sized avatar

Riaan Francois Venter RFV

View GitHub Profile
@RFV
RFV / keybase.md
Created September 20, 2019 01:31

Keybase proof

I hereby claim:

  • I am rfv5s on github.
  • I am rfv5s (https://keybase.io/rfv5s) on keybase.
  • I have a public key ASBux7UqvC_kzxaHi4l7UEjx4Ha6THeVtWZTBHNze3fHPQo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am RFV5s on github.
  • I am rfv5s (https://keybase.io/rfv5s) on keybase.
  • I have a public key whose fingerprint is 65CF A092 8010 C5A0 F344 81BA A899 61BD 1F29 44EE

To claim this, I am signing this object:

@RFV
RFV / keybase.md
Created April 6, 2017 15:22
Keybase verification

Keybase proof

I hereby claim:

  • I am rfventer on github.
  • I am rfventer (https://keybase.io/rfventer) on keybase.
  • I have a public key ASDR2_UY_sgw_8ekmrNPi_yGxDHoZhALroDuVhTNcEevawo

To claim this, I am signing this object:

/**
* 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.
@RFV
RFV / gradient_move.css
Created February 18, 2017 14:13
background gradient for ICOFund
background: linear-gradient(254deg, #4747fb, #000000, #fb0202, #02fb02);
background-size: 800% 800%;
-webkit-animation: AnimationName 16s ease infinite;
-moz-animation: AnimationName 16s ease infinite;
animation: AnimationName 16s ease infinite;
@-webkit-keyframes AnimationName {
0%{background-position:0% 9%}
50%{background-position:100% 92%}
@RFV
RFV / 4clojure029.clj
Created February 18, 2017 01:27
4Clojure #29
#(apply str (re-seq #"[A-Z]" %))
@RFV
RFV / Pairing.sol
Created December 20, 2016 23:01
Pairing Library
pragma solidity ^0.4.0;
library Pairing {
struct G1Point {
uint X;
uint Y;
uint Z;
}
struct G2Point {
uint[2] X;
@RFV
RFV / Ballot.sol
Created December 20, 2016 22:46
Voting with delegation Smart Contract
/// @title Voting with delegation.
contract Ballot {
// This declares a new complex type which will
// be used for variables later.
// It will represent a single voter.
struct Voter {
uint weight; // weight is accumulated by delegation
bool voted; // if true, that person already voted
address delegate; // person delegated to
uint vote; // index of the voted proposal
@RFV
RFV / DoubleOrNothing.sol
Created December 20, 2016 22:36
Double or Nothing betting smart contract with Bitcoin
contract Alarm {
function deposit();
function scheduleCall(address contractAddress, bytes4 abiSignature, bytes32
dataHash, uint targetBlock, uint8 gracePeriod);
}
contract BitcoinBridge {
function queuePayment(bytes bitcoinAddress) returns(bool successful);
}
@RFV
RFV / Purchase.sol
Created December 20, 2016 22:25
Esrcow system for purching goods
// This contract can be used to hold money while an item is in transit
// during purchase.
// This protocol is a variation of a protocol by Oleg Andreev which is
// described at
// https://gatecoin.com/blog/2015/10/blockchain2-disrupting-disrutors/
//
// Assume Bob wants to buy an item worth x Ether from Alice.
// Alice creates this contract and and sends 2x Ether to the contract
// together with its creation transaction.
// If Bob does not react, Alice can get her money back.