This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { type PublicClient, type WalletClient } from "@wagmi/core"; | |
| import { providers } from "ethers"; | |
| import { type HttpTransport } from "viem"; | |
| import { useEffect, useState } from "react"; | |
| import type { JsonRpcProvider, JsonRpcSigner } from "@ethersproject/providers"; | |
| import { usePublicClient, useWalletClient } from "wagmi"; | |
| export function publicClientToProvider(publicClient: PublicClient) { | |
| const { chain, transport } = publicClient; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { ethers } from "ethers"; | |
| import { StandardMerkleTree } from "@openzeppelin/merkle-tree"; | |
| export type FullMerkleDataTree = { | |
| root: string; | |
| values: MerkleValueWithSalt[]; | |
| }; | |
| export type FullMerkleProofTreeWithRelatedUid = FullMerkleDataTree & { | |
| relatedUid: string; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env node | |
| console.log('yay gist') |