Skip to content

Compiler Warning Reference

Back to Troubleshooting

Auto-Mapping Warnings

These warnings indicate EVM globals that are auto-mapped to approximate Neo equivalents:

WarningPatternAction
block.coinbaseAuto-mapped to address(0)Review — always zero on Neo (no block miner in dBFT)
block.difficultyAuto-mapped to Runtime.getRandom()Review — different randomness model
block.gaslimitAuto-mapped to Policy.getExecFeeFactor()Review — different gas accounting
block.basefeeAuto-mapped to Policy.getFeePerByte()Review — different fee model
Ether literalsParsed but warnedConvert to Neo GAS units (10^8 decimals)

Standards Migration Warnings

CodePatternFix
W1012-param transfer(to, amount)Add from and data params for NEP-17
W1023-param transfer(from, to, amount)Add data parameter for NEP-17
W103approve/allowance/transferFromRemove or keep as optional extensions
W104transferFrom(from, to, tokenId)Replace with transfer(to, tokenId, data)
W105receive() / fallback()Replace with onNEP17Payment callback
W106supportsInterface(bytes4)Remove — manifest handles detection
W107ERC-1155 multi-token patternSplit into separate NEP-17 and NEP-11 contracts
W108ERC-2612 permit patternUse Runtime.checkWitness() instead

MIT Licensed