diff --git a/abis/CrowdPoolingFactoryV2.json b/abis/CrowdPoolingFactoryV2.json index edbc816..fcea79f 100644 --- a/abis/CrowdPoolingFactoryV2.json +++ b/abis/CrowdPoolingFactoryV2.json @@ -640,4 +640,4 @@ "stateMutability": "nonpayable", "type": "function" } -] \ No newline at end of file +] diff --git a/abis/MerkleDistributor.json b/abis/MerkleDistributor.json new file mode 100644 index 0000000..b077128 --- /dev/null +++ b/abis/MerkleDistributor.json @@ -0,0 +1,116 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "token_", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "merkleRoot_", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Claimed", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "merkleProof", + "type": "bytes32[]" + } + ], + "name": "claim", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "isClaimed", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "merkleRoot", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "token", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } +] \ No newline at end of file diff --git a/bin/config.js b/bin/config.js index 2389d61..5176b49 100644 --- a/bin/config.js +++ b/bin/config.js @@ -11,6 +11,7 @@ const chains = [ "okchain", "arbitrum", "polygon", + "optimism", "heco", "moonriver", "boba", @@ -21,7 +22,11 @@ const chains = [ "base_mainnet", "scroll-alpha", "scroll-sepolia", - "line", + "linea", + "scroll", + "manta", + "mantle", + "tokb", ]; const supportAlphaChains = ["arbitrum", "polygon", "mainnet"]; const supportStudioChains = ["arbitrum", "polygon", "mainnet"]; diff --git a/bin/index-cmd.js b/bin/index-cmd.js index d5e20ca..8e08440 100644 --- a/bin/index-cmd.js +++ b/bin/index-cmd.js @@ -379,6 +379,10 @@ function getDefaultConfig() { "graph codegen subgraphs/starter/starter_arbitrum.yaml --output-dir ./src/types/starter/ && graph deploy --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/ dodoex/dodoex-starter-arbitrum subgraphs/starter/starter_arbitrum.yaml", "deploy:dodo_starter_polygon": "graph codegen subgraphs/starter/starter_polygon.yaml --output-dir ./src/types/starter/ && graph deploy --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/ dodoex/dodoex-starter-polygon subgraphs/starter/starter_polygon.yaml", + "deploy:dodo_test:merkle_airdrop_goerli": + "graph codegen subgraphs/merkle-airdrop/merkle_goerli.yaml --output-dir ./src/types/merkle/ && graph deploy --ipfs http://127.0.0.1:5001 --node http://127.0.0.1:8020 dodoex/merkle_airdrop_goerli subgraphs/merkle-airdrop/merkle_goerli.yaml", + "deploy:studio:merkle_airdrop_base_mainnet": + "graph codegen subgraphs/merkle-airdrop/merkle_base_mainnet.yaml --output-dir ./src/types/merkle/ && graph deploy --studio --node https://api.studio.thegraph.com/deploy/ dodoex_merkle_airdrop_base subgraphs/merkle-airdrop/merkle_base_mainnet.yaml", }; return config2; } diff --git a/build/DODOMine/DODOMine.wasm b/build/DODOMine/DODOMine.wasm index 8afe4da..2cfac9e 100644 Binary files a/build/DODOMine/DODOMine.wasm and b/build/DODOMine/DODOMine.wasm differ diff --git a/build/DODOZoo/DODOZoo.wasm b/build/DODOZoo/DODOZoo.wasm index fd1b759..4fb9f68 100644 Binary files a/build/DODOZoo/DODOZoo.wasm and b/build/DODOZoo/DODOZoo.wasm differ diff --git a/build/DVMFactory/DVMFactory.wasm b/build/DVMFactory/DVMFactory.wasm index 008bc2e..2f37c33 100644 Binary files a/build/DVMFactory/DVMFactory.wasm and b/build/DVMFactory/DVMFactory.wasm differ diff --git a/build/subgraph.yaml b/build/subgraph.yaml index ce0dce6..f9cacf3 100644 --- a/build/subgraph.yaml +++ b/build/subgraph.yaml @@ -1,81 +1,21 @@ -specVersion: 0.0.4 +specVersion: 0.0.6 description: Dodoex.io repository: https://github.com/DODOEX/dodoex_v2_subgraph schema: file: token.graphql dataSources: - - kind: ethereum/contract - name: ERC20Factory - network: bsc - source: - address: "0x5e84190a270333aCe5B9202a3F4ceBf11b81bB01" - abi: ERC20Factory - startBlock: 4201536 - mapping: - kind: ethereum/events - apiVersion: 0.0.6 - language: wasm/assemblyscript - file: ERC20Factory/ERC20Factory.wasm - entities: - - User - - Token - - UserTokenBlance - - TransferHistories - abis: - - name: ERC20Factory - file: ../abis/ERC20Factory.json - - name: ERC20 - file: ../abis/ERC20.json - - name: ERC20SymbolBytes - file: ../abis/ERC20SymbolBytes.json - - name: ERC20NameBytes - file: ../abis/ERC20NameBytes.json - eventHandlers: - - event: NewERC20(address,address,bool) - handler: handleNewERC20 - - kind: ethereum/contract - name: ERC20V2FactoryV2 - network: bsc - source: - address: "0x652C09785c15db4adAce871eD8874b8968A19A4D" - abi: ERC20V2Factory - startBlock: 4201536 - mapping: - kind: ethereum/events - apiVersion: 0.0.6 - language: wasm/assemblyscript - file: ERC20V2FactoryV2/ERC20V2FactoryV2.wasm - entities: - - User - - Token - - UserTokenBlance - - TransferHistories - abis: - - name: ERC20Factory - file: ../abis/ERC20Factory.json - - name: ERC20V2Factory - file: ../abis/ERC20V2Factory.json - - name: ERC20 - file: ../abis/ERC20.json - - name: ERC20SymbolBytes - file: ../abis/ERC20SymbolBytes.json - - name: ERC20NameBytes - file: ../abis/ERC20NameBytes.json - eventHandlers: - - event: NewERC20(address,address,uint256) - handler: handleNewERC20 - kind: ethereum/contract name: ERC20V3Factory - network: bsc + network: tokb source: - address: "0x5ed22a48fee263207f5caae1a1f1a27011e7dc92" + address: "0x4A81Aa47722E1cF27A8726F247E68a766bE58d8e" abi: ERC20V3Factory - startBlock: 15440112 + startBlock: 299037 mapping: kind: ethereum/events apiVersion: 0.0.6 language: wasm/assemblyscript - file: ERC20V2FactoryV2/ERC20V2FactoryV2.wasm + file: ERC20V3Factory/ERC20V3Factory.wasm entities: - User - Token diff --git a/build/templates/CP/CP.wasm b/build/templates/CP/CP.wasm index 917d521..dcac0be 100644 Binary files a/build/templates/CP/CP.wasm and b/build/templates/CP/CP.wasm differ diff --git a/build/templates/DODOLpToken/DODOLpToken.wasm b/build/templates/DODOLpToken/DODOLpToken.wasm index c2c9a0e..4ed4292 100644 Binary files a/build/templates/DODOLpToken/DODOLpToken.wasm and b/build/templates/DODOLpToken/DODOLpToken.wasm differ diff --git a/build/templates/DVM/DVM.wasm b/build/templates/DVM/DVM.wasm index 23f1100..a1ea1b9 100644 Binary files a/build/templates/DVM/DVM.wasm and b/build/templates/DVM/DVM.wasm differ diff --git a/src/mappings/constant-linea.ts b/src/mappings/constant-linea.ts new file mode 100644 index 0000000..783a7ac --- /dev/null +++ b/src/mappings/constant-linea.ts @@ -0,0 +1,49 @@ +//kovan +export const TYPE_VIRTUAL_POOL = "VIRTUAL"; +export const TYPE_DVM_POOL = "DVM"; +export const TYPE_DPP_POOL = "DPP"; +export const TYPE_DSP_POOL = "DSP"; +export const TYPE_CLASSICAL_POOL = "CLASSICAL"; +export const SOURCE_SMART_ROUTE = "SMART_ROUTE"; +export const SOURCE_POOL_SWAP = "DODO_POOL"; +export const DODOZooID = "dodoex-v2-linea"; +export const CHAIN_BASE_COIN_SYMBOL = "ETH"; +export const CHAIN_BASE_COIN_NAME = "ethereum"; +export const DIP3_TIMESTAMP = 1624442400; + +export const SMART_ROUTE_ADDRESSES: string[] = [ + "0x4cad0052524648a7fa2cfe279997b00239295f33", +]; +export const DVM_FACTORY_ADDRESS = "0xc0F9553Df63De5a97Fe64422c8578D0657C360f7"; +export const DPP_FACTORY_ADDRESS = "0x97bBF5BB1dcfC93A8c67e97E50Bea19DB3416A83"; +export const CLASSIC_FACTORY_ADDRESS = + "0x6B9577b87666af89bd0e144b9b64e8Ed166E303d"; +export const CROWDPOOLING_FACTORY_V2: string[] = [ + "0x6B9577b87666af89bd0e144b9b64e8Ed166E303d", +]; + +export const DVM_FACTORY_DEPLOY_BLOCK = 152408; +export const DPP_FACTORY_DEPLOY_BLOCK = 152408; + +export const ADDRESS_ZERO = "0x0000000000000000000000000000000000000000"; +export const BASE_COIN = "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"; + +export const TRANSACTION_TYPE_SWAP = "SWAP"; +export const TRANSACTION_TYPE_LP_ADD = "LP_ADD"; +export const TRANSACTION_TYPE_LP_REMOVE = "LP_REMOVE"; +export const TRANSACTION_TYPE_CP_BID = "CP_BID"; +export const TRANSACTION_TYPE_CP_CANCEL = "CP_CANCEL"; +export const TRANSACTION_TYPE_CP_CLAIM = "CP_CLAIM"; + +/** + * usd pricing + */ +export const WRAPPED_BASE_COIN = "0xb26c0d8be2960c70641a95a9195be1f59ac83ac0"; +//pricing supported stable coins +export const STABLE_ONE_ADDRESS = "0x0adcbae18580120667f7ff6c6451a426b13c67b7"; //usdt +export const STABLE_TWO_ADDRESS = "0xab0733588776b8881f7712f6abca98f510e6b63d"; //usdc +//stable coins pairs +export const STABLE_COIN_PAIR_ONE = + "0xe8c1b7e0505c97c59ff2f12ebf91a8eaa59d4c73"; //[USDT_USDC_PAIR] +//base currency pair +export const BASE_COIN_PAIR = "0x75f5d66a7bbb9330a9067c0833ec9b3198b71666"; //[WETH_USDC_PAIR] diff --git a/src/mappings/constant-manta.ts b/src/mappings/constant-manta.ts new file mode 100644 index 0000000..f6e6b3c --- /dev/null +++ b/src/mappings/constant-manta.ts @@ -0,0 +1,49 @@ +//kovan +export const TYPE_VIRTUAL_POOL = "VIRTUAL"; +export const TYPE_DVM_POOL = "DVM"; +export const TYPE_DPP_POOL = "DPP"; +export const TYPE_DSP_POOL = "DSP"; +export const TYPE_CLASSICAL_POOL = "CLASSICAL"; +export const SOURCE_SMART_ROUTE = "SMART_ROUTE"; +export const SOURCE_POOL_SWAP = "DODO_POOL"; +export const DODOZooID = "dodoex-v2-manta"; +export const CHAIN_BASE_COIN_SYMBOL = "ETH"; +export const CHAIN_BASE_COIN_NAME = "ethereum"; +export const DIP3_TIMESTAMP = 1624442400; + +export const SMART_ROUTE_ADDRESSES: string[] = [ + "0x4cad0052524648a7fa2cfe279997b00239295f33", +]; +export const DVM_FACTORY_ADDRESS = "0x97bBF5BB1dcfC93A8c67e97E50Bea19DB3416A83"; +export const DPP_FACTORY_ADDRESS = "0xa71415675F68f29259ddD63215E5518d2735bf0a"; +export const CLASSIC_FACTORY_ADDRESS = + "0x6B9577b87666af89bd0e144b9b64e8Ed166E303d"; +export const CROWDPOOLING_FACTORY_V2: string[] = [ + "0xFD2b7994f91c08aAa5e013E899334A2DBb500DF1", +]; + +export const DVM_FACTORY_DEPLOY_BLOCK = 384142; +export const DPP_FACTORY_DEPLOY_BLOCK = 384142; + +export const ADDRESS_ZERO = "0x0000000000000000000000000000000000000000"; +export const BASE_COIN = "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"; + +export const TRANSACTION_TYPE_SWAP = "SWAP"; +export const TRANSACTION_TYPE_LP_ADD = "LP_ADD"; +export const TRANSACTION_TYPE_LP_REMOVE = "LP_REMOVE"; +export const TRANSACTION_TYPE_CP_BID = "CP_BID"; +export const TRANSACTION_TYPE_CP_CANCEL = "CP_CANCEL"; +export const TRANSACTION_TYPE_CP_CLAIM = "CP_CLAIM"; + +/** + * usd pricing + */ +export const WRAPPED_BASE_COIN = "0xb26c0d8be2960c70641a95a9195be1f59ac83ac0"; +//pricing supported stable coins +export const STABLE_ONE_ADDRESS = "0xf417F5A458eC102B90352F697D6e2Ac3A3d2851f"; //usdt +export const STABLE_TWO_ADDRESS = "0xb73603C5d87fA094B7314C74ACE2e64D165016fb"; //usdc +//stable coins pairs +export const STABLE_COIN_PAIR_ONE = + "0xe8c1b7e0505c97c59ff2f12ebf91a8eaa59d4c73"; //[USDT_USDC_PAIR] +//base currency pair +export const BASE_COIN_PAIR = "0x75f5d66a7bbb9330a9067c0833ec9b3198b71666"; //[WETH_USDC_PAIR] diff --git a/src/mappings/constant-mantle.ts b/src/mappings/constant-mantle.ts new file mode 100644 index 0000000..e209311 --- /dev/null +++ b/src/mappings/constant-mantle.ts @@ -0,0 +1,49 @@ +//kovan +export const TYPE_VIRTUAL_POOL = "VIRTUAL"; +export const TYPE_DVM_POOL = "DVM"; +export const TYPE_DPP_POOL = "DPP"; +export const TYPE_DSP_POOL = "DSP"; +export const TYPE_CLASSICAL_POOL = "CLASSICAL"; +export const SOURCE_SMART_ROUTE = "SMART_ROUTE"; +export const SOURCE_POOL_SWAP = "DODO_POOL"; +export const DODOZooID = "dodoex-v2-mantle"; +export const CHAIN_BASE_COIN_SYMBOL = "ETH"; +export const CHAIN_BASE_COIN_NAME = "ethereum"; +export const DIP3_TIMESTAMP = 1624442400; + +export const SMART_ROUTE_ADDRESSES: string[] = [ + "0xe7979E2F3e77196Bb2AB206eaa67Ea278A3E33A2", +]; +export const DVM_FACTORY_ADDRESS = "0x29C7718e8B606cEF1c44Fe6e43e07aF9D0875DE1"; +export const DPP_FACTORY_ADDRESS = "0x46AF6b152F2cb02a3cFcc74014C2617BC4F6cD5C"; +export const CLASSIC_FACTORY_ADDRESS = + "0x6B9577b87666af89bd0e144b9b64e8Ed166E303d"; +export const CROWDPOOLING_FACTORY_V2: string[] = [ + "0xE2004eE21f88a7D8e1A5EDc3c9617a0460CC7b99", +]; + +export const DVM_FACTORY_DEPLOY_BLOCK = 21054048; +export const DPP_FACTORY_DEPLOY_BLOCK = 21054104; + +export const ADDRESS_ZERO = "0x0000000000000000000000000000000000000000"; +export const BASE_COIN = "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"; + +export const TRANSACTION_TYPE_SWAP = "SWAP"; +export const TRANSACTION_TYPE_LP_ADD = "LP_ADD"; +export const TRANSACTION_TYPE_LP_REMOVE = "LP_REMOVE"; +export const TRANSACTION_TYPE_CP_BID = "CP_BID"; +export const TRANSACTION_TYPE_CP_CANCEL = "CP_CANCEL"; +export const TRANSACTION_TYPE_CP_CLAIM = "CP_CLAIM"; + +/** + * usd pricing + */ +export const WRAPPED_BASE_COIN = "0xdeaddeaddeaddeaddeaddeaddeaddeaddead1111"; +//pricing supported stable coins +export const STABLE_ONE_ADDRESS = "0x201eba5cc46d216ce6dc03f6a759e8e766e956ae"; //usdt +export const STABLE_TWO_ADDRESS = "0x09bc4e0d864854c6afb6eb9a9cdf58ac190d0df9"; //usdc +//stable coins pairs +export const STABLE_COIN_PAIR_ONE = + "0xe8c1b7e0505c97c59ff2f12ebf91a8eaa59d4c73"; //[USDT_USDC_PAIR] +//base currency pair +export const BASE_COIN_PAIR = "0x75f5d66a7bbb9330a9067c0833ec9b3198b71666"; //[WETH_USDC_PAIR] diff --git a/src/mappings/constant-scroll-sepolia.ts b/src/mappings/constant-scroll-sepolia.ts new file mode 100644 index 0000000..616cf68 --- /dev/null +++ b/src/mappings/constant-scroll-sepolia.ts @@ -0,0 +1,49 @@ +//kovan +export const TYPE_VIRTUAL_POOL = "VIRTUAL"; +export const TYPE_DVM_POOL = "DVM"; +export const TYPE_DPP_POOL = "DPP"; +export const TYPE_DSP_POOL = "DSP"; +export const TYPE_CLASSICAL_POOL = "CLASSICAL"; +export const SOURCE_SMART_ROUTE = "SMART_ROUTE"; +export const SOURCE_POOL_SWAP = "DODO_POOL"; +export const DODOZooID = "dodoex-v2-scroll-sepolia"; +export const CHAIN_BASE_COIN_SYMBOL = "ETH"; +export const CHAIN_BASE_COIN_NAME = "ethereum"; +export const DIP3_TIMESTAMP = 1624442400; + +export const SMART_ROUTE_ADDRESSES: string[] = [ + "0x5b622A373b485CB9BA283ECd6CE6689a8b8FdC05", +]; +export const DVM_FACTORY_ADDRESS = "0x0b96b88B1941C3Df77b5A065dD3075fDB7986301"; +export const DPP_FACTORY_ADDRESS = "0x19e374C28458a44F67D1524898907AfF9E537462"; +export const CLASSIC_FACTORY_ADDRESS = + "0x168442fec1e1e782c8770185dbb8328b91dc45c0"; +export const CROWDPOOLING_FACTORY_V2: string[] = [ + "0x79e15fc9b4154d90424b588533ab277d30d573f4", +]; + +export const DVM_FACTORY_DEPLOY_BLOCK = 2783342; +export const DPP_FACTORY_DEPLOY_BLOCK = 2783350; + +export const ADDRESS_ZERO = "0x0000000000000000000000000000000000000000"; +export const BASE_COIN = "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"; + +export const TRANSACTION_TYPE_SWAP = "SWAP"; +export const TRANSACTION_TYPE_LP_ADD = "LP_ADD"; +export const TRANSACTION_TYPE_LP_REMOVE = "LP_REMOVE"; +export const TRANSACTION_TYPE_CP_BID = "CP_BID"; +export const TRANSACTION_TYPE_CP_CANCEL = "CP_CANCEL"; +export const TRANSACTION_TYPE_CP_CLAIM = "CP_CLAIM"; + +/** + * usd pricing + */ +export const WRAPPED_BASE_COIN = "0xb26c0d8be2960c70641a95a9195be1f59ac83ac0"; +//pricing supported stable coins +export const STABLE_ONE_ADDRESS = "0x0adcbae18580120667f7ff6c6451a426b13c67b7"; //usdt +export const STABLE_TWO_ADDRESS = "0xab0733588776b8881f7712f6abca98f510e6b63d"; //usdc +//stable coins pairs +export const STABLE_COIN_PAIR_ONE = + "0xe8c1b7e0505c97c59ff2f12ebf91a8eaa59d4c73"; //[USDT_USDC_PAIR] +//base currency pair +export const BASE_COIN_PAIR = "0x75f5d66a7bbb9330a9067c0833ec9b3198b71666"; //[WETH_USDC_PAIR] diff --git a/src/mappings/constant-scroll.ts b/src/mappings/constant-scroll.ts new file mode 100644 index 0000000..73ae0ea --- /dev/null +++ b/src/mappings/constant-scroll.ts @@ -0,0 +1,49 @@ +//kovan +export const TYPE_VIRTUAL_POOL = "VIRTUAL"; +export const TYPE_DVM_POOL = "DVM"; +export const TYPE_DPP_POOL = "DPP"; +export const TYPE_DSP_POOL = "DSP"; +export const TYPE_CLASSICAL_POOL = "CLASSICAL"; +export const SOURCE_SMART_ROUTE = "SMART_ROUTE"; +export const SOURCE_POOL_SWAP = "DODO_POOL"; +export const DODOZooID = "dodoex-v2-scroll"; +export const CHAIN_BASE_COIN_SYMBOL = "ETH"; +export const CHAIN_BASE_COIN_NAME = "ethereum"; +export const DIP3_TIMESTAMP = 1624442400; + +export const SMART_ROUTE_ADDRESSES: string[] = [ + "0xe49781e6186214d88aACFd9eBc8cE40E3CDc066D", +]; +export const DVM_FACTORY_ADDRESS = "0x5a0C840a7089aa222c4458b3BE0947fe5a5006DE"; +export const DPP_FACTORY_ADDRESS = "0x31AC053c31a77055b2ae2d3899091C0A9c19cE3a"; +export const CLASSIC_FACTORY_ADDRESS = + "0x168442fec1e1e782c8770185dbb8328b91dc45c0"; +export const CROWDPOOLING_FACTORY_V2: string[] = [ + "0x4632e6EBd4a01eBF54739A9D71a62CEdb29E9183", +]; + +export const DVM_FACTORY_DEPLOY_BLOCK = 2783342; +export const DPP_FACTORY_DEPLOY_BLOCK = 2783350; + +export const ADDRESS_ZERO = "0x0000000000000000000000000000000000000000"; +export const BASE_COIN = "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"; + +export const TRANSACTION_TYPE_SWAP = "SWAP"; +export const TRANSACTION_TYPE_LP_ADD = "LP_ADD"; +export const TRANSACTION_TYPE_LP_REMOVE = "LP_REMOVE"; +export const TRANSACTION_TYPE_CP_BID = "CP_BID"; +export const TRANSACTION_TYPE_CP_CANCEL = "CP_CANCEL"; +export const TRANSACTION_TYPE_CP_CLAIM = "CP_CLAIM"; + +/** + * usd pricing + */ +export const WRAPPED_BASE_COIN = "0xb26c0d8be2960c70641a95a9195be1f59ac83ac0"; +//pricing supported stable coins +export const STABLE_ONE_ADDRESS = "0x0adcbae18580120667f7ff6c6451a426b13c67b7"; //usdt +export const STABLE_TWO_ADDRESS = "0xab0733588776b8881f7712f6abca98f510e6b63d"; //usdc +//stable coins pairs +export const STABLE_COIN_PAIR_ONE = + "0xe8c1b7e0505c97c59ff2f12ebf91a8eaa59d4c73"; //[USDT_USDC_PAIR] +//base currency pair +export const BASE_COIN_PAIR = "0x75f5d66a7bbb9330a9067c0833ec9b3198b71666"; //[WETH_USDC_PAIR] diff --git a/src/mappings/constant-tokb.ts b/src/mappings/constant-tokb.ts new file mode 100644 index 0000000..6a70abf --- /dev/null +++ b/src/mappings/constant-tokb.ts @@ -0,0 +1,49 @@ +//kovan +export const TYPE_VIRTUAL_POOL = "VIRTUAL"; +export const TYPE_DVM_POOL = "DVM"; +export const TYPE_DPP_POOL = "DPP"; +export const TYPE_DSP_POOL = "DSP"; +export const TYPE_CLASSICAL_POOL = "CLASSICAL"; +export const SOURCE_SMART_ROUTE = "SMART_ROUTE"; +export const SOURCE_POOL_SWAP = "DODO_POOL"; +export const DODOZooID = "dodoex-v2-okb-x1-test"; +export const CHAIN_BASE_COIN_SYMBOL = "ETH"; +export const CHAIN_BASE_COIN_NAME = "ethereum"; +export const DIP3_TIMESTAMP = 1624442400; + +export const SMART_ROUTE_ADDRESSES: string[] = [ + "0x5b622A373b485CB9BA283ECd6CE6689a8b8FdC05", +]; +export const DVM_FACTORY_ADDRESS = "0xFaFC924BF0F70BdF4a722231622f559b94e53902"; +export const DPP_FACTORY_ADDRESS = "0xb546Add98c71D97Bb65De60B91021617AcD1262C"; +export const CLASSIC_FACTORY_ADDRESS = + "0x8dD0Fea5FA2f7df535F87f312641Cc15d8B151BA"; +export const CROWDPOOLING_FACTORY_V2: string[] = [ + "0x8dD0Fea5FA2f7df535F87f312641Cc15d8B151BA", +]; + +export const DVM_FACTORY_DEPLOY_BLOCK = 300062; +export const DPP_FACTORY_DEPLOY_BLOCK = 300062; + +export const ADDRESS_ZERO = "0x0000000000000000000000000000000000000000"; +export const BASE_COIN = "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"; + +export const TRANSACTION_TYPE_SWAP = "SWAP"; +export const TRANSACTION_TYPE_LP_ADD = "LP_ADD"; +export const TRANSACTION_TYPE_LP_REMOVE = "LP_REMOVE"; +export const TRANSACTION_TYPE_CP_BID = "CP_BID"; +export const TRANSACTION_TYPE_CP_CANCEL = "CP_CANCEL"; +export const TRANSACTION_TYPE_CP_CLAIM = "CP_CLAIM"; + +/** + * usd pricing + */ +export const WRAPPED_BASE_COIN = "0xb26c0d8be2960c70641a95a9195be1f59ac83ac0"; +//pricing supported stable coins +export const STABLE_ONE_ADDRESS = "0x0adcbae18580120667f7ff6c6451a426b13c67b7"; //usdt +export const STABLE_TWO_ADDRESS = "0xab0733588776b8881f7712f6abca98f510e6b63d"; //usdc +//stable coins pairs +export const STABLE_COIN_PAIR_ONE = + "0xe8c1b7e0505c97c59ff2f12ebf91a8eaa59d4c73"; //[USDT_USDC_PAIR] +//base currency pair +export const BASE_COIN_PAIR = "0x75f5d66a7bbb9330a9067c0833ec9b3198b71666"; //[WETH_USDC_PAIR] diff --git a/src/mappings/constant.ts b/src/mappings/constant.ts index e314916..6a70abf 100644 --- a/src/mappings/constant.ts +++ b/src/mappings/constant.ts @@ -1,4 +1,4 @@ -//mainnet +//kovan export const TYPE_VIRTUAL_POOL = "VIRTUAL"; export const TYPE_DVM_POOL = "DVM"; export const TYPE_DPP_POOL = "DPP"; @@ -6,43 +6,44 @@ export const TYPE_DSP_POOL = "DSP"; export const TYPE_CLASSICAL_POOL = "CLASSICAL"; export const SOURCE_SMART_ROUTE = "SMART_ROUTE"; export const SOURCE_POOL_SWAP = "DODO_POOL"; +export const DODOZooID = "dodoex-v2-okb-x1-test"; +export const CHAIN_BASE_COIN_SYMBOL = "ETH"; +export const CHAIN_BASE_COIN_NAME = "ethereum"; export const DIP3_TIMESTAMP = 1624442400; -export const DODOV1Proxy01 = "0xd0678ec59d1337e29d1e1b1b6338f3e85d311f5e"; -export const DODOV1Proxy02 = "0x6ed3fd491f5b10384787b3fb162a72227fafbf63"; -export const DODOV1Proxy03 = "0x9a9942458754bdf65dcbcd0b6b4b842a7d4031ab"; -export const DODOV1Proxy04 = "0xa2cb66ebb947d217f61510882096f6e95c1de97d"; -export const DODOV2Proxy01 = "0x9ae501385bc7996a2a4a1fbb00c8d3820611bcb5"; -export const DODOV2Proxy02 = "0xa356867fdcea8e71aeaf87805808803806231fdc"; - -export const DODOZooID = "dodoex-v2"; -export const CHAIN_BASE_COIN_SYMBOL = "ETH"; -export const CHAIN_BASE_COIN_NAME = "ether"; +export const SMART_ROUTE_ADDRESSES: string[] = [ + "0x5b622A373b485CB9BA283ECd6CE6689a8b8FdC05", +]; +export const DVM_FACTORY_ADDRESS = "0xFaFC924BF0F70BdF4a722231622f559b94e53902"; +export const DPP_FACTORY_ADDRESS = "0xb546Add98c71D97Bb65De60B91021617AcD1262C"; +export const CLASSIC_FACTORY_ADDRESS = + "0x8dD0Fea5FA2f7df535F87f312641Cc15d8B151BA"; +export const CROWDPOOLING_FACTORY_V2: string[] = [ + "0x8dD0Fea5FA2f7df535F87f312641Cc15d8B151BA", +]; -export const SMART_ROUTE_ADDRESSES: string[] = ["0xd0678ec59d1337e29d1e1b1b6338f3e85d311f5e", "0x6ed3fd491f5b10384787b3fb162a72227fafbf63", "0x9a9942458754bdf65dcbcd0b6b4b842a7d4031ab", "0x9ae501385bc7996a2a4a1fbb00c8d3820611bcb5", "0xa2cb66ebb947d217f61510882096f6e95c1de97d", "0xa356867fdcea8e71aeaf87805808803806231fdc"]; -export const DVM_FACTORY_ADDRESS = "0x72d220ce168c4f361dd4dee5d826a01ad8598f6c"; -export const DPP_FACTORY_ADDRESS = "0xb5dc5e183c2acf02ab879a8569ab4edaf147d537"; -export const CLASSIC_FACTORY_ADDRESS = "0x3a97247df274a17c59a3bd12735ea3fcdfb49950";//dodo zoo -export const CROWDPOOLING_FACTORY_V2: string[]=["0x1e5d8ee8fb7f0d791475c59391db8f6cd06aa656"]; +export const DVM_FACTORY_DEPLOY_BLOCK = 300062; +export const DPP_FACTORY_DEPLOY_BLOCK = 300062; -export const ADDRESS_ZERO = '0x0000000000000000000000000000000000000000' -export const BASE_COIN = '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee'; +export const ADDRESS_ZERO = "0x0000000000000000000000000000000000000000"; +export const BASE_COIN = "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"; -export const TRANSACTION_TYPE_SWAP = "SWAP" -export const TRANSACTION_TYPE_LP_ADD = "LP_ADD" -export const TRANSACTION_TYPE_LP_REMOVE = "LP_REMOVE" -export const TRANSACTION_TYPE_CP_BID = "CP_BID" -export const TRANSACTION_TYPE_CP_CANCEL = "CP_CANCEL" -export const TRANSACTION_TYPE_CP_CLAIM = "CP_CLAIM" +export const TRANSACTION_TYPE_SWAP = "SWAP"; +export const TRANSACTION_TYPE_LP_ADD = "LP_ADD"; +export const TRANSACTION_TYPE_LP_REMOVE = "LP_REMOVE"; +export const TRANSACTION_TYPE_CP_BID = "CP_BID"; +export const TRANSACTION_TYPE_CP_CANCEL = "CP_CANCEL"; +export const TRANSACTION_TYPE_CP_CLAIM = "CP_CLAIM"; /** * usd pricing */ -export const WRAPPED_BASE_COIN = '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'; +export const WRAPPED_BASE_COIN = "0xb26c0d8be2960c70641a95a9195be1f59ac83ac0"; //pricing supported stable coins -export const STABLE_ONE_ADDRESS = '0xdac17f958d2ee523a2206206994597c13d831ec7';//usdt -export const STABLE_TWO_ADDRESS = '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48';//usdc +export const STABLE_ONE_ADDRESS = "0x0adcbae18580120667f7ff6c6451a426b13c67b7"; //usdt +export const STABLE_TWO_ADDRESS = "0xab0733588776b8881f7712f6abca98f510e6b63d"; //usdc //stable coins pairs -export const STABLE_COIN_PAIR_ONE = '0xc9f93163c99695c6526b799ebca2207fdf7d61ad';//[USDT_USDC_PAIR] +export const STABLE_COIN_PAIR_ONE = + "0xe8c1b7e0505c97c59ff2f12ebf91a8eaa59d4c73"; //[USDT_USDC_PAIR] //base currency pair -export const BASE_COIN_PAIR = '0x75c23271661d9d143dcb617222bc4bec783eff34';//[WETH_USDC_PAIR] +export const BASE_COIN_PAIR = "0x75f5d66a7bbb9330a9067c0833ec9b3198b71666"; //[WETH_USDC_PAIR] diff --git a/src/mappings/dodoex/helpers.ts b/src/mappings/dodoex/helpers.ts index d6b3169..43ad0fd 100644 --- a/src/mappings/dodoex/helpers.ts +++ b/src/mappings/dodoex/helpers.ts @@ -258,6 +258,7 @@ export function fetchTokenDecimals(tokenAddress: Address): BigInt { log.error("ERC20.try_decimals reverted. address: {}", [ tokenAddress.toHexString(), ]); + return BigInt.fromI32(0); } return BigInt.fromI32(decimalResult.value); } @@ -603,12 +604,12 @@ export function getPMMState( export function getQuoteTokenAddress(poolAddress: Address): Address { let pair = Pair.load(poolAddress.toHexString()); - if (pair != null && pair.type != TYPE_CLASSICAL_POOL) { - let pool = DVM.bind(poolAddress); - let quoteToken = pool._QUOTE_TOKEN_(); - return quoteToken as Address; + if (pair != null) { + return Address.fromString(pair.quoteToken); } - return Address.fromString(ADDRESS_ZERO); + let pool = DVM.bind(poolAddress); + let quoteToken = pool._QUOTE_TOKEN_(); + return quoteToken as Address; } export function updatePairTraderCount( diff --git a/src/mappings/dodoex/smartRoute.ts b/src/mappings/dodoex/smartRoute.ts index ae43bd3..5d9402d 100644 --- a/src/mappings/dodoex/smartRoute.ts +++ b/src/mappings/dodoex/smartRoute.ts @@ -1,127 +1,194 @@ -import {OrderHistory, TokenDayData, IncentiveRewardHistory, Pair, Token, Transaction} from "../../types/dodoex/schema" -import {OrderHistory as OrderHistoryV2} from "../../types/dodoex/DODOV2Proxy02/DODOV2Proxy02" import { - createToken, - createUser, - ZERO_BD, - ONE_BI, - convertTokenToDecimal, - getDODOZoo, - updateVirtualPairVolume, - updateTokenTraderCount -} from "./helpers" -import {SOURCE_SMART_ROUTE, TRANSACTION_TYPE_SWAP} from "../constant"; -import {Address, BigInt, store} from '@graphprotocol/graph-ts' -import {trimTokenData, updateTokenDayData,getDodoDayData,increaseVolumeAndFee,decreaseVolumeAndFee} from "./dayUpdates"; + OrderHistory, + TokenDayData, + IncentiveRewardHistory, + Pair, + Token, + Transaction, +} from "../../types/dodoex/schema"; +import { OrderHistory as OrderHistoryV2 } from "../../types/dodoex/DODOV2Proxy02/DODOV2Proxy02"; import { - calculateUsdVolume, -} from "./pricing" -import {addTransaction} from "./transaction" + createToken, + createUser, + ZERO_BD, + ONE_BI, + convertTokenToDecimal, + getDODOZoo, + updateVirtualPairVolume, + updateTokenTraderCount, +} from "./helpers"; +import { SOURCE_SMART_ROUTE, TRANSACTION_TYPE_SWAP } from "../constant"; +import { Address, BigInt, dataSource, store } from "@graphprotocol/graph-ts"; +import { + trimTokenData, + updateTokenDayData, + getDodoDayData, + increaseVolumeAndFee, + decreaseVolumeAndFee, +} from "./dayUpdates"; +import { calculateUsdVolume } from "./pricing"; +import { addTransaction } from "./transaction"; export function handleOrderHistory(event: OrderHistoryV2): void { - let transaction = addTransaction(event, event.transaction.from.toHexString(), TRANSACTION_TYPE_SWAP); - - let user = createUser(event.transaction.from, event); - let fromToken = createToken(event.params.fromToken, event); - let toToken = createToken(event.params.toToken, event); - let dealedFromAmount = convertTokenToDecimal(event.params.fromAmount, fromToken.decimals); - let dealedToAmount = convertTokenToDecimal(event.params.returnAmount, toToken.decimals); - - //更新时间戳 - user.updatedAt = event.block.timestamp; - fromToken.updatedAt = event.block.timestamp; - toToken.updatedAt = event.block.timestamp; - - let trim = false; - let volumeUSD = calculateUsdVolume(fromToken as Token, toToken as Token, dealedFromAmount, dealedToAmount, event.block.timestamp); - if (volumeUSD.equals(ZERO_BD)) { - fromToken.untrackedVolume = fromToken.untrackedVolume.plus(dealedFromAmount); - toToken.untrackedVolume = fromToken.untrackedVolume.plus(dealedToAmount); - } - - fromToken.volumeUSD = fromToken.volumeUSD.plus(volumeUSD).minus(transaction.volumeUSD) - toToken.volumeUSD = toToken.volumeUSD.plus(volumeUSD).minus(transaction.volumeUSD); - - //1、更新用户交易数据(用户的交易次数在下层) - user.txCount = user.txCount.plus(ONE_BI); - user.save(); - - //2、更新两个token的数据 - fromToken.tradeVolume = fromToken.tradeVolume.plus(dealedFromAmount); - fromToken.txCount = fromToken.txCount.plus(ONE_BI); - - toToken.tradeVolume = toToken.tradeVolume.plus(dealedToAmount); - toToken.txCount = toToken.txCount.plus(ONE_BI); - - //3、trim - for (let i = BigInt.fromI32(0); i.lt(event.logIndex); i = i.plus(ONE_BI)) { - let orderHistoryAboveID = event.transaction.hash.toHexString().concat("-").concat(i.toString()); - let orderHistoryAbove = OrderHistory.load(orderHistoryAboveID); - if (orderHistoryAbove != null) { - trimTokenData(createToken(Address.fromString(orderHistoryAbove.fromToken), event), orderHistoryAbove.amountIn, orderHistoryAbove.fromToken === fromToken.id ? ZERO_BD : orderHistoryAbove.amountIn, orderHistoryAbove.volumeUSD, event); - trimTokenData(createToken(Address.fromString(orderHistoryAbove.toToken), event), orderHistoryAbove.amountOut, orderHistoryAbove.toToken === toToken.id ? ZERO_BD : orderHistoryAbove.amountOut, orderHistoryAbove.volumeUSD, event); - decreaseVolumeAndFee(event,orderHistoryAbove.volumeUSD,ZERO_BD); - - store.remove("OrderHistory", orderHistoryAboveID); - trim = true; - } - } - - if (trim === false) { - updateVirtualPairVolume(event, dealedFromAmount, dealedToAmount, volumeUSD); + const network = dataSource.network(); + if ( + network == "mainnet" && + (event.params.fromToken.toHexString() == + "0x61786a044192a13b75130d4c96e9b59efd9c0da2" || + event.params.toToken.toHexString() == + "0x61786a044192a13b75130d4c96e9b59efd9c0da2") + ) + return; + let transaction = addTransaction( + event, + event.transaction.from.toHexString(), + TRANSACTION_TYPE_SWAP + ); + + let user = createUser(event.transaction.from, event); + let fromToken = createToken(event.params.fromToken, event); + let toToken = createToken(event.params.toToken, event); + let dealedFromAmount = convertTokenToDecimal( + event.params.fromAmount, + fromToken.decimals + ); + let dealedToAmount = convertTokenToDecimal( + event.params.returnAmount, + toToken.decimals + ); + + //更新时间戳 + user.updatedAt = event.block.timestamp; + fromToken.updatedAt = event.block.timestamp; + toToken.updatedAt = event.block.timestamp; + + let trim = false; + let volumeUSD = calculateUsdVolume( + fromToken as Token, + toToken as Token, + dealedFromAmount, + dealedToAmount, + event.block.timestamp + ); + if (volumeUSD.equals(ZERO_BD)) { + fromToken.untrackedVolume = fromToken.untrackedVolume.plus( + dealedFromAmount + ); + toToken.untrackedVolume = fromToken.untrackedVolume.plus(dealedToAmount); + } + + fromToken.volumeUSD = fromToken.volumeUSD + .plus(volumeUSD) + .minus(transaction.volumeUSD); + toToken.volumeUSD = toToken.volumeUSD + .plus(volumeUSD) + .minus(transaction.volumeUSD); + + //1、更新用户交易数据(用户的交易次数在下层) + user.txCount = user.txCount.plus(ONE_BI); + user.save(); + + //2、更新两个token的数据 + fromToken.tradeVolume = fromToken.tradeVolume.plus(dealedFromAmount); + fromToken.txCount = fromToken.txCount.plus(ONE_BI); + + toToken.tradeVolume = toToken.tradeVolume.plus(dealedToAmount); + toToken.txCount = toToken.txCount.plus(ONE_BI); + + //3、trim + for (let i = BigInt.fromI32(0); i.lt(event.logIndex); i = i.plus(ONE_BI)) { + let orderHistoryAboveID = event.transaction.hash + .toHexString() + .concat("-") + .concat(i.toString()); + let orderHistoryAbove = OrderHistory.load(orderHistoryAboveID); + if (orderHistoryAbove != null) { + trimTokenData( + createToken(Address.fromString(orderHistoryAbove.fromToken), event), + orderHistoryAbove.amountIn, + orderHistoryAbove.fromToken === fromToken.id + ? ZERO_BD + : orderHistoryAbove.amountIn, + orderHistoryAbove.volumeUSD, + event + ); + trimTokenData( + createToken(Address.fromString(orderHistoryAbove.toToken), event), + orderHistoryAbove.amountOut, + orderHistoryAbove.toToken === toToken.id + ? ZERO_BD + : orderHistoryAbove.amountOut, + orderHistoryAbove.volumeUSD, + event + ); + decreaseVolumeAndFee(event, orderHistoryAbove.volumeUSD, ZERO_BD); + + store.remove("OrderHistory", orderHistoryAboveID); + trim = true; } - - fromToken.save(); - toToken.save(); - - //4、更OrderHistory数据 - let orderHistoryID = event.transaction.hash.toHexString().concat("-").concat(event.logIndex.toString()); - let orderHistory = OrderHistory.load(orderHistoryID); - if (orderHistory == null) { - orderHistory = new OrderHistory(orderHistoryID); - orderHistory.source = SOURCE_SMART_ROUTE; - orderHistory.hash = event.transaction.hash.toHexString(); - orderHistory.timestamp = event.block.timestamp; - orderHistory.block = event.block.number; - orderHistory.fromToken = fromToken.id; - orderHistory.toToken = toToken.id; - orderHistory.from = event.transaction.from; - orderHistory.to = event.params.sender; - orderHistory.sender = event.params.sender; - orderHistory.amountIn = dealedFromAmount; - orderHistory.amountOut = dealedToAmount; - orderHistory.logIndex = event.transaction.index; - orderHistory.volumeUSD = volumeUSD; - - let incentiveRewardHistory = IncentiveRewardHistory.load(event.transaction.hash.toHexString()); - if (incentiveRewardHistory != null) { - orderHistory.tradingReward = incentiveRewardHistory.amount; - } else { - orderHistory.tradingReward = ZERO_BD; - } - + } + + if (trim === false) { + updateVirtualPairVolume(event, dealedFromAmount, dealedToAmount, volumeUSD); + } + + fromToken.save(); + toToken.save(); + + //4、更OrderHistory数据 + let orderHistoryID = event.transaction.hash + .toHexString() + .concat("-") + .concat(event.logIndex.toString()); + let orderHistory = OrderHistory.load(orderHistoryID); + if (orderHistory == null) { + orderHistory = new OrderHistory(orderHistoryID); + orderHistory.source = SOURCE_SMART_ROUTE; + orderHistory.hash = event.transaction.hash.toHexString(); + orderHistory.timestamp = event.block.timestamp; + orderHistory.block = event.block.number; + orderHistory.fromToken = fromToken.id; + orderHistory.toToken = toToken.id; + orderHistory.from = event.transaction.from; + orderHistory.to = event.params.sender; + orderHistory.sender = event.params.sender; + orderHistory.amountIn = dealedFromAmount; + orderHistory.amountOut = dealedToAmount; + orderHistory.logIndex = event.transaction.index; + orderHistory.volumeUSD = volumeUSD; + + let incentiveRewardHistory = IncentiveRewardHistory.load( + event.transaction.hash.toHexString() + ); + if (incentiveRewardHistory != null) { + orderHistory.tradingReward = incentiveRewardHistory.amount; + } else { + orderHistory.tradingReward = ZERO_BD; } - orderHistory.updatedAt = event.block.timestamp; - orderHistory.save(); - - //更新token统计信息 - let fromTokenDayData = updateTokenDayData(fromToken, event); - let toTokenDayData = updateTokenDayData(toToken, event); - fromTokenDayData.volume = fromTokenDayData.volume.plus(dealedFromAmount); - toTokenDayData.volume = toTokenDayData.volume.plus(dealedToAmount); - fromTokenDayData.save(); - toTokenDayData.save(); - - //更新DODOZoo - let dodoZoo = getDODOZoo(); - dodoZoo.txCount = dodoZoo.txCount.plus(ONE_BI); - dodoZoo.volumeUSD = dodoZoo.volumeUSD.plus(volumeUSD); - dodoZoo.save(); - let dodoDayData = getDodoDayData(event); - dodoDayData.volumeUSD = dodoDayData.volumeUSD.plus(volumeUSD).minus(transaction.volumeUSD); - dodoDayData.save(); - - updateTokenTraderCount(event.params.fromToken, event.transaction.from, event); - updateTokenTraderCount(event.params.toToken, event.transaction.from, event); - increaseVolumeAndFee(event,volumeUSD,ZERO_BD); + } + orderHistory.updatedAt = event.block.timestamp; + orderHistory.save(); + + //更新token统计信息 + let fromTokenDayData = updateTokenDayData(fromToken, event); + let toTokenDayData = updateTokenDayData(toToken, event); + fromTokenDayData.volume = fromTokenDayData.volume.plus(dealedFromAmount); + toTokenDayData.volume = toTokenDayData.volume.plus(dealedToAmount); + fromTokenDayData.save(); + toTokenDayData.save(); + + //更新DODOZoo + let dodoZoo = getDODOZoo(); + dodoZoo.txCount = dodoZoo.txCount.plus(ONE_BI); + dodoZoo.volumeUSD = dodoZoo.volumeUSD.plus(volumeUSD); + dodoZoo.save(); + let dodoDayData = getDodoDayData(event); + dodoDayData.volumeUSD = dodoDayData.volumeUSD + .plus(volumeUSD) + .minus(transaction.volumeUSD); + dodoDayData.save(); + + updateTokenTraderCount(event.params.fromToken, event.transaction.from, event); + updateTokenTraderCount(event.params.toToken, event.transaction.from, event); + increaseVolumeAndFee(event, volumeUSD, ZERO_BD); } diff --git a/src/mappings/merkle-airdrop/index.ts b/src/mappings/merkle-airdrop/index.ts new file mode 100644 index 0000000..08f9478 --- /dev/null +++ b/src/mappings/merkle-airdrop/index.ts @@ -0,0 +1,54 @@ +import { Address, ethereum, log, BigInt } from "@graphprotocol/graph-ts"; +import { + Claimed as ClaimedEvent, + MerkleDistributor, +} from "../../types/merkle/MerkleDistributor/MerkleDistributor"; +import { ERC20 } from "../../types/merkle/MerkleDistributor/ERC20"; +import { Claimed, Token } from "../../types/merkle/schema"; + +export function handleClaimed(event: ClaimedEvent): void { + let entity = new Claimed( + event.transaction.hash.toHexString().concat(event.logIndex.toString()) + ); + entity.hash = event.transaction.hash.toHexString(); + entity.logIndex = event.logIndex.toI32(); + entity.blockNumber = event.block.number; + entity.timestamp = event.block.timestamp; + entity.account = event.params.account; + entity.amount = event.params.amount; + entity.index = event.params.index; + entity.address = event.address; + + let merkleDistributor = MerkleDistributor.bind(event.address); + let tokenAddress = merkleDistributor.try_token(); + if (tokenAddress.reverted) { + log.info("merkleDistributor.try_token reverted: {}", [entity.id]); + } + let token = createToken(tokenAddress.value, event); + entity.token = token.id; + entity.updatedAt = event.block.timestamp; + entity.save(); +} + +function createToken(address: Address, event: ethereum.Event): Token { + let token = Token.load(address.toHexString()); + if (token == null) { + token = new Token(address.toHexString()); + let erc20 = ERC20.bind(address); + token.name = erc20.name(); + token.symbol = erc20.symbol(); + token.decimals = BigInt.fromI32(erc20.decimals()); + let totalSupplyResult = erc20.try_totalSupply(); + if (totalSupplyResult.reverted) { + log.error("ERC20.try_totalSupply reverted. address: {}", [ + address.toHexString(), + ]); + token.totalSupply = BigInt.fromI32(0); + } else { + token.totalSupply = totalSupplyResult.value; + } + token.updatedAt = event.block.timestamp; + token.save(); + } + return token as Token; +} diff --git a/subgraphs/dodoex/dodoex_bsc-graft.yaml b/subgraphs/dodoex/dodoex_bsc-graft.yaml index 7ea03cf..951d9dc 100644 --- a/subgraphs/dodoex/dodoex_bsc-graft.yaml +++ b/subgraphs/dodoex/dodoex_bsc-graft.yaml @@ -1,8 +1,10 @@ specVersion: 0.0.4 description: Dodoex.io -# graft: -# base: QmcQM6MaZRS9soQNsKfPDHmqsMKB1nebuZJwoiysA525aY -# block: 23887577 +graft: + base: QmNjntYEcbLPzyvjhMCB3AruMbzWcU8UxrJAGcYvS3Aagf + block: 12241838 +features: + - grafting repository: https://github.com/DODOEX/dodoex_v2_subgraph schema: file: ./dodoex.graphql diff --git a/subgraphs/dodoex/dodoex_bsc.yaml b/subgraphs/dodoex/dodoex_bsc.yaml index de0cc23..951d9dc 100644 --- a/subgraphs/dodoex/dodoex_bsc.yaml +++ b/subgraphs/dodoex/dodoex_bsc.yaml @@ -1,5 +1,10 @@ specVersion: 0.0.4 description: Dodoex.io +graft: + base: QmNjntYEcbLPzyvjhMCB3AruMbzWcU8UxrJAGcYvS3Aagf + block: 12241838 +features: + - grafting repository: https://github.com/DODOEX/dodoex_v2_subgraph schema: file: ./dodoex.graphql diff --git a/subgraphs/dodoex/dodoex_linea.yaml b/subgraphs/dodoex/dodoex_linea.yaml new file mode 100644 index 0000000..4446122 --- /dev/null +++ b/subgraphs/dodoex/dodoex_linea.yaml @@ -0,0 +1,662 @@ +specVersion: 0.0.4 +description: Dodoex.io +repository: https://github.com/DODOEX/dodoex_v2_subgraph +schema: + file: ./dodoex.graphql +dataSources: + - kind: ethereum/contract + name: DODOFeeRouteProxy + network: linea + source: + address: '0x03e89fC55A5ad0531576E5a502c4CA52c8bf391B' + abi: DODOFeeRouteProxy + startBlock: 152671 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/smartRoute.ts + entities: + - Pair + - Token + abis: + - name: DODOFeeRouteProxy + file: ../../abis/DODOFeeRouteProxy.json + - name: DODOV2Proxy02 + file: ../../abis/DODOV2Proxy02.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + eventHandlers: + - event: OrderHistory(address,address,address,uint256,uint256) + handler: handleOrderHistory + - kind: ethereum/contract + name: DODOFeeRouteProxy-widgit + network: linea + source: + address: '0x70b9c57e1ff24761c1c3ced57ddae9a3f3570698' + abi: DODOFeeRouteProxy + startBlock: 152728 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/smartRoute.ts + entities: + - Pair + - Token + abis: + - name: DODOFeeRouteProxy + file: ../../abis/DODOFeeRouteProxy.json + - name: DODOV2Proxy02 + file: ../../abis/DODOV2Proxy02.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + eventHandlers: + - event: OrderHistory(address,address,address,uint256,uint256) + handler: handleOrderHistory + - kind: ethereum/contract + name: DODOV2Proxy02 + network: linea + source: + address: '0x4cad0052524648a7fa2cfe279997b00239295f33' + abi: DODOV2Proxy02 + startBlock: 91525 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/smartRoute.ts + entities: + - Pair + - Token + abis: + - name: DODOV2Proxy02 + file: ../../abis/DODOV2Proxy02.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + eventHandlers: + - event: OrderHistory(address,address,address,uint256,uint256) + handler: handleOrderHistory + - kind: ethereum/contract + name: DVMFactory + network: linea + source: + address: '0xc0F9553Df63De5a97Fe64422c8578D0657C360f7' + abi: DVMFactory + startBlock: 91468 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/poolFactory.ts + entities: + - Pair + - Token + abis: + - name: DVMFactory + file: ../../abis/DVMFactory.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + - name: DVM + file: ../../abis/DVM.json + - name: FeeRateModel + file: ../../abis/FeeRateModel.json + eventHandlers: + - event: NewDVM(address,address,address,address) + handler: handleNewDVM + - event: RemoveDVM(address) + handler: handleRemoveDVM + - kind: ethereum/contract + name: DPPFactory + network: linea + source: + address: "0x97bBF5BB1dcfC93A8c67e97E50Bea19DB3416A83" + abi: DPPFactory + startBlock: 91473 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/poolFactory.ts + entities: + - Pair + - Token + abis: + - name: DPPFactory + file: ../../abis/DPPFactory.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + - name: DPP + file: ../../abis/DPP.json + - name: FeeRateModel + file: ../../abis/FeeRateModel.json + eventHandlers: + - event: NewDPP(address,address,address,address) + handler: handleNewDPP + - kind: ethereum/contract + name: DSPFactory + network: linea + source: + address: '0x2933c0374089D7D98BA0C71c5E02E1A0e09deBEE' + abi: DSPFactory + startBlock: 152408 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/poolFactory.ts + entities: + - Pair + - Token + abis: + - name: DSPFactory + file: ../../abis/DSPFactory.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + - name: DSP + file: ../../abis/DSP.json + - name: FeeRateModel + file: ../../abis/FeeRateModel.json + eventHandlers: + - event: NewDSP(address,address,address,address) + handler: handleNewDSP + - event: RemoveDSP(address) + handler: handleRemoveDSP + # - kind: ethereum/contract + # name: CrowdPoolingFactory + # network: linea + # source: + # address: '0x6E5f239f729c83E976a7A280F81Dd1685dd89218' + # abi: CrowdPoolingFactory + # startBlock: 226004 + # mapping: + # kind: ethereum/events + # apiVersion: 0.0.6 + # language: wasm/assemblyscript + # file: ../../src/mappings/dodoex/poolFactory.ts + # entities: + # - Pair + # - Token + # abis: + # - name: DVM + # file: ../../abis/DVM.json + # - name: DPP + # file: ../../abis/DPP.json + # - name: DODO + # file: ../../abis/DODO.json + # - name: CrowdPoolingFactory + # file: ../../abis/CrowdPoolingFactory.json + # - name: ERC20 + # file: ../../abis/ERC20.json + # - name: ERC20SymbolBytes + # file: ../../abis/ERC20SymbolBytes.json + # - name: ERC20NameBytes + # file: ../../abis/ERC20NameBytes.json + # - name: CP + # file: ../../abis/CP.json + # eventHandlers: + # - event: NewCP(address,address,address,address) + # handler: handleNewCP + - kind: ethereum/contract + name: CrowdPoolingFactoryV2 + network: linea + source: + address: '0x6B9577b87666af89bd0e144b9b64e8Ed166E303d' + abi: CrowdPoolingFactory + startBlock: 91738 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/poolFactory.ts + entities: + - Pair + - Token + abis: + - name: DVM + file: ../../abis/DVM.json + - name: DPP + file: ../../abis/DPP.json + - name: CrowdPoolingFactory + file: ../../abis/CrowdPoolingFactory.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + - name: CP + file: ../../abis/CP.json + - name: CPV2 + file: ../../abis/CPV2.json + eventHandlers: + - event: NewCP(address,address,address,address) + handler: handleNewCP + # - kind: ethereum/contract + # name: UpCrowdPoolingFactory + # network: linea + # source: + # address: '0xE92787F457F541a9D5Ae17C1dbdBffA8D3BA3C25' + # abi: UpCrowdPoolingFactory + # startBlock: 226005 + # mapping: + # kind: ethereum/events + # apiVersion: 0.0.6 + # language: wasm/assemblyscript + # file: ../../src/mappings/dodoex/poolFactory.ts + # entities: + # - Pair + # - Token + # abis: + # - name: DVM + # file: ../../abis/DVM.json + # - name: DPP + # file: ../../abis/DPP.json + # - name: CrowdPoolingFactory + # file: ../../abis/CrowdPoolingFactory.json + # - name: UpCrowdPoolingFactory + # file: ../../abis/UpCrowdPoolingFactory.json + # - name: ERC20 + # file: ../../abis/ERC20.json + # - name: ERC20SymbolBytes + # file: ../../abis/ERC20SymbolBytes.json + # - name: ERC20NameBytes + # file: ../../abis/ERC20NameBytes.json + # - name: CP + # file: ../../abis/CP.json + # eventHandlers: + # - event: NewCP(address,address,address,address) + # handler: handleNewCP + # - kind: ethereum/contract + # name: DODOZoo + # network: linea + # source: + # address: '0xBcC3401E16C25EaF4d3FeD632ce3288503883B1f' + # abi: DODOZoo + # startBlock: 226006 + # mapping: + # kind: ethereum/events + # apiVersion: 0.0.6 + # language: wasm/assemblyscript + # file: ../../src/mappings/dodoex/classicPoolFromV1.ts + # entities: + # - Pair + # - Token + # abis: + # - name: DODOZoo + # file: ../../abis/DODOZoo.json + # - name: DVM + # file: ../../abis/DVM.json + # - name: DPP + # file: ../../abis/DPP.json + # - name: DODO + # file: ../../abis/DODO.json + # - name: ERC20 + # file: ../../abis/ERC20.json + # - name: ERC20SymbolBytes + # file: ../../abis/ERC20SymbolBytes.json + # - name: ERC20NameBytes + # file: ../../abis/ERC20NameBytes.json + # eventHandlers: + # - event: DODOBirth(address,address,address) + # handler: handleDODOBirth + # - kind: ethereum/contract + # name: DODOMine + # network: linea + # source: + # address: '0xe3c10989ddc5df5b1b9c0e6229c2e4e0862fde3e' + # abi: DODOMine + # startBlock: 226006 + # mapping: + # kind: ethereum/events + # apiVersion: 0.0.6 + # language: wasm/assemblyscript + # file: ../../src/mappings/dodoex/mine.ts + # entities: + # - User + # - StakeHistory + # abis: + # - name: DODOMine + # file: ../../abis/DODOMine.json + # - name: ERC20 + # file: ../../abis/ERC20.json + # - name: ERC20SymbolBytes + # file: ../../abis/ERC20SymbolBytes.json + # - name: ERC20NameBytes + # file: ../../abis/ERC20NameBytes.json + # eventHandlers: + # - event: Deposit(indexed address,indexed uint256,uint256) + # handler: handleDeposit + # - event: Withdraw(indexed address,indexed uint256,uint256) + # handler: handleWithdraw + # - event: Claim(indexed address,uint256) + # handler: handleClaim +templates: + - kind: ethereum/contract + name: DVM + network: linea + source: + abi: DVM + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/pool.ts + entities: + - Pair + - Token + - DODOSwap + abis: + - name: DVM + file: ../../abis/DVM.json + - name: DPP + file: ../../abis/DPP.json + - name: DODO + file: ../../abis/DODO.json + - name: DVMFactory + file: ../../abis/DVMFactory.json + - name: DPPFactory + file: ../../abis/DPPFactory.json + - name: FeeRateModel + file: ../../abis/FeeRateModel.json + - name: DODOZoo + file: ../../abis/DODOZoo.json + eventHandlers: + - event: DODOSwap(address,address,uint256,uint256,address,address) + handler: handleDODOSwap + - event: BuyShares(address,uint256,uint256) + handler: handleBuyShares + - event: SellShares(address,address,uint256,uint256) + handler: handleSellShares + - event: Transfer(indexed address,indexed address,uint256) + handler: handleTransfer + - kind: ethereum/contract + name: DPP + network: linea + source: + abi: DPP + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/pool.ts + entities: + - Pair + - Token + abis: + - name: DVM + file: ../../abis/DVM.json + - name: DPP + file: ../../abis/DPP.json + - name: DODO + file: ../../abis/DODO.json + - name: DVMFactory + file: ../../abis/DVMFactory.json + - name: DPPFactory + file: ../../abis/DPPFactory.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + - name: FeeRateModel + file: ../../abis/FeeRateModel.json + - name: DODOZoo + file: ../../abis/DODOZoo.json + eventHandlers: + - event: DODOSwap(address,address,uint256,uint256,address,address) + handler: handleDODOSwap + - event: LpFeeRateChange(uint256) + handler: handleLpFeeRateChange + - kind: ethereum/contract + name: DPPOracleAdmin + network: linea + source: + abi: DPPOracleAdmin + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/pool.ts + entities: + - Pair + - Token + abis: + - name: DVM + file: ../../abis/DVM.json + - name: DPP + file: ../../abis/DPP.json + - name: DPPOracleAdmin + file: ../../abis/DPPOracleAdmin.json + - name: DODO + file: ../../abis/DODO.json + - name: DVMFactory + file: ../../abis/DVMFactory.json + - name: DPPFactory + file: ../../abis/DPPFactory.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + - name: FeeRateModel + file: ../../abis/FeeRateModel.json + - name: DODOZoo + file: ../../abis/DODOZoo.json + eventHandlers: + - event: OwnershipTransferred(indexed address,indexed address) + handler: handleDPPOwnershipTransferred + - kind: ethereum/contract + name: DSP + network: linea + source: + abi: DSP + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/pool.ts + entities: + - Pair + - Token + - DODOSwap + abis: + - name: DVMFactory + file: ../../abis/DVMFactory.json + - name: DPPFactory + file: ../../abis/DPPFactory.json + - name: DSPFactory + file: ../../abis/DSPFactory.json + - name: DVM + file: ../../abis/DVM.json + - name: DPP + file: ../../abis/DPP.json + - name: DSP + file: ../../abis/DSP.json + - name: FeeRateModel + file: ../../abis/FeeRateModel.json + - name: DODOZoo + file: ../../abis/DODOZoo.json + eventHandlers: + - event: DODOSwap(address,address,uint256,uint256,address,address) + handler: handleDODOSwap + - event: BuyShares(address,uint256,uint256) + handler: handleBuyShares + - event: SellShares(address,address,uint256,uint256) + handler: handleSellShares + - event: Transfer(indexed address,indexed address,uint256) + handler: handleTransfer + - kind: ethereum/contract + name: CP + network: linea + source: + abi: CP + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/crowdPooling.ts + entities: + - CrowdPooling + - Token + abis: + - name: DVM + file: ../../abis/DVM.json + - name: DPP + file: ../../abis/DPP.json + - name: DODO + file: ../../abis/DODO.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + - name: CP + file: ../../abis/CP.json + - name: DVMFactory + file: ../../abis/DVMFactory.json + - name: DODOZoo + file: ../../abis/DODOZoo.json + eventHandlers: + - event: Bid(address,uint256,uint256) + handler: handleBid + - event: Cancel(address,uint256) + handler: handleCancel + - event: Settle() + handler: handleSettle + - event: Claim(address,uint256,uint256) + handler: handleClaim + - kind: ethereum/contract + name: DODO + network: linea + source: + abi: DODO + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/classicPoolFromV1.ts + entities: + - Pair + - Token + abis: + - name: DVM + file: ../../abis/DVM.json + - name: DPP + file: ../../abis/DPP.json + - name: DODO + file: ../../abis/DODO.json + - name: DVMFactory + file: ../../abis/DVMFactory.json + - name: DPPFactory + file: ../../abis/DPPFactory.json + - name: DODOZoo + file: ../../abis/DODOZoo.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + eventHandlers: + - event: Deposit(indexed address,indexed address,bool,uint256,uint256) + handler: handleDeposit + - event: Withdraw(indexed address,indexed address,bool,uint256,uint256) + handler: handleWithdraw + - event: SellBaseToken(indexed address,uint256,uint256) + handler: handleSellBaseToken + - event: BuyBaseToken(indexed address,uint256,uint256) + handler: handleBuyBaseToken + - event: UpdateLiquidityProviderFeeRate(uint256,uint256) + handler: handleUpdateLiquidityProviderFeeRate + - event: ClaimAssets(indexed address,uint256,uint256) + handler: handleClaimAssets + - event: ChargeMaintainerFee(indexed address,bool,uint256) + handler: handleChargeMaintainerFee + - event: UpdateMaintainerFeeRate(uint256,uint256) + handler: handleUpdateMaintainerFeeRate + - kind: ethereum/contract + name: DODOLpToken + network: linea + source: + abi: DODOLpToken + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/lpToken.ts + entities: + - Pair + - Token + abis: + - name: DODOLpToken + file: ../../abis/DODOLpToken.json + eventHandlers: + - event: Transfer(indexed address,indexed address,uint256) + handler: handleTransfer + - kind: ethereum/contract + name: CPV2 + network: linea + source: + abi: CPV2 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/crowdPooling.ts + entities: + - CrowdPooling + - Token + abis: + - name: DVM + file: ../../abis/DVM.json + - name: DPP + file: ../../abis/DPP.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + - name: CP + file: ../../abis/CP.json + - name: CPV2 + file: ../../abis/CPV2.json + - name: DVMFactory + file: ../../abis/DVMFactory.json + - name: DODOZoo + file: ../../abis/DODOZoo.json + eventHandlers: + - event: Bid(address,uint256,uint256) + handler: handleBid + - event: Cancel(address,uint256) + handler: handleCancel + - event: Settle() + handler: handleSettle diff --git a/subgraphs/dodoex/dodoex_mainnet.yaml b/subgraphs/dodoex/dodoex_mainnet.yaml index bcc81cc..d6511a2 100644 --- a/subgraphs/dodoex/dodoex_mainnet.yaml +++ b/subgraphs/dodoex/dodoex_mainnet.yaml @@ -1,5 +1,10 @@ specVersion: 0.0.4 description: Dodoex.io +graft: + base: QmQukqWv9VDsPAMMbEBjUSTY1aFnv8CENhX7JEL3zQzkac + block: 12316399 +features: + - grafting repository: https://github.com/DODOEX/dodoex_v2_subgraph schema: file: ./dodoex.graphql diff --git a/subgraphs/dodoex/dodoex_manta.yaml b/subgraphs/dodoex/dodoex_manta.yaml new file mode 100644 index 0000000..cf9d607 --- /dev/null +++ b/subgraphs/dodoex/dodoex_manta.yaml @@ -0,0 +1,662 @@ +specVersion: 0.0.4 +description: Dodoex.io +repository: https://github.com/DODOEX/dodoex_v2_subgraph +schema: + file: ./dodoex.graphql +dataSources: + - kind: ethereum/contract + name: DODOFeeRouteProxy + network: manta + source: + address: '0x2933c0374089D7D98BA0C71c5E02E1A0e09deBEE' + abi: DODOFeeRouteProxy + startBlock: 390636 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/smartRoute.ts + entities: + - Pair + - Token + abis: + - name: DODOFeeRouteProxy + file: ../../abis/DODOFeeRouteProxy.json + - name: DODOV2Proxy02 + file: ../../abis/DODOV2Proxy02.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + eventHandlers: + - event: OrderHistory(address,address,address,uint256,uint256) + handler: handleOrderHistory + - kind: ethereum/contract + name: DODOFeeRouteProxy-widgit + network: manta + source: + address: '0x200D866Edf41070DE251Ef92715a6Ea825A5Eb80' + abi: DODOFeeRouteProxy + startBlock: 390618 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/smartRoute.ts + entities: + - Pair + - Token + abis: + - name: DODOFeeRouteProxy + file: ../../abis/DODOFeeRouteProxy.json + - name: DODOV2Proxy02 + file: ../../abis/DODOV2Proxy02.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + eventHandlers: + - event: OrderHistory(address,address,address,uint256,uint256) + handler: handleOrderHistory + - kind: ethereum/contract + name: DODOV2Proxy02 + network: manta + source: + address: '0x2F86652dAEF5f1728c54191C955F065Ec3C188c7' + abi: DODOV2Proxy02 + startBlock: 390502 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/smartRoute.ts + entities: + - Pair + - Token + abis: + - name: DODOV2Proxy02 + file: ../../abis/DODOV2Proxy02.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + eventHandlers: + - event: OrderHistory(address,address,address,uint256,uint256) + handler: handleOrderHistory + - kind: ethereum/contract + name: DVMFactory + network: manta + source: + address: '0x97bBF5BB1dcfC93A8c67e97E50Bea19DB3416A83' + abi: DVMFactory + startBlock: 384137 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/poolFactory.ts + entities: + - Pair + - Token + abis: + - name: DVMFactory + file: ../../abis/DVMFactory.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + - name: DVM + file: ../../abis/DVM.json + - name: FeeRateModel + file: ../../abis/FeeRateModel.json + eventHandlers: + - event: NewDVM(address,address,address,address) + handler: handleNewDVM + - event: RemoveDVM(address) + handler: handleRemoveDVM + - kind: ethereum/contract + name: DPPFactory + network: manta + source: + address: "0xa71415675F68f29259ddD63215E5518d2735bf0a" + abi: DPPFactory + startBlock: 384142 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/poolFactory.ts + entities: + - Pair + - Token + abis: + - name: DPPFactory + file: ../../abis/DPPFactory.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + - name: DPP + file: ../../abis/DPP.json + - name: FeeRateModel + file: ../../abis/FeeRateModel.json + eventHandlers: + - event: NewDPP(address,address,address,address) + handler: handleNewDPP + - kind: ethereum/contract + name: DSPFactory + network: manta + source: + address: '0x29C7718e8B606cEF1c44Fe6e43e07aF9D0875DE1' + abi: DSPFactory + startBlock: 384154 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/poolFactory.ts + entities: + - Pair + - Token + abis: + - name: DSPFactory + file: ../../abis/DSPFactory.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + - name: DSP + file: ../../abis/DSP.json + - name: FeeRateModel + file: ../../abis/FeeRateModel.json + eventHandlers: + - event: NewDSP(address,address,address,address) + handler: handleNewDSP + - event: RemoveDSP(address) + handler: handleRemoveDSP + # - kind: ethereum/contract + # name: CrowdPoolingFactory + # network: manta + # source: + # address: '0x6E5f239f729c83E976a7A280F81Dd1685dd89218' + # abi: CrowdPoolingFactory + # startBlock: 226004 + # mapping: + # kind: ethereum/events + # apiVersion: 0.0.6 + # language: wasm/assemblyscript + # file: ../../src/mappings/dodoex/poolFactory.ts + # entities: + # - Pair + # - Token + # abis: + # - name: DVM + # file: ../../abis/DVM.json + # - name: DPP + # file: ../../abis/DPP.json + # - name: DODO + # file: ../../abis/DODO.json + # - name: CrowdPoolingFactory + # file: ../../abis/CrowdPoolingFactory.json + # - name: ERC20 + # file: ../../abis/ERC20.json + # - name: ERC20SymbolBytes + # file: ../../abis/ERC20SymbolBytes.json + # - name: ERC20NameBytes + # file: ../../abis/ERC20NameBytes.json + # - name: CP + # file: ../../abis/CP.json + # eventHandlers: + # - event: NewCP(address,address,address,address) + # handler: handleNewCP + - kind: ethereum/contract + name: CrowdPoolingFactoryV2 + network: manta + source: + address: '0xFD2b7994f91c08aAa5e013E899334A2DBb500DF1' + abi: CrowdPoolingFactory + startBlock: 384150 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/poolFactory.ts + entities: + - Pair + - Token + abis: + - name: DVM + file: ../../abis/DVM.json + - name: DPP + file: ../../abis/DPP.json + - name: CrowdPoolingFactory + file: ../../abis/CrowdPoolingFactory.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + - name: CP + file: ../../abis/CP.json + - name: CPV2 + file: ../../abis/CPV2.json + eventHandlers: + - event: NewCP(address,address,address,address) + handler: handleNewCP + # - kind: ethereum/contract + # name: UpCrowdPoolingFactory + # network: manta + # source: + # address: '0xE92787F457F541a9D5Ae17C1dbdBffA8D3BA3C25' + # abi: UpCrowdPoolingFactory + # startBlock: 226005 + # mapping: + # kind: ethereum/events + # apiVersion: 0.0.6 + # language: wasm/assemblyscript + # file: ../../src/mappings/dodoex/poolFactory.ts + # entities: + # - Pair + # - Token + # abis: + # - name: DVM + # file: ../../abis/DVM.json + # - name: DPP + # file: ../../abis/DPP.json + # - name: CrowdPoolingFactory + # file: ../../abis/CrowdPoolingFactory.json + # - name: UpCrowdPoolingFactory + # file: ../../abis/UpCrowdPoolingFactory.json + # - name: ERC20 + # file: ../../abis/ERC20.json + # - name: ERC20SymbolBytes + # file: ../../abis/ERC20SymbolBytes.json + # - name: ERC20NameBytes + # file: ../../abis/ERC20NameBytes.json + # - name: CP + # file: ../../abis/CP.json + # eventHandlers: + # - event: NewCP(address,address,address,address) + # handler: handleNewCP + # - kind: ethereum/contract + # name: DODOZoo + # network: manta + # source: + # address: '0xBcC3401E16C25EaF4d3FeD632ce3288503883B1f' + # abi: DODOZoo + # startBlock: 226006 + # mapping: + # kind: ethereum/events + # apiVersion: 0.0.6 + # language: wasm/assemblyscript + # file: ../../src/mappings/dodoex/classicPoolFromV1.ts + # entities: + # - Pair + # - Token + # abis: + # - name: DODOZoo + # file: ../../abis/DODOZoo.json + # - name: DVM + # file: ../../abis/DVM.json + # - name: DPP + # file: ../../abis/DPP.json + # - name: DODO + # file: ../../abis/DODO.json + # - name: ERC20 + # file: ../../abis/ERC20.json + # - name: ERC20SymbolBytes + # file: ../../abis/ERC20SymbolBytes.json + # - name: ERC20NameBytes + # file: ../../abis/ERC20NameBytes.json + # eventHandlers: + # - event: DODOBirth(address,address,address) + # handler: handleDODOBirth + # - kind: ethereum/contract + # name: DODOMine + # network: manta + # source: + # address: '0xe3c10989ddc5df5b1b9c0e6229c2e4e0862fde3e' + # abi: DODOMine + # startBlock: 226006 + # mapping: + # kind: ethereum/events + # apiVersion: 0.0.6 + # language: wasm/assemblyscript + # file: ../../src/mappings/dodoex/mine.ts + # entities: + # - User + # - StakeHistory + # abis: + # - name: DODOMine + # file: ../../abis/DODOMine.json + # - name: ERC20 + # file: ../../abis/ERC20.json + # - name: ERC20SymbolBytes + # file: ../../abis/ERC20SymbolBytes.json + # - name: ERC20NameBytes + # file: ../../abis/ERC20NameBytes.json + # eventHandlers: + # - event: Deposit(indexed address,indexed uint256,uint256) + # handler: handleDeposit + # - event: Withdraw(indexed address,indexed uint256,uint256) + # handler: handleWithdraw + # - event: Claim(indexed address,uint256) + # handler: handleClaim +templates: + - kind: ethereum/contract + name: DVM + network: manta + source: + abi: DVM + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/pool.ts + entities: + - Pair + - Token + - DODOSwap + abis: + - name: DVM + file: ../../abis/DVM.json + - name: DPP + file: ../../abis/DPP.json + - name: DODO + file: ../../abis/DODO.json + - name: DVMFactory + file: ../../abis/DVMFactory.json + - name: DPPFactory + file: ../../abis/DPPFactory.json + - name: FeeRateModel + file: ../../abis/FeeRateModel.json + - name: DODOZoo + file: ../../abis/DODOZoo.json + eventHandlers: + - event: DODOSwap(address,address,uint256,uint256,address,address) + handler: handleDODOSwap + - event: BuyShares(address,uint256,uint256) + handler: handleBuyShares + - event: SellShares(address,address,uint256,uint256) + handler: handleSellShares + - event: Transfer(indexed address,indexed address,uint256) + handler: handleTransfer + - kind: ethereum/contract + name: DPP + network: manta + source: + abi: DPP + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/pool.ts + entities: + - Pair + - Token + abis: + - name: DVM + file: ../../abis/DVM.json + - name: DPP + file: ../../abis/DPP.json + - name: DODO + file: ../../abis/DODO.json + - name: DVMFactory + file: ../../abis/DVMFactory.json + - name: DPPFactory + file: ../../abis/DPPFactory.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + - name: FeeRateModel + file: ../../abis/FeeRateModel.json + - name: DODOZoo + file: ../../abis/DODOZoo.json + eventHandlers: + - event: DODOSwap(address,address,uint256,uint256,address,address) + handler: handleDODOSwap + - event: LpFeeRateChange(uint256) + handler: handleLpFeeRateChange + - kind: ethereum/contract + name: DPPOracleAdmin + network: manta + source: + abi: DPPOracleAdmin + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/pool.ts + entities: + - Pair + - Token + abis: + - name: DVM + file: ../../abis/DVM.json + - name: DPP + file: ../../abis/DPP.json + - name: DPPOracleAdmin + file: ../../abis/DPPOracleAdmin.json + - name: DODO + file: ../../abis/DODO.json + - name: DVMFactory + file: ../../abis/DVMFactory.json + - name: DPPFactory + file: ../../abis/DPPFactory.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + - name: FeeRateModel + file: ../../abis/FeeRateModel.json + - name: DODOZoo + file: ../../abis/DODOZoo.json + eventHandlers: + - event: OwnershipTransferred(indexed address,indexed address) + handler: handleDPPOwnershipTransferred + - kind: ethereum/contract + name: DSP + network: manta + source: + abi: DSP + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/pool.ts + entities: + - Pair + - Token + - DODOSwap + abis: + - name: DVMFactory + file: ../../abis/DVMFactory.json + - name: DPPFactory + file: ../../abis/DPPFactory.json + - name: DSPFactory + file: ../../abis/DSPFactory.json + - name: DVM + file: ../../abis/DVM.json + - name: DPP + file: ../../abis/DPP.json + - name: DSP + file: ../../abis/DSP.json + - name: FeeRateModel + file: ../../abis/FeeRateModel.json + - name: DODOZoo + file: ../../abis/DODOZoo.json + eventHandlers: + - event: DODOSwap(address,address,uint256,uint256,address,address) + handler: handleDODOSwap + - event: BuyShares(address,uint256,uint256) + handler: handleBuyShares + - event: SellShares(address,address,uint256,uint256) + handler: handleSellShares + - event: Transfer(indexed address,indexed address,uint256) + handler: handleTransfer + - kind: ethereum/contract + name: CP + network: manta + source: + abi: CP + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/crowdPooling.ts + entities: + - CrowdPooling + - Token + abis: + - name: DVM + file: ../../abis/DVM.json + - name: DPP + file: ../../abis/DPP.json + - name: DODO + file: ../../abis/DODO.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + - name: CP + file: ../../abis/CP.json + - name: DVMFactory + file: ../../abis/DVMFactory.json + - name: DODOZoo + file: ../../abis/DODOZoo.json + eventHandlers: + - event: Bid(address,uint256,uint256) + handler: handleBid + - event: Cancel(address,uint256) + handler: handleCancel + - event: Settle() + handler: handleSettle + - event: Claim(address,uint256,uint256) + handler: handleClaim + - kind: ethereum/contract + name: DODO + network: manta + source: + abi: DODO + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/classicPoolFromV1.ts + entities: + - Pair + - Token + abis: + - name: DVM + file: ../../abis/DVM.json + - name: DPP + file: ../../abis/DPP.json + - name: DODO + file: ../../abis/DODO.json + - name: DVMFactory + file: ../../abis/DVMFactory.json + - name: DPPFactory + file: ../../abis/DPPFactory.json + - name: DODOZoo + file: ../../abis/DODOZoo.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + eventHandlers: + - event: Deposit(indexed address,indexed address,bool,uint256,uint256) + handler: handleDeposit + - event: Withdraw(indexed address,indexed address,bool,uint256,uint256) + handler: handleWithdraw + - event: SellBaseToken(indexed address,uint256,uint256) + handler: handleSellBaseToken + - event: BuyBaseToken(indexed address,uint256,uint256) + handler: handleBuyBaseToken + - event: UpdateLiquidityProviderFeeRate(uint256,uint256) + handler: handleUpdateLiquidityProviderFeeRate + - event: ClaimAssets(indexed address,uint256,uint256) + handler: handleClaimAssets + - event: ChargeMaintainerFee(indexed address,bool,uint256) + handler: handleChargeMaintainerFee + - event: UpdateMaintainerFeeRate(uint256,uint256) + handler: handleUpdateMaintainerFeeRate + - kind: ethereum/contract + name: DODOLpToken + network: manta + source: + abi: DODOLpToken + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/lpToken.ts + entities: + - Pair + - Token + abis: + - name: DODOLpToken + file: ../../abis/DODOLpToken.json + eventHandlers: + - event: Transfer(indexed address,indexed address,uint256) + handler: handleTransfer + - kind: ethereum/contract + name: CPV2 + network: manta + source: + abi: CPV2 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/crowdPooling.ts + entities: + - CrowdPooling + - Token + abis: + - name: DVM + file: ../../abis/DVM.json + - name: DPP + file: ../../abis/DPP.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + - name: CP + file: ../../abis/CP.json + - name: CPV2 + file: ../../abis/CPV2.json + - name: DVMFactory + file: ../../abis/DVMFactory.json + - name: DODOZoo + file: ../../abis/DODOZoo.json + eventHandlers: + - event: Bid(address,uint256,uint256) + handler: handleBid + - event: Cancel(address,uint256) + handler: handleCancel + - event: Settle() + handler: handleSettle diff --git a/subgraphs/dodoex/dodoex_mantle.yaml b/subgraphs/dodoex/dodoex_mantle.yaml new file mode 100644 index 0000000..ac5d4b8 --- /dev/null +++ b/subgraphs/dodoex/dodoex_mantle.yaml @@ -0,0 +1,662 @@ +specVersion: 0.0.4 +description: Dodoex.io +repository: https://github.com/DODOEX/dodoex_v2_subgraph +schema: + file: ./dodoex.graphql +dataSources: + - kind: ethereum/contract + name: DODOFeeRouteProxy + network: mantle + source: + address: '0x70B9C57E1fF24761C1C3ced57Ddae9A3F3570698' + abi: DODOFeeRouteProxy + startBlock: 21128010 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/smartRoute.ts + entities: + - Pair + - Token + abis: + - name: DODOFeeRouteProxy + file: ../../abis/DODOFeeRouteProxy.json + - name: DODOV2Proxy02 + file: ../../abis/DODOV2Proxy02.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + eventHandlers: + - event: OrderHistory(address,address,address,uint256,uint256) + handler: handleOrderHistory + - kind: ethereum/contract + name: DODOFeeRouteProxy-widgit + network: mantle + source: + address: '0xB4E598688eC724DD00a8944E7c7b259BbB992c61' + abi: DODOFeeRouteProxy + startBlock: 21128628 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/smartRoute.ts + entities: + - Pair + - Token + abis: + - name: DODOFeeRouteProxy + file: ../../abis/DODOFeeRouteProxy.json + - name: DODOV2Proxy02 + file: ../../abis/DODOV2Proxy02.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + eventHandlers: + - event: OrderHistory(address,address,address,uint256,uint256) + handler: handleOrderHistory + - kind: ethereum/contract + name: DODOV2Proxy02 + network: mantle + source: + address: '0xe7979E2F3e77196Bb2AB206eaa67Ea278A3E33A2' + abi: DODOV2Proxy02 + startBlock: 21086892 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/smartRoute.ts + entities: + - Pair + - Token + abis: + - name: DODOV2Proxy02 + file: ../../abis/DODOV2Proxy02.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + eventHandlers: + - event: OrderHistory(address,address,address,uint256,uint256) + handler: handleOrderHistory + - kind: ethereum/contract + name: DVMFactory + network: mantle + source: + address: '0x29C7718e8B606cEF1c44Fe6e43e07aF9D0875DE1' + abi: DVMFactory + startBlock: 21054048 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/poolFactory.ts + entities: + - Pair + - Token + abis: + - name: DVMFactory + file: ../../abis/DVMFactory.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + - name: DVM + file: ../../abis/DVM.json + - name: FeeRateModel + file: ../../abis/FeeRateModel.json + eventHandlers: + - event: NewDVM(address,address,address,address) + handler: handleNewDVM + - event: RemoveDVM(address) + handler: handleRemoveDVM + - kind: ethereum/contract + name: DPPFactory + network: mantle + source: + address: "0x46AF6b152F2cb02a3cFcc74014C2617BC4F6cD5C" + abi: DPPFactory + startBlock: 21054104 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/poolFactory.ts + entities: + - Pair + - Token + abis: + - name: DPPFactory + file: ../../abis/DPPFactory.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + - name: DPP + file: ../../abis/DPP.json + - name: FeeRateModel + file: ../../abis/FeeRateModel.json + eventHandlers: + - event: NewDPP(address,address,address,address) + handler: handleNewDPP + - kind: ethereum/contract + name: DSPFactory + network: mantle + source: + address: '0x7dB214f2D46d94846936a0f8Bd9044c5C5Bd2b93' + abi: DSPFactory + startBlock: 21054198 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/poolFactory.ts + entities: + - Pair + - Token + abis: + - name: DSPFactory + file: ../../abis/DSPFactory.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + - name: DSP + file: ../../abis/DSP.json + - name: FeeRateModel + file: ../../abis/FeeRateModel.json + eventHandlers: + - event: NewDSP(address,address,address,address) + handler: handleNewDSP + - event: RemoveDSP(address) + handler: handleRemoveDSP + # - kind: ethereum/contract + # name: CrowdPoolingFactory + # network: mantle + # source: + # address: '0x6E5f239f729c83E976a7A280F81Dd1685dd89218' + # abi: CrowdPoolingFactory + # startBlock: 226004 + # mapping: + # kind: ethereum/events + # apiVersion: 0.0.6 + # language: wasm/assemblyscript + # file: ../../src/mappings/dodoex/poolFactory.ts + # entities: + # - Pair + # - Token + # abis: + # - name: DVM + # file: ../../abis/DVM.json + # - name: DPP + # file: ../../abis/DPP.json + # - name: DODO + # file: ../../abis/DODO.json + # - name: CrowdPoolingFactory + # file: ../../abis/CrowdPoolingFactory.json + # - name: ERC20 + # file: ../../abis/ERC20.json + # - name: ERC20SymbolBytes + # file: ../../abis/ERC20SymbolBytes.json + # - name: ERC20NameBytes + # file: ../../abis/ERC20NameBytes.json + # - name: CP + # file: ../../abis/CP.json + # eventHandlers: + # - event: NewCP(address,address,address,address) + # handler: handleNewCP + - kind: ethereum/contract + name: CrowdPoolingFactoryV2 + network: mantle + source: + address: '0xE2004eE21f88a7D8e1A5EDc3c9617a0460CC7b99' + abi: CrowdPoolingFactory + startBlock: 21054150 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/poolFactory.ts + entities: + - Pair + - Token + abis: + - name: DVM + file: ../../abis/DVM.json + - name: DPP + file: ../../abis/DPP.json + - name: CrowdPoolingFactory + file: ../../abis/CrowdPoolingFactory.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + - name: CP + file: ../../abis/CP.json + - name: CPV2 + file: ../../abis/CPV2.json + eventHandlers: + - event: NewCP(address,address,address,address) + handler: handleNewCP + # - kind: ethereum/contract + # name: UpCrowdPoolingFactory + # network: mantle + # source: + # address: '0xE92787F457F541a9D5Ae17C1dbdBffA8D3BA3C25' + # abi: UpCrowdPoolingFactory + # startBlock: 226005 + # mapping: + # kind: ethereum/events + # apiVersion: 0.0.6 + # language: wasm/assemblyscript + # file: ../../src/mappings/dodoex/poolFactory.ts + # entities: + # - Pair + # - Token + # abis: + # - name: DVM + # file: ../../abis/DVM.json + # - name: DPP + # file: ../../abis/DPP.json + # - name: CrowdPoolingFactory + # file: ../../abis/CrowdPoolingFactory.json + # - name: UpCrowdPoolingFactory + # file: ../../abis/UpCrowdPoolingFactory.json + # - name: ERC20 + # file: ../../abis/ERC20.json + # - name: ERC20SymbolBytes + # file: ../../abis/ERC20SymbolBytes.json + # - name: ERC20NameBytes + # file: ../../abis/ERC20NameBytes.json + # - name: CP + # file: ../../abis/CP.json + # eventHandlers: + # - event: NewCP(address,address,address,address) + # handler: handleNewCP + # - kind: ethereum/contract + # name: DODOZoo + # network: mantle + # source: + # address: '0xBcC3401E16C25EaF4d3FeD632ce3288503883B1f' + # abi: DODOZoo + # startBlock: 226006 + # mapping: + # kind: ethereum/events + # apiVersion: 0.0.6 + # language: wasm/assemblyscript + # file: ../../src/mappings/dodoex/classicPoolFromV1.ts + # entities: + # - Pair + # - Token + # abis: + # - name: DODOZoo + # file: ../../abis/DODOZoo.json + # - name: DVM + # file: ../../abis/DVM.json + # - name: DPP + # file: ../../abis/DPP.json + # - name: DODO + # file: ../../abis/DODO.json + # - name: ERC20 + # file: ../../abis/ERC20.json + # - name: ERC20SymbolBytes + # file: ../../abis/ERC20SymbolBytes.json + # - name: ERC20NameBytes + # file: ../../abis/ERC20NameBytes.json + # eventHandlers: + # - event: DODOBirth(address,address,address) + # handler: handleDODOBirth + # - kind: ethereum/contract + # name: DODOMine + # network: mantle + # source: + # address: '0xe3c10989ddc5df5b1b9c0e6229c2e4e0862fde3e' + # abi: DODOMine + # startBlock: 226006 + # mapping: + # kind: ethereum/events + # apiVersion: 0.0.6 + # language: wasm/assemblyscript + # file: ../../src/mappings/dodoex/mine.ts + # entities: + # - User + # - StakeHistory + # abis: + # - name: DODOMine + # file: ../../abis/DODOMine.json + # - name: ERC20 + # file: ../../abis/ERC20.json + # - name: ERC20SymbolBytes + # file: ../../abis/ERC20SymbolBytes.json + # - name: ERC20NameBytes + # file: ../../abis/ERC20NameBytes.json + # eventHandlers: + # - event: Deposit(indexed address,indexed uint256,uint256) + # handler: handleDeposit + # - event: Withdraw(indexed address,indexed uint256,uint256) + # handler: handleWithdraw + # - event: Claim(indexed address,uint256) + # handler: handleClaim +templates: + - kind: ethereum/contract + name: DVM + network: mantle + source: + abi: DVM + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/pool.ts + entities: + - Pair + - Token + - DODOSwap + abis: + - name: DVM + file: ../../abis/DVM.json + - name: DPP + file: ../../abis/DPP.json + - name: DODO + file: ../../abis/DODO.json + - name: DVMFactory + file: ../../abis/DVMFactory.json + - name: DPPFactory + file: ../../abis/DPPFactory.json + - name: FeeRateModel + file: ../../abis/FeeRateModel.json + - name: DODOZoo + file: ../../abis/DODOZoo.json + eventHandlers: + - event: DODOSwap(address,address,uint256,uint256,address,address) + handler: handleDODOSwap + - event: BuyShares(address,uint256,uint256) + handler: handleBuyShares + - event: SellShares(address,address,uint256,uint256) + handler: handleSellShares + - event: Transfer(indexed address,indexed address,uint256) + handler: handleTransfer + - kind: ethereum/contract + name: DPP + network: mantle + source: + abi: DPP + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/pool.ts + entities: + - Pair + - Token + abis: + - name: DVM + file: ../../abis/DVM.json + - name: DPP + file: ../../abis/DPP.json + - name: DODO + file: ../../abis/DODO.json + - name: DVMFactory + file: ../../abis/DVMFactory.json + - name: DPPFactory + file: ../../abis/DPPFactory.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + - name: FeeRateModel + file: ../../abis/FeeRateModel.json + - name: DODOZoo + file: ../../abis/DODOZoo.json + eventHandlers: + - event: DODOSwap(address,address,uint256,uint256,address,address) + handler: handleDODOSwap + - event: LpFeeRateChange(uint256) + handler: handleLpFeeRateChange + - kind: ethereum/contract + name: DPPOracleAdmin + network: mantle + source: + abi: DPPOracleAdmin + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/pool.ts + entities: + - Pair + - Token + abis: + - name: DVM + file: ../../abis/DVM.json + - name: DPP + file: ../../abis/DPP.json + - name: DPPOracleAdmin + file: ../../abis/DPPOracleAdmin.json + - name: DODO + file: ../../abis/DODO.json + - name: DVMFactory + file: ../../abis/DVMFactory.json + - name: DPPFactory + file: ../../abis/DPPFactory.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + - name: FeeRateModel + file: ../../abis/FeeRateModel.json + - name: DODOZoo + file: ../../abis/DODOZoo.json + eventHandlers: + - event: OwnershipTransferred(indexed address,indexed address) + handler: handleDPPOwnershipTransferred + - kind: ethereum/contract + name: DSP + network: mantle + source: + abi: DSP + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/pool.ts + entities: + - Pair + - Token + - DODOSwap + abis: + - name: DVMFactory + file: ../../abis/DVMFactory.json + - name: DPPFactory + file: ../../abis/DPPFactory.json + - name: DSPFactory + file: ../../abis/DSPFactory.json + - name: DVM + file: ../../abis/DVM.json + - name: DPP + file: ../../abis/DPP.json + - name: DSP + file: ../../abis/DSP.json + - name: FeeRateModel + file: ../../abis/FeeRateModel.json + - name: DODOZoo + file: ../../abis/DODOZoo.json + eventHandlers: + - event: DODOSwap(address,address,uint256,uint256,address,address) + handler: handleDODOSwap + - event: BuyShares(address,uint256,uint256) + handler: handleBuyShares + - event: SellShares(address,address,uint256,uint256) + handler: handleSellShares + - event: Transfer(indexed address,indexed address,uint256) + handler: handleTransfer + - kind: ethereum/contract + name: CP + network: mantle + source: + abi: CP + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/crowdPooling.ts + entities: + - CrowdPooling + - Token + abis: + - name: DVM + file: ../../abis/DVM.json + - name: DPP + file: ../../abis/DPP.json + - name: DODO + file: ../../abis/DODO.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + - name: CP + file: ../../abis/CP.json + - name: DVMFactory + file: ../../abis/DVMFactory.json + - name: DODOZoo + file: ../../abis/DODOZoo.json + eventHandlers: + - event: Bid(address,uint256,uint256) + handler: handleBid + - event: Cancel(address,uint256) + handler: handleCancel + - event: Settle() + handler: handleSettle + - event: Claim(address,uint256,uint256) + handler: handleClaim + - kind: ethereum/contract + name: DODO + network: mantle + source: + abi: DODO + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/classicPoolFromV1.ts + entities: + - Pair + - Token + abis: + - name: DVM + file: ../../abis/DVM.json + - name: DPP + file: ../../abis/DPP.json + - name: DODO + file: ../../abis/DODO.json + - name: DVMFactory + file: ../../abis/DVMFactory.json + - name: DPPFactory + file: ../../abis/DPPFactory.json + - name: DODOZoo + file: ../../abis/DODOZoo.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + eventHandlers: + - event: Deposit(indexed address,indexed address,bool,uint256,uint256) + handler: handleDeposit + - event: Withdraw(indexed address,indexed address,bool,uint256,uint256) + handler: handleWithdraw + - event: SellBaseToken(indexed address,uint256,uint256) + handler: handleSellBaseToken + - event: BuyBaseToken(indexed address,uint256,uint256) + handler: handleBuyBaseToken + - event: UpdateLiquidityProviderFeeRate(uint256,uint256) + handler: handleUpdateLiquidityProviderFeeRate + - event: ClaimAssets(indexed address,uint256,uint256) + handler: handleClaimAssets + - event: ChargeMaintainerFee(indexed address,bool,uint256) + handler: handleChargeMaintainerFee + - event: UpdateMaintainerFeeRate(uint256,uint256) + handler: handleUpdateMaintainerFeeRate + - kind: ethereum/contract + name: DODOLpToken + network: mantle + source: + abi: DODOLpToken + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/lpToken.ts + entities: + - Pair + - Token + abis: + - name: DODOLpToken + file: ../../abis/DODOLpToken.json + eventHandlers: + - event: Transfer(indexed address,indexed address,uint256) + handler: handleTransfer + - kind: ethereum/contract + name: CPV2 + network: mantle + source: + abi: CPV2 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/crowdPooling.ts + entities: + - CrowdPooling + - Token + abis: + - name: DVM + file: ../../abis/DVM.json + - name: DPP + file: ../../abis/DPP.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + - name: CP + file: ../../abis/CP.json + - name: CPV2 + file: ../../abis/CPV2.json + - name: DVMFactory + file: ../../abis/DVMFactory.json + - name: DODOZoo + file: ../../abis/DODOZoo.json + eventHandlers: + - event: Bid(address,uint256,uint256) + handler: handleBid + - event: Cancel(address,uint256) + handler: handleCancel + - event: Settle() + handler: handleSettle diff --git a/subgraphs/dodoex/dodoex_optimism.yaml b/subgraphs/dodoex/dodoex_optimism.yaml index 9aa0fdd..bdc2f75 100644 --- a/subgraphs/dodoex/dodoex_optimism.yaml +++ b/subgraphs/dodoex/dodoex_optimism.yaml @@ -42,7 +42,7 @@ dataSources: startBlock: 49241117 mapping: kind: ethereum/events - apiVersion: 0.0.4 + apiVersion: 0.0.6 language: wasm/assemblyscript file: ../../src/mappings/dodoex/smartRoute.ts entities: diff --git a/subgraphs/dodoex/dodoex_scroll_alpha.yaml b/subgraphs/dodoex/dodoex_scroll-alpha.yaml similarity index 100% rename from subgraphs/dodoex/dodoex_scroll_alpha.yaml rename to subgraphs/dodoex/dodoex_scroll-alpha.yaml diff --git a/subgraphs/dodoex/dodoex_scroll-sepolia.yaml b/subgraphs/dodoex/dodoex_scroll-sepolia.yaml new file mode 100644 index 0000000..340f652 --- /dev/null +++ b/subgraphs/dodoex/dodoex_scroll-sepolia.yaml @@ -0,0 +1,662 @@ +specVersion: 0.0.4 +description: Dodoex.io +repository: https://github.com/DODOEX/dodoex_v2_subgraph +schema: + file: ./dodoex.graphql +dataSources: + - kind: ethereum/contract + name: DODOV2Proxy02 + network: scroll-sepolia + source: + address: '0xA6d0066328Edbcf3220cf8F61e8527e589DD9719' + abi: DODOV2Proxy02 + startBlock: 19332 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/smartRoute.ts + entities: + - Pair + - Token + abis: + - name: DODOV2Proxy02 + file: ../../abis/DODOV2Proxy02.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + eventHandlers: + - event: OrderHistory(address,address,address,uint256,uint256) + handler: handleOrderHistory + - kind: ethereum/contract + name: DODOFeeRouteProxy + network: scroll-sepolia + source: + address: '0x03e89fC55A5ad0531576E5a502c4CA52c8bf391B' + abi: DODOFeeRouteProxy + startBlock: 28009 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/smartRoute.ts + entities: + - Pair + - Token + abis: + - name: DODOFeeRouteProxy + file: ../../abis/DODOFeeRouteProxy.json + - name: DODOV2Proxy02 + file: ../../abis/DODOV2Proxy02.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + eventHandlers: + - event: OrderHistory(address,address,address,uint256,uint256) + handler: handleOrderHistory + - kind: ethereum/contract + name: DODOFeeRouteProxy-widgit + network: scroll-sepolia + source: + address: '0x70B9C57E1fF24761C1C3ced57Ddae9A3F3570698' + abi: DODOFeeRouteProxy + startBlock: 28055 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/smartRoute.ts + entities: + - Pair + - Token + abis: + - name: DODOFeeRouteProxy + file: ../../abis/DODOFeeRouteProxy.json + - name: DODOV2Proxy02 + file: ../../abis/DODOV2Proxy02.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + eventHandlers: + - event: OrderHistory(address,address,address,uint256,uint256) + handler: handleOrderHistory + - kind: ethereum/contract + name: DVMFactory + network: scroll-sepolia + source: + address: '0xa71415675F68f29259ddD63215E5518d2735bf0a' + abi: DVMFactory + startBlock: 12085 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/poolFactory.ts + entities: + - Pair + - Token + abis: + - name: DVMFactory + file: ../../abis/DVMFactory.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + - name: DVM + file: ../../abis/DVM.json + - name: FeeRateModel + file: ../../abis/FeeRateModel.json + eventHandlers: + - event: NewDVM(address,address,address,address) + handler: handleNewDVM + - event: RemoveDVM(address) + handler: handleRemoveDVM + - kind: ethereum/contract + name: DPPFactory + network: scroll-sepolia + source: + address: "0xFD2b7994f91c08aAa5e013E899334A2DBb500DF1" + abi: DPPFactory + startBlock: 12087 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/poolFactory.ts + entities: + - Pair + - Token + abis: + - name: DPPFactory + file: ../../abis/DPPFactory.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + - name: DPP + file: ../../abis/DPP.json + - name: FeeRateModel + file: ../../abis/FeeRateModel.json + eventHandlers: + - event: NewDPP(address,address,address,address) + handler: handleNewDPP + - kind: ethereum/contract + name: DSPFactory + network: scroll-sepolia + source: + address: '0x46AF6b152F2cb02a3cFcc74014C2617BC4F6cD5C' + abi: DSPFactory + startBlock: 12093 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/poolFactory.ts + entities: + - Pair + - Token + abis: + - name: DSPFactory + file: ../../abis/DSPFactory.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + - name: DSP + file: ../../abis/DSP.json + - name: FeeRateModel + file: ../../abis/FeeRateModel.json + eventHandlers: + - event: NewDSP(address,address,address,address) + handler: handleNewDSP + - event: RemoveDSP(address) + handler: handleRemoveDSP + - kind: ethereum/contract + name: CrowdPoolingFactory + network: scroll-sepolia + source: + address: '0x29C7718e8B606cEF1c44Fe6e43e07aF9D0875DE1' + abi: CrowdPoolingFactory + startBlock: 12091 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/poolFactory.ts + entities: + - Pair + - Token + abis: + - name: DVM + file: ../../abis/DVM.json + - name: DPP + file: ../../abis/DPP.json + - name: DODO + file: ../../abis/DODO.json + - name: CrowdPoolingFactory + file: ../../abis/CrowdPoolingFactory.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + - name: CP + file: ../../abis/CP.json + eventHandlers: + - event: NewCP(address,address,address,address) + handler: handleNewCP + # - kind: ethereum/contract + # name: CrowdPoolingFactoryV2 + # network: scroll-sepolia + # source: + # address: '0x9a8c0e8b27fff5d00402733ca67432b6d64faff4' + # abi: CrowdPoolingFactory + # startBlock: 4407201 + # mapping: + # kind: ethereum/events + # apiVersion: 0.0.6 + # language: wasm/assemblyscript + # file: ../../src/mappings/dodoex/poolFactory.ts + # entities: + # - Pair + # - Token + # abis: + # - name: DVM + # file: ../../abis/DVM.json + # - name: DPP + # file: ../../abis/DPP.json + # - name: CrowdPoolingFactory + # file: ../../abis/CrowdPoolingFactory.json + # - name: ERC20 + # file: ../../abis/ERC20.json + # - name: ERC20SymbolBytes + # file: ../../abis/ERC20SymbolBytes.json + # - name: ERC20NameBytes + # file: ../../abis/ERC20NameBytes.json + # - name: CP + # file: ../../abis/CP.json + # - name: CPV2 + # file: ../../abis/CPV2.json + # eventHandlers: + # - event: NewCP(address,address,address,address) + # handler: handleNewCP + # - kind: ethereum/contract + # name: UpCrowdPoolingFactory + # network: scroll-sepolia + # source: + # address: '0xE92787F457F541a9D5Ae17C1dbdBffA8D3BA3C25' + # abi: UpCrowdPoolingFactory + # startBlock: 226005 + # mapping: + # kind: ethereum/events + # apiVersion: 0.0.6 + # language: wasm/assemblyscript + # file: ../../src/mappings/dodoex/poolFactory.ts + # entities: + # - Pair + # - Token + # abis: + # - name: DVM + # file: ../../abis/DVM.json + # - name: DPP + # file: ../../abis/DPP.json + # - name: CrowdPoolingFactory + # file: ../../abis/CrowdPoolingFactory.json + # - name: UpCrowdPoolingFactory + # file: ../../abis/UpCrowdPoolingFactory.json + # - name: ERC20 + # file: ../../abis/ERC20.json + # - name: ERC20SymbolBytes + # file: ../../abis/ERC20SymbolBytes.json + # - name: ERC20NameBytes + # file: ../../abis/ERC20NameBytes.json + # - name: CP + # file: ../../abis/CP.json + # eventHandlers: + # - event: NewCP(address,address,address,address) + # handler: handleNewCP + # - kind: ethereum/contract + # name: DODOZoo + # network: scroll-sepolia + # source: + # address: '0xBcC3401E16C25EaF4d3FeD632ce3288503883B1f' + # abi: DODOZoo + # startBlock: 226006 + # mapping: + # kind: ethereum/events + # apiVersion: 0.0.6 + # language: wasm/assemblyscript + # file: ../../src/mappings/dodoex/classicPoolFromV1.ts + # entities: + # - Pair + # - Token + # abis: + # - name: DODOZoo + # file: ../../abis/DODOZoo.json + # - name: DVM + # file: ../../abis/DVM.json + # - name: DPP + # file: ../../abis/DPP.json + # - name: DODO + # file: ../../abis/DODO.json + # - name: ERC20 + # file: ../../abis/ERC20.json + # - name: ERC20SymbolBytes + # file: ../../abis/ERC20SymbolBytes.json + # - name: ERC20NameBytes + # file: ../../abis/ERC20NameBytes.json + # eventHandlers: + # - event: DODOBirth(address,address,address) + # handler: handleDODOBirth + # - kind: ethereum/contract + # name: DODOMine + # network: scroll-sepolia + # source: + # address: '0xe3c10989ddc5df5b1b9c0e6229c2e4e0862fde3e' + # abi: DODOMine + # startBlock: 226006 + # mapping: + # kind: ethereum/events + # apiVersion: 0.0.6 + # language: wasm/assemblyscript + # file: ../../src/mappings/dodoex/mine.ts + # entities: + # - User + # - StakeHistory + # abis: + # - name: DODOMine + # file: ../../abis/DODOMine.json + # - name: ERC20 + # file: ../../abis/ERC20.json + # - name: ERC20SymbolBytes + # file: ../../abis/ERC20SymbolBytes.json + # - name: ERC20NameBytes + # file: ../../abis/ERC20NameBytes.json + # eventHandlers: + # - event: Deposit(indexed address,indexed uint256,uint256) + # handler: handleDeposit + # - event: Withdraw(indexed address,indexed uint256,uint256) + # handler: handleWithdraw + # - event: Claim(indexed address,uint256) + # handler: handleClaim +templates: + - kind: ethereum/contract + name: DVM + network: scroll-sepolia + source: + abi: DVM + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/pool.ts + entities: + - Pair + - Token + - DODOSwap + abis: + - name: DVM + file: ../../abis/DVM.json + - name: DPP + file: ../../abis/DPP.json + - name: DODO + file: ../../abis/DODO.json + - name: DVMFactory + file: ../../abis/DVMFactory.json + - name: DPPFactory + file: ../../abis/DPPFactory.json + - name: FeeRateModel + file: ../../abis/FeeRateModel.json + - name: DODOZoo + file: ../../abis/DODOZoo.json + eventHandlers: + - event: DODOSwap(address,address,uint256,uint256,address,address) + handler: handleDODOSwap + - event: BuyShares(address,uint256,uint256) + handler: handleBuyShares + - event: SellShares(address,address,uint256,uint256) + handler: handleSellShares + - event: Transfer(indexed address,indexed address,uint256) + handler: handleTransfer + - kind: ethereum/contract + name: DPP + network: scroll-sepolia + source: + abi: DPP + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/pool.ts + entities: + - Pair + - Token + abis: + - name: DVM + file: ../../abis/DVM.json + - name: DPP + file: ../../abis/DPP.json + - name: DODO + file: ../../abis/DODO.json + - name: DVMFactory + file: ../../abis/DVMFactory.json + - name: DPPFactory + file: ../../abis/DPPFactory.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + - name: FeeRateModel + file: ../../abis/FeeRateModel.json + - name: DODOZoo + file: ../../abis/DODOZoo.json + eventHandlers: + - event: DODOSwap(address,address,uint256,uint256,address,address) + handler: handleDODOSwap + - event: LpFeeRateChange(uint256) + handler: handleLpFeeRateChange + - kind: ethereum/contract + name: DPPOracleAdmin + network: scroll-sepolia + source: + abi: DPPOracleAdmin + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/pool.ts + entities: + - Pair + - Token + abis: + - name: DVM + file: ../../abis/DVM.json + - name: DPP + file: ../../abis/DPP.json + - name: DPPOracleAdmin + file: ../../abis/DPPOracleAdmin.json + - name: DODO + file: ../../abis/DODO.json + - name: DVMFactory + file: ../../abis/DVMFactory.json + - name: DPPFactory + file: ../../abis/DPPFactory.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + - name: FeeRateModel + file: ../../abis/FeeRateModel.json + - name: DODOZoo + file: ../../abis/DODOZoo.json + eventHandlers: + - event: OwnershipTransferred(indexed address,indexed address) + handler: handleDPPOwnershipTransferred + - kind: ethereum/contract + name: DSP + network: scroll-sepolia + source: + abi: DSP + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/pool.ts + entities: + - Pair + - Token + - DODOSwap + abis: + - name: DVMFactory + file: ../../abis/DVMFactory.json + - name: DPPFactory + file: ../../abis/DPPFactory.json + - name: DSPFactory + file: ../../abis/DSPFactory.json + - name: DVM + file: ../../abis/DVM.json + - name: DPP + file: ../../abis/DPP.json + - name: DSP + file: ../../abis/DSP.json + - name: FeeRateModel + file: ../../abis/FeeRateModel.json + - name: DODOZoo + file: ../../abis/DODOZoo.json + eventHandlers: + - event: DODOSwap(address,address,uint256,uint256,address,address) + handler: handleDODOSwap + - event: BuyShares(address,uint256,uint256) + handler: handleBuyShares + - event: SellShares(address,address,uint256,uint256) + handler: handleSellShares + - event: Transfer(indexed address,indexed address,uint256) + handler: handleTransfer + - kind: ethereum/contract + name: CP + network: scroll-sepolia + source: + abi: CP + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/crowdPooling.ts + entities: + - CrowdPooling + - Token + abis: + - name: DVM + file: ../../abis/DVM.json + - name: DPP + file: ../../abis/DPP.json + - name: DODO + file: ../../abis/DODO.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + - name: CP + file: ../../abis/CP.json + - name: DVMFactory + file: ../../abis/DVMFactory.json + - name: DODOZoo + file: ../../abis/DODOZoo.json + eventHandlers: + - event: Bid(address,uint256,uint256) + handler: handleBid + - event: Cancel(address,uint256) + handler: handleCancel + - event: Settle() + handler: handleSettle + - event: Claim(address,uint256,uint256) + handler: handleClaim + - kind: ethereum/contract + name: DODO + network: scroll-sepolia + source: + abi: DODO + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/classicPoolFromV1.ts + entities: + - Pair + - Token + abis: + - name: DVM + file: ../../abis/DVM.json + - name: DPP + file: ../../abis/DPP.json + - name: DODO + file: ../../abis/DODO.json + - name: DVMFactory + file: ../../abis/DVMFactory.json + - name: DPPFactory + file: ../../abis/DPPFactory.json + - name: DODOZoo + file: ../../abis/DODOZoo.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + eventHandlers: + - event: Deposit(indexed address,indexed address,bool,uint256,uint256) + handler: handleDeposit + - event: Withdraw(indexed address,indexed address,bool,uint256,uint256) + handler: handleWithdraw + - event: SellBaseToken(indexed address,uint256,uint256) + handler: handleSellBaseToken + - event: BuyBaseToken(indexed address,uint256,uint256) + handler: handleBuyBaseToken + - event: UpdateLiquidityProviderFeeRate(uint256,uint256) + handler: handleUpdateLiquidityProviderFeeRate + - event: ClaimAssets(indexed address,uint256,uint256) + handler: handleClaimAssets + - event: ChargeMaintainerFee(indexed address,bool,uint256) + handler: handleChargeMaintainerFee + - event: UpdateMaintainerFeeRate(uint256,uint256) + handler: handleUpdateMaintainerFeeRate + - kind: ethereum/contract + name: DODOLpToken + network: scroll-sepolia + source: + abi: DODOLpToken + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/lpToken.ts + entities: + - Pair + - Token + abis: + - name: DODOLpToken + file: ../../abis/DODOLpToken.json + eventHandlers: + - event: Transfer(indexed address,indexed address,uint256) + handler: handleTransfer + - kind: ethereum/contract + name: CPV2 + network: scroll-sepolia + source: + abi: CPV2 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/crowdPooling.ts + entities: + - CrowdPooling + - Token + abis: + - name: DVM + file: ../../abis/DVM.json + - name: DPP + file: ../../abis/DPP.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + - name: CP + file: ../../abis/CP.json + - name: CPV2 + file: ../../abis/CPV2.json + - name: DVMFactory + file: ../../abis/DVMFactory.json + - name: DODOZoo + file: ../../abis/DODOZoo.json + eventHandlers: + - event: Bid(address,uint256,uint256) + handler: handleBid + - event: Cancel(address,uint256) + handler: handleCancel + - event: Settle() + handler: handleSettle diff --git a/subgraphs/dodoex/dodoex_scroll.yaml b/subgraphs/dodoex/dodoex_scroll.yaml new file mode 100644 index 0000000..8490dcc --- /dev/null +++ b/subgraphs/dodoex/dodoex_scroll.yaml @@ -0,0 +1,662 @@ +specVersion: 0.0.4 +description: Dodoex.io +repository: https://github.com/DODOEX/dodoex_v2_subgraph +schema: + file: ./dodoex.graphql +dataSources: + - kind: ethereum/contract + name: DODOV2Proxy02 + network: scroll + source: + address: '0xe49781e6186214d88aACFd9eBc8cE40E3CDc066D' + abi: DODOV2Proxy02 + startBlock: 83165 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/smartRoute.ts + entities: + - Pair + - Token + abis: + - name: DODOV2Proxy02 + file: ../../abis/DODOV2Proxy02.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + eventHandlers: + - event: OrderHistory(address,address,address,uint256,uint256) + handler: handleOrderHistory + - kind: ethereum/contract + name: DODOFeeRouteProxy + network: scroll + source: + address: '0x4e998615aD430C1cA46A69d813edE6EB3EC55eDb' + abi: DODOFeeRouteProxy + startBlock: 83777 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/smartRoute.ts + entities: + - Pair + - Token + abis: + - name: DODOFeeRouteProxy + file: ../../abis/DODOFeeRouteProxy.json + - name: DODOV2Proxy02 + file: ../../abis/DODOV2Proxy02.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + eventHandlers: + - event: OrderHistory(address,address,address,uint256,uint256) + handler: handleOrderHistory + - kind: ethereum/contract + name: DODOFeeRouteProxy-widgit + network: scroll + source: + address: '0xf0512872fEc0173d1d99c2dd8CDCb770054b675b' + abi: DODOFeeRouteProxy + startBlock: 83745 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/smartRoute.ts + entities: + - Pair + - Token + abis: + - name: DODOFeeRouteProxy + file: ../../abis/DODOFeeRouteProxy.json + - name: DODOV2Proxy02 + file: ../../abis/DODOV2Proxy02.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + eventHandlers: + - event: OrderHistory(address,address,address,uint256,uint256) + handler: handleOrderHistory + - kind: ethereum/contract + name: DVMFactory + network: scroll + source: + address: '0x5a0C840a7089aa222c4458b3BE0947fe5a5006DE' + abi: DVMFactory + startBlock: 83070 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/poolFactory.ts + entities: + - Pair + - Token + abis: + - name: DVMFactory + file: ../../abis/DVMFactory.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + - name: DVM + file: ../../abis/DVM.json + - name: FeeRateModel + file: ../../abis/FeeRateModel.json + eventHandlers: + - event: NewDVM(address,address,address,address) + handler: handleNewDVM + - event: RemoveDVM(address) + handler: handleRemoveDVM + - kind: ethereum/contract + name: DPPFactory + network: scroll + source: + address: "0x31AC053c31a77055b2ae2d3899091C0A9c19cE3a" + abi: DPPFactory + startBlock: 83091 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/poolFactory.ts + entities: + - Pair + - Token + abis: + - name: DPPFactory + file: ../../abis/DPPFactory.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + - name: DPP + file: ../../abis/DPP.json + - name: FeeRateModel + file: ../../abis/FeeRateModel.json + eventHandlers: + - event: NewDPP(address,address,address,address) + handler: handleNewDPP + - kind: ethereum/contract + name: DSPFactory + network: scroll + source: + address: '0x7E9c460d0A10bd0605B15F0d0388e307d34a62E6' + abi: DSPFactory + startBlock: 83122 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/poolFactory.ts + entities: + - Pair + - Token + abis: + - name: DSPFactory + file: ../../abis/DSPFactory.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + - name: DSP + file: ../../abis/DSP.json + - name: FeeRateModel + file: ../../abis/FeeRateModel.json + eventHandlers: + - event: NewDSP(address,address,address,address) + handler: handleNewDSP + - event: RemoveDSP(address) + handler: handleRemoveDSP + - kind: ethereum/contract + name: CrowdPoolingFactory + network: scroll + source: + address: '0x4632e6EBd4a01eBF54739A9D71a62CEdb29E9183' + abi: CrowdPoolingFactory + startBlock: 83105 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/poolFactory.ts + entities: + - Pair + - Token + abis: + - name: DVM + file: ../../abis/DVM.json + - name: DPP + file: ../../abis/DPP.json + - name: DODO + file: ../../abis/DODO.json + - name: CrowdPoolingFactory + file: ../../abis/CrowdPoolingFactory.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + - name: CP + file: ../../abis/CP.json + eventHandlers: + - event: NewCP(address,address,address,address) + handler: handleNewCP + # - kind: ethereum/contract + # name: CrowdPoolingFactoryV2 + # network: scroll + # source: + # address: '0x9a8c0e8b27fff5d00402733ca67432b6d64faff4' + # abi: CrowdPoolingFactory + # startBlock: 4407201 + # mapping: + # kind: ethereum/events + # apiVersion: 0.0.6 + # language: wasm/assemblyscript + # file: ../../src/mappings/dodoex/poolFactory.ts + # entities: + # - Pair + # - Token + # abis: + # - name: DVM + # file: ../../abis/DVM.json + # - name: DPP + # file: ../../abis/DPP.json + # - name: CrowdPoolingFactory + # file: ../../abis/CrowdPoolingFactory.json + # - name: ERC20 + # file: ../../abis/ERC20.json + # - name: ERC20SymbolBytes + # file: ../../abis/ERC20SymbolBytes.json + # - name: ERC20NameBytes + # file: ../../abis/ERC20NameBytes.json + # - name: CP + # file: ../../abis/CP.json + # - name: CPV2 + # file: ../../abis/CPV2.json + # eventHandlers: + # - event: NewCP(address,address,address,address) + # handler: handleNewCP + # - kind: ethereum/contract + # name: UpCrowdPoolingFactory + # network: scroll + # source: + # address: '0xE92787F457F541a9D5Ae17C1dbdBffA8D3BA3C25' + # abi: UpCrowdPoolingFactory + # startBlock: 226005 + # mapping: + # kind: ethereum/events + # apiVersion: 0.0.6 + # language: wasm/assemblyscript + # file: ../../src/mappings/dodoex/poolFactory.ts + # entities: + # - Pair + # - Token + # abis: + # - name: DVM + # file: ../../abis/DVM.json + # - name: DPP + # file: ../../abis/DPP.json + # - name: CrowdPoolingFactory + # file: ../../abis/CrowdPoolingFactory.json + # - name: UpCrowdPoolingFactory + # file: ../../abis/UpCrowdPoolingFactory.json + # - name: ERC20 + # file: ../../abis/ERC20.json + # - name: ERC20SymbolBytes + # file: ../../abis/ERC20SymbolBytes.json + # - name: ERC20NameBytes + # file: ../../abis/ERC20NameBytes.json + # - name: CP + # file: ../../abis/CP.json + # eventHandlers: + # - event: NewCP(address,address,address,address) + # handler: handleNewCP + # - kind: ethereum/contract + # name: DODOZoo + # network: scroll + # source: + # address: '0xBcC3401E16C25EaF4d3FeD632ce3288503883B1f' + # abi: DODOZoo + # startBlock: 226006 + # mapping: + # kind: ethereum/events + # apiVersion: 0.0.6 + # language: wasm/assemblyscript + # file: ../../src/mappings/dodoex/classicPoolFromV1.ts + # entities: + # - Pair + # - Token + # abis: + # - name: DODOZoo + # file: ../../abis/DODOZoo.json + # - name: DVM + # file: ../../abis/DVM.json + # - name: DPP + # file: ../../abis/DPP.json + # - name: DODO + # file: ../../abis/DODO.json + # - name: ERC20 + # file: ../../abis/ERC20.json + # - name: ERC20SymbolBytes + # file: ../../abis/ERC20SymbolBytes.json + # - name: ERC20NameBytes + # file: ../../abis/ERC20NameBytes.json + # eventHandlers: + # - event: DODOBirth(address,address,address) + # handler: handleDODOBirth + # - kind: ethereum/contract + # name: DODOMine + # network: scroll + # source: + # address: '0xe3c10989ddc5df5b1b9c0e6229c2e4e0862fde3e' + # abi: DODOMine + # startBlock: 226006 + # mapping: + # kind: ethereum/events + # apiVersion: 0.0.6 + # language: wasm/assemblyscript + # file: ../../src/mappings/dodoex/mine.ts + # entities: + # - User + # - StakeHistory + # abis: + # - name: DODOMine + # file: ../../abis/DODOMine.json + # - name: ERC20 + # file: ../../abis/ERC20.json + # - name: ERC20SymbolBytes + # file: ../../abis/ERC20SymbolBytes.json + # - name: ERC20NameBytes + # file: ../../abis/ERC20NameBytes.json + # eventHandlers: + # - event: Deposit(indexed address,indexed uint256,uint256) + # handler: handleDeposit + # - event: Withdraw(indexed address,indexed uint256,uint256) + # handler: handleWithdraw + # - event: Claim(indexed address,uint256) + # handler: handleClaim +templates: + - kind: ethereum/contract + name: DVM + network: scroll + source: + abi: DVM + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/pool.ts + entities: + - Pair + - Token + - DODOSwap + abis: + - name: DVM + file: ../../abis/DVM.json + - name: DPP + file: ../../abis/DPP.json + - name: DODO + file: ../../abis/DODO.json + - name: DVMFactory + file: ../../abis/DVMFactory.json + - name: DPPFactory + file: ../../abis/DPPFactory.json + - name: FeeRateModel + file: ../../abis/FeeRateModel.json + - name: DODOZoo + file: ../../abis/DODOZoo.json + eventHandlers: + - event: DODOSwap(address,address,uint256,uint256,address,address) + handler: handleDODOSwap + - event: BuyShares(address,uint256,uint256) + handler: handleBuyShares + - event: SellShares(address,address,uint256,uint256) + handler: handleSellShares + - event: Transfer(indexed address,indexed address,uint256) + handler: handleTransfer + - kind: ethereum/contract + name: DPP + network: scroll + source: + abi: DPP + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/pool.ts + entities: + - Pair + - Token + abis: + - name: DVM + file: ../../abis/DVM.json + - name: DPP + file: ../../abis/DPP.json + - name: DODO + file: ../../abis/DODO.json + - name: DVMFactory + file: ../../abis/DVMFactory.json + - name: DPPFactory + file: ../../abis/DPPFactory.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + - name: FeeRateModel + file: ../../abis/FeeRateModel.json + - name: DODOZoo + file: ../../abis/DODOZoo.json + eventHandlers: + - event: DODOSwap(address,address,uint256,uint256,address,address) + handler: handleDODOSwap + - event: LpFeeRateChange(uint256) + handler: handleLpFeeRateChange + - kind: ethereum/contract + name: DPPOracleAdmin + network: scroll + source: + abi: DPPOracleAdmin + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/pool.ts + entities: + - Pair + - Token + abis: + - name: DVM + file: ../../abis/DVM.json + - name: DPP + file: ../../abis/DPP.json + - name: DPPOracleAdmin + file: ../../abis/DPPOracleAdmin.json + - name: DODO + file: ../../abis/DODO.json + - name: DVMFactory + file: ../../abis/DVMFactory.json + - name: DPPFactory + file: ../../abis/DPPFactory.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + - name: FeeRateModel + file: ../../abis/FeeRateModel.json + - name: DODOZoo + file: ../../abis/DODOZoo.json + eventHandlers: + - event: OwnershipTransferred(indexed address,indexed address) + handler: handleDPPOwnershipTransferred + - kind: ethereum/contract + name: DSP + network: scroll + source: + abi: DSP + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/pool.ts + entities: + - Pair + - Token + - DODOSwap + abis: + - name: DVMFactory + file: ../../abis/DVMFactory.json + - name: DPPFactory + file: ../../abis/DPPFactory.json + - name: DSPFactory + file: ../../abis/DSPFactory.json + - name: DVM + file: ../../abis/DVM.json + - name: DPP + file: ../../abis/DPP.json + - name: DSP + file: ../../abis/DSP.json + - name: FeeRateModel + file: ../../abis/FeeRateModel.json + - name: DODOZoo + file: ../../abis/DODOZoo.json + eventHandlers: + - event: DODOSwap(address,address,uint256,uint256,address,address) + handler: handleDODOSwap + - event: BuyShares(address,uint256,uint256) + handler: handleBuyShares + - event: SellShares(address,address,uint256,uint256) + handler: handleSellShares + - event: Transfer(indexed address,indexed address,uint256) + handler: handleTransfer + - kind: ethereum/contract + name: CP + network: scroll + source: + abi: CP + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/crowdPooling.ts + entities: + - CrowdPooling + - Token + abis: + - name: DVM + file: ../../abis/DVM.json + - name: DPP + file: ../../abis/DPP.json + - name: DODO + file: ../../abis/DODO.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + - name: CP + file: ../../abis/CP.json + - name: DVMFactory + file: ../../abis/DVMFactory.json + - name: DODOZoo + file: ../../abis/DODOZoo.json + eventHandlers: + - event: Bid(address,uint256,uint256) + handler: handleBid + - event: Cancel(address,uint256) + handler: handleCancel + - event: Settle() + handler: handleSettle + - event: Claim(address,uint256,uint256) + handler: handleClaim + - kind: ethereum/contract + name: DODO + network: scroll + source: + abi: DODO + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/classicPoolFromV1.ts + entities: + - Pair + - Token + abis: + - name: DVM + file: ../../abis/DVM.json + - name: DPP + file: ../../abis/DPP.json + - name: DODO + file: ../../abis/DODO.json + - name: DVMFactory + file: ../../abis/DVMFactory.json + - name: DPPFactory + file: ../../abis/DPPFactory.json + - name: DODOZoo + file: ../../abis/DODOZoo.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + eventHandlers: + - event: Deposit(indexed address,indexed address,bool,uint256,uint256) + handler: handleDeposit + - event: Withdraw(indexed address,indexed address,bool,uint256,uint256) + handler: handleWithdraw + - event: SellBaseToken(indexed address,uint256,uint256) + handler: handleSellBaseToken + - event: BuyBaseToken(indexed address,uint256,uint256) + handler: handleBuyBaseToken + - event: UpdateLiquidityProviderFeeRate(uint256,uint256) + handler: handleUpdateLiquidityProviderFeeRate + - event: ClaimAssets(indexed address,uint256,uint256) + handler: handleClaimAssets + - event: ChargeMaintainerFee(indexed address,bool,uint256) + handler: handleChargeMaintainerFee + - event: UpdateMaintainerFeeRate(uint256,uint256) + handler: handleUpdateMaintainerFeeRate + - kind: ethereum/contract + name: DODOLpToken + network: scroll + source: + abi: DODOLpToken + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/lpToken.ts + entities: + - Pair + - Token + abis: + - name: DODOLpToken + file: ../../abis/DODOLpToken.json + eventHandlers: + - event: Transfer(indexed address,indexed address,uint256) + handler: handleTransfer + - kind: ethereum/contract + name: CPV2 + network: scroll + source: + abi: CPV2 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/crowdPooling.ts + entities: + - CrowdPooling + - Token + abis: + - name: DVM + file: ../../abis/DVM.json + - name: DPP + file: ../../abis/DPP.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + - name: CP + file: ../../abis/CP.json + - name: CPV2 + file: ../../abis/CPV2.json + - name: DVMFactory + file: ../../abis/DVMFactory.json + - name: DODOZoo + file: ../../abis/DODOZoo.json + eventHandlers: + - event: Bid(address,uint256,uint256) + handler: handleBid + - event: Cancel(address,uint256) + handler: handleCancel + - event: Settle() + handler: handleSettle diff --git a/subgraphs/dodoex/dodoex_tokb.yaml b/subgraphs/dodoex/dodoex_tokb.yaml new file mode 100644 index 0000000..5cf034e --- /dev/null +++ b/subgraphs/dodoex/dodoex_tokb.yaml @@ -0,0 +1,662 @@ +specVersion: 0.0.4 +description: Dodoex.io +repository: https://github.com/DODOEX/dodoex_v2_subgraph +schema: + file: ./dodoex.graphql +dataSources: + - kind: ethereum/contract + name: DODOV2Proxy02 + network: tokb + source: + address: '0x6B9577b87666af89bd0e144b9b64e8Ed166E303d' + abi: DODOV2Proxy02 + startBlock: 300062 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/smartRoute.ts + entities: + - Pair + - Token + abis: + - name: DODOV2Proxy02 + file: ../../abis/DODOV2Proxy02.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + eventHandlers: + - event: OrderHistory(address,address,address,uint256,uint256) + handler: handleOrderHistory + - kind: ethereum/contract + name: DODOFeeRouteProxy + network: tokb + source: + address: '0x2933c0374089D7D98BA0C71c5E02E1A0e09deBEE' + abi: DODOFeeRouteProxy + startBlock: 300062 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/smartRoute.ts + entities: + - Pair + - Token + abis: + - name: DODOFeeRouteProxy + file: ../../abis/DODOFeeRouteProxy.json + - name: DODOV2Proxy02 + file: ../../abis/DODOV2Proxy02.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + eventHandlers: + - event: OrderHistory(address,address,address,uint256,uint256) + handler: handleOrderHistory + - kind: ethereum/contract + name: DODOFeeRouteProxy-widgit + network: tokb + source: + address: '0x49186e32fed50fd6b5604a2618c7b0b03cd41414' + abi: DODOFeeRouteProxy + startBlock: 300062 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/smartRoute.ts + entities: + - Pair + - Token + abis: + - name: DODOFeeRouteProxy + file: ../../abis/DODOFeeRouteProxy.json + - name: DODOV2Proxy02 + file: ../../abis/DODOV2Proxy02.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + eventHandlers: + - event: OrderHistory(address,address,address,uint256,uint256) + handler: handleOrderHistory + - kind: ethereum/contract + name: DVMFactory + network: tokb + source: + address: '0xFaFC924BF0F70BdF4a722231622f559b94e53902' + abi: DVMFactory + startBlock: 300062 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/poolFactory.ts + entities: + - Pair + - Token + abis: + - name: DVMFactory + file: ../../abis/DVMFactory.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + - name: DVM + file: ../../abis/DVM.json + - name: FeeRateModel + file: ../../abis/FeeRateModel.json + eventHandlers: + - event: NewDVM(address,address,address,address) + handler: handleNewDVM + - event: RemoveDVM(address) + handler: handleRemoveDVM + - kind: ethereum/contract + name: DPPFactory + network: tokb + source: + address: "0xb546Add98c71D97Bb65De60B91021617AcD1262C" + abi: DPPFactory + startBlock: 300062 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/poolFactory.ts + entities: + - Pair + - Token + abis: + - name: DPPFactory + file: ../../abis/DPPFactory.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + - name: DPP + file: ../../abis/DPP.json + - name: FeeRateModel + file: ../../abis/FeeRateModel.json + eventHandlers: + - event: NewDPP(address,address,address,address) + handler: handleNewDPP + - kind: ethereum/contract + name: DSPFactory + network: tokb + source: + address: '0x1506b54A1c0eA1B2F4a84866Ec5776F7F6e7f0B1' + abi: DSPFactory + startBlock: 300062 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/poolFactory.ts + entities: + - Pair + - Token + abis: + - name: DSPFactory + file: ../../abis/DSPFactory.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + - name: DSP + file: ../../abis/DSP.json + - name: FeeRateModel + file: ../../abis/FeeRateModel.json + eventHandlers: + - event: NewDSP(address,address,address,address) + handler: handleNewDSP + - event: RemoveDSP(address) + handler: handleRemoveDSP + - kind: ethereum/contract + name: CrowdPoolingFactory + network: tokb + source: + address: '0x8dD0Fea5FA2f7df535F87f312641Cc15d8B151BA' + abi: CrowdPoolingFactory + startBlock: 300062 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/poolFactory.ts + entities: + - Pair + - Token + abis: + - name: DVM + file: ../../abis/DVM.json + - name: DPP + file: ../../abis/DPP.json + - name: DODO + file: ../../abis/DODO.json + - name: CrowdPoolingFactory + file: ../../abis/CrowdPoolingFactory.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + - name: CP + file: ../../abis/CP.json + eventHandlers: + - event: NewCP(address,address,address,address) + handler: handleNewCP + # - kind: ethereum/contract + # name: CrowdPoolingFactoryV2 + # network: tokb + # source: + # address: '0x9a8c0e8b27fff5d00402733ca67432b6d64faff4' + # abi: CrowdPoolingFactory + # startBlock: 4407201 + # mapping: + # kind: ethereum/events + # apiVersion: 0.0.6 + # language: wasm/assemblyscript + # file: ../../src/mappings/dodoex/poolFactory.ts + # entities: + # - Pair + # - Token + # abis: + # - name: DVM + # file: ../../abis/DVM.json + # - name: DPP + # file: ../../abis/DPP.json + # - name: CrowdPoolingFactory + # file: ../../abis/CrowdPoolingFactory.json + # - name: ERC20 + # file: ../../abis/ERC20.json + # - name: ERC20SymbolBytes + # file: ../../abis/ERC20SymbolBytes.json + # - name: ERC20NameBytes + # file: ../../abis/ERC20NameBytes.json + # - name: CP + # file: ../../abis/CP.json + # - name: CPV2 + # file: ../../abis/CPV2.json + # eventHandlers: + # - event: NewCP(address,address,address,address) + # handler: handleNewCP + # - kind: ethereum/contract + # name: UpCrowdPoolingFactory + # network: tokb + # source: + # address: '0xE92787F457F541a9D5Ae17C1dbdBffA8D3BA3C25' + # abi: UpCrowdPoolingFactory + # startBlock: 226005 + # mapping: + # kind: ethereum/events + # apiVersion: 0.0.6 + # language: wasm/assemblyscript + # file: ../../src/mappings/dodoex/poolFactory.ts + # entities: + # - Pair + # - Token + # abis: + # - name: DVM + # file: ../../abis/DVM.json + # - name: DPP + # file: ../../abis/DPP.json + # - name: CrowdPoolingFactory + # file: ../../abis/CrowdPoolingFactory.json + # - name: UpCrowdPoolingFactory + # file: ../../abis/UpCrowdPoolingFactory.json + # - name: ERC20 + # file: ../../abis/ERC20.json + # - name: ERC20SymbolBytes + # file: ../../abis/ERC20SymbolBytes.json + # - name: ERC20NameBytes + # file: ../../abis/ERC20NameBytes.json + # - name: CP + # file: ../../abis/CP.json + # eventHandlers: + # - event: NewCP(address,address,address,address) + # handler: handleNewCP + # - kind: ethereum/contract + # name: DODOZoo + # network: tokb + # source: + # address: '0xBcC3401E16C25EaF4d3FeD632ce3288503883B1f' + # abi: DODOZoo + # startBlock: 226006 + # mapping: + # kind: ethereum/events + # apiVersion: 0.0.6 + # language: wasm/assemblyscript + # file: ../../src/mappings/dodoex/classicPoolFromV1.ts + # entities: + # - Pair + # - Token + # abis: + # - name: DODOZoo + # file: ../../abis/DODOZoo.json + # - name: DVM + # file: ../../abis/DVM.json + # - name: DPP + # file: ../../abis/DPP.json + # - name: DODO + # file: ../../abis/DODO.json + # - name: ERC20 + # file: ../../abis/ERC20.json + # - name: ERC20SymbolBytes + # file: ../../abis/ERC20SymbolBytes.json + # - name: ERC20NameBytes + # file: ../../abis/ERC20NameBytes.json + # eventHandlers: + # - event: DODOBirth(address,address,address) + # handler: handleDODOBirth + # - kind: ethereum/contract + # name: DODOMine + # network: tokb + # source: + # address: '0xe3c10989ddc5df5b1b9c0e6229c2e4e0862fde3e' + # abi: DODOMine + # startBlock: 226006 + # mapping: + # kind: ethereum/events + # apiVersion: 0.0.6 + # language: wasm/assemblyscript + # file: ../../src/mappings/dodoex/mine.ts + # entities: + # - User + # - StakeHistory + # abis: + # - name: DODOMine + # file: ../../abis/DODOMine.json + # - name: ERC20 + # file: ../../abis/ERC20.json + # - name: ERC20SymbolBytes + # file: ../../abis/ERC20SymbolBytes.json + # - name: ERC20NameBytes + # file: ../../abis/ERC20NameBytes.json + # eventHandlers: + # - event: Deposit(indexed address,indexed uint256,uint256) + # handler: handleDeposit + # - event: Withdraw(indexed address,indexed uint256,uint256) + # handler: handleWithdraw + # - event: Claim(indexed address,uint256) + # handler: handleClaim +templates: + - kind: ethereum/contract + name: DVM + network: tokb + source: + abi: DVM + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/pool.ts + entities: + - Pair + - Token + - DODOSwap + abis: + - name: DVM + file: ../../abis/DVM.json + - name: DPP + file: ../../abis/DPP.json + - name: DODO + file: ../../abis/DODO.json + - name: DVMFactory + file: ../../abis/DVMFactory.json + - name: DPPFactory + file: ../../abis/DPPFactory.json + - name: FeeRateModel + file: ../../abis/FeeRateModel.json + - name: DODOZoo + file: ../../abis/DODOZoo.json + eventHandlers: + - event: DODOSwap(address,address,uint256,uint256,address,address) + handler: handleDODOSwap + - event: BuyShares(address,uint256,uint256) + handler: handleBuyShares + - event: SellShares(address,address,uint256,uint256) + handler: handleSellShares + - event: Transfer(indexed address,indexed address,uint256) + handler: handleTransfer + - kind: ethereum/contract + name: DPP + network: tokb + source: + abi: DPP + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/pool.ts + entities: + - Pair + - Token + abis: + - name: DVM + file: ../../abis/DVM.json + - name: DPP + file: ../../abis/DPP.json + - name: DODO + file: ../../abis/DODO.json + - name: DVMFactory + file: ../../abis/DVMFactory.json + - name: DPPFactory + file: ../../abis/DPPFactory.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + - name: FeeRateModel + file: ../../abis/FeeRateModel.json + - name: DODOZoo + file: ../../abis/DODOZoo.json + eventHandlers: + - event: DODOSwap(address,address,uint256,uint256,address,address) + handler: handleDODOSwap + - event: LpFeeRateChange(uint256) + handler: handleLpFeeRateChange + - kind: ethereum/contract + name: DPPOracleAdmin + network: tokb + source: + abi: DPPOracleAdmin + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/pool.ts + entities: + - Pair + - Token + abis: + - name: DVM + file: ../../abis/DVM.json + - name: DPP + file: ../../abis/DPP.json + - name: DPPOracleAdmin + file: ../../abis/DPPOracleAdmin.json + - name: DODO + file: ../../abis/DODO.json + - name: DVMFactory + file: ../../abis/DVMFactory.json + - name: DPPFactory + file: ../../abis/DPPFactory.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + - name: FeeRateModel + file: ../../abis/FeeRateModel.json + - name: DODOZoo + file: ../../abis/DODOZoo.json + eventHandlers: + - event: OwnershipTransferred(indexed address,indexed address) + handler: handleDPPOwnershipTransferred + - kind: ethereum/contract + name: DSP + network: tokb + source: + abi: DSP + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/pool.ts + entities: + - Pair + - Token + - DODOSwap + abis: + - name: DVMFactory + file: ../../abis/DVMFactory.json + - name: DPPFactory + file: ../../abis/DPPFactory.json + - name: DSPFactory + file: ../../abis/DSPFactory.json + - name: DVM + file: ../../abis/DVM.json + - name: DPP + file: ../../abis/DPP.json + - name: DSP + file: ../../abis/DSP.json + - name: FeeRateModel + file: ../../abis/FeeRateModel.json + - name: DODOZoo + file: ../../abis/DODOZoo.json + eventHandlers: + - event: DODOSwap(address,address,uint256,uint256,address,address) + handler: handleDODOSwap + - event: BuyShares(address,uint256,uint256) + handler: handleBuyShares + - event: SellShares(address,address,uint256,uint256) + handler: handleSellShares + - event: Transfer(indexed address,indexed address,uint256) + handler: handleTransfer + - kind: ethereum/contract + name: CP + network: tokb + source: + abi: CP + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/crowdPooling.ts + entities: + - CrowdPooling + - Token + abis: + - name: DVM + file: ../../abis/DVM.json + - name: DPP + file: ../../abis/DPP.json + - name: DODO + file: ../../abis/DODO.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + - name: CP + file: ../../abis/CP.json + - name: DVMFactory + file: ../../abis/DVMFactory.json + - name: DODOZoo + file: ../../abis/DODOZoo.json + eventHandlers: + - event: Bid(address,uint256,uint256) + handler: handleBid + - event: Cancel(address,uint256) + handler: handleCancel + - event: Settle() + handler: handleSettle + - event: Claim(address,uint256,uint256) + handler: handleClaim + - kind: ethereum/contract + name: DODO + network: tokb + source: + abi: DODO + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/classicPoolFromV1.ts + entities: + - Pair + - Token + abis: + - name: DVM + file: ../../abis/DVM.json + - name: DPP + file: ../../abis/DPP.json + - name: DODO + file: ../../abis/DODO.json + - name: DVMFactory + file: ../../abis/DVMFactory.json + - name: DPPFactory + file: ../../abis/DPPFactory.json + - name: DODOZoo + file: ../../abis/DODOZoo.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + eventHandlers: + - event: Deposit(indexed address,indexed address,bool,uint256,uint256) + handler: handleDeposit + - event: Withdraw(indexed address,indexed address,bool,uint256,uint256) + handler: handleWithdraw + - event: SellBaseToken(indexed address,uint256,uint256) + handler: handleSellBaseToken + - event: BuyBaseToken(indexed address,uint256,uint256) + handler: handleBuyBaseToken + - event: UpdateLiquidityProviderFeeRate(uint256,uint256) + handler: handleUpdateLiquidityProviderFeeRate + - event: ClaimAssets(indexed address,uint256,uint256) + handler: handleClaimAssets + - event: ChargeMaintainerFee(indexed address,bool,uint256) + handler: handleChargeMaintainerFee + - event: UpdateMaintainerFeeRate(uint256,uint256) + handler: handleUpdateMaintainerFeeRate + - kind: ethereum/contract + name: DODOLpToken + network: tokb + source: + abi: DODOLpToken + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/lpToken.ts + entities: + - Pair + - Token + abis: + - name: DODOLpToken + file: ../../abis/DODOLpToken.json + eventHandlers: + - event: Transfer(indexed address,indexed address,uint256) + handler: handleTransfer + - kind: ethereum/contract + name: CPV2 + network: tokb + source: + abi: CPV2 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/crowdPooling.ts + entities: + - CrowdPooling + - Token + abis: + - name: DVM + file: ../../abis/DVM.json + - name: DPP + file: ../../abis/DPP.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + - name: CP + file: ../../abis/CP.json + - name: CPV2 + file: ../../abis/CPV2.json + - name: DVMFactory + file: ../../abis/DVMFactory.json + - name: DODOZoo + file: ../../abis/DODOZoo.json + eventHandlers: + - event: Bid(address,uint256,uint256) + handler: handleBid + - event: Cancel(address,uint256) + handler: handleCancel + - event: Settle() + handler: handleSettle diff --git a/subgraphs/merkle-airdrop/merkle.graphql b/subgraphs/merkle-airdrop/merkle.graphql new file mode 100644 index 0000000..848324d --- /dev/null +++ b/subgraphs/merkle-airdrop/merkle.graphql @@ -0,0 +1,34 @@ +type Claimed @entity { + " { Transaction hash }-{ Log index } " + id: ID! + " Transaction hash of the transaction that emitted this event " + hash: String! + " Event log index. For transactions that don't emit event, create arbitrary index starting from 0 " + logIndex: Int! + " Block number of this event " + blockNumber: BigInt! + " Timestamp of this event " + timestamp: BigInt! + index: BigInt! + account: Bytes! + amount: BigInt! + address: Bytes! + token: Token! + "updatedAt" + updatedAt: BigInt! +} + +type Token @entity { + "token address" + id: ID! + "token symbol" + symbol: String! + "token name" + name: String! + "token decimals" + decimals: BigInt! + "total supply" + totalSupply: BigInt! + "updatedAt" + updatedAt: BigInt! +} diff --git a/subgraphs/merkle-airdrop/merkle_base_mainnet.yaml b/subgraphs/merkle-airdrop/merkle_base_mainnet.yaml new file mode 100644 index 0000000..e367a1a --- /dev/null +++ b/subgraphs/merkle-airdrop/merkle_base_mainnet.yaml @@ -0,0 +1,28 @@ +specVersion: 0.0.4 +description: Dodoex.io +repository: https://github.com/DODOEX/dodoex_v2_subgraph +schema: + file: ./merkle.graphql +dataSources: + - kind: ethereum/contract + name: MerkleDistributor + network: base + source: + address: '0x39767dc49cb7ef6a1f32b8c1e65e4faf51692471' + abi: MerkleDistributor + startBlock: 3091658 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/merkle-airdrop/index.ts + entities: + - Claimed + abis: + - name: MerkleDistributor + file: ../../abis/MerkleDistributor.json + - name: ERC20 + file: ../../abis/ERC20.json + eventHandlers: + - event: Claimed(uint256,address,uint256) + handler: handleClaimed diff --git a/subgraphs/merkle-airdrop/merkle_goerli.yaml b/subgraphs/merkle-airdrop/merkle_goerli.yaml new file mode 100644 index 0000000..fcd6d68 --- /dev/null +++ b/subgraphs/merkle-airdrop/merkle_goerli.yaml @@ -0,0 +1,28 @@ +specVersion: 0.0.4 +description: Dodoex.io +repository: https://github.com/DODOEX/dodoex_v2_subgraph +schema: + file: ./merkle.graphql +dataSources: + - kind: ethereum/contract + name: MerkleDistributor + network: goerli + source: + address: '0xfF0f9997737e4588F24209E427B44Cd19839010B' + abi: MerkleDistributor + startBlock: 9520465 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/merkle-airdrop/index.ts + entities: + - Claimed + abis: + - name: MerkleDistributor + file: ../../abis/MerkleDistributor.json + - name: ERC20 + file: ../../abis/ERC20.json + eventHandlers: + - event: Claimed(uint256,address,uint256) + handler: handleClaimed diff --git a/subgraphs/mine/mine_linea.yaml b/subgraphs/mine/mine_linea.yaml new file mode 100644 index 0000000..5a74e56 --- /dev/null +++ b/subgraphs/mine/mine_linea.yaml @@ -0,0 +1,94 @@ +specVersion: 0.0.5 +description: Dodoex.io +repository: https://github.com/DODOEX/dodoex_v2_subgraph +schema: + file: ./mine.graphql +dataSources: + - kind: ethereum/contract + name: DODOMineV3ProxyV2 + network: linea + source: + address: '0xa6d0066328edbcf3220cf8f61e8527e589dd9719' + abi: DODOMineV3ProxyV2 + startBlock: 91756 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/mine/mineProxy.ts + entities: + - MinePool + abis: + - name: DODOMineV3Proxy + file: ../../abis/DODOMineV3Proxy.json + - name: DODOMineV3ProxyV2 + file: ../../abis/DODOMineV3ProxyV2.json + - name: ERC20MineV3 + file: ../../abis/ERC20MineV3.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + eventHandlers: + - event: CreateMineV3(address,address,uint256) + handler: handleV2CreateMineV3 + - kind: ethereum/contract + name: DODOMineV3Registry + network: linea + source: + address: '0x8dD0Fea5FA2f7df535F87f312641Cc15d8B151BA' + abi: DODOMineV3Registry + startBlock: 91492 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/mine/registry.ts + entities: + - MinePool + abis: + - name: DODOMineV3Proxy + file: ../../abis/DODOMineV3Proxy.json + - name: DODOMineV3Registry + file: ../../abis/DODOMineV3Registry.json + - name: ERC20MineV3 + file: ../../abis/ERC20MineV3.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + eventHandlers: + - event: NewMineV3(address,address,bool) + handler: handleNewMineV3 +templates: + - kind: ethereum/contract + name: ERC20MineV3 + network: linea + source: + abi: ERC20MineV3 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/mine/mine.ts + entities: + - MinePool + abis: + - name: ERC20MineV3 + file: ../../abis/ERC20MineV3.json + eventHandlers: + - event: Deposit(indexed address,uint256) + handler: handleDeposit + - event: Withdraw(indexed address,uint256) + handler: handleWithdraw + - event: NewRewardToken(indexed uint256,address) + handler: handleNewRewardToken + - event: UpdateEndBlock(indexed uint256,uint256) + handler: handleUpdateEndBlock + - event: UpdateReward(indexed uint256,uint256) + handler: handleUpdateReward + diff --git a/subgraphs/mine/mine_manta.yaml b/subgraphs/mine/mine_manta.yaml new file mode 100644 index 0000000..f015477 --- /dev/null +++ b/subgraphs/mine/mine_manta.yaml @@ -0,0 +1,94 @@ +specVersion: 0.0.5 +description: Dodoex.io +repository: https://github.com/DODOEX/dodoex_v2_subgraph +schema: + file: ./mine.graphql +dataSources: + - kind: ethereum/contract + name: DODOMineV3ProxyV2 + network: manta + source: + address: '0xA6d0066328Edbcf3220cf8F61e8527e589DD9719' + abi: DODOMineV3ProxyV2 + startBlock: 390513 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/mine/mineProxy.ts + entities: + - MinePool + abis: + - name: DODOMineV3Proxy + file: ../../abis/DODOMineV3Proxy.json + - name: DODOMineV3ProxyV2 + file: ../../abis/DODOMineV3ProxyV2.json + - name: ERC20MineV3 + file: ../../abis/ERC20MineV3.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + eventHandlers: + - event: CreateMineV3(address,address,uint256) + handler: handleV2CreateMineV3 + - kind: ethereum/contract + name: DODOMineV3Registry + network: manta + source: + address: '0x66c45FF040e86DC613F239123A5E21FFdC3A3fEC' + abi: DODOMineV3Registry + startBlock: 384168 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/mine/registry.ts + entities: + - MinePool + abis: + - name: DODOMineV3Proxy + file: ../../abis/DODOMineV3Proxy.json + - name: DODOMineV3Registry + file: ../../abis/DODOMineV3Registry.json + - name: ERC20MineV3 + file: ../../abis/ERC20MineV3.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + eventHandlers: + - event: NewMineV3(address,address,bool) + handler: handleNewMineV3 +templates: + - kind: ethereum/contract + name: ERC20MineV3 + network: manta + source: + abi: ERC20MineV3 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/mine/mine.ts + entities: + - MinePool + abis: + - name: ERC20MineV3 + file: ../../abis/ERC20MineV3.json + eventHandlers: + - event: Deposit(indexed address,uint256) + handler: handleDeposit + - event: Withdraw(indexed address,uint256) + handler: handleWithdraw + - event: NewRewardToken(indexed uint256,address) + handler: handleNewRewardToken + - event: UpdateEndBlock(indexed uint256,uint256) + handler: handleUpdateEndBlock + - event: UpdateReward(indexed uint256,uint256) + handler: handleUpdateReward + diff --git a/subgraphs/mine/mine_mantle.yaml b/subgraphs/mine/mine_mantle.yaml new file mode 100644 index 0000000..b09480d --- /dev/null +++ b/subgraphs/mine/mine_mantle.yaml @@ -0,0 +1,94 @@ +specVersion: 0.0.5 +description: Dodoex.io +repository: https://github.com/DODOEX/dodoex_v2_subgraph +schema: + file: ./mine.graphql +dataSources: + - kind: ethereum/contract + name: DODOMineV3ProxyV2 + network: mantle + source: + address: '0x6D3bd005A8a75d6522C9cFE7d309BB1Cf9650e03' + abi: DODOMineV3ProxyV2 + startBlock: 21092149 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/mine/mineProxy.ts + entities: + - MinePool + abis: + - name: DODOMineV3Proxy + file: ../../abis/DODOMineV3Proxy.json + - name: DODOMineV3ProxyV2 + file: ../../abis/DODOMineV3ProxyV2.json + - name: ERC20MineV3 + file: ../../abis/ERC20MineV3.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + eventHandlers: + - event: CreateMineV3(address,address,uint256) + handler: handleV2CreateMineV3 + - kind: ethereum/contract + name: DODOMineV3Registry + network: mantle + source: + address: '0x0B1467f71c082D8d410aF4376C685D9A6893cF36' + abi: DODOMineV3Registry + startBlock: 21054291 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/mine/registry.ts + entities: + - MinePool + abis: + - name: DODOMineV3Proxy + file: ../../abis/DODOMineV3Proxy.json + - name: DODOMineV3Registry + file: ../../abis/DODOMineV3Registry.json + - name: ERC20MineV3 + file: ../../abis/ERC20MineV3.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + eventHandlers: + - event: NewMineV3(address,address,bool) + handler: handleNewMineV3 +templates: + - kind: ethereum/contract + name: ERC20MineV3 + network: mantle + source: + abi: ERC20MineV3 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/mine/mine.ts + entities: + - MinePool + abis: + - name: ERC20MineV3 + file: ../../abis/ERC20MineV3.json + eventHandlers: + - event: Deposit(indexed address,uint256) + handler: handleDeposit + - event: Withdraw(indexed address,uint256) + handler: handleWithdraw + - event: NewRewardToken(indexed uint256,address) + handler: handleNewRewardToken + - event: UpdateEndBlock(indexed uint256,uint256) + handler: handleUpdateEndBlock + - event: UpdateReward(indexed uint256,uint256) + handler: handleUpdateReward + diff --git a/subgraphs/mine/mine_scroll_alpha.yaml b/subgraphs/mine/mine_scroll-alpha.yaml similarity index 100% rename from subgraphs/mine/mine_scroll_alpha.yaml rename to subgraphs/mine/mine_scroll-alpha.yaml diff --git a/subgraphs/mine/mine_scroll-sepolia.yaml b/subgraphs/mine/mine_scroll-sepolia.yaml new file mode 100644 index 0000000..002213a --- /dev/null +++ b/subgraphs/mine/mine_scroll-sepolia.yaml @@ -0,0 +1,94 @@ +specVersion: 0.0.5 +description: Dodoex.io +repository: https://github.com/DODOEX/dodoex_v2_subgraph +schema: + file: ./mine.graphql +dataSources: + - kind: ethereum/contract + name: DODOMineV3ProxyV2 + network: scroll-sepolia + source: + address: '0xa5fc92Ca57a21C87AA0477b1c8fE8B9Bbf69d6C2' + abi: DODOMineV3ProxyV2 + startBlock: 19340 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/mine/mineProxy.ts + entities: + - MinePool + abis: + - name: DODOMineV3Proxy + file: ../../abis/DODOMineV3Proxy.json + - name: DODOMineV3ProxyV2 + file: ../../abis/DODOMineV3ProxyV2.json + - name: ERC20MineV3 + file: ../../abis/ERC20MineV3.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + eventHandlers: + - event: CreateMineV3(address,address,uint256) + handler: handleV2CreateMineV3 + - kind: ethereum/contract + name: DODOMineV3Registry + network: scroll-sepolia + source: + address: '0x4CAD0052524648A7Fa2cfE279997b00239295F33' + abi: DODOMineV3Registry + startBlock: 12099 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/mine/registry.ts + entities: + - MinePool + abis: + - name: DODOMineV3Proxy + file: ../../abis/DODOMineV3Proxy.json + - name: DODOMineV3Registry + file: ../../abis/DODOMineV3Registry.json + - name: ERC20MineV3 + file: ../../abis/ERC20MineV3.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + eventHandlers: + - event: NewMineV3(address,address,bool) + handler: handleNewMineV3 +templates: + - kind: ethereum/contract + name: ERC20MineV3 + network: scroll-sepolia + source: + abi: ERC20MineV3 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/mine/mine.ts + entities: + - MinePool + abis: + - name: ERC20MineV3 + file: ../../abis/ERC20MineV3.json + eventHandlers: + - event: Deposit(indexed address,uint256) + handler: handleDeposit + - event: Withdraw(indexed address,uint256) + handler: handleWithdraw + - event: NewRewardToken(indexed uint256,address) + handler: handleNewRewardToken + - event: UpdateEndBlock(indexed uint256,uint256) + handler: handleUpdateEndBlock + - event: UpdateReward(indexed uint256,uint256) + handler: handleUpdateReward + diff --git a/subgraphs/mine/mine_scroll.yaml b/subgraphs/mine/mine_scroll.yaml new file mode 100644 index 0000000..9ddcec5 --- /dev/null +++ b/subgraphs/mine/mine_scroll.yaml @@ -0,0 +1,94 @@ +specVersion: 0.0.5 +description: Dodoex.io +repository: https://github.com/DODOEX/dodoex_v2_subgraph +schema: + file: ./mine.graphql +dataSources: + - kind: ethereum/contract + name: DODOMineV3ProxyV2 + network: scroll + source: + address: '0x14F7B8Fb0c1447DdE7bcf92a8d9BB058c8A5FE64' + abi: DODOMineV3ProxyV2 + startBlock: 83276 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/mine/mineProxy.ts + entities: + - MinePool + abis: + - name: DODOMineV3Proxy + file: ../../abis/DODOMineV3Proxy.json + - name: DODOMineV3ProxyV2 + file: ../../abis/DODOMineV3ProxyV2.json + - name: ERC20MineV3 + file: ../../abis/ERC20MineV3.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + eventHandlers: + - event: CreateMineV3(address,address,uint256) + handler: handleV2CreateMineV3 + - kind: ethereum/contract + name: DODOMineV3Registry + network: scroll + source: + address: '0xD63c8Bf9ACaFfE6da2a4043F1C94CC3a55F28117' + abi: DODOMineV3Registry + startBlock: 83146 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/mine/registry.ts + entities: + - MinePool + abis: + - name: DODOMineV3Proxy + file: ../../abis/DODOMineV3Proxy.json + - name: DODOMineV3Registry + file: ../../abis/DODOMineV3Registry.json + - name: ERC20MineV3 + file: ../../abis/ERC20MineV3.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + eventHandlers: + - event: NewMineV3(address,address,bool) + handler: handleNewMineV3 +templates: + - kind: ethereum/contract + name: ERC20MineV3 + network: scroll + source: + abi: ERC20MineV3 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/mine/mine.ts + entities: + - MinePool + abis: + - name: ERC20MineV3 + file: ../../abis/ERC20MineV3.json + eventHandlers: + - event: Deposit(indexed address,uint256) + handler: handleDeposit + - event: Withdraw(indexed address,uint256) + handler: handleWithdraw + - event: NewRewardToken(indexed uint256,address) + handler: handleNewRewardToken + - event: UpdateEndBlock(indexed uint256,uint256) + handler: handleUpdateEndBlock + - event: UpdateReward(indexed uint256,uint256) + handler: handleUpdateReward + diff --git a/subgraphs/mine/mine_tokb.yaml b/subgraphs/mine/mine_tokb.yaml new file mode 100644 index 0000000..3b6cb00 --- /dev/null +++ b/subgraphs/mine/mine_tokb.yaml @@ -0,0 +1,94 @@ +specVersion: 0.0.5 +description: Dodoex.io +repository: https://github.com/DODOEX/dodoex_v2_subgraph +schema: + file: ./mine.graphql +dataSources: + - kind: ethereum/contract + name: DODOMineV3ProxyV2 + network: tokb + source: + address: '0xe7979E2F3e77196Bb2AB206eaa67Ea278A3E33A2' + abi: DODOMineV3ProxyV2 + startBlock: 299037 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/mine/mineProxy.ts + entities: + - MinePool + abis: + - name: DODOMineV3Proxy + file: ../../abis/DODOMineV3Proxy.json + - name: DODOMineV3ProxyV2 + file: ../../abis/DODOMineV3ProxyV2.json + - name: ERC20MineV3 + file: ../../abis/ERC20MineV3.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + eventHandlers: + - event: CreateMineV3(address,address,uint256) + handler: handleV2CreateMineV3 + - kind: ethereum/contract + name: DODOMineV3Registry + network: tokb + source: + address: '0xE2004eE21f88a7D8e1A5EDc3c9617a0460CC7b99' + abi: DODOMineV3Registry + startBlock: 299037 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/mine/registry.ts + entities: + - MinePool + abis: + - name: DODOMineV3Proxy + file: ../../abis/DODOMineV3Proxy.json + - name: DODOMineV3Registry + file: ../../abis/DODOMineV3Registry.json + - name: ERC20MineV3 + file: ../../abis/ERC20MineV3.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + eventHandlers: + - event: NewMineV3(address,address,bool) + handler: handleNewMineV3 +templates: + - kind: ethereum/contract + name: ERC20MineV3 + network: tokb + source: + abi: ERC20MineV3 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/mine/mine.ts + entities: + - MinePool + abis: + - name: ERC20MineV3 + file: ../../abis/ERC20MineV3.json + eventHandlers: + - event: Deposit(indexed address,uint256) + handler: handleDeposit + - event: Withdraw(indexed address,uint256) + handler: handleWithdraw + - event: NewRewardToken(indexed uint256,address) + handler: handleNewRewardToken + - event: UpdateEndBlock(indexed uint256,uint256) + handler: handleUpdateEndBlock + - event: UpdateReward(indexed uint256,uint256) + handler: handleUpdateReward + diff --git a/subgraphs/token/token_linea.yaml b/subgraphs/token/token_linea.yaml new file mode 100644 index 0000000..c989afd --- /dev/null +++ b/subgraphs/token/token_linea.yaml @@ -0,0 +1,70 @@ +specVersion: 0.0.6 +description: Dodoex.io +repository: https://github.com/DODOEX/dodoex_v2_subgraph +schema: + file: ./token.graphql +dataSources: + # - kind: ethereum/contract + # name: ERC20V2Factory + # network: linea + # source: + # address: '0x4E4f8d8742822AF3B0E61cF6B2725Ff64515ce84' + # abi: ERC20V2Factory + # startBlock: 3435939 + # mapping: + # kind: ethereum/events + # apiVersion: 0.0.6 + # language: wasm/assemblyscript + # file: ../../src/mappings/token/factoryv2.ts + # entities: + # - User + # - Token + # - UserTokenBlance + # - TransferHistories + # abis: + # - name: ERC20Factory + # file: ../../abis/ERC20Factory.json + # - name: ERC20V2Factory + # file: ../../abis/ERC20V2Factory.json + # - name: ERC20 + # file: ../../abis/ERC20.json + # - name: ERC20SymbolBytes + # file: ../../abis/ERC20SymbolBytes.json + # - name: ERC20NameBytes + # file: ../../abis/ERC20NameBytes.json + # eventHandlers: + # - event: NewERC20(address,address,uint256) + # handler: handleNewERC20 + - kind: ethereum/contract + name: ERC20V3Factory + network: linea + source: + address: '0x0226fCE8c969604C3A0AD19c37d1FAFac73e13c2' + abi: ERC20V3Factory + startBlock: 91463 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/token/factoryv2.ts + entities: + - User + - Token + - UserTokenBlance + - TransferHistories + abis: + - name: ERC20Factory + file: ../../abis/ERC20Factory.json + - name: ERC20V2Factory + file: ../../abis/ERC20V2Factory.json + - name: ERC20V3Factory + file: ../../abis/ERC20V3Factory.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + eventHandlers: + - event: NewERC20(address,address,uint256) + handler: handleNewERC20 diff --git a/subgraphs/token/token_manta.yaml b/subgraphs/token/token_manta.yaml new file mode 100644 index 0000000..3973ff6 --- /dev/null +++ b/subgraphs/token/token_manta.yaml @@ -0,0 +1,70 @@ +specVersion: 0.0.6 +description: Dodoex.io +repository: https://github.com/DODOEX/dodoex_v2_subgraph +schema: + file: ./token.graphql +dataSources: + # - kind: ethereum/contract + # name: ERC20V2Factory + # network: manta + # source: + # address: '0x4E4f8d8742822AF3B0E61cF6B2725Ff64515ce84' + # abi: ERC20V2Factory + # startBlock: 3435939 + # mapping: + # kind: ethereum/events + # apiVersion: 0.0.6 + # language: wasm/assemblyscript + # file: ../../src/mappings/token/factoryv2.ts + # entities: + # - User + # - Token + # - UserTokenBlance + # - TransferHistories + # abis: + # - name: ERC20Factory + # file: ../../abis/ERC20Factory.json + # - name: ERC20V2Factory + # file: ../../abis/ERC20V2Factory.json + # - name: ERC20 + # file: ../../abis/ERC20.json + # - name: ERC20SymbolBytes + # file: ../../abis/ERC20SymbolBytes.json + # - name: ERC20NameBytes + # file: ../../abis/ERC20NameBytes.json + # eventHandlers: + # - event: NewERC20(address,address,uint256) + # handler: handleNewERC20 + - kind: ethereum/contract + name: ERC20V3Factory + network: manta + source: + address: '0xc0F9553Df63De5a97Fe64422c8578D0657C360f7' + abi: ERC20V3Factory + startBlock: 384132 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/token/factoryv2.ts + entities: + - User + - Token + - UserTokenBlance + - TransferHistories + abis: + - name: ERC20Factory + file: ../../abis/ERC20Factory.json + - name: ERC20V2Factory + file: ../../abis/ERC20V2Factory.json + - name: ERC20V3Factory + file: ../../abis/ERC20V3Factory.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + eventHandlers: + - event: NewERC20(address,address,uint256) + handler: handleNewERC20 diff --git a/subgraphs/token/token_mantle.yaml b/subgraphs/token/token_mantle.yaml new file mode 100644 index 0000000..512bc4b --- /dev/null +++ b/subgraphs/token/token_mantle.yaml @@ -0,0 +1,70 @@ +specVersion: 0.0.6 +description: Dodoex.io +repository: https://github.com/DODOEX/dodoex_v2_subgraph +schema: + file: ./token.graphql +dataSources: + # - kind: ethereum/contract + # name: ERC20V2Factory + # network: mantle + # source: + # address: '0x4E4f8d8742822AF3B0E61cF6B2725Ff64515ce84' + # abi: ERC20V2Factory + # startBlock: 3435939 + # mapping: + # kind: ethereum/events + # apiVersion: 0.0.6 + # language: wasm/assemblyscript + # file: ../../src/mappings/token/factoryv2.ts + # entities: + # - User + # - Token + # - UserTokenBlance + # - TransferHistories + # abis: + # - name: ERC20Factory + # file: ../../abis/ERC20Factory.json + # - name: ERC20V2Factory + # file: ../../abis/ERC20V2Factory.json + # - name: ERC20 + # file: ../../abis/ERC20.json + # - name: ERC20SymbolBytes + # file: ../../abis/ERC20SymbolBytes.json + # - name: ERC20NameBytes + # file: ../../abis/ERC20NameBytes.json + # eventHandlers: + # - event: NewERC20(address,address,uint256) + # handler: handleNewERC20 + - kind: ethereum/contract + name: ERC20V3Factory + network: mantle + source: + address: '0xFD2b7994f91c08aAa5e013E899334A2DBb500DF1' + abi: ERC20V3Factory + startBlock: 21053981 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/token/factoryv2.ts + entities: + - User + - Token + - UserTokenBlance + - TransferHistories + abis: + - name: ERC20Factory + file: ../../abis/ERC20Factory.json + - name: ERC20V2Factory + file: ../../abis/ERC20V2Factory.json + - name: ERC20V3Factory + file: ../../abis/ERC20V3Factory.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + eventHandlers: + - event: NewERC20(address,address,uint256) + handler: handleNewERC20 diff --git a/subgraphs/token/token_scroll_alpha.yaml b/subgraphs/token/token_scroll-alpha.yaml similarity index 100% rename from subgraphs/token/token_scroll_alpha.yaml rename to subgraphs/token/token_scroll-alpha.yaml diff --git a/subgraphs/token/token_scroll-sepolia.yaml b/subgraphs/token/token_scroll-sepolia.yaml new file mode 100644 index 0000000..36c436d --- /dev/null +++ b/subgraphs/token/token_scroll-sepolia.yaml @@ -0,0 +1,39 @@ +specVersion: 0.0.6 +description: Dodoex.io +repository: https://github.com/DODOEX/dodoex_v2_subgraph +schema: + file: ./token.graphql +dataSources: + - kind: ethereum/contract + name: ERC20V3Factory + network: scroll-sepolia + source: + address: '0x97bBF5BB1dcfC93A8c67e97E50Bea19DB3416A83' + abi: ERC20V3Factory + startBlock: 12083 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/token/factoryv2.ts + entities: + - User + - Token + - UserTokenBlance + - TransferHistories + abis: + - name: ERC20Factory + file: ../../abis/ERC20Factory.json + - name: ERC20V2Factory + file: ../../abis/ERC20V2Factory.json + - name: ERC20V3Factory + file: ../../abis/ERC20V3Factory.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + eventHandlers: + - event: NewERC20(address,address,uint256) + handler: handleNewERC20 diff --git a/subgraphs/token/token_scroll.yaml b/subgraphs/token/token_scroll.yaml new file mode 100644 index 0000000..4bfd47a --- /dev/null +++ b/subgraphs/token/token_scroll.yaml @@ -0,0 +1,39 @@ +specVersion: 0.0.6 +description: Dodoex.io +repository: https://github.com/DODOEX/dodoex_v2_subgraph +schema: + file: ./token.graphql +dataSources: + - kind: ethereum/contract + name: ERC20V3Factory + network: scroll + source: + address: '0x1F076a800005c758a505E759720eb6737136e893' + abi: ERC20V3Factory + startBlock: 83057 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/token/factoryv2.ts + entities: + - User + - Token + - UserTokenBlance + - TransferHistories + abis: + - name: ERC20Factory + file: ../../abis/ERC20Factory.json + - name: ERC20V2Factory + file: ../../abis/ERC20V2Factory.json + - name: ERC20V3Factory + file: ../../abis/ERC20V3Factory.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + eventHandlers: + - event: NewERC20(address,address,uint256) + handler: handleNewERC20 diff --git a/subgraphs/token/token_tokb.yaml b/subgraphs/token/token_tokb.yaml new file mode 100644 index 0000000..4be7842 --- /dev/null +++ b/subgraphs/token/token_tokb.yaml @@ -0,0 +1,39 @@ +specVersion: 0.0.6 +description: Dodoex.io +repository: https://github.com/DODOEX/dodoex_v2_subgraph +schema: + file: ./token.graphql +dataSources: + - kind: ethereum/contract + name: ERC20V3Factory + network: tokb + source: + address: '0x4A81Aa47722E1cF27A8726F247E68a766bE58d8e' + abi: ERC20V3Factory + startBlock: 299037 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/token/factoryv2.ts + entities: + - User + - Token + - UserTokenBlance + - TransferHistories + abis: + - name: ERC20Factory + file: ../../abis/ERC20Factory.json + - name: ERC20V2Factory + file: ../../abis/ERC20V2Factory.json + - name: ERC20V3Factory + file: ../../abis/ERC20V3Factory.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + eventHandlers: + - event: NewERC20(address,address,uint256) + handler: handleNewERC20