From 65ea4b45ed273d801f58ef5e5048c33966c5bf2d Mon Sep 17 00:00:00 2001 From: Doris Benda Date: Tue, 14 May 2024 15:45:43 +0300 Subject: [PATCH] Add comments --- deps/concordium-base | 2 +- src/Concordium/Client/Runner.hs | 10 +++++++--- transaction.json | 23 ----------------------- updateOperator.json | 15 --------------- 4 files changed, 8 insertions(+), 42 deletions(-) delete mode 100644 transaction.json delete mode 100644 updateOperator.json diff --git a/deps/concordium-base b/deps/concordium-base index 7baf5a3e..91ef10f5 160000 --- a/deps/concordium-base +++ b/deps/concordium-base @@ -1 +1 @@ -Subproject commit 7baf5a3ec97d49e63af7b44734799779dbce7340 +Subproject commit 91ef10f5f8d02d3ab2d07b86d8c9085281726620 diff --git a/src/Concordium/Client/Runner.hs b/src/Concordium/Client/Runner.hs index 5eaa36db..630e0e1e 100644 --- a/src/Concordium/Client/Runner.hs +++ b/src/Concordium/Client/Runner.hs @@ -779,7 +779,7 @@ processTransactionCmd action baseCfgDir verbose backend = logSuccess [printf "transaction '%s' sent to the node" (show hash)] when (ioTail intOpts) $ do tailTransaction_ verbose hash - logSuccess ["credential deployed successfully"] + -- logSuccess ["credential deployed successfully"] TransactionStatus h schemaFile -> do hash <- case parseTransactionHash h of Nothing -> logFatal [printf "invalid transaction hash '%s'" h] @@ -1654,6 +1654,7 @@ signAndProcessTransaction_ :: InteractionOpts -> -- | An optional file name to output the signed/partially-signed transaction to instead of sending it to the node Maybe FilePath -> + -- | Node backend connection Backend -> ClientMonad m () signAndProcessTransaction_ verbose txCfg pl intOpts outFile backend = void $ signAndProcessTransaction verbose txCfg pl intOpts outFile backend @@ -1674,6 +1675,7 @@ signAndProcessTransaction :: InteractionOpts -> -- | An optional file name to output the signed/partially-signed transaction to instead of sending it to the node Maybe FilePath -> + -- | Node backend connection Backend -> ClientMonad m (Maybe TransactionStatusResult) signAndProcessTransaction verbose txCfg pl intOpts outFile backend = do @@ -1681,7 +1683,7 @@ signAndProcessTransaction verbose txCfg pl intOpts outFile backend = do case outFile of Just filePath -> do - logInfo [[i| Write signed transaction to file. Will not send it to the node.|]] + logInfo [[i| Will write signed transaction to file. Will not send transaction to the node.|]] -- Get protocol version pv <- liftIO $ withClient backend $ do @@ -1711,7 +1713,7 @@ signAndProcessTransaction verbose txCfg pl intOpts outFile backend = do liftIO $ writeSignedTransactionToFile signedTransaction filePath verbose PromptBeforeOverwrite return Nothing Nothing -> do - logInfo [[i| Send signed transaction to node.|]] + logInfo [[i| Will send signed transaction to node.|]] -- Send transaction on chain let bareBlockItem = Types.NormalTransaction tx @@ -3652,6 +3654,8 @@ processBakerRemoveCmd baseCfgDir verbose backend txOpts = do let payload = Types.encodePayload Types.RemoveBaker nrgCost _ = return . Just $ bakerRemoveEnergyCost $ Types.payloadSize payload txCfg@TransactionConfig{..} <- getTransactionCfg baseCfg txOpts nrgCost + logInfo ["payloadpayloadpayloadpayloadpayloadpayload: "] + logInfo [[i| #{showPrettyJSON payload}.|]] logSuccess ( [ printf "submitting transaction to remove validator with %s" (show (naAddr $ esdAddress tcEncryptedSigningData)), printf "allowing up to %s to be spent as transaction fee" (showNrg tcEnergy) diff --git a/transaction.json b/transaction.json deleted file mode 100644 index 2586a13f..00000000 --- a/transaction.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "energy": 5000, - "expiryTime": 1715620915, - "nonce": 22, - "payload": { - "address": { - "index": 3383, - "subindex": 0 - }, - "amount": "0", - "message": "01000101420c0000000000000000000000000000", - "receiveName": "cis2-bridgeable.updateOperator", - "transactionType": "update" - }, - "signature": { - "0": { - "0": "0a5f99a512e42a6ed9ab8f94ad5fe0463f4cb00a7a65f4afcb39252432ecce5b8c03452d60e4290a8bc16093ba52c664b18559ede6d18ef48e156d0934f5cd02", - "1": "52271842cd8bacf60bcdea0e7226539079574cef512991bb57bbd09bb27fe16008552f4ce926cac16abbf8190a97264d96ad405a35bd35c466ef86c3ba15680c" - } - }, - "signer": "4jxvYasaPncfmCFCLZCvuL5cZuvR5HAQezCHZH7ZA7AGsRYpix", - "version": 1 -} \ No newline at end of file diff --git a/updateOperator.json b/updateOperator.json deleted file mode 100644 index ac8ef764..00000000 --- a/updateOperator.json +++ /dev/null @@ -1,15 +0,0 @@ -[ - { - "operator": { - "Contract": [ - { - "index": 3138, - "subindex": 0 - } - ] - }, - "update": { - "Add": [] - } - } - ]