Skip to content

Instantly share code, notes, and snippets.

//constants
let cliffSize = 175000 * 1e6;
let cliffCount = 20;
let maxSupply = 35000000 * 1e6;
function mintRCT(uint128 rctTotalSupply, uint128 astroCollected) {
//get current cliff
let currentCliff = Math.floor(y / cliffSize);
//if current cliff is under the max
@dyzz
dyzz / etherscanContractDownloader.js
Last active January 31, 2022 03:49
batch download etherscan verified contracts
// ==UserScript==
// @name Etherscan Contract Downloader
// @namespace http://tampermonkey.net/
// @version 0.1.1
// @description batch download etherscan verified contract
// @author jason@trillion.fi
// @match https://etherscan.io/address/*
// @match https://ftmscan.com/address/*
// @match https://bscscan.com/address/*
// @match https://snowtrace.io/address/*

Keybase proof

I hereby claim:

  • I am dyzz on github.
  • I am naituida (https://keybase.io/naituida) on keybase.
  • I have a public key ASABWSvHdjr89SwGP9axaaVgL8-Pr52JKS9H3Wc4o0oSLQo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am dyzz on github.
  • I am naituida (https://keybase.io/naituida) on keybase.
  • I have a public key ASCOTUUjB4G_jPxkl7WJij4I1CJ7E9cdU1Uu-2hH11DOrQo

To claim this, I am signing this object:

@dyzz
dyzz / state.json
Created January 19, 2017 10:25
metamask state dump
{
"metamask": {
"isInitialized": true,
"isUnlocked": true,
"rpcTarget": "https://rawtestrpc.metamask.io/",
"identities": {
"0xe89bb07333b3d792c29c744511bbcfaee0ddd4b7": {
"address": "0xe89bb07333b3d792c29c744511bbcfaee0ddd4b7",
"name": "etheropt"
},
<html>
<head>
<!-- term.js released and distributed under the MIT License; Copyright (c) 2012-2013, Christopher Jeffrey (https://github.com/chjj/) -->
<script>(function(){var i=this,p=this.document;function h(){this._events=this._events||{}}h.prototype.addListener=function(y,z){this._events[y]=this._events[y]||[];this._events[y].push(z)};h.prototype.on=h.prototype.addListener;h.prototype.removeListener=function(z,A){if(!this._events[z]){return}var B=this._events[z],y=B.length;while(y--){if(B[y]===A||B[y].listener===A){B.splice(y,1);return}}};h.prototype.off=h.prototype.removeListener;h.prototype.removeAllListeners=function(y){if(this._events[y]){delete this._events[y]}};h.prototype.once=function(z,A){function y(){var B=Array.prototype.slice.call(arguments);this.removeListener(z,y);return A.apply(this,B)}y.listener=A;return this.on(z,y)};h.prototype.emit=function(B){if(!this._events[B]){return}var z=Array.prototype.slice.call(arguments,1),C=this._events[B],y=C.length,A=0;for(;A<y;A++){C[A].
@dyzz
dyzz / main.go
Last active August 29, 2015 14:25
Triangles
//Has 24 triangles
//[abc abg abh abi abj abk acj ack ade adf adg aef aeg afg agh agi ahi ajk bcg bdg bhj bik egh fgi]
package main
import (
"fmt"
"strings"
)