CosmWasm / docs-old

Documentation for cosmwasm
https://www.cosmwasm.com/
Creative Commons Attribution Share Alike 4.0 International
2 stars 6 forks source link

Update editing-escrow-contract.md #7

Closed okwme closed 4 years ago

okwme commented 4 years ago

Mostly trivial updates. Added comments that should be removed after being addressed. It might be good to move the reducing build size into an advanced section?

okwme commented 4 years ago

Something strange here: I made some changes to the contract that aren't in the original (they're in an open PR atm). However when I run the cosmwasm-opt command and run the checksum on the resulting file, it still matches the one in the tutorial. Mayyybe I only altered from the suggestions on the tests though, are those not included in the compile?

ethanfrey commented 4 years ago

Tests are indeed not included in the compile. It never compiles test code in production releases, and actually very aggressively trims out dead code, so even non-test functions that can be proven never to be called by the extern "C" entrypoints will be removed. Even if used in helpers and called from other functions... unless they are actually called in some production code path, they will be removed by cosmwasm-opt. (and not effect hash).

Adding the steal code should change it. Then updating the theif address should also modify it