Warning! Error encountered during contract execution [max code size exceeded]
智能合约编译时提示
csharp
contracts/core/CORE.sol:15:1: Warning: Contract code size exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries.
contract KywRouter is IKywRouter02 {
^ (Relevant source part starts here and spans across multiple lines).
UsingForDirective
contracts/core/CORE.sol 15:4
No quick fixes available
大概意思是智能合约字节码的大小超过了24576字节, 尝试将合约部署到以太坊主网时可能会出现问题。这个限制是在Spurious Dragon硬分叉时引入的,因为以太坊节点处理和存储合约的方式需要有此限制。