Skip to content

Instantly share code, notes, and snippets.

View ryanio's full-sized avatar
👨‍🏭

Ryan Ghods ryanio

👨‍🏭
  • Los Angeles
View GitHub Profile
@ryanio
ryanio / truffle_mint_dai.js
Last active December 30, 2020 22:39
Minting Dai in a Truffle Test Suite with Forked Mainnet
const { BN, ether, balance } = require("openzeppelin-test-helpers");
const { expect } = require("chai");
const { asyncForEach } = require("./utils");
// Artifacts
const ForceSend = artifacts.require("ForceSend");
// ABI
const erc20ABI = require("./abi/erc20");
query {
syncing {
currentBlock
highestBlock
knownStates
pulledStates
startingBlock
}
}
import { gql } from 'apollo-boost';
import { useQuery } from '@apollo/react-hooks';
import web3 from '../lib/web3';
export const GET_TOKEN_BALANCE = gql`
query TokenBalance($tokenAddress: Address!, $callData: Bytes!) {
block {
call(data: { to: $tokenAddress, data: $callData }) {
data
}