Skip to content

Conversation

chadoh
Copy link
Collaborator

@chadoh chadoh commented Jan 22, 2020

We want to find all failed DAO creations, in addition to successful DAO creations.

As far as our research has determined, the only way to do this is to literally walk every single block from the creation block of our contracts, checking transactions for ones against our contract.

😟 😨 😱

400,000 blocks to scan through. NBD.

This does not work, probably because of Infura rate limitations.

Where do we go from here?

It's probably time to try out The Graph, to see if we can aggregate these stats with their backend, so this frontend can just grab the info it needs over GraphQL. See this approach in #2

chadoh added 2 commits January 9, 2020 14:42
When building UI out of arrays, I expect it to work a bit like React

Unfortunately, that's not how JavaScript works. When using a template
literal, when JavaScript encounters an array, it calls `toString()` on
it. The default `Array.prototype.toString()` joins the elements with
a comma, `this.join(',')`.

When a bunch of commas get inserted in between the elements we're trying
to add to the page, things look ugly. So we need to use `join('')` every
time we want to render an array.

Unless! We override the default `Array.prototype.toString`, and make it
join with empty string by default.

An alternative approach would be to use a tagged template, such as:

    html`<h1>stuff here</h1> ${myArray.map(...)}`

While I might reach for a tagged template in a larger app where globally
changing Array's default join behavior might cause frustration, this
app is small enough that I think think using the global override seems
more useful.
We want to find all _failed_ DAO creations, in addition to successful
DAO creations.

As far as our research has determined, the only way to do this is to
literally walk every single block from the creation block of our
contracts, checking transactions for ones against our contract.

😟 😨 😱

400,000 blocks to scan through. NBD.

This does not work, probably because of Infura rate limitations.

Where do we go from here?

It's probably time to try out The Graph, to see if we can aggregate
these stats with their backend, so this frontend can just grab the info
it needs over GraphQL.
@chadoh chadoh changed the title Walk Blocks: add placeholder block-walking logic [WIP] Walk Blocks: add placeholder block-walking logic Jan 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant