Currently, context fields like msg_sender_addr, msg_value, msg_bounceable, and cs are compiled into accesses to global variables, involving unnecessary unpacking operations and increased gas usage—even in internal receivers, where these values are already present locally.
Optimization Task:
- For internal receivers, eliminate global variable fetching for context fields (
msg_sender_addr, msg_value, msg_bounceable, cs).
- Directly reuse existing local receiver context variables, removing redundant unpacking steps.
Impact:
This optimization reduces gas usage per internal message significantly by removing unnecessary global access and unpacking operations, thus improving the performance and efficiency of internal receivers.
Currently, context fields like
msg_sender_addr,msg_value,msg_bounceable, andcsare compiled into accesses to global variables, involving unnecessary unpacking operations and increased gas usage—even in internal receivers, where these values are already present locally.Optimization Task:
msg_sender_addr,msg_value,msg_bounceable,cs).Impact:
This optimization reduces gas usage per internal message significantly by removing unnecessary global access and unpacking operations, thus improving the performance and efficiency of internal receivers.