CompilerError: Stack too deep, try removing local variables.

Ethereum-新手教程 2021-03-16

原因

是一个function里面的变量 数量不能超过(16),包括了入参和返回值。

解决方法

  1. 减少方法内不必要的变量
  2. 使用结构体减少单个变量参数

参考

https://medium.com/1milliondevs/compilererror-stack-too-deep-try-removing-local-variables-solved-a6bcecc16231

楼主残忍的关闭了评论