@graphprotocol/graph-cli 0.27.1 → 0.28.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/README.md +6 -6
  2. package/examples/basic-event-handlers/package.json +1 -1
  3. package/examples/basic-event-handlers/yarn.lock +4 -4
  4. package/examples/example-subgraph/package.json +1 -1
  5. package/examples/example-subgraph/yarn.lock +4 -4
  6. package/package.json +1 -1
  7. package/src/codegen/schema.js +105 -26
  8. package/src/codegen/schema.test.js +2 -6
  9. package/src/commands/codegen.js +1 -1
  10. package/src/commands/deploy.js +1 -1
  11. package/src/commands/init.js +1 -0
  12. package/src/protocols/index.js +34 -0
  13. package/src/protocols/tendermint/manifest.graphql +64 -0
  14. package/src/protocols/tendermint/subgraph.js +20 -0
  15. package/src/scaffold/index.js +1 -1
  16. package/src/subgraph.js +4 -0
  17. package/src/validation/manifest.js +17 -0
  18. package/src/validation/schema.js +120 -119
  19. package/tests/cli/init/ethereum/from-example/.gitattributes +1 -0
  20. package/tests/cli/init/ethereum/from-example/LICENSE +21 -0
  21. package/tests/cli/init/ethereum/from-example/README.md +3 -0
  22. package/tests/cli/init/ethereum/from-example/abis/Gravity.json +1 -0
  23. package/tests/cli/init/ethereum/from-example/bin/Counter.bin +1 -0
  24. package/tests/cli/init/ethereum/from-example/contracts/Gravity.sol +63 -0
  25. package/tests/cli/init/ethereum/from-example/contracts/Migrations.sol +23 -0
  26. package/tests/cli/init/ethereum/from-example/docker-compose.yml +39 -0
  27. package/tests/cli/init/ethereum/from-example/migrations/1_initial_migration.js +5 -0
  28. package/tests/cli/init/ethereum/from-example/migrations/2_deploy_contract.js +5 -0
  29. package/tests/cli/init/ethereum/from-example/migrations/3_create_gravatars.js +15 -0
  30. package/tests/cli/init/ethereum/from-example/package.json +23 -0
  31. package/tests/cli/init/ethereum/from-example/schema.graphql +6 -0
  32. package/tests/cli/init/ethereum/from-example/src/mapping.ts +22 -0
  33. package/tests/cli/init/ethereum/from-example/subgraph.yaml +27 -0
  34. package/tests/cli/init/ethereum/from-example/truffle.js +27 -0
  35. package/tests/cli/init/ethereum/from-example/yarn.lock +5977 -0
@@ -0,0 +1,27 @@
1
+ specVersion: 0.0.2
2
+ description: Gravatar for Ethereum
3
+ repository: https://github.com/graphprotocol/example-subgraph
4
+ schema:
5
+ file: ./schema.graphql
6
+ dataSources:
7
+ - kind: ethereum/contract
8
+ name: Gravity
9
+ network: mainnet
10
+ source:
11
+ address: '0x2E645469f354BB4F5c8a05B3b30A929361cf77eC'
12
+ abi: Gravity
13
+ mapping:
14
+ kind: ethereum/events
15
+ apiVersion: 0.0.5
16
+ language: wasm/assemblyscript
17
+ entities:
18
+ - Gravatar
19
+ abis:
20
+ - name: Gravity
21
+ file: ./abis/Gravity.json
22
+ eventHandlers:
23
+ - event: NewGravatar(uint256,address,string,string)
24
+ handler: handleNewGravatar
25
+ - event: UpdatedGravatar(uint256,address,string,string)
26
+ handler: handleUpdatedGravatar
27
+ file: ./src/mapping.ts
@@ -0,0 +1,27 @@
1
+ require('babel-register')
2
+ require('babel-polyfill')
3
+ const HDWalletProvider = require('truffle-hdwallet-provider')
4
+
5
+ module.exports = {
6
+ networks: {
7
+ development: {
8
+ host: '127.0.0.1',
9
+ port: 8545,
10
+ network_id: '*',
11
+ },
12
+ ropsten: {
13
+ provider: function() {
14
+ return new HDWalletProvider(
15
+ process.env.MNEMONIC,
16
+ `https://ropsten.infura.io/v3/${process.env.ROPSTEN_INFURA_API_KEY}`
17
+ )
18
+ },
19
+ network_id: '3',
20
+ },
21
+ },
22
+ compilers: {
23
+ solc: {
24
+ version: '0.4.25' // Fetch exact version from solc-bin (default: truffle's version)
25
+ }
26
+ }
27
+ }