near-sdk-gr

Utils.valueReturnBytes

valueReturnBytes : Bytes -> Void

Sets the given byte sequence as the return value of the contract.

Parameters:

param type description
bytes Bytes The bytes to return

Examples:

Utils.valueReturnBytes(Bytes.fromString("something important"))

Utils.valueReturnString

valueReturnString : String -> Void

Sets the given string as the return value of the contract.

Parameters:

param type description
str String The string to return

Examples:

Utils.valueReturnString("something important")

Utils.panic

panic : () -> Void

Terminates the execution of the program with panic GuestPanic("explicit guest panic")

Examples:

Utils.panic()

Utils.panicString

panicString : String -> Void

Terminates the execution of the program with panic GuestPanic(str)

Parameters:

param type description
str String The string to use in the GuestPanic

Examples:

Utils.panicString("Oh no!")

Utils.log

log : String -> Void

Logs the given string

Parameters:

param type description
str String The string to log

Examples:

Utils.log("Something happened")