Reputation: 8116
I have a flow where only a specific party can be the issuer.
e.g. a bank issuing cash on to the ledger.
The works when the "bank" is issuing, but it also works when someone else runs it too.
How do I make sure that only one specific party can issue a state from this flow?
Is the only way to hard code the CordaX500Name in the flow? - assuming that you know in advance what the correct values for that are going to be in production.
Upvotes: 0
Views: 20
Reputation: 1043
Hardcoding the x500Name could work or just searching for the party when you run the code.
Something like a contract rule to ensure a specific party is the issuer wouldn't be too difficult to do.
I think I'd check my OWN party's name in the contract code and that could be a hardcoded if statement on the string name.
Upvotes: 1