From ecf8fe51bd7ce00fd1a1956ed78f74046a366a12 Mon Sep 17 00:00:00 2001 From: Isaac Patka Date: Thu, 27 Apr 2023 14:06:39 -0400 Subject: [PATCH] site --- .../build/EIP4824Index/EIP4824Index.wasm | Bin 33430 -> 33526 bytes .../Subgraph/daostar/src/mapping.ts | 21 +++++++++--------- daostar-website/src/App.js | 6 +++-- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/Implementations/Subgraph/daostar/build/EIP4824Index/EIP4824Index.wasm b/Implementations/Subgraph/daostar/build/EIP4824Index/EIP4824Index.wasm index 5b1ee4f982136aa257d3e32eebe8ce6f38b03df2..0534392a973f050345f40209081ea30266d1a203 100644 GIT binary patch delta 2461 zcmaJ@Z%hhA{M4bY2=XLv$mzUoUZr<%@I+tlSR7SaVzHt4DU=K2@W2rA*pqyRAG*Do(u;lz5KP`i#nr-e=fn_15?l>LaAg(9TsL~hlIham8B%?{wr5SLAX#M?aO zy9wO@fvuVbAvV)oCt*nBMRYN+2_Fzj=~5CeAcWb08RlPk%Ewo6O(NK2R$`=19FmT| zbXXW=1rP|Efv|271rYNQ1)#62L}W{3APAeNdO5;Mj4JX>MG=S@D5wx2s|(eFsLLx| z8?(#?Uqoa}u#}mJp`|N%Yo)X%k3h^)s_PnIbJf%V<#1}ex$&I1cGS>u*l;8FSoEvgXVzmVabuiGQn&-nI*OZO@T(M^q0Q5 zCU|c968J(RfNi?WQbMqTkP!j_ArS&W)g_2z1QyvzyDSW8W*R&nnq`9D^?TiOA;`;a zf!>@8(F#ph0HLhHE3{nTb0)&#i+h4tn9urkcPhL{Ooau}21MH`qRk{ipwFwl?hB2J zct{-ZR=`_V;jK$}8t}SPOL&+c;9Rh>C%PRz5Sy&XEcWy0pLt8B)p@E@y#M5jFK-NIp zyOL+O?ve|i-a{?~+oD!%JT&c#;Qi!pb?x@t4#XbUXbob=-pXtC*l`y>+qNk`gmiQo zeE|E`HVq#^>^AS;bC^!n8p@Sg?SLS(bAPCr+ameuylGgd<&H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20XQTp(96xuz+X)s9^`uu!DF7lMd#ve~SlM01r+RR-SDR zIaaq+u?$-Ts;y4Z!h!RNofT0^8|>9{oviIe=rO1Rm@)$1xWkkYLinx03MDZ#+FRnC zu=83;;u@Y;c5K`BX5q+O7ppscxv{d+3Jt7bIkMSA5Q#S{Wvo49`Kp8xUp5Mu-fEN* zUpKYzrI%Ka6+v6c<=RV@WA3|&OzWVjw+oT`O>!+e>{WOMP#B#>V#AEbyXKaQStt@bVQ@OhT&6+iMC2ij4%(zxn`YxWT^c+f zr9sd%`QCCV)~*THsnctbRzZN&*64AsTe{StX|B-AUR6r!!U|1#tx{SS9@6{X8Y$M9 zHL!cg=2+E*wN7~#3#bU52?%Hk`Ep@p00A!MJv2CEmy#Zhyh1-6vPo$WAnS+p=b=7h zvP;9QcF~Z#rauD`ggoCZ@8ZEG{HdTL`}9YJxdi*zEf;980U+G6$z4S?iXu zh{!#9;rY4~*Lvi9RYSo4G$?QO$c4{jWs}ZZ2MDONp8$}*dUQMQ_QGgH%u&GZ zVy}$B+cM>RM{$gf_zt(Gmyk}$8k!;Mx2CQpLR<%eGOF09wZtd1^*+}{aaF)|DXUjk8>NJcy zqDbD(`dx(yGq9c=)B1QdAcV&z1NfJc`h@ey9|k%++Jw#Y;-~{#=#5beuA-^YIykZa z89m8WchQT-tTcSgK;L<>gsWjHP>yfRS zzA)BO5S;K&z2c9YpAOhPY{8qmEY+1<2nA0yoQ^ciM9!RQ&@N1l(#O`c%ae2WW2@PV Llq<3L(xClcmX80= diff --git a/Implementations/Subgraph/daostar/src/mapping.ts b/Implementations/Subgraph/daostar/src/mapping.ts index b190efde..06bb9ee9 100644 --- a/Implementations/Subgraph/daostar/src/mapping.ts +++ b/Implementations/Subgraph/daostar/src/mapping.ts @@ -21,24 +21,23 @@ export function handleNewRegistration(event: DAOURIRegistered): void { EIP4824Registration.create(event.params.daoAddress) let newAddress = event.params.daoAddress.toHex() registrationInstance = new RegistrationInstance(newAddress) + registrationInstance.registrationNetwork = chainName + registrationInstance.registrationAddress = event.params.daoAddress + registrationInstance.daoAddress = event.params.daoAddress + registrationInstance.daoURI = 'placeholder' + registrationInstance.save() } - - registrationInstance.registrationNetwork = chainName - registrationInstance.registrationAddress = event.params.daoAddress - registrationInstance.daoAddress = event.params.daoAddress - registrationInstance.daoURI = 'placeholder' - - registrationInstance.save() } export function handleNewURI(event: DAOURIUpdate): void { - let daoAddress = event.params.daoAddress.toHex() - let daoId = daoAddress - let registrationInstance = RegistrationInstance.load(daoId) + let registrationAddress = event.address.toHex() + let registrationInstance = RegistrationInstance.load(registrationAddress) - if (!registrationInstance) log.warning('Invalid instance', []) + if (!registrationInstance) log.warning('Invalid Registration: {}', [registrationAddress]) else { + registrationInstance.daoAddress = event.params.daoAddress if (event.params.daoURI) { + registrationInstance.daoURI = event.params.daoURI const ipfsHash = event.params.daoURI.substring(7) log.info('Fetching ipfs data for: {}', [ipfsHash]) let ipfsData = ipfs.cat(ipfsHash) diff --git a/daostar-website/src/App.js b/daostar-website/src/App.js index ce3df763..612e9050 100644 --- a/daostar-website/src/App.js +++ b/daostar-website/src/App.js @@ -27,11 +27,13 @@ function App() { const { loading, error, data: mainnetData } = useQuery(queries.REGISTRATIONS, { context: { apiName: 'mainnet' }, variables: { id: 'mainnet' } }) const goerliRes = useQuery(queries.REGISTRATIONS, { context: { apiName: 'goerli' }, variables: { id: 'goerli' } }) const { loading: goerliLoading, error: goerliError, data: goerliData } = goerliRes - // console.log({ mainnetData, goerliData }) + console.log({ mainnetData, goerliData }) if (error || goerliError) return 'error' if (loading || goerliLoading) return 'loading...' - const registrationInstances = mainnetData.registrationNetwork.registrations.concat(goerliData.registrationNetwork.registrations) + const mainnetRegistrations = mainnetData?.registrationNetwork?.registrations || [] + const goerliRegistrations = goerliData?.registrationNetwork?.registrations || [] + const registrationInstances = mainnetRegistrations.concat(goerliRegistrations) console.log({ registrationInstances })