Open kongzii opened 1 month ago
A bit more context for my own understanding:
-> The function we want to complete via a Safe wallet is submitAnswer
(link to contract). Calling this function involves sending with the transaction X amount of xDAI (we antecipate sending 10 xDAI per answer)
-> As described above, we want to use Zodiac's module and allow the EOA to spend <= 10 xDAI with transactions interacting with RealityETH contract.
-> I would suggest exploring Zodiad'c SDK for easier interaction - it seems that EtherWithinAllowance
should be a good start (what is missing is the requirement to interact only with RealityEth's submitAnswer
method).
Another (simpler) option would be:
However I still like the Zodiac Roles
solution more, because
Just wanted to mention it, maybe it will be a good solution for something in the future..
Currently, we support Safe and its single-signed transactions (if only one signer is required). That works out of the box with PMAT. However, we would like to use Safe for safer storage of funds.
The problem is, with only one signer, anyone who gets to the private key can remove the Spending limit (plus maybe Spending limit transactions don't work on arbitrary contracts).
We should be able to use https://github.com/gnosisguild/zodiac-modifier-roles to create a role for the agent's account on Safe that will be allowed to only send a certain amount of xDai and only use the Reality's contract, for anything else, multiple signers from our team would be required.