Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contract L1 Chain #1227

Merged
merged 8 commits into from
Oct 17, 2023
Merged

Contract L1 Chain #1227

merged 8 commits into from
Oct 17, 2023

Conversation

benny-conn
Copy link
Collaborator

@benny-conn benny-conn commented Oct 10, 2023

Changes:

  • Added L1Chain to the contracts table
  • Changed contract_creators view to use the L1Chain of the wallets and contracts table

TODO:

  • Update contract queries to use L1 chain

@benny-conn benny-conn marked this pull request as ready for review October 11, 2023 20:36
@github-actions github-actions bot added the query label Oct 11, 2023
Copy link
Contributor

@radazen radazen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks awesome, @benny-conn! I love the direction we're going with this. 🚀 🚀 🚀

, unnest(@description::varchar[])
, unnest(@profile_image_url::varchar[])
, unnest(@provider_marked_spam::bool[])
)
on conflict (chain, address) where parent_id is null
on conflict (l1_chain, address) where parent_id is null
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can there be multiple contracts at the same address across L2 chains? This looks like it'd essentially merge all contracts at the same address across L2 chains if they're on the same L1, but that sounds okay to me as long as it's a valid thing to actually do! I defer to your blockchain expertise here.

Copy link
Collaborator Author

@benny-conn benny-conn Oct 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are in fact correct, although infinitesimally improbable, it can happen. Modified the index to include both l1_chain and chain.

Chain: ti.Chain,
L1CHain: ti.Chain.L1Chain(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: L1CHain -> L1Chain

@@ -266,7 +266,7 @@ func (p *Personalization) update(ctx context.Context) {

if p.pM == nil {
logger.For(ctx).Infof("no data loaded, reading from cache")
p.readCache(ctx)
// p.readCache(ctx)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Accidental commit?

@benny-conn benny-conn merged commit 4182481 into main Oct 17, 2023
7 checks passed
@benny-conn benny-conn deleted the benny/l1-contract branch October 17, 2023 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants