$ yarn build-all && yarn deploy-all
$ yarn clean && yarn build-contract && yarn codegen && yarn build-graph
$ rm -rf data/ generated/ build/ temp/ lib/ network.json
Compiling your contracts...
===========================
> Compiling ./contracts/Gravity.sol
> Compiling ./contracts/Migrations.sol
> Artifacts written to /Users/jan/Acala/subgraph-example/build/contracts
> Compiled successfully using:
- solc: 0.4.25+commit.59dbf8f1.Emscripten.clang
Skip migration: Bump mapping apiVersion from 0.0.1 to 0.0.2
Skip migration: Bump mapping apiVersion from 0.0.2 to 0.0.3
Skip migration: Bump mapping apiVersion from 0.0.3 to 0.0.4
Skip migration: Bump mapping apiVersion from 0.0.4 to 0.0.5
Skip migration: Bump mapping specVersion from 0.0.1 to 0.0.2
✔ Load subgraph from subgraph.yaml
Load contract ABI from abis/Gravity.json
Generate types for contract ABI: Gravity (abis/Gravity.json)
Write types to generated/Gravity/Gravity.ts
✔ Generate types for contract ABIs
✔ Generate types for data source templates
✔ Load data source template ABIs
✔ Generate types for data source template ABIs
✔ Load GraphQL schema from schema.graphql
Write types to generated/schema.ts
✔ Generate types for GraphQL schema
Types generated successfully
Skip migration: Bump mapping apiVersion from 0.0.1 to 0.0.2
Skip migration: Bump mapping apiVersion from 0.0.2 to 0.0.3
Skip migration: Bump mapping apiVersion from 0.0.3 to 0.0.4
Skip migration: Bump mapping apiVersion from 0.0.4 to 0.0.5
Skip migration: Bump mapping specVersion from 0.0.1 to 0.0.2
✔ Load subgraph from subgraph.yaml
Compile data source: Gravity => build/Gravity/Gravity.wasm
Copy schema file build/schema.graphql
Write subgraph file build/Gravity/abis/Gravity.json
Write subgraph manifest build/subgraph.yaml
✔ Write compiled subgraph to build/
Build completed: /Users/jan/Acala/subgraph-example/build/subgraph.yaml
$ yarn deploy-contract && yarn create-local && yarn deploy-local
$ truffle migrate --network mandala --reset
Compiling your contracts...
===========================
> Everything is up to date, there is nothing to compile.
> Network name: 'mandala'
> Block gas limit: 15000000 (0xe4e1c0)
> transaction hash: 0xa4c6295639c832781b5a08d0e1caf7f048de2e11cc486532c3aa5202d78226ad
> contract address: 0x1a906E71FF9e28d8E01460639EB8CF0a6f0e2486
> block timestamp: 1655246466
> account: 0x75E480dB528101a381Ce68544611C169Ad7EB342
> balance: 10000990.675883098224
> gas used: 239894 (0x3a916)
> gas price: 11251.291893661 gwei
> total cost: 2.699117417537911934 ETH
> Saving migration to chain.
-------------------------------------
> Total cost: 2.699117417537911934 ETH
Deploying 'GravatarRegistry'
----------------------------
> transaction hash: 0x0539850eaa0f34b8583fa38af76436876f1e2edd8db584437f82346be1b98417
> contract address: 0x78b1F763857C8645E46eAdD9540882905ff32Db7
> block timestamp: 1655246478
> account: 0x75E480dB528101a381Ce68544611C169Ad7EB342
> balance: 10000988.456154170068
> gas used: 1214156 (0x1286cc)
> gas price: 2974.008289142 gwei
> total cost: 3.610910008311494152 ETH
> Saving migration to chain.
-------------------------------------
> Total cost: 3.610910008311494152 ETH
Account address: 0x78b1F763857C8645E46eAdD9540882905ff32Db7
> Saving migration to chain.
-------------------------------------
> Final cost: 6.310027425849406086 ETH
$ graph create acala/examplesubgraph --node http://127.0.0.1:8020
Created subgraph: acala/examplesubgraph
$ graph deploy acala/examplesubgraph --ipfs http://127.0.0.1:5001 --node http://127.0.0.1:8020
✔ Version Label (e.g. v0.0.1) ·
Skip migration: Bump mapping apiVersion from 0.0.1 to 0.0.2
Skip migration: Bump mapping apiVersion from 0.0.2 to 0.0.3
Skip migration: Bump mapping apiVersion from 0.0.3 to 0.0.4
Skip migration: Bump mapping apiVersion from 0.0.4 to 0.0.5
Skip migration: Bump mapping specVersion from 0.0.1 to 0.0.2
✔ Load subgraph from subgraph.yaml
Compile data source: Gravity => build/Gravity/Gravity.wasm
Copy schema file build/schema.graphql
Write subgraph file build/Gravity/abis/Gravity.json
Write subgraph manifest build/subgraph.yaml
✔ Write compiled subgraph to build/
Add file to IPFS build/schema.graphql
.. QmbSFRGGvHM7Cn8YSjDL41diDMxN4LQUDEMqaa5VVc5sC4
Add file to IPFS build/Gravity/abis/Gravity.json
.. QmajZTadknSpgsCWRz9fG6bXFHdpVXPMWpx9yMipz3VtMQ
Add file to IPFS build/Gravity/Gravity.wasm
.. Qmf1LHCv7pcM4sVykN4uTocLPSwHN5o9JzWcuLU9pqHgXF
✔ Upload subgraph to IPFS
Build completed: QmWbRi1CvZGy2sKbdp549dH99KDbALZKy3133WyK1CgaHm
Deployed to http://127.0.0.1:8000/subgraphs/name/acala/examplesubgraph/graphql
Queries (HTTP): http://127.0.0.1:8000/subgraphs/name/acala/examplesubgraph
Subscriptions (WS): http://127.0.0.1:8001/subgraphs/name/acala/examplesubgraph