Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Final Project Submission #16

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# GLOBAL VARIABLES
SLUG_NAME = "opensea-marketplace-indexer"
CONTRACT_ADDRESS = "0x00000000006c3852cbef3e08e8df289169ede581" # seaport exchange
PROTOCOL = "ethereum"
START_BLOCK = "14946565"
NETWORK = "mainnet"
DEPLOY_KEY = "faef8816202773582412a6abb40ce767"
VERSION = "4.1.0"

# Only need to run this once when defining the subgraph
init:
graph init ${SLUG_NAME} \
--contract-name Seaport \
--index-events \
--studio \
--abi ./abis/Seaport.json \
--from-contract ${CONTRACT_ADDRESS} \
--protocol ${PROTOCOL} \
--start-block ${START_BLOCK} \
--network ${NETWORK}

graph add --abi ./abis/ERC165.json
graph add --abi ./abis/NFTMetadata.json


# This needs to be run any time the graphQL schema is updated
# to ensure the event types defined in the generated code is updated
# to match the schema. More is described in this discord thread:
# https://discord.com/channels/438038660412342282/438070183794573313/1100527424711700521
# and under the "Code Generation" heading here:
# https://thegraph.com/docs/en/developing/creating-a-subgraph/.
update-event-classes:
cd ${SLUG_NAME}; \
graph codegen

# Authenticates and deploys local subgraph to a graph node.
deploy:
graph auth ${DEPLOY_KEY} --studio \

cd ${SLUG_NAME}; \
graph deploy ${SLUG_NAME} \
--version-label ${VERSION} \
--studio;
306 changes: 282 additions & 24 deletions README.md

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions abis/ERC165.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[
{
"inputs": [
{ "internalType": "bytes4", "name": "interfaceID", "type": "bytes4" }
],
"name": "supportsInterface",
"outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
"stateMutability": "view",
"type": "function"
}
]

23 changes: 23 additions & 0 deletions abis/NFTMetadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[
{
"inputs": [],
"name": "name",
"outputs": [{ "internalType": "string", "name": "", "type": "string" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "symbol",
"outputs": [{ "internalType": "string", "name": "", "type": "string" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "totalSupply",
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
"stateMutability": "view",
"type": "function"
}
]
Loading