From 47b1d71c4671c08db0d704e2dd554586d2d385ca Mon Sep 17 00:00:00 2001 From: Richa <76250660+Richa-iitr@users.noreply.github.com> Date: Sun, 3 Jul 2022 07:27:02 +0530 Subject: [PATCH] Create README.md --- README.md | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..3453134 --- /dev/null +++ b/README.md @@ -0,0 +1,39 @@ +# Swap Aggregator Subgraph + +Basic subgraph for [Swap Aggregator Connector](https://polygonscan.com/address/0x403e1559ef503C12CF2ec8E07dBC592Ff298EEc3). +Tracks all the calls made to the swap method and stores the data which includes: +- connectors: The connector names array passed by the user to perform swaps on any, in preference order. +- callData: Array of call data passed by the user - input details for the respective connectors. +- eventName: "LogSwapAggregator(string[],string,string,bytes)" +- eventParam: Encoded data including connectors array, connector name where swap took place, eventName and eventParams returned by the connector where swap occured. + +Support added for Mainnet and Matic +- Mainnet: [Swap Aggregator Subgraph](https://thegraph.com/hosted-service/subgraph/richa-iitr/swap-aggregator-subgraph?selected=playground) +- Polygon: [Swap Aggregator Subgraph](https://thegraph.com/hosted-service/subgraph/richa-iitr/swap-aggregator-subgraph-matic?selected=playground) + +### Query + +
+{ + swapAggregatorDatas { + id + connectors + callData + eventName + eventParams + transactionDetail { + hash + from + to + input + value + index + blockNumber + timestamp + gasUsed + gasLimit + gasPrice + } + } +} +