Policy

GetMacroBlockOf

Returns the block number of the macro block (checkpoint or election) of the given batch (which is always the last block).

const res = await fetch("http://127.0.0.1:8648", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
  jsonrpc: "2.0",
  method: "getMacroBlockOf",
  params: [0],
  id: 1
})
});
const data = await res.json();

Parameters

PropType / Default
batch
number

Returns

PropType / Default
returnValue
number

On this page