Skip to content

Instantly share code, notes, and snippets.

@harsh-98
harsh-98 / stat.json
Created October 4, 2022 08:04
Gas estimation stats
{
"ConvexBooster": {
"methods": [
"depositAll",
"deposit2",
"withdraw2",
"withdrawAll"
],
"stat": {
"CONVEX_BOOSTER": [
package main
import (
"context"
"encoding/json"
"fmt"
"net/http"
"os"
"github.com/Khan/genqlient/graphql"
%lang starknet
from starkware.cairo.common.math import (signed_div_rem, sqrt)
from starkware.cairo.common.cairo_builtins import HashBuiltin
const FP = 10 ** 12
const RANGE_CHECK_BOUND = 2 ** 64
const FRICTION = 40 * FP
@event
func increase_balance_called(
package main
import (
"github.com/Gearbox-protocol/sdk-go/artifacts/poolService"
"github.com/Gearbox-protocol/sdk-go/core"
"github.com/Gearbox-protocol/sdk-go/core/schemas"
"github.com/Gearbox-protocol/sdk-go/ethclient"
"github.com/Gearbox-protocol/sdk-go/log"
@harsh-98
harsh-98 / index.js
Created January 11, 2022 08:19
Trezor script to generate the private keys from seed.
const hdkey = require('hdkey')
const bip39 = require('bip39')
const ethUtil = require('ethereumjs-util')
const BigNumber = require('bignumber.js');
require('dotenv').config()
function hdwallet(){
let mnemonic , seed;
if (! process.env.MNEMONIC) {
mnemonic = bip39.generateMnemonic(); //generates string
} else {
@harsh-98
harsh-98 / staratlasSales.txt
Last active September 10, 2021 00:35
Star Atlas sale schedule
SaleTime in UTC symbol Type category rarity class AirDrop TotalSupply price name
------------------- -------- ----------- ---------- --------- -------------------------- --------- ------------- --------------------- -------------------------------
2021-04-25 03:30:00 DOI collectible 1 common poster 0 10561 [] Discovery of Iris
2021-05-02 03:30:00 HOSA collectible 2 uncommon poster 0 6633 [] The Heart of Star Atlas
2021-05-09 03:30:00 TCW collectible 3 uncommon poster 0 3104 [] The Convergence War
2021-05-16 03:30:00 LOST collectible 4 rare poster 0 928 [] Short Story of a Lost Astronaut
2021-05-23 03:30:00 LOVE
@harsh-98
harsh-98 / witnet-0.9.0-c0-ips.json
Created June 25, 2020 11:06
All ips in witnet 0.9.0-c
[
"52.166.178.145:21337",
"159.69.146.71:21339",
"159.69.146.71:21350",
"78.193.188.67:21337",
"64.225.123.29:21337",
"188.127.180.67:21345",
"159.69.146.71:21352",
"159.89.200.225:21337",
"207.180.219.48:21337",

RPC request

Getting pkh address

{"jsonrpc": "2.0","method": "getPkh", "id": "1"}

Getting utxo info

Replace <> with pkh address.

import socket
class MySocket:
def __init__(self, sock=None):
if sock is None:
self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
else:
self.sock = sock
def connect(self, host, port):
self.sock.connect((host, port))
def mysend(self, msg):

Keybase proof

I hereby claim:

  • I am harsh-98 on github.
  • I am harshjain (https://keybase.io/harshjain) on keybase.
  • I have a public key ASBEnB3JuGYyK2-cSjtFySXK--PpIqwXATtDhlIId8sN7wo

To claim this, I am signing this object: