External Token Approving Scheme
For various protocol integrations involving external tokens - like DAO treasury management, Standard Bounty network, MakerDAO vault management etc - DAO is required to approve the respective contract to spend DAO's token on its behalf. This can be achieved by calling externalTokenApproval method in the controller from new Token Approving Scheme
Scheme Specifications
- Scheme should be a universal scheme and follow the standard pattern
- Scheme should have following methods
proposeTokenApproval : This should create a new proposal by calling vcontrollerParams.intVote.Propose and emit a NewApprovalProposal event
- _avatar: address of the DAO to which the approval is being proposed to
- _externalToken: address of the external token for which approval is required
- _spender: contract which is being proposed for the proposal
- _value: the amount to be approved
execute: This method should do required checks and then call controller.externalTokenApproval method
executeProposal: will be executed by votingMachine once the proposal pass or fail
Deliverables
- New scheme contract to propose for approving external token
- Subgraph mappings to index events emitted by the scheme
- Alchemy UI to interact with the scheme
Resources
Refer to our New Scheme Tutorial
External Token Approving Scheme
For various protocol integrations involving external tokens - like DAO treasury management, Standard Bounty network, MakerDAO vault management etc - DAO is required to approve the respective contract to spend DAO's token on its behalf. This can be achieved by calling
externalTokenApprovalmethod in the controller from new Token Approving SchemeScheme Specifications
proposeTokenApproval: This should create a new proposal by callingvcontrollerParams.intVote.Proposeand emit aNewApprovalProposaleventexecute: This method should do required checks and then callcontroller.externalTokenApprovalmethodexecuteProposal: will be executed by votingMachine once the proposal pass or failDeliverables
Resources
Refer to our New Scheme Tutorial