open-dollar / od-subgraph

2 stars 0 forks source link

Add surplus and debt auctions #3

Open pi0neerpat opened 1 year ago

pi0neerpat commented 1 year ago

Depends on #5

pi0neerpat commented 10 months ago

Note that Hai team has also been working to update the rai subgraph. We started our own new one, but it may be helpful to look at the changes they've made: https://github.com/reflexer-labs/geb-subgraph/compare/master...hai-on-op:subgraph:hai-op-goerli

Note their changes are on branch hai-op-goerli

jahabeebs commented 10 months ago

@pi0neerpat today I was able to build and deploy the auctions branch successfully and I ran the script to generate surplus auctions (forge script script/states/SurplusAuction.s.sol:SurplusAuction --fork-url http://localhost:8545 -vvvvv) however, in the graphql playground I haven't been able to see or interact with the auction. For example, I logged out the auction # form the deploy script and it was 1, but from my local graphql playground when I try to run surplusAuctionHouseSettleAuction or surplusAuctionHouseRestartAuction I get an error. I'm thinking that possibly my playground is not pointing to the correct contracts

Screenshot 2024-01-19 at 4 36 14 PM

here's the order in which I did stuff:

prepare contracts:

anvil yarn deploy:anvil move deployment json to the deployments/anvil folder

prepare subgraph: 1) replace all the abis with the ones deployed to anvil 2) replace the contracts in subgraph.yml to be the ones deployed to anvil (addresses from run-latest though I noticed CollateralAuctionHouse is missing) and replace network: arbitrum-sepolia with network: mainnet 3) docker-compose should have ethereum: 'mainnet:http://host.docker.internal:8545' rather than ethereum: 'arbitrum-sepolia:${ETHEREUM_RPC_URL}' 4) yarn build 5) create and deploy subgraph locally to docker instance

then I checked the playground but just get the error in the photo above or a blank response

here are logs from docker:

Screenshot 2024-01-23 at 4 53 15 PM
pi0neerpat commented 10 months ago

Thanks for the update. I'll try to give it a spin

jahabeebs commented 10 months ago

@pi0neerpat I've tried the flow again with the new scripts and some modifications. I've edited my comment above to say what I've tried but it still seems like anvil and docker are not communicating because I can run the scripts but then don't see any auctions in the playground