-
Notifications
You must be signed in to change notification settings - Fork 63
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
Introduce the Pausable Library #199
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Outside of global search and replace knits in this whole PR there's only 1 point to make.
This is an interesting design mechanism but its design is flawed. There is a comment to use admin restrictions nevertheless it allows for spamming of an asset if somewhere where to go wrong and have the balance altered. This may affect the market.
Moreover, it's really a hack to save costs rather than a solid design. I don't believe in promoting hacks. If this wasn't a security based library then I'd have less of an issue with a hack and some asset potentially being nuked in value so I'd go back to statefulness
Your comment makes no sense. The design is not flawed. Admin restrictions only allow a SINGLE user to pause rather than anyone. There cannot be spamming of an asset, when minting may only happen in the case of NO tokens. There is NO market involved.
This is NOT a hack, it is leveraging UTXO design. This was discussed a number of times as packet packet-oriented design with the use of Sub Ids. Again, there is NO value. |
Pause -> mint -> somehow withdraw the balance -> in "paused" but actually unpaused state. Design flaw. |
"somehow withdraw the balance" is an impossible hypothetical situation considering the contract owns the minted asset. Again, the asset has no value. |
I add the ability to withdraw some asset in some way and get my hands on your specific asset by some exploit. |
Closed in favor of #200 |
## Type of change <!--Delete points that do not apply--> - New Library ## Changes The following changes have been made: - Introduces the pausable library to the repo ## Notes - The original design used a packet-oriented approach. However due to changes in gas outlined [here](FuelLabs/fuel-core#1408 (comment)), a storage approach has instead been selected as mint/burn opcodes have become significantly more expensive. ## Related Issues <!--Delete everything after the "#" symbol and replace it with a number. No spaces between hash and number--> Closes [#199 ](#198) --------- Co-authored-by: bitzoic <[email protected]>
Type of change
Changes
The following changes have been made:
Notes
bool
in storage. It also does not require that the developer pass aStorageKey
for the library to properly function.Related Issues
Closes #198