what I currently have is an array and 2 mappings. mapping 1 is address => struct, mapping 2 is "isActive", array stores all the domains created

Jul 11, 2023, 2:17 PM
so my "deleting" is just deactivating a certain domain
Jul 11, 2023, 2:17 PM
show code
Jul 11, 2023, 2:17 PM
brief expl of the code: its a simplified version of ENS
Jul 11, 2023, 2:19 PM
i need to see the code if you want help
Jul 11, 2023, 2:21 PM
sure, one second
https://github.com/JoaoSantosDev99/Foundry-Boilerplate/tree/master/src
so my deleting is basically just turning a boolean of, but the value stays in the array
Ideally I could rely on events and just have and array save on a database off-chain
Jul 11, 2023, 2:35 PM
That's much worse
Jul 11, 2023, 2:36 PM
I know right
its a name system, those are subnames, deleting is basically just sending back to owner
which is terrible, ideally would just a mapping from address to struct and save the data off-chain on a DB
What I want to achieve is: given a registrar, how many subdomains are in it, basicallt
Jul 11, 2023, 2:40 PM
and use graphql
Jul 11, 2023, 2:50 PM
Graph is free?
Jul 11, 2023, 3:04 PM
thegraph?
Jul 11, 2023, 3:27 PM
The graph you mean?
Jul 11, 2023, 3:35 PM
thegraph uses graphql
Jul 11, 2023, 3:37 PM
I know, but I never used grapgql, I was hopping the graph would help me integrate faster, since they have a bunch of stuff running already under the hood
I guess its the way to go, just emit events on create and delete and have mappings
Jul 11, 2023, 3:40 PM
Yeah
Jul 11, 2023, 3:49 PM
you need to know graphql to use thegraph query
but it is quite easy
yes and no
can't remember the details atm
Jul 11, 2023, 4:50 PM
The graph on has full support on ETH tho, I need for a layer 2
Jul 11, 2023, 7:18 PM
Jul 11, 2023, 7:28 PM
It requires the graph token if I remember that correctly
Jul 11, 2023, 7:30 PM
https://thegraph.com/docs/en/network/benefits/
Jul 11, 2023, 7:31 PM
$0.0002
So not free
Jul 11, 2023, 7:32 PM
Thats robbery
Jul 11, 2023, 7:37 PM
Indeed lol
Jul 11, 2023, 7:44 PM
You can run your own indexer for any blockchain, setup is not "easy" but you will got it without pay anything
I got one running on a layer 2 that is not supported by the graph hosted service
Jul 12, 2023, 1:10 AM
That's the norm, if you run your own instance then it's free
Jul 12, 2023, 8:48 AM

© 2024 Draquery.com All rights reserved.