Skip to content
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

Fix flag representations in MPTokenAuthorize #107

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ If the issuer has set `lsfMPTRequireAuth` (allow-listing) on the `MPTokenIssuanc
| `TransactionType` | object | `UInt16` | Indicates the new transaction type MPTokenAuthorize. The integer value is 29. |
| `MPTokenIssuanceID` | string | `UInt256` | Indicates the ID of the MPT involved. |
| `MPTokenHolder` | string | `AccountID` | (Optional) Specifies the holder's address that the issuer wants to authorize. Only used for authorization/allow-listing; must be empty if submitted by the holder. |
| `Flag` | string | `UInt64` | See [MPTokenAuthorize Flags](#mptokenauthorize-flags). |
| `Flags` | number | `UInt32` | See [MPTokenAuthorize Flags](#mptokenauthorize-flags). |

### MPTokenAuthorize Flags
Transactions of the MPTokenAuthorize type support additional values in the Flags field, as follows:

| Flag Name | Hex Value | Decimal Value | Description |
|:-------------------|:-------------|:--------------|:------------------------------|
| `tfMPTUnauthorize` | `0x0001` | 1 | If set, and transaction is submitted by a holder, it indicates that the holder no longer wants to hold the `MPToken`, which will be deleted as a result. If the holder's `MPToken` has a non-zero balance while trying to set this flag, the transaction fails. On the other hand, if set, and transaction is submitted by an issuer, it would mean that the issuer wants to unauthorize the holder (only applicable for allow-listing), which would unset the `lsfMPTAuthorized` flag on the `MPToken`. |
| `tfMPTUnauthorize` | `0x00000001` | 1 | If set, and transaction is submitted by a holder, it indicates that the holder no longer wants to hold the `MPToken`, which will be deleted as a result. If the holder's `MPToken` has a non-zero balance while trying to set this flag, the transaction fails. On the other hand, if set, and transaction is submitted by an issuer, it would mean that the issuer wants to unauthorize the holder (only applicable for allow-listing), which would unset the `lsfMPTAuthorized` flag on the `MPToken`. |