Skip to content

Instantly share code, notes, and snippets.

View RaveenaBhasin's full-sized avatar

Raveena Bhasin RaveenaBhasin

View GitHub Profile
const fetch = require("node-fetch");
const query = `
query {
uniBorrows {
id
token0
token1
borrowToken0
borrowToken1
const { ethers } = require('ethers')
const JSBI = require('jsbi') // [email protected]
const { abi: IUniswapV3PoolABI } = require("@uniswap/v3-core/artifacts/contracts/interfaces/IUniswapV3Pool.sol/IUniswapV3Pool.json");
const { TickMath, FullMath } = require('@uniswap/v3-sdk')
const provider = new ethers.providers.JsonRpcProvider("https://polygon-mainnet.g.alchemy.com/v2/r3cZm-2lbZVdM8W6_o3vr3OTuUafTKIv");
const POOLS = [
{
@RaveenaBhasin
RaveenaBhasin / getPrice.js
Created March 13, 2023 02:04
Get token spot price
const { ethers } = require("ethers");
const { abi: IUniswapV3PoolABI } = require("@uniswap/v3-core/artifacts/contracts/interfaces/IUniswapV3Pool.sol/IUniswapV3Pool.json");
const { abi: QuoterABI } = require("@uniswap/v3-periphery/artifacts/contracts/lens/Quoter.sol/Quoter.json");
const { getPoolImmutables } = require('./helpers')
const abi1 = require('./abi1')
const abi2 = require('./abi2')
require('dotenv').config()
const INFURA_URL_MAINNET = process.env.INFURA_URL_MAINNET
@RaveenaBhasin
RaveenaBhasin / README.md
Created May 12, 2021 14:30 — forked from dims/README.md
Kubernetes Resources