API: https://subgraph.satsuma-prod.com/742d8952ab24/molecule--4039244/ip-nft-sepolia/api Playground: https://subgraph.satsuma-prod.com/molecule--4039244/ip-nft-sepolia/playground
API: https://subgraph.satsuma-prod.com/742d8952ab24/molecule--4039244/ip-nft-mainnet/api Playground: https://subgraph.satsuma-prod.com/molecule--4039244/ip-nft-mainnet/playground
- you can deploy contracts locally (see the main README)
- you'll need docker (and docker-compose) on your box
- install jq (
apt i jq
/brew install jq
)
- follow the local development deployment instructions to create a local deployment by running the fixture or dev scripts.
- Ensure the resulting contract addresses match the ones in your .env file and are available in your local environment (
source .env
). When executed on a fresh node with the default mnemonic, the addresses in.env.example
are the deterministic contract addresses. - Startup docker containers
docker compose up
The containers must be able to access your host box to connect to your local (anvil) chain. On Mac it likely just works since it can resolve host.docker.internal
. On Linux setup.sh
might be able to find your host's local network address and replace it in the compose file. Also make sure that you start your local blockchain node to be able to respond to the interface's traffic (e.g. by anvil -h 0.0.0.0
). If you can't get this to work, you can instead start a ganache node as a docker service by using the docker-compose.ganache.yml
override file:
docker-compose --file docker-compose.yml --file docker-compose.ganache.yml up
- Prepare subgraph deployment
yarn abis
yarn prepare:local
This copies over your contracts' ABIs and creates a subgraph.yaml
file with the contract addresses on your local chain, according to your environment.
- Build and deploy the subgraph
yarn build
yarn create:local
yarn deploy:local
- Checkout the local GraphQL API at http://localhost:8000/subgraphs/name/moleculeprotocol/ipnft-subgraph
If your local dev node needs a little "push", this is how you manually can mine a block:
curl -H "Content-Type: application/json" -X POST --data '{"jsonrpc":"2.0","method":"evm_mine","params":[],"id":1}' 127.0.0.1:8545
- get an api key for using the hosted service
yarn graph auth --product hosted-service <your api key>
yarn graph deploy --product hosted-service <userprefix>/<graphname>