Skip to content

Instantly share code, notes, and snippets.

@leon-do
leon-do / index.ts
Created March 9, 2025 03:35
Deploy Next.js app to Netlify via API
import { NetlifyAPI } from "netlify";
// https://app.netlify.com/user/applications#personal-access-tokens
const client = new NetlifyAPI("nfp_YGNVq");
async function main() {
// create empty site
const site = await client.createSite().catch((err) => console.log(err));
if (!site) return;
@leon-do
leon-do / swapApi.ts
Created January 27, 2025 18:49
OToken Swap API
import { ethers } from "ethers";
import "dotenv/config";
const QUOTER_CONTRACT_ADDRESS = "0x0880484412B5bAa18B3fa2904a500c08f0fE79D2";
// prettier-ignore
const QUOTER_ABI = [ { "inputs": [ { "internalType": "address", "name": "_factory", "type": "address" }, { "internalType": "address", "name": "_WETH9", "type": "address" } ], "stateMutability": "nonpayable", "type": "constructor" }, { "inputs": [], "name": "WETH9", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "factory", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "bytes", "name": "path", "type": "bytes" }, { "internalType": "uint256", "name": "amountIn", "type": "uint256" } ], "name": "quoteExactInput", "outputs": [ { "internalType": "uint256", "name": "amountOut", "type": "uint256" }, { "internalType": "uint160[]", "name": "sqrtPriceX96AfterList
@leon-do
leon-do / tokenList.json
Created January 10, 2025 15:45
Example Token List
{
"name": "Token List",
"timestamp": "2077-01-01T11:11:11.111Z",
"version": {
"major": 1,
"minor": 0,
"patch": 0
},
"tags": {
},
{
"name": "Token List",
"timestamp": "2077-01-01T11:11:11.111Z",
"version": {
"major": 1,
"minor": 0,
"patch": 0
},
"tags": {
"v3CoreFactoryAddress": "0xbe4C021F8fD2be76dBE9DA6a000221ac6893aA3d",
{
"name": "Token List",
"timestamp": "2077-01-01T11:11:11.111Z",
"version": {
"major": 1,
"minor": 0,
"patch": 0
},
"tags": {
"v3CoreFactoryAddress": "0x001281C9d8F134F0dD15EBFe4D1011800403a8f7",
@leon-do
leon-do / raspberry-gelato.json
Last active May 3, 2024 14:43
Raspberry Gelato Token List
{
"name": "Token List",
"timestamp": "2077-01-01T11:11:11.111Z",
"version": {
"major": 1,
"minor": 0,
"patch": 0
},
"tags": {},
"logoURI": "https://www.gelato.network/brand-assets/GEL_Token_Logos/GEL%20Token%20Logo.png",
@leon-do
leon-do / v2-tknA-tknB.json
Last active February 25, 2024 02:45
etc v2 test
{
"name": "EtcswapV2Test",
"logoURI": "https://raw.githubusercontent.com/etcswap/token-list/main/assets/ethereum-classic.svg",
"keywords": ["etcswap", "ethereum classic", "etc"],
"timestamp": "2024-01-13T00:00:00.000+00:00",
"tokens": [
{
"chainId": 61,
"address": "0x1953cab0E5bFa6D4a9BaD6E05fD46C1CC6527a5a",
"name": "Wrapped Ether",
@leon-do
leon-do / mordor.json
Last active January 15, 2024 15:43
Mordor Subgraph GetPools
[
{
"id": "0x3f57f76e30b47b6eaf9799c4403aaa67f209550d",
"token0": {
"id": "0xd333787e69dbfc47e67c59441e392eb530b3dc19"
},
"token1": {
"id": "0xfc95e5e3f912823ee531687e2df137940ef3ba2c"
},
"feeTier": "500",
@leon-do
leon-do / tokens.json
Last active March 27, 2024 02:58
tokenlist swap
{
"name": "ETCswap",
"timestamp": "2023-12-13T18:25:25.830Z",
"version": {
"major": 1,
"minor": 0,
"patch": 0
},
"tags": {},
"logoURI": "ipfs://QmNa8mQkrNKp1WEEeGjFezDmDeodkWRevGFN8JCV7b4Xir",
@leon-do
leon-do / emojis.json
Created October 2, 2023 16:21
Emoji Array
["๐Ÿ˜€","๐Ÿ˜ƒ","๐Ÿ˜„","๐Ÿ˜","๐Ÿ˜†","๐Ÿ˜…","๐Ÿ˜‚","๐Ÿคฃ","๐Ÿฅฒ","๐Ÿฅน","๐Ÿ˜Š","๐Ÿ˜‡","๐Ÿ™‚","๐Ÿ™ƒ","๐Ÿ˜‰","๐Ÿ˜Œ","๐Ÿ˜","๐Ÿฅฐ","๐Ÿ˜˜","๐Ÿ˜—","๐Ÿ˜™","๐Ÿ˜š","๐Ÿ˜‹","๐Ÿ˜›","๐Ÿ˜","๐Ÿ˜œ","๐Ÿคช","๐Ÿคจ","๐Ÿง","๐Ÿค“","๐Ÿ˜Ž","๐Ÿฅธ","๐Ÿคฉ","๐Ÿฅณ","๐Ÿ˜","๐Ÿ˜’","๐Ÿ˜ž","๐Ÿ˜”","๐Ÿ˜Ÿ","๐Ÿ˜•","๐Ÿ™","โ˜น๏ธ","๐Ÿ˜ฃ","๐Ÿ˜–","๐Ÿ˜ซ","๐Ÿ˜ฉ","๐Ÿฅบ","๐Ÿ˜ข","๐Ÿ˜ญ","๐Ÿ˜ฎโ€๐Ÿ’จ","๐Ÿ˜ค","๐Ÿ˜ ","๐Ÿ˜ก","๐Ÿคฌ","๐Ÿคฏ","๐Ÿ˜ณ","๐Ÿฅต","๐Ÿฅถ","๐Ÿ˜ฑ","๐Ÿ˜จ","๐Ÿ˜ฐ","๐Ÿ˜ฅ","๐Ÿ˜“","๐Ÿซฃ","๐Ÿค—","๐Ÿซก","๐Ÿค”","๐Ÿซข","๐Ÿคญ","๐Ÿคซ","๐Ÿคฅ","๐Ÿ˜ถ","๐Ÿ˜ถโ€๐ŸŒซ๏ธ","๐Ÿ˜","๐Ÿ˜‘","๐Ÿ˜ฌ","๐Ÿซจ","๐Ÿซ ","๐Ÿ™„","๐Ÿ˜ฏ","๐Ÿ˜ฆ","๐Ÿ˜ง","๐Ÿ˜ฎ","๐Ÿ˜ฒ","๐Ÿฅฑ","๐Ÿ˜ด","๐Ÿคค","๐Ÿ˜ช","๐Ÿ˜ต","๐Ÿ˜ตโ€๐Ÿ’ซ","๐Ÿซฅ","๐Ÿค","๐Ÿฅด","๐Ÿคข","๐Ÿคฎ","๐Ÿคง","๐Ÿ˜ท","๐Ÿค’","๐Ÿค•","๐Ÿค‘","๐Ÿค ","๐Ÿ˜ˆ","๐Ÿ‘ฟ","๐Ÿ‘น","๐Ÿ‘บ","๐Ÿคก","๐Ÿ’ฉ","๐Ÿ‘ป","๐Ÿ’€","โ˜ ๏ธ","๐Ÿ‘ฝ","๐Ÿ‘พ","๐Ÿค–","๐ŸŽƒ","๐Ÿ˜บ","๐Ÿ˜ธ","๐Ÿ˜น","๐Ÿ˜ป","๐Ÿ˜ผ","๐Ÿ˜ฝ","๐Ÿ™€","๐Ÿ˜ฟ","๐Ÿ˜พ","๐Ÿ‘ถ","๐Ÿ‘ง","๐Ÿง’","๐Ÿ‘ฆ","๐Ÿ‘ฉ","๐Ÿง‘","๐Ÿ‘จ","๐Ÿ‘ฉโ€๐Ÿฆฑ","๐Ÿง‘โ€๐Ÿฆฑ","๐Ÿ‘จโ€๐Ÿฆฑ","๐Ÿ‘ฉโ€๐Ÿฆฐ","๐Ÿง‘โ€๐Ÿฆฐ","๐Ÿ‘จโ€๐Ÿฆฐ","๐Ÿ‘ฑโ€โ™€๏ธ","๐Ÿ‘ฑ","๐Ÿ‘ฑโ€โ™‚๏ธ","๐Ÿ‘ฉโ€๐Ÿฆณ","๐Ÿง‘โ€๐Ÿฆณ","๐Ÿ‘จโ€๐Ÿฆณ","๐Ÿ‘ฉโ€๐Ÿฆฒ","๐Ÿง‘โ€๐Ÿฆฒ","๐Ÿ‘จโ€๐Ÿฆฒ","๐Ÿง”โ€โ™€๏ธ","๐Ÿง”","๐Ÿง”โ€โ™‚๏ธ","๐Ÿ‘ต","๐Ÿง“","๐Ÿ‘ด","๐Ÿ‘ฒ","๐Ÿ‘ณโ€โ™€๏ธ","๐Ÿ‘ณ","๐Ÿ‘ณโ€โ™‚๏ธ","๐Ÿง•","๐Ÿ‘ฎโ€โ™€๏ธ","๐Ÿ‘ฎ","๐Ÿ‘ฎโ€โ™‚๏ธ","๐Ÿ‘ทโ€โ™€๏ธ","๐Ÿ‘ท","๐Ÿ‘ทโ€โ™‚๏ธ","๐Ÿ’‚โ€โ™€๏ธ","๐Ÿ’‚","๐Ÿ’‚โ€โ™‚๏ธ","๐Ÿ•ต๏ธโ€โ™€๏ธ","๐Ÿ•ต๏ธ","๐Ÿ•ต๏ธโ€โ™‚๏ธ","๐Ÿ‘ฉโ€โš•๏ธ","๐Ÿง‘โ€โš•๏ธ","๐Ÿ‘จโ€โš•๏ธ","๐Ÿ‘ฉโ€๐ŸŒพ","๐Ÿง‘โ€๐ŸŒพ","๐Ÿ‘จโ€๐ŸŒพ","๐Ÿ‘ฉโ€๐Ÿณ","๐Ÿง‘โ€๐Ÿณ","๐Ÿ‘จโ€๐Ÿณ","๐Ÿ‘ฉโ€๐ŸŽ“","๐Ÿง‘โ€๐ŸŽ“","๐Ÿ‘จโ€๐ŸŽ“","๐Ÿ‘ฉโ€๐ŸŽค","๐Ÿง‘โ€๐ŸŽค","๐Ÿ‘จโ€๐ŸŽค","๐Ÿ‘ฉโ€๐Ÿซ","๐Ÿง‘โ€๐Ÿซ","๐Ÿ‘จโ€๐Ÿซ","๐Ÿ‘ฉโ€๐Ÿญ","๐Ÿง‘โ€๐Ÿญ","๐Ÿ‘จโ€๐Ÿญ","๐Ÿ‘ฉโ€๐Ÿ’ป","๐Ÿง‘โ€๐Ÿ’ป","๐Ÿ‘จโ€๐Ÿ’ป","๐Ÿ‘ฉโ€๐Ÿ’ผ","๐Ÿง‘โ€๐Ÿ’ผ","๐Ÿ‘จโ€๐Ÿ’ผ","๐Ÿ‘ฉโ€๐Ÿ”ง","๐Ÿง‘โ€๐Ÿ”ง","๐Ÿ‘จโ€๐Ÿ”ง","๐Ÿ‘ฉโ€๐Ÿ”ฌ","๐Ÿง‘โ€๐Ÿ”ฌ","๐Ÿ‘จโ€๐Ÿ”ฌ","๐Ÿ‘ฉโ€๐ŸŽจ","๐Ÿง‘โ€๐ŸŽจ","๐Ÿ‘จโ€๐ŸŽจ","๐Ÿ‘ฉโ€๐Ÿš’","๐Ÿง‘โ€๐Ÿš’","๐Ÿ‘จโ€๐Ÿš’","๐Ÿ‘ฉโ€โœˆ๏ธ","๐Ÿง‘โ€โœˆ๏ธ","๐Ÿ‘จโ€โœˆ๏ธ","๐Ÿ‘ฉโ€๐Ÿš€","๐Ÿง‘โ€๐Ÿš€","๐Ÿ‘จโ€