Feature/fix scripts (#331)

* fix scripts
This commit is contained in:
Alex Coseru 2022-02-17 12:59:55 +02:00 committed by GitHub
parent 11b14081e9
commit f3b501b728
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 46 additions and 1135 deletions

View File

@ -64,7 +64,7 @@ jobs:
- name: create and deploy subgraph - name: create and deploy subgraph
run: | run: |
npm run quickstart:development npm run quickstart:barge
sleep 20 sleep 20
env: env:
ADDRESS_FILE: /home/runner/.ocean/ocean-contracts/artifacts/address.json ADDRESS_FILE: /home/runner/.ocean/ocean-contracts/artifacts/address.json

View File

@ -18,8 +18,8 @@
- [🏄 Get Started](#-get-started) - [🏄 Get Started](#-get-started)
- [⛵ Example Queries](#-example-queries) - [⛵ Example Queries](#-example-queries)
- [🏊 Development](#-development)
- [🏊 Development on barge](#-development-on-barge) - [🏊 Development on barge](#-development-on-barge)
- [🏊 Deploying graphs for live networks](#-Deploying-graphs-for-live-networks)
- [🔍 Testing](#-testing) - [🔍 Testing](#-testing)
- [✨ Code Style](#-code-style) - [✨ Code Style](#-code-style)
- [🛳 Releases](#-releases) - [🛳 Releases](#-releases)
@ -30,11 +30,10 @@
This subgraph is deployed under `/subgraphs/name/oceanprotocol/ocean-subgraph/` namespace for all networks the Ocean Protocol contracts are deployed to: This subgraph is deployed under `/subgraphs/name/oceanprotocol/ocean-subgraph/` namespace for all networks the Ocean Protocol contracts are deployed to:
- [subgraph.mainnet.oceanprotocol.com](https://subgraph.mainnet.oceanprotocol.com/subgraphs/name/oceanprotocol/ocean-subgraph/graphql) - [subgraphv4.ropsten.oceanprotocol.com](https://subgraphv4.ropsten.oceanprotocol.com/subgraphs/name/oceanprotocol/ocean-subgraph/graphql)
- [subgraph.ropsten.oceanprotocol.com](https://subgraph.ropsten.oceanprotocol.com/subgraphs/name/oceanprotocol/ocean-subgraph/graphql) - [subgraphv4.rinkeby.oceanprotocol.com](https://subgraphv4.rinkeby.oceanprotocol.com/subgraphs/name/oceanprotocol/ocean-subgraph/graphql)
- [subgraph.rinkeby.oceanprotocol.com](https://subgraph.rinkeby.oceanprotocol.com/subgraphs/name/oceanprotocol/ocean-subgraph/graphql) - [subgraphv4.mumbai.oceanprotocol.com](https://subgraphv4.mumbai.oceanprotocol.com/subgraphs/name/oceanprotocol/ocean-subgraph/graphql)
- [subgraph.polygon.oceanprotocol.com](https://subgraph.polygon.oceanprotocol.com/subgraphs/name/oceanprotocol/ocean-subgraph/graphql) - [subgraphv4.moonbase.oceanprotocol.com](https://subgraphv4.moonbase.oceanprotocol.com/subgraphs/name/oceanprotocol/ocean-subgraph/graphql)
- [subgraph.bsc.oceanprotocol.com](https://subgraph.bsc.oceanprotocol.com/subgraphs/name/oceanprotocol/ocean-subgraph/graphql)
## ⛵ Example Queries ## ⛵ Example Queries
@ -85,35 +84,6 @@ This subgraph is deployed under `/subgraphs/name/oceanprotocol/ocean-subgraph/`
> Note: all ETH addresses like `$userAddress` in above example need to be passed in lowercase. > Note: all ETH addresses like `$userAddress` in above example need to be passed in lowercase.
## 🏊 Development
First, clone the repo and install dependencies:
```bash
git clone https://github.com/oceanprotocol/ocean-subgraph/
cd ocean-subgraph
npm i
```
Developing and testing any change requires them to be deployed against a locally running graph-node and some other components running in Docker. Make sure you have Docker and Docker Compose installed on your machine, then prepare the Docker setup:
```bash
cd docker
./setup.sh
```
Then add your Infura key as environment variable with a `.env` file, and start everything up with Docker Compose:
```bash
# create .env and modify
cp .env.example .env
docker-compose --env-file .env up
```
The default network for development is set to Rinkeby. If you want to switch to another network you have to modify the `docker/docker-compose.yml` file within `environment.ethereum`.
You now have a local graph-node running and can start deploying your changes to it. To do so, follow the [Deployment instructions](#-deployment).
## 🏊 Development on Barge ## 🏊 Development on Barge
@ -137,37 +107,48 @@ cd ocean-subgraph
npm i npm i
``` ```
3. If you use barge, then let the components know where to pickup the smart contract addresses. For production networks, skip this step 3. Let the components know where to pickup the smart contract addresses.
``` ```
export ADDRESS_FILE="${HOME}/.ocean/ocean-contracts/artifacts/address.json" export ADDRESS_FILE="${HOME}/.ocean/ocean-contracts/artifacts/address.json"
``` ```
4. Generate the subgraphs 4. Generate the subgraphs
```bash ```bash
node ./scripts/generatenetworkssubgraphs.js node ./scripts/generatenetworkssubgraphs.js barge
npm run codegen npm run codegen
``` ```
To generate subgraph for just one network, add the network name as parameter
```bash
node ./scripts/generatenetworkssubgraphs.js rinkeby
```
5. To deploy a subgraph use: 5. To deploy a subgraph use:
npm run create:local-[network] npm run create:local-barge
npm run deploy:local-[network] npm run deploy:local-barge
```bash ```bash
npm run create:local-development npm run create:local
npm run deploy:local-development npm run deploy:local
``` ```
- Alternatively, if you want to get the sub-graph quickly running on barge, you can run `npm run quickstart:barge` which combines steps 3-5 above. - Alternatively, if you want to get the sub-graph quickly running on barge, you can run `npm run quickstart:barge` which combines steps 4-5 above.
You now have a local graph-node running on http://127.0.0.1:9000/subgraphs/name/oceanprotocol/ocean-subgraph/graphql You now have a local graph-node running on http://127.0.0.1:9000/subgraphs/name/oceanprotocol/ocean-subgraph/graphql
## 🏊 Deploying graphs for live networks
1. Clone the repo and install dependencies:
```bash
git clone https://github.com/oceanprotocol/ocean-subgraph/
cd ocean-subgraph
npm i
```
2. Generate & deploy on rinkeby
```bash
npm run quickstart:rinkeby
```
## 🔍 Testing ## 🔍 Testing

View File

@ -11,7 +11,7 @@ then
sleep 2 sleep 2
done done
export ADDRESS_FILE="/ocean-contracts/artifacts/address.json" export ADDRESS_FILE="/ocean-contracts/artifacts/address.json"
/usr/src/app/ cd /usr/src/app/
npm run quickstart:barge npm run quickstart:barge
fi fi
tail -f /dev/null tail -f /dev/null

View File

@ -3,42 +3,20 @@
"version": "1.2.0", "version": "1.2.0",
"scripts": { "scripts": {
"start": "", "start": "",
"quickstart:development": "node ./scripts/generatenetworkssubgraphs.js development && npm run codegen && npm run create:local-development && npm run deploy:local-development", "quickstart:development": "node ./scripts/generatenetworkssubgraphs.js development && npm run codegen && npm run create:local && npm run deploy:local",
"quickstart:barge": "node ./scripts/generatenetworkssubgraphs.js development && npm run codegen && npm run create:local-barge && npm run deploy:local-barge", "quickstart:barge": "node ./scripts/generatenetworkssubgraphs.js development && npm run codegen && npm run create:local-barge && npm run deploy:local-barge",
"create": "graph create oceanprotocol/ocean-subgraph --node https://api.thegraph.com/deploy/", "quickstart:rinkeby": "node ./scripts/generatenetworkssubgraphs.js rinkeby && npm run codegen && npm run create:local && npm run deploy:local",
"quickstart:ropsten": "node ./scripts/generatenetworkssubgraphs.js ropsten && npm run codegen && npm run create:local && npm run deploy:local",
"quickstart:mumbai": "node ./scripts/generatenetworkssubgraphs.js mumbai && npm run codegen && npm run create:local && npm run deploy:local",
"quickstart:moonbase": "node ./scripts/generatenetworkssubgraphs.js moonbase && npm run codegen && npm run create:local && npm run deploy:local",
"create:thegraph": "graph create oceanprotocol/ocean-subgraph --node https://api.thegraph.com/deploy/",
"create:local": "graph create oceanprotocol/ocean-subgraph --node http://127.0.0.1:8020", "create:local": "graph create oceanprotocol/ocean-subgraph --node http://127.0.0.1:8020",
"create:local-development": "graph create oceanprotocol/ocean-subgraph --node http://127.0.0.1:9020",
"create:local-barge": "graph create oceanprotocol/ocean-subgraph --node http://172.15.0.15:8020", "create:local-barge": "graph create oceanprotocol/ocean-subgraph --node http://172.15.0.15:8020",
"create:local-rinkeby": "graph create oceanprotocol/ocean-subgraph --node http://127.0.0.1:8020",
"create:local-ropsten": "graph create oceanprotocol/ocean-subgraph --node http://127.0.0.1:8020",
"create:local-polygon": "graph create oceanprotocol/ocean-subgraph --node http://127.0.0.1:8020",
"create:local-moonbeamalpha": "graph create oceanprotocol/ocean-subgraph --node http://127.0.0.1:8020",
"create:local-gaiaxtestnet": "graph create oceanprotocol/ocean-subgraph --node http://127.0.0.1:8020",
"create:local-catenaxtestnet": "graph create oceanprotocol/ocean-subgraph --node http://127.0.0.1:8020",
"create:local-mumbai": "graph create oceanprotocol/ocean-subgraph --node http://127.0.0.1:8020",
"create:local-bsc": "graph create oceanprotocol/ocean-subgraph --node http://127.0.0.1:8020",
"create:local-celoalfajores": "graph create oceanprotocol/ocean-subgraph --node http://127.0.0.1:8020",
"create:local-energyweb": "graph create oceanprotocol/ocean-subgraph --node http://127.0.0.1:8020",
"create:local-moonriver": "graph create oceanprotocol/ocean-subgraph --node http://127.0.0.1:8020",
"codegen": "graph codegen --output-dir src/@types", "codegen": "graph codegen --output-dir src/@types",
"build": "graph build", "build": "graph build",
"xx": "graph deploy --help", "deploy:thegraph": "graph deploy oceanprotocol/ocean-subgraph -l $npm_package_version --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/",
"deploy": "graph deploy oceanprotocol/ocean-subgraph -l $npm_package_version --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/",
"deploy:beta": "graph deploy oceanprotocol/ocean-subgraph-beta -l $npm_package_version --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/",
"deploy:local": "graph deploy oceanprotocol/ocean-subgraph subgraph.yaml -l $npm_package_version --debug --ipfs http://127.0.0.1:5001 --node http://127.0.0.1:8020", "deploy:local": "graph deploy oceanprotocol/ocean-subgraph subgraph.yaml -l $npm_package_version --debug --ipfs http://127.0.0.1:5001 --node http://127.0.0.1:8020",
"deploy:local-development": "graph deploy oceanprotocol/ocean-subgraph subgraph.yaml -l $npm_package_version --debug --ipfs http://127.0.0.1:5001 --node http://127.0.0.1:9020",
"deploy:local-barge": "graph deploy oceanprotocol/ocean-subgraph subgraph.yaml -l $npm_package_version --debug --ipfs http://172.15.0.16:5001 --node http://172.15.0.15:8020", "deploy:local-barge": "graph deploy oceanprotocol/ocean-subgraph subgraph.yaml -l $npm_package_version --debug --ipfs http://172.15.0.16:5001 --node http://172.15.0.15:8020",
"deploy:local-rinkeby": "graph deploy oceanprotocol/ocean-subgraph subgraph.rinkeby.yaml -l $npm_package_version --debug --ipfs http://127.0.0.1:5001 --node http://127.0.0.1:8020",
"deploy:local-ropsten": "graph deploy oceanprotocol/ocean-subgraph subgraph.ropsten.yaml -l $npm_package_version --debug --ipfs http://127.0.0.1:5001 --node http://127.0.0.1:8020",
"deploy:local-polygon": "graph deploy oceanprotocol/ocean-subgraph subgraph.polygon.yaml -l $npm_package_version --debug --ipfs http://127.0.0.1:5001 --node http://127.0.0.1:8020",
"deploy:local-moonbeamalpha": "graph deploy oceanprotocol/ocean-subgraph subgraph.moonbeamalpha.yaml -l $npm_package_version --debug --ipfs http://127.0.0.1:5001 --node http://127.0.0.1:8020",
"deploy:local-gaiaxtestnet": "graph deploy oceanprotocol/ocean-subgraph subgraph.gaiaxtestnet.yaml -l $npm_package_version --debug --ipfs http://127.0.0.1:5001 --node http://127.0.0.1:8020",
"deploy:local-catenaxtestnet": "graph deploy oceanprotocol/ocean-subgraph subgraph.catenaxtestnet.yaml -l $npm_package_version --debug --ipfs http://127.0.0.1:5001 --node http://127.0.0.1:8020",
"deploy:local-mumbai": "graph deploy oceanprotocol/ocean-subgraph subgraph.mumbai.yaml -l $npm_package_version --debug --ipfs http://127.0.0.1:5001 --node http://127.0.0.1:8020",
"deploy:local-bsc": "graph deploy oceanprotocol/ocean-subgraph subgraph.bsc.yaml -l $npm_package_version --debug --ipfs http://127.0.0.1:5001 --node http://127.0.0.1:8020",
"deploy:local-celoalfajores": "graph deploy oceanprotocol/ocean-subgraph subgraph.celoalfajores.yaml -l $npm_package_version --debug --ipfs http://127.0.0.1:5001 --node http://127.0.0.1:8020",
"deploy:local-energyweb": "graph deploy oceanprotocol/ocean-subgraph subgraph.energyweb.yaml -l $npm_package_version --debug --ipfs http://127.0.0.1:5001 --node http://127.0.0.1:8020",
"deploy:local-moonriver": "graph deploy oceanprotocol/ocean-subgraph subgraph.moonriver.yaml -l $npm_package_version --debug --ipfs http://127.0.0.1:5001 --node http://127.0.0.1:8020",
"test": "npm run codegen && npm run lint && npm run type-check", "test": "npm run codegen && npm run lint && npm run type-check",
"test-integration": "TS_NODE_PROJECT='test/integration/tsconfig.json' mocha --config=test/integration/.mocharc.json --node-env=test --exit 'test/integration/**/*.test.ts'", "test-integration": "TS_NODE_PROJECT='test/integration/tsconfig.json' mocha --config=test/integration/.mocharc.json --node-env=test --exit 'test/integration/**/*.test.ts'",
"lint": "eslint --ignore-path .gitignore --ext .js --ext .ts --ext .tsx .", "lint": "eslint --ignore-path .gitignore --ext .js --ext .ts --ext .tsx .",

View File

@ -4,18 +4,22 @@ var addresses = require('@oceanprotocol/contracts/addresses/address.json')
async function replaceContractAddresses() { async function replaceContractAddresses() {
// load addresses file first // load addresses file first
if (!process.argv[2]) {
console.error('Missing network..')
return
}
if (process.env.ADDRESS_FILE) { if (process.env.ADDRESS_FILE) {
console.log('Using custom ADDRESS_FILE instead of ocean-contracts npm dep') console.log('Using custom ADDRESS_FILE instead of ocean-contracts npm dep')
addresses = JSON.parse(fs.readFileSync(process.env.ADDRESS_FILE, 'utf8')) addresses = JSON.parse(fs.readFileSync(process.env.ADDRESS_FILE, 'utf8'))
} }
console.log(process.argv)
for (const network in addresses) { for (const network in addresses) {
if (process.argv[2] && process.argv[2] != network) { if (process.argv[2] != network) {
console.log('Skipping ' + network) console.log('Skipping ' + network)
continue continue
} }
console.log('Creating subgraph.' + network + '.yaml') console.log('Creating subgraph.yaml for ' + network)
let subgraph = fs.readFileSync('./scripts/subgraph.yaml', 'utf8') let subgraph = fs.readFileSync('./subgraph.template.yaml', 'utf8')
subgraph = subgraph.replace(/__NETWORK__/g, network) subgraph = subgraph.replace(/__NETWORK__/g, network)
subgraph = subgraph.replace( subgraph = subgraph.replace(
@ -38,9 +42,7 @@ async function replaceContractAddresses() {
/__FACTORYROUTERADDRESS__/g, /__FACTORYROUTERADDRESS__/g,
"'" + addresses[network].Router + "'" "'" + addresses[network].Router + "'"
) )
if (network != 'development') fs.writeFileSync('subgraph.yaml', subgraph, 'utf8')
fs.writeFileSync('subgraph.' + network + '.yaml', subgraph, 'utf8')
else fs.writeFileSync('subgraph.yaml', subgraph, 'utf8')
} }
} }

View File

@ -1,210 +0,0 @@
specVersion: 0.0.3
description: Ocean provides data sharing through IDOs
repository: https://github.com/oceanprotocol/ocean-subgraph
schema:
file: ./schema.graphql
dataSources:
- kind: ethereum/contract
name: ERC721Factory
network: moonbase
source:
address: '0x1Af3CC30fD18af837f7630Aff12aE2b826bD3c5D'
abi: ERC721Factory
startBlock: 1712628
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
file: ./src/mappings/erc721Factory.ts
entities:
- ERC721Factory
abis:
- name: ERC721Factory
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/ERC721Factory.sol/ERC721Factory.json
eventHandlers:
- event: NFTCreated(indexed address,indexed address,string,address,string,string)
handler: handleNftCreated
- event: TokenCreated(indexed address,indexed address,string,string,uint256,address)
handler: handleNewToken
- kind: ethereum/contract
name: FixedRateExchange
network: moonbase
source:
address: '0x3EFDD8f728c8e774aB81D14d0B2F07a8238960f4'
abi: FixedRateExchange
startBlock: 1712628
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
file: ./src/mappings/fixedRateExchange.ts
entities:
- FixedRateExchange
abis:
- name: FixedRateExchange
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/pools/fixedRate/FixedRateExchange.sol/FixedRateExchange.json
- name: ERC20
file: ./abis/ERC20.json
eventHandlers:
- event: ExchangeCreated(indexed bytes32,indexed address,indexed address,address,uint256)
handler: handleExchangeCreated
- event: ExchangeRateChanged(indexed bytes32,indexed address,uint256)
handler: handleRateChange
- event: ExchangeMintStateChanged(indexed bytes32,indexed address,bool)
handler: handleMintStateChanged
- event: ExchangeActivated(indexed bytes32,indexed address)
handler: handleActivated
- event: ExchangeDeactivated(indexed bytes32,indexed address)
handler: handleDeactivated
- event: ExchangeAllowedSwapperChanged(indexed bytes32,indexed address)
handler: handleAllowedSwapperChanged
- event: Swapped(indexed bytes32,indexed address,uint256,uint256,address,uint256,uint256,uint256)
handler: handleSwap
- event: PublishMarketFeeChanged(indexed bytes32,address,address,uint256)
handler: handlePublishMarketFeeChanged
- kind: ethereum/contract
name: Dispenser
network: moonbase
source:
address: '0x3EFDD8f728c8e774aB81D14d0B2F07a8238960f4'
abi: Dispenser
startBlock: 1712628
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
file: ./src/mappings/dispenser.ts
entities:
- Dispenser
abis:
- name: Dispenser
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/pools/dispenser/Dispenser.sol/Dispenser.json
eventHandlers:
- event: DispenserCreated(indexed address,indexed address,uint256,uint256,address)
handler: handleNewDispenser
- event: DispenserActivated(indexed address)
handler: handleActivate
- event: DispenserDeactivated(indexed address)
handler: handleDeactivate
- event: DispenserAllowedSwapperChanged(indexed address,indexed address)
handler: handleAllowedSwapperChanged
- event: TokensDispensed(indexed address,indexed address,uint256)
handler: handleTokensDispensed
- event: OwnerWithdrawed(indexed address,indexed address,uint256)
handler: handleOwnerWinthdraw
- kind: ethereum/contract
name: FactoryRouter
network: moonbase
source:
address: '0xb28Ab1AaDe4c75F8cF013136fc0c290AeaeA9BA6'
abi: FactoryRouter
startBlock: 1712628
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
file: ./src/mappings/factoryRouter.ts
entities:
- FactoryRouter
abis:
- name: FactoryRouter
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/pools/FactoryRouter.sol/FactoryRouter.json
eventHandlers:
- event: NewPool(indexed address,bool)
handler: handleNewPool
templates:
- name: ERC20Template
kind: ethereum/contract
network: moonbase
source:
abi: ERC20Template
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
file: ./src/mappings/erc20Templates.ts
entities:
- ERC20Template
abis:
- name: ERC20Template
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/templates/ERC20Template.sol/ERC20Template.json
- name: ERC20TemplateEnterprise
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/templates/ERC20TemplateEnterprise.sol/ERC20TemplateEnterprise.json
- name: ERC20
file: ./abis/ERC20.json
- name: ERC20Roles
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/utils/ERC20Roles.sol/ERC20Roles.json
eventHandlers:
- event: OrderStarted(indexed address,address,uint256,uint256,uint256,indexed address,uint256)
handler: handleOrderStarted
- event: NewPaymentCollector(indexed address,indexed address,uint256,uint256)
handler: handleNewPaymentCollector
- event: PublishMarketFee(indexed address,indexed address,uint256)
handler: handlePublishMarketFee
- event: PublishMarketFeeChanged(address,address,address,uint256)
handler: handlePublishMarketFeeChanged
- name: BPool
kind: ethereum/contract
network: moonbase
source:
abi: BPool
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
file: ./src/mappings/pool.ts
entities:
- BPool
abis:
- name: BPool
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/pools/balancer/BPool.sol/BPool.json
- name: BToken
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/pools/balancer/BToken.sol/BToken.json
- name: BMath
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/pools/balancer/BMath.sol/BMath.json
- name: ERC20
file: ./abis/ERC20.json
eventHandlers:
- event: LOG_SWAP(indexed address,indexed address,indexed address,uint256,uint256,uint256)
handler: handleSwap
- event: LOG_JOIN(indexed address,indexed address,uint256,uint256)
handler: handleJoin
- event: LOG_EXIT(indexed address,indexed address,uint256,uint256)
handler: handleExit
- event: LOG_SETUP(indexed address,indexed address,uint256,uint256,indexed address,uint256,uint256)
handler: handleSetup
- event: Transfer(indexed address,indexed address,uint256)
handler: handlerBptTransfer
- event: PublishMarketFeeChanged(address,address,uint256)
handler: handlePublishMarketFeeChanged
- event: SwapFeeChanged(address,uint256)
handler: handleSwapFeeChanged
- name: ERC721Template
kind: ethereum/contract
network: moonbase
source:
abi: ERC721Template
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
file: ./src/mappings/nftUpdate.ts
entities:
- ERC721Template
abis:
- name: ERC721Template
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/templates/ERC721Template.sol/ERC721Template.json
- name: ERC721RolesAddress
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/utils/ERC721RolesAddress.sol/ERC721RolesAddress.json
eventHandlers:
- event: MetadataCreated(indexed address,uint8,string,bytes,bytes,bytes32,uint256,uint256)
handler: handleCreated
- event: MetadataUpdated(indexed address,uint8,string,bytes,bytes,bytes32,uint256,uint256)
handler: handleUpdated
- event: MetadataState(indexed address,uint8,uint256,uint256)
handler: handleState
- event: TokenURIUpdate(indexed address,string,uint256,uint256,uint256)
handler: handleTokenUriUpdate

View File

@ -1,210 +0,0 @@
specVersion: 0.0.3
description: Ocean provides data sharing through IDOs
repository: https://github.com/oceanprotocol/ocean-subgraph
schema:
file: ./schema.graphql
dataSources:
- kind: ethereum/contract
name: ERC721Factory
network: mumbai
source:
address: '0xf02e3163Dc3409D69D88D7AcDA613432E9A18741'
abi: ERC721Factory
startBlock: 25018956
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
file: ./src/mappings/erc721Factory.ts
entities:
- ERC721Factory
abis:
- name: ERC721Factory
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/ERC721Factory.sol/ERC721Factory.json
eventHandlers:
- event: NFTCreated(indexed address,indexed address,string,address,string,string)
handler: handleNftCreated
- event: TokenCreated(indexed address,indexed address,string,string,uint256,address)
handler: handleNewToken
- kind: ethereum/contract
name: FixedRateExchange
network: mumbai
source:
address: '0xB219578a03474dDE345AC50B93198E7bf3e2a4BF'
abi: FixedRateExchange
startBlock: 25018956
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
file: ./src/mappings/fixedRateExchange.ts
entities:
- FixedRateExchange
abis:
- name: FixedRateExchange
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/pools/fixedRate/FixedRateExchange.sol/FixedRateExchange.json
- name: ERC20
file: ./abis/ERC20.json
eventHandlers:
- event: ExchangeCreated(indexed bytes32,indexed address,indexed address,address,uint256)
handler: handleExchangeCreated
- event: ExchangeRateChanged(indexed bytes32,indexed address,uint256)
handler: handleRateChange
- event: ExchangeMintStateChanged(indexed bytes32,indexed address,bool)
handler: handleMintStateChanged
- event: ExchangeActivated(indexed bytes32,indexed address)
handler: handleActivated
- event: ExchangeDeactivated(indexed bytes32,indexed address)
handler: handleDeactivated
- event: ExchangeAllowedSwapperChanged(indexed bytes32,indexed address)
handler: handleAllowedSwapperChanged
- event: Swapped(indexed bytes32,indexed address,uint256,uint256,address,uint256,uint256,uint256)
handler: handleSwap
- event: PublishMarketFeeChanged(indexed bytes32,address,address,uint256)
handler: handlePublishMarketFeeChanged
- kind: ethereum/contract
name: Dispenser
network: mumbai
source:
address: '0xB219578a03474dDE345AC50B93198E7bf3e2a4BF'
abi: Dispenser
startBlock: 25018956
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
file: ./src/mappings/dispenser.ts
entities:
- Dispenser
abis:
- name: Dispenser
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/pools/dispenser/Dispenser.sol/Dispenser.json
eventHandlers:
- event: DispenserCreated(indexed address,indexed address,uint256,uint256,address)
handler: handleNewDispenser
- event: DispenserActivated(indexed address)
handler: handleActivate
- event: DispenserDeactivated(indexed address)
handler: handleDeactivate
- event: DispenserAllowedSwapperChanged(indexed address,indexed address)
handler: handleAllowedSwapperChanged
- event: TokensDispensed(indexed address,indexed address,uint256)
handler: handleTokensDispensed
- event: OwnerWithdrawed(indexed address,indexed address,uint256)
handler: handleOwnerWinthdraw
- kind: ethereum/contract
name: FactoryRouter
network: mumbai
source:
address: '0xf9FB1f54eA825734E3a77e73A3864f4B46C815d9'
abi: FactoryRouter
startBlock: 25018956
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
file: ./src/mappings/factoryRouter.ts
entities:
- FactoryRouter
abis:
- name: FactoryRouter
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/pools/FactoryRouter.sol/FactoryRouter.json
eventHandlers:
- event: NewPool(indexed address,bool)
handler: handleNewPool
templates:
- name: ERC20Template
kind: ethereum/contract
network: mumbai
source:
abi: ERC20Template
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
file: ./src/mappings/erc20Templates.ts
entities:
- ERC20Template
abis:
- name: ERC20Template
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/templates/ERC20Template.sol/ERC20Template.json
- name: ERC20TemplateEnterprise
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/templates/ERC20TemplateEnterprise.sol/ERC20TemplateEnterprise.json
- name: ERC20
file: ./abis/ERC20.json
- name: ERC20Roles
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/utils/ERC20Roles.sol/ERC20Roles.json
eventHandlers:
- event: OrderStarted(indexed address,address,uint256,uint256,uint256,indexed address,uint256)
handler: handleOrderStarted
- event: NewPaymentCollector(indexed address,indexed address,uint256,uint256)
handler: handleNewPaymentCollector
- event: PublishMarketFee(indexed address,indexed address,uint256)
handler: handlePublishMarketFee
- event: PublishMarketFeeChanged(address,address,address,uint256)
handler: handlePublishMarketFeeChanged
- name: BPool
kind: ethereum/contract
network: mumbai
source:
abi: BPool
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
file: ./src/mappings/pool.ts
entities:
- BPool
abis:
- name: BPool
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/pools/balancer/BPool.sol/BPool.json
- name: BToken
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/pools/balancer/BToken.sol/BToken.json
- name: BMath
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/pools/balancer/BMath.sol/BMath.json
- name: ERC20
file: ./abis/ERC20.json
eventHandlers:
- event: LOG_SWAP(indexed address,indexed address,indexed address,uint256,uint256,uint256)
handler: handleSwap
- event: LOG_JOIN(indexed address,indexed address,uint256,uint256)
handler: handleJoin
- event: LOG_EXIT(indexed address,indexed address,uint256,uint256)
handler: handleExit
- event: LOG_SETUP(indexed address,indexed address,uint256,uint256,indexed address,uint256,uint256)
handler: handleSetup
- event: Transfer(indexed address,indexed address,uint256)
handler: handlerBptTransfer
- event: PublishMarketFeeChanged(address,address,uint256)
handler: handlePublishMarketFeeChanged
- event: SwapFeeChanged(address,uint256)
handler: handleSwapFeeChanged
- name: ERC721Template
kind: ethereum/contract
network: mumbai
source:
abi: ERC721Template
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
file: ./src/mappings/nftUpdate.ts
entities:
- ERC721Template
abis:
- name: ERC721Template
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/templates/ERC721Template.sol/ERC721Template.json
- name: ERC721RolesAddress
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/utils/ERC721RolesAddress.sol/ERC721RolesAddress.json
eventHandlers:
- event: MetadataCreated(indexed address,uint8,string,bytes,bytes,bytes32,uint256,uint256)
handler: handleCreated
- event: MetadataUpdated(indexed address,uint8,string,bytes,bytes,bytes32,uint256,uint256)
handler: handleUpdated
- event: MetadataState(indexed address,uint8,uint256,uint256)
handler: handleState
- event: TokenURIUpdate(indexed address,string,uint256,uint256,uint256)
handler: handleTokenUriUpdate

View File

@ -1,210 +0,0 @@
specVersion: 0.0.3
description: Ocean provides data sharing through IDOs
repository: https://github.com/oceanprotocol/ocean-subgraph
schema:
file: ./schema.graphql
dataSources:
- kind: ethereum/contract
name: ERC721Factory
network: rinkeby
source:
address: '0x1b1FE18bE79249AE8A30b3cEef03d70ca299a75b'
abi: ERC721Factory
startBlock: 10182337
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
file: ./src/mappings/erc721Factory.ts
entities:
- ERC721Factory
abis:
- name: ERC721Factory
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/ERC721Factory.sol/ERC721Factory.json
eventHandlers:
- event: NFTCreated(indexed address,indexed address,string,address,string,string)
handler: handleNftCreated
- event: TokenCreated(indexed address,indexed address,string,string,uint256,address)
handler: handleNewToken
- kind: ethereum/contract
name: FixedRateExchange
network: rinkeby
source:
address: '0x7C4Cb9BCeaB61c99012ECb7Ab1722FbCae7C007d'
abi: FixedRateExchange
startBlock: 10182337
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
file: ./src/mappings/fixedRateExchange.ts
entities:
- FixedRateExchange
abis:
- name: FixedRateExchange
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/pools/fixedRate/FixedRateExchange.sol/FixedRateExchange.json
- name: ERC20
file: ./abis/ERC20.json
eventHandlers:
- event: ExchangeCreated(indexed bytes32,indexed address,indexed address,address,uint256)
handler: handleExchangeCreated
- event: ExchangeRateChanged(indexed bytes32,indexed address,uint256)
handler: handleRateChange
- event: ExchangeMintStateChanged(indexed bytes32,indexed address,bool)
handler: handleMintStateChanged
- event: ExchangeActivated(indexed bytes32,indexed address)
handler: handleActivated
- event: ExchangeDeactivated(indexed bytes32,indexed address)
handler: handleDeactivated
- event: ExchangeAllowedSwapperChanged(indexed bytes32,indexed address)
handler: handleAllowedSwapperChanged
- event: Swapped(indexed bytes32,indexed address,uint256,uint256,address,uint256,uint256,uint256)
handler: handleSwap
- event: PublishMarketFeeChanged(indexed bytes32,address,address,uint256)
handler: handlePublishMarketFeeChanged
- kind: ethereum/contract
name: Dispenser
network: rinkeby
source:
address: '0x7C4Cb9BCeaB61c99012ECb7Ab1722FbCae7C007d'
abi: Dispenser
startBlock: 10182337
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
file: ./src/mappings/dispenser.ts
entities:
- Dispenser
abis:
- name: Dispenser
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/pools/dispenser/Dispenser.sol/Dispenser.json
eventHandlers:
- event: DispenserCreated(indexed address,indexed address,uint256,uint256,address)
handler: handleNewDispenser
- event: DispenserActivated(indexed address)
handler: handleActivate
- event: DispenserDeactivated(indexed address)
handler: handleDeactivate
- event: DispenserAllowedSwapperChanged(indexed address,indexed address)
handler: handleAllowedSwapperChanged
- event: TokensDispensed(indexed address,indexed address,uint256)
handler: handleTokensDispensed
- event: OwnerWithdrawed(indexed address,indexed address,uint256)
handler: handleOwnerWinthdraw
- kind: ethereum/contract
name: FactoryRouter
network: rinkeby
source:
address: '0x6CE85a8B9dF0aEbd6deE3593d4E9cde7398ff842'
abi: FactoryRouter
startBlock: 10182337
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
file: ./src/mappings/factoryRouter.ts
entities:
- FactoryRouter
abis:
- name: FactoryRouter
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/pools/FactoryRouter.sol/FactoryRouter.json
eventHandlers:
- event: NewPool(indexed address,bool)
handler: handleNewPool
templates:
- name: ERC20Template
kind: ethereum/contract
network: rinkeby
source:
abi: ERC20Template
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
file: ./src/mappings/erc20Templates.ts
entities:
- ERC20Template
abis:
- name: ERC20Template
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/templates/ERC20Template.sol/ERC20Template.json
- name: ERC20TemplateEnterprise
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/templates/ERC20TemplateEnterprise.sol/ERC20TemplateEnterprise.json
- name: ERC20
file: ./abis/ERC20.json
- name: ERC20Roles
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/utils/ERC20Roles.sol/ERC20Roles.json
eventHandlers:
- event: OrderStarted(indexed address,address,uint256,uint256,uint256,indexed address,uint256)
handler: handleOrderStarted
- event: NewPaymentCollector(indexed address,indexed address,uint256,uint256)
handler: handleNewPaymentCollector
- event: PublishMarketFee(indexed address,indexed address,uint256)
handler: handlePublishMarketFee
- event: PublishMarketFeeChanged(address,address,address,uint256)
handler: handlePublishMarketFeeChanged
- name: BPool
kind: ethereum/contract
network: rinkeby
source:
abi: BPool
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
file: ./src/mappings/pool.ts
entities:
- BPool
abis:
- name: BPool
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/pools/balancer/BPool.sol/BPool.json
- name: BToken
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/pools/balancer/BToken.sol/BToken.json
- name: BMath
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/pools/balancer/BMath.sol/BMath.json
- name: ERC20
file: ./abis/ERC20.json
eventHandlers:
- event: LOG_SWAP(indexed address,indexed address,indexed address,uint256,uint256,uint256)
handler: handleSwap
- event: LOG_JOIN(indexed address,indexed address,uint256,uint256)
handler: handleJoin
- event: LOG_EXIT(indexed address,indexed address,uint256,uint256)
handler: handleExit
- event: LOG_SETUP(indexed address,indexed address,uint256,uint256,indexed address,uint256,uint256)
handler: handleSetup
- event: Transfer(indexed address,indexed address,uint256)
handler: handlerBptTransfer
- event: PublishMarketFeeChanged(address,address,uint256)
handler: handlePublishMarketFeeChanged
- event: SwapFeeChanged(address,uint256)
handler: handleSwapFeeChanged
- name: ERC721Template
kind: ethereum/contract
network: rinkeby
source:
abi: ERC721Template
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
file: ./src/mappings/nftUpdate.ts
entities:
- ERC721Template
abis:
- name: ERC721Template
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/templates/ERC721Template.sol/ERC721Template.json
- name: ERC721RolesAddress
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/utils/ERC721RolesAddress.sol/ERC721RolesAddress.json
eventHandlers:
- event: MetadataCreated(indexed address,uint8,string,bytes,bytes,bytes32,uint256,uint256)
handler: handleCreated
- event: MetadataUpdated(indexed address,uint8,string,bytes,bytes,bytes32,uint256,uint256)
handler: handleUpdated
- event: MetadataState(indexed address,uint8,uint256,uint256)
handler: handleState
- event: TokenURIUpdate(indexed address,string,uint256,uint256,uint256)
handler: handleTokenUriUpdate

View File

@ -1,210 +0,0 @@
specVersion: 0.0.3
description: Ocean provides data sharing through IDOs
repository: https://github.com/oceanprotocol/ocean-subgraph
schema:
file: ./schema.graphql
dataSources:
- kind: ethereum/contract
name: ERC721Factory
network: ropsten
source:
address: '0x5D7a9F0c8E9E9af5674DEE832Cc97FC425b655Bc'
abi: ERC721Factory
startBlock: 11978747
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
file: ./src/mappings/erc721Factory.ts
entities:
- ERC721Factory
abis:
- name: ERC721Factory
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/ERC721Factory.sol/ERC721Factory.json
eventHandlers:
- event: NFTCreated(indexed address,indexed address,string,address,string,string)
handler: handleNftCreated
- event: TokenCreated(indexed address,indexed address,string,string,uint256,address)
handler: handleNewToken
- kind: ethereum/contract
name: FixedRateExchange
network: ropsten
source:
address: '0x292f3108Fe22BaF215133fEc6Ad1a99312daC8E5'
abi: FixedRateExchange
startBlock: 11978747
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
file: ./src/mappings/fixedRateExchange.ts
entities:
- FixedRateExchange
abis:
- name: FixedRateExchange
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/pools/fixedRate/FixedRateExchange.sol/FixedRateExchange.json
- name: ERC20
file: ./abis/ERC20.json
eventHandlers:
- event: ExchangeCreated(indexed bytes32,indexed address,indexed address,address,uint256)
handler: handleExchangeCreated
- event: ExchangeRateChanged(indexed bytes32,indexed address,uint256)
handler: handleRateChange
- event: ExchangeMintStateChanged(indexed bytes32,indexed address,bool)
handler: handleMintStateChanged
- event: ExchangeActivated(indexed bytes32,indexed address)
handler: handleActivated
- event: ExchangeDeactivated(indexed bytes32,indexed address)
handler: handleDeactivated
- event: ExchangeAllowedSwapperChanged(indexed bytes32,indexed address)
handler: handleAllowedSwapperChanged
- event: Swapped(indexed bytes32,indexed address,uint256,uint256,address,uint256,uint256,uint256)
handler: handleSwap
- event: PublishMarketFeeChanged(indexed bytes32,address,address,uint256)
handler: handlePublishMarketFeeChanged
- kind: ethereum/contract
name: Dispenser
network: ropsten
source:
address: '0x292f3108Fe22BaF215133fEc6Ad1a99312daC8E5'
abi: Dispenser
startBlock: 11978747
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
file: ./src/mappings/dispenser.ts
entities:
- Dispenser
abis:
- name: Dispenser
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/pools/dispenser/Dispenser.sol/Dispenser.json
eventHandlers:
- event: DispenserCreated(indexed address,indexed address,uint256,uint256,address)
handler: handleNewDispenser
- event: DispenserActivated(indexed address)
handler: handleActivate
- event: DispenserDeactivated(indexed address)
handler: handleDeactivate
- event: DispenserAllowedSwapperChanged(indexed address,indexed address)
handler: handleAllowedSwapperChanged
- event: TokensDispensed(indexed address,indexed address,uint256)
handler: handleTokensDispensed
- event: OwnerWithdrawed(indexed address,indexed address,uint256)
handler: handleOwnerWinthdraw
- kind: ethereum/contract
name: FactoryRouter
network: ropsten
source:
address: '0x9CF7215De4D862497CEdc86012EB3177044C523A'
abi: FactoryRouter
startBlock: 11978747
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
file: ./src/mappings/factoryRouter.ts
entities:
- FactoryRouter
abis:
- name: FactoryRouter
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/pools/FactoryRouter.sol/FactoryRouter.json
eventHandlers:
- event: NewPool(indexed address,bool)
handler: handleNewPool
templates:
- name: ERC20Template
kind: ethereum/contract
network: ropsten
source:
abi: ERC20Template
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
file: ./src/mappings/erc20Templates.ts
entities:
- ERC20Template
abis:
- name: ERC20Template
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/templates/ERC20Template.sol/ERC20Template.json
- name: ERC20TemplateEnterprise
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/templates/ERC20TemplateEnterprise.sol/ERC20TemplateEnterprise.json
- name: ERC20
file: ./abis/ERC20.json
- name: ERC20Roles
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/utils/ERC20Roles.sol/ERC20Roles.json
eventHandlers:
- event: OrderStarted(indexed address,address,uint256,uint256,uint256,indexed address,uint256)
handler: handleOrderStarted
- event: NewPaymentCollector(indexed address,indexed address,uint256,uint256)
handler: handleNewPaymentCollector
- event: PublishMarketFee(indexed address,indexed address,uint256)
handler: handlePublishMarketFee
- event: PublishMarketFeeChanged(address,address,address,uint256)
handler: handlePublishMarketFeeChanged
- name: BPool
kind: ethereum/contract
network: ropsten
source:
abi: BPool
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
file: ./src/mappings/pool.ts
entities:
- BPool
abis:
- name: BPool
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/pools/balancer/BPool.sol/BPool.json
- name: BToken
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/pools/balancer/BToken.sol/BToken.json
- name: BMath
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/pools/balancer/BMath.sol/BMath.json
- name: ERC20
file: ./abis/ERC20.json
eventHandlers:
- event: LOG_SWAP(indexed address,indexed address,indexed address,uint256,uint256,uint256)
handler: handleSwap
- event: LOG_JOIN(indexed address,indexed address,uint256,uint256)
handler: handleJoin
- event: LOG_EXIT(indexed address,indexed address,uint256,uint256)
handler: handleExit
- event: LOG_SETUP(indexed address,indexed address,uint256,uint256,indexed address,uint256,uint256)
handler: handleSetup
- event: Transfer(indexed address,indexed address,uint256)
handler: handlerBptTransfer
- event: PublishMarketFeeChanged(address,address,uint256)
handler: handlePublishMarketFeeChanged
- event: SwapFeeChanged(address,uint256)
handler: handleSwapFeeChanged
- name: ERC721Template
kind: ethereum/contract
network: ropsten
source:
abi: ERC721Template
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
file: ./src/mappings/nftUpdate.ts
entities:
- ERC721Template
abis:
- name: ERC721Template
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/templates/ERC721Template.sol/ERC721Template.json
- name: ERC721RolesAddress
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/utils/ERC721RolesAddress.sol/ERC721RolesAddress.json
eventHandlers:
- event: MetadataCreated(indexed address,uint8,string,bytes,bytes,bytes32,uint256,uint256)
handler: handleCreated
- event: MetadataUpdated(indexed address,uint8,string,bytes,bytes,bytes32,uint256,uint256)
handler: handleUpdated
- event: MetadataState(indexed address,uint8,uint256,uint256)
handler: handleState
- event: TokenURIUpdate(indexed address,string,uint256,uint256,uint256)
handler: handleTokenUriUpdate

View File

@ -1,210 +0,0 @@
specVersion: 0.0.3
description: Ocean provides data sharing through IDOs
repository: https://github.com/oceanprotocol/ocean-subgraph
schema:
file: ./schema.graphql
dataSources:
- kind: ethereum/contract
name: ERC721Factory
network: development
source:
address: '0x312213d6f6b5FCF9F56B7B8946A6C727Bf4Bc21f'
abi: ERC721Factory
startBlock: 5
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
file: ./src/mappings/erc721Factory.ts
entities:
- ERC721Factory
abis:
- name: ERC721Factory
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/ERC721Factory.sol/ERC721Factory.json
eventHandlers:
- event: NFTCreated(indexed address,indexed address,string,address,string,string)
handler: handleNftCreated
- event: TokenCreated(indexed address,indexed address,string,string,uint256,address)
handler: handleNewToken
- kind: ethereum/contract
name: FixedRateExchange
network: development
source:
address: '0x98b6901cE7C9fc65dBeeC98598136593EB7b4c6C'
abi: FixedRateExchange
startBlock: 5
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
file: ./src/mappings/fixedRateExchange.ts
entities:
- FixedRateExchange
abis:
- name: FixedRateExchange
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/pools/fixedRate/FixedRateExchange.sol/FixedRateExchange.json
- name: ERC20
file: ./abis/ERC20.json
eventHandlers:
- event: ExchangeCreated(indexed bytes32,indexed address,indexed address,address,uint256)
handler: handleExchangeCreated
- event: ExchangeRateChanged(indexed bytes32,indexed address,uint256)
handler: handleRateChange
- event: ExchangeMintStateChanged(indexed bytes32,indexed address,bool)
handler: handleMintStateChanged
- event: ExchangeActivated(indexed bytes32,indexed address)
handler: handleActivated
- event: ExchangeDeactivated(indexed bytes32,indexed address)
handler: handleDeactivated
- event: ExchangeAllowedSwapperChanged(indexed bytes32,indexed address)
handler: handleAllowedSwapperChanged
- event: Swapped(indexed bytes32,indexed address,uint256,uint256,address,uint256,uint256,uint256)
handler: handleSwap
- event: PublishMarketFeeChanged(indexed bytes32,address,address,uint256)
handler: handlePublishMarketFeeChanged
- kind: ethereum/contract
name: Dispenser
network: development
source:
address: '0x98b6901cE7C9fc65dBeeC98598136593EB7b4c6C'
abi: Dispenser
startBlock: 5
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
file: ./src/mappings/dispenser.ts
entities:
- Dispenser
abis:
- name: Dispenser
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/pools/dispenser/Dispenser.sol/Dispenser.json
eventHandlers:
- event: DispenserCreated(indexed address,indexed address,uint256,uint256,address)
handler: handleNewDispenser
- event: DispenserActivated(indexed address)
handler: handleActivate
- event: DispenserDeactivated(indexed address)
handler: handleDeactivate
- event: DispenserAllowedSwapperChanged(indexed address,indexed address)
handler: handleAllowedSwapperChanged
- event: TokensDispensed(indexed address,indexed address,uint256)
handler: handleTokensDispensed
- event: OwnerWithdrawed(indexed address,indexed address,uint256)
handler: handleOwnerWinthdraw
- kind: ethereum/contract
name: FactoryRouter
network: development
source:
address: '0xBb0911124E680D65358Ac46C5404D4dF01F03e80'
abi: FactoryRouter
startBlock: 5
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
file: ./src/mappings/factoryRouter.ts
entities:
- FactoryRouter
abis:
- name: FactoryRouter
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/pools/FactoryRouter.sol/FactoryRouter.json
eventHandlers:
- event: NewPool(indexed address,bool)
handler: handleNewPool
templates:
- name: ERC20Template
kind: ethereum/contract
network: development
source:
abi: ERC20Template
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
file: ./src/mappings/erc20Templates.ts
entities:
- ERC20Template
abis:
- name: ERC20Template
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/templates/ERC20Template.sol/ERC20Template.json
- name: ERC20TemplateEnterprise
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/templates/ERC20TemplateEnterprise.sol/ERC20TemplateEnterprise.json
- name: ERC20
file: ./abis/ERC20.json
- name: ERC20Roles
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/utils/ERC20Roles.sol/ERC20Roles.json
eventHandlers:
- event: OrderStarted(indexed address,address,uint256,uint256,uint256,indexed address,uint256)
handler: handleOrderStarted
- event: NewPaymentCollector(indexed address,indexed address,uint256,uint256)
handler: handleNewPaymentCollector
- event: PublishMarketFee(indexed address,indexed address,uint256)
handler: handlePublishMarketFee
- event: PublishMarketFeeChanged(address,address,address,uint256)
handler: handlePublishMarketFeeChanged
- name: BPool
kind: ethereum/contract
network: development
source:
abi: BPool
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
file: ./src/mappings/pool.ts
entities:
- BPool
abis:
- name: BPool
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/pools/balancer/BPool.sol/BPool.json
- name: BToken
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/pools/balancer/BToken.sol/BToken.json
- name: BMath
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/pools/balancer/BMath.sol/BMath.json
- name: ERC20
file: ./abis/ERC20.json
eventHandlers:
- event: LOG_SWAP(indexed address,indexed address,indexed address,uint256,uint256,uint256)
handler: handleSwap
- event: LOG_JOIN(indexed address,indexed address,uint256,uint256)
handler: handleJoin
- event: LOG_EXIT(indexed address,indexed address,uint256,uint256)
handler: handleExit
- event: LOG_SETUP(indexed address,indexed address,uint256,uint256,indexed address,uint256,uint256)
handler: handleSetup
- event: Transfer(indexed address,indexed address,uint256)
handler: handlerBptTransfer
- event: PublishMarketFeeChanged(address,address,uint256)
handler: handlePublishMarketFeeChanged
- event: SwapFeeChanged(address,uint256)
handler: handleSwapFeeChanged
- name: ERC721Template
kind: ethereum/contract
network: development
source:
abi: ERC721Template
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
file: ./src/mappings/nftUpdate.ts
entities:
- ERC721Template
abis:
- name: ERC721Template
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/templates/ERC721Template.sol/ERC721Template.json
- name: ERC721RolesAddress
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/utils/ERC721RolesAddress.sol/ERC721RolesAddress.json
eventHandlers:
- event: MetadataCreated(indexed address,uint8,string,bytes,bytes,bytes32,uint256,uint256)
handler: handleCreated
- event: MetadataUpdated(indexed address,uint8,string,bytes,bytes,bytes32,uint256,uint256)
handler: handleUpdated
- event: MetadataState(indexed address,uint8,uint256,uint256)
handler: handleState
- event: TokenURIUpdate(indexed address,string,uint256,uint256,uint256)
handler: handleTokenUriUpdate