Fix: make entity field presence an error #297
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In pact 4, defpact steps have a "private entity" optional expression parameter which currently we do not support in pact 5.
Regular defpact steps take 1 argument, if they have a rollback they take 2 args.
There's an "optional" entity argument which, if present, basically causes the defpact to fail 100% of the time.
Pact 5 was basically simply ignoring the private entity parameter, but parity replay makes it clear that since people made the mistake of deploying contracts where this field is present, it should be a static error. This PR turns this field's presence into an error in two ways:
EntityNotAllowedInDefPact
and we do not allow the module to be deployed.EntityNotAllowedInDefPact
when attempting to execute a step with an entity.PR checklist:
Additionally, please justify why you should or should not do the following: