Skip to content

Instantly share code, notes, and snippets.

View ethereumdegen's full-sized avatar

Ethereumdegen ethereumdegen

View GitHub Profile
/**
*Submitted for verification at Etherscan.io on 2021-09-17
*/
pragma solidity ^0.8.0;
/**
NFT BlockStore
@ethereumdegen
ethereumdegen / gist:9ee08d7444baae76cf6948e7112834a7
Created February 16, 2023 18:24
0xBitcoin Stats NFT Updated
/**
*Submitted for verification at Etherscan.io on 2021-10-05
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC165 standard, as defined in the
@ethereumdegen
ethereumdegen / mongoquerybuilder.ts
Created October 19, 2022 22:22
Mongo Query Builder .ts
/*
This is very dank
const queryDefinitions:QueryDefinition[] = [
{type: QueryType.AND , subDefinitions: [
{type:QueryType.EXISTS, exists:true, rootProp:'submitBidArgs.borrower' },
{type:QueryType.EXISTS, exists:false, rootProp:'submitBidArgs.lender' },
@ethereumdegen
ethereumdegen / TransactionManager.ts
Created April 26, 2022 19:51
Library for sending a raw transaction using Ethers
import { Provider, TransactionRequest } from "@ethersproject/providers"
import { BigNumberish, Contract, utils, Wallet } from "ethers"
export default class TransactionManager {
provider:Provider
constructor(public contractInstance:Contract, public serverConfig: any){
this.provider = contractInstance.provider
@ethereumdegen
ethereumdegen / EIP712Helper.ts
Created April 25, 2022 19:20
EIP712Helper.ts
//const ethUtil = require('ethereumjs-util');
//const abi = require('ethereumjs-abi');
//const web3utils = require('web3').utils
import { keccak } from 'ethereumjs-util'
import abi from 'ethereumjs-abi'
//import web3utils from 'web3utils'
export default class EIP712Helper {
@ethereumdegen
ethereumdegen / SingletonLoopMethod.js
Last active March 5, 2022 04:23
A wrapper for a looping method such that the execution code will only be running in a single instance at any given time
/*
Singleton Loop Method
Instantiate this class with a Promise(method) and an array of args
Call the start() method on the instance in order to continuously call the method in a loop. If an instance of the method is currently executing, it will not execute another time -- it will skip.
In this way, the execution code will only be running in a single instance at any given time. However, the code will loop forever until stop() is called
pragma solidity ^0.8.0;
// ----------------------------------------------------------------------------
// 'Banana Token' contract
@ethereumdegen
ethereumdegen / ToadzDataLeech.js
Last active November 18, 2021 17:27
download the images and traits data for toadz from opensea
import axios from 'axios'
import fs from 'fs'
import path from 'path'
let fetchConfig = {
"collectionName":"cryptoadz-by-gremplin",
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
[
"0x23c3d14d6a799f8c27a0861c124da01a494a8e32",
"0x3dd55914bbab532bc0f797201a77b786f1f6fde8",
"0x458De35E5bC76802862DA179767f48425944AaeB",
"0x548242dcb854ed38e5fc2e1d34d3306fd417ef7f",
"0x55dd9b279dd99a95d763f9f5558abd5c9e9096c2",
"0x6445661084dfeec1d5367a6891f9e0eed72e5a40",
"0x6853ad2e16ad14afe305a4d70a89e3808c7edfbf",
"0x77726c5a3dff708356aa355488b69eebd8490453",