Fix imports & add command to pin Tornado IPFS cids with daemon
This commit is contained in:
parent
9d6c6144bf
commit
c1401b4a6e
4
.gitignore
vendored
4
.gitignore
vendored
@ -10,4 +10,6 @@ package-lock.json
|
||||
.vscode
|
||||
|
||||
build
|
||||
repos
|
||||
repos
|
||||
|
||||
test.ts
|
@ -6,7 +6,8 @@
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"start": "ts-node --esm src/index.ts",
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
"pin": "ts-node --esm scripts/pinIPFS.ts",
|
||||
"test": "ts-node --esm test.ts"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { ethers } from "ethers";
|
||||
import { cidV0ToV1Base32 } from "@ensdomains/content-hash";
|
||||
import { simpleGit, SimpleGit, CleanOptions } from "simple-git";
|
||||
import { simpleGit, SimpleGit } from "simple-git";
|
||||
import "dotenv/config";
|
||||
import path from "path";
|
||||
|
||||
@ -10,7 +10,7 @@ import { Domains, IPFSCids, RepoName } from "./types.ts";
|
||||
const provider = new ethers.JsonRpcProvider(process.env.RPC_URL || "https://rpc.mevblocker.io");
|
||||
const git: SimpleGit = simpleGit();
|
||||
|
||||
async function getENSDomainContenthash(domain: string): Promise<string> {
|
||||
export async function getENSDomainContenthash(domain: string): Promise<string> {
|
||||
const resolver = await provider.getResolver(domain);
|
||||
if (!resolver) throw new Error(`Resolver for domain ${domain} not found!`);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user