-
Notifications
You must be signed in to change notification settings - Fork 483
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
plutus-contract: Reduce our use of row-types
, delete BlockchainActions
#3342
Conversation
10afcfb
to
9e14c9c
Compare
54ead2e
to
857e869
Compare
GenericError e -> pretty e | ||
ThreadIdNotFound i -> "Thread ID not found:" <+> pretty i | ||
InstanceIdNotFound w -> "Instance ID not found:" <+> pretty w | ||
EmulatorJSONDecodingError e v -> "emulator JSON decoding error:" <+> pretty e <+> parens (viaShow v) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Capitalize?
import qualified Control.Monad.Freer.Extras.Log as L | ||
import qualified Control.Monad.Freer.Writer as W | ||
import Ledger.AddressMap (UtxoMap) | ||
import Prelude hiding (until) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hiding (until)
not needed anymore
LGTM. Curiously, modules such as |
I meant to delete them when I was done but I forgot. Thanks for pointing it out! |
* Add proper type for BlockchainActions * Roll all 'Effects' into 'Contract.Request' * Change types in Plutus.Contract.Types [plutus-contract compiles] [plutus-contract compiles and tests pass]
17f4790
to
c650fec
Compare
@@ -199,7 +189,7 @@ tests = | |||
matchLogs :: [EM.EmulatorTimeEvent ContractInstanceLog] -> Bool | |||
matchLogs lgs = | |||
case (_cilMessage . EM._eteEvent <$> lgs) of | |||
[ Started, ContractLog "waiting for endpoint 1", CurrentRequests [_], ReceiveEndpointCall _, ContractLog "Received value: 27", HandledRequest _, CurrentRequests [], StoppedNoError] -> True | |||
[ Started, ContractLog "waiting for endpoint 1", CurrentRequests [_], ReceiveEndpointCall{}, ContractLog "Received value: 27", HandledRequest _, CurrentRequests [], StoppedNoError] -> True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
waiting => Waiting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh yes of course...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hm no it passes locally?
BlockchainActions
part of the schema with a pair of typesPABReq
andPABResp
for the requests/responses thatContract
s can makerow-types
usage this also makes it much easier to see what actually gets passed to contract instancesmkSchema
TH function cannot handleEmptySchema
so I had to put a dummy endpoint in a couple of places in the playgroundContractPABRequest
andContractPABResponse
types. I deleted those.Pre-submit checklist:
Pre-merge checklist: