Skip to content

Instantly share code, notes, and snippets.

@youngkidwarrior
youngkidwarrior / 3Box.txt
Last active April 6, 2020 07:35
3Box Gist
did:3:bafyreibclsdelgzfjdzvwkhxnorm2idue5x33jisovxulbly3lbrnxjx64
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
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 { 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';
@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
*
*
@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
import { GraphQLID, GraphQLNonNull, GraphQLString } from 'graphql';
import { connectionArgs, ConnectionArguments, fromGlobalId } from 'graphql-relay';
import { GraphQLContext } from '../../../TypeDefinition';
import * as ChallengeLoader from '../ChallengeLoader';
import { ChallengeModel } from '../ChallengeModel';
import { ChallengeConnection, ChallengeType } from '../ChallengeType';
export const ChallengeQueries = {
@youngkidwarrior
youngkidwarrior / setupSubscription.ts
Created January 26, 2021 23:49
Async setup subscription
import { SUBSCRIPTION_URL } from 'react-native-dotenv';
import { Observable, SubscribeFunction } from 'relay-runtime';
import { SubscriptionClient } from 'subscriptions-transport-ws';
import AsyncStorage from '@react-native-community/async-storage';
const getToken = async () => {
return new Promise((resolve, reject) => {
AsyncStorage.getItem("token")
.then(res => {
if (res !== null) {
@youngkidwarrior
youngkidwarrior / guildData.json
Last active May 15, 2024 05:41
Update gist entry with key: 1156700611572674593
{"696853831476314204":{"role":"Particles","name":"Shenanigan🤸","inviteLink":"https://she.energy/join","roleId":"759132992336953344","premiumSponsorshipsUsed":"1"},"804572119249059850":{"role":"Verified","name":"edgeofinnerspace","roleId":"804572633022464011"},"698287700834517064":{"role":"Bee 🐝","name":"1Hive 🍯","inviteLink":"https://discord.gg/SwD5p","roleId":"759191073943191613","premiumSponsorshipsUsed":"1"},"721099581017948291":{"role":"Verified","name":"conector's server","roleId":"761961112563613696"},"675563742838390804":{"role":"Verified","name":"Madison Blockchain","roleId":"764295302110117900"},"636043769208242178":{"role":"Verified","name":"果子狸","roleId":"791708898708684801"},"740450057136111667":{"role":"Verified","name":"WhalerDAO","roleId":"761751397553012767"},"785687040430702612":{"role":"Verified","name":"wayway3's server","roleId":"785687939719757835"},"760274477782532126":{"role":"Verified","name":"rnoeld's server","roleId":"760277809121198120"},"765942422647472181":{"role":"Verified","name
@youngkidwarrior
youngkidwarrior / starboard.json
Last active July 28, 2021 00:52
Remove shitposts
["869744051304402945","869743236518924330","869743073419210772","869740385893752842"]