defi-wonderland / smock

The Solidity mocking library
MIT License
319 stars 40 forks source link

feat request: add reading calls msg data and value #114

Closed hickscorp closed 2 years ago

hickscorp commented 2 years ago

It'd be great to know when a mock is called, what was the raw shape of the msg structure. In our case, we need to check that a payable function was called with the correct amount of funds.

sraver commented 2 years ago

Same here, I'm trying to test a contract that sends assets to another, and depending if the token is ERC20 or native coin I need to check the value to see if it's correct. I didn't find a way to do it :/

0xGorilla commented 2 years ago

Could you guys read the PR I just linked and tell me what you think? Does that solve the issue?

sraver commented 2 years ago

@0xGorilla that looks indeed amazing!

Thanks for solving this :pray: