pub fn code_size() -> u64 
Expand description

Get the code size in bytes (padded to word alignment) from the current call frame.

Additional Information

More information on data from call frames can be found in the Fuel Specs.
https://docs.fuel.network/docs/specs/fuel-vm/#call-frames

Returns

  • [u64] - The code size of the current call frame.

Examples

use std::call_frames::code_size;

fn foo() {
    let size = code_size();
    assert(size != 0);
}