Skip to content

Commit

Permalink
tested upto yet but still work pending
Browse files Browse the repository at this point in the history
  • Loading branch information
muhammedshahinshapottayil committed Apr 26, 2024
1 parent 1326da9 commit ad153dd
Show file tree
Hide file tree
Showing 1,890 changed files with 6,247 additions and 0 deletions.
Binary file not shown.
856 changes: 856 additions & 0 deletions packages/subgraph/build/ProdigiKill/abis/localhost_ProdigiKill.json

Large diffs are not rendered by default.

106 changes: 106 additions & 0 deletions packages/subgraph/build/schema.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
type Proposal @entity {
id: ID!
userAddress: Bytes!
title: String!
details: String!
createdAt: BigInt!
finalDate: BigInt!
withdrawal: Boolean!
status: Int!
transactionHash: String!
updatedAt: BigInt
proposalRating: [ProposalRating!]! @derivedFrom(field: "ProposalID")
renewRequest: [RequestRenewal!]! @derivedFrom(field: "ProposalID")
submitProof: [SubmitProof!]! @derivedFrom(field: "ProposalID")
}

type ProposalRating @entity {
id: ID!
ProposalID: Proposal!
userAddress: Bytes!
status: Boolean!
createdAt: BigInt!
updatedAt: BigInt
}

type RequestRenewal @entity {
id: ID!
ProposalID: Proposal!
userAddress: Bytes!
reason: String!
date: BigInt!
status: Int!
renewalRating: [RenewRating!]! @derivedFrom(field: "ProposalID")
createdAt: BigInt!
updatedAt: BigInt
}

type RenewRating @entity {
id: ID!
ProposalID: RequestRenewal!
userAddress: Bytes!
status: Boolean!
createdAt: BigInt!
updatedAt: BigInt
}

type SubmitProof @entity {
id: ID!
ProposalID: Proposal!
userAddress: Bytes!
proof: String!
status: Int!
submitRating: [SubmitRating!]! @derivedFrom(field: "ProposalID")
createdAt: BigInt!
updatedAt: BigInt
}

type SubmitRating @entity {
id: ID!
ProposalID: SubmitProof!
userAddress: Bytes!
status: Boolean!
createdAt: BigInt!
updatedAt: BigInt
}

type BlackListed @entity {
id: ID!
status: Boolean!
createdAt: BigInt!
updatedAt: BigInt
}

type Donations @entity {
id: ID!
address: Bytes!
value: BigInt!
createdAt: BigInt!
}

type ProposalIdea @entity {
id: ID!
address: Bytes!
title: String!
details: String!
createdAt: BigInt!
winner: Boolean
winningDate: BigInt
rating: [ProposalIdeaRating!]! @derivedFrom(field: "ProposalID")
}

type ProposalIdeaRating @entity {
id: ID!
ProposalID: ProposalIdea!
userAddress: Bytes!
status: Boolean!
createdAt: BigInt!
updatedAt: BigInt
}

type Winner @entity {
id: ID!
ProposalID: ProposalIdea!
address: Bytes!
createdAt: BigInt!
}
57 changes: 57 additions & 0 deletions packages/subgraph/build/subgraph.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
specVersion: 0.0.4
description: ProdigiKill
repository: https://github.com/scaffold-eth/se-2/packages/subgraph/
schema:
file: schema.graphql
dataSources:
- kind: ethereum/contract
name: ProdigiKill
network: localhost
source:
abi: ProdigiKill
address: "0x5FbDB2315678afecb367f032d93F642f64180aa3"
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
entities:
- Proposal
- ProposalRating
- RenewRating
abis:
- name: ProdigiKill
file: ProdigiKill\abis\localhost_ProdigiKill.json
eventHandlers:
- event: Evt__Applied(indexed uint256,indexed address,string,string,uint256,uint8)
handler: handleProposalCreate
- event: Evt__Rate(indexed uint256,indexed address)
handler: handleProposalRating
- event: Evt__Renew(indexed uint256,indexed address,string,uint256,uint8)
handler: handleRenewCreate
- event: Evt__Renew__Rate(indexed uint256,indexed address)
handler: handleRenewRating
- event: Evt__Change__Status(indexed uint256,uint8)
handler: handleProposalStatusChange
- event: Evt__Renew__Accepted(indexed uint256,uint8)
handler: handleRenewAccepted
- event: Evt__Renew__Rejected(indexed uint256,uint8)
handler: handleRenewReject
- event: Evt__Submit__Proof(indexed uint256,indexed address,uint8,string)
handler: handleSubmitProof
- event: Evt__Completed__Proof(indexed uint256,indexed address)
handler: handleSubmitRating
- event: Evt__Withdrawed__Reward(indexed uint256,indexed address)
handler: handleWithdrawReward
- event: Evt__Withdrawed__Collateral(indexed uint256,indexed address)
handler: handleWithdrawCollateral
- event: Evt__Black__Listed(indexed address,bool)
handler: handleBlackListing
- event: Evt__Donation(indexed address,uint256)
handler: handleDonation
- event: Evt__Proposal__Idea(indexed uint256,indexed address,string,string)
handler: handleProposeIdea
- event: Evt__Rate__Proposed__Idea(indexed uint256,indexed address)
handler: handleProposeIdeaRating
- event: Evt__Winner__of__Idea(indexed uint256,indexed address)
handler: handleProposalWinner
file: ProdigiKill\ProdigiKill.wasm
Loading

0 comments on commit ad153dd

Please sign in to comment.