Update getFactoryInfo.js
This commit is contained in:
@@ -5,11 +5,14 @@ export const getFactoryInfo = async (factoryAddress, web3) => {
|
||||
const factory = new web3.eth.Contract(abis.factory, factoryAddress);
|
||||
|
||||
const factoryInfo = {
|
||||
feeTo: null,
|
||||
feeToSetter: null,
|
||||
allPairsLength: null,
|
||||
feeTo: await factory.methods.feeTo().call(),
|
||||
feeToSetter: await factory.methods.feeToSetter().call(),
|
||||
allPairsLength: await factory.methods.allPairsLength().call(),
|
||||
allPairs: [],
|
||||
};
|
||||
|
||||
for (let i = 0; i < factoryInfo.allPairsLength; i++) {
|
||||
factoryInfo.allPairs[i] = await factory.methods.allPairs(i).call();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user