-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: task opt in and opt out (#148)
* feat: adding opt in * feat: adding initial stage of opt out * fix: fixing opt out and opt in * test: added test and fixing other tests * fix: fix a test * fix: fixing exceeded timeout for test * docs: added initial document * fix: pr reviews * test: fix a test * feat: adding multiple opt in * docs: changing docs for multiple opt in * fix: fix transfer tests * fix: edit the settings * docs: adding docs based on pr reviews * fix: fix export for opt in and out * docs: update generated docs * refactor: refactoring based on pr review * docs: updating generated docs * chore: fixing audit error * fix: removing redundant functions * docs: updating generated docs
- Loading branch information
1 parent
98622e7
commit 0c6f5c1
Showing
8 changed files
with
557 additions
and
76 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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Assets | ||
|
||
The asset management functions include opting in and out of assets, which are fundamental to asset interaction in a blockchain environment. | ||
To see some usage examples check out the [automated tests](../../src/asset.spec.ts). | ||
|
||
## `optIn` | ||
|
||
Before an account can receive a specific asset, it must `opt-in` to receive it. An opt-in transaction places an asset holding of 0 into the account and increases its minimum balance by [100,000 microAlgos](https://developer.algorand.org/docs/get-details/asa/#assets-overview). | ||
The `optIn` function facilitates the opt-in process for an account to multiple assets, allowing the account to receive and hold those assets. | ||
|
||
## `optOut` | ||
|
||
An account can opt out of an asset at any time. This means that the account will no longer hold the asset, and the account will no longer be able to receive the asset. The account also recovers the Minimum Balance Requirement for the asset (100,000 microAlgos) | ||
The `optOut` function manages the opt-out process, permitting the account to discontinue holding a group of assets. | ||
|
||
> **Note**:It's essential to note that an account can only opt-out of an asset if its balance of that asset is zero. |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.