Skip to content

Instantly share code, notes, and snippets.

@gititGoro
gititGoro / BuyPressure.sol
Last active December 31, 2020 03:33
Rock3t eth fee buy pressure
pragma solidity 0.7.1;
abstract contract ERC20 {
function balanceOf(address holder) external virtual returns (uint);
}
/**
* Smart contract library of mathematical functions operating with IEEE 754
* quadruple-precision binary floating-point numbers (quadruple precision
* numbers). As long as quadruple precision numbers are 16-bytes long, they are
@gititGoro
gititGoro / Rock3tPermanentLPLockPercentage.sol
Last active December 31, 2020 03:36
using ABDK's quad precision floating point library for solidity to calculate the Lock percentage for Rock3t. Alpha assumed at 1 to save gas.
pragma solidity 0.7.1;
abstract contract UniswapV2Router02 {
address public WETH;
function quote(uint amountA, uint reserveA, uint reserveB) public virtual pure returns (uint);
}
abstract contract TokenPair {
function getReserves() public virtual view returns (uint,uint, uint32);
Verifying my identity on Peepeth.com 0xe5d09257d0b83e0d2d09960c46985c153a63d15a
@gititGoro
gititGoro / MinimumViableUlex.sol
Created August 17, 2018 14:18
a simple implementation of the Ulex dispute resolution mechanism.
//TODO: a hash of an offchain secret verdict for each judge in case proof is required that the verdict is unanimous
//TODO: an appeals round mechanism
//TODO: a contract for remedies instead of simple eth payments.
pragma solidity ^0.4.18;
contract Judges {
mapping(address=>bool) judges;
function addJudge(address judge) public {
judges[judge]=true;
0x00 0 STOP
0x01 3 ADD
0x02 5 MUL
0x03 3 SUB
0x04 5 DIV
0x05 5 SDIV
0x06 5 MOD
0x07 5 SMOD
0x08 8 ADDMOD
0x09 8 MULMOD
@gititGoro
gititGoro / Recipe.md
Last active September 15, 2023 07:32
Environmental setup for Ethereum Dev as of 14 June 2017

Setting up a private ethereum blockchain for development and pointing your wallet at it

Ethereum tutorials all advise downloading the Mist wallet and beginning dev. The only problem is that the testnet and real blockchain are huge and take hours to download. What follows is a recipe for quickly setting up a small blockchain and pre-mining it with some test ethereum

The following is done in Linux but will work in MacOS and should have equivalent command line options in Windows. Where I don't give detailed instructions, it's because a quick google search will fill in the blanks.

Install geth https://github.com/ethereum/go-ethereum/wiki/geth

install Mist https://github.com/ethereum/mist/releases

@gititGoro
gititGoro / index.html
Last active March 19, 2017 14:53
A simple time based animation using RX.js and Jquery. Everything is a stream
<html>
<head>
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>
<body>
<div class="container">
<div id="planeQueueContainer">
</div>