You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given that cast supports wallet imports: #1869, is it possible to get the wallet private key using forge when running tests, instead of putting them in the .env file? For example, via some cheatcode that enables us to get the wallet and obtain the private key?
For reference, deploying via forge script already supports this:
Component
Forge, Cast
Describe the feature you would like
Given that
cast
supports wallet imports: #1869, is it possible to get the wallet private key usingforge
when running tests, instead of putting them in the .env file? For example, via some cheatcode that enables us to get the wallet and obtain the private key?For reference, deploying via
forge script
already supports this:But
forge test
does not. Maybe something like the following would be great:And then in tests, we can use:
instead of
to obtain the private key for deploying onto testnet fork for testing.
Additional context
Original discussion: Cyfrin/foundry-full-course-f23#1733
Reference: #6034
The text was updated successfully, but these errors were encountered: