Skip to content

Instantly share code, notes, and snippets.

View arvind-subramanian's full-sized avatar

Arvind Subramanian arvind-subramanian

View GitHub Profile
CREATE TABLE resource (
id serial PRIMARY key,
resource_content VARCHAR NOT NULL,
resource_pattern VARCHAR NOT NULL,
resource_link VARCHAR NOT NULL,
resource_hash VARCHAR NOT NULL,
pattern_hash VARCHAR NOT NULL,
transaction_hash VARCHAR,
event_type VARCHAR,
ipfs_hash VARCHAR,
contract StatementHubStandard {
struct Statement {
uint256 resourcelinkHash; /*Hash of Resource Link. Hash computed off-chain*/
uint256 resourceHash; /*Hash of the content present at Resource Link. Hash computed off-chain*/
uint256 patternHash; /*Hash of the Pattern which is being referenced within the Resource. Hash computed off-chain */
bool isPatternPresent; /*Store whether the pattern was present in Resource or not. Determination of the same to be made off-chain */
uint256 resourceSummaryHash;/*Hash of the Resouce Summary. Resource summary could be a topic*/
address statementIssuer; /*Address of the person who is issuing a statement. Address of contract which initiated the addition of statement */
}