Skip to content

Instantly share code, notes, and snippets.

View brandonchuah's full-sized avatar

brandon.cs brandonchuah

View GitHub Profile
@brandonchuah
brandonchuah / onRun.js
Last active August 27, 2024 05:29
W3F Health Check
return (async() => {
// start of w3f body
const { gelatoArgs, multiChainProvider } = context;
const CHAIN_CONFIGS = {
1: {
subgraphUrl:
"https://api.goldsky.com/api/public/project_cliocs4xa038s4aumegvqdn8d/subgraphs/w3f-ethereum/latest/gn",
/* eslint-disable @typescript-eslint/naming-convention */
import fs from "fs";
const main = () => {
let x = 1;
for (x; x <= 282; x++) {
const nftMetaData = {
imgae: `https://ipfs.io/ipfs/QmVUFZH3CcL6cec3Q9p48EWcRWReY8ktMKSZfcPdyBo71H/${x}.png`,
name: `KoruDao NFT ${x}`,
description: "KoruDao NFT",
@brandonchuah
brandonchuah / call-relay-sponsor-api.js
Last active July 15, 2022 07:02
call-relay-sponsor-api
const { address: metaboxAddress, abi: metaboxAbi } =
GelatoRelaySDK.getMetaBoxAddressAndABI(chainId);
const metaBox = new ethers.Contract(metaboxAddress, metaboxAbi, provider);
const nonce = Number(await metaBox.nonce(userWalletAddress));
const gelatoNftAddress = "0x3488aA03d04699627840a0776F42d8A495D823D4" // (gelatoNft address on Mumbai)
const gelatoNftAbi = ["function mint() external"];
const gelatoNft = new ethers.Contract(gelatoNftAddress, gelatoNftAbi);
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.15;
interface IFeePool {
function feesAvailable(address account)
external
view
returns (uint256, uint256);
function isFeesClaimable(address account) external view returns (bool);
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import { EnumerableSet } from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import { _transfer } from "./vendor/gelato/FGelato.sol";
import { IOps } from "./interfaces/IOps.sol";
import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
abstract contract OpsSponsor is Ownable {
using EnumerableSet for EnumerableSet.AddressSet;
// SPDX-License-Identifier: MIT
pragma solidity 0.8.7;
import {
IERC20,
SafeERC20
} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
interface IRouter {