Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Ganache fork polygon doesn't give the right balanceOf result #3837

Answered by tenthirtyone
lingmicha asked this question in Q&A
Discussion options

You must be logged in to vote

@lingmicha I think @davidmurdoch and I figured this one out.

In our testing, we were both consistently receiving different results. Then we realized, geographically we are in different locations. When we double checked our timestamps, they were the same. However, because we reside in different geographic locations, those timestamps meant different things to our system time. When we passed in a timezone with the date param, our results were consistently the same.

Timezones

Try to pass the following command to start ganache:

$ ganache-cli --chain.vmErrorsOnRPCResponse true --server.port 19998 --fork.url https://polygon-mainnet.g.alchemy.com/v2/H3E99oH7XymptRueBxkO4OXXazhFb7_c@34581439 --h…

Replies: 2 comments 15 replies

Comment options

You must be logged in to vote
14 replies
@lingmicha
Comment options

@davidmurdoch
Comment options

@lingmicha
Comment options

@lingmicha
Comment options

@davidmurdoch
Comment options

Comment options

You must be logged in to vote
1 reply
@lingmicha
Comment options

Answer selected by davidmurdoch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants