mirror of
https://github.com/oceanprotocol/ocean-subgraph.git
synced 2024-12-02 05:57:29 +01:00
fix deploy
This commit is contained in:
parent
736c5bb5db
commit
271ea50672
@ -1,7 +1,7 @@
|
|||||||
version: '3'
|
version: '3'
|
||||||
services:
|
services:
|
||||||
graph-node:
|
graph-node:
|
||||||
image: oceanprotocol/graph-node:latest
|
image: graphprotocol/graph-node:v0.25.0
|
||||||
ports:
|
ports:
|
||||||
- '8000:8000'
|
- '8000:8000'
|
||||||
- '8001:8001'
|
- '8001:8001'
|
||||||
@ -17,7 +17,7 @@ services:
|
|||||||
postgres_pass: let-me-in
|
postgres_pass: let-me-in
|
||||||
postgres_db: graph-node
|
postgres_db: graph-node
|
||||||
ipfs: 'ipfs:5001'
|
ipfs: 'ipfs:5001'
|
||||||
ethereum: 'barge:http://172.15.0.3:8545'
|
ethereum: 'rinkeby:https://rinkeby.infura.io/v3/${INFURA_PROJECT_ID}'
|
||||||
RUST_LOG: info
|
RUST_LOG: info
|
||||||
ipfs:
|
ipfs:
|
||||||
image: ipfs/go-ipfs:v0.4.23
|
image: ipfs/go-ipfs:v0.4.23
|
||||||
|
@ -391,22 +391,20 @@ type PoolSnapshot @entity {
|
|||||||
type GlobalStats @entity {
|
type GlobalStats @entity {
|
||||||
id: ID!
|
id: ID!
|
||||||
|
|
||||||
"total value locked represented in the base token , basically 2x liqudity for each base token"
|
|
||||||
totalValueLocked: [TokenValuePair!]
|
|
||||||
"total liquidity for each base token"
|
"total liquidity for each base token"
|
||||||
totalLiquidity: [TokenValuePair!]
|
totalLiquidity: [TokenValuePair!]!
|
||||||
"total swap volume for each base token. pools and fre"
|
"total swap volume for each base token. pools and fre"
|
||||||
totalSwapVolume: [TokenValuePair!]
|
totalSwapVolume: [TokenValuePair!]!
|
||||||
|
|
||||||
"number of total consumes, pools + fre"
|
"number of total consumes, pools + fre+ free"
|
||||||
orderCount: BigInt
|
orderCount: BigInt!
|
||||||
|
|
||||||
"number of pools for all factories"
|
"total nfts created"
|
||||||
poolCount: Int!
|
nftCount: BigInt!
|
||||||
"number of finalized pools for all factories"
|
"total datatokens created"
|
||||||
finalizedPoolCount: Int!
|
datatokenCount:BigInt!
|
||||||
"probably remove due to inconsistencies and imposibility to calculate"
|
"number of pools"
|
||||||
totalOrderVolume: BigDecimal
|
poolCount: Int!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,11 +1,8 @@
|
|||||||
import { Order } from '../@types/schema'
|
import { Order } from '../@types/schema'
|
||||||
import {
|
import { OrderStarted } from '../@types/templates/ERC20Template/ERC20Template'
|
||||||
ConsumeMarketFees,
|
|
||||||
OrderStarted,
|
|
||||||
PublishMarketFees
|
|
||||||
} from '../@types/templates/ERC20Template/ERC20Template'
|
|
||||||
import { integer } from './utils/constants'
|
import { integer } from './utils/constants'
|
||||||
import { weiToDecimal } from './utils/generic'
|
import { weiToDecimal } from './utils/generic'
|
||||||
|
import { getGlobalStats } from './utils/globalUtils'
|
||||||
import { getToken } from './utils/tokenUtils'
|
import { getToken } from './utils/tokenUtils'
|
||||||
import { getUser } from './utils/userUtils'
|
import { getUser } from './utils/userUtils'
|
||||||
|
|
||||||
@ -53,6 +50,10 @@ export function handleOrderStarted(event: OrderStarted): void {
|
|||||||
order.tx = event.transaction.hash.toHex()
|
order.tx = event.transaction.hash.toHex()
|
||||||
order.block = event.block.number.toI32()
|
order.block = event.block.number.toI32()
|
||||||
|
|
||||||
|
const globalStats = getGlobalStats()
|
||||||
|
globalStats.orderCount = globalStats.orderCount.plus(integer.ONE)
|
||||||
|
|
||||||
|
globalStats.save()
|
||||||
order.save()
|
order.save()
|
||||||
token.save()
|
token.save()
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { NFTCreated, TokenCreated } from '../@types/ERC721Factory/ERC721Factory'
|
import { NFTCreated, TokenCreated } from '../@types/ERC721Factory/ERC721Factory'
|
||||||
import { Nft, Token } from '../@types/schema'
|
import { Nft, Token } from '../@types/schema'
|
||||||
import { decimal } from './utils/constants'
|
import { decimal, integer } from './utils/constants'
|
||||||
|
import { getGlobalStats } from './utils/globalUtils'
|
||||||
import { getUser } from './utils/userUtils'
|
import { getUser } from './utils/userUtils'
|
||||||
|
|
||||||
export function handleNftCreated(event: NFTCreated): void {
|
export function handleNftCreated(event: NFTCreated): void {
|
||||||
@ -15,6 +16,10 @@ export function handleNftCreated(event: NFTCreated): void {
|
|||||||
nft.tx = event.transaction.hash.toHex()
|
nft.tx = event.transaction.hash.toHex()
|
||||||
nft.block = event.block.number.toI32()
|
nft.block = event.block.number.toI32()
|
||||||
|
|
||||||
|
const globalStats = getGlobalStats()
|
||||||
|
globalStats.nftCount = globalStats.nftCount.plus(integer.ONE)
|
||||||
|
|
||||||
|
globalStats.save()
|
||||||
nft.save()
|
nft.save()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -29,5 +34,10 @@ export function handleNewToken(event: TokenCreated): void {
|
|||||||
token.name = event.params.name
|
token.name = event.params.name
|
||||||
token.decimals = 18
|
token.decimals = 18
|
||||||
token.supply = decimal.ZERO
|
token.supply = decimal.ZERO
|
||||||
|
|
||||||
|
const globalStats = getGlobalStats()
|
||||||
|
globalStats.datatokenCount = globalStats.datatokenCount.plus(integer.ONE)
|
||||||
|
|
||||||
|
globalStats.save()
|
||||||
token.save()
|
token.save()
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
import { Pool } from '../@types/schema'
|
import { Pool } from '../@types/schema'
|
||||||
import { BPoolCreated } from '../@types/templates/BFactory/BFactory'
|
import { BPoolCreated } from '../@types/templates/BFactory/BFactory'
|
||||||
|
import { integer } from './utils/constants'
|
||||||
|
import { getGlobalStats } from './utils/globalUtils'
|
||||||
import { getToken } from './utils/tokenUtils'
|
import { getToken } from './utils/tokenUtils'
|
||||||
|
|
||||||
export function handleNewPool(event: BPoolCreated): void {
|
export function handleNewPool(event: BPoolCreated): void {
|
||||||
@ -17,5 +19,8 @@ export function handleNewPool(event: BPoolCreated): void {
|
|||||||
pool.tx = event.transaction.hash.toHex()
|
pool.tx = event.transaction.hash.toHex()
|
||||||
pool.block = event.block.number.toI32()
|
pool.block = event.block.number.toI32()
|
||||||
|
|
||||||
|
const globalStats = getGlobalStats()
|
||||||
|
globalStats.poolCount = globalStats.poolCount + 1
|
||||||
|
globalStats.save()
|
||||||
pool.save()
|
pool.save()
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@ const network = dataSource.network()
|
|||||||
export function getOceanAddress(): string {
|
export function getOceanAddress(): string {
|
||||||
// switch is not working for some reason
|
// switch is not working for some reason
|
||||||
if (network == 'ropsten') return '0x5e8dcb2afa23844bcc311b00ad1a0c30025aade9'
|
if (network == 'ropsten') return '0x5e8dcb2afa23844bcc311b00ad1a0c30025aade9'
|
||||||
if (network == 'rinkeby') return '0x8967bcf84170c91b0d24d4302c2376283b0b3a07'
|
if (network == 'rinkeby') return '0x5e8DCB2AfA23844bcc311B00Ad1A0C30025aADE9'
|
||||||
if (network == 'polygon') return '0x282d8efce846a88b159800bd4130ad77443fa1a1'
|
if (network == 'polygon') return '0x282d8efce846a88b159800bd4130ad77443fa1a1'
|
||||||
if (network == 'moonbeamalpha')
|
if (network == 'moonbeamalpha')
|
||||||
return '0xf6410bf5d773c7a41ebff972f38e7463fa242477'
|
return '0xf6410bf5d773c7a41ebff972f38e7463fa242477'
|
||||||
@ -24,6 +24,29 @@ export function getOceanAddress(): string {
|
|||||||
return '0x967da4048cd07ab37855c090aaf366e4ce1b9f48'
|
return '0x967da4048cd07ab37855c090aaf366e4ce1b9f48'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getOpfCollectorAddress(): string {
|
||||||
|
// switch is not working for some reason
|
||||||
|
if (network == 'ropsten') return '0x5e8dcb2afa23844bcc311b00ad1a0c30025aade9'
|
||||||
|
if (network == 'rinkeby') return '0x2f311Ba88e2609D3A100822EdAC798eb0a8F4835'
|
||||||
|
if (network == 'polygon') return '0x282d8efce846a88b159800bd4130ad77443fa1a1'
|
||||||
|
if (network == 'moonbeamalpha')
|
||||||
|
return '0xf6410bf5d773c7a41ebff972f38e7463fa242477'
|
||||||
|
if (network == 'gaiaxtestnet')
|
||||||
|
return '0x80e63f73cac60c1662f27d2dfd2ea834acddbaa8'
|
||||||
|
if (network == 'catenaxtestnet')
|
||||||
|
return '0x80e63f73cac60c1662f27d2dfd2ea834acddbaa8'
|
||||||
|
if (network == 'mumbai') return '0xd8992ed72c445c35cb4a2be468568ed1079357c8'
|
||||||
|
if (network == 'bsc') return '0xdce07662ca8ebc241316a15b611c89711414dd1a'
|
||||||
|
if (network == 'celoalfajores')
|
||||||
|
return '0xd8992ed72c445c35cb4a2be468568ed1079357c8'
|
||||||
|
if (network == 'energyweb')
|
||||||
|
return '0x593122aae80a6fc3183b2ac0c4ab3336debee528'
|
||||||
|
if (network == 'moonriver')
|
||||||
|
return '0x99c409e5f62e4bd2ac142f17cafb6810b8f0baae'
|
||||||
|
return '0x967da4048cd07ab37855c090aaf366e4ce1b9f48'
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
export const OCEAN: string = getOceanAddress()
|
export const OCEAN: string = getOceanAddress()
|
||||||
|
|
||||||
export function weiToDecimal(amount: BigDecimal, decimals: i32): BigDecimal {
|
export function weiToDecimal(amount: BigDecimal, decimals: i32): BigDecimal {
|
||||||
|
@ -1,3 +1,16 @@
|
|||||||
const GLOBAL_ID = 1
|
import { BigDecimal } from '@graphprotocol/graph-ts'
|
||||||
|
import { GlobalStats } from '../../@types/schema'
|
||||||
|
|
||||||
export function getGlobalStats(): void {}
|
const GLOBAL_ID = '1'
|
||||||
|
|
||||||
|
export function getGlobalStats(): GlobalStats {
|
||||||
|
let globalStats = GlobalStats.load(GLOBAL_ID)
|
||||||
|
if (!globalStats) globalStats = new GlobalStats(GLOBAL_ID)
|
||||||
|
return globalStats
|
||||||
|
}
|
||||||
|
|
||||||
|
export function addSwap(tokenAddress: string, value: BigDecimal): void {
|
||||||
|
const globalStats = getGlobalStats()
|
||||||
|
|
||||||
|
globalStats.save()
|
||||||
|
}
|
||||||
|
@ -6,7 +6,7 @@ import {
|
|||||||
PoolTransaction
|
PoolTransaction
|
||||||
} from '../../@types/schema'
|
} from '../../@types/schema'
|
||||||
import { BPool } from '../../@types/templates/BPool/BPool'
|
import { BPool } from '../../@types/templates/BPool/BPool'
|
||||||
import { DAY, decimal, PoolTransactionType } from './constants'
|
import { DAY, decimal } from './constants'
|
||||||
import { gweiToEth, weiToDecimal } from './generic'
|
import { gweiToEth, weiToDecimal } from './generic'
|
||||||
|
|
||||||
export function getPoolSharesId(
|
export function getPoolSharesId(
|
||||||
@ -124,40 +124,3 @@ export function getPoolSnapshot(
|
|||||||
|
|
||||||
return snapshot
|
return snapshot
|
||||||
}
|
}
|
||||||
|
|
||||||
// export function updatePoolSnapshotToken(
|
|
||||||
// poolAddress: string,
|
|
||||||
// timestamp: i32,
|
|
||||||
// poolTokenId: string,
|
|
||||||
// amount: BigDecimal,
|
|
||||||
// balance: BigDecimal,
|
|
||||||
// feeValue: BigDecimal
|
|
||||||
// ): void {
|
|
||||||
// log.warning('Start create Pool Snapshot Token: {} {}', [
|
|
||||||
// poolAddress,
|
|
||||||
// timestamp.toString()
|
|
||||||
// ])
|
|
||||||
// const dayTimestamp = timestamp - (timestamp % DAY) // Todays timestamp
|
|
||||||
|
|
||||||
// const snapshotId = poolAddress + '-' + dayTimestamp.toString()
|
|
||||||
// log.warning('Pool Snapshot Token: {} {} {} {}', [
|
|
||||||
// amount.toString(),
|
|
||||||
// balance.toString(),
|
|
||||||
// feeValue.toString(),
|
|
||||||
// snapshotId + '-' + poolTokenId
|
|
||||||
// ])
|
|
||||||
// const token = new PoolSnapshotTokenValue(snapshotId + '-' + poolTokenId)
|
|
||||||
|
|
||||||
// token.poolSnapshot = snapshotId
|
|
||||||
// token.value = amount
|
|
||||||
// token.tokenReserve = balance
|
|
||||||
// token.tokenAddress = poolTokenId
|
|
||||||
// token.feeValue = feeValue
|
|
||||||
// if (amount.lt(ZERO_BD)) {
|
|
||||||
// token.type = 'out'
|
|
||||||
// } else {
|
|
||||||
// token.type = 'in'
|
|
||||||
// }
|
|
||||||
// log.warning('Snapshot Token ID: {}', [token.id])
|
|
||||||
// token.save()
|
|
||||||
// }
|
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
import { Address } from '@graphprotocol/graph-ts'
|
import { Address } from '@graphprotocol/graph-ts'
|
||||||
import { Token } from '../../@types/schema'
|
import { Token } from '../../@types/schema'
|
||||||
import { ERC20 } from '../../@types/templates/ERC20Template/ERC20'
|
import { ERC20 } from '../../@types/templates/ERC20Template/ERC20'
|
||||||
|
import { integer } from './constants'
|
||||||
|
import { getGlobalStats } from './globalUtils'
|
||||||
|
|
||||||
export function createToken(address: string): Token {
|
export function createToken(address: string): Token {
|
||||||
const token = new Token(address)
|
const token = new Token(address)
|
||||||
@ -10,6 +12,10 @@ export function createToken(address: string): Token {
|
|||||||
token.address = address
|
token.address = address
|
||||||
token.isDatatoken = false
|
token.isDatatoken = false
|
||||||
token.decimals = contract.decimals()
|
token.decimals = contract.decimals()
|
||||||
|
const globalStats = getGlobalStats()
|
||||||
|
globalStats.datatokenCount = globalStats.datatokenCount.plus(integer.ONE)
|
||||||
|
|
||||||
|
globalStats.save()
|
||||||
token.save()
|
token.save()
|
||||||
return token
|
return token
|
||||||
}
|
}
|
||||||
|
@ -1,112 +1,70 @@
|
|||||||
specVersion: 0.0.2
|
specVersion: 0.0.3
|
||||||
description: Ocean provides data sharing through IDOs
|
description: Ocean provides data sharing through IDOs
|
||||||
repository: https://github.com/oceanprotocol/ocean-subgraph
|
repository: https://github.com/oceanprotocol/ocean-subgraph
|
||||||
schema:
|
schema:
|
||||||
file: ./schema.graphql
|
file: ./schema.graphql
|
||||||
dataSources:
|
dataSources:
|
||||||
- kind: ethereum/contract
|
- kind: ethereum/contract
|
||||||
name: Factory
|
name: ERC721Factory
|
||||||
network: rinkeby
|
network: rinkeby
|
||||||
source:
|
source:
|
||||||
address: '0x53eDF9289B0898e1652Ce009AACf8D25fA9A42F8'
|
address: '0xa15024b732A8f2146423D14209eFd074e61964F3'
|
||||||
abi: Factory
|
abi: ERC721Factory
|
||||||
startBlock: 7298806
|
startBlock: 0
|
||||||
mapping:
|
mapping:
|
||||||
kind: ethereum/events
|
kind: ethereum/events
|
||||||
apiVersion: 0.0.5
|
apiVersion: 0.0.5
|
||||||
language: wasm/assemblyscript
|
language: wasm/assemblyscript
|
||||||
file: ./src/mappings/factory.ts
|
file: ./src/mappings/erc721Factory.ts
|
||||||
entities:
|
entities:
|
||||||
- PoolFactory
|
- ERC721Factory
|
||||||
abis:
|
abis:
|
||||||
- name: Factory
|
- name: ERC721Factory
|
||||||
file: ./abis/BFactory.json
|
file: ./abis/ERC721Factory.json
|
||||||
eventHandlers:
|
eventHandlers:
|
||||||
- event: BPoolRegistered(address,indexed address)
|
- event: NFTCreated(indexed address,indexed address,string,address,string,string)
|
||||||
handler: handleNewPool
|
handler: handleNftCreated
|
||||||
- kind: ethereum/contract
|
- event: TokenCreated(indexed address,indexed address,string,string,uint256,address)
|
||||||
name: DTFactory
|
|
||||||
network: rinkeby
|
|
||||||
source:
|
|
||||||
address: '0x3fd7A00106038Fb5c802c6d63fa7147Fe429E83a'
|
|
||||||
abi: DTFactory
|
|
||||||
startBlock: 7298804
|
|
||||||
mapping:
|
|
||||||
kind: ethereum/events
|
|
||||||
apiVersion: 0.0.5
|
|
||||||
language: wasm/assemblyscript
|
|
||||||
file: ./src/mappings/dtfactory.ts
|
|
||||||
entities:
|
|
||||||
- DatatokenFactory
|
|
||||||
abis:
|
|
||||||
- name: DTFactory
|
|
||||||
file: ./abis/DTFactory.json
|
|
||||||
eventHandlers:
|
|
||||||
- event: TokenRegistered(indexed address,string,string,uint256,indexed address,indexed string)
|
|
||||||
handler: handleNewToken
|
handler: handleNewToken
|
||||||
- kind: ethereum/contract
|
|
||||||
name: Metadata
|
|
||||||
network: rinkeby
|
|
||||||
source:
|
|
||||||
address: '0xfd8a7b6297153397b7eb4356c47dbd381d58bff4'
|
|
||||||
abi: Metadata
|
|
||||||
startBlock: 7298808
|
|
||||||
mapping:
|
|
||||||
kind: ethereum/events
|
|
||||||
apiVersion: 0.0.5
|
|
||||||
language: wasm/assemblyscript
|
|
||||||
file: ./src/mappings/metadata.ts
|
|
||||||
entities:
|
|
||||||
- Metadata
|
|
||||||
abis:
|
|
||||||
- name: Metadata
|
|
||||||
file: ./abis/Metadata.json
|
|
||||||
eventHandlers:
|
|
||||||
- event: MetadataCreated(indexed address,indexed address,bytes,bytes)
|
|
||||||
handler: handleMetadataCreated
|
|
||||||
- event: MetadataUpdated(indexed address,indexed address,bytes,bytes)
|
|
||||||
handler: handleMetadataUpdated
|
|
||||||
- kind: ethereum/contract
|
- kind: ethereum/contract
|
||||||
name: FixedRateExchange
|
name: FixedRateExchange
|
||||||
network: rinkeby
|
network: rinkeby
|
||||||
source:
|
source:
|
||||||
address: '0xeD1DfC5F3a589CfC4E8B91C1fbfC18FC6699Fbde'
|
address: '0x235C9bE4D23dCbd16c1Bf89ec839cb7C452FD9e9'
|
||||||
abi: FixedRateExchange
|
abi: FixedRateExchange
|
||||||
startBlock: 7298808
|
startBlock: 0
|
||||||
mapping:
|
mapping:
|
||||||
kind: ethereum/events
|
kind: ethereum/events
|
||||||
apiVersion: 0.0.5
|
apiVersion: 0.0.5
|
||||||
language: wasm/assemblyscript
|
language: wasm/assemblyscript
|
||||||
file: ./src/mappings/fixedrateexchange.ts
|
file: ./src/mappings/fixedRateExchange.ts
|
||||||
entities:
|
entities:
|
||||||
- FixedRateExchange
|
- FixedRateExchange
|
||||||
abis:
|
abis:
|
||||||
- name: FixedRateExchange
|
- name: FixedRateExchange
|
||||||
file: ./abis/FixedRateExchange.json
|
file: ./abis/FixedRateExchange.json
|
||||||
- name: ERC20
|
|
||||||
file: ./abis/ERC20.json
|
|
||||||
- name: ERC20SymbolBytes
|
|
||||||
file: ./abis/ERC20SymbolBytes.json
|
|
||||||
- name: ERC20NameBytes
|
|
||||||
file: ./abis/ERC20NameBytes.json
|
|
||||||
eventHandlers:
|
eventHandlers:
|
||||||
- event: ExchangeCreated(indexed bytes32,indexed address,indexed address,address,uint256)
|
- event: ExchangeCreated(indexed bytes32,indexed address,indexed address,address,uint256)
|
||||||
handler: handleExchangeCreated
|
handler: handleExchangeCreated
|
||||||
- event: ExchangeActivated(indexed bytes32,indexed address)
|
|
||||||
handler: handleExchangeActivated
|
|
||||||
- event: ExchangeDeactivated(indexed bytes32,indexed address)
|
|
||||||
handler: handleExchangeDeactivated
|
|
||||||
- event: ExchangeRateChanged(indexed bytes32,indexed address,uint256)
|
- event: ExchangeRateChanged(indexed bytes32,indexed address,uint256)
|
||||||
handler: handleExchangeRateChanged
|
handler: handleRateChange
|
||||||
- event: Swapped(indexed bytes32,indexed address,uint256,uint256)
|
- event: ExchangeMintStateChanged(indexed bytes32,indexed address,bool)
|
||||||
handler: handleSwapped
|
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)
|
||||||
|
handler: handleSwap
|
||||||
- kind: ethereum/contract
|
- kind: ethereum/contract
|
||||||
name: Dispenser
|
name: Dispenser
|
||||||
network: rinkeby
|
network: rinkeby
|
||||||
source:
|
source:
|
||||||
address: '0x623744Cd25Ed553d3b4722667697F926cf99658B'
|
address: '0x5FFE6649C7562F3bee1ca114c7c3316BF4B45b50'
|
||||||
abi: Dispenser
|
abi: Dispenser
|
||||||
startBlock: 8554110
|
startBlock: 0
|
||||||
mapping:
|
mapping:
|
||||||
kind: ethereum/events
|
kind: ethereum/events
|
||||||
apiVersion: 0.0.5
|
apiVersion: 0.0.5
|
||||||
@ -118,96 +76,122 @@ dataSources:
|
|||||||
- name: Dispenser
|
- name: Dispenser
|
||||||
file: ./abis/Dispenser.json
|
file: ./abis/Dispenser.json
|
||||||
eventHandlers:
|
eventHandlers:
|
||||||
- event: Activated(indexed address)
|
- event: DispenserCreated(indexed address,indexed address,uint256,uint256,address)
|
||||||
handler: handleDispenserActivated
|
handler: handleNewDispenser
|
||||||
- event: Deactivated(indexed address)
|
- event: DispenserActivated(indexed address)
|
||||||
handler: handleDispenserDeactivated
|
handler: handleActivate
|
||||||
- event: AcceptedMinter(indexed address)
|
- event: DispenserDeactivated(indexed address)
|
||||||
handler: handleDispenserAcceptedMinter
|
handler: handleDeactivate
|
||||||
- event: RemovedMinter(indexed address)
|
- event: DispenserAllowedSwapperChanged(indexed address,indexed address)
|
||||||
handler: handleDispenserRemovedMinter
|
handler: handleAllowedSwapperChanged
|
||||||
- event: TokensDispensed(indexed address,indexed address,uint256)
|
- event: TokensDispensed(indexed address,indexed address,uint256)
|
||||||
handler: handleDispenserTokensDispensed
|
handler: handleTokensDispensed
|
||||||
- event: OwnerWithdrawed(indexed address,indexed address,uint256)
|
- event: OwnerWithdrawed(indexed address,indexed address,uint256)
|
||||||
handler: handleDispenserOwnerWithdrawed
|
handler: handleOwnerWinthdraw
|
||||||
templates:
|
templates:
|
||||||
- kind: ethereum/contract
|
- name: ERC20Template
|
||||||
name: Pool
|
kind: ethereum/contract
|
||||||
network: rinkeby
|
network: rinkeby
|
||||||
source:
|
source:
|
||||||
abi: Pool
|
abi: ERC20Template
|
||||||
|
mapping:
|
||||||
|
kind: ethereum/events
|
||||||
|
apiVersion: 0.0.5
|
||||||
|
language: wasm/assemblyscript
|
||||||
|
file: ./src/mappings/erc20Templates.ts
|
||||||
|
entities:
|
||||||
|
- ERC20Template
|
||||||
|
abis:
|
||||||
|
- name: ERC20Template
|
||||||
|
file: ./abis/ERC20Template.json
|
||||||
|
- name: ERC20TemplateEnterprise
|
||||||
|
file: ./abis/ERC20TemplateEnterprise.json
|
||||||
|
- name: ERC20
|
||||||
|
file: ./abis/ERC20.json
|
||||||
|
- name: ERC20Roles
|
||||||
|
file: ./abis/ERC20Roles.json
|
||||||
|
eventHandlers:
|
||||||
|
- event: OrderStarted(indexed address,address,uint256,uint256,uint256,indexed address,indexed address,uint256)
|
||||||
|
handler: handleOrderStarted
|
||||||
|
- event: NewPaymentCollector(indexed address,indexed address,uint256,uint256)
|
||||||
|
handler: handleNewPaymentCollector
|
||||||
|
- event: PublishMarketFees(indexed address,indexed address,uint256)
|
||||||
|
handler: handlePublishMarketFees
|
||||||
|
- event: ConsumeMarketFees(indexed address,indexed address,uint256)
|
||||||
|
handler: handleConsumeMarketFees
|
||||||
|
- kind: ethereum/contract
|
||||||
|
name: BFactory
|
||||||
|
network: rinkeby
|
||||||
|
source:
|
||||||
|
abi: BFactory
|
||||||
|
mapping:
|
||||||
|
kind: ethereum/events
|
||||||
|
apiVersion: 0.0.5
|
||||||
|
language: wasm/assemblyscript
|
||||||
|
file: ./src/mappings/poolFactory.ts
|
||||||
|
entities:
|
||||||
|
- BFactory
|
||||||
|
abis:
|
||||||
|
- name: BFactory
|
||||||
|
file: ./abis/BFactory.json
|
||||||
|
eventHandlers:
|
||||||
|
- event: BPoolCreated(indexed address,indexed address,indexed address,address,address,address)
|
||||||
|
handler: handleNewPool
|
||||||
|
- kind: ethereum/contract
|
||||||
|
name: BPool
|
||||||
|
network: rinkeby
|
||||||
|
source:
|
||||||
|
abi: BPool
|
||||||
mapping:
|
mapping:
|
||||||
kind: ethereum/events
|
kind: ethereum/events
|
||||||
apiVersion: 0.0.5
|
apiVersion: 0.0.5
|
||||||
language: wasm/assemblyscript
|
language: wasm/assemblyscript
|
||||||
file: ./src/mappings/pool.ts
|
file: ./src/mappings/pool.ts
|
||||||
entities:
|
entities:
|
||||||
- Pool
|
- BPool
|
||||||
- PoolFactory
|
|
||||||
- Swap
|
|
||||||
abis:
|
abis:
|
||||||
- name: Pool
|
- name: BPool
|
||||||
file: ./abis/BPool.json
|
file: ./abis/BPool.json
|
||||||
- name: BToken
|
- name: BToken
|
||||||
file: ./abis/BToken.json
|
file: ./abis/BToken.json
|
||||||
- name: ERC20
|
- name: BMath
|
||||||
file: ./abis/ERC20.json
|
file: ./abis/BMath.json
|
||||||
- name: ERC20SymbolBytes
|
|
||||||
file: ./abis/ERC20SymbolBytes.json
|
|
||||||
- name: ERC20NameBytes
|
|
||||||
file: ./abis/ERC20NameBytes.json
|
|
||||||
eventHandlers:
|
eventHandlers:
|
||||||
- event: LOG_CALL(indexed bytes4,indexed address,bytes)
|
- event: LOG_SWAP(indexed address,indexed address,indexed address,uint256,uint256,uint256)
|
||||||
topic0: '0x34e1990700000000000000000000000000000000000000000000000000000000'
|
|
||||||
handler: handleSetSwapFee
|
|
||||||
- event: LOG_CALL(indexed bytes4,indexed address,bytes)
|
|
||||||
topic0: '0x92eefe9b00000000000000000000000000000000000000000000000000000000'
|
|
||||||
handler: handleSetController
|
|
||||||
- event: LOG_CALL(indexed bytes4,indexed address,bytes)
|
|
||||||
topic0: '0x49b5955200000000000000000000000000000000000000000000000000000000'
|
|
||||||
handler: handleSetPublicSwap
|
|
||||||
- event: LOG_CALL(indexed bytes4,indexed address,bytes)
|
|
||||||
topic0: '0x4bb278f300000000000000000000000000000000000000000000000000000000'
|
|
||||||
handler: handleFinalize
|
|
||||||
- event: LOG_CALL(indexed bytes4,indexed address,bytes)
|
|
||||||
topic0: '0xd1d7bc9100000000000000000000000000000000000000000000000000000000'
|
|
||||||
handler: handleSetup
|
|
||||||
- event: LOG_CALL(indexed bytes4,indexed address,bytes)
|
|
||||||
topic0: '0x3fdddaa200000000000000000000000000000000000000000000000000000000'
|
|
||||||
handler: handleRebind
|
|
||||||
- event: LOG_CALL(indexed bytes4,indexed address,bytes)
|
|
||||||
topic0: '0xe4e1e53800000000000000000000000000000000000000000000000000000000'
|
|
||||||
handler: handleRebind
|
|
||||||
- event: LOG_CALL(indexed bytes4,indexed address,bytes)
|
|
||||||
topic0: '0x8c28cbe800000000000000000000000000000000000000000000000000000000'
|
|
||||||
handler: handleGulp
|
|
||||||
- event: LOG_JOIN(indexed address,indexed address,uint256)
|
|
||||||
handler: handleJoinPool
|
|
||||||
- event: LOG_EXIT(indexed address,indexed address,uint256)
|
|
||||||
handler: handleExitPool
|
|
||||||
- event: LOG_SWAP(indexed address,indexed address,indexed address,uint256,uint256)
|
|
||||||
handler: handleSwap
|
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: LOG_BPT(uint256)
|
||||||
|
handler: handleBpt
|
||||||
- event: Transfer(indexed address,indexed address,uint256)
|
- event: Transfer(indexed address,indexed address,uint256)
|
||||||
handler: handleTransfer
|
handler: handlerBptTransfer
|
||||||
|
- name: ERC721Template
|
||||||
- kind: ethereum/contract
|
kind: ethereum/contract
|
||||||
name: DataToken
|
|
||||||
network: rinkeby
|
network: rinkeby
|
||||||
source:
|
source:
|
||||||
abi: DataToken
|
abi: ERC721Template
|
||||||
mapping:
|
mapping:
|
||||||
kind: ethereum/events
|
kind: ethereum/events
|
||||||
apiVersion: 0.0.5
|
apiVersion: 0.0.5
|
||||||
language: wasm/assemblyscript
|
language: wasm/assemblyscript
|
||||||
file: ./src/mappings/datatoken.ts
|
file: ./src/mappings/nftUpdate.ts
|
||||||
entities:
|
entities:
|
||||||
- DataToken
|
- ERC721Template
|
||||||
- DatatokenFactory
|
|
||||||
abis:
|
abis:
|
||||||
- name: DataToken
|
- name: ERC721Template
|
||||||
file: ./abis/DataTokenTemplate.json
|
file: ./abis/ERC721Template.json
|
||||||
eventHandlers:
|
eventHandlers:
|
||||||
- event: Transfer(indexed address,indexed address,uint256)
|
- event: MetadataCreated(indexed address,uint8,string,bytes,bytes,bytes,uint256,uint256)
|
||||||
handler: handleTransfer
|
handler: handleCreated
|
||||||
- event: OrderStarted(indexed address,indexed address,uint256,uint256,uint256,indexed address,uint256)
|
- event: MetadataUpdated(indexed address,uint8,string,bytes,bytes,bytes,uint256,uint256)
|
||||||
handler: handleOrderStarted
|
handler: handleUpdated
|
||||||
|
- event: MetadataState(indexed address,uint8,uint256,uint256)
|
||||||
|
handler: handleState
|
||||||
|
- event: TokenURIUpdate(indexed address,string,uint256,uint256,uint256)
|
||||||
|
handler: handleTokenUriUpdate
|
||||||
|
features:
|
||||||
|
- nonFatalErrors
|
||||||
|
@ -169,8 +169,6 @@ templates:
|
|||||||
handler: handleBpt
|
handler: handleBpt
|
||||||
- event: Transfer(indexed address,indexed address,uint256)
|
- event: Transfer(indexed address,indexed address,uint256)
|
||||||
handler: handlerBptTransfer
|
handler: handlerBptTransfer
|
||||||
# - event: SWAP_FEES(uint,uint,uint,address)
|
|
||||||
# handler: handlerSwapFees
|
|
||||||
- name: ERC721Template
|
- name: ERC721Template
|
||||||
kind: ethereum/contract
|
kind: ethereum/contract
|
||||||
network: barge
|
network: barge
|
||||||
|
Loading…
Reference in New Issue
Block a user