msg.sender
and msg.value
. The simple way to enable this is to inherit one of the below mentioned smart contracts based on your signature requirements:msgSender()
method wherever you use msg.sender
executeMetaTransaction
method on itself by appending the user address at the end of call data. The msgSender()
method in your smart contract (inherited by EIP712MetaTransaction) does the rest by returning the correct address for any context. Use msgSender()
wherever you use msg.sender
.permit(...r,s,v)
, you can register the contract as Custom and directly register method name itself. Another use case is gasless token approvals on certain chains like Polygon as these contracts already inherit from EIP712MetaTransaction specs and have executeMetaTransaction
method available. Also, custom approach can allow you to define your custom structured signatures.