AstarNetwork/Astar

Respect caller's custom weight limit setting in XVM

shaunxw opened this issue · 2 comments

Thinking about this, both EVM & Parity's WASM allow limiting of how much gas can be spent by the cross-contract call. We should also support this, I guess?

Not necessarily for this PR, but would be good to do in a follow-up.

Originally posted by @Dinonard in #980 (comment)

For calls from EVM, the caller's custom gas limit check is implemented in #998 .

For XVM, as discussed in #998 (comment), the solution will be

  1. make ink! env support weight v2; 2. add custom weight support to call_runtime interface. And then add the support for XVM.