-
Notifications
You must be signed in to change notification settings - Fork 683
feat: Add methods to modify account #2337
feat: Add methods to modify account #2337
Conversation
@davidmurdoch I was wondering how the api documentation is generated and if there is a need to manually adjust it (e.g. https://github.com/trufflesuite/ganache/blob/develop/docs/typedoc/api.json)
|
Wow, at first glance this looks very thorough! The docs are auto-generated as part of the release and end up here (for now). Note that these docs are actually just a proof of concept and will likely be rewritten. |
Cool :) Let me know if I should adjust any of the method names (or anything else). I am not sure why some of the tests are failing :/ Also another thing I realized is that |
@davidmurdoch is there any way to push this forward from my side? I want to use Ganache v7 to simulate Safe transactions and for this I require this functionality :D |
@rmeissner I'll review/test this today and we can hopefully get it merged this week! |
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.
Looks great! Can you drop the filecoin package-lock.json changes? Once that is done this should be good to go on my end!
Excellent work!
Oh, we have a flaky test and a couple of tests that like like to timeout, so don't worry about the tests failures here. |
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.
Great work and thanks for the PR! I've requested a few simple changes.
One thing we (@rmeissner, @davidmurdoch, whoever is interested) should probably discuss is data validation for these methods. Currently, if you send bad data for the balance/code/storage, for example "0xw"
, it will always respond true
. Also, if there is some valid data, it will update the balance/code/storage up to the bad data. For example, setting balance to "0xab;lkjf"
will set the balance to 0xab
. This is also true for evm_setAccountNonce
, not just these new methods.
Co-authored-by: Micaiah Reid <micaiahreid@gmail.com>
Co-authored-by: Micaiah Reid <micaiahreid@gmail.com>
Co-authored-by: Micaiah Reid <micaiahreid@gmail.com>
Co-authored-by: Micaiah Reid <micaiahreid@gmail.com>
Yeah, I followed |
Hello, any idea when this is being officially released? |
Implements #1889
Adds:
evm_setAccountBalance
evm_setAccountCode
evm_setAccountStorageAt