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
|
.vscode
|
||||||
|
|
||||||
build
|
build
|
||||||
repos
|
repos
|
||||||
|
|
||||||
|
test.ts
|
@ -6,7 +6,8 @@
|
|||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "ts-node --esm src/index.ts",
|
"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": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { ethers } from "ethers";
|
import { ethers } from "ethers";
|
||||||
import { cidV0ToV1Base32 } from "@ensdomains/content-hash";
|
import { cidV0ToV1Base32 } from "@ensdomains/content-hash";
|
||||||
import { simpleGit, SimpleGit, CleanOptions } from "simple-git";
|
import { simpleGit, SimpleGit } from "simple-git";
|
||||||
import "dotenv/config";
|
import "dotenv/config";
|
||||||
import path from "path";
|
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 provider = new ethers.JsonRpcProvider(process.env.RPC_URL || "https://rpc.mevblocker.io");
|
||||||
const git: SimpleGit = simpleGit();
|
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);
|
const resolver = await provider.getResolver(domain);
|
||||||
if (!resolver) throw new Error(`Resolver for domain ${domain} not found!`);
|
if (!resolver) throw new Error(`Resolver for domain ${domain} not found!`);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user