nervosnetwork / capsule

Capsule is an out-of-box development framework for creating smart contract on Nervos' CKB.
MIT License
60 stars 34 forks source link

[Question] How to minimize the size of a script containing a single `exec` call? #149

Closed phroi closed 4 months ago

phroi commented 4 months ago

Hello Cryptape, iCKB here 👋

As per title, I'm wondering: How to minimize the binary size of a script containing a single exec call?

The script would be something along the following lines:

#include "ckb_syscalls.h"
int main() {
 return ckb_exec_cell(...);
}

As usual I'm asking here since GitHub issues are SEO friendly and very likely in the future there will be other L1 developers wondering the same :wink:

Keep up the Great Work, Phroi

phroi commented 4 months ago

The size is already very reasonable (~900 bytes), nice work on the compilation defaults! :+1::+1::+1:

Please, let me know if now or in the future exists an even better way to minimize this particular script!