Skip to content
Logo

encodeNotice

Encodes a notice as a Notice call of the rollups contracts Outputs interface.

Usage

import {  } from "@cartesi/codec";
 
const  = ({ : "0xdeadbeef" });
// "0xc258d6e5...deadbeef..."

Parameters

  • payload (Hex | Uint8Array): application-specific payload of the notice.

And an optional second parameter:

  • to ("hex" | "bytes", optional): representation of the encoded data. Defaults to "hex".

Return Type

Hex | Uint8Array: ABI-encoded output data, starting with the Notice function selector (0xc258d6e5).

Returns a Hex string by default, or a Uint8Array when to is "bytes".