Equivalent to ERC20VotesUpgradeable.sol in cairo

Hello OpenZeppelin Team,

I’m currently working on a project where I need functionality similar to ERC20VotesUpgradeable.sol but in Cairo. I noticed that your Cairo contracts have separate upgradable.cairo and votes.cairo components, unlike the Solidity version where they’re combined.

Could you advise on the best practice for achieving this? Should I:

  1. Merge the upgradable logic into the votes component (similar to Solidity’s approach), or
  2. Keep them separate and compose them differently?

What I want to do is add upgradable votes to an ERC20 token in cairo.

I’d appreciate any guidance on recommended patterns or examples for combining these features while maintaining upgradability.

I just hit the link, but I do not see any telegram link or similar, it just reposted my question.

You are scamming. Silly me that I reply you.

Sorry, the user has been banned.

Thank you for that. I hope you do not delete my question and help me solving it.

1 Like

Hey! You should compose them into the same contract as separate components, and you can get a fully-functional example by using our Wizard for Cairo, selecting Votes and Upgradeable checkboxes in the ERC20 tab. Hope that helps!

1 Like