The reason for using global variables in my code is to remove many lines of code and improve readability.
Here is the commit that I've changed code from using local variables to use global variables:
https://github.com/HipoFinance/contract/commit/a69ab3f2276e61c075da59b4231271af525d6840
In the old version, in every function I had 10 to 20 lines of code just for loading data, and a few more lines to save data.
After the change, there are only two to four lines of code. The logic of each function is easily visible and readable.
The gas cost was not very different from the previous version, so it was worth it.
Jan 23, 2024, 1:12 PM
Brillant!
I think FunC compiler can implement some message structure check or someting?
I stuck in the Exit Code 9 that can't figure out why the tx failed.
I stuck in the Exit Code 9 that can't figure out why the tx failed.
Jan 23, 2024, 1:14 PM
you're trying to read more from a cell than is there
Jan 23, 2024, 1:29 PM