Skip to content

Instantly share code, notes, and snippets.

@youngkidwarrior
youngkidwarrior / App.tsx
Created January 8, 2021 07:46
Relay React Navigation
import { MainTabsStack } from './Navigator';
import { AppQuery } from './__generated__/AppQuery.graphql';
import { graphql, useMutation, useQuery } from 'relay-hooks';
const { props, retry, error, cached } = useQuery<AppQuery>(
graphql`
query AppQuery {
me {
...Comments_me
@youngkidwarrior
youngkidwarrior / PRTCLEStakingDiamond.sol
Created November 6, 2020 03:47
Prtcle Staking Diamond
// SPDX-License-Identifier: MIT
pragma solidity 0.7.3;
pragma experimental ABIEncoderV2;
/******************************************************************************\
* Author: Nick Mudge
* Aavegotchi GHST Staking Diamond
* 18 October 2020
*
*
import { GraphQLObjectType, GraphQLString, GraphQLNonNull, GraphQLID } from 'graphql';
import { globalIdField } from 'graphql-relay';
import { ChallengeLoade, } from '../../loaders';
import { GraphQLContext } from '../../TypeDefinition';
import { ChallengeConnection } from '../challenge/ChallengeType';
import { connectionDefinitions, withFilter, connectionArgs } from '../../utils';
import WalletConnectProvider from '@walletconnect/web3-provider';
import WalletConnect from '@walletconnect/client';
export default () => {
const walletConnectURL =
'wc:00e46b69-d0cc-4b3e-b6a2-cee442f97188@1?bridge=https%3A%2F%2Fbridge.walletconnect.org&key=91303dedf64285cbbaf9120f6e9d160a5c8aa3deb67017a3874cd272323f48ae';
// Create a connector
const connector = new WalletConnect({
bridge: 'https://bridge.walletconnect.org',
import { hasLoadedtokenRequestSettings } from './lib/token-request-settings'
import { compareDesc } from 'date-fns'
async function appStateReducer(state) {
const ready = hasLoadedtokenRequestSettings(state)
if (!ready) {
return { ...state, ready }
}
console.log('state: ', state);
const { requests = [], acceptedTokens = [] } = state
@youngkidwarrior
youngkidwarrior / 3Box.txt
Last active April 6, 2020 07:35
3Box Gist
did:3:bafyreibclsdelgzfjdzvwkhxnorm2idue5x33jisovxulbly3lbrnxjx64