Documentation ¶
Index ¶
Constants ¶
const ( // Magic is a magic File header constant. Magic uint32 = 0x3346454E // MaxScriptLength is the maximum allowed contract script length. MaxScriptLength = 1024 * 1024 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type File ¶
File represents compiled contract file structure according to the NEF3 standard.
func FileFromBytes ¶
FileFromBytes returns NEF File deserialized from given bytes.
func (*File) DecodeBinary ¶
DecodeBinary implements io.Serializable interface.
func (*File) EncodeBinary ¶
EncodeBinary implements io.Serializable interface.
type Header ¶
Header represents File header.
func (*Header) CalculateChecksum ¶
CalculateChecksum returns first 4 bytes of double-SHA256(Header) converted to uint32.
func (*Header) DecodeBinary ¶
DecodeBinary implements io.Serializable interface.
func (*Header) EncodeBinary ¶
EncodeBinary implements io.Serializable interface.
type Version ¶
Version represents compiler version.
func GetVersion ¶
GetVersion returns Version from the given string. It accepts the following formats: `major.minor.build-[...]` `major.minor.build.revision-[...]` where `major`, `minor`, `build` and `revision` are 32-bit integers with base=10
func (*Version) DecodeBinary ¶
DecodeBinary implements io.Serializable interface.
func (*Version) EncodeBinary ¶
EncodeBinary implements io.Serializable interface.