Skip to content

Instantly share code, notes, and snippets.

View itsjerryokolo's full-sized avatar
🧑‍🚀
t-minus 10

Jerry Okolo itsjerryokolo

🧑‍🚀
t-minus 10
View GitHub Profile
import { gql, useQuery } from '@apollo/client';
import { useWeb3React } from '@web3-react/core';
import { useEffect, useState } from 'react';
import { useAppContext } from '../components/AppContextWrapper';
const wait = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
export const useLastMints = () => {
const [eventHandlerBound, setEventHandlerBound] = useState(false);
const { library } = useWeb3React();
@schmidsi
schmidsi / mapping.ts
Last active September 28, 2021 19:29
Proxy Pattern
import { Address, log } from "@graphprotocol/graph-ts";
import {
ImplementationAdded,
} from "../generated/CallProxy/CallProxy";
import {
ProxyEvent,
} from "../generated/schema";
@evaporei
evaporei / assembly-script-migration-guide.md
Last active November 28, 2025 13:42
AssemblyScript Migration Guide

AssemblyScript Migration Guide

Up until now, subgraphs have been using one of the first versions of AssemblyScript (v0.6). Finally we've added support for the newest one available (v0.19.10)! 🎉

That will enable subgraph developers to use newer features of the AS language and standard library.

This guide is applicable for anyone using graph-cli/graph-ts below version 0.22.0. If you're already at a higher than (or equal) version to that, you've already been using version 0.19.10 of AssemblyScript 🙂

Note: As of 0.24.0, graph-node can support both versions, depending on the apiVersion specified in the subgraph manifest.