FuelLabs / fuel-vm

Fuel v2 interpreter in Rust
Other
344 stars 77 forks source link

The `load_contract_code` charges gas after loading of the contract #758

Closed xgreenx closed 3 weeks ago

xgreenx commented 3 weeks ago

load_contract_code charges gas after loading the contract, it should first query its length, charge gas and only then load it in memory. Depending on storage implementation, this could be relevant since users may be able to perform costly actions without paying.