Closed rkalis closed 4 years ago
It can also be nice to add the option to the cashc-cli to output bytesize and opcount when compiling.
Added this in https://github.com/Bitcoin-com/cashscript/commit/199e5b887744d9ebc105e1aab7e34b7e734845e1. The CLI outputs a warning if any of the limits is exceeded. But it doesn't account for the constructor arguments. eg if the contract is 500 bytes, but the constructor arguments will be 50 bytes total, the compiler won't warn.
Due to the limitations on bytesize (520 bytes) and opcount (201 ops), it can be valuable to quickly see whether your contracts conform to these limits. So we should add
instance.bytesize
andinstance.opcount
. Perhapsinstance.sigops
might be handy as well, but the first two are more important.