current hardcoded code hashes are generated manually via running test case test_code_hashes() and then copy/paste its console print, however, this can only be available in a same mode like debug or release, for example, if code hashes are generated in release mode, running test cases in debug mode would fail
if we put the generation process of code hash in a build.rs file, which would be executed every time before the compiling, it would be easier to maintain spore-contracts repository
Tasks list
[x] write build.rs file in each crate that generate its needed code hash into a const.rs file
[x] make sure capsule build would build contracts in a proper order or to write a make file to ensure the compiling order
Description
current hardcoded code hashes are generated manually via running test case
test_code_hashes()
and then copy/paste its console print, however, this can only be available in a same mode likedebug
orrelease
, for example, if code hashes are generated inrelease
mode, running test cases indebug
mode would failif we put the generation process of code hash in a
build.rs
file, which would be executed every time before the compiling, it would be easier to maintainspore-contracts
repositoryTasks list
capsule build
would build contracts in a proper order or to write a make file to ensure the compiling order