mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-21 00:55:10 +00:00
Correct swap JSON payload in interest_rate_swaps example (#279)
Corrected swap JSON payload so that the JSON object can be unmarshalled properly Signed-off-by: Aldred Benedict <aldred@sg.ibm.com>
This commit is contained in:
parent
6e49a18d90
commit
d2fb039ba5
2 changed files with 2 additions and 2 deletions
|
|
@ -151,7 +151,7 @@ specified as providing this reference rate in the init parameters.
|
||||||
|
|
||||||
To create a swap named "myswap":
|
To create a swap named "myswap":
|
||||||
```
|
```
|
||||||
peer chaincode invoke -o irs-orderer:7050 -C irs --waitForEvent -n irscc --peerAddresses irs-partya:7051 --peerAddresses irs-partyb:7051 --peerAddresses irs-auditor:7051 -c '{"Args":["createSwap","myswap","{\"StartDate\":\"2018-09-27T15:04:05Z\",\"EndDate\":\"2018-09-30T15:04:05Z\",\"PaymentInterval\":395,\"PrincipalAmount\":100000,\"FixedRate\":400,\"FloatingRate\":500,\"ReferenceRate\":\"myrr\"}", "partya", "partyb"]}'
|
peer chaincode invoke -o irs-orderer:7050 -C irs --waitForEvent -n irscc --peerAddresses irs-partya:7051 --peerAddresses irs-partyb:7051 --peerAddresses irs-auditor:7051 -c '{"Args":["createSwap","myswap","{\"StartDate\":\"2018-09-27T15:04:05Z\",\"EndDate\":\"2018-09-30T15:04:05Z\",\"PaymentInterval\":395,\"PrincipalAmount\":100000,\"FixedRateBPS\":400,\"FloatingRateBPS\":500,\"ReferenceRate\":\"myrr\"}", "partya", "partyb"]}'
|
||||||
```
|
```
|
||||||
Note that the transaction is endorsed by both parties that are part of this
|
Note that the transaction is endorsed by both parties that are part of this
|
||||||
swap as well as the auditor. Since the principal amount in this case is lower
|
swap as well as the auditor. Since the principal amount in this case is lower
|
||||||
|
|
|
||||||
|
|
@ -115,7 +115,7 @@ createSwap() {
|
||||||
CORE_PEER_ADDRESS=irs-partya:7051
|
CORE_PEER_ADDRESS=irs-partya:7051
|
||||||
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/partya.example.com/users/User1@partya.example.com/msp
|
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/partya.example.com/users/User1@partya.example.com/msp
|
||||||
echo "===================== Invoking chaincode ===================== "
|
echo "===================== Invoking chaincode ===================== "
|
||||||
peer chaincode invoke -o irs-orderer:7050 -C irs --waitForEvent -n irscc --peerAddresses irs-partya:7051 --peerAddresses irs-partyb:7051 --peerAddresses irs-auditor:7051 -c '{"Args":["createSwap","myswap","{\"StartDate\":\"2018-09-27T15:04:05Z\",\"EndDate\":\"2018-09-30T15:04:05Z\",\"PaymentInterval\":395,\"PrincipalAmount\":100000,\"FixedRate\":400,\"FloatingRate\":500,\"ReferenceRate\":\"myrr\"}", "partya", "partyb"]}'
|
peer chaincode invoke -o irs-orderer:7050 -C irs --waitForEvent -n irscc --peerAddresses irs-partya:7051 --peerAddresses irs-partyb:7051 --peerAddresses irs-auditor:7051 -c '{"Args":["createSwap","myswap","{\"StartDate\":\"2018-09-27T15:04:05Z\",\"EndDate\":\"2018-09-30T15:04:05Z\",\"PaymentInterval\":395,\"PrincipalAmount\":100000,\"FixedRateBPS\":400,\"FloatingRateBPS\":500,\"ReferenceRate\":\"myrr\"}", "partya", "partyb"]}'
|
||||||
echo "===================== Chaincode invoked ===================== "
|
echo "===================== Chaincode invoked ===================== "
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue