Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
UltimateRoman committed Jun 23, 2022
1 parent 6d8691e commit 25fd35c
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 19 deletions.
18 changes: 9 additions & 9 deletions frontend/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CeloProvider, Alfajores, Localhost } from "@celo/react-celo";
import { CeloProvider, Alfajores, NetworkNames } from "@celo/react-celo";
import { ChakraProvider } from "@chakra-ui/react";
import type { AppProps } from "next/app";
import { Web3Utils } from "../utils/Web3Utils";
Expand All @@ -16,14 +16,14 @@ function MyApp({ Component, pageProps }: AppProps) {
url: "http://localhost:3000/",
icon: "",
}}
networks={[Localhost, Alfajores]}
// network={{
// name: NetworkNames.Alfajores,
// rpcUrl: "https://alfajores-forno.celo-testnet.org",
// graphQl: "https://alfajores-blockscout.celo-testnet.org/graphiql",
// explorer: "https://alfajores-blockscout.celo-testnet.org",
// chainId: 44787,
// }}
networks={[Alfajores]}
network={{
name: NetworkNames.Alfajores,
rpcUrl: "https://alfajores-forno.celo-testnet.org",
graphQl: "https://alfajores-blockscout.celo-testnet.org/graphiql",
explorer: "https://alfajores-blockscout.celo-testnet.org",
chainId: 44787,
}}
>
<Web3Utils>
<Component {...pageProps} />
Expand Down
8 changes: 4 additions & 4 deletions frontend/utils/Web3Utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ export const Web3Utils = ({ children }) => {

const currentReserve = await lpPool.getReserves();
const price =
parseFloat(ethers.utils.formatEther(currentReserve.reserve0))
parseFloat(ethers.utils.formatEther(currentReserve.reserve1))
/
parseFloat(ethers.utils.formatEther(currentReserve.reserve1));
parseFloat(ethers.utils.formatEther(currentReserve.reserve0));
return price;
} catch(error) {
console.log('Error:', error);
Expand All @@ -105,9 +105,9 @@ export const Web3Utils = ({ children }) => {

const currentReserve = await lpPool.getReserves();
const stablecoinQuote = amount *
(parseFloat(ethers.utils.formatEther(currentReserve.reserve0))
(parseFloat(ethers.utils.formatEther(currentReserve.reserve1))
/
parseFloat(ethers.utils.formatEther(currentReserve.reserve1)));
parseFloat(ethers.utils.formatEther(currentReserve.reserve0)));
if (result == true) {
const stablecoin = new Contract(StablecoinAddress, ERC20, provider);
const tx1 = await stablecoin
Expand Down
10 changes: 5 additions & 5 deletions hardhat/contractAddress.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const WeirFactoryAddress = '0xeEf374f522853E9799e2D61E96320E714486E419';
export const WeirTreasuryAddress = '0xf8E99a96Dc86657c05d020Ff7104DE4E74f87A33';
export const DAOtokenAddress = '0x7CE1e4277631D59A63F42Aad0470D5b5e01a212A';
export const StablecoinAddress = '0xF6443397b079cfb4eB624b85Ef2e110Feb48e1D4';
export const CarbonCreditAddress = '0x6d9D22A3F8a80c97bbf5d7e959d13BD45872d66f';
export const WeirFactoryAddress = '0x7Ec3C2a2bC8802f5c978eEd502C7eff0Dfcb3790';
export const WeirTreasuryAddress = '0x64fBc6cf5e65931e1BF19d7FeA29883F93508aC5';
export const DAOtokenAddress = '0x71Ec7bda1ED9A0E14De47C12092b6bbFA917063f';
export const StablecoinAddress = '0x9fC38f4857e6DE9b6C4a6dDBed8ed983b432EEdb';
export const CarbonCreditAddress = '0x6d048dae393A35894F5C83beA9e3A7C1abDC35e6';
2 changes: 1 addition & 1 deletion hardhat/scripts/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const oracle = "0xd2dc1cd70614410dc168f62323816f2713c963cb";

async function main() {
const [deployer] = await ethers.getSigners();
const DAO_Address = "0x5Ec2ba4b480b260b77E2Ca1a1d012f7C5f14972d";
const DAO_Address = "0x8a882b275F1dfCD5e61148f3Cd897f4937Ab54e8";

console.log("Deployer address::", deployer.address);
console.log("DAO address::", DAO_Address);
Expand Down

0 comments on commit 25fd35c

Please sign in to comment.