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

feat: Allow contract code and balance overrides #905

Closed
wants to merge 1 commit into from

Conversation

dekz
Copy link
Contributor

@dekz dekz commented May 18, 2021

Wanted to gather some early feedback on this WIP PR. #554

We'd love to have override support, similar to geth, in ganache. https://geth.ethereum.org/docs/rpc/ns-eth

The feature in geth is fantastic as it allows us to query a contract without requiring it to be deployed onto the chain. It also allows us to use this query contract on an archive node (i.e before it could conceivably be deployed). It also allows us to replace token contracts with dummy contracts and override balances/allowances for simulation and testing.

Would love to hear your thoughts on whether this will be a PR you'd accept and any hints on the approach taken.

@davidmurdoch
Copy link
Member

Would love to hear your thoughts on whether this will be a PR you'd accept and any hints on the approach taken.

Yes, absolutely! Took a very quick glance, and looks like a really great addition! I'm working on finishing up the 7.0 release right now, so I'd likely wait to review and merge this until after this next big release goes out.

@PhABC
Copy link

PhABC commented Aug 27, 2021

Any update on this @davidmurdoch?

@domob1812
Copy link
Contributor

This would be very helpful for our application as well. I've tried using the code from the PR for a start, and can confirm that it implements the features we need from a first quick look.

@devanoneth
Copy link

A further +1 from me that this would be really good to have in ganache

@domob1812
Copy link
Contributor

domob1812 commented Feb 23, 2022

What is missing here? I've been running this in my private dev environment for a couple of months now, it works so far as needed, and it would be great to get this into an official version of Ganache.

Is there anything I can help with to get this further, perhaps?

EDIT: I've rebased the commit now onto current develop, the result is in 953d065 and still works for all the things I need at least.

@lsqproduction
Copy link

@domob1812 We are waiting for this to be marked as Ready for review. @dekz If you can't work on this anymore, please let us know and we can take over.

@domob1812
Copy link
Contributor

Ok thanks @lsqproduction. If @dekz does not want to work on it anymore, I can take up my rebased commit, polish it a bit and submit as a new PR.

@dekz
Copy link
Contributor Author

dekz commented Mar 9, 2022

@domob1812 I would really appreciate if you take this over and start a new PR. I won’t be able to revisit this for a few weeks

@davidmurdoch
Copy link
Member

closing in favor of #2565

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

Successfully merging this pull request may close these issues.

6 participants