You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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
) callsmint
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.
The text was updated successfully, but these errors were encountered: