Skip to content

External Token Approving Scheme #38

@shivgupt

Description

@shivgupt

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
    1. 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
    2. execute: This method should do required checks and then call controller.externalTokenApproval method
    3. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    AlchemydApp layer of DAOstack stackArccontract layer of DAOstack stackhelp wantedExtra attention is neededsubgraphcaching layer of DAOstack stack

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions