Skip to content

Instantly share code, notes, and snippets.

View coindegen's full-sized avatar

CoinDegen coindegen

View GitHub Profile
try {
const abi = [{"inputs":[{"internalType":"contract ComptrollerInterface","name":"comptroller_","type":"address"},{"internalType":"contract InterestRateModel","name":"interestRateModel_","type":"address"},{"internalType":"uint256","name":"initialExchangeRateMantissa_","type":"uint256"},{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"},{"internalType":"uint8","name":"decimals_","type":"uint8"},{"internalType":"address payable","name":"admin_","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"cashPrior","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"interestAccumulated","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"borrowIndex","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalBorrows","type":"uint256"}],"name":"AccrueInterest","type":"event"},{"anonymous":fa
@coindegen
coindegen / tokenDictionary.json
Last active July 17, 2021 02:03
Apple Finance token data
{
"0x44154e2de24f43700f7b7ca91085af13c481e001": {
"symbol": "aAPPLE",
"name": "Apple Wrapped APPLE",
"decimals": "8",
"underlying": "0xda8f20bf431d04a3661250f922d75e2bbe0b001c",
"exchangeRateStored": "103400641500358826504434038"
},
"0xda8f20bf431d04a3661250f922d75e2bbe0b001c": {
"symbol": "Apple",
@coindegen
coindegen / FLURKSToken.sol
Created November 27, 2021 01:29
Boilerplate code for FLURKS token
// contracts/FLURKS.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/presets/ERC20PresetMinterPauser.sol";
contract FLURKSToken is ERC20PresetMinterPauser {
constructor() ERC20PresetMinterPauser("Flurks", "FLURKS") {
_mint(msg.sender, 22000000);
}
@coindegen
coindegen / bybit.js
Last active December 8, 2021 05:30
script.js
We couldn’t find that file to show.
@coindegen
coindegen / bybit.js
Created December 8, 2021 05:31
bybit.js
const { WebsocketClient } = require("bybit-api")
const API_KEY = "key goes here"
const PRIVATE_KEY = "replace me"
const wsConfig = {
key: API_KEY,
secret: PRIVATE_KEY,
/*
// File: @openzeppelin/contracts/utils/Context.sol
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
{
"makeAsset": {
"assetType": {
"assetClass": "ERC20",
"contract": "0x4ed7c70F96B99c776995fB64377f0d4aB3B0e1C1"
},
"value": "5000"
},
"maker": "0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC",
"takeAsset": {
[
{
"name": "Capsule Machine NFT #171",
"description": "The most ambitious crossover event in art history.",
"image": "ipfs://NewUriToReplace/171.png",
"tokenId": 4187,
"artist": "Fresherluke",
"master_collection": "Capsule Machine NFT",
"slave_collection": "Skull-King",
"external_url": "https://www.capsulemachinenft.com/",
@coindegen
coindegen / provenance.js
Created January 29, 2022 12:37
provenance hash
const keccak256 = require("keccak256");
const fs = require("fs");
const chalk = require("chalk");
const path = require("path");
const isLocal = typeof process.pkg === "undefined";
const basePath = isLocal ? process.cwd() : path.dirname(process.execPath);
console.log({ basePath });
const { buildDir } = require(path.join(basePath, "/src/config.js"));
// Read files from the build folder defined in config.
@coindegen
coindegen / keybase.md
Created January 31, 2022 05:19
keybase.md

Keybase proof

I hereby claim:

  • I am coindegen on github.
  • I am coindegen (https://keybase.io/coindegen) on keybase.
  • I have a public key ASC0JUIqZJkWX2nT2_uH9VrBGjLlMQm-azHK0Ca_mlZllQo

To claim this, I am signing this object: