Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Do not merge] - Preview link #3205

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 4 additions & 20 deletions src/helpers/environment/Environment/Environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,22 +54,12 @@ export class Environment {
fallback: "false",
});

public static getGovernanceStartBlock = (): number =>
parseInt(
this._get({
first: true,
key: "VITE_GOVERNANCE_START_BLOCK",
fallback: "0",
}),
);
public static getGovernanceStartBlock = (): number => parseInt("20815338");

public static getNodeUrls = (networkId: NetworkId) => {
switch (networkId) {
case NetworkId.MAINNET:
return this._get({
key: `VITE_ETHEREUM_NODE_URL`,
fallback: "https://rpc.ankr.com/eth",
});
return ["https://rpc.tenderly.co/fork/bc145689-8a7d-4a9a-872c-b54c670a762a"]; //TODO: revert this after testing. this is like this so we dont have to mess w/ fleek environments for fork testing
case NetworkId.TESTNET_GOERLI:
return this._get({
key: `VITE_ETHEREUM_TESTNET_NODE_URL`,
Expand Down Expand Up @@ -150,15 +140,9 @@ export class Environment {
public static getArchiveNodeUrls = (networkId: NetworkId) => {
switch (networkId) {
case NetworkId.MAINNET:
return this._get({
key: `VITE_ETHEREUM_ARCHIVE_NODE_URL`,
fallback: "https://rpc.ankr.com/eth",
});
return ["https://rpc.tenderly.co/fork/bc145689-8a7d-4a9a-872c-b54c670a762a"];
default:
return this._get({
key: `VITE_ETHEREUM_ARCHIVE_NODE_URL`,
fallback: "https://rpc.ankr.com/eth",
});
return ["https://rpc.tenderly.co/fork/bc145689-8a7d-4a9a-872c-b54c670a762a"];
}
};
}
5 changes: 4 additions & 1 deletion src/hooks/wagmi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ export const { chains, provider, webSocketProvider } = configureChains(
[
{
...mainnet,
rpcUrls: { default: { http: ["https://rpc.ankr.com/eth"] }, public: { http: ["https://rpc.ankr.com/eth"] } },
rpcUrls: {
default: { http: ["https://rpc.tenderly.co/fork/bc145689-8a7d-4a9a-872c-b54c670a762a"] },
public: { http: ["https://rpc.tenderly.co/fork/bc145689-8a7d-4a9a-872c-b54c670a762a"] },
},
},
{
...polygon,
Expand Down
2 changes: 1 addition & 1 deletion src/views/Governance/hooks/dev/useAddChain.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export async function addToNetwork() {
symbol: "ETH",
decimals: 18,
},
rpcUrls: ["https://rpc.tenderly.co/fork/f7571dd4-342e-457a-a83b-670b6a84e4c4"],
rpcUrls: ["https://rpc.tenderly.co/fork/bc145689-8a7d-4a9a-872c-b54c670a762a"],
};

const result = await window.ethereum.request({
Expand Down
2 changes: 1 addition & 1 deletion src/views/Governance/hooks/dev/useMineBlocks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ethers } from "ethers";
export const useMineBlocks = () => {
return useMutation(async ({ blocks }: { blocks: number }) => {
const provider = new ethers.providers.JsonRpcProvider(
"https://rpc.tenderly.co/fork/f7571dd4-342e-457a-a83b-670b6a84e4c4",
"https://rpc.tenderly.co/fork/bc145689-8a7d-4a9a-872c-b54c670a762a",
);
const params = [
ethers.utils.hexValue(blocks), // hex encoded number of blocks to increase
Expand Down
2 changes: 2 additions & 0 deletions src/views/Governance/hooks/useGetProposals.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ export const useGetProposals = () => {
}
}),
);

console.log("the proposals", proposals);
return proposals;
},
{ enabled: !!archiveProvider && !!contract },
Expand Down
2 changes: 1 addition & 1 deletion src/views/Governance/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const Governance = () => {
<div id="stake-view">
<PageTitle name="Governance" />
<Box width="97%" maxWidth="974px">
{import.meta.env.VITE_GOVERNANCE_DEV && <GovernanceDevTools />}
<GovernanceDevTools />
<DelegationMessage />
<Metric label="Current Voting Power" metric={`${Number(currentVotingWeight || 0).toFixed(2)} gOHM`} />
<Box display="flex" justifyContent="right">
Expand Down
Loading