Skip to content

Instantly share code, notes, and snippets.

// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.6.12;
pragma experimental ABIEncoderV2;
import "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol";
import "./external/compound/Comptroller.sol";
import "./external/compound/PriceOracle.sol";
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.6.12;
pragma experimental ABIEncoderV2;
import "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol";
import "./external/compound/Comptroller.sol";
import "./external/compound/PriceOracle.sol";
import { BigNumber, Contract } from "ethers";
import { ConvexPool, pools } from "./convexpools";
import { formatEther, formatUnits } from "ethers/lib/utils";
import BaseRewardPoolABI from "./abis/convex/BaseRewardPool.json";
import SwapABI from "./abis/convex/Swap.json";
import DepositTokenABI from "./abis/convex/DepositToken.json";
export async function convexAPR(poolName: string, provider: any) {
return await convexAPRWithPrice(poolName, -1, -1, provider);
import { BigNumber, Contract } from "ethers";
import { ConvexPool, pools } from "./convexpools";
import { formatUnits } from "ethers/lib/utils";
import BaseRewardPoolABI from "./abis/convex/BaseRewardPool.json";
import SwapABI from "./abis/convex/Swap.json";
import DepositTokenABI from "./abis/convex/DepositToken.json";
export async function convexAPR(poolName: string, provider: any) {
return await convexAPRWithPrice(poolName, -1, -1, provider);
@sharad-s
sharad-s / FusePoolLensSecondary.sol
Created October 8, 2021 17:03
FusePoolLensSecondary.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.6.12;
pragma experimental ABIEncoderV2;
import "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol";
import "./external/compound/Comptroller.sol";
import "./external/compound/PriceOracle.sol";
@sharad-s
sharad-s / FusePoolLens.sol
Created July 21, 2021 01:03
FusePoolLens.sol
// SPDX-License-Identifier: UNLICENSED
// !! THIS FILE WAS AUTOGENERATED BY abi-to-sol. SEE BELOW FOR SOURCE. !!
pragma solidity >=0.5.0 <0.9.0;
pragma experimental ABIEncoderV2;
struct FusePoolDirectory_FusePool {
string name;
address creator;
address comptroller;
uint256 blockPosted;
@sharad-s
sharad-s / buttered-chakra.tsx
Created May 27, 2021 03:44
buttered-chakra.tsx
import React, { useState, useEffect } from "react";
import { Flex, FlexProps } from "@chakra-ui/react";
/* Typings */
export type MainAxisAlignmentStrings =
| "space-between"
| "space-around"
| "flex-start"
| "center"
// Components
import ProfilePage from 'components/Pages/Profile'
import Head from 'next/head'
import { getUserByHandle } from "utils/api/user"
const Profile = ({ user }) => {
console.log({user})
return (
<>
alias cdd="cd ~/Documents"
alias cddesktop="cd ~/Desktop"
# Git
alias clone="git clone"
alias pull="git pull"
alias push="git push"
alias commit="git commit -m"
alias fetchall="git fetch --all"
@sharad-s
sharad-s / VeritokenSTOABI.json
Created April 5, 2019 13:02
Veritoken STO Contract ABI
[
{
"constant": true,
"inputs": [],
"name": "rate",
"outputs": [
{
"name": "",
"type": "uint256"
}