You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the AbstractTokenContract, transaction verification functions are called in the following order: verify() -> dispatchOnCommand() -> verifyIssue(), verifyMove(), or verifyRedeem()
In the function of dispatchOnCommand(), it assumes the command is one of IssueTokenCommand, MoveTokenCommand and RedeemTokenCommand
when (commands.first().value) {
//verify the type jar presence and correctness
// Issuances should only contain one issue command.
is IssueTokenCommand -> verifyIssue(commands.single(), inputs, outputs, attachments, references)
// Moves may contain more than one move command.
is MoveTokenCommand -> verifyMove(commands, inputs, outputs, attachments, references)
// Redeems must only contain one redeem command.
is RedeemTokenCommand -> verifyRedeem(commands.single(), inputs, outputs, attachments, references)
}
If someone makes a new command, and use it with the FungibleTokenContract, then the contract will verify nothing since it does not know the command.
Shouldn't the above code throw exception at the end when the command is unknown?
The text was updated successfully, but these errors were encountered:
In the AbstractTokenContract, transaction verification functions are called in the following order:
verify()
->dispatchOnCommand()
->verifyIssue()
,verifyMove()
, orverifyRedeem()
In the function of
dispatchOnCommand()
, it assumes the command is one of IssueTokenCommand, MoveTokenCommand and RedeemTokenCommandIf someone makes a new command, and use it with the FungibleTokenContract, then the contract will verify nothing since it does not know the command.
Shouldn't the above code throw exception at the end when the command is unknown?
The text was updated successfully, but these errors were encountered: