Closed csmuller closed 1 year ago
Neon-js' implementation of the NEF is not up-to-date in neon-core/lib/sc/NEF.js. The correct format is:
neon-core/lib/sc/NEF.js
│ NEO Executable Format 3 (NEF3) │ ├──────────┬───────────────┬────────────────────────────────────────────┤ │ Field │ Type │ Comment │ ├──────────┼───────────────┼────────────────────────────────────────────┤ │ Magic │ uint32 │ Magic header │ │ Compiler │ byte[64] │ Compiler name and version │ ├──────────┼───────────────┼────────────────────────────────────────────┤ │ Source │ byte[] │ The url of the source files │ │ Reserve │ byte │ Reserved for future extensions. Must be 0. │ │ Tokens │ MethodToken[] │ Method tokens. │ │ Reserve │ byte[2] │ Reserved for future extensions. Must be 0. │ │ Script │ byte[] │ Var bytes for the payload │ ├──────────┼───────────────┼────────────────────────────────────────────┤ │ Checksum │ uint32 │ First four bytes of double SHA256 hash │ └──────────┴───────────────┴────────────────────────────────────────────┘
You are missing the source attribute and the first reserved byte is still two bytes in your case.
completed in v5.2.0 release
Neon-js' implementation of the NEF is not up-to-date in
neon-core/lib/sc/NEF.js
. The correct format is:You are missing the source attribute and the first reserved byte is still two bytes in your case.