Does anyone know how to get a contract size with remix
Nov 24, 2022, 6:05 PM
or if its possible within remix ?
the compiled contract size*
Nov 24, 2022, 6:05 PM
Haven't tested if it works
function contractSize(address _addr) public view returns (uint32){
uint32 size;
assembly {
size := extcodesize(_addr)
}
return size;
}
function contractSize(address _addr) public view returns (uint32){
uint32 size;
assembly {
size := extcodesize(_addr)
}
return size;
}
Nov 24, 2022, 7:11 PM
im curious my contract was working fine, i added a few functions and went over the limit, slimmed down a few things and its fine now, but some functions broke; ones i didnt touch
so im confused how taht happened
Nov 24, 2022, 7:16 PM
sometimes functions use functions
Nov 24, 2022, 7:17 PM
Depending on how many optimizations i use, it goes over the contract size
i dont think i broke anything insdie the function
Nov 24, 2022, 7:19 PM
I never tried optimazation breaking functions before, best is to debug it
Nov 24, 2022, 7:22 PM