chainweb-node
chainweb-node copied to clipboard
Calling `coin.transfer` on an account that doesn't exist should throw an error
Currently, the request key comes back with Write succeeded.
Wallet transcript:
Sent code to chain '0':
(coin.account-balance "colin")
ERROR: : Failure: Tx Failed: with-read: row not found: colin
Sent code to chain '0':
(coin.account-balance "croesus")
Server result: 8997898999.99999999762
Sent code to chain '0':
(coin.transfer "croesus" "colin" 500.0)
Server result: "SUsdcLI_CvKqngETqbiExnORQqkwalKhDHaiO1HTHn8"
Sent code to chain '0':
(coin.account-balance "croesus")
Server result: 8997898999.99999999662
Request key poll results:
λ poll net (rk "SUsdcLI_CvKqngETqbiExnORQqkwalKhDHaiO1HTHn8")
Right (PollResponses (fromList [("SUsdcLI_CvKqngETqbiExnORQqkwalKhDHaiO1HTHn8",CommandResult {_crReqKey = "tIZQR3nXPV63oBezI6xB-asqzxy7oOjF-a2UwC__izM", _crTxId = Just 16456, _crResult = PactResult (Right (PLiteral (LString {_lString = "Write succeeded"}))), _crGas = Gas 52, _crLogs = Just "umfpFAaHIGp3XN2juPvuctx3dW
ok2AVvw6RyHlQwR9U", _crContinuation = Nothing, _crMetaData = Nothing})]))
Also, there is a slight discrepancy between the results of the two coin.account-balance calls for croesus.
I believe that is expected because the transaction went in and gas got charged. Just the transfer failed.