mirror of
https://github.com/corda/corda.git
synced 2025-06-13 04:38:19 +00:00
CORDA-2467: Moved non-contract things out of finance-contracts and into finance-workflows (#4700)
This includes all of the cash selection logic, JSON support using jackson and a bunch of utilities which are not relevant to contract verification. The exception to this are Interpolator which has been moved to the IRS demo, and PhysicalLocationStructures.kt which is now in explorer.
This commit is contained in:
@ -10,7 +10,7 @@ import java.util.List;
|
||||
|
||||
import static net.corda.core.contracts.ContractsDSL.requireSingleCommand;
|
||||
import static net.corda.core.contracts.ContractsDSL.requireThat;
|
||||
import static net.corda.finance.utils.StateSumming.sumCashBy;
|
||||
import static net.corda.finance.contracts.utils.StateSumming.sumCashBy;
|
||||
|
||||
public class CommercialPaper implements Contract {
|
||||
// DOCSTART 1
|
||||
|
@ -8,8 +8,8 @@ import net.corda.core.identity.Party
|
||||
import net.corda.core.node.ServiceHub
|
||||
import net.corda.core.transactions.LedgerTransaction
|
||||
import net.corda.core.transactions.TransactionBuilder
|
||||
import net.corda.finance.contracts.asset.Cash
|
||||
import net.corda.finance.utils.sumCashBy
|
||||
import net.corda.finance.contracts.utils.sumCashBy
|
||||
import net.corda.finance.workflows.asset.CashUtils
|
||||
import net.corda.testing.core.singleIdentityAndCert
|
||||
import java.time.Instant
|
||||
import java.util.*
|
||||
@ -108,7 +108,7 @@ class CommercialPaper : Contract {
|
||||
@Throws(InsufficientBalanceException::class)
|
||||
fun generateRedeem(tx: TransactionBuilder, paper: StateAndRef<State>, services: ServiceHub) {
|
||||
// Add the cash movement using the states in our vault.
|
||||
Cash.generateSpend(
|
||||
CashUtils.generateSpend(
|
||||
services = services,
|
||||
tx = tx,
|
||||
amount = paper.state.data.faceValue.withoutIssuer(),
|
||||
|
@ -5,7 +5,7 @@ import net.corda.core.toFuture
|
||||
import net.corda.core.utilities.OpaqueBytes
|
||||
import net.corda.core.utilities.getOrThrow
|
||||
import net.corda.finance.*
|
||||
import net.corda.finance.contracts.getCashBalances
|
||||
import net.corda.finance.workflows.getCashBalances
|
||||
import net.corda.finance.flows.CashIssueFlow
|
||||
import net.corda.testing.core.singleIdentity
|
||||
import net.corda.testing.node.MockNetwork
|
||||
|
@ -10,7 +10,7 @@ import net.corda.core.utilities.OpaqueBytes
|
||||
import net.corda.core.utilities.getOrThrow
|
||||
import net.corda.docs.kotlin.tutorial.helloworld.IOUFlow
|
||||
import net.corda.finance.*
|
||||
import net.corda.finance.contracts.getCashBalances
|
||||
import net.corda.finance.workflows.getCashBalances
|
||||
import net.corda.finance.flows.CashIssueFlow
|
||||
import net.corda.node.services.vault.VaultSchemaV1
|
||||
import net.corda.testing.core.singleIdentity
|
||||
|
Reference in New Issue
Block a user