Get author field for block data

This commit is contained in:
2021-12-28 16:08:05 +05:30
parent 30f3c9e694
commit 86dcee12f7
3 changed files with 15 additions and 17 deletions
+3 -1
View File
@@ -38,6 +38,7 @@ export interface Block {
difficulty: string;
gasLimit: string;
gasUsed: string;
author: string;
}
export interface EventData {
@@ -329,7 +330,8 @@ export const createBlock = async (instanceExports: any, blockData: Block): Promi
const tdStringPtr = await __newString(blockData.td);
const totalDifficulty = await BigInt.fromString(tdStringPtr);
const authorPtr = await Address.zero();
const authorStringPtr = await __newString(blockData.author);
const authorPtr = await Address.fromString(authorStringPtr);
const sizePtr = await __newString('0');
const size = await BigInt.fromString(sizePtr);