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

feat: proxy colony incoming native chain tokens #4174

Open
wants to merge 1 commit into
base: feat/M2-proxy-colonies
Choose a base branch
from

Conversation

iamsamgibbs
Copy link
Contributor

@iamsamgibbs iamsamgibbs commented Jan 23, 2025

Description

This PR adds native chain token incoming funds - note it does not address any colony native tokens.

The native chain token claims are generated by the fetchColonyNativeFundsClaim lambda, this PR refactors the lambda to also check for balances on any supported chain where a proxy colony has been deployed and return the claims as an array.

I've also temporarily added the chain id on the incoming funds page so we can more easily identify which chain the funds are on whilst we continue development on this feature.

I also began adding a new ProxyToken model, but realised I didn't actually need it to complete the work here, however I've left in place as it will be beneficial for the next few issues.

Testing

  • Step 1 - Create a "Manage Supported Chains" action and add proxy chain 1.

Screenshot 2025-01-24 at 18 24 16

  • Step 2 - We need to add a new network to your metamask wallet! In the metamask extension, make sure you have the Leela wallet connected in metamask, then open the network select menu.

Screenshot 2025-01-24 at 18 15 50

  • Step 3 - Add a custom network

Screenshot 2025-01-24 at 18 15 20

  • Step 4 - Give it whatever name and currency symbol you like. Set the RPC URL to 127.0.0.1:8546 and the chain id to 265669101

Screenshot 2025-01-24 at 18 17 34

  • Step 5 - Copy the colony address from the dashboard
  • Step 6 - In the meta mask extension click "Send"

Screenshot 2025-01-24 at 18 24 41

  • Step 7 - Paste the colony address and enter an amount.

Screenshot 2025-01-24 at 18 24 47

If you payment fails, clear the tab data under advanced settings and try again.

Screenshot 2025-01-24 at 18 25 00

  • Step 8 - Refresh the colony and navigate to the incoming funds page. You should see the new incoming fund on the proxy chain!

Screenshot 2025-01-24 at 18 25 30

For further testing send more funds (note all native funds are summed together per chain rather than shown as individual claims). Try adding the second proxy chain and sending funds there too.

Diffs

New stuff

  • ProxyToken model added

Changes 🏗

  • fetchColonyNativeFundsClaim lambda now fetches native chain token balances from other chains

Resolves #3459

@iamsamgibbs iamsamgibbs self-assigned this Jan 23, 2025
@iamsamgibbs iamsamgibbs changed the title feat: proxy colony incoming native tokens feat: proxy colony incoming native chain tokens Jan 24, 2025
@mmioana mmioana force-pushed the feat/M2-proxy-colonies branch from 1d120a4 to 83e17e6 Compare January 24, 2025 16:14
@iamsamgibbs iamsamgibbs force-pushed the feat/3459-proxy-colony-incoming-native-tokens branch from fe1f789 to a98aebe Compare January 24, 2025 18:04
@iamsamgibbs iamsamgibbs force-pushed the feat/3459-proxy-colony-incoming-native-tokens branch from a98aebe to 2a9d031 Compare January 24, 2025 18:06
@iamsamgibbs iamsamgibbs marked this pull request as ready for review January 24, 2025 18:29
@iamsamgibbs iamsamgibbs requested a review from a team as a code owner January 24, 2025 18:29
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.

[Proxy colonies M2] feat: proxy colonies should create incoming funds when they get them
1 participant