Simulate EOA for tests
- Dominant language
- Haskell
- Stars
- 2.1k
- Forks
- 320
- PR merge metrics
- No merged PRs in 30d
Description
I have a smart contract which uses EIP-712 signatures in its API, which I want to test. The regular testing routine is to have a smart contract as a user, but then there are no private key involved, which is needed to create a signature.
I could pseudo-randomly generate a private key and derive its address, but then I won't be able to send a message where msg.sender is my generated address.
It would be great to have a possiblity to simulate being an EOA with a private key. Maybe with a cheatcode to set msg.sender?
Contributor guide
No contributing guide indexed for this repository
Research direction
The issue names EIP-712 signatures, private keys, msg.sender, and a proposed cheatcode, but no files or tests. Start by locating the testing routine and existing cheatcode entry points, then determine how an EOA identity and signature should be represented. Done means a defined, tested way to send messages with the generated address as msg.sender.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- blockchain, testing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100