-
Notifications
You must be signed in to change notification settings - Fork 4
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
base: dev
Are you sure you want to change the base?
Feat/custom fork id #438
Conversation
✅ Deploy Preview for ironclad-parent ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
|
||
const DEFAULT_CHAIN_ID = 1; | ||
|
||
const useChainId = () => { | ||
const useChainId = (returnForkId?: boolean) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const useChainId = (returnForkId?: boolean) => { | |
const useChainId = (returnForkId = false) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does returnForkId
mean?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
@marcomariscal I think we should probably have a quick call to align up on this PR. |
No description provided.