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: add Mantle support #1184

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

feat: add Mantle support #1184

wants to merge 9 commits into from

Conversation

Sekhmet
Copy link
Member

@Sekhmet Sekhmet commented Feb 13, 2025

Summary

This PR adds Mantle support. Currently it uses sx-api as API.

Closes: https://github.com/snapshot-labs/workflow/issues/449

How to test

  1. Apply patch below to run local mana (make sure you have funds in your relayer Mana account for fees).
  2. Run yarn dev.
  3. You can create Mantle space, propose, vote etc.

Tested

  • Create space
  • Create proposal
  • Vote
  • Execute proposal (contract execution, other options are unavailable because of missing OpenSea/Alchemy support).
diff --git a/apps/ui/.env b/apps/ui/.env
index c136c279..a3104101 100644
--- a/apps/ui/.env
+++ b/apps/ui/.env
@@ -1,6 +1,6 @@
 VITE_ENABLED_NETWORKS=
 VITE_METADATA_NETWORK=
-VITE_MANA_URL=https://mana.box
+VITE_MANA_URL=http://localhost:3001
 VITE_HIGHLIGHT_URL=https://testnet.highlight.red
 VITE_IPFS_GATEWAY=ipfs.snapshot.box
 VITE_INFURA_API_KEY=46a5dd9727bf48d4a132672d3f376146
diff --git a/package.json b/package.json
index a7cad219..598cf209 100644
--- a/package.json
+++ b/package.json
@@ -7,7 +7,7 @@
     "url": "[email protected]:snapshot-labs/sx-monorepo.git"
   },
   "scripts": {
-    "dev": "turbo run dev --filter=!mana --filter=!api --filter=!api-subgraph",
+    "dev": "turbo run dev  --filter=!api --filter=!api-subgraph",
     "dev:full": "./scripts/dev-full.sh",
     "build": "turbo run build",
     "test": "turbo run test",

@Sekhmet Sekhmet marked this pull request as ready for review February 13, 2025 15:21
@Sekhmet Sekhmet requested a review from bonustrack February 13, 2025 15:21
Wtih this change you will be to create contract execution if Alchemy
or OpenSea is not supported. SendToken and SendNft modals will be disabled.
This will update Mantle explorer
@bonustrack
Copy link
Member

Works well! I'm able to cast vote under 1 cent, propose for 2 cents. Can you just change the network id to "mnt" instead of "mantle" this is what Safe is using too, which is a standard they started https://eips.ethereum.org/EIPS/eip-3770.

@Sekhmet
Copy link
Member Author

Sekhmet commented Feb 15, 2025

I tried to follow that when integrating. EIP-3770 says shortName is mandatory and MUST be a valid chain short name from https://github.com/ethereum-lists/chains.

For Mantle shortName is "mantle" in this repo: https://github.com/ethereum-lists/chains/blob/8f6656ec0ba945534d5c3914863bdc5e5a080946/_data/chains/eip155-5000.json#L17

Maybe we should ask Mantle team what is their preferred way and ideally it should be reflected in chains repo.

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.

2 participants