Open zlsecure3 opened 1 year ago
code can be refined in StarNameService.move contract create_name_script_nft function
StarNameService.move
create_name_script_nft
when name_services.temp_nft_vec doesn't contain owner, can insert vector:: singleton(name) and return directly.
name_services.temp_nft_vec
owner
vector:: singleton(name)
if (!table::contains(&mut name_services.temp_nft_vec, owner)) { table::add(&mut name_services.temp_nft_vec, owner, vector::empty()); };
can be modified to:
if (!table::contains(&mut name_services.temp_nft_vec, owner)) { table::add(&mut name_services.temp_nft_vec, owner, vector:: singleton(name)); return; }
Informational
Gas Optimization
system_generated: auditor:alansh submission_id:1465030899
submission_id:1465030899
review_type:GRADING
result: TBD-yes,no
rating: TBD-123
comment: TBD-Rejected,Accepted by Secure3.
severity: TBD-Critical,Medium,Low,Informational
category:
description:
subject
code can be refined in
StarNameService.move
contractcreate_name_script_nft
functiondescription
when
name_services.temp_nft_vec
doesn't containowner
, can insertvector:: singleton(name)
and return directly.recommendation
can be modified to:
locations
severity
Informational
damage
exploitability
category
Gas Optimization
system_generated: auditor:alansh submission_id:1465030899