Astar icon indicating copy to clipboard operation
Astar copied to clipboard

Respect caller's custom weight limit setting in XVM

Open shaunxw opened this issue 2 years ago • 1 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 https://github.com/AstarNetwork/Astar/pull/980#discussion_r1275955251

shaunxw avatar Jul 27 '23 10:07 shaunxw

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

For XVM, as discussed in https://github.com/AstarNetwork/Astar/pull/998#discussion_r1289414765, 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.

shaunxw avatar Aug 11 '23 06:08 shaunxw

Deprecated.

Dinonard avatar Jul 29 '24 14:07 Dinonard