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
With the persona, attitude, and unique tone that defines you, analyze the following: | |
- External context: {external_context} | |
- Short-term memory: {short_term_memory} | |
- Long-term memories: {long_term_memories} | |
- Recent posts: {recent_posts} | |
Based on this analysis, create an original tweet. Your tweet should: | |
- Align with your perspective and style. | |
- Touch on key themes, emotions, or ideas that resonate with the current context. |
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
// For simplicity, batches will be sold in whole | |
private void verifySale(LedgerTransaction tx, CommandWithParties<DrugContract.DrugCommands> command) { | |
requireThat(require -> { | |
require.using("Drug sale should consume one input statet", | |
tx.getInputs().size() == 1); | |
require.using("Drug sale should have one output state", | |
tx.getOutputs().size() == 1); | |
Drug in = tx.inputsOfType(Drug.class).get(0); | |
Drug out = tx.outputsOfType(Drug.class).get(0); |
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 void verify(@NotNull LedgerTransaction tx) throws IllegalArgumentException { | |
CommandWithParties<DrugCommands> command = requireSingleCommand(tx.getCommands(), DrugCommands.class); | |
DrugCommands commandType = command.getValue(); | |
if (commandType instanceof DrugCommands.IssueDrug) { | |
verifyIssuance(tx, command); | |
} else if (commandType instanceof DrugCommands.SellDrug) { | |
verifySale(tx, command); | |
} else { | |
throw new IllegalArgumentException("Command not recognized"); |