Skip to content

Commit

Permalink
Improve explanations content
Browse files Browse the repository at this point in the history
  • Loading branch information
lealobanov committed Dec 4, 2024
1 parent 91c8820 commit 4d375e2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion explanations/contract.txt
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
This code is used to create a new Admin resource which can then be saved to another users account
The Recipe contract is designed to manage administrative permissions using a special resource called Admin. This resource gives its owner the ability to perform important NFT-related actions in a secure and controlled way.

The Admin resource includes a function called createNewAdmin. This function allows the creation of new Admin resources, which can be given to other users. These users can then store the Admin resource in their account and gain administrative permissions.

By keeping these permissions within the Admin resource, the contract ensures that critical operations are carefully managed. This makes the system secure and flexible, especially useful for NFT platforms or other applications that need clear and safe access controls.
6 changes: 5 additions & 1 deletion explanations/transaction.txt
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
Before executing this transaction you first need to borrow the Admin resource from the 'acct'. Once that is borrowed, you then take 'acct2' and save the resource that is returned when you call the createNewAdmin() funtion to your storage path.
Before running this transaction, you need to borrow the Admin resource from the account's storage. This is done by accessing the SetAndSeries resource stored at /storage/myCollection. If the resource is not found, the transaction will stop and show an error.

Once the resource is borrowed, the performOperation function is called on it, and the result is logged. Next, the transaction borrows another SetAndSeries resource from /storage/anotherCollection. If this resource cannot be found, the transaction will error out as well. After successfully borrowing it, the performAnotherOperation function is called, and its result is also logged.

In the final step, the transaction logs a message confirming that a new Admin resource has been created. This ensures the transaction is complete and provides a clear record of its success.

0 comments on commit 4d375e2

Please sign in to comment.