ocean-subgraph/subgraph.template.yaml

283 lines
12 KiB
YAML
Raw Normal View History

2021-12-07 10:47:58 +01:00
specVersion: 0.0.3
description: Ocean provides data sharing through IDOs
repository: https://github.com/oceanprotocol/ocean-subgraph
schema:
file: ./schema.graphql
2021-12-07 10:47:58 +01:00
templates:
- name: ERC20Template
kind: ethereum/contract
network: __NETWORK__
source:
2021-12-07 10:47:58 +01:00
abi: ERC20Template
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
2021-12-07 10:47:58 +01:00
file: ./src/mappings/erc20Templates.ts
entities:
2021-12-07 10:47:58 +01:00
- ERC20Template
abis:
2021-12-07 10:47:58 +01:00
- name: ERC20Template
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/templates/ERC20Template.sol/ERC20Template.json
2021-12-07 10:47:58 +01:00
- name: ERC20TemplateEnterprise
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/templates/ERC20TemplateEnterprise.sol/ERC20TemplateEnterprise.json
- name: ERC20
file: ./abis/ERC20.json
2021-12-07 10:47:58 +01:00
- 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)
2021-12-07 10:47:58 +01:00
handler: handleOrderStarted
receipt: true
- event: OrderReused(bytes32,address,uint256,uint256)
handler: handlerOrderReused
receipt: true
2021-12-07 10:47:58 +01:00
- event: NewPaymentCollector(indexed address,indexed address,uint256,uint256)
handler: handleNewPaymentCollector
- event: PublishMarketFee(indexed address,indexed address,uint256)
handler: handlePublishMarketFee
2022-02-17 11:26:05 +01:00
- event: PublishMarketFeeChanged(address,address,address,uint256)
handler: handlePublishMarketFeeChanged
Fix #628 & #629 & #621: Store event log index for all records (#630) * Store eventIndex. * Changed in veDelegation. Removed import of String. * linter. * Removed tx hash. * Revert some tweaks. * added logIndex. * converted to big int. * 0 -> BigInt.zero(). * Added eventIndex to template and OPC. * updated tweak * updated tweak2 * Added eventIndex in tests. * revert. * Added eventIndex for TokenCreated and NFTCreated events. Increase time sleep for graphql request. * Changed position of eventIndex in entity. * Added eventIndex for order events and for dt events. Added new test commands in package.json. * Added eventIndex for NFT Update events. * Added eventIndex for dispenser. * Modified dispenser tests. * Reverted sleep secs. Updated tests. * Updated dispenser tests. Added eventIndex for FRE. * Added eventIndex in df rewards. * Updated Ve with eventIndex. * Updating order id with event index. * Updated @ocean/lib with multichain version. * Updated to number type. * Updated tests for order. * some changes. * Fix dt tests. Added logs for provider fee. Need fix for Simple publish and consume tests. * Problem raised by retrieving order event index in provider fee event handler. * Added function for searching the right order. * Debug order with provider fee. * Removed console logs. * Added debug logs. * Hardcoded eventIndex just for testing. * Paste logs from graph node. * added extra sleep in test. * fixed command. * Added comments. Modified util function for Order Reuse. * Added more logs and other tweaks. * fixed command for docker logs. * Added more logs. * Converted to lowercase. * Removed condition just for test. * Added more logs. Order is not null. * Call getOrder. * Added verification back. * converted to hex and add toString. * Pass toString as param. * Added ethereumjs util. * replaced with ==. * Refactored logic. * Print event index. * added more logs of event index. * Modified tweaks and asserts. * Added log for reuse order. * updates. * Reverted changes. * Added check for eventIndex == 0. * Enhanced the code. Replaced while with for. * Added more logs for reuse test. * added another condition. * Added logs in tests. Removed redundant condition. * Added more logs to test. * Fixed typo. * still debugging * Refactored code. * Getting closer. * Fix tests for orders part. Removed logs. * Removed more logs. * Fix DT tests related to order. * Implemented Publishing Market Fee event handler. Added test. * Added consume market fee handler. Test consume market fee handler. * Fixed tests for fees. Added TODOs. * Generated ID with eventIndex in ficed rate. Added assert errors messages. * Added FRE tests to workflow. * Generated dispenser transaction with event index. * Fixed dispenser tests. * Add event index for NftUpdate entity ID. * Changed IDs for VeDelegation and VeAllocationUpdate. * Added full test suite to workflow. * Fixed nft transfer ID. * print blocks. * test just dt and ending test to see the last block. * Added df test. * Added dispenser test. * Added FRE test. * Added NFT test. * Added simple publish consume test. * Added simple subgraph test. * Added users test. * Added ve test. * Increased sleep time. * commented delegation test. * respect lint * Fixed ending tests. Removed commented code. Brought back test suite. * Print values from failing tests. Updated mappings. * Rollback changes in veDelegation and veUtils. Added more prints for debug in tests. * Removed veDelegation creation record. * Rollback to the approach for veDelegation like it is in main. * Removed prints. Match changes with main. * Removed -1 from last block. * Added prints for eventIndex. Fixed some suggestions. * Fixed veDelegation. * Removed prints.
2023-05-13 14:00:52 +02:00
- event: ConsumeMarketFee(indexed address,indexed address,uint256)
handler: handleConsumeMarketFee
2022-02-18 12:09:18 +01:00
- event: AddedMinter(indexed address,indexed address,uint256,uint256)
handler: handleAddedMinter
- event: AddedPaymentManager(indexed address,indexed address,uint256,uint256)
handler: handleAddedPaymentManager
- event: RemovedMinter(indexed address,indexed address,uint256,uint256)
handler: handleRemovedMinter
- event: RemovedPaymentManager(indexed address,indexed address,uint256,uint256)
handler: handleRemovedPaymentManager
- event: CleanedPermissions(indexed address,uint256,uint256)
handler: handleCleanedPermissions
- event: ProviderFee(indexed address,indexed address,uint256,bytes,uint8,bytes32,bytes32,uint256)
handler: handleProviderFee
receipt: true
2022-02-18 12:09:18 +01:00
- name: ERC20Template3
kind: ethereum/contract
network: __NETWORK__
source:
abi: ERC20Template3
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
file: ./src/mappings/erc20Template3.ts
entities:
- ERC20Template3
abis:
- name: ERC20Template3
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/templates/ERC20Template3.sol/ERC20Template3.json
- name: ERC20
file: ./abis/ERC20.json
- name: ERC20Roles
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/utils/ERC20Roles.sol/ERC20Roles.json
eventHandlers:
- event: PredictionSubmitted(indexed address,indexed uint256,uint256)
handler: handlePredictionSubmitted
- event: PredictionPayout(indexed address,indexed uint256,uint256,uint256,bool,bool,uint256,uint8)
handler: handlePredictionPayout
- event: NewSubscription(indexed address,uint256,uint256)
handler: handleNewSubscription
- event: TruevalSubmitted(indexed uint256,bool,uint8,uint256,uint256)
handler: handleTruevalSubmitted
- event: SettingChanged(uint256,uint256,uint256,address)
handler: handleSettingChanged
- event: RevenueAdded(uint256,uint256,uint256,uint256,uint256)
handler: handleRevenueAdded
- event: Paused(bool)
handler: handlePaused
2021-12-07 10:47:58 +01:00
- name: ERC721Template
kind: ethereum/contract
network: __NETWORK__
source:
2021-12-07 10:47:58 +01:00
abi: ERC721Template
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
2021-12-07 10:47:58 +01:00
file: ./src/mappings/nftUpdate.ts
entities:
2021-12-07 10:47:58 +01:00
- ERC721Template
abis:
2021-12-07 10:47:58 +01:00
- 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
2022-02-18 12:09:18 +01:00
- name: ERC20
file: ./abis/ERC20.json
eventHandlers:
- event: MetadataCreated(indexed address,uint8,string,bytes,bytes,bytes32,uint256,uint256)
2022-02-18 12:09:18 +01:00
handler: handleMetadataCreated
- event: MetadataUpdated(indexed address,uint8,string,bytes,bytes,bytes32,uint256,uint256)
2022-02-18 12:09:18 +01:00
handler: handleMetadataUpdated
2021-12-07 10:47:58 +01:00
- event: MetadataState(indexed address,uint8,uint256,uint256)
2022-02-18 12:09:18 +01:00
handler: handleMetadataState
2021-12-07 10:47:58 +01:00
- event: TokenURIUpdate(indexed address,string,uint256,uint256,uint256)
2022-02-18 12:09:18 +01:00
handler: handleTokenUriUpdate
- event: AddedManager(indexed address,indexed address,uint256,uint256)
handler: handleAddedManager
- event: AddedTo725StoreList(indexed address,indexed address,uint256,uint256)
handler: handleAddedTo725StoreList
- event: AddedToCreateERC20List(indexed address,indexed address,uint256,uint256)
handler: handleAddedToCreateERC20List
- event: AddedToMetadataList(indexed address,indexed address,uint256,uint256)
handler: handleAddedToMetadataList
- event: RemovedFrom725StoreList(indexed address,indexed address,uint256,uint256)
handler: handleRemovedFrom725StoreList
- event: RemovedFromCreateERC20List(indexed address,indexed address,uint256,uint256)
handler: handleRemovedFromCreateERC20List
- event: RemovedFromMetadataList(indexed address,indexed address,uint256,uint256)
handler: handleRemovedFromMetadataList
- event: RemovedManager(indexed address,indexed address,uint256,uint256)
handler: handleRemovedManager
- event: CleanedPermissions(indexed address,uint256,uint256)
handler: handleCleanedPermissions
- event: Transfer(indexed address,indexed address,indexed uint256)
handler: handleNftTransferred
2022-09-13 19:07:10 +02:00
- event: DataChanged(indexed bytes32,bytes)
handler: handleNftData
2022-02-21 11:45:24 +01:00
- name: Dispenser
kind: ethereum/contract
network: __NETWORK__
source:
abi: Dispenser
mapping:
kind: ethereum/events
apiVersion: 0.0.7
2022-02-21 11:45:24 +01:00
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
- name: ERC20
file: ./abis/ERC20.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
- name: FixedRateExchange
kind: ethereum/contract
network: __NETWORK__
source:
abi: FixedRateExchange
mapping:
kind: ethereum/events
apiVersion: 0.0.7
2022-02-21 11:45:24 +01:00
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)
2022-02-23 16:47:34 +01:00
handler: handlePublishMarketFeeChanged
- event: TokenCollected(indexed bytes32,indexed address,indexed address,uint256)
handler: handleTokenCollected
Implementing first pass of veAllocate schema, handlers, and test cove… (#490) * Implementing first pass of veAllocate schema, handlers, and test coverage. * Fixed compiling issues, wrote compiling & testing outline inside of veAllocate.test. More to come. * Created documentation. Moving tests away from subgraph and into df-py. * Expanding documentation to be thorough and cover more of the work involved. * use barge artifacts * use proper contracts in ci * use barge artifacts folder * fix replace * use npm contracts dep * use latest contracts for barge * fix some lint * Fix linter errors * Update schema * Finished basic integration of setAllocation event and verified queries/schema is working as intended. * Fixing amount getter. * Fixed remaining implementation, verified SimpleSubgraph.test is working, and fixed lint errors. * Fixing import. * Use .zero() * Improve readability * Add allocated to schema * Update abi * Update event handlers in the template * Update veREADME * Remove `AllocationRemoved` handler * Hooking data for tx, firstContact, lastUpdate, block * Update event abi * Add chainId and nftAddress to schema * Update `handleAllocationSet` * Update abi * Update readme * Set initial values * Fix math * Missing event param * set initial value of `lastContact` * veOcean template * VeOcean entity * Handler functions - wip * rename file * Delegation schema * veDelegate mapping file * Rename * Update template * Update schema * Update replaces * Add handler for delegation * Update schema * getveDelegation * Update naming * Add deposit entity * Update template * Make delegation an array * Add `handleDelegation` * Add `handleDeposit` for veOCEAN * Add `getveOCEAN` util function * Add `getDeposit` util function * Add `handleBurnBoost` * Add `handleExtendBoost` * Add `handleTransferBoost` * Set default veOCEAN * Remove unused import * Rename Deposit to VeDeposit * Include block number * Remove `allocatedTotal` * Updating schema and fixing errors due to naming changes. Let's keep the user current allocation, maybe we need to create a feature to more easily let them know whether they are fully allocated, or not.. * bump contracts to v1.1.1 * bump contracts * bump to contracts 1.1.2 * fix script for networks without ve * add veAllocation.sol's AllocationSetMultiple * copy artfacts from barge for npm quickstart:barge * fix using barge artifacts * temp debug * use barge artifacts * use contracts 1.1.3 * use same approach for 'development' * bump ocean-contracts Co-authored-by: alexcos20 <alex.coseru@gmail.com> Co-authored-by: mihaisc <mihai@oceanprotocol.com> Co-authored-by: trizin <25263018+trizin@users.noreply.github.com>
2022-09-05 14:07:31 +02:00
dataSources:
- kind: ethereum/contract
name: ERC721Factory
network: __NETWORK__
source:
address: __ERC721FACTORYADDRESS__
abi: ERC721Factory
startBlock: __STARTBLOCK__
mapping:
kind: ethereum/events
apiVersion: 0.0.7
Implementing first pass of veAllocate schema, handlers, and test cove… (#490) * Implementing first pass of veAllocate schema, handlers, and test coverage. * Fixed compiling issues, wrote compiling & testing outline inside of veAllocate.test. More to come. * Created documentation. Moving tests away from subgraph and into df-py. * Expanding documentation to be thorough and cover more of the work involved. * use barge artifacts * use proper contracts in ci * use barge artifacts folder * fix replace * use npm contracts dep * use latest contracts for barge * fix some lint * Fix linter errors * Update schema * Finished basic integration of setAllocation event and verified queries/schema is working as intended. * Fixing amount getter. * Fixed remaining implementation, verified SimpleSubgraph.test is working, and fixed lint errors. * Fixing import. * Use .zero() * Improve readability * Add allocated to schema * Update abi * Update event handlers in the template * Update veREADME * Remove `AllocationRemoved` handler * Hooking data for tx, firstContact, lastUpdate, block * Update event abi * Add chainId and nftAddress to schema * Update `handleAllocationSet` * Update abi * Update readme * Set initial values * Fix math * Missing event param * set initial value of `lastContact` * veOcean template * VeOcean entity * Handler functions - wip * rename file * Delegation schema * veDelegate mapping file * Rename * Update template * Update schema * Update replaces * Add handler for delegation * Update schema * getveDelegation * Update naming * Add deposit entity * Update template * Make delegation an array * Add `handleDelegation` * Add `handleDeposit` for veOCEAN * Add `getveOCEAN` util function * Add `getDeposit` util function * Add `handleBurnBoost` * Add `handleExtendBoost` * Add `handleTransferBoost` * Set default veOCEAN * Remove unused import * Rename Deposit to VeDeposit * Include block number * Remove `allocatedTotal` * Updating schema and fixing errors due to naming changes. Let's keep the user current allocation, maybe we need to create a feature to more easily let them know whether they are fully allocated, or not.. * bump contracts to v1.1.1 * bump contracts * bump to contracts 1.1.2 * fix script for networks without ve * add veAllocation.sol's AllocationSetMultiple * copy artfacts from barge for npm quickstart:barge * fix using barge artifacts * temp debug * use barge artifacts * use contracts 1.1.3 * use same approach for 'development' * bump ocean-contracts Co-authored-by: alexcos20 <alex.coseru@gmail.com> Co-authored-by: mihaisc <mihai@oceanprotocol.com> Co-authored-by: trizin <25263018+trizin@users.noreply.github.com>
2022-09-05 14:07:31 +02:00
language: wasm/assemblyscript
file: ./src/mappings/erc721Factory.ts
entities:
- ERC721Factory
abis:
- name: ERC721Template
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/templates/ERC721Template.sol/ERC721Template.json
- name: ERC20Template
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/templates/ERC20Template.sol/ERC20Template.json
Implementing first pass of veAllocate schema, handlers, and test cove… (#490) * Implementing first pass of veAllocate schema, handlers, and test coverage. * Fixed compiling issues, wrote compiling & testing outline inside of veAllocate.test. More to come. * Created documentation. Moving tests away from subgraph and into df-py. * Expanding documentation to be thorough and cover more of the work involved. * use barge artifacts * use proper contracts in ci * use barge artifacts folder * fix replace * use npm contracts dep * use latest contracts for barge * fix some lint * Fix linter errors * Update schema * Finished basic integration of setAllocation event and verified queries/schema is working as intended. * Fixing amount getter. * Fixed remaining implementation, verified SimpleSubgraph.test is working, and fixed lint errors. * Fixing import. * Use .zero() * Improve readability * Add allocated to schema * Update abi * Update event handlers in the template * Update veREADME * Remove `AllocationRemoved` handler * Hooking data for tx, firstContact, lastUpdate, block * Update event abi * Add chainId and nftAddress to schema * Update `handleAllocationSet` * Update abi * Update readme * Set initial values * Fix math * Missing event param * set initial value of `lastContact` * veOcean template * VeOcean entity * Handler functions - wip * rename file * Delegation schema * veDelegate mapping file * Rename * Update template * Update schema * Update replaces * Add handler for delegation * Update schema * getveDelegation * Update naming * Add deposit entity * Update template * Make delegation an array * Add `handleDelegation` * Add `handleDeposit` for veOCEAN * Add `getveOCEAN` util function * Add `getDeposit` util function * Add `handleBurnBoost` * Add `handleExtendBoost` * Add `handleTransferBoost` * Set default veOCEAN * Remove unused import * Rename Deposit to VeDeposit * Include block number * Remove `allocatedTotal` * Updating schema and fixing errors due to naming changes. Let's keep the user current allocation, maybe we need to create a feature to more easily let them know whether they are fully allocated, or not.. * bump contracts to v1.1.1 * bump contracts * bump to contracts 1.1.2 * fix script for networks without ve * add veAllocation.sol's AllocationSetMultiple * copy artfacts from barge for npm quickstart:barge * fix using barge artifacts * temp debug * use barge artifacts * use contracts 1.1.3 * use same approach for 'development' * bump ocean-contracts Co-authored-by: alexcos20 <alex.coseru@gmail.com> Co-authored-by: mihaisc <mihai@oceanprotocol.com> Co-authored-by: trizin <25263018+trizin@users.noreply.github.com>
2022-09-05 14:07:31 +02:00
- name: ERC721Factory
file: ./node_modules/@oceanprotocol/contracts/artifacts/contracts/ERC721Factory.sol/ERC721Factory.json
- name: ERC20
file: ./abis/ERC20.json
eventHandlers:
- event: NFTCreated(address,indexed address,string,indexed address,string,string,bool,indexed address)
handler: handleNftCreated
- event: TokenCreated(indexed address,indexed address,string,string,uint256,address)
handler: handleNewToken
- event: Template721Added(indexed address,indexed uint256)
handler: handleNew721Template
- event: Template20Added(indexed address,indexed uint256)
handler: handleNew20Template
Implementing first pass of veAllocate schema, handlers, and test cove… (#490) * Implementing first pass of veAllocate schema, handlers, and test coverage. * Fixed compiling issues, wrote compiling & testing outline inside of veAllocate.test. More to come. * Created documentation. Moving tests away from subgraph and into df-py. * Expanding documentation to be thorough and cover more of the work involved. * use barge artifacts * use proper contracts in ci * use barge artifacts folder * fix replace * use npm contracts dep * use latest contracts for barge * fix some lint * Fix linter errors * Update schema * Finished basic integration of setAllocation event and verified queries/schema is working as intended. * Fixing amount getter. * Fixed remaining implementation, verified SimpleSubgraph.test is working, and fixed lint errors. * Fixing import. * Use .zero() * Improve readability * Add allocated to schema * Update abi * Update event handlers in the template * Update veREADME * Remove `AllocationRemoved` handler * Hooking data for tx, firstContact, lastUpdate, block * Update event abi * Add chainId and nftAddress to schema * Update `handleAllocationSet` * Update abi * Update readme * Set initial values * Fix math * Missing event param * set initial value of `lastContact` * veOcean template * VeOcean entity * Handler functions - wip * rename file * Delegation schema * veDelegate mapping file * Rename * Update template * Update schema * Update replaces * Add handler for delegation * Update schema * getveDelegation * Update naming * Add deposit entity * Update template * Make delegation an array * Add `handleDelegation` * Add `handleDeposit` for veOCEAN * Add `getveOCEAN` util function * Add `getDeposit` util function * Add `handleBurnBoost` * Add `handleExtendBoost` * Add `handleTransferBoost` * Set default veOCEAN * Remove unused import * Rename Deposit to VeDeposit * Include block number * Remove `allocatedTotal` * Updating schema and fixing errors due to naming changes. Let's keep the user current allocation, maybe we need to create a feature to more easily let them know whether they are fully allocated, or not.. * bump contracts to v1.1.1 * bump contracts * bump to contracts 1.1.2 * fix script for networks without ve * add veAllocation.sol's AllocationSetMultiple * copy artfacts from barge for npm quickstart:barge * fix using barge artifacts * temp debug * use barge artifacts * use contracts 1.1.3 * use same approach for 'development' * bump ocean-contracts Co-authored-by: alexcos20 <alex.coseru@gmail.com> Co-authored-by: mihaisc <mihai@oceanprotocol.com> Co-authored-by: trizin <25263018+trizin@users.noreply.github.com>
2022-09-05 14:07:31 +02:00
- kind: ethereum/contract
name: FactoryRouter
network: __NETWORK__
source:
address: __FACTORYROUTERADDRESS__
abi: FactoryRouter
startBlock: __STARTBLOCK__
mapping:
kind: ethereum/events
apiVersion: 0.0.7
Implementing first pass of veAllocate schema, handlers, and test cove… (#490) * Implementing first pass of veAllocate schema, handlers, and test coverage. * Fixed compiling issues, wrote compiling & testing outline inside of veAllocate.test. More to come. * Created documentation. Moving tests away from subgraph and into df-py. * Expanding documentation to be thorough and cover more of the work involved. * use barge artifacts * use proper contracts in ci * use barge artifacts folder * fix replace * use npm contracts dep * use latest contracts for barge * fix some lint * Fix linter errors * Update schema * Finished basic integration of setAllocation event and verified queries/schema is working as intended. * Fixing amount getter. * Fixed remaining implementation, verified SimpleSubgraph.test is working, and fixed lint errors. * Fixing import. * Use .zero() * Improve readability * Add allocated to schema * Update abi * Update event handlers in the template * Update veREADME * Remove `AllocationRemoved` handler * Hooking data for tx, firstContact, lastUpdate, block * Update event abi * Add chainId and nftAddress to schema * Update `handleAllocationSet` * Update abi * Update readme * Set initial values * Fix math * Missing event param * set initial value of `lastContact` * veOcean template * VeOcean entity * Handler functions - wip * rename file * Delegation schema * veDelegate mapping file * Rename * Update template * Update schema * Update replaces * Add handler for delegation * Update schema * getveDelegation * Update naming * Add deposit entity * Update template * Make delegation an array * Add `handleDelegation` * Add `handleDeposit` for veOCEAN * Add `getveOCEAN` util function * Add `getDeposit` util function * Add `handleBurnBoost` * Add `handleExtendBoost` * Add `handleTransferBoost` * Set default veOCEAN * Remove unused import * Rename Deposit to VeDeposit * Include block number * Remove `allocatedTotal` * Updating schema and fixing errors due to naming changes. Let's keep the user current allocation, maybe we need to create a feature to more easily let them know whether they are fully allocated, or not.. * bump contracts to v1.1.1 * bump contracts * bump to contracts 1.1.2 * fix script for networks without ve * add veAllocation.sol's AllocationSetMultiple * copy artfacts from barge for npm quickstart:barge * fix using barge artifacts * temp debug * use barge artifacts * use contracts 1.1.3 * use same approach for 'development' * bump ocean-contracts Co-authored-by: alexcos20 <alex.coseru@gmail.com> Co-authored-by: mihaisc <mihai@oceanprotocol.com> Co-authored-by: trizin <25263018+trizin@users.noreply.github.com>
2022-09-05 14:07:31 +02:00
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
- name: ERC20
file: ./abis/ERC20.json
eventHandlers:
- event: TokenAdded(indexed address,indexed address)
handler: handleTokenAdded
- event: TokenRemoved(indexed address,indexed address)
handler: handleTokenRemoved
- event: OPCFeeChanged(indexed address,uint256,uint256,uint256,uint256)
handler: handleOPCFeeChanged
- event: SSContractAdded(indexed address,indexed address)
handler: handleSSContractAdded
- event: SSContractRemoved(indexed address,indexed address)
handler: handleSSContractRemoved
- event: FixedRateContractAdded(indexed address,indexed address)
handler: handleFixedRateContractAdded
- event: FixedRateContractRemoved(indexed address,indexed address)
handler: handleFixedRateContractRemoved
- event: DispenserContractAdded(indexed address,indexed address)
handler: handleDispenserContractAdded
- event: DispenserContractRemoved(indexed address,indexed address)
handler: handleDispenserContractRemoved