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
In this case, mint can only be called by a contributor. The only way around this is to call it from another contract which has been granted the contributor role.
Some possible solutions are:
Guards are not provided, and is up to the user to implement by overriding methods
Move all logic from the minting traits into Internal and making Internal trait public. Allows user flexibility but feels like a bit of a leak.
The text was updated successfully, but these errors were encountered:
boyswan
changed the title
Guarded minting methods
Over-guarded minting methods
Apr 19, 2023
This issue is also exacerbated by the removal of mint_many in the core implementation in #65.
In order to mint multiple tokens in a single transaction, a user will need to call mint in a for-loop, which would be multiple cross-contract calls and very expensive.
Currently we set access control on minting trait methods by default, protecting methods from unauthorized access.
However this means the guarded methods cannot be used from within a user-facing method of the contract, for example:
In this case, mint can only be called by a contributor. The only way around this is to call it from another contract which has been granted the contributor role.
Some possible solutions are:
Internal
and makingInternal
trait public. Allows user flexibility but feels like a bit of a leak.The text was updated successfully, but these errors were encountered: