I'm blindly trying to implement OpenGSN in my contracts. I'm still not sure how it works. Do I need a special application running and scanning for signed messages on my computer to make it working?
I have an ERC20 contract which also contains a special payable function. The payable function can't be split from token, it depends on balance. Is it possible to make getEther function free for users but other functions like transfer will be via client's costs? I would like only let users to call this one function without costs. Also, how can I prevent from a situation where somebody calls 500x getEther and thus generates me only empty calls with costs?
Let's say here's my simplified contract
pragma solidity ^0.8.0;
contract MyContract
{
receive()
external
payable
{
}
function getEther()
external
{
payable(msg.sender).transfer(1 ether);
}
function doSomethingButYouPay()
external
{
}
}
It's easy to extend this with BaseRelayRecipient but I don't quite understand about next steps, like Forwarder, Paymaster, also how can I install OpenGSN on normal html + JS website...