Update getRouterInfo.js

This commit is contained in:
Daniel
2022-11-05 11:37:13 +01:00
parent 2dc912293e
commit c0a2b8b15d

View File

@@ -0,0 +1,9 @@
import { abis } from "@my-app/contracts";
export const getRouterInfo = async (routerAddress, web3) => {
const router = new web3.eth.Contract(abis.router02, routerAddress);
return {
factory: await router.methods.factory().call(),
};
}