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 M1] Feat: Re-enable deployed proxy colony #4032

Merged
merged 2 commits into from
Jan 15, 2025

Conversation

mmioana
Copy link
Contributor

@mmioana mmioana commented Jan 7, 2025

Description

  • This PR adds support for re-enabling an already deployed proxy colony. The idea behind is that once you have deployed a proxy colony, you can't un-deploy it, so we're going to make use of the isActive property for a proxy colony to know in which state it is. Nothing changes from the UI-wise, meaning you'll still need to create a Manage supported chains action and select the Add operation. However, behind the scenes, a different saga - enableProxyColony - will be called.

Block ingestor PR

Testing

TODO: So now for the testing, let's make sure we can Add and Remove support for a chain as many times we want 🪄

  • Step 1. Make sure your start a fresh dev env and run the create-data script

  • Step 2. Go to http://localhost:9091/planex

  • Step 3. Create a Manage supported chains action
    Screenshot 2025-01-07 at 09 48 02

  • Step 4. Select the Add chain support operation and Ethereum as the chain and fill the other fields
    Screenshot 2025-01-07 at 09 50 22

  • Step 5. Once the action is completed, you can run the following query

query MyQuery {
  listProxyColonies {
    items {
      chainId
      colonyAddress
      id
      isActive
    }
  }
}

and should see the isActive flag is set to true
Screenshot 2025-01-07 at 09 51 28

  • Step 6. Create another Manage supported chains action.
    This time select the Remove chain support operation.
    You should see Ethereum as the only chain in the dropdown menu. Select it and fill the other fields.
    Screenshot 2025-01-07 at 09 53 43

  • Step 7. You can run the query again and the isActive flag should be set to false
    Screenshot 2025-01-07 at 09 54 45

  • Step 8. And now let's actually test the re-enabling. So let's create another Manage supported chains action.
    Select Add chain support operation and for the chains you should see Ethereum again in the chains list.
    Select it, fill the remaining fields and create the action.
    Screenshot 2025-01-07 at 09 58 20

  • Step 9. In the browser console you should see a log similar to this
    Screenshot 2025-01-07 at 09 59 33

  • Step 10. You can run the query again and the isActive flag should be set again to true
    Screenshot 2025-01-07 at 10 00 23

  • Step 11. If you want to double check everything worked as expected, you can try creating again a Manage supported chains action. Select the Remove chain support operation and Ethereum should be again in the chain dropdown list.
    Screenshot 2025-01-07 at 10 01 53

Congrats! 🎉 Your mission of testing this PR has come to an end, but if you have other ideas, please do not hesitate to try them out 🥷

Diffs

New stuff

  • enableProxyColony saga
  • useDeployedChainIds hook

Contributes to #3457

@mmioana mmioana self-assigned this Jan 7, 2025
@mmioana mmioana marked this pull request as ready for review January 7, 2025 09:18
@mmioana mmioana requested a review from a team as a code owner January 7, 2025 09:18
@mmioana mmioana force-pushed the feat/manage-supported-chains-action branch from 81ae988 to 6295a4f Compare January 7, 2025 13:11
@mmioana mmioana force-pushed the feat/re-enable-proxy-colony branch from 6916a6b to 1d640db Compare January 8, 2025 10:08
Copy link
Contributor

@bassgeta bassgeta left a comment

Choose a reason for hiding this comment

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

Working like a charm, nice one 😎
Added Ethereum ✔️
image
image
Then removed it ✔️
image
image
image

Then reenabled it ✔️
image
editColonyByDelta was called, not createProxyColony
image
image

export type EnableProxyColonyPayload =
Action<ActionTypes.PROXY_COLONY_ENABLE>['payload'];

// @TODO if metatx are enabled sent a metaTx instead of tx
Copy link
Contributor

Choose a reason for hiding this comment

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

actually this isn't applicable here since we use the "old" way of sending out transactions :D

@mmioana mmioana force-pushed the feat/manage-supported-chains-action branch from 6295a4f to 7e6f635 Compare January 8, 2025 17:19
@bassgeta bassgeta changed the title Feat: Re-enable deployed proxy colony [Proxy colonies M1] Feat: Re-enable deployed proxy colony Jan 9, 2025
Copy link
Member

@rdig rdig left a comment

Choose a reason for hiding this comment

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

Barring the feature flag (for which I already raised problems with in #4006) everything works

This is a tremendous amount or work which functions flawlessly! Nicely done! 💯

Screenshot from 2025-01-14 00-29-33
Screenshot from 2025-01-14 00-29-49
Screenshot from 2025-01-14 00-30-26
Screenshot from 2025-01-14 00-30-31
Screenshot from 2025-01-14 00-31-26
Screenshot from 2025-01-14 00-31-42
Screenshot from 2025-01-14 00-31-51

Feat: Re-enable deployed proxy colony
Chore: Update block ingestor hash
@mmioana mmioana force-pushed the feat/re-enable-proxy-colony branch from 1d640db to f8ad014 Compare January 14, 2025 10:42
Copy link
Contributor

@rumzledz rumzledz left a comment

Choose a reason for hiding this comment

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

All good on my side @mmioana !! ✨

Before enabling the proxy colony

Screenshot 2025-01-14 at 20 36 01

After enabling the proxy colony

Screenshot 2025-01-14 at 20 36 24 Screenshot 2025-01-14 at 20 36 30 Screenshot 2025-01-14 at 20 38 32 Screenshot 2025-01-14 at 20 38 40

Base automatically changed from feat/manage-supported-chains-action to feat/M1-proxy-colonies January 15, 2025 07:37
@mmioana mmioana merged commit 27a677a into feat/M1-proxy-colonies Jan 15, 2025
1 check passed
@mmioana mmioana deleted the feat/re-enable-proxy-colony branch January 15, 2025 07:46
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