diff --git a/abis/Native20.json b/abis/Native20.json index 73ba21b..7b643d6 100644 --- a/abis/Native20.json +++ b/abis/Native20.json @@ -329,6 +329,74 @@ "name": "CommissionWithdrawn", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "staker", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "exitedTokens", + "type": "uint128" + }, + { + "components": [ + { + "internalType": "uint128", + "name": "poolId", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "exitedPoolShares", + "type": "uint128" + } + ], + "indexed": false, + "internalType": "struct PoolExitDetails[]", + "name": "exitDetails", + "type": "tuple[]" + } + ], + "name": "Exit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "poolId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "weights", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "recipients", + "type": "address[]" + } + ], + "name": "ExitedCommissionShares", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -532,21 +600,48 @@ }, { "indexed": false, - "internalType": "uint256", - "name": "ethValue", - "type": "uint256" + "internalType": "uint128", + "name": "depositedEth", + "type": "uint128" }, { "indexed": false, - "internalType": "uint256", - "name": "sharesBought", - "type": "uint256" + "internalType": "uint128", + "name": "mintedTokens", + "type": "uint128" }, { + "components": [ + { + "internalType": "uint128", + "name": "poolId", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "ethToPool", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "ethToIntegrator", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "pSharesFromPool", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "pSharesFromIntegrator", + "type": "uint128" + } + ], "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" + "internalType": "struct PoolStakeDetails[]", + "name": "stakeDetails", + "type": "tuple[]" } ], "name": "Stake", @@ -1192,4 +1287,4 @@ "stateMutability": "nonpayable", "type": "function" } -] +] \ No newline at end of file diff --git a/schema.graphql b/schema.graphql index ac36014..17d53e5 100644 --- a/schema.graphql +++ b/schema.graphql @@ -140,6 +140,7 @@ type Nexus @entity { execLayerRecipientHatcher: PluggableHatcher coverageRecipientHatcher: PluggableHatcher oracleAggregatorHatcher: PluggableHatcher + exitQueueHatcher: PluggableHatcher factories: [vFactory!]! @derivedFrom(field: "nexus") createdAt: BigInt! @@ -643,6 +644,7 @@ type vExitQueue @entity { address: Bytes! contract: MetaContract! + cub: Cub! pool: vPool! tickets: [Ticket!]! @derivedFrom(field: "exitQueue") ticketCount: BigInt! diff --git a/src/ERC20.mapping.ts b/src/ERC20.mapping.ts index c640cb9..b917b31 100644 --- a/src/ERC20.mapping.ts +++ b/src/ERC20.mapping.ts @@ -40,7 +40,7 @@ import { _computeEthAfterCommission, _computeIntegratorCommissionEarned } from './utils/utils'; -import { CommissionSharesSold } from '../generated/templates/ERC1155/Liquid1155'; +import { CommissionSharesSold, ExitedCommissionShares } from '../generated/templates/ERC1155/Liquid1155'; import { getOrCreateBalance } from './vPool.mapping'; function snapshotSupply(event: ethereum.Event): void { @@ -159,6 +159,27 @@ export function handlePoolAdded(event: PoolAdded): void { pool!.save(); } +export function handleExitedCommissionShares(event: ExitedCommissionShares): void { + const erc20 = ERC20.load(externalEntityUUID(event.address, [])); + const multiPoolId = erc20!._poolsDerived[event.params.poolId.toU32()]; + const multiPool = MultiPool.load(multiPoolId); + const poolBalance = PoolBalance.load(multiPool!.shares); + const pool = vPool.load(multiPool!.pool); + multiPool!.commissionPaid = _computeIntegratorCommissionEarned( + poolBalance!.amount, + pool!.totalSupply, + pool!.totalUnderlyingSupply, + multiPool!.injectedEth, + multiPool!.exitedEth, + multiPool!.fees + ); + // multiPool!.exitedEth = multiPool!.exitedEth.plus(event.params.shares.times(pool!.totalUnderlyingSupply).div(pool!.totalSupply)); + multiPool!.save(); + + erc20!.totalUnderlyingSupply = _recomputeERC20TotalUnderlyingSupply(Address.fromBytes(erc20!.address)); + erc20!.save(); +} + export function handleCommissionSharesSold(event: CommissionSharesSold): void { const erc20 = ERC20.load(externalEntityUUID(event.address, [])); const multiPoolId = erc20!._poolsDerived[event.params.id.toU32()]; @@ -376,21 +397,15 @@ export function handleStake(event: Stake): void { const ts = event.block.timestamp; const blockId = event.block.number; const staker = event.params.staker; - const ucs = getOrCreateUnassignedCommissionSold(); const deposit = new ERC20Deposit(eventUUID(event, [event.address.toHexString(), staker.toHexString()])); deposit.integration = entityUUID(event, []); - deposit.depositAmount = BigInt.zero(); - if (ucs.active && ucs.tx.equals(event.transaction.hash)) { - deposit.depositAmount = deposit.depositAmount.plus(ucs.amount); - } deposit.mintedShares = event.params.mintedTokens; deposit.hash = event.transaction.hash; deposit.staker = staker; deposit.createdAt = ts; deposit.createdAtBlock = blockId; - - deposit.depositAmount = deposit.depositAmount.plus(event.params.depositedEth); + deposit.depositAmount = event.params.depositedEth; erc20!.totalUnderlyingSupply = erc20!.totalUnderlyingSupply.plus(event.params.depositedEth); deposit.editedAt = ts; @@ -411,7 +426,6 @@ export function handleStake(event: Stake): void { balance.createdAtBlock = blockId; balance.editedAt = ts; balance.editedAtBlock = blockId; - balance.save(); } balance.totalDeposited = balance.totalDeposited.plus(event.params.depositedEth); balance.adjustedTotalDeposited = balance.adjustedTotalDeposited.plus(event.params.depositedEth); @@ -426,7 +440,6 @@ export function handleStake(event: Stake): void { multiPool!.save(); } - ucs.save(); balance.save(); erc20!.totalUnderlyingSupply = _recomputeERC20TotalUnderlyingSupply(Address.fromBytes(erc20!.address)); diff --git a/src/Nexus.mapping.ts b/src/Nexus.mapping.ts index 9b2e891..d6e3dfd 100644 --- a/src/Nexus.mapping.ts +++ b/src/Nexus.mapping.ts @@ -265,6 +265,7 @@ export function handleSpawnedPool(event: SpawnedPool): void { eq.address = event.params.exitQueue; eq.contract = getOrCreateMetaContract('vExitQueue'); eq.pool = externalEntityUUID(event.params.pool, []); + eq.cub = externalEntityUUID(event.params.exitQueue, []); eq.createdAt = event.block.timestamp; eq.editedAt = event.block.timestamp; @@ -365,6 +366,7 @@ export function handleSetCoreHatchers(event: SetCoreHatchers): void { nexus.execLayerRecipientHatcher = externalEntityUUID(event.params.execLayerRecipient, []); nexus.coverageRecipientHatcher = externalEntityUUID(event.params.coverageRecipient, []); nexus.oracleAggregatorHatcher = externalEntityUUID(event.params.oracleAggregator, []); + nexus.exitQueueHatcher = externalEntityUUID(event.params.exitQueue, []); nexus.editedAt = event.block.timestamp; nexus.editedAtBlock = event.block.number; diff --git a/src/vPool.mapping.ts b/src/vPool.mapping.ts index cf03f81..1a67d4f 100644 --- a/src/vPool.mapping.ts +++ b/src/vPool.mapping.ts @@ -33,7 +33,7 @@ import { IntegrationRewardEntry, PeriodRewardSummary } from '../generated/schema'; -import { Bytes, BigInt, Address, store, log } from '@graphprotocol/graph-ts'; +import { Bytes, BigInt, Address, store, log, DataSourceContext, dataSource } from '@graphprotocol/graph-ts'; import { ethereum } from '@graphprotocol/graph-ts/chain/ethereum'; import { MultiPoolRewardsSnapshot } from '../generated/schema'; import { @@ -201,8 +201,9 @@ export function handleTransfer(event: Transfer): void { const erc1155Integration = ERC1155.load(externalEntityUUID(event.params.from, [])); if ( - (exitQueue != null && exitQueue.id == pool!.exitQueue && erc20Integration != null) || - erc1155Integration != null + exitQueue != null && + exitQueue.id == pool!.exitQueue && + (erc20Integration != null || erc1155Integration != null) ) { const stakedValueBefore = _computeStakedEthValue( fromBalance.amount, @@ -233,7 +234,9 @@ export function handleTransfer(event: Transfer): void { toBalance.amount = toBalance.amount.plus(event.params.value); saveOrEraseBalance(fromBalance, event); - saveOrEraseBalance(toBalance, event); + if (toBalance.address != Address.zero()) { + saveOrEraseBalance(toBalance, event); + } pool!.editedAt = event.block.timestamp; pool!.editedAtBlock = event.block.number; @@ -381,6 +384,25 @@ export function handleProcessedReport(event: ProcessedReport): void { report.editedAtBlock = event.block.number; report.save(); + if (dataSource.network() === 'mainnet') { + if (pool!.totalUnderlyingSupply != event.params.traces.preUnderlyingSupply) { + throw new Error( + 'Invalid pool.totalUnderlyingSupply ' + + pool!.totalUnderlyingSupply.toString() + + ' ' + + event.params.traces.preUnderlyingSupply.toString() + ); + } + if (pool!.totalSupply.plus(event.params.traces.exitBurnedShares) != event.params.traces.preSupply) { + throw new Error( + 'Invalid pool.totalSupply + traces.exitBurnedShares ' + + pool!.totalSupply.plus(event.params.traces.exitBurnedShares).toString() + + ' ' + + event.params.traces.preSupply.toString() + ); + } + } + const pool_pre_supply = event.params.traces.preSupply; const pool_pre_underlying_supply = event.params.traces.preUnderlyingSupply; let pool_post_supply: BigInt; @@ -395,10 +417,19 @@ export function handleProcessedReport(event: ProcessedReport): void { pool_post_supply = event.params.traces.postSupply; } const pool_post_underlying_supply = _computeTotalUnderlyingSupply(pool!, report); + if (dataSource.network() === 'mainnet') { + if (pool_post_underlying_supply != event.params.traces.postUnderlyingSupply) { + throw new Error( + 'Invalid pool_post_underlying_supply ' + + pool_post_underlying_supply.toString() + + ' ' + + event.params.traces.postUnderlyingSupply.toString() + ); + } + } pool!.totalSupply = pool_post_supply; pool!.totalUnderlyingSupply = pool_post_underlying_supply; - event.params.traces.postUnderlyingSupply; pool!.lastEpoch = event.params.epoch; pool!.expectedEpoch = event.params.epoch.plus(pool!.epochsPerFrame); @@ -446,68 +477,42 @@ export function handleProcessedReport(event: ProcessedReport): void { if (multipool!.shares != null && pool_pre_supply.gt(BigInt.fromI32(0)) && pool_post_supply.gt(BigInt.fromI32(0))) { const multiPoolBalance = PoolBalance.load(multipool!.shares as string); - let deposited_eth = BigInt.zero(); - const poolDepositor = PoolDepositor.load(multipool!.poolDepositor); - if (poolDepositor != null) { - deposited_eth = poolDepositor.depositedEth; - } - const preRawUnderlyingSupply = multiPoolBalance!.amount.times(pool_pre_underlying_supply).div(pool_pre_supply); - const preUnderlyingSupply = _computeEthAfterCommission( - multiPoolBalance!.amount, - pool_pre_supply, - pool_pre_underlying_supply, - multipool!.injectedEth, - multipool!.exitedEth, - multipool!.fees, - multipool!.commissionPaid - ); + const postRawUnderlyingSupply = multiPoolBalance!.amount.times(pool_post_underlying_supply).div(pool_post_supply); - const postUnderlyingSupply = _computeEthAfterCommission( - multiPoolBalance!.amount, - pool_post_supply, - pool_post_underlying_supply, - multipool!.injectedEth, - multipool!.exitedEth, - multipool!.fees, - multipool!.commissionPaid - ); - rewards = maxBigInt(BigInt.zero(), postUnderlyingSupply.minus(preUnderlyingSupply)); - commission = maxBigInt(BigInt.zero(), postRawUnderlyingSupply.minus(preRawUnderlyingSupply).minus(rewards)); + rewards = maxBigInt(BigInt.zero(), postRawUnderlyingSupply.minus(preRawUnderlyingSupply)); + commission = rewards.times(multipool!.fees).div(BigInt.fromI32(10000)); + rewards = rewards.minus(commission); const erc20 = ERC20.load(multipool!.integration); if (erc20 != null) { const multiPoolBalance = PoolBalance.load(multipool!.shares as string); if (multiPoolBalance!.amount.gt(BigInt.zero())) { - const preNetRate = multiPoolBalance!.amount.gt(BigInt.zero()) - ? preUnderlyingSupply.times(BigInt.fromString('1000000000000000000')).div(multiPoolBalance!.amount) - : BigInt.zero(); const preGrossRate = multiPoolBalance!.amount.gt(BigInt.zero()) ? preRawUnderlyingSupply.times(BigInt.fromString('1000000000000000000')).div(multiPoolBalance!.amount) : BigInt.zero(); erc20.totalUnderlyingSupply = _recomputeERC20TotalUnderlyingSupply(Address.fromBytes(erc20.address)); - const postNetRate = multiPoolBalance!.amount.gt(BigInt.zero()) - ? postUnderlyingSupply.times(BigInt.fromString('1000000000000000000')).div(multiPoolBalance!.amount) - : BigInt.zero(); const postGrossRate = multiPoolBalance!.amount.gt(BigInt.zero()) ? postRawUnderlyingSupply.times(BigInt.fromString('1000000000000000000')).div(multiPoolBalance!.amount) : BigInt.zero(); - const netAPY = postNetRate - .times(BigInt.fromString('1000000000000000000')) - .div(preNetRate) - .minus(BigInt.fromString('1000000000000000000')) - .times(BigInt.fromI64(YEAR)) - .div(period); - const grossAPY = postGrossRate - .times(BigInt.fromString('1000000000000000000')) - .div(preGrossRate) - .minus(BigInt.fromString('1000000000000000000')) - .times(BigInt.fromI64(YEAR)) - .div(period); + let grossAPY = BigInt.zero(); + if (postGrossRate.gt(BigInt.zero()) && preGrossRate.gt(BigInt.zero())) { + grossAPY = postGrossRate + .times(BigInt.fromString('1000000000000000000')) + .div(preGrossRate) + .minus(BigInt.fromString('1000000000000000000')) + .times(BigInt.fromI64(YEAR)) + .div(period); + } + + let netAPY = BigInt.zero(); + if (grossAPY.gt(BigInt.zero())) { + netAPY = grossAPY.times(BigInt.fromI32(10000).minus(multipool!.fees)).div(BigInt.fromI32(10000)); + } const integrationRewardEntry = new IntegrationRewardEntry(eventUUID(event, ['IntegrationRewardEntry'])); integrationRewardEntry.type = 'IntegrationRewardEntry'; diff --git a/subgraph.goerli.yaml b/subgraph.goerli.yaml index 51278b7..ad192d5 100644 --- a/subgraph.goerli.yaml +++ b/subgraph.goerli.yaml @@ -366,6 +366,49 @@ dataSources: - event: AppliedFix(address,address) handler: handleAppliedFix file: ./src/PluggableHatcher.mapping.ts + - kind: ethereum + name: ExitQueueHatcher + network: goerli + source: + address: "0xd13dfac53f8453c4f211059387f303c6024d899d" + abi: PluggableHatcher + startBlock: 9182259 + mapping: + kind: ethereum/events + apiVersion: 0.0.7 + language: wasm/assemblyscript + entities: + - vFactory + - vTreasury + abis: + - name: PluggableHatcher + file: ./abis/PluggableHatcher.json + eventHandlers: + - event: Upgraded(indexed address) + handler: handleUpgraded + - event: Hatched(indexed address,bytes) + handler: handleHatched + - event: Pause(address) + handler: handlePause + - event: Unpause(address) + handler: handleUnpause + - event: GlobalPause() + handler: handleGlobalPause + - event: GlobalUnpause() + handler: handleGlobalUnpause + - event: SetAdmin(address) + handler: handleSetAdmin + - event: SetPauser(address) + handler: handleSetPauser + - event: SetInitialProgress(uint256) + handler: handleSetInitialProgress + - event: RegisteredGlobalFix(address,uint256) + handler: handleRegisteredGlobalFix + - event: DeletedGlobalFix(uint256) + handler: handleDeletedGlobalFix + - event: AppliedFix(address,address) + handler: handleAppliedFix + file: ./src/PluggableHatcher.mapping.ts - kind: ethereum name: IntegrationRouter @@ -735,6 +778,8 @@ templates: handler: handleSetMaxCommission - event: SetPoolPercentages(uint256[]) handler: handleSetPoolPercentages + - event: ExitedCommissionShares(indexed uint256,uint256,uint256[],address[]) + handler: handleExitedCommissionShares - name: ERC1155_1_0_0_rc4 kind: ethereum/contract network: goerli diff --git a/subgraph.goerli_fast.yaml b/subgraph.goerli_fast.yaml index 9b06681..b24a6dc 100644 --- a/subgraph.goerli_fast.yaml +++ b/subgraph.goerli_fast.yaml @@ -366,6 +366,49 @@ dataSources: - event: AppliedFix(address,address) handler: handleAppliedFix file: ./src/PluggableHatcher.mapping.ts + - kind: ethereum + name: ExitQueueHatcher + network: goerli + source: + address: "0xd13dfac53f8453c4f211059387f303c6024d899d" + abi: PluggableHatcher + startBlock: 9182259 + mapping: + kind: ethereum/events + apiVersion: 0.0.7 + language: wasm/assemblyscript + entities: + - vFactory + - vTreasury + abis: + - name: PluggableHatcher + file: ./abis/PluggableHatcher.json + eventHandlers: + - event: Upgraded(indexed address) + handler: handleUpgraded + - event: Hatched(indexed address,bytes) + handler: handleHatched + - event: Pause(address) + handler: handlePause + - event: Unpause(address) + handler: handleUnpause + - event: GlobalPause() + handler: handleGlobalPause + - event: GlobalUnpause() + handler: handleGlobalUnpause + - event: SetAdmin(address) + handler: handleSetAdmin + - event: SetPauser(address) + handler: handleSetPauser + - event: SetInitialProgress(uint256) + handler: handleSetInitialProgress + - event: RegisteredGlobalFix(address,uint256) + handler: handleRegisteredGlobalFix + - event: DeletedGlobalFix(uint256) + handler: handleDeletedGlobalFix + - event: AppliedFix(address,address) + handler: handleAppliedFix + file: ./src/PluggableHatcher.mapping.ts - kind: ethereum name: IntegrationRouter @@ -735,6 +778,8 @@ templates: handler: handleSetMaxCommission - event: SetPoolPercentages(uint256[]) handler: handleSetPoolPercentages + - event: ExitedCommissionShares(indexed uint256,uint256,uint256[],address[]) + handler: handleExitedCommissionShares - name: ERC1155_1_0_0_rc4 kind: ethereum/contract network: goerli diff --git a/subgraph.mainnet.yaml b/subgraph.mainnet.yaml index 46ddb1f..8133d2a 100644 --- a/subgraph.mainnet.yaml +++ b/subgraph.mainnet.yaml @@ -71,7 +71,7 @@ dataSources: source: address: "0xa748AE65Ba11606492a9C57efFa0d4B7Be551ec2" abi: PluggableHatcher - startBlock: 17785573 + startBlock: 17780000 mapping: kind: ethereum/events apiVersion: 0.0.7 @@ -114,7 +114,7 @@ dataSources: source: address: "0x48005e62373277FBbE5584b351830B1b2eC1E3FD" abi: PluggableHatcher - startBlock: 17785573 + startBlock: 17780000 mapping: kind: ethereum/events apiVersion: 0.0.7 @@ -157,7 +157,7 @@ dataSources: source: address: "0x1D6103243d0507a9d1314bAC09379Bf57a5CF155" abi: PluggableHatcher - startBlock: 17785573 + startBlock: 17780000 mapping: kind: ethereum/events apiVersion: 0.0.7 @@ -200,7 +200,7 @@ dataSources: source: address: "0x066B6c3fCa9034395068eb9d442Ee5041EAc33DC" abi: PluggableHatcher - startBlock: 17785573 + startBlock: 17780000 mapping: kind: ethereum/events apiVersion: 0.0.7 @@ -243,7 +243,7 @@ dataSources: source: address: "0xdac8cF86ca42185eBCE7ED2dbEC9bc2bE1734ffC" abi: PluggableHatcher - startBlock: 17785573 + startBlock: 17780000 mapping: kind: ethereum/events apiVersion: 0.0.7 @@ -286,7 +286,7 @@ dataSources: source: address: "0x24d6E12FA25B7F8fc6B4BbA0ea77fc643d7210d3" abi: PluggableHatcher - startBlock: 17785573 + startBlock: 17780000 mapping: kind: ethereum/events apiVersion: 0.0.7 @@ -329,7 +329,50 @@ dataSources: source: address: "0xC2c48FbfeC0E61683133aAfF32C9c2E98fd17788" abi: PluggableHatcher - startBlock: 17785573 + startBlock: 17780000 + mapping: + kind: ethereum/events + apiVersion: 0.0.7 + language: wasm/assemblyscript + entities: + - vFactory + - vTreasury + abis: + - name: PluggableHatcher + file: ./abis/PluggableHatcher.json + eventHandlers: + - event: Upgraded(indexed address) + handler: handleUpgraded + - event: Hatched(indexed address,bytes) + handler: handleHatched + - event: Pause(address) + handler: handlePause + - event: Unpause(address) + handler: handleUnpause + - event: GlobalPause() + handler: handleGlobalPause + - event: GlobalUnpause() + handler: handleGlobalUnpause + - event: SetAdmin(address) + handler: handleSetAdmin + - event: SetPauser(address) + handler: handleSetPauser + - event: SetInitialProgress(uint256) + handler: handleSetInitialProgress + - event: RegisteredGlobalFix(address,uint256) + handler: handleRegisteredGlobalFix + - event: DeletedGlobalFix(uint256) + handler: handleDeletedGlobalFix + - event: AppliedFix(address,address) + handler: handleAppliedFix + file: ./src/PluggableHatcher.mapping.ts + - kind: ethereum + name: ExitQueueHatcher + network: mainnet + source: + address: "0x24a1DFEbAEc4e501c2152a5E4A434B236FCE3D3B" + abi: PluggableHatcher + startBlock: 17780000 mapping: kind: ethereum/events apiVersion: 0.0.7 @@ -735,6 +778,8 @@ templates: handler: handleSetMaxCommission - event: SetPoolPercentages(uint256[]) handler: handleSetPoolPercentages + - event: ExitedCommissionShares(indexed uint256,uint256,uint256[],address[]) + handler: handleExitedCommissionShares - name: ERC1155_1_0_0_rc4 kind: ethereum/contract network: mainnet diff --git a/subgraph.mainnet_fast.yaml b/subgraph.mainnet_fast.yaml index c10967f..9e2ae23 100644 --- a/subgraph.mainnet_fast.yaml +++ b/subgraph.mainnet_fast.yaml @@ -71,7 +71,7 @@ dataSources: source: address: "0xa748AE65Ba11606492a9C57efFa0d4B7Be551ec2" abi: PluggableHatcher - startBlock: 17785573 + startBlock: 17780000 mapping: kind: ethereum/events apiVersion: 0.0.7 @@ -114,7 +114,7 @@ dataSources: source: address: "0x48005e62373277FBbE5584b351830B1b2eC1E3FD" abi: PluggableHatcher - startBlock: 17785573 + startBlock: 17780000 mapping: kind: ethereum/events apiVersion: 0.0.7 @@ -157,7 +157,7 @@ dataSources: source: address: "0x1D6103243d0507a9d1314bAC09379Bf57a5CF155" abi: PluggableHatcher - startBlock: 17785573 + startBlock: 17780000 mapping: kind: ethereum/events apiVersion: 0.0.7 @@ -200,7 +200,7 @@ dataSources: source: address: "0x066B6c3fCa9034395068eb9d442Ee5041EAc33DC" abi: PluggableHatcher - startBlock: 17785573 + startBlock: 17780000 mapping: kind: ethereum/events apiVersion: 0.0.7 @@ -243,7 +243,7 @@ dataSources: source: address: "0xdac8cF86ca42185eBCE7ED2dbEC9bc2bE1734ffC" abi: PluggableHatcher - startBlock: 17785573 + startBlock: 17780000 mapping: kind: ethereum/events apiVersion: 0.0.7 @@ -286,7 +286,7 @@ dataSources: source: address: "0x24d6E12FA25B7F8fc6B4BbA0ea77fc643d7210d3" abi: PluggableHatcher - startBlock: 17785573 + startBlock: 17780000 mapping: kind: ethereum/events apiVersion: 0.0.7 @@ -329,7 +329,50 @@ dataSources: source: address: "0xC2c48FbfeC0E61683133aAfF32C9c2E98fd17788" abi: PluggableHatcher - startBlock: 17785573 + startBlock: 17780000 + mapping: + kind: ethereum/events + apiVersion: 0.0.7 + language: wasm/assemblyscript + entities: + - vFactory + - vTreasury + abis: + - name: PluggableHatcher + file: ./abis/PluggableHatcher.json + eventHandlers: + - event: Upgraded(indexed address) + handler: handleUpgraded + - event: Hatched(indexed address,bytes) + handler: handleHatched + - event: Pause(address) + handler: handlePause + - event: Unpause(address) + handler: handleUnpause + - event: GlobalPause() + handler: handleGlobalPause + - event: GlobalUnpause() + handler: handleGlobalUnpause + - event: SetAdmin(address) + handler: handleSetAdmin + - event: SetPauser(address) + handler: handleSetPauser + - event: SetInitialProgress(uint256) + handler: handleSetInitialProgress + - event: RegisteredGlobalFix(address,uint256) + handler: handleRegisteredGlobalFix + - event: DeletedGlobalFix(uint256) + handler: handleDeletedGlobalFix + - event: AppliedFix(address,address) + handler: handleAppliedFix + file: ./src/PluggableHatcher.mapping.ts + - kind: ethereum + name: ExitQueueHatcher + network: mainnet + source: + address: "0x24a1DFEbAEc4e501c2152a5E4A434B236FCE3D3B" + abi: PluggableHatcher + startBlock: 17780000 mapping: kind: ethereum/events apiVersion: 0.0.7 @@ -735,6 +778,8 @@ templates: handler: handleSetMaxCommission - event: SetPoolPercentages(uint256[]) handler: handleSetPoolPercentages + - event: ExitedCommissionShares(indexed uint256,uint256,uint256[],address[]) + handler: handleExitedCommissionShares - name: ERC1155_1_0_0_rc4 kind: ethereum/contract network: mainnet