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

Feat/custom fork id #438

Open
wants to merge 10 commits into
base: dev
Choose a base branch
from
Open

Feat/custom fork id #438

wants to merge 10 commits into from

Conversation

brucedonovan
Copy link
Contributor

No description provided.

@netlify
Copy link

netlify bot commented Aug 29, 2023

Deploy Preview for ironclad-parent ready!

Name Link
🔨 Latest commit 2ee059e
🔍 Latest deploy log https://app.netlify.com/sites/ironclad-parent/deploys/650c446bcf1e1a0008782ec4
😎 Deploy Preview https://deploy-preview-438--ironclad-parent.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@brucedonovan brucedonovan marked this pull request as ready for review September 4, 2023 09:54
@marcomariscal
Copy link
Contributor

getting the following error when trying to connect to the chain via metamask:

Screenshot 2023-09-08 at 10 06 01 AM


const DEFAULT_CHAIN_ID = 1;

const useChainId = () => {
const useChainId = (returnForkId?: boolean) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const useChainId = (returnForkId?: boolean) => {
const useChainId = (returnForkId = false) => {

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does returnForkId mean?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UseChainId will return the ID of the forked network ( eg. 1 if we forked mainnet). However, that might not be the id returned by getNetwork().id .... there will likely be a need to have access to both. (For example, some deployed contracts might reference the id 1 , when the id returned by the network will be different ) .

{ network_id: 1,
block_number: currentBlockNumber,
chain_config: {
chain_id: 1277971
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we or should we make the fork chain id an env variable?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could do so, I think better would be to simply append 127797.. to the current netwrok_id in this case.

@brucedonovan
Copy link
Contributor Author

getting the following error when trying to connect to the chain via metamask:

Screenshot 2023-09-08 at 10 06 01 AM

This is because we need to point the FE to a tenderly that returns the correct fork number. :) ( abf28ecd-aedf-4a18-a0a2-9bb572eec491 - is one for example, but we will likely need an updated one soon ) .

@brucedonovan
Copy link
Contributor Author

@marcomariscal I think we should probably have a quick call to align up on this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants