Commit Graph

184 Commits

Author SHA1 Message Date
c32af56b41 Rebuild commercial paper contracts using clauses 2016-07-13 16:55:18 +01:00
e03dd19979 Rebuild IRS contract using clauses 2016-07-13 16:15:01 +01:00
49b58d8a43 Split IRS verification into individual functions 2016-07-13 13:19:51 +01:00
cba3aab96e Rebuild asset contracts using clauses 2016-07-13 13:08:23 +01:00
ea051d57be Move clauses into main 2016-07-13 11:48:51 +01:00
ead19c619a Merged in mike-cp-issuance-fix (pull request #224)
Disentangle the concept of CP issuer vs underlying redeemable asset issuer in the CP contract.
2016-07-13 11:13:23 +02:00
15bc48b49b Minor: Add note about refactoring TwoPartyTradeProtocol 2016-07-12 18:42:36 +01:00
f6789c93dd Disentangle the concept of CP issuer vs underlying redeemable asset issuer in the CP contract.
This confusion was introduced by a previous refactoring.
2016-07-12 16:01:50 +02:00
e09710e421 Update contract tutorial example to match JavaCommercialPaper 2016-07-12 14:48:50 +01:00
52be94866a Use requireThat in JavaCommercialPaper
Replaces verification logic in JavaCommercialPaper, which previously manually
throw IllegalStateException, with calls to requireThat().
2016-07-12 14:24:50 +01:00
79e3ce23f8 Tweak conditions on JavaCommercialPaper to match CommercialPaper 2016-07-12 14:24:50 +01:00
0d78df33f8 Add standard clauses 2016-07-12 11:31:23 +01:00
635da20fe2 contracts: Maybe we don't need a full stop there 2016-07-11 18:37:27 +01:00
d7cc34c9a5 all: Full stops in comments! 2016-07-11 17:58:53 +01:00
e28ecae8c0 Address review comments 2016-07-11 18:47:24 +02:00
41d092a169 Minor: optimize imports 2016-07-11 18:15:28 +02:00
6b7580c977 Minor: fix compiler warnings. 2016-07-11 18:15:28 +02:00
cc22810b09 Testing cleanup:
- Move code out of ambiguously named TestUtils files (there were three). Sometimes it's simpler to just put these things into the contract source files directly.
- Remove JavaTestHelpers objects (there were three), in favour of just giving the top level kotlin file class better names.
- Misc other small tweaks and cleanups.
2016-07-11 16:22:02 +02:00
6b775ebd4d Replace named timestamping authority with notary
As the timestamping authority is now always the notary service, contracts should
no longer be using name-based lookup of the timestamping authority (as this will
generally be wrong). This introduces a new "timestamp" property on a transaction,
and updates most contracts to refer to it.

In some cases (IRS, CommercialPaper) there are transactions with no input states
to derive notary from, that use timestamps. In these cases a notary is specified
in the command.
2016-07-11 14:54:36 +01:00
4324e33fea testdsl: Removed R type parameter, unify verifies() interface 2016-07-11 14:25:27 +01:00
fb55ceeb79 contracts: Remove Tmp* files 2016-07-11 14:25:27 +01:00
9bb8439dc3 testdsl: Add failsWith to Ledger 2016-07-11 14:25:27 +01:00
cd0299f650 testdsl: Javadoc comments 2016-07-11 14:25:27 +01:00
3d885eb928 testdsl: Clean up TestUtils.kt 2016-07-11 14:25:27 +01:00
0404ef4f62 Standardise error messages regarding state issuance
This makes the error messages when verifying state issuance consistent between
Cash, CommercialPaper and Obligation contracts, in preparation for introducing
a common issue clause between the contracts.
2016-07-11 11:32:36 +01:00
7655356ec2 Minor: Remove unneeded backquotes 2016-07-11 11:32:34 +01:00
ae1d3e96b1 Extend obligation tests to cover input lifecycle checks 2016-07-11 11:30:36 +01:00
b498928f75 Remove the "verify correct notary has signed" check. This is no longed necessary as the required notary key is added to the "signers" list during transaction construction. We have general validation rules that check the correct notary was included in the signers list, and that we have signatures for all "signers". 2016-07-07 13:22:30 +01:00
bbc5c2e981 Merged in mike-july-dependency-upgrades (pull request #200)
Upgrade dependencies, July edition.
2016-07-06 16:25:52 +01:00
9e849378cf Minor: add some assertions in the WalletFiller code after a test was observed to fail due to a negative amount. 2016-07-06 14:02:40 +01:00
6fb7e59b91 Upgrade dependencies, July edition. 2016-07-06 13:56:22 +01:00
0cf54d1c1f test dsl: Comment full stops 2016-07-06 13:25:08 +01:00
f177b1ffaa test dsl: LastLineShouldTestForVerifiesOrFails->EnforceVerifyOrFail 2016-07-06 13:25:08 +01:00
e31b769fef test dsl: Dsl->DSL, add top-level transaction primitive, add ledger-embedded signAll, other cosmetics 2016-07-06 13:25:08 +01:00
e3d6f51049 contracts, core, node: Port TransactionForTest tests to new DSL 2016-07-06 13:25:08 +01:00
bdda3d239a contracts: Port Java CashTests to new DSL 2016-07-06 13:25:08 +01:00
7634331f68 contracts: Port CashTests to new dsl 2016-07-06 13:25:08 +01:00
f4a6a43aa6 contracts, core: Port CommercialPaperTests, IRSTests, ObligationTests, TransactioGroupTests 2016-07-06 13:25:08 +01:00
cde315aca9 contracts, node: Port CommercialPaperTests, TwoPartyTradeProtocolTests and GroupToGraphConversion to use new dsl 2016-07-06 13:25:08 +01:00
5c0e7fbbf2 Moved topic parameter from send/receive methods to a ProtocolLogic property 2016-07-05 15:12:25 +01:00
2121824662 Rename com.r3cord.contracts.cash package to ...asset 2016-06-30 13:31:59 +01:00
6dad7efa22 Replace references to cash, with (fungible) asset 2016-06-30 12:47:18 +01:00
a02263937c send and sendAndReceive use Party for the destination 2016-06-30 12:04:39 +01:00
5271882dcd Event scheduling and docs for event scheduling 2016-06-30 08:51:52 +01:00
c767638127 Move DummyContract.State into its own file
DummyContract.State isn't actually used by the DummyContract any more, so shouldn't
be part of that contract class.
2016-06-29 17:16:46 +01:00
dc304199c8 Remove warnings from Obligation contract 2016-06-29 13:27:00 +01:00
228513671d Move Obligation contract into contracts module 2016-06-27 17:54:04 +01:00
9994d129f2 General cleanup based on first round of feedback
* Rename AggregateCommands to IssuanceCommands
 * Reorder comparisons to be consistent
 * Rename verifyDefaultCommand to verifySetLifecycleCommand
 * Rename currency to issued/product
 * Add note about needing to rethink timestamping
 * Rename issuer to obligor, and owner to beneficiary
 * Move lifecycle inversion code into SetLifecycle command
 * Correct comments regarding cash states
 * Rework description of contractHash parameter
 * Fixes 'netting equal balances due between parties', and add further netting tests
 * Separate calculations involving issued products and the underlying product
 * Use signed transactions in obligation tests
 * Add verification tests for changing lifecycle
2016-06-27 17:49:52 +01:00
bc326660a3 contracts, core: Fix static init cycle issue of JavaTestHelpers 2016-06-24 16:37:43 +01:00
341adafd3a contracts, core: Rename Java to JavaTestHelpers 2016-06-24 16:37:43 +01:00