[ETHEREUM-CONTRACTS] | #1038 | Allow regular contracts to be the target of callAppAction #1242
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.
Description
Motivation: To relax the requirement that
callAppAction
can only be used on super app contracts.Context: This change allows all contracts to be the target of
callAppAction
as long as thefunction
on the contract satisfies two requirements:function
you want to call viacallAppAction
must takebytes
(the passed context from the host) as the last parameter.function
, that is, untouched.This was achieved simply by deleting the
isAppActive
modifier fromSuperfluid.sol
,ISuperfluid.sol
and any associated custom errors only used by this modifer.Issue: #1038
Type of change
How Has This Been Tested?
I have added tests to ensure that non-super app contracts can be the target of
callAppAction
andcallAppActionWithContext
.callAppAction
reverting when passing invalid calldatacallAppAction
reverting when an EOA is the target, ctx is malformatted because bytes returned is "0x"callAppAction
callAppActionWithContext
callAppActionWithContext
given that we ignore the context passed by the host via the initialcallAppAction
and pass in our own context