Skip to content

Commit

Permalink
Merge pull request #12 from yongjun925/version-upgrade
Browse files Browse the repository at this point in the history
Version upgrade
  • Loading branch information
sa1i authored Nov 28, 2023
2 parents 6899f9c + 896db88 commit f601030
Show file tree
Hide file tree
Showing 49 changed files with 5,672 additions and 225 deletions.
2 changes: 1 addition & 1 deletion abis/CrowdPoolingFactoryV2.json
Original file line number Diff line number Diff line change
Expand Up @@ -640,4 +640,4 @@
"stateMutability": "nonpayable",
"type": "function"
}
]
]
116 changes: 116 additions & 0 deletions abis/MerkleDistributor.json
Original file line number Diff line number Diff line change
@@ -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"
}
]
7 changes: 6 additions & 1 deletion bin/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const chains = [
"okchain",
"arbitrum",
"polygon",
"optimism",
"heco",
"moonriver",
"boba",
Expand All @@ -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"];
Expand Down
4 changes: 4 additions & 0 deletions bin/index-cmd.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
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.
70 changes: 5 additions & 65 deletions build/subgraph.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
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.
49 changes: 49 additions & 0 deletions src/mappings/constant-linea.ts
Original file line number Diff line number Diff line change
@@ -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]
49 changes: 49 additions & 0 deletions src/mappings/constant-manta.ts
Original file line number Diff line number Diff line change
@@ -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]
49 changes: 49 additions & 0 deletions src/mappings/constant-mantle.ts
Original file line number Diff line number Diff line change
@@ -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]
Loading

0 comments on commit f601030

Please sign in to comment.