chainInfo from server, routes, wallet rework

This commit is contained in:
Tim Olson
2023-10-04 03:40:47 -04:00
parent e7a9600c54
commit 7239987867
26 changed files with 603 additions and 297 deletions

View File

@@ -0,0 +1,20 @@
import {ethers} from "ethers";
import {factoryAbi, queryHelperAbi} from "@/blockchain/abi.js";
import {useStore} from "@/store/store.js";
import {provider} from "@/blockchain/wallet.js";
export async function factoryContract() {
const s = useStore()
return new ethers.Contract(s.helper, factoryAbi, provider)
}
export async function queryHelperContract() {
const s = useStore()
return new ethers.Contract(s.helper, queryHelperAbi, provider)
}
export async function poolContract(addr) {
const s = useStore()
return new ethers.Contract(addr, poolAbi, provider)
}