This contract is used by the
FeePool to enable users to permit other addresses to withdraw fees for them. In Synthetix this was intended to allow mobile wallets to claim fees for a cold storage wallet.
In principle it is generic, as the approver just marks a number of delegates as authorised to perform some action on their behalf, with no reference to what that action is, or who the delegates are.
FeePool: This contract allows the fee pool to delegate fee withdrawal approvals.
Stores who has approved whom to perform actions. The double mapping allows each authoriser to have multiple delegates. A given delegate is authorised by an authoriser when
approval[authoriser][delegate] is true.
mapping(address => mapping(address => bool)) public
Initialises the inherited
constructor(address _owner, address _associatedContract) public
Grants approval for a delegate to act on behalf of a given authoriser.
setApproval(address authoriser, address delegate) external
Revokes the approval of a delegate to act on behalf of a given authoriser.
withdrawApproval(address authoriser, address delegate) external
The delegate was approved to act on the authoriser's behalf.
Approval(address indexed authoriser, address delegate)
The delegate was disapproved to act on the authoriser's behalf.
WithdrawApproval(address indexed authoriser, address delegate)