Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide an ERC20 preset using access lib #527

Closed
milancermak opened this issue Dec 7, 2022 · 2 comments
Closed

Provide an ERC20 preset using access lib #527

milancermak opened this issue Dec 7, 2022 · 2 comments

Comments

@milancermak
Copy link
Contributor

Currently, all the ERC20 presets use Ownable. It would be great if you could provide one more preset that uses AccessControl as well.

To provide some context where this might be useful - I recently worked on an L1 <-> L2 bridge for a ERC20 token. When bridging from L1 -> L2, the L2 bridge contract (the one with @l1_handler) calls mint on the L2 ERC20 contract. Similarly, when bridging from L2 -> L1, the L2 bridge contract calls a custom burn function on the L2 ERC20 contract. To protect the minting and burning, I used the AccessControl library (since the bridge contract is not the owner of the ERC20 contract).

Even though it's not too difficult to build, I think having a preset with more granular access control will be helpful.

@martriay
Copy link
Contributor

martriay commented Dec 7, 2022

good idea! we should. in the mean time, this can be achieved with Wizard for Cairo.

@milancermak
Copy link
Contributor Author

Mind blown 🤯 I didn't know about the Wizard, handy!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants