diff --git a/abis/CrowdPoolingFactoryV2.json b/abis/CrowdPoolingFactoryV2.json index fcea79f..edbc816 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/GSP.json b/abis/GSP.json new file mode 100644 index 0000000..91e423a --- /dev/null +++ b/abis/GSP.json @@ -0,0 +1,1427 @@ +[ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Burn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "increaseShares", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalShares", + "type": "uint256" + } + ], + "name": "BuyShares", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "assetTo", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "baseAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "quoteAmount", + "type": "uint256" + } + ], + "name": "DODOFlashLoan", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "fromToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "toToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "fromAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "toAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "trader", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "DODOSwap", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "newI", + "type": "uint256" + } + ], + "name": "IChange", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "newK", + "type": "uint256" + } + ], + "name": "KChange", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "newLpFee", + "type": "uint256" + } + ], + "name": "LpFeeRateChange", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Mint", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "newMtFee", + "type": "uint256" + } + ], + "name": "MtFeeRateChange", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "enum PMMPricing.RState", + "name": "newRState", + "type": "uint8" + } + ], + "name": "RChange", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "payer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "decreaseShares", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalShares", + "type": "uint256" + } + ], + "name": "SellShares", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "WithdrawMtFee", + "type": "event" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PERMIT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "_ADMIN_", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "_BASE_PRICE_CUMULATIVE_LAST_", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "_BASE_RESERVE_", + "outputs": [ + { + "internalType": "uint112", + "name": "", + "type": "uint112" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "_BASE_TARGET_", + "outputs": [ + { + "internalType": "uint112", + "name": "", + "type": "uint112" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "_BASE_TOKEN_", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "_BLOCK_TIMESTAMP_LAST_", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "_IS_OPEN_TWAP_", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "_I_", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "_K_", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "_LP_FEE_RATE_", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "_MAINTAINER_", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "_MT_FEE_BASE_", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "_MT_FEE_QUOTE_", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "_MT_FEE_RATE_", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "_MT_FEE_RATE_MODEL_", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "_PRICE_LIMIT_", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "_QUOTE_RESERVE_", + "outputs": [ + { + "internalType": "uint112", + "name": "", + "type": "uint112" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "_QUOTE_TARGET_", + "outputs": [ + { + "internalType": "uint112", + "name": "", + "type": "uint112" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "_QUOTE_TOKEN_", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "_RState_", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_addr", + "type": "address" + } + ], + "name": "addressToShortString", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "k", + "type": "uint256" + } + ], + "name": "adjustK", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "lpFeeRate", + "type": "uint256" + } + ], + "name": "adjustLpFeeRate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "mtFeeRate", + "type": "uint256" + } + ], + "name": "adjustMtFeeRate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "i", + "type": "uint256" + } + ], + "name": "adjustPrice", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "priceLimit", + "type": "uint256" + } + ], + "name": "adjustPriceLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "buildDomainSeparator", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "buyShares", + "outputs": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "baseInput", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "quoteInput", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "correctRState", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "baseAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "quoteAmount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "assetTo", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "flashLoan", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getBaseInput", + "outputs": [ + { + "internalType": "uint256", + "name": "input", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMidPrice", + "outputs": [ + { + "internalType": "uint256", + "name": "midPrice", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMtFeeTotal", + "outputs": [ + { + "internalType": "uint256", + "name": "mtFeeBase", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "mtFeeQuote", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getPMMState", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "i", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "K", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "B", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "Q", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "B0", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "Q0", + "type": "uint256" + }, + { + "internalType": "enum PMMPricing.RState", + "name": "R", + "type": "uint8" + } + ], + "internalType": "struct PMMPricing.PMMState", + "name": "state", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getPMMStateForCall", + "outputs": [ + { + "internalType": "uint256", + "name": "i", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "K", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "B", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "Q", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "B0", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "Q0", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "R", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getQuoteInput", + "outputs": [ + { + "internalType": "uint256", + "name": "input", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getUserFeeRate", + "outputs": [ + { + "internalType": "uint256", + "name": "lpFeeRate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "mtFeeRate", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getVaultReserve", + "outputs": [ + { + "internalType": "uint256", + "name": "baseReserve", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "quoteReserve", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "maintainer", + "type": "address" + }, + { + "internalType": "address", + "name": "admin", + "type": "address" + }, + { + "internalType": "address", + "name": "baseTokenAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "quoteTokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "lpFeeRate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "mtFeeRate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "i", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "k", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "priceLimit", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "isOpenTWAP", + "type": "bool" + } + ], + "name": "init", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "trader", + "type": "address" + }, + { + "internalType": "uint256", + "name": "payBaseAmount", + "type": "uint256" + } + ], + "name": "querySellBase", + "outputs": [ + { + "internalType": "uint256", + "name": "receiveQuoteAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "mtFee", + "type": "uint256" + }, + { + "internalType": "enum PMMPricing.RState", + "name": "newRState", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "newBaseTarget", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "trader", + "type": "address" + }, + { + "internalType": "uint256", + "name": "payQuoteAmount", + "type": "uint256" + } + ], + "name": "querySellQuote", + "outputs": [ + { + "internalType": "uint256", + "name": "receiveBaseAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "mtFee", + "type": "uint256" + }, + { + "internalType": "enum PMMPricing.RState", + "name": "newRState", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "newQuoteTarget", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "sellBase", + "outputs": [ + { + "internalType": "uint256", + "name": "receiveQuoteAmount", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "sellQuote", + "outputs": [ + { + "internalType": "uint256", + "name": "receiveBaseAmount", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "shareAmount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "baseMinAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "quoteMinAmount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "sellShares", + "outputs": [ + { + "internalType": "uint256", + "name": "baseAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "quoteAmount", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "sync", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawMtFeeTotal", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] \ No newline at end of file diff --git a/abis/GSPFactory.json b/abis/GSPFactory.json new file mode 100644 index 0000000..653e783 --- /dev/null +++ b/abis/GSPFactory.json @@ -0,0 +1,469 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "cloneFactory", + "type": "address" + }, + { + "internalType": "address", + "name": "GSPTemplate", + "type": "address" + }, + { + "internalType": "address", + "name": "defaultMaintainer", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "baseToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "quoteToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "creator", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "GSP", + "type": "address" + } + ], + "name": "NewGSP", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferPrepared", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "GSP", + "type": "address" + } + ], + "name": "RemoveGSP", + "type": "event" + }, + { + "inputs": [], + "name": "_CLONE_FACTORY_", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "_DEFAULT_MAINTAINER_", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "_GSP_TEMPLATE_", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "_NEW_OWNER_", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "_OWNER_", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "_REGISTRY_", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "_USER_REGISTRY_", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "creator", + "type": "address" + }, + { + "internalType": "address", + "name": "baseToken", + "type": "address" + }, + { + "internalType": "address", + "name": "quoteToken", + "type": "address" + }, + { + "internalType": "address", + "name": "pool", + "type": "address" + } + ], + "name": "addPoolByAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "claimOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "admin", + "type": "address" + }, + { + "internalType": "address", + "name": "baseToken", + "type": "address" + }, + { + "internalType": "address", + "name": "quoteToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "lpFeeRate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "mtFeeRate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "i", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "k", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "priceLimit", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "isOpenTWAP", + "type": "bool" + } + ], + "name": "createDODOGasSavingPool", + "outputs": [ + { + "internalType": "address", + "name": "newGasSavingPool", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "baseToken", + "type": "address" + }, + { + "internalType": "address", + "name": "quoteToken", + "type": "address" + } + ], + "name": "getDODOPool", + "outputs": [ + { + "internalType": "address[]", + "name": "machines", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token0", + "type": "address" + }, + { + "internalType": "address", + "name": "token1", + "type": "address" + } + ], + "name": "getDODOPoolBidirection", + "outputs": [ + { + "internalType": "address[]", + "name": "baseToken0Machines", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "baseToken1Machines", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getDODOPoolByUser", + "outputs": [ + { + "internalType": "address[]", + "name": "machines", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "initOwner", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "creator", + "type": "address" + }, + { + "internalType": "address", + "name": "baseToken", + "type": "address" + }, + { + "internalType": "address", + "name": "quoteToken", + "type": "address" + }, + { + "internalType": "address", + "name": "pool", + "type": "address" + } + ], + "name": "removePoolByAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newMaintainer", + "type": "address" + } + ], + "name": "updateDefaultMaintainer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newGSPTemplate", + "type": "address" + } + ], + "name": "updateGSPTemplate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] \ No newline at end of file diff --git a/abis/LockedTokenVault.json b/abis/LockedTokenVault.json new file mode 100644 index 0000000..6284d72 --- /dev/null +++ b/abis/LockedTokenVault.json @@ -0,0 +1,446 @@ +[ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "holder", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "origin", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "claimed", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Claim", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferPrepared", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [], + "name": "_CLIFF_RATE_", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "_DISTRIBUTE_FINISHED_", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "_NEW_OWNER_", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "_OWNER_", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "_RELEASE_DURATION_", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "_START_RELEASE_TIME_", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "_TOKEN_", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "_UNDISTRIBUTED_AMOUNT_", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "claim", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "other", + "type": "address" + } + ], + "name": "claimFor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "claimOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "finishDistribute", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "holder", + "type": "address" + } + ], + "name": "getClaimableBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "holder", + "type": "address" + } + ], + "name": "getClaimedBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "holder", + "type": "address" + } + ], + "name": "getOriginBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "holder", + "type": "address" + } + ], + "name": "getRemainingBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "getRemainingRatio", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "holderList", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "amountList", + "type": "uint256[]" + } + ], + "name": "grant", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_owner", + "type": "address" + }, + { + "internalType": "address", + "name": "_token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_startReleaseTime", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_releaseDuration", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_cliffRate", + "type": "uint256" + } + ], + "name": "init", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "initOwner", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isReleaseStart", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "holder", + "type": "address" + } + ], + "name": "recall", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "transferLockedToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] \ No newline at end of file diff --git a/abis/LockedTokenVaultFactory.json b/abis/LockedTokenVaultFactory.json new file mode 100644 index 0000000..5fbb32a --- /dev/null +++ b/abis/LockedTokenVaultFactory.json @@ -0,0 +1,188 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "cloneFactory", + "type": "address" + }, + { + "internalType": "address", + "name": "vaultTemplate", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "vault", + "type": "address" + } + ], + "name": "CreateVault", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferPrepared", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [], + "name": "_CLONE_FACTORY_", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "_NEW_OWNER_", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "_OWNER_", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "_VAULT_TEMPLATE_", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "claimOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_startReleaseTime", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_releaseDuration", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_cliffRate", + "type": "uint256" + } + ], + "name": "createVault", + "outputs": [ + { + "internalType": "address", + "name": "vault", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "template", + "type": "address" + } + ], + "name": "setTemplate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] \ No newline at end of file diff --git a/bin/config.js b/bin/config.js index 5176b49..1443966 100644 --- a/bin/config.js +++ b/bin/config.js @@ -27,9 +27,22 @@ const chains = [ "manta", "mantle", "tokb", + "dodochain-testnet", + "bitlayer", + "zircuit-testnet", + "arb-sep", + "zircuit", + "sepolia", + "okb", ]; const supportAlphaChains = ["arbitrum", "polygon", "mainnet"]; -const supportStudioChains = ["arbitrum", "polygon", "mainnet"]; +const supportStudioChains = [ + "arbitrum", + "polygon", + "mainnet", + "arb-sep", + "sepolia", +]; module.exports = { studioNodeUrl, theGraphNodeUrl, diff --git a/bin/index-cmd.js b/bin/index-cmd.js index 8e08440..55ae79a 100644 --- a/bin/index-cmd.js +++ b/bin/index-cmd.js @@ -39,7 +39,7 @@ function createConfig() { } function createDeployDodoexConfig() { const getCodegenCmd = (name) => { - return `graph codegen subgraphs/dodoex/dodoex_${name}.yaml --output-dir ./src/types/dodoex/ `; + return `./node_modules/.bin/graph codegen subgraphs/dodoex/dodoex_${name}.yaml --output-dir ./src/types/dodoex/ `; }; const deployDodoex = {}; for (const chain of chains) { @@ -47,52 +47,52 @@ function createDeployDodoexConfig() { chain )} && ${getCodegenCmd( chain - )} && graph deploy --ipfs ${theGraphIpfsUrl} --node ${theGraphNodeUrl} dodoex/dodoex-v2-${chain} subgraphs/dodoex/dodoex_${chain}.yaml`; + )} && ./node_modules/.bin/graph deploy --ipfs ${theGraphIpfsUrl} --node ${theGraphNodeUrl} dodoex/dodoex-v2-${chain} subgraphs/dodoex/dodoex_${chain}.yaml`; deployDodoex[`deploy:local:dodoex_${chain}`] = `${getCpCmd( chain )} && ${getCodegenCmd( chain - )} && graph deploy --ipfs ${localIpfsUrl} --node ${localNodeUrl} dodoex/dodoex-v2-${chain} subgraphs/dodoex/dodoex_${chain}.yaml`; + )} && ./node_modules/.bin/graph deploy --ipfs ${localIpfsUrl} --node ${localNodeUrl} dodoex/dodoex-v2-${chain} subgraphs/dodoex/dodoex_${chain}.yaml`; } for (const chain of supportAlphaChains) { deployDodoex[`deploy:dodoex_${chain}_alpha`] = `${getCpCmd( chain )} && ${getCodegenCmd( chain - )} && graph deploy --ipfs ${theGraphIpfsUrl} --node ${theGraphNodeUrl} dodoex/dodoex-v2-${chain}-alpha subgraphs/dodoex/dodoex_${chain}-graft.yaml`; + )} && ./node_modules/.bin/graph deploy --ipfs ${theGraphIpfsUrl} --node ${theGraphNodeUrl} dodoex/dodoex-v2-${chain}-alpha subgraphs/dodoex/dodoex_${chain}-graft.yaml`; } for (const chain of supportStudioChains) { deployDodoex[`deploy:studio:dodoex_${chain}`] = `${getCpCmd( chain )} && ${getCodegenCmd( chain - )} && graph deploy --node ${studioNodeUrl} dodoex_v2_${chain} subgraphs/dodoex/dodoex_${chain}.yaml`; + )} && ./node_modules/.bin/graph deploy --node ${studioNodeUrl} dodoex_v2_${chain} subgraphs/dodoex/dodoex_${chain}.yaml`; } deployDodoex["deploy:dodoex_okchain"] = `${getCpCmd( "okchain" )} && ${getCodegenCmd( "okchain" - )} && graph deploy --ipfs https://ipfs.kkt.one --node https://graph.kkt.one/node/ dodoex/dodoex-v2-okchain subgraphs/dodoex/dodoex_okchain.yaml --access-token `; + )} && ./node_modules/.bin/graph deploy --ipfs https://ipfs.kkt.one --node https://graph.kkt.one/node/ dodoex/dodoex-v2-okchain subgraphs/dodoex/dodoex_okchain.yaml --access-token `; return deployDodoex; } function createDeployConfig(key, subgraphName, path, typePath) { const getCodegenCmd = (name) => { - return `graph codegen ${path}_${name}.yaml --output-dir ./src/types/${typePath || + return `./node_modules/.bin/graph codegen ${path}_${name}.yaml --output-dir ./src/types/${typePath || key}/ `; }; const deployConfig = {}; for (const chain of chains) { deployConfig[`deploy:${key}_${chain}`] = `${getCodegenCmd( chain - )} && graph deploy --ipfs ${theGraphIpfsUrl} --node ${theGraphNodeUrl} dodoex/${subgraphName}-${chain} ${path}_${chain}.yaml`; + )} && ./node_modules/.bin/graph deploy --ipfs ${theGraphIpfsUrl} --node ${theGraphNodeUrl} dodoex/${subgraphName}-${chain} ${path}_${chain}.yaml`; deployConfig[`deploy:local:${key}_${chain}`] = `${getCodegenCmd( chain - )} && graph deploy --ipfs ${localIpfsUrl} --node ${localNodeUrl} dodoex/${subgraphName}-${chain} ${path}_${chain}.yaml`; + )} && ./node_modules/.bin/graph deploy --ipfs ${localIpfsUrl} --node ${localNodeUrl} dodoex/${subgraphName}-${chain} ${path}_${chain}.yaml`; } for (const chain of supportStudioChains) { deployConfig[`deploy:studio:${key}_${chain}`] = `${getCodegenCmd( chain - )} && graph deploy --node ${studioNodeUrl} ${subgraphName}-${chain} ${path}_${chain}.yaml`; + )} && ./node_modules/.bin/graph deploy --node ${studioNodeUrl} ${subgraphName}-${chain} ${path}_${chain}.yaml`; } return deployConfig; } @@ -383,6 +383,8 @@ function getDefaultConfig() { "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", + "deploy:studio:dpoint_scroll": + "graph codegen subgraphs/dpoint/dpoint_scroll.yaml --output-dir ./src/types/dpoint/ && graph deploy --studio --node https://api.studio.thegraph.com/deploy/ dodoex_dpoint_scroll subgraphs/dpoint/dpoint_scroll.yaml", }; return config2; } diff --git a/build/DODOMine/DODOMine.wasm b/build/DODOMine/DODOMine.wasm index 2cfac9e..53a7d0a 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 4fb9f68..5cdedda 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 2f37c33..83cccaa 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 f9cacf3..082f91c 100644 --- a/build/subgraph.yaml +++ b/build/subgraph.yaml @@ -1,39 +1,830 @@ -specVersion: 0.0.6 +specVersion: 0.0.4 description: Dodoex.io +graft: + base: QmbhmHajvCeLUhwWsy7rcJZcCb7zWmHazYeor5Z3G5UjD6 + block: 248209289 +features: + - grafting repository: https://github.com/DODOEX/dodoex_v2_subgraph schema: - file: token.graphql + file: dodoex.graphql dataSources: - kind: ethereum/contract - name: ERC20V3Factory - network: tokb + name: DODOFeeRouteProxy + network: arbitrum-one source: - address: "0x4A81Aa47722E1cF27A8726F247E68a766bE58d8e" - abi: ERC20V3Factory - startBlock: 299037 + address: "0xe05dd51e4eb5636f4f0e8e7fbe82ea31a2ecef16" + abi: DODOFeeRouteProxy + startBlock: 45989363 mapping: kind: ethereum/events apiVersion: 0.0.6 language: wasm/assemblyscript - file: ERC20V3Factory/ERC20V3Factory.wasm + file: DODOFeeRouteProxy/DODOFeeRouteProxy.wasm + 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: arbitrum-one + source: + address: "0xc4A1a152812dE96b2B1861E433f42290CDD7f113" + abi: DODOFeeRouteProxy + startBlock: 45989363 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: DODOFeeRouteProxy/DODOFeeRouteProxy.wasm + 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 + source: + address: "0x88CBf433471A0CD8240D2a12354362988b4593E5" + abi: DODOV2Proxy02 + startBlock: 226001 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: DODOFeeRouteProxy/DODOFeeRouteProxy.wasm + 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: arbitrum-one + source: + address: "0xDa4c4411c55B0785e501332354A036c04833B72b" + abi: DVMFactory + startBlock: 226001 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: DVMFactory/DVMFactory.wasm + 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: arbitrum-one + source: + address: "0xDdB13e6dd168E1a68DC2285Cb212078ae10394A9" + abi: DPPFactory + startBlock: 226002 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: DVMFactory/DVMFactory.wasm + 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: DPPFactory_21_10_13 + network: arbitrum-one + source: + address: "0xa6cf3d163358af376ec5e8b7cc5e102a05fde63d" + abi: DPPFactory + startBlock: 2112221 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: DVMFactory/DVMFactory.wasm + 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: arbitrum-one + source: + address: "0xC8fE2440744dcd733246a4dB14093664DEFD5A53" + abi: DSPFactory + startBlock: 226003 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: DVMFactory/DVMFactory.wasm + 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: GSPFactory + network: arbitrum-one + source: + address: "0x46E55A974c5995675b025f7F607C3278B36f0c29" + abi: GSPFactory + startBlock: 248209288 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: DVMFactory/DVMFactory.wasm + entities: + - Pair + - Token + abis: + - name: GSPFactory + file: ../abis/GSPFactory.json + - name: ERC20 + file: ../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../abis/ERC20NameBytes.json + - name: GSP + file: ../abis/GSP.json + - name: FeeRateModel + file: ../abis/FeeRateModel.json + eventHandlers: + - event: NewGSP(address,address,address,address) + handler: handleNewGSP + - event: RemoveGSP(address) + handler: handleRemoveGSP + - kind: ethereum/contract + name: CrowdPoolingFactory + network: arbitrum-one + source: + address: "0x6E5f239f729c83E976a7A280F81Dd1685dd89218" + abi: CrowdPoolingFactory + startBlock: 226004 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: DVMFactory/DVMFactory.wasm + 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: arbitrum-one + source: + address: "0x9a8c0e8b27fff5d00402733ca67432b6d64faff4" + abi: CrowdPoolingFactory + startBlock: 4407201 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: DVMFactory/DVMFactory.wasm + 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: arbitrum-one + source: + address: "0xE92787F457F541a9D5Ae17C1dbdBffA8D3BA3C25" + abi: UpCrowdPoolingFactory + startBlock: 226005 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: DVMFactory/DVMFactory.wasm + 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: arbitrum-one + source: + address: "0xBcC3401E16C25EaF4d3FeD632ce3288503883B1f" + abi: DODOZoo + startBlock: 226006 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: DODOZoo/DODOZoo.wasm + 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: arbitrum-one + source: + address: "0xe3c10989ddc5df5b1b9c0e6229c2e4e0862fde3e" + abi: DODOMine + startBlock: 226006 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: DODOMine/DODOMine.wasm 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 + - kind: ethereum/contract + name: DODORouteProxy + network: arbitrum-one + source: + address: "0x3b6067d4caa8a14c63fdbe6318f27a0bbc9f9237" + abi: DODORouteProxy + startBlock: 226006 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: DODOFeeRouteProxy/DODOFeeRouteProxy.wasm + 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 + network: arbitrum-one + source: + abi: DVM + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: templates/DVM/DVM.wasm + 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 + - name: ERC20 + file: ../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../abis/ERC20NameBytes.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: arbitrum-one + source: + abi: DPP + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: templates/DVM/DVM.wasm + 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: arbitrum-one + source: + abi: DPPOracleAdmin + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: templates/DVM/DVM.wasm + 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: arbitrum-one + source: + abi: DSP + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: templates/DVM/DVM.wasm + 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 + - name: ERC20 + file: ../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../abis/ERC20NameBytes.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: GSP + network: arbitrum-one + source: + abi: GSP + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: templates/DVM/DVM.wasm + entities: + - Pair + - Token + - DODOSwap + abis: + - name: DVMFactory + file: ../abis/DVMFactory.json + - name: DPPFactory + file: ../abis/DPPFactory.json + - name: DSPFactory + file: ../abis/DSPFactory.json + - name: GSPFactory + file: ../abis/GSPFactory.json + - name: DVM + file: ../abis/DVM.json + - name: DPP + file: ../abis/DPP.json + - name: DSP + file: ../abis/DSP.json + - name: GSP + file: ../abis/GSP.json + - name: FeeRateModel + file: ../abis/FeeRateModel.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: 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 + - event: IChange(uint256) + handler: handleIChange + - event: KChange(uint256) + handler: handleKChange + - event: LpFeeRateChange(uint256) + handler: handleLpFeeRateChange + - event: MtFeeRateChange(uint256) + handler: handleMtFeeRateChange + - event: RChange(uint8) + handler: handleRChange + - kind: ethereum/contract + name: CP + network: arbitrum-one + source: + abi: CP + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: templates/CP/CP.wasm + 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: arbitrum-one + source: + abi: DODO + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: DODOZoo/DODOZoo.wasm + 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: arbitrum-one + source: + abi: DODOLpToken + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: templates/DODOLpToken/DODOLpToken.wasm + 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: arbitrum-one + source: + abi: CPV2 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: templates/CP/CP.wasm + entities: + - CrowdPooling - Token - - UserTokenBlance - - TransferHistories abis: - - name: ERC20Factory - file: ../abis/ERC20Factory.json - - name: ERC20V2Factory - file: ../abis/ERC20V2Factory.json - - name: ERC20V3Factory - file: ../abis/ERC20V3Factory.json + - 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: NewERC20(address,address,uint256) - handler: handleNewERC20 + - event: Bid(address,uint256,uint256) + handler: handleBid + - event: Cancel(address,uint256) + handler: handleCancel + - event: Settle() + handler: handleSettle diff --git a/build/templates/CP/CP.wasm b/build/templates/CP/CP.wasm index dcac0be..3739176 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 4ed4292..1a85f9f 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 a1ea1b9..ee51626 100644 Binary files a/build/templates/DVM/DVM.wasm and b/build/templates/DVM/DVM.wasm differ diff --git a/package.json b/package.json index 42dd86b..71eae1f 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "index": "bin/index.js" }, "dependencies": { - "@graphprotocol/graph-cli": "0.53.0", + "@graphprotocol/graph-cli": "0.78.0", "@graphprotocol/graph-ts": "0.29.3", "source-map-support": "^0.5.21" }, diff --git a/src/mappings/constant-arb-sep.ts b/src/mappings/constant-arb-sep.ts new file mode 100644 index 0000000..e77a9e8 --- /dev/null +++ b/src/mappings/constant-arb-sep.ts @@ -0,0 +1,50 @@ +//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_GSP_POOL = "GSP"; +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-arb-sep"; +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[] = [ + "0x9c2006A5179ee13A90fE4894e75464a3D91Beb70", +]; +export const DVM_FACTORY_ADDRESS = "0xDF44F395F85D298C7fAD8Bfc71De5dFF9a129d36"; +export const DPP_FACTORY_ADDRESS = "0xed44c4073Dc5e5572670aDAC25EB5B46bAdc178F"; +export const CLASSIC_FACTORY_ADDRESS = + "0x82d5730AB72a5e0ec6E85107418ECe79f4455dBa"; +export const CROWDPOOLING_FACTORY_V2: string[] = [ + "0x82d5730AB72a5e0ec6E85107418ECe79f4455dBa", +]; + +export const DVM_FACTORY_DEPLOY_BLOCK = 58; +export const DPP_FACTORY_DEPLOY_BLOCK = 58; + +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 = "0x3a64Ec3606FF7310E8fAd6FcC008e39705fB496d"; +//pricing supported stable coins +export const STABLE_ONE_ADDRESS = "0xb95ed7e958e196688984951f41ac2888f4b10ab9"; //usdt +export const STABLE_TWO_ADDRESS = "0x46afe01d758a46d64c7d8e0791314d5db3e2e683"; //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-arbitrum.ts b/src/mappings/constant-arbitrum.ts index 8503745..6936ef6 100644 --- a/src/mappings/constant-arbitrum.ts +++ b/src/mappings/constant-arbitrum.ts @@ -3,6 +3,7 @@ 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_GSP_POOL = "GSP"; export const TYPE_CLASSICAL_POOL = "CLASSICAL"; export const SOURCE_SMART_ROUTE = "SMART_ROUTE"; export const SOURCE_POOL_SWAP = "DODO_POOL"; @@ -13,31 +14,36 @@ export const DODOZooID = "dodoex-v2-arbitrum"; export const CHAIN_BASE_COIN_SYMBOL = "ETH"; export const CHAIN_BASE_COIN_NAME = "ether"; -export const SMART_ROUTE_ADDRESSES: string[] = ["0x45894c062e6f4e58b257e0826675355305dfef0d"]; +export const SMART_ROUTE_ADDRESSES: string[] = [ + "0x45894c062e6f4e58b257e0826675355305dfef0d", +]; export const DVM_FACTORY_ADDRESS = "0xbab9f4ff4a19a0e8eebc56b06750253228ffac6e"; export const DPP_FACTORY_ADDRESS = "0xe55154d09265b18ac7cdac6e646672a5460389a1"; -export const CLASSIC_FACTORY_ADDRESS = "0x357c5e9cfa8b834edcef7c7aabd8f9db09119d11";//dodo zoo +export const CLASSIC_FACTORY_ADDRESS = + "0x357c5e9cfa8b834edcef7c7aabd8f9db09119d11"; //dodo zoo -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 = '0x82af49447d8a07e3bd95bd0d56f35241523fbab1'; +export const WRAPPED_BASE_COIN = "0x82af49447d8a07e3bd95bd0d56f35241523fbab1"; //pricing supported stable coins -export const STABLE_ONE_ADDRESS = '0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9';//usdt -export const STABLE_TWO_ADDRESS = '0xff970a61a04b1ca14834a43f5de4533ebddb5cc8';//usdc +export const STABLE_ONE_ADDRESS = "0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9"; //usdt +export const STABLE_TWO_ADDRESS = "0xff970a61a04b1ca14834a43f5de4533ebddb5cc8"; //usdc //stable coins pairs -export const STABLE_COIN_PAIR_ONE = '0xe4b2dfc82977dd2dce7e8d37895a6a8f50cbb4fb';//[USDT_USDC_PAIR] +export const STABLE_COIN_PAIR_ONE = + "0xe4b2dfc82977dd2dce7e8d37895a6a8f50cbb4fb"; //[USDT_USDC_PAIR] //base currency pair -export const BASE_COIN_PAIR = '0xfe176a2b1e1f67250d2903b8d25f56c0dabcd6b2';//[WETH_USDC_PAIR] -export const CROWDPOOLING_FACTORY_V2: string[]=["0x9a8c0e8b27fff5d00402733ca67432b6d64faff4"]; - +export const BASE_COIN_PAIR = "0xfe176a2b1e1f67250d2903b8d25f56c0dabcd6b2"; //[WETH_USDC_PAIR] +export const CROWDPOOLING_FACTORY_V2: string[] = [ + "0x9a8c0e8b27fff5d00402733ca67432b6d64faff4", +]; diff --git a/src/mappings/constant-aurora.ts b/src/mappings/constant-aurora.ts index 6376654..12f1ac6 100644 --- a/src/mappings/constant-aurora.ts +++ b/src/mappings/constant-aurora.ts @@ -3,6 +3,7 @@ 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_GSP_POOL = "GSP"; export const TYPE_CLASSICAL_POOL = "CLASSICAL"; export const SOURCE_SMART_ROUTE = "SMART_ROUTE"; export const SOURCE_POOL_SWAP = "DODO_POOL"; @@ -13,31 +14,36 @@ export const DODOZooID = "dodoex-v2-aurora"; export const CHAIN_BASE_COIN_SYMBOL = "ETH"; export const CHAIN_BASE_COIN_NAME = "ether"; -export const SMART_ROUTE_ADDRESSES: string[] = ["0xd9dec7c3c06e62a4c1beeb07cadf568f496b14c2"]; +export const SMART_ROUTE_ADDRESSES: string[] = [ + "0xd9dec7c3c06e62a4c1beeb07cadf568f496b14c2", +]; export const DVM_FACTORY_ADDRESS = "0x5515363c0412add5c72d3e302fe1bd7dcbcf93fe"; export const DPP_FACTORY_ADDRESS = "0x40672211d4310ad71dadc8cde7aa3fb90d420855"; -export const CLASSIC_FACTORY_ADDRESS = "0x357c5e9cfa8b834edcef7c7aabd8f9db09119d11";//dodo zoo -export const CROWDPOOLING_FACTORY_V2: string[]=["0xaf49dbaaf177bee57f84731260a9eb8819d25eff"]; +export const CLASSIC_FACTORY_ADDRESS = + "0x357c5e9cfa8b834edcef7c7aabd8f9db09119d11"; //dodo zoo +export const CROWDPOOLING_FACTORY_V2: string[] = [ + "0xaf49dbaaf177bee57f84731260a9eb8819d25eff", +]; -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 = '0xc9bdeed33cd01541e1eed10f90519d2c06fe3feb'; +export const WRAPPED_BASE_COIN = "0xc9bdeed33cd01541e1eed10f90519d2c06fe3feb"; //pricing supported stable coins -export const STABLE_ONE_ADDRESS = '0x4988a896b1227218e4a686fde5eabdcabd91571f';//usdt -export const STABLE_TWO_ADDRESS = '0xb12bfca5a55806aaf64e99521918a4bf0fc40802';//usdc +export const STABLE_ONE_ADDRESS = "0x4988a896b1227218e4a686fde5eabdcabd91571f"; //usdt +export const STABLE_TWO_ADDRESS = "0xb12bfca5a55806aaf64e99521918a4bf0fc40802"; //usdc //stable coins pairs -export const STABLE_COIN_PAIR_ONE = '0xe4b2dfc82977dd2dce7e8d37895a6a8f50cbb4fb';//[USDT_USDC_PAIR] todo +export const STABLE_COIN_PAIR_ONE = + "0xe4b2dfc82977dd2dce7e8d37895a6a8f50cbb4fb"; //[USDT_USDC_PAIR] todo //base currency pair -export const BASE_COIN_PAIR = '0xfe176a2b1e1f67250d2903b8d25f56c0dabcd6b2';//[WETH_USDC_PAIR] todo - +export const BASE_COIN_PAIR = "0xfe176a2b1e1f67250d2903b8d25f56c0dabcd6b2"; //[WETH_USDC_PAIR] todo diff --git a/src/mappings/constant-avax.ts b/src/mappings/constant-avax.ts index f63f0bb..d82365a 100644 --- a/src/mappings/constant-avax.ts +++ b/src/mappings/constant-avax.ts @@ -3,6 +3,7 @@ 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_GSP_POOL = "GSP"; export const TYPE_CLASSICAL_POOL = "CLASSICAL"; export const SOURCE_SMART_ROUTE = "SMART_ROUTE"; export const SOURCE_POOL_SWAP = "DODO_POOL"; @@ -13,31 +14,36 @@ export const DODOZooID = "dodoex-v2-avax"; export const CHAIN_BASE_COIN_SYMBOL = "AVAX"; export const CHAIN_BASE_COIN_NAME = "avax"; -export const SMART_ROUTE_ADDRESSES: string[] = ["0x2cd18557e14af72daa8090bcaa95b231ffc9ea26"]; +export const SMART_ROUTE_ADDRESSES: string[] = [ + "0x2cd18557e14af72daa8090bcaa95b231ffc9ea26", +]; export const DVM_FACTORY_ADDRESS = "0xff133a6d335b50bdaa6612d19e1352b049a8ae6a"; export const DPP_FACTORY_ADDRESS = "0xb7865a5cee051d35b09a48b624d7057d3362655a"; -export const CLASSIC_FACTORY_ADDRESS = "0x8ab2d334ce64b50be9ab04184f7ccba2a6bb6391";//dodo zoo -export const CROWDPOOLING_FACTORY_V2: string[]=["0xc1ba6bd60c6790b751ec2d90288b6cbf87d4f032"]; +export const CLASSIC_FACTORY_ADDRESS = + "0x8ab2d334ce64b50be9ab04184f7ccba2a6bb6391"; //dodo zoo +export const CROWDPOOLING_FACTORY_V2: string[] = [ + "0xc1ba6bd60c6790b751ec2d90288b6cbf87d4f032", +]; -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 = '0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7'; +export const WRAPPED_BASE_COIN = "0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7"; //pricing supported stable coins -export const STABLE_ONE_ADDRESS = '0xc7198437980c041c805a1edcba50c1ce5db95118';//usdt -export const STABLE_TWO_ADDRESS = '0xa7d7079b0fead91f3e65f86e8915cb59c1a4c664';//usdc +export const STABLE_ONE_ADDRESS = "0xc7198437980c041c805a1edcba50c1ce5db95118"; //usdt +export const STABLE_TWO_ADDRESS = "0xa7d7079b0fead91f3e65f86e8915cb59c1a4c664"; //usdc //stable coins pairs -export const STABLE_COIN_PAIR_ONE = '0xe4b2dfc82977dd2dce7e8d37895a6a8f50cbb4fb';//[USDT_USDC_PAIR] todo +export const STABLE_COIN_PAIR_ONE = + "0xe4b2dfc82977dd2dce7e8d37895a6a8f50cbb4fb"; //[USDT_USDC_PAIR] todo //base currency pair -export const BASE_COIN_PAIR = '0xfe176a2b1e1f67250d2903b8d25f56c0dabcd6b2';//[WETH_USDC_PAIR] todo - +export const BASE_COIN_PAIR = "0xfe176a2b1e1f67250d2903b8d25f56c0dabcd6b2"; //[WETH_USDC_PAIR] todo diff --git a/src/mappings/constant-base-mainnet.ts b/src/mappings/constant-base-mainnet.ts index 994d726..80a9131 100644 --- a/src/mappings/constant-base-mainnet.ts +++ b/src/mappings/constant-base-mainnet.ts @@ -3,6 +3,7 @@ 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_GSP_POOL = "GSP"; export const TYPE_CLASSICAL_POOL = "CLASSICAL"; export const SOURCE_SMART_ROUTE = "SMART_ROUTE"; export const SOURCE_POOL_SWAP = "DODO_POOL"; diff --git a/src/mappings/constant-basegor.ts b/src/mappings/constant-basegor.ts index 16ea5a9..aa30f34 100644 --- a/src/mappings/constant-basegor.ts +++ b/src/mappings/constant-basegor.ts @@ -3,6 +3,7 @@ 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_GSP_POOL = "GSP"; export const TYPE_CLASSICAL_POOL = "CLASSICAL"; export const SOURCE_SMART_ROUTE = "SMART_ROUTE"; export const SOURCE_POOL_SWAP = "DODO_POOL"; diff --git a/src/mappings/constant-bitlayer.ts b/src/mappings/constant-bitlayer.ts new file mode 100644 index 0000000..e8292aa --- /dev/null +++ b/src/mappings/constant-bitlayer.ts @@ -0,0 +1,50 @@ +//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_GSP_POOL = "GSP"; +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-bitlayer"; +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[] = [ + "0x3b0c6c0CE667844e742Ce0Ca533EaA2b6f422AA8", +]; +export const DVM_FACTORY_ADDRESS = "0x7Ad992fcebd899ddbEF7f031dCF96f382b81ECea"; +export const DPP_FACTORY_ADDRESS = "0x4c3c61cba411C9B60DC371b031262c730D3Da6a3"; +export const CLASSIC_FACTORY_ADDRESS = + "0xB3d4823e02A9AB9A9A0Cc1636E776c360B67bED1"; +export const CROWDPOOLING_FACTORY_V2: string[] = [ + "0xB3d4823e02A9AB9A9A0Cc1636E776c360B67bED1", +]; + +export const DVM_FACTORY_DEPLOY_BLOCK = 58; +export const DPP_FACTORY_DEPLOY_BLOCK = 58; + +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 = "0x3a64Ec3606FF7310E8fAd6FcC008e39705fB496d"; +//pricing supported stable coins +export const STABLE_ONE_ADDRESS = "0xb95ed7e958e196688984951f41ac2888f4b10ab9"; //usdt +export const STABLE_TWO_ADDRESS = "0x46afe01d758a46d64c7d8e0791314d5db3e2e683"; //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-boba.ts b/src/mappings/constant-boba.ts index 69b776c..dfdd0a8 100644 --- a/src/mappings/constant-boba.ts +++ b/src/mappings/constant-boba.ts @@ -3,6 +3,7 @@ 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_GSP_POOL = "GSP"; export const TYPE_CLASSICAL_POOL = "CLASSICAL"; export const SOURCE_SMART_ROUTE = "SMART_ROUTE"; export const SOURCE_POOL_SWAP = "DODO_POOL"; @@ -13,31 +14,36 @@ export const DODOZooID = "dodoex-v2-boba"; export const CHAIN_BASE_COIN_SYMBOL = "ETH"; export const CHAIN_BASE_COIN_NAME = "ether"; -export const SMART_ROUTE_ADDRESSES: string[] = ["0x55793c2c8a796cce00ef2d1a86cca2e0399bf285"]; +export const SMART_ROUTE_ADDRESSES: string[] = [ + "0x55793c2c8a796cce00ef2d1a86cca2e0399bf285", +]; export const DVM_FACTORY_ADDRESS = "0x2f2f9460500f27db68aafbfa0472ceddb168a5a6"; export const DPP_FACTORY_ADDRESS = "0x3a60a76acae8feec74d6b5b665d4dbaab2abc406"; -export const CLASSIC_FACTORY_ADDRESS = "0x357c5e9cfa8b834edcef7c7aabd8f9db09119d11";//dodo zoo -export const CROWDPOOLING_FACTORY_V2: string[]=["0x392b2ae9ab6161591582c4724ca9a89c0cc1cab6"]; +export const CLASSIC_FACTORY_ADDRESS = + "0x357c5e9cfa8b834edcef7c7aabd8f9db09119d11"; //dodo zoo +export const CROWDPOOLING_FACTORY_V2: string[] = [ + "0x392b2ae9ab6161591582c4724ca9a89c0cc1cab6", +]; -export const ADDRESS_ZERO = '0x0000000000000000000000000000000000000000' -export const BASE_COIN = '0x4200000000000000000000000000000000000006'; +export const ADDRESS_ZERO = "0x0000000000000000000000000000000000000000"; +export const BASE_COIN = "0x4200000000000000000000000000000000000006"; -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 = '0xdeaddeaddeaddeaddeaddeaddeaddeaddead0000'; +export const WRAPPED_BASE_COIN = "0xdeaddeaddeaddeaddeaddeaddeaddeaddead0000"; //pricing supported stable coins -export const STABLE_ONE_ADDRESS = '0x5de1677344d3cb0d7d465c10b72a8f60699c062d';//usdt -export const STABLE_TWO_ADDRESS = '0x66a2a913e447d6b4bf33efbec43aaef87890fbbc';//usdc +export const STABLE_ONE_ADDRESS = "0x5de1677344d3cb0d7d465c10b72a8f60699c062d"; //usdt +export const STABLE_TWO_ADDRESS = "0x66a2a913e447d6b4bf33efbec43aaef87890fbbc"; //usdc //stable coins pairs -export const STABLE_COIN_PAIR_ONE = '0xe4b2dfc82977dd2dce7e8d37895a6a8f50cbb4fb';//[USDT_USDC_PAIR] todo +export const STABLE_COIN_PAIR_ONE = + "0xe4b2dfc82977dd2dce7e8d37895a6a8f50cbb4fb"; //[USDT_USDC_PAIR] todo //base currency pair -export const BASE_COIN_PAIR = '0xfe176a2b1e1f67250d2903b8d25f56c0dabcd6b2';//[WETH_USDC_PAIR] todo - +export const BASE_COIN_PAIR = "0xfe176a2b1e1f67250d2903b8d25f56c0dabcd6b2"; //[WETH_USDC_PAIR] todo diff --git a/src/mappings/constant-bsc.ts b/src/mappings/constant-bsc.ts index b01908f..a9deae9 100644 --- a/src/mappings/constant-bsc.ts +++ b/src/mappings/constant-bsc.ts @@ -3,47 +3,53 @@ 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_GSP_POOL = "GSP"; 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 DODOV2Proxy01 = "0xb57dd5c265dbb13ca014f2332069e90cd0e22e65"; +export const DODOV2Proxy02_2021_02_17 = + "0xd56281ef996b6b29874c77d2e1464216e8043127"; +export const DODOV2Proxy02 = "0xd56281ef996b6b29874c77d2e1464216e8043127"; export const DIP3_TIMESTAMP = 1624442400; export const DODOZooID = "dodoex-v2-bsc"; export const CHAIN_BASE_COIN_SYMBOL = "BNB"; export const CHAIN_BASE_COIN_NAME = "Bnb"; -export const SMART_ROUTE_ADDRESSES: string[]= ["0xb57dd5c265dbb13ca014f2332069e90cd0e22e65","0xd56281ef996b6b29874c77d2e1464216e8043127","0x8f8dd7db1bda5ed3da8c9daf3bfa471c12d58486","0xbe9a66e49503e84ae59a4d0545365AABedf33b40"]; +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 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 CLASSIC_FACTORY_ADDRESS = + "0xca459456a45e300aa7ef447dbb60f87cccb42828"; //dodo zoo +export const CROWDPOOLING_FACTORY_V2: string[] = [ + "0x9c9ef6820a1aa0e25770ccde4e974f81cb28debc", +]; + +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 = '0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c'; +export const WRAPPED_BASE_COIN = "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c"; //pricing supported stable coins -export const STABLE_ONE_ADDRESS = '0x55d398326f99059ff775485246999027b3197955';//usdt -export const STABLE_TWO_ADDRESS = '0xe9e7cea3dedca5984780bafc599bd69add087d56';//busd +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] +export const STABLE_COIN_PAIR_ONE = + "0xbe60d4c4250438344bec816ec2dec99925deb4c7"; //[USDT_BUSD_PAIR] //base currency pair -export const BASE_COIN_PAIR = '0x327134de48fcdd75320f4c32498d1980470249ae';//[WBNB_BUSD_PAIR] - - - - +export const BASE_COIN_PAIR = "0x327134de48fcdd75320f4c32498d1980470249ae"; //[WBNB_BUSD_PAIR] diff --git a/src/mappings/constant-cfx.ts b/src/mappings/constant-cfx.ts index f1497ba..c113947 100644 --- a/src/mappings/constant-cfx.ts +++ b/src/mappings/constant-cfx.ts @@ -3,6 +3,7 @@ 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_GSP_POOL = "GSP"; export const TYPE_CLASSICAL_POOL = "CLASSICAL"; export const SOURCE_SMART_ROUTE = "SMART_ROUTE"; export const SOURCE_POOL_SWAP = "DODO_POOL"; diff --git a/src/mappings/constant-cronos.ts b/src/mappings/constant-cronos.ts index 218019d..6a2f724 100644 --- a/src/mappings/constant-cronos.ts +++ b/src/mappings/constant-cronos.ts @@ -3,6 +3,7 @@ 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_GSP_POOL = "GSP"; export const TYPE_CLASSICAL_POOL = "CLASSICAL"; export const SOURCE_SMART_ROUTE = "SMART_ROUTE"; export const SOURCE_POOL_SWAP = "DODO_POOL"; @@ -13,31 +14,36 @@ export const DODOZooID = "dodoex-v2-cronos"; export const CHAIN_BASE_COIN_SYMBOL = "CRO"; export const CHAIN_BASE_COIN_NAME = "cro"; -export const SMART_ROUTE_ADDRESSES: string[] = ["0xddb86ff3984b213bfc951e16b829abb64a3c20c0"]; +export const SMART_ROUTE_ADDRESSES: string[] = [ + "0xddb86ff3984b213bfc951e16b829abb64a3c20c0", +]; export const DVM_FACTORY_ADDRESS = "0x3d5acf003dc729f0cdf8263733c1329a59967458"; export const DPP_FACTORY_ADDRESS = "0x41cc4b7f7c915183149834e7d56fdb57dc096980"; -export const CLASSIC_FACTORY_ADDRESS = "0xe78ec2626f59686254852c135d9428157fb2fb39";//dodo zoo +export const CLASSIC_FACTORY_ADDRESS = + "0xe78ec2626f59686254852c135d9428157fb2fb39"; //dodo zoo -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 = '0x5c7f8a570d578ed84e63fdfa7b1ee72deae1ae23'; +export const WRAPPED_BASE_COIN = "0x5c7f8a570d578ed84e63fdfa7b1ee72deae1ae23"; //pricing supported stable coins -export const STABLE_ONE_ADDRESS = '0x66e428c3f67a68878562e79a0234c1f83c208770';//usdt -export const STABLE_TWO_ADDRESS = '0xc21223249ca28397b4b6541dffaecc539bff0c59';//usdc +export const STABLE_ONE_ADDRESS = "0x66e428c3f67a68878562e79a0234c1f83c208770"; //usdt +export const STABLE_TWO_ADDRESS = "0xc21223249ca28397b4b6541dffaecc539bff0c59"; //usdc //stable coins pairs -export const STABLE_COIN_PAIR_ONE = '0xe4b2dfc82977dd2dce7e8d37895a6a8f50cbb4fb';//[USDT_USDC_PAIR] +export const STABLE_COIN_PAIR_ONE = + "0xe4b2dfc82977dd2dce7e8d37895a6a8f50cbb4fb"; //[USDT_USDC_PAIR] //base currency pair -export const BASE_COIN_PAIR = '0xfe176a2b1e1f67250d2903b8d25f56c0dabcd6b2';//[WETH_USDC_PAIR] -export const CROWDPOOLING_FACTORY_V2: string[]=["0x9a8c0e8b27fff5d00402733ca67432b6d64faff4"]; - +export const BASE_COIN_PAIR = "0xfe176a2b1e1f67250d2903b8d25f56c0dabcd6b2"; //[WETH_USDC_PAIR] +export const CROWDPOOLING_FACTORY_V2: string[] = [ + "0x9a8c0e8b27fff5d00402733ca67432b6d64faff4", +]; diff --git a/src/mappings/constant-dodochain-testnet.ts b/src/mappings/constant-dodochain-testnet.ts new file mode 100644 index 0000000..f89747e --- /dev/null +++ b/src/mappings/constant-dodochain-testnet.ts @@ -0,0 +1,50 @@ +//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_GSP_POOL = "GSP"; +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-dodochain-testnet"; +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[] = [ + "0x351a86A2C8dc47D396305AAcd7F126E096b2eee4", +]; +export const DVM_FACTORY_ADDRESS = "0x7D381e6a9c23A0E6969658f6B8Eba57A4Dbf93a0"; +export const DPP_FACTORY_ADDRESS = "0xF5378974cfD5042A58c458E06cB6D2A2D1c2FAF8"; +export const CLASSIC_FACTORY_ADDRESS = + "0xF9a6c9BE0a1149C69EF537359c78DeB5e6264ec6"; +export const CROWDPOOLING_FACTORY_V2: string[] = [ + "0xF9a6c9BE0a1149C69EF537359c78DeB5e6264ec6", +]; + +export const DVM_FACTORY_DEPLOY_BLOCK = 58; +export const DPP_FACTORY_DEPLOY_BLOCK = 58; + +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 = "0x3a64Ec3606FF7310E8fAd6FcC008e39705fB496d"; +//pricing supported stable coins +export const STABLE_ONE_ADDRESS = "0xb95ed7e958e196688984951f41ac2888f4b10ab9"; //usdt +export const STABLE_TWO_ADDRESS = "0x46afe01d758a46d64c7d8e0791314d5db3e2e683"; //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-goerli.ts b/src/mappings/constant-goerli.ts index 38b379e..665a5ce 100644 --- a/src/mappings/constant-goerli.ts +++ b/src/mappings/constant-goerli.ts @@ -3,44 +3,48 @@ 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_GSP_POOL = "GSP"; 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-rinkeby"; +export const DODOZooID = "dodoex-v2-goerli"; 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[]= ["0xba001e96af87bf9d8d0bda667067a9921fe6d294"]; +export const SMART_ROUTE_ADDRESSES: string[] = [ + "0xba001e96af87bf9d8d0bda667067a9921fe6d294", +]; export const DVM_FACTORY_ADDRESS = "0x17dddefa0c82e0c850a4adac2afe3f1fe977a242"; export const DPP_FACTORY_ADDRESS = "0x510b49803e356c750f3a93ba5508c0ffd9f71bdd"; -export const CLASSIC_FACTORY_ADDRESS = "0x168442fec1e1e782c8770185dbb8328b91dc45c0"; -export const CROWDPOOLING_FACTORY_V2: string[]=["0x79e15fc9b4154d90424b588533ab277d30d573f4"]; +export const CLASSIC_FACTORY_ADDRESS = + "0x168442fec1e1e782c8770185dbb8328b91dc45c0"; +export const CROWDPOOLING_FACTORY_V2: string[] = [ + "0x79e15fc9b4154d90424b588533ab277d30d573f4", +]; export const DVM_FACTORY_DEPLOY_BLOCK = 8732843; export const DPP_FACTORY_DEPLOY_BLOCK = 8732843; -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 = '0xb26c0d8be2960c70641a95a9195be1f59ac83ac0'; +export const WRAPPED_BASE_COIN = "0xb26c0d8be2960c70641a95a9195be1f59ac83ac0"; //pricing supported stable coins -export const STABLE_ONE_ADDRESS = '0x0adcbae18580120667f7ff6c6451a426b13c67b7';//usdt -export const STABLE_TWO_ADDRESS = '0xab0733588776b8881f7712f6abca98f510e6b63d';//usdc +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] +export const STABLE_COIN_PAIR_ONE = + "0xe8c1b7e0505c97c59ff2f12ebf91a8eaa59d4c73"; //[USDT_USDC_PAIR] //base currency pair -export const BASE_COIN_PAIR = '0x75f5d66a7bbb9330a9067c0833ec9b3198b71666';//[WETH_USDC_PAIR] - - +export const BASE_COIN_PAIR = "0x75f5d66a7bbb9330a9067c0833ec9b3198b71666"; //[WETH_USDC_PAIR] diff --git a/src/mappings/constant-heco.ts b/src/mappings/constant-heco.ts index 6a08695..0c3c455 100644 --- a/src/mappings/constant-heco.ts +++ b/src/mappings/constant-heco.ts @@ -3,44 +3,47 @@ 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_GSP_POOL = "GSP"; export const TYPE_CLASSICAL_POOL = "CLASSICAL"; export const SOURCE_SMART_ROUTE = "SMART_ROUTE"; export const SOURCE_POOL_SWAP = "DODO_POOL"; -export const DODOV2Proxy02="0xd56281ef996b6b29874c77d2e1464216e8043127"; +export const DODOV2Proxy02 = "0xd56281ef996b6b29874c77d2e1464216e8043127"; export const DIP3_TIMESTAMP = 1624442400; export const DODOZooID = "dodoex-v2-heco"; export const CHAIN_BASE_COIN_SYMBOL = "HT"; export const CHAIN_BASE_COIN_NAME = "ht"; -export const SMART_ROUTE_ADDRESSES: string[]= ["0xac7cc7d2374492de2d1ce21e2feca26eb0d113e7"]; +export const SMART_ROUTE_ADDRESSES: string[] = [ + "0xac7cc7d2374492de2d1ce21e2feca26eb0d113e7", +]; export const DVM_FACTORY_ADDRESS = "0xd8c77cf0f01222b07b8343a681c46efa3faea985"; export const DPP_FACTORY_ADDRESS = "0xf5420a3b91c457d336589217d45ccb8f7250eaed"; -export const CLASSIC_FACTORY_ADDRESS = "0x99bc90b42af3635977ed89e0e7eb6a562da22bd2";//dodo zoo -export const CROWDPOOLING_FACTORY_V2: string[]=["0x25406177d125c8ab4101954cc02945be49d67515"]; - -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 CLASSIC_FACTORY_ADDRESS = + "0x99bc90b42af3635977ed89e0e7eb6a562da22bd2"; //dodo zoo +export const CROWDPOOLING_FACTORY_V2: string[] = [ + "0x25406177d125c8ab4101954cc02945be49d67515", +]; + +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 = '0x5545153ccfca01fbd7dd11c0b23ba694d9509a6f'; +export const WRAPPED_BASE_COIN = "0x5545153ccfca01fbd7dd11c0b23ba694d9509a6f"; //pricing supported stable coins -export const STABLE_ONE_ADDRESS = '0xa71edc38d189767582c38a3145b5873052c3e47a';//usdt -export const STABLE_TWO_ADDRESS = '0x0298c2b32eae4da002a15f36fdf7615bea3da047';//husd +export const STABLE_ONE_ADDRESS = "0xa71edc38d189767582c38a3145b5873052c3e47a"; //usdt +export const STABLE_TWO_ADDRESS = "0x0298c2b32eae4da002a15f36fdf7615bea3da047"; //husd //stable coins pairs -export const STABLE_COIN_PAIR_ONE = '0x1053152a60abec125f96f13a980ef469048f978f';//[USDT_BUSD_PAIR] +export const STABLE_COIN_PAIR_ONE = + "0x1053152a60abec125f96f13a980ef469048f978f"; //[USDT_BUSD_PAIR] //base currency pair -export const BASE_COIN_PAIR = '0x294c1e26eb5c26fb78eff91b9d662d3ed3b63425';//[WBNB_USDC_PAIR] - - - - +export const BASE_COIN_PAIR = "0x294c1e26eb5c26fb78eff91b9d662d3ed3b63425"; //[WBNB_USDC_PAIR] diff --git a/src/mappings/constant-kcc.ts b/src/mappings/constant-kcc.ts index c0838f4..6264db8 100644 --- a/src/mappings/constant-kcc.ts +++ b/src/mappings/constant-kcc.ts @@ -3,6 +3,7 @@ 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_GSP_POOL = "GSP"; export const TYPE_CLASSICAL_POOL = "CLASSICAL"; export const SOURCE_SMART_ROUTE = "SMART_ROUTE"; export const SOURCE_POOL_SWAP = "DODO_POOL"; @@ -11,36 +12,39 @@ export const CHAIN_BASE_COIN_SYMBOL = "KCS"; export const CHAIN_BASE_COIN_NAME = "kcs"; export const DIP3_TIMESTAMP = 1624442400; -export const SMART_ROUTE_ADDRESSES: string[]= ["0xf0512872fec0173d1d99c2dd8cdcb770054b675b"]; +export const SMART_ROUTE_ADDRESSES: string[] = [ + "0xf0512872fec0173d1d99c2dd8cdcb770054b675b", +]; export const DVM_FACTORY_ADDRESS = "0x31ac053c31a77055b2ae2d3899091c0a9c19ce3a"; export const DPP_FACTORY_ADDRESS = "0x4632e6ebd4a01ebf54739a9d71a62cedb29e9183"; -export const CLASSIC_FACTORY_ADDRESS = "0x168442fec1e1e782c8770185dbb8328b91dc45c0"; -export const CROWDPOOLING_FACTORY_V2: string[]=["0xae1e7e4c5743321d2a8ceed179264998a56cf1d9"]; +export const CLASSIC_FACTORY_ADDRESS = + "0x168442fec1e1e782c8770185dbb8328b91dc45c0"; +export const CROWDPOOLING_FACTORY_V2: string[] = [ + "0xae1e7e4c5743321d2a8ceed179264998a56cf1d9", +]; export const DVM_FACTORY_DEPLOY_BLOCK = 8732843; export const DPP_FACTORY_DEPLOY_BLOCK = 8732843; -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 = '0x4446fc4eb47f2f6586f9faab68b3498f86c07521'; +export const WRAPPED_BASE_COIN = "0x4446fc4eb47f2f6586f9faab68b3498f86c07521"; //pricing supported stable coins -export const STABLE_ONE_ADDRESS = '0x0039f574ee5cc39bdd162e9a88e3eb1f111baf48';//usdt -export const STABLE_TWO_ADDRESS = '0x980a5afef3d17ad98635f6c5aebcbaeded3c3430';//usdc +export const STABLE_ONE_ADDRESS = "0x0039f574ee5cc39bdd162e9a88e3eb1f111baf48"; //usdt +export const STABLE_TWO_ADDRESS = "0x980a5afef3d17ad98635f6c5aebcbaeded3c3430"; //usdc //stable coins pairs -export const STABLE_COIN_PAIR_ONE = '0xe8c1b7e0505c97c59ff2f12ebf91a8eaa59d4c73';//[USDT_USDC_PAIR] +export const STABLE_COIN_PAIR_ONE = + "0xe8c1b7e0505c97c59ff2f12ebf91a8eaa59d4c73"; //[USDT_USDC_PAIR] //base currency pair -export const BASE_COIN_PAIR = '0x75f5d66a7bbb9330a9067c0833ec9b3198b71666';//[WETH_USDC_PAIR] - - +export const BASE_COIN_PAIR = "0x75f5d66a7bbb9330a9067c0833ec9b3198b71666"; //[WETH_USDC_PAIR] diff --git a/src/mappings/constant-kovan.ts b/src/mappings/constant-kovan.ts index 283d558..65e5512 100644 --- a/src/mappings/constant-kovan.ts +++ b/src/mappings/constant-kovan.ts @@ -3,6 +3,7 @@ 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_GSP_POOL = "GSP"; export const TYPE_CLASSICAL_POOL = "CLASSICAL"; export const SOURCE_SMART_ROUTE = "SMART_ROUTE"; export const SOURCE_POOL_SWAP = "DODO_POOL"; @@ -11,35 +12,36 @@ 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[]= ["0x85caa68ae47f047aa01c48bcaa711ca70a950ffb"]; +export const SMART_ROUTE_ADDRESSES: string[] = [ + "0x85caa68ae47f047aa01c48bcaa711ca70a950ffb", +]; export const DVM_FACTORY_ADDRESS = "0x322f8014c125da09314d3a68d4d9f427823f17fd"; export const DPP_FACTORY_ADDRESS = "0xc65f8087288aa0a118aa6f3228ef9ecc8187f4b6"; -export const CLASSIC_FACTORY_ADDRESS = "0x92230e929a2226b29ed3441ae5524886347c60c8"; +export const CLASSIC_FACTORY_ADDRESS = + "0x92230e929a2226b29ed3441ae5524886347c60c8"; export const DVM_FACTORY_DEPLOY_BLOCK = 23379878; export const DPP_FACTORY_DEPLOY_BLOCK = 23388901; -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 = '0x5eca15b12d959dfcf9c71c59f8b467eb8c6efd0b'; +export const WRAPPED_BASE_COIN = "0x5eca15b12d959dfcf9c71c59f8b467eb8c6efd0b"; //pricing supported stable coins -export const STABLE_ONE_ADDRESS = '0xd02de455eeaa9d6bf8f8d56db13ce6178b46a9c2';//usdt -export const STABLE_TWO_ADDRESS = '0x3a9fdfef1382a146f390b699413f63a996c6981f';//usdc +export const STABLE_ONE_ADDRESS = "0xd02de455eeaa9d6bf8f8d56db13ce6178b46a9c2"; //usdt +export const STABLE_TWO_ADDRESS = "0x3a9fdfef1382a146f390b699413f63a996c6981f"; //usdc //stable coins pairs -export const STABLE_COIN_PAIR_ONE = '0xe8c1b7e0505c97c59ff2f12ebf91a8eaa59d4c73';//[USDT_USDC_PAIR] +export const STABLE_COIN_PAIR_ONE = + "0xe8c1b7e0505c97c59ff2f12ebf91a8eaa59d4c73"; //[USDT_USDC_PAIR] //base currency pair -export const BASE_COIN_PAIR = '0x75f5d66a7bbb9330a9067c0833ec9b3198b71666';//[WETH_USDC_PAIR] - - +export const BASE_COIN_PAIR = "0x75f5d66a7bbb9330a9067c0833ec9b3198b71666"; //[WETH_USDC_PAIR] diff --git a/src/mappings/constant-linea.ts b/src/mappings/constant-linea.ts index 783a7ac..d2cecbd 100644 --- a/src/mappings/constant-linea.ts +++ b/src/mappings/constant-linea.ts @@ -3,6 +3,7 @@ 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_GSP_POOL = "GSP"; export const TYPE_CLASSICAL_POOL = "CLASSICAL"; export const SOURCE_SMART_ROUTE = "SMART_ROUTE"; export const SOURCE_POOL_SWAP = "DODO_POOL"; diff --git a/src/mappings/constant-mainnet.ts b/src/mappings/constant-mainnet.ts index e314916..9915f1f 100644 --- a/src/mappings/constant-mainnet.ts +++ b/src/mappings/constant-mainnet.ts @@ -3,6 +3,7 @@ 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_GSP_POOL = "GSP"; export const TYPE_CLASSICAL_POOL = "CLASSICAL"; export const SOURCE_SMART_ROUTE = "SMART_ROUTE"; export const SOURCE_POOL_SWAP = "DODO_POOL"; @@ -19,30 +20,41 @@ 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[] = ["0xd0678ec59d1337e29d1e1b1b6338f3e85d311f5e", "0x6ed3fd491f5b10384787b3fb162a72227fafbf63", "0x9a9942458754bdf65dcbcd0b6b4b842a7d4031ab", "0x9ae501385bc7996a2a4a1fbb00c8d3820611bcb5", "0xa2cb66ebb947d217f61510882096f6e95c1de97d", "0xa356867fdcea8e71aeaf87805808803806231fdc"]; +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 CLASSIC_FACTORY_ADDRESS = + "0x3a97247df274a17c59a3bd12735ea3fcdfb49950"; //dodo zoo +export const CROWDPOOLING_FACTORY_V2: string[] = [ + "0x1e5d8ee8fb7f0d791475c59391db8f6cd06aa656", +]; -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 = "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"; //pricing supported stable coins -export const STABLE_ONE_ADDRESS = '0xdac17f958d2ee523a2206206994597c13d831ec7';//usdt -export const STABLE_TWO_ADDRESS = '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48';//usdc +export const STABLE_ONE_ADDRESS = "0xdac17f958d2ee523a2206206994597c13d831ec7"; //usdt +export const STABLE_TWO_ADDRESS = "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"; //usdc //stable coins pairs -export const STABLE_COIN_PAIR_ONE = '0xc9f93163c99695c6526b799ebca2207fdf7d61ad';//[USDT_USDC_PAIR] +export const STABLE_COIN_PAIR_ONE = + "0xc9f93163c99695c6526b799ebca2207fdf7d61ad"; //[USDT_USDC_PAIR] //base currency pair -export const BASE_COIN_PAIR = '0x75c23271661d9d143dcb617222bc4bec783eff34';//[WETH_USDC_PAIR] +export const BASE_COIN_PAIR = "0x75c23271661d9d143dcb617222bc4bec783eff34"; //[WETH_USDC_PAIR] diff --git a/src/mappings/constant-manta.ts b/src/mappings/constant-manta.ts index f6e6b3c..f7cee5c 100644 --- a/src/mappings/constant-manta.ts +++ b/src/mappings/constant-manta.ts @@ -3,6 +3,7 @@ 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_GSP_POOL = "GSP"; export const TYPE_CLASSICAL_POOL = "CLASSICAL"; export const SOURCE_SMART_ROUTE = "SMART_ROUTE"; export const SOURCE_POOL_SWAP = "DODO_POOL"; diff --git a/src/mappings/constant-mantle.ts b/src/mappings/constant-mantle.ts index e209311..9795be1 100644 --- a/src/mappings/constant-mantle.ts +++ b/src/mappings/constant-mantle.ts @@ -3,6 +3,7 @@ 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_GSP_POOL = "GSP"; export const TYPE_CLASSICAL_POOL = "CLASSICAL"; export const SOURCE_SMART_ROUTE = "SMART_ROUTE"; export const SOURCE_POOL_SWAP = "DODO_POOL"; diff --git a/src/mappings/constant-moonriver.ts b/src/mappings/constant-moonriver.ts index 1b5e1b0..bc6bbac 100644 --- a/src/mappings/constant-moonriver.ts +++ b/src/mappings/constant-moonriver.ts @@ -3,6 +3,7 @@ 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_GSP_POOL = "GSP"; export const TYPE_CLASSICAL_POOL = "CLASSICAL"; export const SOURCE_SMART_ROUTE = "SMART_ROUTE"; export const SOURCE_POOL_SWAP = "DODO_POOL"; @@ -14,33 +15,36 @@ 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 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" -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 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"; +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 = '0xf50225a84382c74cbdea10b0c176f71fc3de0c4d'; +export const WRAPPED_BASE_COIN = "0xf50225a84382c74cbdea10b0c176f71fc3de0c4d"; //pricing supported stable coins -export const STABLE_ONE_ADDRESS = '0xb44a9b6905af7c801311e8f4e76932ee959c663c';//usdt -export const STABLE_TWO_ADDRESS = '0xe3f5a90f9cb311505cd691a46596599aa1a0ad7d';//usdc +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] +export const STABLE_COIN_PAIR_ONE = + "0xc9f93163c99695c6526b799ebca2207fdf7d61ad"; //[USDT_USDC_PAIR] //base currency pair todo -export const BASE_COIN_PAIR = '0x75c23271661d9d143dcb617222bc4bec783eff34';//[WETH_USDC_PAIR] - - - +export const BASE_COIN_PAIR = "0x75c23271661d9d143dcb617222bc4bec783eff34"; //[WETH_USDC_PAIR] diff --git a/src/mappings/constant-okb.ts b/src/mappings/constant-okb.ts new file mode 100644 index 0000000..1d6cb3b --- /dev/null +++ b/src/mappings/constant-okb.ts @@ -0,0 +1,50 @@ +//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_GSP_POOL = "GSP"; +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-layer"; +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-okchain.ts b/src/mappings/constant-okchain.ts index 771e788..636686e 100644 --- a/src/mappings/constant-okchain.ts +++ b/src/mappings/constant-okchain.ts @@ -3,6 +3,7 @@ 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_GSP_POOL = "GSP"; export const TYPE_CLASSICAL_POOL = "CLASSICAL"; export const SOURCE_SMART_ROUTE = "SMART_ROUTE"; export const SOURCE_POOL_SWAP = "DODO_POOL"; @@ -12,33 +13,36 @@ export const DODOZooID = "dodoex-v2-okchain"; export const CHAIN_BASE_COIN_SYMBOL = "OKT"; export const CHAIN_BASE_COIN_NAME = "OKT"; -export const SMART_ROUTE_ADDRESSES: string[] = ["0x6b4fa0bc61eddc928e0df9c7f01e407bfcd3e5ef"]; +export const SMART_ROUTE_ADDRESSES: string[] = [ + "0x6b4fa0bc61eddc928e0df9c7f01e407bfcd3e5ef", +]; export const DVM_FACTORY_ADDRESS = "0x9ae501385bc7996a2a4a1fbb00c8d3820611bcb5"; export const DPP_FACTORY_ADDRESS = "0xbab9f4ff4a19a0e8eebc56b06750253228ffac6e"; -export const CLASSIC_FACTORY_ADDRESS = "0x357c5e9cfa8b834edcef7c7aabd8f9db09119d11";//dodo zoo -export const CROWDPOOLING_FACTORY_V2: string[]=["0x5333eb1e32522f1893b7c9fea3c263807a02d561"]; - -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 CLASSIC_FACTORY_ADDRESS = + "0x357c5e9cfa8b834edcef7c7aabd8f9db09119d11"; //dodo zoo +export const CROWDPOOLING_FACTORY_V2: string[] = [ + "0x5333eb1e32522f1893b7c9fea3c263807a02d561", +]; + +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 = '0x8f8526dbfd6e38e3d8307702ca8469bae6c56c15'; +export const WRAPPED_BASE_COIN = "0x8f8526dbfd6e38e3d8307702ca8469bae6c56c15"; //pricing supported stable coins -export const STABLE_ONE_ADDRESS = '0x382bb369d343125bfb2117af9c149795c6c65c50';//usdt -export const STABLE_TWO_ADDRESS = '0xc946daf81b08146b1c7a8da2a851ddf2b3eaaf85';//usdc +export const STABLE_ONE_ADDRESS = "0x382bb369d343125bfb2117af9c149795c6c65c50"; //usdt +export const STABLE_TWO_ADDRESS = "0xc946daf81b08146b1c7a8da2a851ddf2b3eaaf85"; //usdc //stable coins pairs -export const STABLE_COIN_PAIR_ONE = '0xc9f93163c99695c6526b799ebca2207fdf7d61ad';//[USDT_USDC_PAIR] +export const STABLE_COIN_PAIR_ONE = + "0xc9f93163c99695c6526b799ebca2207fdf7d61ad"; //[USDT_USDC_PAIR] //base currency pair -export const BASE_COIN_PAIR = '0x75c23271661d9d143dcb617222bc4bec783eff34';//[WOKT_USDC_PAIR] - - - +export const BASE_COIN_PAIR = "0x75c23271661d9d143dcb617222bc4bec783eff34"; //[WOKT_USDC_PAIR] diff --git a/src/mappings/constant-optimism.ts b/src/mappings/constant-optimism.ts index 0c46aba..2a7e612 100644 --- a/src/mappings/constant-optimism.ts +++ b/src/mappings/constant-optimism.ts @@ -3,6 +3,7 @@ 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_GSP_POOL = "GSP"; export const TYPE_CLASSICAL_POOL = "CLASSICAL"; export const SOURCE_SMART_ROUTE = "SMART_ROUTE"; export const SOURCE_POOL_SWAP = "DODO_POOL"; @@ -13,31 +14,36 @@ export const DODOZooID = "dodoex-v2-optimism"; export const CHAIN_BASE_COIN_SYMBOL = "ETH"; export const CHAIN_BASE_COIN_NAME = "ether"; -export const SMART_ROUTE_ADDRESSES: string[] = ["0xfd9d2827ad469b72b69329daa325ba7afbdb3c98"]; +export const SMART_ROUTE_ADDRESSES: string[] = [ + "0xfd9d2827ad469b72b69329daa325ba7afbdb3c98", +]; export const DVM_FACTORY_ADDRESS = "0x2b800dc6270726f7e2266ce8cd5a3f8436fe0b40"; export const DPP_FACTORY_ADDRESS = "0xdb9c53f2ced34875685b607c97a61a65da2f30a8"; -export const CLASSIC_FACTORY_ADDRESS = "0xc48936efc01db84ab15fe89c08e3b2b72853eece";//dodo zoo +export const CLASSIC_FACTORY_ADDRESS = + "0xc48936efc01db84ab15fe89c08e3b2b72853eece"; //dodo zoo -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 = '0x4200000000000000000000000000000000000006'; +export const WRAPPED_BASE_COIN = "0x4200000000000000000000000000000000000006"; //pricing supported stable coins -export const STABLE_ONE_ADDRESS = '0x94b008aa00579c1307b0ef2c499ad98a8ce58e58';//usdt -export const STABLE_TWO_ADDRESS = '0x7f5c764cbc14f9669b88837ca1490cca17c31607';//usdc +export const STABLE_ONE_ADDRESS = "0x94b008aa00579c1307b0ef2c499ad98a8ce58e58"; //usdt +export const STABLE_TWO_ADDRESS = "0x7f5c764cbc14f9669b88837ca1490cca17c31607"; //usdc //stable coins pairs -export const STABLE_COIN_PAIR_ONE = '0xe4b2dfc82977dd2dce7e8d37895a6a8f50cbb4fb';//[USDT_USDC_PAIR] +export const STABLE_COIN_PAIR_ONE = + "0xe4b2dfc82977dd2dce7e8d37895a6a8f50cbb4fb"; //[USDT_USDC_PAIR] //base currency pair -export const BASE_COIN_PAIR = '0xfe176a2b1e1f67250d2903b8d25f56c0dabcd6b2';//[WETH_USDC_PAIR] -export const CROWDPOOLING_FACTORY_V2: string[]=["0x424976b3997514afa7c5122d053b8973f225d9db"]; - +export const BASE_COIN_PAIR = "0xfe176a2b1e1f67250d2903b8d25f56c0dabcd6b2"; //[WETH_USDC_PAIR] +export const CROWDPOOLING_FACTORY_V2: string[] = [ + "0x424976b3997514afa7c5122d053b8973f225d9db", +]; diff --git a/src/mappings/constant-polygon.ts b/src/mappings/constant-polygon.ts index 13748b5..fc2d56b 100644 --- a/src/mappings/constant-polygon.ts +++ b/src/mappings/constant-polygon.ts @@ -3,6 +3,7 @@ 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_GSP_POOL = "GSP"; export const TYPE_CLASSICAL_POOL = "CLASSICAL"; export const SOURCE_SMART_ROUTE = "SMART_ROUTE"; export const SOURCE_POOL_SWAP = "DODO_POOL"; @@ -13,33 +14,36 @@ export const DODOZooID = "dodoex-v2-polygon"; export const CHAIN_BASE_COIN_SYMBOL = "MATIC"; export const CHAIN_BASE_COIN_NAME = "MATIC"; -export const SMART_ROUTE_ADDRESSES: string[] = ["0x45894c062e6f4e58b257e0826675355305dfef0d"]; +export const SMART_ROUTE_ADDRESSES: string[] = [ + "0x45894c062e6f4e58b257e0826675355305dfef0d", +]; export const DVM_FACTORY_ADDRESS = "0xbab9f4ff4a19a0e8eebc56b06750253228ffac6e"; export const DPP_FACTORY_ADDRESS = "0xe55154d09265b18ac7cdac6e646672a5460389a1"; -export const CLASSIC_FACTORY_ADDRESS = "0x357c5e9cfa8b834edcef7c7aabd8f9db09119d11";//dodo zoo -export const CROWDPOOLING_FACTORY_V2: string[]=["0x29e7085fda4a8492fbb16e840488b514149d51f6"]; - -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 CLASSIC_FACTORY_ADDRESS = + "0x357c5e9cfa8b834edcef7c7aabd8f9db09119d11"; //dodo zoo +export const CROWDPOOLING_FACTORY_V2: string[] = [ + "0x29e7085fda4a8492fbb16e840488b514149d51f6", +]; + +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 = '0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270'; +export const WRAPPED_BASE_COIN = "0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270"; //pricing supported stable coins -export const STABLE_ONE_ADDRESS = '0xc2132d05d31c914a87c6611c10748aeb04b58e8f';//usdt -export const STABLE_TWO_ADDRESS = '0x2791bca1f2de4661ed88a30c99a7a9449aa84174';//usdc +export const STABLE_ONE_ADDRESS = "0xc2132d05d31c914a87c6611c10748aeb04b58e8f"; //usdt +export const STABLE_TWO_ADDRESS = "0x2791bca1f2de4661ed88a30c99a7a9449aa84174"; //usdc //stable coins pairs -export const STABLE_COIN_PAIR_ONE = '0xc9f93163c99695c6526b799ebca2207fdf7d61ad';//[USDT_USDC_PAIR] +export const STABLE_COIN_PAIR_ONE = + "0xc9f93163c99695c6526b799ebca2207fdf7d61ad"; //[USDT_USDC_PAIR] //base currency pair -export const BASE_COIN_PAIR = '0x75c23271661d9d143dcb617222bc4bec783eff34';//[WETH_USDC_PAIR] - - - +export const BASE_COIN_PAIR = "0x75c23271661d9d143dcb617222bc4bec783eff34"; //[WETH_USDC_PAIR] diff --git a/src/mappings/constant-rinkeby.ts b/src/mappings/constant-rinkeby.ts index 38b379e..391c77d 100644 --- a/src/mappings/constant-rinkeby.ts +++ b/src/mappings/constant-rinkeby.ts @@ -3,6 +3,7 @@ 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_GSP_POOL = "GSP"; export const TYPE_CLASSICAL_POOL = "CLASSICAL"; export const SOURCE_SMART_ROUTE = "SMART_ROUTE"; export const SOURCE_POOL_SWAP = "DODO_POOL"; @@ -11,36 +12,39 @@ 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[]= ["0xba001e96af87bf9d8d0bda667067a9921fe6d294"]; +export const SMART_ROUTE_ADDRESSES: string[] = [ + "0xba001e96af87bf9d8d0bda667067a9921fe6d294", +]; export const DVM_FACTORY_ADDRESS = "0x17dddefa0c82e0c850a4adac2afe3f1fe977a242"; export const DPP_FACTORY_ADDRESS = "0x510b49803e356c750f3a93ba5508c0ffd9f71bdd"; -export const CLASSIC_FACTORY_ADDRESS = "0x168442fec1e1e782c8770185dbb8328b91dc45c0"; -export const CROWDPOOLING_FACTORY_V2: string[]=["0x79e15fc9b4154d90424b588533ab277d30d573f4"]; +export const CLASSIC_FACTORY_ADDRESS = + "0x168442fec1e1e782c8770185dbb8328b91dc45c0"; +export const CROWDPOOLING_FACTORY_V2: string[] = [ + "0x79e15fc9b4154d90424b588533ab277d30d573f4", +]; export const DVM_FACTORY_DEPLOY_BLOCK = 8732843; export const DPP_FACTORY_DEPLOY_BLOCK = 8732843; -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 = '0xb26c0d8be2960c70641a95a9195be1f59ac83ac0'; +export const WRAPPED_BASE_COIN = "0xb26c0d8be2960c70641a95a9195be1f59ac83ac0"; //pricing supported stable coins -export const STABLE_ONE_ADDRESS = '0x0adcbae18580120667f7ff6c6451a426b13c67b7';//usdt -export const STABLE_TWO_ADDRESS = '0xab0733588776b8881f7712f6abca98f510e6b63d';//usdc +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] +export const STABLE_COIN_PAIR_ONE = + "0xe8c1b7e0505c97c59ff2f12ebf91a8eaa59d4c73"; //[USDT_USDC_PAIR] //base currency pair -export const BASE_COIN_PAIR = '0x75f5d66a7bbb9330a9067c0833ec9b3198b71666';//[WETH_USDC_PAIR] - - +export const BASE_COIN_PAIR = "0x75f5d66a7bbb9330a9067c0833ec9b3198b71666"; //[WETH_USDC_PAIR] diff --git a/src/mappings/constant-scroll-alpha.ts b/src/mappings/constant-scroll-alpha.ts index edd190b..74dc80a 100644 --- a/src/mappings/constant-scroll-alpha.ts +++ b/src/mappings/constant-scroll-alpha.ts @@ -3,6 +3,7 @@ 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_GSP_POOL = "GSP"; export const TYPE_CLASSICAL_POOL = "CLASSICAL"; export const SOURCE_SMART_ROUTE = "SMART_ROUTE"; export const SOURCE_POOL_SWAP = "DODO_POOL"; diff --git a/src/mappings/constant-scroll-sepolia.ts b/src/mappings/constant-scroll-sepolia.ts index 616cf68..6dc361c 100644 --- a/src/mappings/constant-scroll-sepolia.ts +++ b/src/mappings/constant-scroll-sepolia.ts @@ -3,6 +3,7 @@ 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_GSP_POOL = "GSP"; export const TYPE_CLASSICAL_POOL = "CLASSICAL"; export const SOURCE_SMART_ROUTE = "SMART_ROUTE"; export const SOURCE_POOL_SWAP = "DODO_POOL"; diff --git a/src/mappings/constant-scroll.ts b/src/mappings/constant-scroll.ts index 73ae0ea..44126c0 100644 --- a/src/mappings/constant-scroll.ts +++ b/src/mappings/constant-scroll.ts @@ -3,6 +3,7 @@ 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_GSP_POOL = "GSP"; export const TYPE_CLASSICAL_POOL = "CLASSICAL"; export const SOURCE_SMART_ROUTE = "SMART_ROUTE"; export const SOURCE_POOL_SWAP = "DODO_POOL"; diff --git a/src/mappings/constant-sepolia.ts b/src/mappings/constant-sepolia.ts new file mode 100644 index 0000000..3505c3c --- /dev/null +++ b/src/mappings/constant-sepolia.ts @@ -0,0 +1,50 @@ +//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_GSP_POOL = "GSP"; +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-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[] = [ + "0x6292e8f7647b3b9dDf5795b1Fb77D0187e30E0F9", +]; +export const DVM_FACTORY_ADDRESS = "0x2F86652dAEF5f1728c54191C955F065Ec3C188c7"; +export const DPP_FACTORY_ADDRESS = "0x0B1467f71c082D8d410aF4376C685D9A6893cF36"; +export const CLASSIC_FACTORY_ADDRESS = + "0xCDA4a6cc5997002B87f28D46852F9F0aA0f3c897"; +export const CROWDPOOLING_FACTORY_V2: string[] = [ + "0xCDA4a6cc5997002B87f28D46852F9F0aA0f3c897", +]; + +export const DVM_FACTORY_DEPLOY_BLOCK = 58; +export const DPP_FACTORY_DEPLOY_BLOCK = 58; + +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 = "0x7b07164ecfaf0f0d85dfc062bc205a4674c75aa0"; +//pricing supported stable coins +export const STABLE_ONE_ADDRESS = "0xdbc836c3cb158197e96228fc5b205f91b65e6779"; //usdt +export const STABLE_TWO_ADDRESS = "0x2442e080c0343d8ab683bf5044303082f66f0a7e"; //usdc +//stable coins pairs +export const STABLE_COIN_PAIR_ONE = + "0xc5135499e4af076949ecdb0a51ace5d36aaa259c"; //[USDT_USDC_PAIR] +//base currency pair +export const BASE_COIN_PAIR = "0xf444ae517c06c607ae0953501701bd19d70fc251"; //[WETH_USDC_PAIR] diff --git a/src/mappings/constant-tokb.ts b/src/mappings/constant-tokb.ts index 6a70abf..fc6ec3d 100644 --- a/src/mappings/constant-tokb.ts +++ b/src/mappings/constant-tokb.ts @@ -3,6 +3,7 @@ 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_GSP_POOL = "GSP"; export const TYPE_CLASSICAL_POOL = "CLASSICAL"; export const SOURCE_SMART_ROUTE = "SMART_ROUTE"; export const SOURCE_POOL_SWAP = "DODO_POOL"; diff --git a/src/mappings/constant-zircuit-testnet.ts b/src/mappings/constant-zircuit-testnet.ts new file mode 100644 index 0000000..c61df36 --- /dev/null +++ b/src/mappings/constant-zircuit-testnet.ts @@ -0,0 +1,50 @@ +//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_GSP_POOL = "GSP"; +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-zircuit-testnet"; +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[] = [ + "0x3b0c6c0CE667844e742Ce0Ca533EaA2b6f422AA8", +]; +export const DVM_FACTORY_ADDRESS = "0x7Ad992fcebd899ddbEF7f031dCF96f382b81ECea"; +export const DPP_FACTORY_ADDRESS = "0x5e132c0ABB9e4E5f1471eF6d1C9740c276Fe520e"; +export const CLASSIC_FACTORY_ADDRESS = + "0xB3d4823e02A9AB9A9A0Cc1636E776c360B67bED1"; +export const CROWDPOOLING_FACTORY_V2: string[] = [ + "0xB3d4823e02A9AB9A9A0Cc1636E776c360B67bED1", +]; + +export const DVM_FACTORY_DEPLOY_BLOCK = 58; +export const DPP_FACTORY_DEPLOY_BLOCK = 58; + +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 = "0x3a64Ec3606FF7310E8fAd6FcC008e39705fB496d"; +//pricing supported stable coins +export const STABLE_ONE_ADDRESS = "0xb95ed7e958e196688984951f41ac2888f4b10ab9"; //usdt +export const STABLE_TWO_ADDRESS = "0x46afe01d758a46d64c7d8e0791314d5db3e2e683"; //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-zircuit.ts b/src/mappings/constant-zircuit.ts new file mode 100644 index 0000000..5e57c60 --- /dev/null +++ b/src/mappings/constant-zircuit.ts @@ -0,0 +1,50 @@ +//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_GSP_POOL = "GSP"; +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-zircuit"; +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[] = [ + "0x5e132c0ABB9e4E5f1471eF6d1C9740c276Fe520e", +]; +export const DVM_FACTORY_ADDRESS = "0xA909314363840f7c28b8EC314028e21722dd8Cb6"; +export const DPP_FACTORY_ADDRESS = "0xb770C37F3A9eC6f25b791D9c791aDE09B0fb1AB8"; +export const CLASSIC_FACTORY_ADDRESS = + "0x40b4030129FCFE660B4ecF35354e027260343049"; +export const CROWDPOOLING_FACTORY_V2: string[] = [ + "0x40b4030129FCFE660B4ecF35354e027260343049", +]; + +export const DVM_FACTORY_DEPLOY_BLOCK = 58; +export const DPP_FACTORY_DEPLOY_BLOCK = 58; + +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 = "0x4200000000000000000000000000000000000006"; +//pricing supported stable coins +export const STABLE_ONE_ADDRESS = "0xb95ed7e958e196688984951f41ac2888f4b10ab9"; //usdt +export const STABLE_TWO_ADDRESS = "0x46afe01d758a46d64c7d8e0791314d5db3e2e683"; //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 6a70abf..6936ef6 100644 --- a/src/mappings/constant.ts +++ b/src/mappings/constant.ts @@ -1,29 +1,26 @@ -//kovan +//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_GSP_POOL = "GSP"; 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 DODOV2Proxy02 = "0x45894c062e6f4e58b257e0826675355305dfef0d"; +export const DIP3_TIMESTAMP = 100; + +export const DODOZooID = "dodoex-v2-arbitrum"; export const CHAIN_BASE_COIN_SYMBOL = "ETH"; -export const CHAIN_BASE_COIN_NAME = "ethereum"; -export const DIP3_TIMESTAMP = 1624442400; +export const CHAIN_BASE_COIN_NAME = "ether"; export const SMART_ROUTE_ADDRESSES: string[] = [ - "0x5b622A373b485CB9BA283ECd6CE6689a8b8FdC05", + "0x45894c062e6f4e58b257e0826675355305dfef0d", ]; -export const DVM_FACTORY_ADDRESS = "0xFaFC924BF0F70BdF4a722231622f559b94e53902"; -export const DPP_FACTORY_ADDRESS = "0xb546Add98c71D97Bb65De60B91021617AcD1262C"; +export const DVM_FACTORY_ADDRESS = "0xbab9f4ff4a19a0e8eebc56b06750253228ffac6e"; +export const DPP_FACTORY_ADDRESS = "0xe55154d09265b18ac7cdac6e646672a5460389a1"; 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; + "0x357c5e9cfa8b834edcef7c7aabd8f9db09119d11"; //dodo zoo export const ADDRESS_ZERO = "0x0000000000000000000000000000000000000000"; export const BASE_COIN = "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"; @@ -38,12 +35,15 @@ export const TRANSACTION_TYPE_CP_CLAIM = "CP_CLAIM"; /** * usd pricing */ -export const WRAPPED_BASE_COIN = "0xb26c0d8be2960c70641a95a9195be1f59ac83ac0"; +export const WRAPPED_BASE_COIN = "0x82af49447d8a07e3bd95bd0d56f35241523fbab1"; //pricing supported stable coins -export const STABLE_ONE_ADDRESS = "0x0adcbae18580120667f7ff6c6451a426b13c67b7"; //usdt -export const STABLE_TWO_ADDRESS = "0xab0733588776b8881f7712f6abca98f510e6b63d"; //usdc +export const STABLE_ONE_ADDRESS = "0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9"; //usdt +export const STABLE_TWO_ADDRESS = "0xff970a61a04b1ca14834a43f5de4533ebddb5cc8"; //usdc //stable coins pairs export const STABLE_COIN_PAIR_ONE = - "0xe8c1b7e0505c97c59ff2f12ebf91a8eaa59d4c73"; //[USDT_USDC_PAIR] + "0xe4b2dfc82977dd2dce7e8d37895a6a8f50cbb4fb"; //[USDT_USDC_PAIR] //base currency pair -export const BASE_COIN_PAIR = "0x75f5d66a7bbb9330a9067c0833ec9b3198b71666"; //[WETH_USDC_PAIR] +export const BASE_COIN_PAIR = "0xfe176a2b1e1f67250d2903b8d25f56c0dabcd6b2"; //[WETH_USDC_PAIR] +export const CROWDPOOLING_FACTORY_V2: string[] = [ + "0x9a8c0e8b27fff5d00402733ca67432b6d64faff4", +]; diff --git a/src/mappings/dodoex/classicPoolFromV1.ts b/src/mappings/dodoex/classicPoolFromV1.ts index 93b9f8d..0ae664c 100644 --- a/src/mappings/dodoex/classicPoolFromV1.ts +++ b/src/mappings/dodoex/classicPoolFromV1.ts @@ -19,6 +19,7 @@ import { MaintainerEarnings, } from "../../types/dodoex/schema"; import { insertAllPairs4V1Aurora } from "./classicalPoolAurora"; + import { DODO as DODOTemplate, DODOLpToken as DODOLpTokenTemplate, diff --git a/src/mappings/dodoex/helpers.ts b/src/mappings/dodoex/helpers.ts index 43ad0fd..9ddfb58 100644 --- a/src/mappings/dodoex/helpers.ts +++ b/src/mappings/dodoex/helpers.ts @@ -243,7 +243,9 @@ export function fetchTokenTotalSupply(tokenAddress: Address): BigInt { export function fetchTokenDecimals(tokenAddress: Address): BigInt { // hardcode overrides if ( - tokenAddress.toHexString() == "0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9" + tokenAddress.toHexString() == + "0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9" || + tokenAddress.toHexString() == "0x623b3357095ea5e41920dec8b873cc95839f861d" ) { return BigInt.fromI32(18); } @@ -527,7 +529,11 @@ export function updateVirtualPairVolume( return pair as Pair; } -export function createLpToken(address: Address, pair: Pair): LpToken { +export function createLpToken( + address: Address, + pair: Pair, + isUpdateTotalSupply: boolean = true +): LpToken { let lpToken = LpToken.load(address.toHexString()); if (lpToken == null) { @@ -544,12 +550,14 @@ export function createLpToken(address: Address, pair: Pair): LpToken { //for V1 classical hardcode pools if (lpToken.symbol == "unknown") { lpToken.symbol = fetchTokenSymbol(address); - lpToken.totalSupply = fetchTokenTotalSupply(address); lpToken.name = fetchTokenName(address); lpToken.decimals = fetchTokenDecimals(address); lpToken.save(); } + if (isUpdateTotalSupply || lpToken.symbol == "unknown") { + lpToken.totalSupply = fetchTokenTotalSupply(address); + } return lpToken as LpToken; } @@ -595,13 +603,37 @@ export function getPMMState( if (pair != null && pair.type != TYPE_CLASSICAL_POOL) { let pool = DVM.bind(poolAddress); let pmmState = pool.try_getPMMState(); - if (pmmState.reverted == false) { + if (pmmState.reverted) { + log.warning("getPMMState reverted: {}", [poolAddress.toHexString()]); + } else { return pmmState.value as DVM__getPMMStateResultStateStruct; } } return null; } +export function updatePairPmm( + address: Address, + pair: Pair, + event: ethereum.Event +): void { + let pmmState: DVM__getPMMStateResultStateStruct | null; + pmmState = getPMMState(address); + if (pmmState == null) { + return; + } + createPairDetail(pair, pmmState, event.block.timestamp); + let baseToken = Token.load(pair.baseToken) as Token; + let quoteToken = Token.load(pair.quoteToken) as Token; + + pair.baseReserve = convertTokenToDecimal(pmmState.B, baseToken.decimals); + pair.quoteReserve = convertTokenToDecimal(pmmState.Q, quoteToken.decimals); + pair.i = pmmState.i; + pair.k = pmmState.K; + pair.updatedAt = event.block.timestamp; + pair.save(); +} + export function getQuoteTokenAddress(poolAddress: Address): Address { let pair = Pair.load(poolAddress.toHexString()); if (pair != null) { @@ -618,14 +650,8 @@ export function updatePairTraderCount( pair: Pair, event: ethereum.Event ): void { - let fromPairID = from - .toHexString() - .concat("-") - .concat(pair.id); - let toPairID = to - .toHexString() - .concat("-") - .concat(pair.id); + let fromPairID = from.toHexString().concat("-").concat(pair.id); + let toPairID = to.toHexString().concat("-").concat(pair.id); let fromTraderPair = PairTrader.load(fromPairID); if (fromTraderPair == null) { @@ -694,12 +720,10 @@ export function updateStatistics( volumeUSD: BigDecimal ): void { let pairHourData = updatePairHourData(event, pair); - pairHourData.untrackedBaseVolume = pairHourData.untrackedBaseVolume.plus( - untrackedBaseVolume - ); - pairHourData.untrackedQuoteVolume = pairHourData.untrackedBaseVolume.plus( - untrackedQuoteVolume - ); + pairHourData.untrackedBaseVolume = + pairHourData.untrackedBaseVolume.plus(untrackedBaseVolume); + pairHourData.untrackedQuoteVolume = + pairHourData.untrackedBaseVolume.plus(untrackedQuoteVolume); pairHourData.volumeBase = pairHourData.volumeBase.plus(baseVolume); pairHourData.volumeQuote = pairHourData.volumeQuote.plus(quoteVolume); pairHourData.feeBase = pairHourData.feeBase.plus(feeBase); @@ -708,12 +732,10 @@ export function updateStatistics( pairHourData.updatedAt = event.block.timestamp; let pairDayData = updatePairDayData(event, pair); - pairDayData.untrackedBaseVolume = pairDayData.untrackedBaseVolume.plus( - untrackedBaseVolume - ); - pairDayData.untrackedQuoteVolume = pairDayData.untrackedBaseVolume.plus( - untrackedQuoteVolume - ); + pairDayData.untrackedBaseVolume = + pairDayData.untrackedBaseVolume.plus(untrackedBaseVolume); + pairDayData.untrackedQuoteVolume = + pairDayData.untrackedBaseVolume.plus(untrackedQuoteVolume); pairDayData.volumeBase = pairDayData.volumeBase.plus(baseVolume); pairDayData.volumeQuote = pairDayData.volumeQuote.plus(quoteVolume); pairDayData.feeBase = pairDayData.feeBase.plus(feeBase); @@ -722,9 +744,8 @@ export function updateStatistics( pairDayData.updatedAt = event.block.timestamp; let baseDayData = updateTokenDayData(baseToken, event); - baseDayData.untrackedVolume = baseDayData.untrackedVolume.plus( - untrackedBaseVolume - ); + baseDayData.untrackedVolume = + baseDayData.untrackedVolume.plus(untrackedBaseVolume); baseDayData.volume = baseDayData.volume.plus(baseVolume); baseDayData.fee = baseDayData.fee.plus(feeBase); baseDayData.txns = baseDayData.txns.plus(ONE_BI); @@ -732,9 +753,8 @@ export function updateStatistics( baseDayData.updatedAt = event.block.timestamp; let quoteDayData = updateTokenDayData(quoteToken, event); - quoteDayData.untrackedVolume = baseDayData.untrackedVolume.plus( - untrackedQuoteVolume - ); + quoteDayData.untrackedVolume = + baseDayData.untrackedVolume.plus(untrackedQuoteVolume); quoteDayData.volume = quoteDayData.volume.plus(quoteVolume); quoteDayData.fee = quoteDayData.fee.plus(feeQuote); quoteDayData.txns = quoteDayData.txns.plus(ONE_BI); @@ -742,10 +762,7 @@ export function updateStatistics( quoteDayData.updatedAt = event.block.timestamp; let fromTraderPair = PairTrader.load( - event.transaction.from - .toHexString() - .concat("-") - .concat(pair.id) + event.transaction.from.toHexString().concat("-").concat(pair.id) ); pairHourData.traders = pairHourData.traders.plus(ONE_BI); baseDayData.traders = baseDayData.traders.plus(ONE_BI); @@ -757,10 +774,7 @@ export function updateStatistics( } let toTraderPair = PairTrader.load( - to - .toHexString() - .concat("-") - .concat(pair.id) + to.toHexString().concat("-").concat(pair.id) ); pairHourData.traders = pairHourData.traders.plus(ONE_BI); baseDayData.traders = baseDayData.traders.plus(ONE_BI); diff --git a/src/mappings/dodoex/pool.ts b/src/mappings/dodoex/pool.ts index 336bcaf..3522f42 100644 --- a/src/mappings/dodoex/pool.ts +++ b/src/mappings/dodoex/pool.ts @@ -1,4 +1,10 @@ -import { BigInt, BigDecimal, ethereum, log } from "@graphprotocol/graph-ts"; +import { + BigInt, + BigDecimal, + ethereum, + log, + Address, +} from "@graphprotocol/graph-ts"; import { OrderHistory, Token, @@ -24,6 +30,8 @@ import { updateUserDayDataAndDodoDayData, updateTokenTraderCount, createPairDetail, + exponentToBigDecimal, + updatePairPmm, } from "./helpers"; import { DODOSwap, @@ -33,6 +41,12 @@ import { } from "../../types/dodoex/templates/DVM/DVM"; import { LpFeeRateChange, DPP } from "../../types/dodoex/templates/DPP/DPP"; import { OwnershipTransferred } from "../../types/dodoex/templates/DPPOracleAdmin/DPPOracleAdmin"; +import { + IChange, + KChange, + RChange, + MtFeeRateChange, +} from "../../types/dodoex/templates/GSP/GSP"; import { DVM__getPMMStateResultStateStruct } from "../../types/dodoex/DVMFactory/DVM"; import { calculateUsdVolume, updatePrice } from "./pricing"; import { addToken, addTransaction, addVolume } from "./transaction"; @@ -48,6 +62,7 @@ import { TRANSACTION_TYPE_LP_REMOVE, TRANSACTION_TYPE_CP_CLAIM, DIP3_TIMESTAMP, + TYPE_GSP_POOL, } from "../constant"; export function handleDODOSwap(event: DODOSwap): void { @@ -157,15 +172,13 @@ export function handleDODOSwap(event: DODOSwap): void { pair.untrackedQuoteVolume = pair.untrackedQuoteVolume.plus(quoteVolume); untrackedBaseVolume = baseVolume; untrackedQuoteVolume = quoteVolume; - fromToken.untrackedVolume = fromToken.untrackedVolume.plus( - dealedFromAmount - ); + fromToken.untrackedVolume = + fromToken.untrackedVolume.plus(dealedFromAmount); toToken.untrackedVolume = fromToken.untrackedVolume.plus(dealedToAmount); } pair.untrackedBaseVolume = pair.untrackedBaseVolume.plus(untrackedBaseVolume); - pair.untrackedQuoteVolume = pair.untrackedQuoteVolume.plus( - untrackedQuoteVolume - ); + pair.untrackedQuoteVolume = + pair.untrackedQuoteVolume.plus(untrackedQuoteVolume); pair.save(); //3、user info update @@ -304,6 +317,8 @@ export function handleBuyShares(event: BuyShares): void { } createPairDetail(pair, pmmState, event.block.timestamp); + let lpToken = createLpToken(event.address, pair as Pair); + let baseAmountChange = convertTokenToDecimal( pmmState.B, baseToken.decimals @@ -313,8 +328,6 @@ export function handleBuyShares(event: BuyShares): void { quoteToken.decimals ).minus(pair.quoteReserve); - let lpToken = createLpToken(event.address, pair as Pair); - let dealedSharesAmount = convertTokenToDecimal( event.params.increaseShares, lpToken.decimals @@ -352,7 +365,6 @@ export function handleBuyShares(event: BuyShares): void { baseToken.txCount = baseToken.txCount.plus(ONE_BI); quoteToken.txCount = quoteToken.txCount.plus(ONE_BI); - lpToken.totalSupply = lpToken.totalSupply.plus(event.params.increaseShares); //增加shares发生时的快照 let liquidityHistoryID = event.transaction.hash @@ -434,9 +446,15 @@ export function handleSellShares(event: SellShares): void { return; } createPairDetail(pair, pmmState, event.block.timestamp); - let lpToken = createLpToken(event.address, pair as Pair); + let baseAmountChange = pair.baseReserve.minus( + convertTokenToDecimal(pmmState.B, baseToken.decimals) + ); + let quoteAmountChange = pair.quoteReserve.minus( + convertTokenToDecimal(pmmState.Q, quoteToken.decimals) + ); + let dealedSharesAmount = convertTokenToDecimal( event.params.decreaseShares, lpToken.decimals @@ -477,7 +495,6 @@ export function handleSellShares(event: SellShares): void { baseToken.txCount = baseToken.txCount.plus(ONE_BI); quoteToken.txCount = quoteToken.txCount.plus(ONE_BI); - lpToken.totalSupply = lpToken.totalSupply.minus(event.params.decreaseShares); //增加shares发生时的快照 let liquidityHistoryID = event.transaction.hash .toHexString() @@ -502,6 +519,8 @@ export function handleSellShares(event: SellShares): void { lpToken.totalSupply, lpToken.decimals ); + liquidityHistory.baseAmountChange = baseAmountChange; + liquidityHistory.quoteAmountChange = quoteAmountChange; } //更新时间戳 @@ -545,28 +564,14 @@ export function handleLpFeeRateChange(event: LpFeeRateChange): void { if (pair === null) { return; } - if (pair.type == TYPE_DPP_POOL) { + if (pair.type == TYPE_DPP_POOL || pair.type == TYPE_GSP_POOL) { let dpp = DPP.bind(event.address); pair.lpFeeRate = convertTokenToDecimal( dpp._LP_FEE_RATE_(), BigInt.fromI32(18) ); - let pmmState: DVM__getPMMStateResultStateStruct | null; - pmmState = getPMMState(event.address); - if (pmmState == null) { - return; - } - createPairDetail(pair, pmmState, event.block.timestamp); - let baseToken = Token.load(pair.baseToken) as Token; - let quoteToken = Token.load(pair.quoteToken) as Token; - - pair.baseReserve = convertTokenToDecimal(pmmState.B, baseToken.decimals); - pair.quoteReserve = convertTokenToDecimal(pmmState.Q, quoteToken.decimals); - pair.i = pmmState.i; - pair.k = pmmState.K; - pair.updatedAt = event.block.timestamp; - pair.save(); + updatePairPmm(event.address, pair, event); } } @@ -598,9 +603,8 @@ export function handleTransfer(event: Transfer): void { position.lastTxTime = event.block.timestamp; position.liquidityTokenInMining = ZERO_BD; } - position.liquidityTokenBalance = position.liquidityTokenBalance.plus( - dealedAmount - ); + position.liquidityTokenBalance = + position.liquidityTokenBalance.plus(dealedAmount); position.updatedAt = event.block.timestamp; position.save(); } @@ -619,9 +623,8 @@ export function handleTransfer(event: Transfer): void { position.lastTxTime = ZERO_BI; position.liquidityTokenInMining = ZERO_BD; } - position.liquidityTokenBalance = position.liquidityTokenBalance.minus( - dealedAmount - ); + position.liquidityTokenBalance = + position.liquidityTokenBalance.minus(dealedAmount); position.updatedAt = event.block.timestamp; position.save(); } @@ -642,3 +645,33 @@ export function handleDPPOwnershipTransferred( dppOracleAdmin.updatedAt = event.block.timestamp; dppOracleAdmin.save(); } + +export function handleIChange(event: IChange): void { + let pair = Pair.load(event.address.toHexString()); + if (!pair) return; + pair.i = event.params.newI; + pair.updatedAt = event.block.timestamp; + pair.save(); +} + +export function handleKChange(event: KChange): void { + let pair = Pair.load(event.address.toHexString()); + if (!pair) return; + pair.k = event.params.newK; + pair.updatedAt = event.block.timestamp; + pair.save(); +} + +export function handleRChange(event: RChange): void { + let pair = Pair.load(event.address.toHexString()); + if (!pair) return; + updatePairPmm(event.address, pair, event); +} + +export function handleMtFeeRateChange(event: MtFeeRateChange): void { + let pair = Pair.load(event.address.toHexString()); + if (!pair) return; + pair.mtFeeRate = event.params.newMtFee; + pair.updatedAt = event.block.timestamp; + pair.save(); +} diff --git a/src/mappings/dodoex/poolFactory.ts b/src/mappings/dodoex/poolFactory.ts index c8433ff..a265d31 100644 --- a/src/mappings/dodoex/poolFactory.ts +++ b/src/mappings/dodoex/poolFactory.ts @@ -34,6 +34,7 @@ import { import { NewDPP, RemoveDPP } from "../../types/dodoex/DPPFactory/DPPFactory"; import { NewDVM, RemoveDVM } from "../../types/dodoex/DVMFactory/DVMFactory"; import { NewDSP, RemoveDSP } from "../../types/dodoex/DSPFactory/DSPFactory"; +import { NewGSP, RemoveGSP } from "../../types/dodoex/GSPFactory/GSPFactory"; import { NewRegistry, RemoveRegistry, @@ -41,6 +42,7 @@ import { import { DVM } from "../../types/dodoex/DVMFactory/DVM"; import { DPP } from "../../types/dodoex/DPPFactory/DPP"; import { DSP } from "../../types/dodoex/DSPFactory/DSP"; +import { GSP } from "../../types/dodoex/GSPFactory/GSP"; import { NewCP } from "../../types/dodoex/CrowdPoolingFactory/CrowdPoolingFactory"; import { RemoveCP } from "../../types/dodoex/CrowdPoolingFactoryV2/CrowdPoolingFactoryV2"; @@ -50,6 +52,7 @@ import { CP as CPTemplate, CPV2 as CPV2Template, DSP as DSPTemplate, + GSP as GSPTemplate, DPPOracleAdmin as DPPOracleAdminTemplate, } from "../../types/dodoex/templates"; import { @@ -60,6 +63,7 @@ import { SOURCE_SMART_ROUTE, SOURCE_POOL_SWAP, CROWDPOOLING_FACTORY_V2, + TYPE_GSP_POOL, } from "../constant"; import { CP } from "../../types/dodoex/CrowdPoolingFactory/CP"; import { ADDRESS_ZERO } from "../constant"; @@ -329,6 +333,91 @@ export function handleNewDSP(event: NewDSP): void { DSPTemplate.create(event.params.DSP); } +export function handleNewGSP(event: NewGSP): void { + createUser(event.params.creator, event); + //1、获取token schema信息 + let baseToken = createToken(event.params.baseToken, event); + let quoteToken = createToken(event.params.quoteToken, event); + let pair = Pair.load(event.params.GSP.toHexString()); + + if (pair == null) { + pair = new Pair(event.params.GSP.toHexString()); + pair.baseToken = event.params.baseToken.toHexString(); + pair.type = TYPE_GSP_POOL; + pair.quoteToken = event.params.quoteToken.toHexString(); + pair.baseSymbol = baseToken.symbol; + pair.quoteSymbol = quoteToken.symbol; + pair.creator = event.params.creator; + pair.owner = pair.creator; + pair.createdAtTimestamp = event.block.timestamp; + pair.createdAtBlockNumber = event.block.number; + + pair.baseLpToken = event.params.GSP.toHexString(); + pair.quoteLpToken = event.params.GSP.toHexString(); + createLpToken(event.params.GSP, pair as Pair); + + pair.lastTradePrice = ZERO_BD; + pair.txCount = ZERO_BI; + pair.volumeBaseToken = ZERO_BD; + pair.volumeQuoteToken = ZERO_BD; + pair.liquidityProviderCount = ZERO_BI; + pair.untrackedBaseVolume = ZERO_BD; + pair.untrackedQuoteVolume = ZERO_BD; + pair.feeBase = ZERO_BD; + pair.feeQuote = ZERO_BD; + pair.traderCount = ZERO_BI; + pair.isTradeAllowed = true; + pair.isDepositBaseAllowed = true; + pair.isDepositQuoteAllowed = true; + pair.volumeUSD = ZERO_BD; + pair.feeUSD = ZERO_BD; + + let gsp = GSP.bind(event.params.GSP); + let pmmState = gsp.try_getPMMState(); + if (pmmState.reverted == false) { + createPairDetail(pair, pmmState.value, event.block.timestamp); + pair.i = pmmState.value.i; + pair.k = pmmState.value.K; + pair.baseReserve = convertTokenToDecimal( + pmmState.value.B, + baseToken.decimals + ); + pair.quoteReserve = convertTokenToDecimal( + pmmState.value.Q, + quoteToken.decimals + ); + pair.lpFeeRate = convertTokenToDecimal( + gsp._LP_FEE_RATE_(), + BigInt.fromI32(18) + ); + pair.mtFeeRateModel = gsp._MT_FEE_RATE_MODEL_(); + pair.maintainer = gsp._MAINTAINER_(); + } else { + pair.i = ZERO_BI; + pair.k = ZERO_BI; + pair.baseReserve = ZERO_BD; + pair.quoteReserve = ZERO_BD; + pair.lpFeeRate = ZERO_BD; + pair.mtFeeRateModel = Address.fromString(ADDRESS_ZERO); + pair.maintainer = Address.fromString(ADDRESS_ZERO); + } + pair.mtFeeRate = ZERO_BI; + pair.mtFeeBase = ZERO_BD; + pair.mtFeeQuote = ZERO_BD; + pair.mtFeeUSD = ZERO_BD; + pair.updatedAt = event.block.timestamp; + + pair.save(); + + let dodoZoo = getDODOZoo(); + dodoZoo.pairCount = dodoZoo.pairCount.plus(ONE_BI); + dodoZoo.updatedAt = event.block.timestamp; + dodoZoo.save(); + } + + GSPTemplate.create(event.params.GSP); +} + export function handleNewCP(event: NewCP): void { createUser(event.params.creator, event); //1、检查token情况 @@ -496,6 +585,10 @@ export function handleRemoveDSP(event: RemoveDSP): void { store.remove("Pair", event.params.DSP.toHexString()); } +export function handleRemoveGSP(event: RemoveGSP): void { + store.remove("Pair", event.params.GSP.toHexString()); +} + export function handleRemoveRegistry(event: RemoveRegistry): void { store.remove("Pair", event.params.fragment.toHexString()); } diff --git a/src/mappings/dpoint/factory.ts b/src/mappings/dpoint/factory.ts new file mode 100644 index 0000000..ec0c8d5 --- /dev/null +++ b/src/mappings/dpoint/factory.ts @@ -0,0 +1,6 @@ +import { CreateVault as CreateVaultEvent } from "../../types/dpoint/LockedTokenVaultFactory/LockedTokenVaultFactory"; +import { LockedTokenVault as LockedTokenVaultTemplate } from "../../types/dpoint/templates"; + +export function handleCreateVault(event: CreateVaultEvent): void { + LockedTokenVaultTemplate.create(event.params.vault); +} \ No newline at end of file diff --git a/src/mappings/dpoint/index.ts b/src/mappings/dpoint/index.ts new file mode 100644 index 0000000..9922940 --- /dev/null +++ b/src/mappings/dpoint/index.ts @@ -0,0 +1,59 @@ +import { Address, BigInt, ethereum, log } from "@graphprotocol/graph-ts"; +import { ERC20 } from "../../types/dpoint/LockedTokenVaultFactory/ERC20"; +import { Claimed, Token } from "../../types/dpoint/schema"; +import { Claim as ClaimEvent, LockedTokenVault } from "../../types/dpoint/templates/LockedTokenVault/LockedTokenVault"; + +export function handleClaim(event: ClaimEvent): 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.holder; + entity.amount = event.params.amount; + entity.originAmount = event.params.origin; + entity.claimedAmount = event.params.claimed; + entity.address = event.address; + + let lockedTokenVault = LockedTokenVault.bind(event.address); + let tokenAddress = lockedTokenVault.try__TOKEN_(); + if (tokenAddress.reverted) { + log.info("lockedTokenVault.try__TOKEN_ reverted: {}", [entity.id]); + } + let token = createToken(tokenAddress.value, event); + entity.token = token.id; + + let remainingRatio = lockedTokenVault.try_getRemainingRatio(event.block.timestamp); + if (remainingRatio.reverted) { + log.info("lockedTokenVault.try_getRemainingRatio reverted: {}", [entity.id]); + } + entity.remainingRatio = remainingRatio.value; + + 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; +} \ No newline at end of file diff --git a/src/mappings/token/helpers.ts b/src/mappings/token/helpers.ts index d7338f6..98a38a4 100644 --- a/src/mappings/token/helpers.ts +++ b/src/mappings/token/helpers.ts @@ -6,9 +6,9 @@ import { Address, ethereum, } from "@graphprotocol/graph-ts"; -import { ERC20 } from "../../types/token/ERC20Factory/ERC20"; -import { ERC20NameBytes } from "../../types/token/ERC20Factory/ERC20NameBytes"; -import { ERC20SymbolBytes } from "../../types/token/ERC20Factory/ERC20SymbolBytes"; +import { ERC20 } from "../../types/token/ERC20V2Factory/ERC20"; +import { ERC20NameBytes } from "../../types/token/ERC20V2Factory/ERC20NameBytes"; +import { ERC20SymbolBytes } from "../../types/token/ERC20V2Factory/ERC20SymbolBytes"; import { User, DodoToken } from "../../types/token/schema"; import { diff --git a/src/mappings/vdodo/core.ts b/src/mappings/vdodo/core.ts index 384e3d6..a9410f3 100644 --- a/src/mappings/vdodo/core.ts +++ b/src/mappings/vdodo/core.ts @@ -1,298 +1,475 @@ -import {BigInt, BigDecimal, ethereum, log, Address, dataSource} from '@graphprotocol/graph-ts' import { - User, - MintHistory, - RedeemHistory, - DODO, - vDODO, - UserOperationHistory, - TransferHistory, - DonateHistory -} from "../../types/vdodo/schema" + BigInt, + BigDecimal, + ethereum, + log, + Address, + dataSource, +} from "@graphprotocol/graph-ts"; import { - ZERO_BD, - ONE_BI, - convertTokenToDecimal, - createUser, - fetchUserInfo, - initTokenInfo, - fetchTokenBalance, ZERO_BI, fetchTotalSp -} from "./helpers" + User, + MintHistory, + RedeemHistory, + DODO, + vDODO, + UserOperationHistory, + TransferHistory, + DonateHistory, +} from "../../types/vdodo/schema"; import { - MintVDODO, - RedeemVDODO, - Transfer, - PreDeposit, - ChangePerReward, - DonateDODO -} from "../../types/vdodo/vDODOToken/vDODOToken" + ZERO_BD, + ONE_BI, + convertTokenToDecimal, + createUser, + fetchUserInfo, + initTokenInfo, + fetchTokenBalance, + ZERO_BI, + fetchTotalSp, +} from "./helpers"; import { - DODO_ADDRESS_KOVAN, - DODO_ADDRESS_MAINNET -} from "./constants" + MintVDODO, + RedeemVDODO, + Transfer, + PreDeposit, + ChangePerReward, + DonateDODO, +} from "../../types/vdodo/vDODOToken/vDODOToken"; +import { DODO_ADDRESS_KOVAN, DODO_ADDRESS_MAINNET } from "./constants"; export function handleMintVDODO(event: MintVDODO): void { - initTokenInfo(); - let vdodo = vDODO.load(dataSource.address().toHexString()); - let DODO_ADDRESS = dataSource.network() == "mainnet" ? DODO_ADDRESS_MAINNET : DODO_ADDRESS_KOVAN; - let dodo = DODO.load(DODO_ADDRESS); - - let user = User.load(event.params.user.toHexString()); - if (user == null) { - if (vdodo.totalUsers.equals(ZERO_BI)) { - vdodo.totalUsers = vdodo.totalUsers.plus(ONE_BI); - } - vdodo.totalUsers = vdodo.totalUsers.plus(ONE_BI); - user = createUser(event.params.user, event); + initTokenInfo(); + let vdodo = vDODO.load(dataSource.address().toHexString()); + if (vdodo == null) return; + let DODO_ADDRESS = + dataSource.network() == "mainnet" + ? DODO_ADDRESS_MAINNET + : DODO_ADDRESS_KOVAN; + let dodo = DODO.load(DODO_ADDRESS); + if (dodo == null) return; + + let user = User.load(event.params.user.toHexString()); + if (user == null) { + if (vdodo.totalUsers.equals(ZERO_BI)) { + vdodo.totalUsers = vdodo.totalUsers.plus(ONE_BI); } - let history = MintHistory.load(event.transaction.hash.toHexString().concat("-").concat(event.logIndex.toString())); - - let userInfo = fetchUserInfo(event.params.user); - let superiorSpChange = userInfo.value1.minus(user.superiorSP); - let userSpChange = userInfo.value0.minus(user.stakingPower); - user.stakingPower = userInfo.value0; - user.superiorSP = userInfo.value1; - user.credit = convertTokenToDecimal(userInfo.value3, dodo.decimals); - user.superior = userInfo.value2; - - if (history == null) { - history = new MintHistory(event.transaction.hash.toHexString().concat("-").concat(event.logIndex.toString())) - history.amount = convertTokenToDecimal(event.params.mintDODO, dodo.decimals); - history.user = user.id; - history.timestamp = event.block.timestamp; - } - - let operation = UserOperationHistory.load(event.transaction.hash.toHexString()); - if (operation == null) { - operation = new UserOperationHistory(event.transaction.hash.toHexString()); - operation.amount = ZERO_BD; - operation.timestamp = event.block.timestamp; - operation.type = "MINT"; - operation.user = user.id; - operation.superiorSpChange = ZERO_BI; - operation.superiorCreditChange = ZERO_BD; - } - - let superiorUserInfo = fetchUserInfo(Address.fromString(user.superior.toHexString())); - let superior = createUser(Address.fromString(user.superior.toHexString()), event) - - let superiorCreditChange = convertTokenToDecimal(superiorUserInfo.value3, dodo.decimals).minus(superior.credit); - - superior.stakingPower = superiorUserInfo.value0; - superior.superiorSP = superiorUserInfo.value1; - superior.credit = convertTokenToDecimal(superiorUserInfo.value3, dodo.decimals); - superior.superior = superiorUserInfo.value2; - superior.spFromInvited = superior.spFromInvited.plus(superiorSpChange); - superior.creditFromInvited = superior.creditFromInvited.plus(superiorCreditChange); - - operation.superiorSpChange = superiorSpChange; - operation.superiorCreditChange = superiorCreditChange; - operation.amount = operation.amount.plus(convertTokenToDecimal(event.params.mintDODO, dodo.decimals)); - - vdodo.mintAmount = vdodo.mintAmount.plus(convertTokenToDecimal(event.params.mintDODO, dodo.decimals)); - user.mintAmount = user.mintAmount.plus(convertTokenToDecimal(event.params.mintDODO, dodo.decimals)); - user.creditOfSuperior = user.creditOfSuperior.plus(superiorCreditChange); - vdodo.dodoBalance = convertTokenToDecimal(fetchTokenBalance(Address.fromString(DODO_ADDRESS), dataSource.address()), dodo.decimals); - vdodo.totalStakingPower = fetchTotalSp(); - - vdodo.updatedAt = event.block.timestamp; - superior.updatedAt = event.block.timestamp; - operation.updatedAt = event.block.timestamp; - history.updatedAt = event.block.timestamp; - user.updatedAt = event.block.timestamp; - - superior.save(); - vdodo.save(); - operation.save(); - history.save(); - user.save(); + vdodo.totalUsers = vdodo.totalUsers.plus(ONE_BI); + user = createUser(event.params.user, event); + } + let history = MintHistory.load( + event.transaction.hash + .toHexString() + .concat("-") + .concat(event.logIndex.toString()) + ); + + let userInfo = fetchUserInfo(event.params.user); + let superiorSpChange = userInfo.value1.minus(user.superiorSP); + let userSpChange = userInfo.value0.minus(user.stakingPower); + user.stakingPower = userInfo.value0; + user.superiorSP = userInfo.value1; + user.credit = convertTokenToDecimal(userInfo.value3, dodo.decimals); + user.superior = userInfo.value2; + + if (history == null) { + history = new MintHistory( + event.transaction.hash + .toHexString() + .concat("-") + .concat(event.logIndex.toString()) + ); + history.amount = convertTokenToDecimal( + event.params.mintDODO, + dodo.decimals + ); + history.user = user.id; + history.timestamp = event.block.timestamp; + } + + let operation = UserOperationHistory.load( + event.transaction.hash.toHexString() + ); + if (operation == null) { + operation = new UserOperationHistory(event.transaction.hash.toHexString()); + operation.amount = ZERO_BD; + operation.timestamp = event.block.timestamp; + operation.type = "MINT"; + operation.user = user.id; + operation.superiorSpChange = ZERO_BI; + operation.superiorCreditChange = ZERO_BD; + } + + let superiorUserInfo = fetchUserInfo( + Address.fromString(user.superior.toHexString()) + ); + let superior = createUser( + Address.fromString(user.superior.toHexString()), + event + ); + + let superiorCreditChange = convertTokenToDecimal( + superiorUserInfo.value3, + dodo.decimals + ).minus(superior.credit); + + superior.stakingPower = superiorUserInfo.value0; + superior.superiorSP = superiorUserInfo.value1; + superior.credit = convertTokenToDecimal( + superiorUserInfo.value3, + dodo.decimals + ); + superior.superior = superiorUserInfo.value2; + superior.spFromInvited = superior.spFromInvited.plus(superiorSpChange); + superior.creditFromInvited = + superior.creditFromInvited.plus(superiorCreditChange); + + operation.superiorSpChange = superiorSpChange; + operation.superiorCreditChange = superiorCreditChange; + operation.amount = operation.amount.plus( + convertTokenToDecimal(event.params.mintDODO, dodo.decimals) + ); + + vdodo.mintAmount = vdodo.mintAmount.plus( + convertTokenToDecimal(event.params.mintDODO, dodo.decimals) + ); + user.mintAmount = user.mintAmount.plus( + convertTokenToDecimal(event.params.mintDODO, dodo.decimals) + ); + user.creditOfSuperior = user.creditOfSuperior.plus(superiorCreditChange); + vdodo.dodoBalance = convertTokenToDecimal( + fetchTokenBalance(Address.fromString(DODO_ADDRESS), dataSource.address()), + dodo.decimals + ); + vdodo.totalStakingPower = fetchTotalSp(); + + vdodo.updatedAt = event.block.timestamp; + superior.updatedAt = event.block.timestamp; + operation.updatedAt = event.block.timestamp; + history.updatedAt = event.block.timestamp; + user.updatedAt = event.block.timestamp; + + superior.save(); + vdodo.save(); + operation.save(); + history.save(); + user.save(); } export function handleRedeemVDODO(event: RedeemVDODO): void { - initTokenInfo(); - let vdodo = vDODO.load(dataSource.address().toHexString()); - let DODO_ADDRESS = dataSource.network() == "mainnet" ? DODO_ADDRESS_MAINNET : DODO_ADDRESS_KOVAN; - let dodo = DODO.load(DODO_ADDRESS); - - let user = User.load(event.params.user.toHexString()); - if (user == null) { - vdodo.totalUsers = vdodo.totalUsers.plus(ONE_BI); - user = createUser(event.params.user, event); - } - - let history = RedeemHistory.load(event.transaction.hash.toHexString().concat("-").concat(event.logIndex.toString())); - - let userInfo = fetchUserInfo(event.params.user); - let superiorSpChange = userInfo.value1.minus(user.superiorSP); - let userSpChange = userInfo.value0.minus(user.stakingPower); - user.stakingPower = userInfo.value0; - user.superiorSP = userInfo.value1; - user.credit = convertTokenToDecimal(userInfo.value3, dodo.decimals); - user.superior = userInfo.value2; - - if (history == null) { - history = new RedeemHistory(event.transaction.hash.toHexString().concat("-").concat(event.logIndex.toString())) - history.recieve = convertTokenToDecimal(event.params.receiveDODO, dodo.decimals); - history.burn = convertTokenToDecimal(event.params.burnDODO, dodo.decimals); - history.fee = convertTokenToDecimal(event.params.feeDODO, dodo.decimals); - history.user = user.id; - history.timestamp = event.block.timestamp; - } - - let operation = UserOperationHistory.load(event.transaction.hash.toHexString()); - if (operation == null) { - operation = new UserOperationHistory(event.transaction.hash.toHexString()); - operation.amount = ZERO_BD; - operation.timestamp = event.block.timestamp; - operation.type = "REDEEM"; - operation.user = user.id; - operation.superiorSpChange = ZERO_BI; - operation.superiorCreditChange = ZERO_BD; - } - - let superiorUserInfo = fetchUserInfo(Address.fromString(user.superior.toHexString())); - let superior = createUser(Address.fromString(user.superior.toHexString()), event) - let superiorCreditChange = convertTokenToDecimal(superiorUserInfo.value3, dodo.decimals).minus(superior.credit); - - superior.stakingPower = superiorUserInfo.value0; - superior.superiorSP = superiorUserInfo.value1; - superior.credit = convertTokenToDecimal(superiorUserInfo.value3, dodo.decimals); - superior.superior = superiorUserInfo.value2; - superior.spFromInvited = superior.spFromInvited.plus(superiorSpChange); - superior.creditFromInvited = superior.creditFromInvited.plus(superiorCreditChange); - - operation.superiorSpChange = superiorSpChange; - operation.superiorCreditChange = superiorCreditChange; - operation.amount = operation.amount.plus(convertTokenToDecimal(event.params.receiveDODO, dodo.decimals)); - - vdodo.redeemAmount = vdodo.redeemAmount.plus(convertTokenToDecimal(event.params.receiveDODO, dodo.decimals)); - user.redeemRecieveAmount = user.redeemRecieveAmount.plus(convertTokenToDecimal(event.params.receiveDODO, dodo.decimals)); - user.redeemFeeAmount = user.redeemFeeAmount.plus(convertTokenToDecimal(event.params.feeDODO, dodo.decimals)); - user.redeemBurnAmount = user.redeemBurnAmount.plus(convertTokenToDecimal(event.params.burnDODO, dodo.decimals)); - user.creditOfSuperior = user.creditOfSuperior.plus(superiorCreditChange); - vdodo.dodoBalance = convertTokenToDecimal(fetchTokenBalance(Address.fromString(DODO_ADDRESS), dataSource.address()), dodo.decimals); - vdodo.totalStakingPower = fetchTotalSp(); - vdodo.feeAmount = vdodo.feeAmount.plus(convertTokenToDecimal(event.params.feeDODO, dodo.decimals)); - vdodo.burnAmount = vdodo.feeAmount.plus(convertTokenToDecimal(event.params.burnDODO, dodo.decimals)); - - vdodo.updatedAt = event.block.timestamp; - superior.updatedAt = event.block.timestamp; - operation.updatedAt = event.block.timestamp; - history.updatedAt = event.block.timestamp; - user.updatedAt = event.block.timestamp; - - superior.save(); - vdodo.save(); - operation.save(); - history.save(); - user.save(); + initTokenInfo(); + let vdodo = vDODO.load(dataSource.address().toHexString()); + if (vdodo == null) return; + let DODO_ADDRESS = + dataSource.network() == "mainnet" + ? DODO_ADDRESS_MAINNET + : DODO_ADDRESS_KOVAN; + let dodo = DODO.load(DODO_ADDRESS); + if (dodo == null) return; + + let user = User.load(event.params.user.toHexString()); + if (user == null) { + vdodo.totalUsers = vdodo.totalUsers.plus(ONE_BI); + user = createUser(event.params.user, event); + } + + let history = RedeemHistory.load( + event.transaction.hash + .toHexString() + .concat("-") + .concat(event.logIndex.toString()) + ); + + let userInfo = fetchUserInfo(event.params.user); + let superiorSpChange = userInfo.value1.minus(user.superiorSP); + let userSpChange = userInfo.value0.minus(user.stakingPower); + user.stakingPower = userInfo.value0; + user.superiorSP = userInfo.value1; + user.credit = convertTokenToDecimal(userInfo.value3, dodo.decimals); + user.superior = userInfo.value2; + + if (history == null) { + history = new RedeemHistory( + event.transaction.hash + .toHexString() + .concat("-") + .concat(event.logIndex.toString()) + ); + history.recieve = convertTokenToDecimal( + event.params.receiveDODO, + dodo.decimals + ); + history.burn = convertTokenToDecimal(event.params.burnDODO, dodo.decimals); + history.fee = convertTokenToDecimal(event.params.feeDODO, dodo.decimals); + history.user = user.id; + history.timestamp = event.block.timestamp; + } + + let operation = UserOperationHistory.load( + event.transaction.hash.toHexString() + ); + if (operation == null) { + operation = new UserOperationHistory(event.transaction.hash.toHexString()); + operation.amount = ZERO_BD; + operation.timestamp = event.block.timestamp; + operation.type = "REDEEM"; + operation.user = user.id; + operation.superiorSpChange = ZERO_BI; + operation.superiorCreditChange = ZERO_BD; + } + + let superiorUserInfo = fetchUserInfo( + Address.fromString(user.superior.toHexString()) + ); + let superior = createUser( + Address.fromString(user.superior.toHexString()), + event + ); + let superiorCreditChange = convertTokenToDecimal( + superiorUserInfo.value3, + dodo.decimals + ).minus(superior.credit); + + superior.stakingPower = superiorUserInfo.value0; + superior.superiorSP = superiorUserInfo.value1; + superior.credit = convertTokenToDecimal( + superiorUserInfo.value3, + dodo.decimals + ); + superior.superior = superiorUserInfo.value2; + superior.spFromInvited = superior.spFromInvited.plus(superiorSpChange); + superior.creditFromInvited = + superior.creditFromInvited.plus(superiorCreditChange); + + operation.superiorSpChange = superiorSpChange; + operation.superiorCreditChange = superiorCreditChange; + operation.amount = operation.amount.plus( + convertTokenToDecimal(event.params.receiveDODO, dodo.decimals) + ); + + vdodo.redeemAmount = vdodo.redeemAmount.plus( + convertTokenToDecimal(event.params.receiveDODO, dodo.decimals) + ); + user.redeemRecieveAmount = user.redeemRecieveAmount.plus( + convertTokenToDecimal(event.params.receiveDODO, dodo.decimals) + ); + user.redeemFeeAmount = user.redeemFeeAmount.plus( + convertTokenToDecimal(event.params.feeDODO, dodo.decimals) + ); + user.redeemBurnAmount = user.redeemBurnAmount.plus( + convertTokenToDecimal(event.params.burnDODO, dodo.decimals) + ); + user.creditOfSuperior = user.creditOfSuperior.plus(superiorCreditChange); + vdodo.dodoBalance = convertTokenToDecimal( + fetchTokenBalance(Address.fromString(DODO_ADDRESS), dataSource.address()), + dodo.decimals + ); + vdodo.totalStakingPower = fetchTotalSp(); + vdodo.feeAmount = vdodo.feeAmount.plus( + convertTokenToDecimal(event.params.feeDODO, dodo.decimals) + ); + vdodo.burnAmount = vdodo.feeAmount.plus( + convertTokenToDecimal(event.params.burnDODO, dodo.decimals) + ); + + vdodo.updatedAt = event.block.timestamp; + superior.updatedAt = event.block.timestamp; + operation.updatedAt = event.block.timestamp; + history.updatedAt = event.block.timestamp; + user.updatedAt = event.block.timestamp; + + superior.save(); + vdodo.save(); + operation.save(); + history.save(); + user.save(); } export function handlePreDeposit(event: PreDeposit): void { - initTokenInfo(); - let vdodo = vDODO.load(dataSource.address().toHexString()); - let DODO_ADDRESS = dataSource.network() == "mainnet" ? DODO_ADDRESS_MAINNET : DODO_ADDRESS_KOVAN; - let dodo = DODO.load(DODO_ADDRESS); - vdodo.totalBlockReward = vdodo.totalBlockReward.plus(convertTokenToDecimal(event.params.dodoAmount, dodo.decimals)); - vdodo.updatedAt = event.block.timestamp; - vdodo.save(); + initTokenInfo(); + let vdodo = vDODO.load(dataSource.address().toHexString()); + if (vdodo == null) return; + let DODO_ADDRESS = + dataSource.network() == "mainnet" + ? DODO_ADDRESS_MAINNET + : DODO_ADDRESS_KOVAN; + let dodo = DODO.load(DODO_ADDRESS); + if (dodo == null) return; + vdodo.totalBlockReward = vdodo.totalBlockReward.plus( + convertTokenToDecimal(event.params.dodoAmount, dodo.decimals) + ); + vdodo.updatedAt = event.block.timestamp; + vdodo.save(); } export function handleChangePerReward(event: ChangePerReward): void { - initTokenInfo(); - let vdodo = vDODO.load(dataSource.address().toHexString()); - let DODO_ADDRESS = dataSource.network() == "mainnet" ? DODO_ADDRESS_MAINNET : DODO_ADDRESS_KOVAN; - let dodo = DODO.load(DODO_ADDRESS); - - vdodo.dodoPerBlock = convertTokenToDecimal(event.params.dodoPerBlock, dodo.decimals); - vdodo.updatedAt = event.block.timestamp; - vdodo.save(); + initTokenInfo(); + let vdodo = vDODO.load(dataSource.address().toHexString()); + if (vdodo == null) return; + let DODO_ADDRESS = + dataSource.network() == "mainnet" + ? DODO_ADDRESS_MAINNET + : DODO_ADDRESS_KOVAN; + let dodo = DODO.load(DODO_ADDRESS); + if (dodo == null) return; + + vdodo.dodoPerBlock = convertTokenToDecimal( + event.params.dodoPerBlock, + dodo.decimals + ); + vdodo.updatedAt = event.block.timestamp; + vdodo.save(); } export function handleTransfer(event: Transfer): void { - let vdodo = vDODO.load(dataSource.address().toHexString()); - let DODO_ADDRESS = dataSource.network() == "mainnet" ? DODO_ADDRESS_MAINNET : DODO_ADDRESS_KOVAN; - let dodo = DODO.load(DODO_ADDRESS); - - let fromUser = createUser(event.params.from, event); - let toUser = createUser(event.params.to, event); - let fromUserInfo = fetchUserInfo(event.params.from); - let toUserInfo = fetchUserInfo(event.params.to); - let spChangeFrom = fromUserInfo.value0.minus(fromUser.stakingPower); - let spChangeTo = toUserInfo.value0.minus(toUser.stakingPower); - - fromUser.stakingPower = fromUserInfo.value0; - fromUser.superiorSP = fromUserInfo.value1; - fromUser.credit = convertTokenToDecimal(fromUserInfo.value3, dodo.decimals); - - toUser.stakingPower = toUserInfo.value0; - toUser.superiorSP = toUserInfo.value1; - toUser.credit = convertTokenToDecimal(toUserInfo.value3, dodo.decimals); - - let fromUserSuperior = createUser(Address.fromString(fromUser.superior.toHexString()), event); - let toUserSuperior = createUser(Address.fromString(toUser.superior.toHexString()), event); - let fromUserSuperiorInfo = fetchUserInfo(Address.fromString(fromUser.superior.toHexString())); - let toUserSuperiorInfo = fetchUserInfo(Address.fromString(toUser.superior.toHexString())); - let spChangeFromUserSuperior = fromUserSuperiorInfo.value0.minus(fromUserSuperior.stakingPower); - let spChangeToUserSuperior = toUserSuperiorInfo.value0.minus(toUserSuperior.stakingPower); - let creditChangeFromUserSuperior = convertTokenToDecimal(fromUserSuperiorInfo.value3, dodo.decimals).minus(fromUserSuperior.credit); - let creditChangeToUserSuperior = convertTokenToDecimal(toUserSuperiorInfo.value3, dodo.decimals).minus(toUserSuperior.credit); - - fromUserSuperior.stakingPower = fromUserSuperiorInfo.value0; - fromUserSuperior.credit = convertTokenToDecimal(fromUserSuperiorInfo.value3, dodo.decimals); - fromUserSuperior.spFromInvited = fromUserSuperior.spFromInvited.plus(spChangeToUserSuperior); - fromUserSuperior.creditFromInvited = fromUserSuperior.creditFromInvited.plus(creditChangeFromUserSuperior); - - toUserSuperior.stakingPower = toUserSuperiorInfo.value0; - toUserSuperior.credit = convertTokenToDecimal(toUserSuperiorInfo.value3, dodo.decimals); - toUserSuperior.spFromInvited = toUserSuperior.spFromInvited.plus(spChangeFromUserSuperior); - toUserSuperior.creditFromInvited = toUserSuperior.creditFromInvited.plus(creditChangeToUserSuperior); - - fromUser.creditOfSuperior = fromUser.creditOfSuperior.plus(creditChangeFromUserSuperior); - fromUser.redeemRecieveAmount = fromUser.redeemRecieveAmount.plus(convertTokenToDecimal(event.params.amount, vdodo.decimals).times(BigDecimal.fromString("100"))) - toUser.creditOfSuperior = toUser.creditOfSuperior.plus(creditChangeToUserSuperior); - toUser.mintAmount = toUser.mintAmount.plus(convertTokenToDecimal(event.params.amount, vdodo.decimals).times(BigDecimal.fromString("100"))) - - fromUser.updatedAt = event.block.timestamp; - toUser.updatedAt = event.block.timestamp; - fromUserSuperior.updatedAt = event.block.timestamp; - toUserSuperior.updatedAt = event.block.timestamp; - - fromUser.save(); - toUser.save(); - fromUserSuperior.save(); - toUserSuperior.save(); - - let transferHistoryID = event.transaction.hash.toHexString().concat("-").concat(event.logIndex.toString()); - let transferHistory = TransferHistory.load(transferHistoryID); - if (transferHistory == null) { - transferHistory = new TransferHistory(transferHistoryID); - transferHistory.from = event.params.from; - transferHistory.to = event.params.to; - transferHistory.amount = convertTokenToDecimal(event.params.amount, vdodo.decimals); - } - - transferHistory.updatedAt = event.block.timestamp; - transferHistory.save(); + let vdodo = vDODO.load(dataSource.address().toHexString()); + if (vdodo == null) return; + let DODO_ADDRESS = + dataSource.network() == "mainnet" + ? DODO_ADDRESS_MAINNET + : DODO_ADDRESS_KOVAN; + let dodo = DODO.load(DODO_ADDRESS); + if (dodo == null) return; + + let fromUser = createUser(event.params.from, event); + let toUser = createUser(event.params.to, event); + let fromUserInfo = fetchUserInfo(event.params.from); + let toUserInfo = fetchUserInfo(event.params.to); + let spChangeFrom = fromUserInfo.value0.minus(fromUser.stakingPower); + let spChangeTo = toUserInfo.value0.minus(toUser.stakingPower); + + fromUser.stakingPower = fromUserInfo.value0; + fromUser.superiorSP = fromUserInfo.value1; + fromUser.credit = convertTokenToDecimal(fromUserInfo.value3, dodo.decimals); + + toUser.stakingPower = toUserInfo.value0; + toUser.superiorSP = toUserInfo.value1; + toUser.credit = convertTokenToDecimal(toUserInfo.value3, dodo.decimals); + + let fromUserSuperior = createUser( + Address.fromString(fromUser.superior.toHexString()), + event + ); + let toUserSuperior = createUser( + Address.fromString(toUser.superior.toHexString()), + event + ); + let fromUserSuperiorInfo = fetchUserInfo( + Address.fromString(fromUser.superior.toHexString()) + ); + let toUserSuperiorInfo = fetchUserInfo( + Address.fromString(toUser.superior.toHexString()) + ); + let spChangeFromUserSuperior = fromUserSuperiorInfo.value0.minus( + fromUserSuperior.stakingPower + ); + let spChangeToUserSuperior = toUserSuperiorInfo.value0.minus( + toUserSuperior.stakingPower + ); + let creditChangeFromUserSuperior = convertTokenToDecimal( + fromUserSuperiorInfo.value3, + dodo.decimals + ).minus(fromUserSuperior.credit); + let creditChangeToUserSuperior = convertTokenToDecimal( + toUserSuperiorInfo.value3, + dodo.decimals + ).minus(toUserSuperior.credit); + + fromUserSuperior.stakingPower = fromUserSuperiorInfo.value0; + fromUserSuperior.credit = convertTokenToDecimal( + fromUserSuperiorInfo.value3, + dodo.decimals + ); + fromUserSuperior.spFromInvited = fromUserSuperior.spFromInvited.plus( + spChangeToUserSuperior + ); + fromUserSuperior.creditFromInvited = fromUserSuperior.creditFromInvited.plus( + creditChangeFromUserSuperior + ); + + toUserSuperior.stakingPower = toUserSuperiorInfo.value0; + toUserSuperior.credit = convertTokenToDecimal( + toUserSuperiorInfo.value3, + dodo.decimals + ); + toUserSuperior.spFromInvited = toUserSuperior.spFromInvited.plus( + spChangeFromUserSuperior + ); + toUserSuperior.creditFromInvited = toUserSuperior.creditFromInvited.plus( + creditChangeToUserSuperior + ); + + fromUser.creditOfSuperior = fromUser.creditOfSuperior.plus( + creditChangeFromUserSuperior + ); + fromUser.redeemRecieveAmount = fromUser.redeemRecieveAmount.plus( + convertTokenToDecimal(event.params.amount, vdodo.decimals).times( + BigDecimal.fromString("100") + ) + ); + toUser.creditOfSuperior = toUser.creditOfSuperior.plus( + creditChangeToUserSuperior + ); + toUser.mintAmount = toUser.mintAmount.plus( + convertTokenToDecimal(event.params.amount, vdodo.decimals).times( + BigDecimal.fromString("100") + ) + ); + + fromUser.updatedAt = event.block.timestamp; + toUser.updatedAt = event.block.timestamp; + fromUserSuperior.updatedAt = event.block.timestamp; + toUserSuperior.updatedAt = event.block.timestamp; + + fromUser.save(); + toUser.save(); + fromUserSuperior.save(); + toUserSuperior.save(); + + let transferHistoryID = event.transaction.hash + .toHexString() + .concat("-") + .concat(event.logIndex.toString()); + let transferHistory = TransferHistory.load(transferHistoryID); + if (transferHistory == null) { + transferHistory = new TransferHistory(transferHistoryID); + transferHistory.from = event.params.from; + transferHistory.to = event.params.to; + transferHistory.amount = convertTokenToDecimal( + event.params.amount, + vdodo.decimals + ); + } + + transferHistory.updatedAt = event.block.timestamp; + transferHistory.save(); } export function handleDonateDODO(event: DonateDODO): void { - initTokenInfo(); - let vdodo = vDODO.load(dataSource.address().toHexString()); - let DODO_ADDRESS = dataSource.network() == "mainnet" ? DODO_ADDRESS_MAINNET : DODO_ADDRESS_KOVAN; - let dodo = DODO.load(DODO_ADDRESS); - - let donateHistoryID = event.transaction.hash.toHexString().concat("-").concat(event.logIndex.toString()) - let donateHistory = DonateHistory.load(donateHistoryID); - - if (donateHistory == null) { - donateHistory = new DonateHistory(donateHistoryID); - donateHistory.donor = event.params.user; - donateHistory.dodoAmount = convertTokenToDecimal(event.params.donateDODO, dodo.decimals); - donateHistory.blockNumber = event.block.number; - donateHistory.timestamp = event.block.timestamp; - donateHistory.updatedAt=event.block.timestamp; - donateHistory.save(); - } - + initTokenInfo(); + let vdodo = vDODO.load(dataSource.address().toHexString()); + let DODO_ADDRESS = + dataSource.network() == "mainnet" + ? DODO_ADDRESS_MAINNET + : DODO_ADDRESS_KOVAN; + let dodo = DODO.load(DODO_ADDRESS); + if (dodo == null) return; + + let donateHistoryID = event.transaction.hash + .toHexString() + .concat("-") + .concat(event.logIndex.toString()); + let donateHistory = DonateHistory.load(donateHistoryID); + + if (donateHistory == null) { + donateHistory = new DonateHistory(donateHistoryID); + donateHistory.donor = event.params.user; + donateHistory.dodoAmount = convertTokenToDecimal( + event.params.donateDODO, + dodo.decimals + ); + donateHistory.blockNumber = event.block.number; + donateHistory.timestamp = event.block.timestamp; + donateHistory.updatedAt = event.block.timestamp; + donateHistory.save(); + } } diff --git a/src/mappings/vdodo/helpers.ts b/src/mappings/vdodo/helpers.ts index 608d8d5..30b6609 100644 --- a/src/mappings/vdodo/helpers.ts +++ b/src/mappings/vdodo/helpers.ts @@ -1,244 +1,275 @@ /* eslint-disable prefer-const */ -import {log, BigInt, BigDecimal, Address, ethereum, dataSource} from '@graphprotocol/graph-ts' import { - User, vDODO, DODO -} from '../../types/vdodo/schema' -import {ERC20} from "../../types/vdodo/vDODOToken/ERC20" -import {ERC20NameBytes} from "../../types/vdodo/vDODOToken/ERC20NameBytes" -import {ERC20SymbolBytes} from "../../types/vdodo/vDODOToken/ERC20SymbolBytes" -import {vDODOToken__userInfoResult, vDODOToken} from "../../types/vdodo/vDODOToken/vDODOToken" - + log, + BigInt, + BigDecimal, + Address, + ethereum, + dataSource, +} from "@graphprotocol/graph-ts"; +import { User, vDODO, DODO } from "../../types/vdodo/schema"; +import { ERC20 } from "../../types/vdodo/vDODOToken/ERC20"; +import { ERC20NameBytes } from "../../types/vdodo/vDODOToken/ERC20NameBytes"; +import { ERC20SymbolBytes } from "../../types/vdodo/vDODOToken/ERC20SymbolBytes"; import { - DODO_ADDRESS_KOVAN, - DODO_ADDRESS_MAINNET -} from "./constants" + vDODOToken__userInfoResult, + vDODOToken, +} from "../../types/vdodo/vDODOToken/vDODOToken"; + +import { DODO_ADDRESS_KOVAN, DODO_ADDRESS_MAINNET } from "./constants"; -export const ADDRESS_ZERO = '0x0000000000000000000000000000000000000000'; -export const USDT_ADDRESS = '0xdac17f958d2ee523a2206206994597c13d831ec7'; -export const WBTC_ADDRESS = '0x2260fac5e5542a773aa44fbcfedf7c193bc2c599'; -export const BASE_COIN = '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee'; +export const ADDRESS_ZERO = "0x0000000000000000000000000000000000000000"; +export const USDT_ADDRESS = "0xdac17f958d2ee523a2206206994597c13d831ec7"; +export const WBTC_ADDRESS = "0x2260fac5e5542a773aa44fbcfedf7c193bc2c599"; +export const BASE_COIN = "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"; export let ZERO_BI = BigInt.fromI32(0); export let ONE_BI = BigInt.fromI32(1); -export let ZERO_BD = BigDecimal.fromString('0'); -export let ONE_BD = BigDecimal.fromString('1'); +export let ZERO_BD = BigDecimal.fromString("0"); +export let ONE_BD = BigDecimal.fromString("1"); export let BI_18 = BigInt.fromI32(18); export function exponentToBigDecimal(decimals: BigInt): BigDecimal { - let bd = BigDecimal.fromString('1') - for (let i = ZERO_BI; i.lt(decimals as BigInt); i = i.plus(ONE_BI)) { - bd = bd.times(BigDecimal.fromString('10')) - } - return bd + let bd = BigDecimal.fromString("1"); + for (let i = ZERO_BI; i.lt(decimals as BigInt); i = i.plus(ONE_BI)) { + bd = bd.times(BigDecimal.fromString("10")); + } + return bd; } export function bigDecimalExp18(): BigDecimal { - return BigDecimal.fromString('1000000000000000000') + return BigDecimal.fromString("1000000000000000000"); } export function convertEthToDecimal(eth: BigInt): BigDecimal { - return eth.toBigDecimal().div(exponentToBigDecimal(BigInt.fromI32(18))) + return eth.toBigDecimal().div(exponentToBigDecimal(BigInt.fromI32(18))); } -export function convertTokenToDecimal(tokenAmount: BigInt, exchangeDecimals: BigInt): BigDecimal { - if (exchangeDecimals == ZERO_BI) { - return tokenAmount.toBigDecimal() - } - return tokenAmount.toBigDecimal().div(exponentToBigDecimal(exchangeDecimals)) +export function convertTokenToDecimal( + tokenAmount: BigInt, + exchangeDecimals: BigInt +): BigDecimal { + if (exchangeDecimals == ZERO_BI) { + return tokenAmount.toBigDecimal(); + } + return tokenAmount.toBigDecimal().div(exponentToBigDecimal(exchangeDecimals)); } export function equalToZero(value: BigDecimal): boolean { - const formattedVal = parseFloat(value.toString()) - const zero = parseFloat(ZERO_BD.toString()) - if (zero == formattedVal) { - return true - } - return false + const formattedVal = parseFloat(value.toString()); + const zero = parseFloat(ZERO_BD.toString()); + if (zero == formattedVal) { + return true; + } + return false; } export function isNullEthValue(value: string): boolean { - return value == '0x0000000000000000000000000000000000000000000000000000000000000001' + return ( + value == + "0x0000000000000000000000000000000000000000000000000000000000000001" + ); } export function createUser(userAddr: Address, event: ethereum.Event): User { - let user = User.load(userAddr.toHexString()) - - if (user == null) { - user = new User(userAddr.toHexString()); - user.superior = Address.fromString(ADDRESS_ZERO); - user.credit = ZERO_BD; - user.stakingPower = ZERO_BI; - user.superiorSP = ZERO_BI; - user.spFromInvited = ZERO_BI; - user.creditFromInvited = ZERO_BD; - user.mintAmount = ZERO_BD; - user.redeemRecieveAmount = ZERO_BD; - user.redeemFeeAmount = ZERO_BD; - user.redeemBurnAmount = ZERO_BD; - user.creditOfSuperior = ZERO_BD; - user.timestamp = event.block.timestamp; - user.updatedAt = event.block.timestamp; - } - return user as User; + let user = User.load(userAddr.toHexString()); + + if (user == null) { + user = new User(userAddr.toHexString()); + user.superior = Address.fromString(ADDRESS_ZERO); + user.credit = ZERO_BD; + user.stakingPower = ZERO_BI; + user.superiorSP = ZERO_BI; + user.spFromInvited = ZERO_BI; + user.creditFromInvited = ZERO_BD; + user.mintAmount = ZERO_BD; + user.redeemRecieveAmount = ZERO_BD; + user.redeemFeeAmount = ZERO_BD; + user.redeemBurnAmount = ZERO_BD; + user.creditOfSuperior = ZERO_BD; + user.timestamp = event.block.timestamp; + user.updatedAt = event.block.timestamp; + } + return user as User; } export function fetchTokenSymbol(tokenAddress: Address): string { - // hard coded overrides - if (tokenAddress.toHexString() == '0xe0b7927c4af23765cb51314a0e0521a9645f0e2a') { - return 'DGD' - } - if (tokenAddress.toHexString() == '0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9') { - return 'AAVE' - } - if (tokenAddress.toHexString() == '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48') { - return 'USDC' - } - - let contract = ERC20.bind(tokenAddress) - let contractSymbolBytes = ERC20SymbolBytes.bind(tokenAddress) - - // try types string and bytes32 for symbol - let symbolValue = 'unknown' - let symbolResult = contract.try_symbol() - if (symbolResult.reverted) { - let symbolResultBytes = contractSymbolBytes.try_symbol() - if (!symbolResultBytes.reverted) { - // for broken pairs that have no symbol function exposed - if (!isNullEthValue(symbolResultBytes.value.toHexString())) { - symbolValue = symbolResultBytes.value.toString() - } - } - } else { - symbolValue = symbolResult.value + // hard coded overrides + if ( + tokenAddress.toHexString() == "0xe0b7927c4af23765cb51314a0e0521a9645f0e2a" + ) { + return "DGD"; + } + if ( + tokenAddress.toHexString() == "0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9" + ) { + return "AAVE"; + } + if ( + tokenAddress.toHexString() == "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48" + ) { + return "USDC"; + } + + let contract = ERC20.bind(tokenAddress); + let contractSymbolBytes = ERC20SymbolBytes.bind(tokenAddress); + + // try types string and bytes32 for symbol + let symbolValue = "unknown"; + let symbolResult = contract.try_symbol(); + if (symbolResult.reverted) { + let symbolResultBytes = contractSymbolBytes.try_symbol(); + if (!symbolResultBytes.reverted) { + // for broken pairs that have no symbol function exposed + if (!isNullEthValue(symbolResultBytes.value.toHexString())) { + symbolValue = symbolResultBytes.value.toString(); + } } + } else { + symbolValue = symbolResult.value; + } - return symbolValue + return symbolValue; } export function fetchTokenName(tokenAddress: Address): string { - // hard coded overrides - if (tokenAddress.toHexString() == '0xe0b7927c4af23765cb51314a0e0521a9645f0e2a') { - return 'DGD' - } - if (tokenAddress.toHexString() == '0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9') { - return 'Aave Token' + // hard coded overrides + if ( + tokenAddress.toHexString() == "0xe0b7927c4af23765cb51314a0e0521a9645f0e2a" + ) { + return "DGD"; + } + if ( + tokenAddress.toHexString() == "0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9" + ) { + return "Aave Token"; + } + + let contract = ERC20.bind(tokenAddress); + let contractNameBytes = ERC20NameBytes.bind(tokenAddress); + + // try types string and bytes32 for name + let nameValue = "unknown"; + let nameResult = contract.try_name(); + if (nameResult.reverted) { + let nameResultBytes = contractNameBytes.try_name(); + if (!nameResultBytes.reverted) { + // for broken exchanges that have no name function exposed + if (!isNullEthValue(nameResultBytes.value.toHexString())) { + nameValue = nameResultBytes.value.toString(); + } } + } else { + nameValue = nameResult.value; + } - let contract = ERC20.bind(tokenAddress) - let contractNameBytes = ERC20NameBytes.bind(tokenAddress) - - // try types string and bytes32 for name - let nameValue = 'unknown' - let nameResult = contract.try_name() - if (nameResult.reverted) { - let nameResultBytes = contractNameBytes.try_name() - if (!nameResultBytes.reverted) { - // for broken exchanges that have no name function exposed - if (!isNullEthValue(nameResultBytes.value.toHexString())) { - nameValue = nameResultBytes.value.toString() - } - } - } else { - nameValue = nameResult.value - } - - return nameValue + return nameValue; } export function fetchTokenTotalSupply(tokenAddress: Address): BigInt { - if (tokenAddress.toHexString() == BASE_COIN) { - return BigInt.fromI32(0) - } - let contract = ERC20.bind(tokenAddress) - let totalSupplyResult = contract.try_totalSupply() - if (totalSupplyResult.reverted) { - return BigInt.fromI32(0) - } - return totalSupplyResult.value + if (tokenAddress.toHexString() == BASE_COIN) { + return BigInt.fromI32(0); + } + let contract = ERC20.bind(tokenAddress); + let totalSupplyResult = contract.try_totalSupply(); + if (totalSupplyResult.reverted) { + return BigInt.fromI32(0); + } + return totalSupplyResult.value; } export function fetchTokenDecimals(tokenAddress: Address): BigInt { - // hardcode overrides - if (tokenAddress.toHexString() == '0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9') { - return BigInt.fromI32(18) - } - if (tokenAddress.toHexString() == BASE_COIN) { - return BigInt.fromI32(18) - } - - let contract = ERC20.bind(tokenAddress) - // try types uint8 for decimals - let decimalValue = null - let decimalResult = contract.try_decimals() - if (!decimalResult.reverted) { - decimalValue = decimalResult.value - } - return BigInt.fromI32(decimalValue as i32) + // hardcode overrides + if ( + tokenAddress.toHexString() == "0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9" + ) { + return BigInt.fromI32(18); + } + if (tokenAddress.toHexString() == BASE_COIN) { + return BigInt.fromI32(18); + } + + let contract = ERC20.bind(tokenAddress); + // try types uint8 for decimals + let decimalValue = null; + let decimalResult = contract.try_decimals(); + if (!decimalResult.reverted) { + decimalValue = decimalResult.value; + } + return BigInt.fromI32(decimalValue); } -export function fetchTokenBalance(tokenAddress: Address, user: Address): BigInt { - if (tokenAddress.toHexString() == BASE_COIN) { - return BigInt.fromI32(0) - } - let contract = ERC20.bind(tokenAddress) - let balance = 0; - let balanceResult = contract.try_balanceOf(user); - if (balanceResult.reverted) { - return BigInt.fromI32(0) - } - - return balanceResult.value; +export function fetchTokenBalance( + tokenAddress: Address, + user: Address +): BigInt { + if (tokenAddress.toHexString() == BASE_COIN) { + return BigInt.fromI32(0); + } + let contract = ERC20.bind(tokenAddress); + let balance = 0; + let balanceResult = contract.try_balanceOf(user); + if (balanceResult.reverted) { + return BigInt.fromI32(0); + } + + return balanceResult.value; } export function fetchUserInfo(addr: Address): vDODOToken__userInfoResult { - let vDODOContract = vDODOToken.bind(dataSource.address()); - let resopnse = vDODOContract.userInfo(addr); - return resopnse as vDODOToken__userInfoResult; + let vDODOContract = vDODOToken.bind(dataSource.address()); + let resopnse = vDODOContract.userInfo(addr); + return resopnse as vDODOToken__userInfoResult; } export function fetchTotalSp(): BigInt { - let vDODOContract = vDODOToken.bind(dataSource.address()); - let resopnse = vDODOContract._TOTAL_STAKING_POWER_(); - return resopnse as BigInt; + let vDODOContract = vDODOToken.bind(dataSource.address()); + let resopnse = vDODOContract._TOTAL_STAKING_POWER_(); + return resopnse as BigInt; } export function initTokenInfo(): void { - let vDODOAddress = dataSource.address(); - let DODOAddress = Address.fromString(dataSource.network() == "mainnet" ? DODO_ADDRESS_MAINNET : DODO_ADDRESS_KOVAN); - - let vdodo = vDODO.load(vDODOAddress.toHexString()); - if (vdodo == null) { - vdodo = new vDODO(vDODOAddress.toHexString()); - vdodo.decimals = fetchTokenDecimals(vDODOAddress); - vdodo.name = fetchTokenName(vDODOAddress); - vdodo.symbol = fetchTokenSymbol(vDODOAddress); - vdodo.dodo = DODOAddress; - vdodo.totalUsers = ZERO_BI; - vdodo.mintAmount = ZERO_BD; - vdodo.redeemAmount = ZERO_BD; - vdodo.totalBlockReward = ZERO_BD; - vdodo.totalBlockDistribution = ZERO_BD; - vdodo.totalDonate = ZERO_BD; - vdodo.totalStakingPower = ZERO_BI; - vdodo.dodoPerBlock = ZERO_BD; - vdodo.feeAmount = ZERO_BD; - vdodo.burnAmount = ZERO_BD; - vdodo.updatedAt = ZERO_BI; - } - - let dodo = DODO.load(DODOAddress.toHexString()); - if (dodo == null) { - dodo = new DODO(DODOAddress.toHexString()); - dodo.decimals = fetchTokenDecimals(DODOAddress); - dodo.name = fetchTokenName(DODOAddress); - dodo.symbol = fetchTokenSymbol(DODOAddress); - dodo.totalSupply = fetchTokenTotalSupply(DODOAddress); - dodo.updatedAt = ZERO_BI; - } - vdodo.dodoBalance = convertTokenToDecimal(fetchTokenBalance(DODOAddress, vDODOAddress), dodo.decimals); - - vdodo.save(); - dodo.save(); + let vDODOAddress = dataSource.address(); + let DODOAddress = Address.fromString( + dataSource.network() == "mainnet" + ? DODO_ADDRESS_MAINNET + : DODO_ADDRESS_KOVAN + ); + + let vdodo = vDODO.load(vDODOAddress.toHexString()); + if (vdodo == null) { + vdodo = new vDODO(vDODOAddress.toHexString()); + vdodo.decimals = fetchTokenDecimals(vDODOAddress); + vdodo.name = fetchTokenName(vDODOAddress); + vdodo.symbol = fetchTokenSymbol(vDODOAddress); + vdodo.dodo = DODOAddress; + vdodo.totalUsers = ZERO_BI; + vdodo.mintAmount = ZERO_BD; + vdodo.redeemAmount = ZERO_BD; + vdodo.totalBlockReward = ZERO_BD; + vdodo.totalBlockDistribution = ZERO_BD; + vdodo.totalDonate = ZERO_BD; + vdodo.totalStakingPower = ZERO_BI; + vdodo.dodoPerBlock = ZERO_BD; + vdodo.feeAmount = ZERO_BD; + vdodo.burnAmount = ZERO_BD; + vdodo.updatedAt = ZERO_BI; + } + + let dodo = DODO.load(DODOAddress.toHexString()); + if (dodo == null) { + dodo = new DODO(DODOAddress.toHexString()); + dodo.decimals = fetchTokenDecimals(DODOAddress); + dodo.name = fetchTokenName(DODOAddress); + dodo.symbol = fetchTokenSymbol(DODOAddress); + dodo.totalSupply = fetchTokenTotalSupply(DODOAddress); + dodo.updatedAt = ZERO_BI; + } + vdodo.dodoBalance = convertTokenToDecimal( + fetchTokenBalance(DODOAddress, vDODOAddress), + dodo.decimals + ); + + vdodo.save(); + dodo.save(); } - - diff --git a/subgraphs/dodoex/dodoex_arb-sep.yaml b/subgraphs/dodoex/dodoex_arb-sep.yaml new file mode 100644 index 0000000..b02c5f2 --- /dev/null +++ b/subgraphs/dodoex/dodoex_arb-sep.yaml @@ -0,0 +1,680 @@ +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: arbitrum-sepolia + source: + address: '0x9c2006A5179ee13A90fE4894e75464a3D91Beb70' + abi: DODOV2Proxy02 + startBlock: 64710120 + 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: arbitrum-sepolia + source: + address: '0x7Bb76aDd60518CdcCC2888d3A37aC97BAf195F4E' + abi: DODOFeeRouteProxy + startBlock: 64710120 + 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: arbitrum-sepolia + source: + address: '0x420A2fA0f4c4A1E209574454f399A4aB9b4ee5a0' + abi: DODOFeeRouteProxy + startBlock: 64710120 + 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: arbitrum-sepolia + source: + address: '0xDF44F395F85D298C7fAD8Bfc71De5dFF9a129d36' + abi: DVMFactory + startBlock: 64710120 + 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: arbitrum-sepolia + source: + address: "0xed44c4073Dc5e5572670aDAC25EB5B46bAdc178F" + abi: DPPFactory + startBlock: 64710120 + 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: arbitrum-sepolia + source: + address: '0x809fe4a7051304b08d6C8651d2d7f50668ab65DE' + abi: DSPFactory + startBlock: 64710120 + 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: arbitrum-sepolia + source: + address: '0x82d5730AB72a5e0ec6E85107418ECe79f4455dBa' + abi: CrowdPoolingFactory + startBlock: 64710120 + 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: arbitrum-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: arbitrum-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: arbitrum-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: arbitrum-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: arbitrum-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 + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.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: arbitrum-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: arbitrum-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: arbitrum-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 + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.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: arbitrum-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: arbitrum-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: arbitrum-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 + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + eventHandlers: + - event: Transfer(indexed address,indexed address,uint256) + handler: handleTransfer + - kind: ethereum/contract + name: CPV2 + network: arbitrum-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_arbitrum.yaml b/subgraphs/dodoex/dodoex_arbitrum.yaml index 5d7df7f..ff0763d 100644 --- a/subgraphs/dodoex/dodoex_arbitrum.yaml +++ b/subgraphs/dodoex/dodoex_arbitrum.yaml @@ -1,8 +1,10 @@ specVersion: 0.0.4 description: Dodoex.io -# graft: -# base: QmVbEmYjNRU5zyRDq6WDCWLnq952vDVWaM8AmVtvxpMy4b -# block: 45989363 +graft: + base: QmPMLJWfXJN9Juyj5h14NKJh9qvteiNs6PMTocqfHocWJk + block: 252253560 +features: + - grafting repository: https://github.com/DODOEX/dodoex_v2_subgraph schema: file: ./dodoex.graphql @@ -45,7 +47,7 @@ dataSources: startBlock: 45989363 mapping: kind: ethereum/events - apiVersion: 0.0.4 + apiVersion: 0.0.6 language: wasm/assemblyscript file: ../../src/mappings/dodoex/smartRoute.ts entities: @@ -220,6 +222,39 @@ dataSources: handler: handleNewDSP - event: RemoveDSP(address) handler: handleRemoveDSP + - kind: ethereum/contract + name: GSPFactory + network: arbitrum-one + source: + address: '0x46E55A974c5995675b025f7F607C3278B36f0c29' + abi: GSPFactory + startBlock: 248209288 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/poolFactory.ts + entities: + - Pair + - Token + abis: + - name: GSPFactory + file: ../../abis/GSPFactory.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + - name: GSP + file: ../../abis/GSP.json + - name: FeeRateModel + file: ../../abis/FeeRateModel.json + eventHandlers: + - event: NewGSP(address,address,address,address) + handler: handleNewGSP + - event: RemoveGSP(address) + handler: handleRemoveGSP - kind: ethereum/contract name: CrowdPoolingFactory network: arbitrum-one @@ -446,6 +481,12 @@ templates: file: ../../abis/FeeRateModel.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: DODOSwap(address,address,uint256,uint256,address,address) handler: handleDODOSwap @@ -564,6 +605,62 @@ templates: file: ../../abis/FeeRateModel.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: 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: GSP + network: arbitrum-one + source: + abi: GSP + 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: GSPFactory + file: ../../abis/GSPFactory.json + - name: DVM + file: ../../abis/DVM.json + - name: DPP + file: ../../abis/DPP.json + - name: DSP + file: ../../abis/DSP.json + - name: GSP + file: ../../abis/GSP.json + - name: FeeRateModel + file: ../../abis/FeeRateModel.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: DODOSwap(address,address,uint256,uint256,address,address) handler: handleDODOSwap @@ -573,6 +670,16 @@ templates: handler: handleSellShares - event: Transfer(indexed address,indexed address,uint256) handler: handleTransfer + - event: IChange(uint256) + handler: handleIChange + - event: KChange(uint256) + handler: handleKChange + - event: LpFeeRateChange(uint256) + handler: handleLpFeeRateChange + - event: MtFeeRateChange(uint256) + handler: handleMtFeeRateChange + - event: RChange(uint8) + handler: handleRChange - kind: ethereum/contract name: CP network: arbitrum-one diff --git a/subgraphs/dodoex/dodoex_aurora.yaml b/subgraphs/dodoex/dodoex_aurora.yaml index 36a59b2..6469f63 100644 --- a/subgraphs/dodoex/dodoex_aurora.yaml +++ b/subgraphs/dodoex/dodoex_aurora.yaml @@ -1,21 +1,16 @@ specVersion: 0.0.4 description: Dodoex.io -# graft: -# base: QmTEi7cu6yUiBjkfbu1HojabrsWkCFjhSLv6YH9D7PhE34 -# block: 80607250 -# features: -# - grafting repository: https://github.com/DODOEX/dodoex_v2_subgraph schema: file: ./dodoex.graphql dataSources: - kind: ethereum/contract - name: DODOFeeRouteProxy + name: DODOV2Proxy02 network: aurora source: - address: '0x7449Cd63C2b1A06C36945eD83f0626D303781B6E' - abi: DODOFeeRouteProxy - startBlock: 80607250 + address: '0xd9deC7c3C06e62a4c1BeEB07CadF568f496b14c2' + abi: DODOV2Proxy02 + startBlock: 53254349 mapping: kind: ethereum/events apiVersion: 0.0.6 @@ -25,8 +20,6 @@ dataSources: - Pair - Token abis: - - name: DODOFeeRouteProxy - file: ../../abis/DODOFeeRouteProxy.json - name: DODOV2Proxy02 file: ../../abis/DODOV2Proxy02.json - name: ERC20 @@ -39,12 +32,12 @@ dataSources: - event: OrderHistory(address,address,address,uint256,uint256) handler: handleOrderHistory - kind: ethereum/contract - name: DODOFeeRouteProxyWidgit + name: DODOFeeRouteProxy network: aurora source: - address: '0x0218E24dd47f9a1D05418eAa5B9cEDB13Ca48492' + address: '0x7449Cd63C2b1A06C36945eD83f0626D303781B6E' abi: DODOFeeRouteProxy - startBlock: 92734760 + startBlock: 80607250 mapping: kind: ethereum/events apiVersion: 0.0.6 @@ -68,12 +61,12 @@ dataSources: - event: OrderHistory(address,address,address,uint256,uint256) handler: handleOrderHistory - kind: ethereum/contract - name: DODOV2Proxy02 + name: DODOFeeRouteProxy-widgit network: aurora source: - address: '0xd9deC7c3C06e62a4c1BeEB07CadF568f496b14c2' - abi: DODOV2Proxy02 - startBlock: 51265155 + address: '0x0218E24dd47f9a1D05418eAa5B9cEDB13Ca48492' + abi: DODOFeeRouteProxy + startBlock: 92734760 mapping: kind: ethereum/events apiVersion: 0.0.6 @@ -83,6 +76,8 @@ dataSources: - Pair - Token abis: + - name: DODOFeeRouteProxy + file: ../../abis/DODOFeeRouteProxy.json - name: DODOV2Proxy02 file: ../../abis/DODOV2Proxy02.json - name: ERC20 @@ -100,7 +95,7 @@ dataSources: source: address: '0x0125cd41312f72a0774112ca639d65a2c02e3627' abi: DODORouteProxy - startBlock: 51265155 + startBlock: 53254716 mapping: kind: ethereum/events apiVersion: 0.0.6 @@ -120,14 +115,14 @@ dataSources: file: ../../abis/ERC20NameBytes.json eventHandlers: - event: OrderHistory(address,address,address,uint256,uint256) - handler: handleOrderHistory + handler: handleOrderHistory - kind: ethereum/contract name: DVMFactory network: aurora source: address: '0x5515363c0412AdD5c72d3E302fE1bD7dCBCF93Fe' abi: DVMFactory - startBlock: 51265155 + startBlock: 51263254 mapping: kind: ethereum/events apiVersion: 0.0.6 @@ -629,6 +624,12 @@ templates: file: ../../abis/FeeRateModel.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: DODOSwap(address,address,uint256,uint256,address,address) handler: handleDODOSwap @@ -747,6 +748,12 @@ templates: file: ../../abis/FeeRateModel.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: DODOSwap(address,address,uint256,uint256,address,address) handler: handleDODOSwap @@ -862,6 +869,12 @@ templates: abis: - name: DODOLpToken file: ../../abis/DODOLpToken.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json eventHandlers: - event: Transfer(indexed address,indexed address,uint256) handler: handleTransfer diff --git a/subgraphs/dodoex/dodoex_bitlayer.yaml b/subgraphs/dodoex/dodoex_bitlayer.yaml new file mode 100644 index 0000000..62a11bd --- /dev/null +++ b/subgraphs/dodoex/dodoex_bitlayer.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: bitlayer + source: + address: '0x33c5C92ECc5e64c8b1634E0E06193EF8A9308751' + abi: DODOV2Proxy02 + startBlock: 2019532 + 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: bitlayer + source: + address: '0x60019cf4b8d15e28dbf127669a5f0c216f8f2bae' + abi: DODOFeeRouteProxy + startBlock: 2019532 + 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: bitlayer + source: + address: '0xada771408183be871bd8d5396a091807f9d7d195' + abi: DODOFeeRouteProxy + startBlock: 2019532 + 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: bitlayer + source: + address: '0x7Ad992fcebd899ddbEF7f031dCF96f382b81ECea' + abi: DVMFactory + startBlock: 2019532 + 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: bitlayer + source: + address: "0x4c3c61cba411C9B60DC371b031262c730D3Da6a3" + abi: DPPFactory + startBlock: 2019532 + 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: bitlayer + source: + address: '0x668D4eD054aa62d12F95a64aa1C7e2791f176D0e' + abi: DSPFactory + startBlock: 2019532 + 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: bitlayer + source: + address: '0xB3d4823e02A9AB9A9A0Cc1636E776c360B67bED1' + abi: CrowdPoolingFactory + startBlock: 2019532 + 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: bitlayer + # 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: bitlayer + # 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: bitlayer + # 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: bitlayer + # 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: bitlayer + 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: bitlayer + 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: bitlayer + 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: bitlayer + 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: bitlayer + 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: bitlayer + 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: bitlayer + 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: bitlayer + 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_bsc.yaml b/subgraphs/dodoex/dodoex_bsc.yaml index 951d9dc..2103d66 100644 --- a/subgraphs/dodoex/dodoex_bsc.yaml +++ b/subgraphs/dodoex/dodoex_bsc.yaml @@ -1,8 +1,8 @@ specVersion: 0.0.4 description: Dodoex.io -graft: - base: QmNjntYEcbLPzyvjhMCB3AruMbzWcU8UxrJAGcYvS3Aagf - block: 12241838 +# graft: +# base: QmdiudgxBoBikgSkqBktvLVAMhtoawNsY5oYXY3GY5REoq +# block: 42127304 features: - grafting repository: https://github.com/DODOEX/dodoex_v2_subgraph @@ -270,6 +270,35 @@ dataSources: eventHandlers: - event: OrderHistory(address,address,address,uint256,uint256) handler: handleOrderHistory + - kind: ethereum/contract + name: DODOFeeRouteProxy-widgit-24-6-5 + network: bsc + source: + address: '0xb95ed7e958e196688984951f41ac2888f4b10ab9' + abi: DODOFeeRouteProxy + startBlock: 39336465 + 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_2020_02_21 network: bsc @@ -493,6 +522,39 @@ dataSources: handler: handleNewDSP - event: RemoveDSP(address) handler: handleRemoveDSP + - kind: ethereum/contract + name: GSPFactory + network: bsc + source: + address: '0x78d43a889F42a344Fe98C3fb9455791Dc8178d55' + abi: GSPFactory + startBlock: 41809388 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/poolFactory.ts + entities: + - Pair + - Token + abis: + - name: GSPFactory + file: ../../abis/GSPFactory.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + - name: GSP + file: ../../abis/GSP.json + - name: FeeRateModel + file: ../../abis/FeeRateModel.json + eventHandlers: + - event: NewGSP(address,address,address,address) + handler: handleNewGSP + - event: RemoveGSP(address) + handler: handleRemoveGSP - kind: ethereum/contract name: CrowdPoolingFactory_20200721 network: bsc @@ -723,6 +785,12 @@ templates: file: ../../abis/DODOZoo.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 eventHandlers: - event: DODOSwap(address,address,uint256,uint256,address,address) handler: handleDODOSwap @@ -839,6 +907,62 @@ templates: file: ../../abis/FeeRateModel.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: 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: GSP + network: bsc + source: + abi: GSP + 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: GSPFactory + file: ../../abis/GSPFactory.json + - name: DVM + file: ../../abis/DVM.json + - name: DPP + file: ../../abis/DPP.json + - name: DSP + file: ../../abis/DSP.json + - name: GSP + file: ../../abis/GSP.json + - name: FeeRateModel + file: ../../abis/FeeRateModel.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: DODOSwap(address,address,uint256,uint256,address,address) handler: handleDODOSwap @@ -848,6 +972,16 @@ templates: handler: handleSellShares - event: Transfer(indexed address,indexed address,uint256) handler: handleTransfer + - event: IChange(uint256) + handler: handleIChange + - event: KChange(uint256) + handler: handleKChange + - event: LpFeeRateChange(uint256) + handler: handleLpFeeRateChange + - event: MtFeeRateChange(uint256) + handler: handleMtFeeRateChange + - event: RChange(uint8) + handler: handleRChange - kind: ethereum/contract name: CP network: bsc @@ -983,6 +1117,12 @@ templates: abis: - name: DODOLpToken file: ../../abis/DODOLpToken.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json eventHandlers: - event: Transfer(indexed address,indexed address,uint256) handler: handleTransfer diff --git a/subgraphs/dodoex/dodoex_cfx.yaml b/subgraphs/dodoex/dodoex_cfx.yaml index d6a5a87..17364d8 100644 --- a/subgraphs/dodoex/dodoex_cfx.yaml +++ b/subgraphs/dodoex/dodoex_cfx.yaml @@ -404,6 +404,45 @@ templates: handler: handleDODOSwap - event: LpFeeRateChange(uint256) handler: handleLpFeeRateChange + - kind: ethereum/contract + name: DPPOracleAdmin + network: cfx + 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: cfx diff --git a/subgraphs/dodoex/dodoex_dodochain-testnet.yaml b/subgraphs/dodoex/dodoex_dodochain-testnet.yaml new file mode 100644 index 0000000..613618c --- /dev/null +++ b/subgraphs/dodoex/dodoex_dodochain-testnet.yaml @@ -0,0 +1,680 @@ +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: dodochain-testnet3 + source: + address: '0x351a86A2C8dc47D396305AAcd7F126E096b2eee4' + abi: DODOV2Proxy02 + startBlock: 66 + 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: dodochain-testnet3 + source: + address: '0xf50d3a044ff63bb476e02f442d813b177c432bfd' + abi: DODOFeeRouteProxy + startBlock: 66 + 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: dodochain-testnet3 + source: + address: '0x3a5980966a8774b357a807231f87f7fd792ff6f9' + abi: DODOFeeRouteProxy + startBlock: 66 + 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: dodochain-testnet3 + source: + address: '0x7D381e6a9c23A0E6969658f6B8Eba57A4Dbf93a0' + abi: DVMFactory + startBlock: 66 + 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: dodochain-testnet3 + source: + address: "0x72A2c79E6D882AdabE02cEbC606b834b06831b3A" + abi: DPPFactory + startBlock: 66 + 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: dodochain-testnet3 + source: + address: '0x22AdDF954Ea92a3A80403Fe353093f7bF58665EC' + abi: DSPFactory + startBlock: 66 + 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: dodochain-testnet3 + source: + address: '0xF9a6c9BE0a1149C69EF537359c78DeB5e6264ec6' + abi: CrowdPoolingFactory + startBlock: 66 + 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: dodochain-testnet3 + # 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: dodochain-testnet3 + # 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: dodochain-testnet3 + # 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: dodochain-testnet3 + # 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: dodochain-testnet3 + 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 + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.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: dodochain-testnet3 + 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: dodochain-testnet3 + 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: dodochain-testnet3 + 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 + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.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: dodochain-testnet3 + 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: dodochain-testnet3 + 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: dodochain-testnet3 + 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 + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + eventHandlers: + - event: Transfer(indexed address,indexed address,uint256) + handler: handleTransfer + - kind: ethereum/contract + name: CPV2 + network: dodochain-testnet3 + 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_goerli.yaml b/subgraphs/dodoex/dodoex_goerli.yaml index 2d2cb2e..f7ddbe4 100644 --- a/subgraphs/dodoex/dodoex_goerli.yaml +++ b/subgraphs/dodoex/dodoex_goerli.yaml @@ -1,4 +1,4 @@ -specVersion: 0.0.2 +specVersion: 0.0.4 description: Dodoex.io repository: https://github.com/DODOEX/dodoex_v2_subgraph schema: @@ -13,7 +13,7 @@ dataSources: startBlock: 7462578 mapping: kind: ethereum/events - apiVersion: 0.0.4 + apiVersion: 0.0.6 language: wasm/assemblyscript file: ../../src/mappings/dodoex/smartRoute.ts entities: @@ -40,7 +40,7 @@ dataSources: startBlock: 7462578 mapping: kind: ethereum/events - apiVersion: 0.0.4 + apiVersion: 0.0.6 language: wasm/assemblyscript file: ../../src/mappings/dodoex/smartRoute.ts entities: @@ -67,7 +67,7 @@ dataSources: startBlock: 8103480 mapping: kind: ethereum/events - apiVersion: 0.0.4 + apiVersion: 0.0.6 language: wasm/assemblyscript file: ../../src/mappings/dodoex/smartRoute.ts entities: @@ -96,7 +96,7 @@ dataSources: startBlock: 7462578 mapping: kind: ethereum/events - apiVersion: 0.0.4 + apiVersion: 0.0.6 language: wasm/assemblyscript file: ../../src/mappings/dodoex/poolFactory.ts entities: @@ -129,7 +129,7 @@ dataSources: startBlock: 7462578 mapping: kind: ethereum/events - apiVersion: 0.0.4 + apiVersion: 0.0.6 language: wasm/assemblyscript file: ../../src/mappings/dodoex/poolFactory.ts entities: @@ -162,7 +162,7 @@ dataSources: startBlock: 7462578 mapping: kind: ethereum/events - apiVersion: 0.0.4 + apiVersion: 0.0.6 language: wasm/assemblyscript file: ../../src/mappings/dodoex/poolFactory.ts entities: @@ -195,7 +195,7 @@ dataSources: startBlock: 7462578 mapping: kind: ethereum/events - apiVersion: 0.0.4 + apiVersion: 0.0.6 language: wasm/assemblyscript file: ../../src/mappings/dodoex/poolFactory.ts entities: @@ -225,6 +225,39 @@ dataSources: handler: handleNewCP - event: RemoveCP(address) handler: handleRemoveCP + - kind: ethereum/contract + name: DODOZoo + network: goerli + source: + address: '0xb7aa0fc639adb1de63d7ad5d665a3196a361b887' + abi: DODOZoo + startBlock: 10287301 + 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 templates: - kind: ethereum/contract name: DVM @@ -233,7 +266,7 @@ templates: abi: DVM mapping: kind: ethereum/events - apiVersion: 0.0.4 + apiVersion: 0.0.6 language: wasm/assemblyscript file: ../../src/mappings/dodoex/pool.ts entities: @@ -269,7 +302,7 @@ templates: abi: DPP mapping: kind: ethereum/events - apiVersion: 0.0.4 + apiVersion: 0.0.6 language: wasm/assemblyscript file: ../../src/mappings/dodoex/pool.ts entities: @@ -306,7 +339,7 @@ templates: abi: DSP mapping: kind: ethereum/events - apiVersion: 0.0.4 + apiVersion: 0.0.6 language: wasm/assemblyscript file: ../../src/mappings/dodoex/pool.ts entities: @@ -346,7 +379,7 @@ templates: abi: CP mapping: kind: ethereum/events - apiVersion: 0.0.4 + apiVersion: 0.0.6 language: wasm/assemblyscript file: ../../src/mappings/dodoex/crowdPooling.ts entities: @@ -385,7 +418,7 @@ templates: abi: CPV2 mapping: kind: ethereum/events - apiVersion: 0.0.4 + apiVersion: 0.0.6 language: wasm/assemblyscript file: ../../src/mappings/dodoex/crowdPooling.ts entities: @@ -424,7 +457,7 @@ templates: abi: DODO mapping: kind: ethereum/events - apiVersion: 0.0.4 + apiVersion: 0.0.6 language: wasm/assemblyscript file: ../../src/mappings/dodoex/classicPoolFromV1.ts entities: @@ -464,6 +497,45 @@ templates: handler: handleChargeMaintainerFee - event: UpdateMaintainerFeeRate(uint256,uint256) handler: handleUpdateMaintainerFeeRate + - kind: ethereum/contract + name: DPPOracleAdmin + network: goerli + 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: DODOLpToken network: goerli @@ -471,7 +543,7 @@ templates: abi: DODOLpToken mapping: kind: ethereum/events - apiVersion: 0.0.4 + apiVersion: 0.0.6 language: wasm/assemblyscript file: ../../src/mappings/dodoex/lpToken.ts entities: @@ -483,4 +555,3 @@ templates: eventHandlers: - event: Transfer(indexed address,indexed address,uint256) handler: handleTransfer - diff --git a/subgraphs/dodoex/dodoex_mainnet.yaml b/subgraphs/dodoex/dodoex_mainnet.yaml index d6511a2..f0a81f9 100644 --- a/subgraphs/dodoex/dodoex_mainnet.yaml +++ b/subgraphs/dodoex/dodoex_mainnet.yaml @@ -1,8 +1,8 @@ specVersion: 0.0.4 description: Dodoex.io -graft: - base: QmQukqWv9VDsPAMMbEBjUSTY1aFnv8CENhX7JEL3zQzkac - block: 12316399 +# graft: +# base: QmUwBJMB9ZiKuipGaQ4fh57GwgMNhaDteo7G1qbUwVpZac +# block: 20639986 features: - grafting repository: https://github.com/DODOEX/dodoex_v2_subgraph @@ -542,6 +542,39 @@ dataSources: handler: handleNewDSP - event: RemoveDSP(address) handler: handleRemoveDSP + - kind: ethereum/contract + name: GSPFactory + network: mainnet + source: + address: '0x710409D2121B7C8EA4aCAdd6803FDE2D85DF6473' + abi: GSPFactory + startBlock: 20639986 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/poolFactory.ts + entities: + - Pair + - Token + abis: + - name: GSPFactory + file: ../../abis/GSPFactory.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + - name: GSP + file: ../../abis/GSP.json + - name: FeeRateModel + file: ../../abis/FeeRateModel.json + eventHandlers: + - event: NewGSP(address,address,address,address) + handler: handleNewGSP + - event: RemoveGSP(address) + handler: handleRemoveGSP - kind: ethereum/contract name: CrowdPoolingFactory network: mainnet @@ -712,6 +745,12 @@ templates: file: ../../abis/FeeRateModel.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: DODOSwap(address,address,uint256,uint256,address,address) handler: handleDODOSwap @@ -830,6 +869,12 @@ templates: file: ../../abis/FeeRateModel.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: DODOSwap(address,address,uint256,uint256,address,address) handler: handleDODOSwap @@ -839,6 +884,66 @@ templates: handler: handleSellShares - event: Transfer(indexed address,indexed address,uint256) handler: handleTransfer + - kind: ethereum/contract + name: GSP + network: mainnet + source: + abi: GSP + 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: GSPFactory + file: ../../abis/GSPFactory.json + - name: DVM + file: ../../abis/DVM.json + - name: DPP + file: ../../abis/DPP.json + - name: DSP + file: ../../abis/DSP.json + - name: GSP + file: ../../abis/GSP.json + - name: FeeRateModel + file: ../../abis/FeeRateModel.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: 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 + - event: IChange(uint256) + handler: handleIChange + - event: KChange(uint256) + handler: handleKChange + - event: LpFeeRateChange(uint256) + handler: handleLpFeeRateChange + - event: MtFeeRateChange(uint256) + handler: handleMtFeeRateChange + - event: RChange(uint8) + handler: handleRChange - kind: ethereum/contract name: CP network: mainnet diff --git a/subgraphs/dodoex/dodoex_mantle.yaml b/subgraphs/dodoex/dodoex_mantle.yaml index ac5d4b8..ad70fff 100644 --- a/subgraphs/dodoex/dodoex_mantle.yaml +++ b/subgraphs/dodoex/dodoex_mantle.yaml @@ -1,5 +1,10 @@ specVersion: 0.0.4 description: Dodoex.io +# graft: +# base: QmXvVqkD57W7zCj46qtb7yjxHsWF7mPM7odM7cBuRqTE1X +# block: 68446838 +# features: +# - grafting repository: https://github.com/DODOEX/dodoex_v2_subgraph schema: file: ./dodoex.graphql @@ -186,6 +191,39 @@ dataSources: handler: handleNewDSP - event: RemoveDSP(address) handler: handleRemoveDSP + - kind: ethereum/contract + name: GSPFactory + network: mantle + source: + address: '0xE6cecb7460c9E52aA483cb1f0E87d78D7085686F' + abi: GSPFactory + startBlock: 68446838 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/poolFactory.ts + entities: + - Pair + - Token + abis: + - name: GSPFactory + file: ../../abis/GSPFactory.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + - name: GSP + file: ../../abis/GSP.json + - name: FeeRateModel + file: ../../abis/FeeRateModel.json + eventHandlers: + - event: NewGSP(address,address,address,address) + handler: handleNewGSP + - event: RemoveGSP(address) + handler: handleRemoveGSP # - kind: ethereum/contract # name: CrowdPoolingFactory # network: mantle @@ -385,6 +423,12 @@ templates: file: ../../abis/FeeRateModel.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: DODOSwap(address,address,uint256,uint256,address,address) handler: handleDODOSwap @@ -503,6 +547,12 @@ templates: file: ../../abis/FeeRateModel.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: DODOSwap(address,address,uint256,uint256,address,address) handler: handleDODOSwap @@ -512,6 +562,66 @@ templates: handler: handleSellShares - event: Transfer(indexed address,indexed address,uint256) handler: handleTransfer + - kind: ethereum/contract + name: GSP + network: mantle + source: + abi: GSP + 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: GSPFactory + file: ../../abis/GSPFactory.json + - name: DVM + file: ../../abis/DVM.json + - name: DPP + file: ../../abis/DPP.json + - name: DSP + file: ../../abis/DSP.json + - name: GSP + file: ../../abis/GSP.json + - name: FeeRateModel + file: ../../abis/FeeRateModel.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: 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 + - event: IChange(uint256) + handler: handleIChange + - event: KChange(uint256) + handler: handleKChange + - event: LpFeeRateChange(uint256) + handler: handleLpFeeRateChange + - event: MtFeeRateChange(uint256) + handler: handleMtFeeRateChange + - event: RChange(uint8) + handler: handleRChange - kind: ethereum/contract name: CP network: mantle diff --git a/subgraphs/dodoex/dodoex_okb.yaml b/subgraphs/dodoex/dodoex_okb.yaml new file mode 100644 index 0000000..631f37c --- /dev/null +++ b/subgraphs/dodoex/dodoex_okb.yaml @@ -0,0 +1,680 @@ +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: okb + source: + address: '0x7Ad992fcebd899ddbEF7f031dCF96f382b81ECea' + abi: DODOV2Proxy02 + startBlock: 4089493 + 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: okb + source: + address: '0x518Bfe0c91C1C8e9588b9218B87C38Fa6b9735D6' + abi: DODOFeeRouteProxy + startBlock: 4089493 + 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: okb + source: + address: '0x3b0c6c0CE667844e742Ce0Ca533EaA2b6f422AA8' + abi: DODOFeeRouteProxy + startBlock: 4089493 + 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: okb + source: + address: '0xcAcb29f0631612552eF50D4Fa02920910513b2B0' + abi: DVMFactory + startBlock: 4089493 + 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: okb + source: + address: "0xA909314363840f7c28b8EC314028e21722dd8Cb6" + abi: DPPFactory + startBlock: 4089493 + 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: okb + source: + address: '0xda4a4c0033806a8D6a02a65FAaD43828C42b8c6C' + abi: DSPFactory + startBlock: 4089493 + 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: okb + source: + address: '0xA312D73C1b537168f1C8588bDcaB9278df98Cd32' + abi: CrowdPoolingFactory + startBlock: 4089493 + 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: okb + # 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: okb + # 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: okb + # 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: okb + # 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: okb + 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 + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.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: okb + 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: okb + 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: okb + 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 + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.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: okb + 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: okb + 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: okb + 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 + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + eventHandlers: + - event: Transfer(indexed address,indexed address,uint256) + handler: handleTransfer + - kind: ethereum/contract + name: CPV2 + network: okb + 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_polygon-graft.yaml b/subgraphs/dodoex/dodoex_polygon-graft.yaml index 10fba71..582b233 100644 --- a/subgraphs/dodoex/dodoex_polygon-graft.yaml +++ b/subgraphs/dodoex/dodoex_polygon-graft.yaml @@ -1,10 +1,10 @@ specVersion: 0.0.4 description: Dodoex.io -# graft: -# base: QmPvW1FD1MJq2a7gQaReekEXsXdtFQaUXoGfJBuBJDgAma -# block: 36808703 -# features: -# - grafting +graft: + base: QmT7MxDBSnDDfmQMmDmkbiR8rREVoQFqqzjwKKC2vw9kSG + block: 50610312 +features: + - grafting repository: https://github.com/DODOEX/dodoex_v2_subgraph schema: file: ./dodoex.graphql @@ -67,35 +67,6 @@ dataSources: eventHandlers: - event: OrderHistory(address,address,address,uint256,uint256) handler: handleOrderHistory - - kind: ethereum/contract - name: DODOFeeRouteProxyWidgit - network: matic - source: - address: '0xA103206E7f19d1C1c0e31eFC4DFc7b299630F100' - abi: DODOFeeRouteProxy - startBlock: 36808703 - 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: DODORouteProxy network: matic diff --git a/subgraphs/dodoex/dodoex_polygon.yaml b/subgraphs/dodoex/dodoex_polygon.yaml index 10fba71..582b233 100644 --- a/subgraphs/dodoex/dodoex_polygon.yaml +++ b/subgraphs/dodoex/dodoex_polygon.yaml @@ -1,10 +1,10 @@ specVersion: 0.0.4 description: Dodoex.io -# graft: -# base: QmPvW1FD1MJq2a7gQaReekEXsXdtFQaUXoGfJBuBJDgAma -# block: 36808703 -# features: -# - grafting +graft: + base: QmT7MxDBSnDDfmQMmDmkbiR8rREVoQFqqzjwKKC2vw9kSG + block: 50610312 +features: + - grafting repository: https://github.com/DODOEX/dodoex_v2_subgraph schema: file: ./dodoex.graphql @@ -67,35 +67,6 @@ dataSources: eventHandlers: - event: OrderHistory(address,address,address,uint256,uint256) handler: handleOrderHistory - - kind: ethereum/contract - name: DODOFeeRouteProxyWidgit - network: matic - source: - address: '0xA103206E7f19d1C1c0e31eFC4DFc7b299630F100' - abi: DODOFeeRouteProxy - startBlock: 36808703 - 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: DODORouteProxy network: matic diff --git a/subgraphs/dodoex/dodoex_scroll.yaml b/subgraphs/dodoex/dodoex_scroll.yaml index 8490dcc..6376277 100644 --- a/subgraphs/dodoex/dodoex_scroll.yaml +++ b/subgraphs/dodoex/dodoex_scroll.yaml @@ -1,5 +1,10 @@ specVersion: 0.0.4 description: Dodoex.io +graft: + base: QmXPLzbv59tXMDeAkJDZcpj2fZGCoGtHVDBV2Fz9KWuwci + block: 6285646 +features: + - grafting repository: https://github.com/DODOEX/dodoex_v2_subgraph schema: file: ./dodoex.graphql @@ -60,6 +65,35 @@ dataSources: eventHandlers: - event: OrderHistory(address,address,address,uint256,uint256) handler: handleOrderHistory + - kind: ethereum/contract + name: DODOFeeRouteProxy-24-6-5 + network: scroll + source: + address: '0x89ba4039841587b0a4cffdf17aee30cacf006f4d' + abi: DODOFeeRouteProxy + startBlock: 6285646 + 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 @@ -89,6 +123,35 @@ dataSources: eventHandlers: - event: OrderHistory(address,address,address,uint256,uint256) handler: handleOrderHistory + - kind: ethereum/contract + name: DODOFeeRouteProxy-widgit-24-6-5 + network: scroll + source: + address: '0x3a64ec3606ff7310e8fad6fcc008e39705fb496d' + abi: DODOFeeRouteProxy + startBlock: 6285733 + 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 @@ -385,6 +448,12 @@ templates: file: ../../abis/FeeRateModel.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: DODOSwap(address,address,uint256,uint256,address,address) handler: handleDODOSwap @@ -503,6 +572,12 @@ templates: file: ../../abis/FeeRateModel.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: DODOSwap(address,address,uint256,uint256,address,address) handler: handleDODOSwap @@ -618,6 +693,12 @@ templates: abis: - name: DODOLpToken file: ../../abis/DODOLpToken.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json eventHandlers: - event: Transfer(indexed address,indexed address,uint256) handler: handleTransfer diff --git a/subgraphs/dodoex/dodoex_sepolia.yaml b/subgraphs/dodoex/dodoex_sepolia.yaml new file mode 100644 index 0000000..749f281 --- /dev/null +++ b/subgraphs/dodoex/dodoex_sepolia.yaml @@ -0,0 +1,806 @@ +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: sepolia + source: + address: '0x6292e8f7647b3b9dDf5795b1Fb77D0187e30E0F9' + abi: DODOV2Proxy02 + startBlock: 5142709 + 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: sepolia + source: + address: '0x5fa9e06111814840398ceF6E9563d400F6ed3a8d' + abi: DODOFeeRouteProxy + startBlock: 5142709 + 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: sepolia + source: + address: '0xb38D394D52A15910b8acc173b816624dc90066cd' + abi: DODOFeeRouteProxy + startBlock: 5142709 + 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: sepolia + source: + address: '0x2F86652dAEF5f1728c54191C955F065Ec3C188c7' + abi: DVMFactory + startBlock: 5142709 + 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: sepolia + source: + address: "0x0B1467f71c082D8d410aF4376C685D9A6893cF36" + abi: DPPFactory + startBlock: 5142709 + 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: sepolia + source: + address: '0xe7979E2F3e77196Bb2AB206eaa67Ea278A3E33A2' + abi: DSPFactory + startBlock: 5142709 + 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: GSPFactory + network: sepolia + source: + address: '0xa4aAeb4ED67d4451E4Dfd7aA595f76265A6dC697' + abi: GSPFactory + startBlock: 6559916 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/poolFactory.ts + entities: + - Pair + - Token + abis: + - name: GSPFactory + file: ../../abis/GSPFactory.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + - name: GSP + file: ../../abis/GSP.json + - name: FeeRateModel + file: ../../abis/FeeRateModel.json + eventHandlers: + - event: NewGSP(address,address,address,address) + handler: handleNewGSP + - event: RemoveGSP(address) + handler: handleRemoveGSP + - kind: ethereum/contract + name: GSPFactory-2 + network: sepolia + source: + address: '0xd936b3cbffbce67315c1bc1957b261a6ef637128' + abi: GSPFactory + startBlock: 6492271 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dodoex/poolFactory.ts + entities: + - Pair + - Token + abis: + - name: GSPFactory + file: ../../abis/GSPFactory.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + - name: GSP + file: ../../abis/GSP.json + - name: FeeRateModel + file: ../../abis/FeeRateModel.json + eventHandlers: + - event: NewGSP(address,address,address,address) + handler: handleNewGSP + - event: RemoveGSP(address) + handler: handleRemoveGSP + - kind: ethereum/contract + name: CrowdPoolingFactory + network: sepolia + source: + address: '0xCDA4a6cc5997002B87f28D46852F9F0aA0f3c897' + abi: CrowdPoolingFactory + startBlock: 5142709 + 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: 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: 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: 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: 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: 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 + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.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: 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: 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: 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 + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.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: GSP + network: sepolia + source: + abi: GSP + 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: GSPFactory + file: ../../abis/GSPFactory.json + - name: DVM + file: ../../abis/DVM.json + - name: DPP + file: ../../abis/DPP.json + - name: DSP + file: ../../abis/DSP.json + - name: GSP + file: ../../abis/GSP.json + - name: FeeRateModel + file: ../../abis/FeeRateModel.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: 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 + - event: IChange(uint256) + handler: handleIChange + - event: KChange(uint256) + handler: handleKChange + - event: LpFeeRateChange(uint256) + handler: handleLpFeeRateChange + - event: MtFeeRateChange(uint256) + handler: handleMtFeeRateChange + - event: RChange(uint8) + handler: handleRChange + - kind: ethereum/contract + name: CP + network: 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: 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: 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 + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + eventHandlers: + - event: Transfer(indexed address,indexed address,uint256) + handler: handleTransfer + - kind: ethereum/contract + name: CPV2 + network: 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_tokb.yaml b/subgraphs/dodoex/dodoex_tokb.yaml index 5cf034e..cb4b574 100644 --- a/subgraphs/dodoex/dodoex_tokb.yaml +++ b/subgraphs/dodoex/dodoex_tokb.yaml @@ -385,6 +385,12 @@ templates: file: ../../abis/FeeRateModel.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: DODOSwap(address,address,uint256,uint256,address,address) handler: handleDODOSwap @@ -503,6 +509,12 @@ templates: file: ../../abis/FeeRateModel.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: DODOSwap(address,address,uint256,uint256,address,address) handler: handleDODOSwap @@ -618,6 +630,12 @@ templates: abis: - name: DODOLpToken file: ../../abis/DODOLpToken.json + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json eventHandlers: - event: Transfer(indexed address,indexed address,uint256) handler: handleTransfer diff --git a/subgraphs/dodoex/dodoex_zircuit-testnet.yaml b/subgraphs/dodoex/dodoex_zircuit-testnet.yaml new file mode 100644 index 0000000..31ccaf5 --- /dev/null +++ b/subgraphs/dodoex/dodoex_zircuit-testnet.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: zircuit_testnet + source: + address: '0x668D4eD054aa62d12F95a64aa1C7e2791f176D0e' + abi: DODOV2Proxy02 + startBlock: 9389726 + 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: zircuit_testnet + source: + address: '0x62e2EC354E15ddA6A1E43586c86e745A59b4B81e' + abi: DODOFeeRouteProxy + startBlock: 9389726 + 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: zircuit_testnet + source: + address: '0x518Bfe0c91C1C8e9588b9218B87C38Fa6b9735D6' + abi: DODOFeeRouteProxy + startBlock: 9389726 + 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: zircuit_testnet + source: + address: '0xda4a4c0033806a8D6a02a65FAaD43828C42b8c6C' + abi: DVMFactory + startBlock: 9389726 + 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: zircuit_testnet + source: + address: "0xA312D73C1b537168f1C8588bDcaB9278df98Cd32" + abi: DPPFactory + startBlock: 9389726 + 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: zircuit_testnet + source: + address: '0xA909314363840f7c28b8EC314028e21722dd8Cb6' + abi: DSPFactory + startBlock: 9389726 + 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: zircuit_testnet + source: + address: '0xb770C37F3A9eC6f25b791D9c791aDE09B0fb1AB8' + abi: CrowdPoolingFactory + startBlock: 9389726 + 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: zircuit_testnet + # 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: zircuit_testnet + # 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: zircuit_testnet + # 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: zircuit_testnet + # 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: zircuit_testnet + 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: zircuit_testnet + 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: zircuit_testnet + 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: zircuit_testnet + 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: zircuit_testnet + 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: zircuit_testnet + 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: zircuit_testnet + 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: zircuit_testnet + 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_zircuit.yaml b/subgraphs/dodoex/dodoex_zircuit.yaml new file mode 100644 index 0000000..04df668 --- /dev/null +++ b/subgraphs/dodoex/dodoex_zircuit.yaml @@ -0,0 +1,680 @@ +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: zircuit + source: + address: '0x5e132c0ABB9e4E5f1471eF6d1C9740c276Fe520e' + abi: DODOV2Proxy02 + startBlock: 1454181 + 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: zircuit + source: + address: '0x518Bfe0c91C1C8e9588b9218B87C38Fa6b9735D6' + abi: DODOFeeRouteProxy + startBlock: 1454181 + 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: zircuit + source: + address: '0x3b0c6c0CE667844e742Ce0Ca533EaA2b6f422AA8' + abi: DODOFeeRouteProxy + startBlock: 1454181 + 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: zircuit + source: + address: '0xA909314363840f7c28b8EC314028e21722dd8Cb6' + abi: DVMFactory + startBlock: 1454181 + 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: zircuit + source: + address: "0xb770C37F3A9eC6f25b791D9c791aDE09B0fb1AB8" + abi: DPPFactory + startBlock: 1454181 + 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: zircuit + source: + address: '0xA312D73C1b537168f1C8588bDcaB9278df98Cd32' + abi: DSPFactory + startBlock: 1454181 + 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: zircuit + source: + address: '0x40b4030129FCFE660B4ecF35354e027260343049' + abi: CrowdPoolingFactory + startBlock: 1454181 + 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: zircuit + # 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: zircuit + # 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: zircuit + # 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: zircuit + # 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: zircuit + 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 + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.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: zircuit + 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: zircuit + 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: zircuit + 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 + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.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: zircuit + 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: zircuit + 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: zircuit + 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 + - name: ERC20 + file: ../../abis/ERC20.json + - name: ERC20SymbolBytes + file: ../../abis/ERC20SymbolBytes.json + - name: ERC20NameBytes + file: ../../abis/ERC20NameBytes.json + eventHandlers: + - event: Transfer(indexed address,indexed address,uint256) + handler: handleTransfer + - kind: ethereum/contract + name: CPV2 + network: zircuit + 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/dpoint/dpoint.graphql b/subgraphs/dpoint/dpoint.graphql new file mode 100644 index 0000000..e635035 --- /dev/null +++ b/subgraphs/dpoint/dpoint.graphql @@ -0,0 +1,36 @@ +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! + account: Bytes! + amount: BigInt! + claimedAmount: BigInt! + originAmount: BigInt! + remainingRatio: 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/dpoint/dpoint_goerli.yaml b/subgraphs/dpoint/dpoint_goerli.yaml new file mode 100644 index 0000000..d91459b --- /dev/null +++ b/subgraphs/dpoint/dpoint_goerli.yaml @@ -0,0 +1,51 @@ +specVersion: 0.0.4 +description: Dodoex.io +repository: https://github.com/DODOEX/dodoex_v2_subgraph +schema: + file: ./dpoint.graphql +dataSources: + - kind: ethereum/contract + name: LockedTokenVaultFactory + network: goerli + source: + address: '0x7A6a6bCeA8bfA93893aCC3df6D2A81ECb0E8dC1d' + abi: LockedTokenVaultFactory + startBlock: 10381816 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dpoint/factory.ts + entities: [] + abis: + - name: LockedTokenVaultFactory + file: ../../abis/LockedTokenVaultFactory.json + - name: LockedTokenVault + file: ../../abis/LockedTokenVault.json + - name: ERC20 + file: ../../abis/ERC20.json + eventHandlers: + - event: CreateVault(address) + handler: handleCreateVault +templates: + - kind: ethereum/contract + name: LockedTokenVault + network: goerli + source: + abi: LockedTokenVault + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dpoint/index.ts + entities: + - ERC20 + - Claimed + abis: + - name: LockedTokenVault + file: ../../abis/LockedTokenVault.json + - name: ERC20 + file: ../../abis/ERC20.json + eventHandlers: + - event: Claim(indexed address,uint256,uint256,uint256) + handler: handleClaim diff --git a/subgraphs/dpoint/dpoint_scroll.yaml b/subgraphs/dpoint/dpoint_scroll.yaml new file mode 100644 index 0000000..3400ff6 --- /dev/null +++ b/subgraphs/dpoint/dpoint_scroll.yaml @@ -0,0 +1,49 @@ +specVersion: 0.0.4 +description: Dodoex.io +repository: https://github.com/DODOEX/dodoex_v2_subgraph +schema: + file: ./dpoint.graphql +dataSources: + - kind: ethereum/contract + name: LockedTokenVaultFactory + network: scroll + source: + address: '0xEAf81DeAf1477C6DE6981D7902A287988E65e439' + abi: LockedTokenVaultFactory + startBlock: 2765712 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dpoint/factory.ts + entities: [] + abis: + - name: LockedTokenVaultFactory + file: ../../abis/LockedTokenVaultFactory.json + - name: LockedTokenVault + file: ../../abis/LockedTokenVault.json + eventHandlers: + - event: CreateVault(address) + handler: handleCreateVault +templates: + - kind: ethereum/contract + name: LockedTokenVault + network: scroll + source: + abi: LockedTokenVault + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../../src/mappings/dpoint/index.ts + entities: + - ERC20 + - Claimed + abis: + - name: LockedTokenVault + file: ../../abis/LockedTokenVault.json + - name: ERC20 + file: ../../abis/ERC20.json + eventHandlers: + - event: Claim(indexed address,uint256,uint256,uint256) + handler: handleClaim diff --git a/subgraphs/mine/mine_arb-sep.yaml b/subgraphs/mine/mine_arb-sep.yaml new file mode 100644 index 0000000..cfd1a57 --- /dev/null +++ b/subgraphs/mine/mine_arb-sep.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: arbitrum-sepolia + source: + address: '0x7E820457780Ac99B9A042Cd5f875b274855A1eE9' + abi: DODOMineV3ProxyV2 + startBlock: 64710120 + 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: arbitrum-sepolia + source: + address: '0x1C69376Bfb89340D36f83857A76fC11A73FC444D' + abi: DODOMineV3Registry + startBlock: 64710120 + 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: arbitrum-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_aurora.yaml b/subgraphs/mine/mine_aurora.yaml index 3e6eb99..dfe1d9f 100644 --- a/subgraphs/mine/mine_aurora.yaml +++ b/subgraphs/mine/mine_aurora.yaml @@ -1,4 +1,4 @@ -specVersion: 0.0.2 +specVersion: 0.0.6 description: Dodoex.io repository: https://github.com/DODOEX/dodoex_v2_subgraph schema: @@ -13,7 +13,7 @@ dataSources: startBlock: 51265155 mapping: kind: ethereum/events - apiVersion: 0.0.4 + apiVersion: 0.0.6 language: wasm/assemblyscript file: ../../src/mappings/mine/mineProxy.ts entities: @@ -41,7 +41,7 @@ dataSources: startBlock: 51265155 mapping: kind: ethereum/events - apiVersion: 0.0.4 + apiVersion: 0.0.6 language: wasm/assemblyscript file: ../../src/mappings/mine/registry.ts entities: @@ -70,7 +70,7 @@ templates: abi: ERC20MineV3 mapping: kind: ethereum/events - apiVersion: 0.0.4 + apiVersion: 0.0.6 language: wasm/assemblyscript file: ../../src/mappings/mine/mine.ts entities: diff --git a/subgraphs/mine/mine_bitlayer.yaml b/subgraphs/mine/mine_bitlayer.yaml new file mode 100644 index 0000000..6aa561f --- /dev/null +++ b/subgraphs/mine/mine_bitlayer.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: bitlayer + source: + address: '0x8A89153f246EA1501dec23db0Ba001F239aE1067' + abi: DODOMineV3ProxyV2 + startBlock: 2019532 + 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: bitlayer + source: + address: '0x62e2EC354E15ddA6A1E43586c86e745A59b4B81e' + abi: DODOMineV3Registry + startBlock: 2019532 + 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: bitlayer + 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_dodochain-testnet.yaml b/subgraphs/mine/mine_dodochain-testnet.yaml new file mode 100644 index 0000000..7f756df --- /dev/null +++ b/subgraphs/mine/mine_dodochain-testnet.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: dodochain-testnet3 + source: + address: '0x391f8D754E4BaC453d059BA7D2137C4905bF48d4' + abi: DODOMineV3ProxyV2 + startBlock: 58 + 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: dodochain-testnet3 + source: + address: '0x85C23863977dA7c3CEaCe129e292ba0F4d8aAA00' + abi: DODOMineV3Registry + startBlock: 58 + 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: dodochain-testnet3 + 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_mainnet.yaml b/subgraphs/mine/mine_mainnet.yaml index 875f96b..a8fa7a2 100644 --- a/subgraphs/mine/mine_mainnet.yaml +++ b/subgraphs/mine/mine_mainnet.yaml @@ -85,3 +85,7 @@ templates: handler: handleWithdraw - event: NewRewardToken(indexed uint256,address) handler: handleNewRewardToken + - event: UpdateEndBlock(indexed uint256,uint256) + handler: handleUpdateEndBlock + - event: UpdateReward(indexed uint256,uint256) + handler: handleUpdateReward \ No newline at end of file diff --git a/subgraphs/mine/mine_okb.yaml b/subgraphs/mine/mine_okb.yaml new file mode 100644 index 0000000..7f68b82 --- /dev/null +++ b/subgraphs/mine/mine_okb.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: okb + source: + address: '0x62e2EC354E15ddA6A1E43586c86e745A59b4B81e' + abi: DODOMineV3ProxyV2 + startBlock: 4090720 + 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: okb + source: + address: '0xec627fef2AbC5632C01BA9435caAa78871E2e305' + abi: DODOMineV3Registry + startBlock: 4090720 + 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: okb + 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_sepolia.yaml b/subgraphs/mine/mine_sepolia.yaml new file mode 100644 index 0000000..ee7e6ee --- /dev/null +++ b/subgraphs/mine/mine_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: sepolia + source: + address: '0xBbD59b9316eE65526DbBdEc2A748Cc05A285d54C' + abi: DODOMineV3ProxyV2 + startBlock: 5142709 + 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: sepolia + source: + address: '0xa5fc92Ca57a21C87AA0477b1c8fE8B9Bbf69d6C2' + abi: DODOMineV3Registry + startBlock: 5142709 + 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: 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_zircuit-testnet.yaml b/subgraphs/mine/mine_zircuit-testnet.yaml new file mode 100644 index 0000000..1d58449 --- /dev/null +++ b/subgraphs/mine/mine_zircuit-testnet.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: zircuit_testnet + source: + address: '0x69a730Fb2724391F875c48CB8950519bc8Fb7b12' + abi: DODOMineV3ProxyV2 + startBlock: 9389726 + 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: zircuit_testnet + source: + address: '0x03cd2F7D623b1B9c461bf93eBB3CEc47c2124985' + abi: DODOMineV3Registry + startBlock: 9389726 + 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: zircuit_testnet + 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_zircuit.yaml b/subgraphs/mine/mine_zircuit.yaml new file mode 100644 index 0000000..a6ca285 --- /dev/null +++ b/subgraphs/mine/mine_zircuit.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: zircuit + source: + address: '0x62e2EC354E15ddA6A1E43586c86e745A59b4B81e' + abi: DODOMineV3ProxyV2 + startBlock: 1454181 + 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: zircuit + source: + address: '0x7Ad992fcebd899ddbEF7f031dCF96f382b81ECea' + abi: DODOMineV3Registry + startBlock: 1454181 + 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: zircuit + 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_arb-sep.yaml b/subgraphs/token/token_arb-sep.yaml new file mode 100644 index 0000000..b66dc48 --- /dev/null +++ b/subgraphs/token/token_arb-sep.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: arbitrum-sepolia + source: + address: '0xf51705E360f706f46b83029A6f42Cb7b491a24dd' + abi: ERC20V3Factory + startBlock: 64710120 + 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_aurora.yaml b/subgraphs/token/token_aurora.yaml index 8932fc1..0be776a 100644 --- a/subgraphs/token/token_aurora.yaml +++ b/subgraphs/token/token_aurora.yaml @@ -1,9 +1,5 @@ -specVersion: 0.0.2 +specVersion: 0.0.6 description: Dodoex.io -graft: - base: QmcY4Vv2bFhE7sxgkggJ2XNi1axaEwAw1nJxdX2Lwif5nz - block: 60025406 -repository: https://github.com/DODOEX/dodoex_v2_subgraph schema: file: ./token.graphql dataSources: @@ -16,7 +12,7 @@ dataSources: startBlock: 51265155 mapping: kind: ethereum/events - apiVersion: 0.0.4 + apiVersion: 0.0.6 language: wasm/assemblyscript file: ../../src/mappings/token/factoryv2.ts entities: @@ -47,7 +43,7 @@ dataSources: startBlock: 60025406 mapping: kind: ethereum/events - apiVersion: 0.0.4 + apiVersion: 0.0.6 language: wasm/assemblyscript file: ../../src/mappings/token/factoryv2.ts entities: diff --git a/subgraphs/token/token_bitlayer.yaml b/subgraphs/token/token_bitlayer.yaml new file mode 100644 index 0000000..eb484ed --- /dev/null +++ b/subgraphs/token/token_bitlayer.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: bitlayer + source: + address: '0xe8bD8C45e8D0638d1Bfd39bC3B06534631DB3F13' + abi: ERC20V3Factory + startBlock: 2019532 + 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_dodochain-testnet.yaml b/subgraphs/token/token_dodochain-testnet.yaml new file mode 100644 index 0000000..283bffd --- /dev/null +++ b/subgraphs/token/token_dodochain-testnet.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: dodochain-testnet3 + source: + address: '0xDC249Ea92D2e532ed63B45dc7C05B21926B97c6F' + abi: ERC20V3Factory + startBlock: 58 + 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_okb.yaml b/subgraphs/token/token_okb.yaml new file mode 100644 index 0000000..4635349 --- /dev/null +++ b/subgraphs/token/token_okb.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: okb + source: + address: '0x40b4030129FCFE660B4ecF35354e027260343049' + 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 diff --git a/subgraphs/token/token_sepolia.yaml b/subgraphs/token/token_sepolia.yaml new file mode 100644 index 0000000..45fef6b --- /dev/null +++ b/subgraphs/token/token_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: sepolia + source: + address: '0x4CAD0052524648A7Fa2cfE279997b00239295F33' + abi: ERC20V3Factory + startBlock: 5142709 + 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_zircuit-testnet.yaml b/subgraphs/token/token_zircuit-testnet.yaml new file mode 100644 index 0000000..651d2a7 --- /dev/null +++ b/subgraphs/token/token_zircuit-testnet.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: zircuit_testnet + source: + address: '0x40b4030129FCFE660B4ecF35354e027260343049' + abi: ERC20V3Factory + startBlock: 9389726 + 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_zircuit.yaml b/subgraphs/token/token_zircuit.yaml new file mode 100644 index 0000000..06269bb --- /dev/null +++ b/subgraphs/token/token_zircuit.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: zircuit + source: + address: '0xec627fef2AbC5632C01BA9435caAa78871E2e305' + abi: ERC20V3Factory + startBlock: 1454181 + 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/vdodo/vdodo_mainnet.yaml b/subgraphs/vdodo/vdodo_mainnet.yaml index ad69c37..ecab449 100644 --- a/subgraphs/vdodo/vdodo_mainnet.yaml +++ b/subgraphs/vdodo/vdodo_mainnet.yaml @@ -1,4 +1,4 @@ -specVersion: 0.0.2 +specVersion: 0.0.4 description: Dodoex.io repository: https://github.com/DODOEX/dodoex_v2_subgraph schema: @@ -13,7 +13,7 @@ dataSources: startBlock: 11848651 mapping: kind: ethereum/events - apiVersion: 0.0.4 + apiVersion: 0.0.6 language: wasm/assemblyscript file: ../../src/mappings/vdodo/core.ts entities: