Skip to content

ERC721 voting with dynamic voting power #3996

Open
@RitzyDevBox

Description

@RitzyDevBox

🧐 Motivation
I'm working on an NFT based DAO, currently I don't see a way to override the voting power for an individual NFT.

📝 Details
Expose an Interface on in the ERC721Votes.sol

  setVotingPower(uint256 tokenId) {
  }

Update the GetVotes and GetPastVotes to support dynamic voting power

function getVotes(address account) public view virtual override returns (uint256) {
    
    uint256[] memory ownedNFTs =_nftOwnerCheckpoints[account];
     //Pseudo code
    return ownedNFTs.sum(n =>_delegateNFTCheckpoints[n].latest())

}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions