5

Is it possible to set up a call filter (BaseCallFilter) so that the filtering is done based on the parameters of the call? So if the extrinsic parameters match a certain criterion they should either be filtered or not.

1 Answer 1

2

You can match against anything in the Call enum. Here's an example from Acala:

https://github.com/AcalaNetwork/Acala/blob/f4b80d7200c19b78d3777e8a4a87bc6893740d23/runtime/karura/src/lib.rs#L198

I can't find any example where anyone has so far filtered based on the values in the arguments. So far it's all been on the shape and structure of the calls but I don't see any reason not to. That said, it might make sense to separate out calls that you intend to treat in different ways into separate calls or separate enum variants inside your call - that might be less confusing for users of your parachain.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.