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

[Proxy colonies] Feat: Add create event details to colony model #3920

Merged
merged 2 commits into from
Jan 16, 2025

Conversation

bassgeta
Copy link
Contributor

@bassgeta bassgeta commented Dec 11, 2024

Description

This PR adds colony creation data to the colony so we can easily create new proxy colonies.
Remember to pull the scripts repo too and test it there 🙏

Scripts PR
Block ingestor PR

Testing

TODO: Let us test the colony creation event details are actually properly saved 🦾

Step 1. Make sure to start a fresh env by running npm run dev
Step 2. Now please run the following query to check whether both planex and wayne got the colonyCreateEvent populated

query MyQuery {
  listColonies {
    items {
      colonyCreateEvent {
        blockNumber
        creationSalt
      }
      id
      name
    }
  }
}

Step 3. Now it's time to create a new colony, so please run node scripts/create-colony-url.js
Step 4. Complete the colony creation form
Step 5. Run the query again and check we've got a new entry with colonyCreateEvent details populated for the newly created colony
Step 6. Please try to deploy a new proxy colony on Sepolia by selecting it from the dropdown and pressing the Create proxy colony button

Screenshot 2024-12-16 at 11 08 44

Step 7. After a page refresh, you should see it listed below the Create proxy colony button
Screenshot 2024-12-16 at 11 10 34
Step 8. Enable metatransactions on your account. Run node scripts/create-colony-url.js and create a new colony.
Step 9. Run the query

query MyQuery {
  listColonies {
    items {
      colonyCreateEvent {
        blockNumber
        creationSalt
      }
      id
      name
    }
  }
}

and verify that the colony got the creation salt.
image
Step 10. Try to create a new proxy colony on Sepolia on your new colony created with metatx, refresh the page and verify that it gets deployed successfully 💯
image
image

Diffs

New stuff

  • Migration script to get the colony creation salt from the create event
  • The block ingestor now saves the creation salt when a colony is created

Changes 🏗

  • Added ColonyCreateEvent to the colony object which we use for lookup when deploying a proxy colony

  • Deletions go here

Contributes to #3768

@bassgeta bassgeta force-pushed the feat/colony-added-event branch from fdb5afb to 8ce21fe Compare December 11, 2024 16:21
Comment on lines 36 to 53
getColonies,
{
limit,
nextToken,
},
Copy link
Contributor

Choose a reason for hiding this comment

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

We should filter for colonies not having the createdAtBlock set

@bassgeta bassgeta force-pushed the feat/colony-added-event branch from 8ce21fe to 8172e1e Compare December 12, 2024 11:02
@mmioana mmioana force-pushed the feat/colony-added-event branch 5 times, most recently from 8eec38d to a526a58 Compare December 12, 2024 15:31
@mmioana mmioana force-pushed the feat/colony-added-event branch from a526a58 to c9753d7 Compare December 13, 2024 17:38
Feat: Get colony creation event and update colony model
Chore: Update block ingestor hash
@mmioana mmioana force-pushed the feat/colony-added-event branch from c9753d7 to e981891 Compare December 16, 2024 10:12
@mmioana mmioana changed the title feat: try to get colony creation event [Proxy colonies] Feat: Add create event details to colony model Dec 16, 2024
@bassgeta bassgeta marked this pull request as ready for review December 17, 2024 10:25
@bassgeta bassgeta requested a review from a team as a code owner December 17, 2024 10:25
Copy link
Contributor

@davecreaser davecreaser left a comment

Choose a reason for hiding this comment

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

Changes make sense to me. Thanks for the explanation in Discord too. Looks like you've added a little sprinkling of salt to the proxy colony creation process 😏 🥁

colonyCreateEvent details is present on all colonies and the proxy colony was created successfully:

Screenshot 2024-12-17 at 15 52 05 Screenshot 2024-12-17 at 15 55 22 Screenshot 2024-12-17 at 15 56 05

@bassgeta bassgeta marked this pull request as draft December 19, 2024 09:10
@bassgeta bassgeta force-pushed the feat/colony-added-event branch from 3f616d8 to 9a275cc Compare December 23, 2024 12:53
@bassgeta bassgeta marked this pull request as ready for review December 23, 2024 13:01
Base automatically changed from feat/wormhole-tx-matching to feat/proxy-colonies-dev-env January 13, 2025 10:09
Copy link
Contributor

@mmioana mmioana left a comment

Choose a reason for hiding this comment

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

We worked on this together, so I'm approving it!

Copy link
Contributor

@Nortsova Nortsova left a comment

Choose a reason for hiding this comment

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

Thank you @mmioana and @bassgeta for this wonderful work you both did!

All testing steps works great:

Newly created colony is here:
image

Colony deployed to Sepolia:
image

Colony with metatransactions created:
image

MetaTX colony successfully deployed to Sepolia:
image

@bassgeta bassgeta merged commit 5540fea into feat/proxy-colonies-dev-env Jan 16, 2025
1 check passed
@bassgeta bassgeta deleted the feat/colony-added-event branch January 16, 2025 10:08
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.

4 participants