current position:Home>How to solve the problem that a large amount of information is stored on the chain in the form of structure plus mapping, resulting in the phenomenon that the stack is too deep to compile?

How to solve the problem that a large amount of information is stored on the chain in the form of structure plus mapping, resulting in the phenomenon that the stack is too deep to compile?

2022-02-03 20:55:50 Q & A of Denglian community

As for the contract, if a lot of information needs to be stored on the chain , In the form of structure plus mapping , This will lead to the phenomenon that the stack is too deep to compile , How to solve this problem ? Or if you want to realize a large amount of information on the chain, there are other ways ?




Take the answer 1:

You should have too many local variables . You need to consider splitting data into multiple different functions and processing with state variables .

Some non core data , It can also be processed offline .




copyright notice
author[Q & A of Denglian community],Please bring the original link to reprint, thank you.
https://en.netfreeman.com/2022/02/202202032055481971.html

Random recommended