Created
April 21, 2021 14:30
-
-
Save davidawad/4d32a93bb7fa73ead6797b719b0f9747 to your computer and use it in GitHub Desktop.
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
public class MyContract extends StandardContract implements Contract { | |
public interface Commands extends CommandData { | |
// note the annotations here from the Contracts SDK | |
@RequireNumberOfStatesOnInput(value = 0) | |
@RequireNumberOfStatesOnOutput(value = 1) | |
class Action implements Commands {} | |
// now the verification is clearer, and easier to read | |
@RequireNumberOfStatesOnInput(value = 0) | |
class SomeOtherAction implements Commands {} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment