Skip to content

Commit

Permalink
ADD:widgit support
Browse files Browse the repository at this point in the history
  • Loading branch information
AutarkXu committed Jun 8, 2023
1 parent 1107c12 commit 0a302c0
Show file tree
Hide file tree
Showing 18 changed files with 520 additions and 486 deletions.
Binary file modified build/DODOMine/DODOMine.wasm
Binary file not shown.
Binary file modified build/DODOZoo/DODOZoo.wasm
Binary file not shown.
Binary file modified build/DVMFactory/DVMFactory.wasm
Binary file not shown.
555 changes: 97 additions & 458 deletions build/subgraph.yaml

Large diffs are not rendered by default.

Binary file modified build/templates/CP/CP.wasm
Binary file not shown.
Binary file modified build/templates/DODOLpToken/DODOLpToken.wasm
Binary file not shown.
Binary file modified build/templates/DVM/DVM.wasm
Binary file not shown.
41 changes: 19 additions & 22 deletions src/mappings/constant.ts
Original file line number Diff line number Diff line change
@@ -1,30 +1,28 @@
//bsc
//mainnet
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 DODOV2Proxy01="0xb57dd5c265dbb13ca014f2332069e90cd0e22e65";
export const DODOV2Proxy02_2021_02_17="0xd56281ef996b6b29874c77d2e1464216e8043127";
export const DODOV2Proxy02="0xd56281ef996b6b29874c77d2e1464216e8043127";
export const DIP3_TIMESTAMP = 1624442400;
export const DIP3_TIMESTAMP = 868288;

export const DODOZooID = "dodoex-v2-bsc";
export const CHAIN_BASE_COIN_SYMBOL = "BNB";
export const CHAIN_BASE_COIN_NAME = "Bnb";
export const DODOV2Proxy02 = "0xa356867fdcea8e71aeaf87805808803806231fdc";

export const SMART_ROUTE_ADDRESSES: string[]= ["0xb57dd5c265dbb13ca014f2332069e90cd0e22e65","0xd56281ef996b6b29874c77d2e1464216e8043127","0x8f8dd7db1bda5ed3da8c9daf3bfa471c12d58486","0xbe9a66e49503e84ae59a4d0545365AABedf33b40"];
export const DVM_FACTORY_ADDRESS = "0xf50bdc9e90b7a1c138cb7935071b85c417c4cb8e";
export const DPP_FACTORY_ADDRESS = "0x7737fd30535c69545deeea54ab8dd590ccaebd3c";
export const CLASSIC_FACTORY_ADDRESS = "0xca459456a45e300aa7ef447dbb60f87cccb42828";//dodo zoo
export const CROWDPOOLING_FACTORY_V2: string[]=["0x9c9ef6820a1aa0e25770ccde4e974f81cb28debc"];
export const DODOZooID = "dodoex-v2-moonriver";
export const CHAIN_BASE_COIN_SYMBOL = "mover";
export const CHAIN_BASE_COIN_NAME = "moonriver";

export const SMART_ROUTE_ADDRESSES: string[] = ["0xd9dec7c3c06e62a4c1beeb07cadf568f496b14c2"];
export const DVM_FACTORY_ADDRESS = "0x738ebf387a0ce0eb46b0ef8fa5dea2eae6b1df51";
export const DPP_FACTORY_ADDRESS = "0xd0e1aa51df0896c126ce6f8a064e551e0dd3d39b";
export const CLASSIC_FACTORY_ADDRESS = "0x02fcb21dc1cf221939c1d4277fb54016b5d32bc7";//dodo zoo
export const CROWDPOOLING_FACTORY_V2: string[]=["0x1b75c99c3ab14764aea1511e68b33f5b9138a241"];

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"
Expand All @@ -35,15 +33,14 @@ export const TRANSACTION_TYPE_CP_CLAIM = "CP_CLAIM"
/**
* usd pricing
*/
export const WRAPPED_BASE_COIN = '0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c';
export const WRAPPED_BASE_COIN = '0xf50225a84382c74cbdea10b0c176f71fc3de0c4d';
//pricing supported stable coins
export const STABLE_ONE_ADDRESS = '0x55d398326f99059ff775485246999027b3197955';//usdt
export const STABLE_TWO_ADDRESS = '0xe9e7cea3dedca5984780bafc599bd69add087d56';//busd
//stable coins pairs
export const STABLE_COIN_PAIR_ONE = '0xbe60d4c4250438344bec816ec2dec99925deb4c7';//[USDT_BUSD_PAIR]
//base currency pair
export const BASE_COIN_PAIR = '0x327134de48fcdd75320f4c32498d1980470249ae';//[WBNB_BUSD_PAIR]

export const STABLE_ONE_ADDRESS = '0xb44a9b6905af7c801311e8f4e76932ee959c663c';//usdt
export const STABLE_TWO_ADDRESS = '0xe3f5a90f9cb311505cd691a46596599aa1a0ad7d';//usdc
//stable coins pairs todo
export const STABLE_COIN_PAIR_ONE = '0xc9f93163c99695c6526b799ebca2207fdf7d61ad';//[USDT_USDC_PAIR]
//base currency pair todo
export const BASE_COIN_PAIR = '0x75c23271661d9d143dcb617222bc4bec783eff34';//[WETH_USDC_PAIR]



59 changes: 56 additions & 3 deletions subgraphs/dodoex/dodoex_arbitrum-graft.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
specVersion: 0.0.2
description: Dodoex.io
graft:
base: QmVbEmYjNRU5zyRDq6WDCWLnq952vDVWaM8AmVtvxpMy4b
block: 45989363
repository: https://github.com/DODOEX/dodoex_v2_subgraph
schema:
file: ./dodoex.graphql
Expand Down Expand Up @@ -36,6 +33,35 @@ dataSources:
eventHandlers:
- event: OrderHistory(address,address,address,uint256,uint256)
handler: handleOrderHistory
- kind: ethereum/contract
name: DODOFeeRouteProxyWidgit
network: arbitrum-one
source:
address: '0xc4A1a152812dE96b2B1861E433f42290CDD7f113'
abi: DODOFeeRouteProxy
startBlock: 45989363
mapping:
kind: ethereum/events
apiVersion: 0.0.4
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: arbitrum-one
Expand Down Expand Up @@ -360,6 +386,33 @@ dataSources:
handler: handleWithdraw
- event: Claim(indexed address,uint256)
handler: handleClaim
- kind: ethereum/contract
name: DODORouteProxy
network: arbitrum-one
source:
address: '0x3b6067d4caa8a14c63fdbe6318f27a0bbc9f9237'
abi: DODORouteProxy
startBlock: 226006
mapping:
kind: ethereum/events
apiVersion: 0.0.4
language: wasm/assemblyscript
file: ../../src/mappings/dodoex/smartRoute.ts
entities:
- Pair
- Token
abis:
- name: DODORouteProxy
file: ../../abis/DODORouteProxy.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
templates:
- kind: ethereum/contract
name: DVM
Expand Down
29 changes: 29 additions & 0 deletions subgraphs/dodoex/dodoex_arbitrum.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,35 @@ dataSources:
eventHandlers:
- event: OrderHistory(address,address,address,uint256,uint256)
handler: handleOrderHistory
- kind: ethereum/contract
name: DODOFeeRouteProxyWidgit
network: arbitrum-one
source:
address: '0xc4A1a152812dE96b2B1861E433f42290CDD7f113'
abi: DODOFeeRouteProxy
startBlock: 45989363
mapping:
kind: ethereum/events
apiVersion: 0.0.4
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: arbitrum-one
Expand Down
58 changes: 58 additions & 0 deletions subgraphs/dodoex/dodoex_aurora.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,64 @@ repository: https://github.com/DODOEX/dodoex_v2_subgraph
schema:
file: ./dodoex.graphql
dataSources:
- kind: ethereum/contract
name: DODOFeeRouteProxy
network: aurora
source:
address: '0x7449Cd63C2b1A06C36945eD83f0626D303781B6E'
abi: DODOFeeRouteProxy
startBlock: 51265155
mapping:
kind: ethereum/events
apiVersion: 0.0.4
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: DODOFeeRouteProxyWidgit
network: aurora
source:
address: '0x0218E24dd47f9a1D05418eAa5B9cEDB13Ca48492'
abi: DODOFeeRouteProxy
startBlock: 51265155
mapping:
kind: ethereum/events
apiVersion: 0.0.4
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: aurora
Expand Down
29 changes: 29 additions & 0 deletions subgraphs/dodoex/dodoex_avax-graft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,35 @@ dataSources:
eventHandlers:
- event: OrderHistory(address,address,address,uint256,uint256)
handler: handleOrderHistory
- kind: ethereum/contract
name: DODOFeeRouteProxyWidgit
network: avalanche
source:
address: '0xbce44767af0a53A108b3B7ba4F740E03D228Ec0A'
abi: DODOFeeRouteProxy
startBlock: 23610148
mapping:
kind: ethereum/events
apiVersion: 0.0.4
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: avalanche
Expand Down
29 changes: 29 additions & 0 deletions subgraphs/dodoex/dodoex_avax.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,35 @@ dataSources:
eventHandlers:
- event: OrderHistory(address,address,address,uint256,uint256)
handler: handleOrderHistory
- kind: ethereum/contract
name: DODOFeeRouteProxyWidgit
network: avalanche
source:
address: '0xbce44767af0a53A108b3B7ba4F740E03D228Ec0A'
abi: DODOFeeRouteProxy
startBlock: 23610148
mapping:
kind: ethereum/events
apiVersion: 0.0.4
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: avalanche
Expand Down
58 changes: 58 additions & 0 deletions subgraphs/dodoex/dodoex_boba.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,64 @@ repository: https://github.com/DODOEX/dodoex_v2_subgraph
schema:
file: ./dodoex.graphql
dataSources:
- kind: ethereum/contract
name: DODOFeeRouteProxy
network: boba
source:
address: '0x64842A3EbC09bB69429c1a34ae181375fea5f17F'
abi: DODOFeeRouteProxy
startBlock: 10000
mapping:
kind: ethereum/events
apiVersion: 0.0.4
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: DODOFeeRouteProxyWidgit
network: boba
source:
address: '0xfcA520C94078b65F8237d4F566c438a9468917A1'
abi: DODOFeeRouteProxy
startBlock: 10000
mapping:
kind: ethereum/events
apiVersion: 0.0.4
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: boba
Expand Down
Loading

0 comments on commit 0a302c0

Please sign in to comment.