Skip to content

Compiler Diagnostics for Standards

Back to Standards and Contracts

Overview

The compiler emits actionable diagnostics when it detects Ethereum patterns that need migration. These help catch common mistakes during ERC → NEP porting:

CodePattern DetectedSuggestion
W101transfer(to, amount) — 2-param ERC-20Add from and data params for NEP-17
W102transfer(from, to, amount) — 3-param partialAdd data parameter for NEP-17
W103approve/allowance/transferFrom presentNot in NEP-17 spec; keep as extensions or remove
W104transferFrom(from, to, tokenId) — ERC-721Replace with transfer(to, tokenId, data)
W105receive() / fallback() presentReplace with onNEP17Payment callback
W106supportsInterface(bytes4) presentRemove — manifest handles interface detection
W107ERC-1155 multi-token patternSplit into separate NEP-17 and NEP-11 contracts
W108ERC-2612 permit (7-param)Use Runtime.checkWitness() instead

MIT Licensed