@ecp.eth/sdk / comments / createReportCommentTypedData
Function: createReportCommentTypedData()
function createReportCommentTypedData(params): {
domain: {
chainId: number;
name: "Ethereum Comments Protocol";
verifyingContract: `0x${string}`;
version: "1";
};
message: {
commentId: `0x${string}`;
message: string;
reportee: `0x${string}`;
};
primaryType: "ReportComment";
types: {
ReportComment: (
| {
name: "commentId";
type: "bytes32";
}
| {
name: "reportee";
type: "address";
}
| {
name: "message";
type: "string";
})[];
};
};
Defined in: packages/sdk/src/comments/comment.ts:990
Create the EIP-712 typed data structure for reporting a comment
Parameters
params
CreateReportCommentTypedDataParams
Returns
{
domain: {
chainId: number;
name: "Ethereum Comments Protocol";
verifyingContract: `0x${string}`;
version: "1";
};
message: {
commentId: `0x${string}`;
message: string;
reportee: `0x${string}`;
};
primaryType: "ReportComment";
types: {
ReportComment: (
| {
name: "commentId";
type: "bytes32";
}
| {
name: "reportee";
type: "address";
}
| {
name: "message";
type: "string";
})[];
};
}
The typed data
domain
domain: {
chainId: number;
name: "Ethereum Comments Protocol";
verifyingContract: `0x${string}`;
version: "1";
};
domain.chainId
chainId: number;
domain.name
name: "Ethereum Comments Protocol";
domain.verifyingContract
verifyingContract: `0x${string}` = HexSchema;
domain.version
version: "1";
message
message: {
commentId: `0x${string}`;
message: string;
reportee: `0x${string}`;
};
message.commentId
commentId: `0x${string}` = HexSchema;
message.message
message: string;
message.reportee
reportee: `0x${string}` = HexSchema;
primaryType
primaryType: "ReportComment";
types
types: {
ReportComment: (
| {
name: "commentId";
type: "bytes32";
}
| {
name: "reportee";
type: "address";
}
| {
name: "message";
type: "string";
})[];
};
types.ReportComment
ReportComment: (
| {
name: "commentId";
type: "bytes32";
}
| {
name: "reportee";
type: "address";
}
| {
name: "message";
type: "string";
})[];