Contract Upgrade Ledger Transaction
A contract upgrade transaction with fully resolved inputs and signatures. Contract upgrade transactions are separate to regular transactions because their validation logic is specialised; the original contract by definition cannot be aware of the upgraded contract (it was written after the original contract was developed), so its validation logic cannot succeed. Instead alternative verification logic is used which verifies that the outputs correspond to the inputs after upgrading.
In contrast with a regular transaction, signatures are checked against the signers specified by input states' participants fields, so full resolution is needed for signature verification.
Constructors
Properties
The inputs of this transaction. Note that in BaseTransaction subclasses the type of this list may change!
Network parameters that were in force when this transaction was created. Resolved from the hash of network parameters on the corresponding wire transaction.
Outputs are computed by running the contract upgrade logic on input states. This is done eagerly so that the transaction is verified during construction.
Helper property to return a list of ContractState objects, rather than the often less convenient TransactionState
ContractUpgradeLedgerTransactions do not contain reference input states.
The required signers are the set of all input states' participants.
List of signatures on this transaction.
Functions
Mathematically validates the signatures that are present on this transaction. This does not imply that the signatures are by the right keys, or that there are sufficient signatures, just that they aren't corrupt. If you use this function directly you'll need to do the other checks yourself. Probably you want verifyRequiredSignatures instead.
Helper to simplify filtering outputs according to a Predicate.
Helper to simplify filtering output StateAndRef items according to a Predicate.
Helper to simplify finding a single output matching a Predicate.
Helper to simplify finding a single output StateAndRef matching a Predicate.
Get a human readable description of where signatures are required from, and are missing, to assist in debugging the underlying cause.
Return the PublicKeys for which we still need signatures.
Helper to simplify getting an indexed output.
Helper to simplify getting all output states of a particular class, interface, or base class.
Returns a StateAndRef for the given output index.
Returns a StateAndRef for the requested output state, or throws IllegalArgumentException if not found.
Helper to simplify getting all output StateAndRef items of a particular state class, interface, or base class.
Verifies the signatures on this transaction and throws if any are missing. In this context, "verifying" means checking they are valid signatures and that their public keys are in the requiredSigningKeys set.
Verifies the signatures on this transaction and throws if any are missing which aren't passed as parameters. In this context, "verifying" means checking they are valid signatures and that their public keys are in the requiredSigningKeys set.