-
Notifications
You must be signed in to change notification settings - Fork 358
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
Allow calling proxy.proxy from smart contracts in moonbase #2148
Conversation
Can we also remove this section in this PR, and add tests to ensure calls from users/contracts/precompiles behave as expected? |
So do we want to allow proxy calls from any kind of precompile? |
@@ -173,7 +173,7 @@ type MoonbasePrecompilesAt<R> = ( | |||
AddressU64<2059>, | |||
ProxyPrecompile<R>, | |||
( | |||
CallableByContract<OnlyIsProxy<R>>, | |||
CallableByContract<OnlyIsProxyAndProxy<R>>, | |||
SubcallWithMaxNesting<0>, | |||
// Batch is the only precompile allowed to call Proxy. | |||
CallableByPrecompile<OnlyFrom<AddressU64<2056>>>, |
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.
Do do we want to allow proxy calls from any kind of precompile?
No, it just conflicts with the filters declared with the PrecompileSetBuilder. No idea why this check is still done in the precompile, as it was necessary before we had opt-in checks in PrecompileSetBuilder.
This was actually preventing the batch precompile from being able to call proxy precompile
…foundation#2148) * allow calling proxy.proxy from smart contracts in moonbase * Remove redundant is_precompile check * Rename proxy_force_type to proxyForceType * Compile contracts
What does it do?
Allows smart contracts to call
Proxy.proxy
andProxy.proxy_force_type
. This only affects the moonbase runtime.Allows precompiles to call
Proxy.proxy
(only batch precompile by default, which was already defined but not working).Rename
proxy_force_type
toproxyForceType
.Related to #2098