-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4f77b75
commit 89dc167
Showing
2 changed files
with
5 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
This resource is created so that more tokens may be minted. Ideally not many people should have access to this, only admins. | ||
|
||
The VaultMinter resource takes in an amount as well as a capability that implements the Receiver interface as its arguments. | ||
The VaultMinter resource is designed to allow the controlled minting of new tokens. Access to this resource should be strictly limited, ideally to admins or other highly trusted entities, to maintain the integrity of the token supply. | ||
|
||
It checks to make sure the capability exists to receive, and once it does that it adds the amount in the parameters to the total minted supply. | ||
The VaultMinter provides a mintTokens function that takes two arguments: the amount of tokens to mint and a capability that implements the Receiver interface. Before proceeding, it validates that the provided capability can accept deposits. Once the capability is verified, the specified amount of tokens is added to the total minted supply, ensuring accurate tracking of the token supply. | ||
|
||
Afterwards that newly created balance is deposited into the receivers account. | ||
Finally, the newly minted tokens are encapsulated in a Vault resource and deposited directly into the account associated with the provided Receiver capability. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
When doing the transaction, you first need to check to see if there is a VaultMinter that can be referenced by the signer of the transaction. | ||
To execute this transaction, the first step is to verify that the signer of the transaction has access to a VaultMinter resource. This resource is required for minting new tokens. If the VaultMinter is available, you then retrieve the account that will receive the minted tokens. This account must have a valid Receiver capability to accept the tokens. | ||
|
||
If so, then you get an account that has the capability to receive tokens and once you execute the transaction you include the amount of tokens to be minted, as well as the receivers capability in the arguments. | ||
During the execution phase of the transaction, you specify the amount of tokens to be minted and provide the recipient's Receiver capability as arguments. The VaultMinter will mint the specified tokens, validate the recipient's capability, and securely deposit the newly minted tokens into the recipient's account. |