Here's the minimal diff to add custom header support:
+ use std::collections::HashMap;
+ use tonic::{
+ metadata::{MetadataMap, MetadataValue},
+ Request,
+ };
#[derive(Clone)]
WITH balances AS ( | |
SELECT | |
"to" as owner, | |
SUM( | |
CASE | |
WHEN "from" = '0x0000000000000000000000000000000000000000' THEN value | |
WHEN "to" = '0x0000000000000000000000000000000000000000' THEN -value | |
ELSE value | |
END | |
) as balance |
Here's the minimal diff to add custom header support:
+ use std::collections::HashMap;
+ use tonic::{
+ metadata::{MetadataMap, MetadataValue},
+ Request,
+ };
#[derive(Clone)]
DECLARE | |
rows_inserted INTEGER; | |
BEGIN | |
WITH RECURSIVE root_mapping AS ( | |
-- Base case: Casts without a parent and with a timestamp in the last hour | |
SELECT hash, timestamp, hash AS root_parent_hash | |
FROM casts | |
WHERE parent_hash IS NULL |
/**** | |
Note - This snippet will not be maintained / updated as of Nov 29, 2023. | |
Please check out the to generate signers with Neynar https://github.com/neynarxyz/nodejs-sdk | |
Or you can also use the utility function signKeyRequest inside this package https://github.com/farcasterxyz/hub-monorepo/blob/main/packages/core/src/signers/viemLocalEip712Signer.ts | |
****/ |
const { getSSLHubRpcClient } = require('@farcaster/hub-nodejs'); | |
const getCastsByFid = async (hubRpcEndpoint, fid) => { | |
let client = getSSLHubRpcClient(hubRpcEndpoint); | |
client.$.waitForReady(Date.now() + 2000, async (e) => { | |
if (e) { | |
console.error(`Failed to connect to ${hubRpcEndpoint}`); | |
} else { | |
console.log(`Connected to ${hubRpcEndpoint}`); |
"use strict"; | |
var __create = Object.create; | |
var __defProp = Object.defineProperty; | |
var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
var __getOwnPropNames = Object.getOwnPropertyNames; | |
var __getProtoOf = Object.getPrototypeOf; | |
var __hasOwnProp = Object.prototype.hasOwnProperty; | |
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; | |
var __esm = (fn, res) => function __init() { | |
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res; |
require("dotenv").config(); | |
const ethers = require("ethers"); | |
const axios = require('axios').default; | |
const provider = new ethers.providers.JsonRpcProvider(`https://eth-mainnet.alchemyapi.io/v2/${process.env.NEXT_PUBLIC_ALCHEMY_API_KEY}`); | |
const alg = new ethers.Contract( | |
"0x32353A6C91143bfd6C7d363B546e62a9A2489A20", | |
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"inde |
Code cleanup | |
https://github.com/peripheryapp/periphery | |
Asset cleanup | |
https://github.com/onevcat/FengNiao |
Verifying my Blockstack ID is secured with the address 1GhWYtTRchygtbiiPSycukf7DgFiURSVKu https://explorer.blockstack.org/address/1GhWYtTRchygtbiiPSycukf7DgFiURSVKu |
# Image Resizing | |
alias cpng='find . -iname '*png' -exec pngcrush -ow -brute {} {}.crush \;' | |
alias spng="find . -name '*png' -ls | awk '{total += $7} END {print total}'" |