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

new network: add polygon (matic) to wallet and swap #4448

Closed
4 tasks done
noxonsu opened this issue May 21, 2021 · 3 comments
Closed
4 tasks done

new network: add polygon (matic) to wallet and swap #4448

noxonsu opened this issue May 21, 2021 · 3 comments
Assignees
Labels
ready The required changes are merged into the master

Comments

@noxonsu
Copy link
Member

noxonsu commented May 21, 2021

https://medium.com/stakingbits/setting-up-metamask-for-polygon-matic-network-838058f6d844

@VitaliyShulik
Copy link
Member

VitaliyShulik commented Jun 3, 2021

Work pool based on #4261 and #4417 changes

Common:

  • Add Matic to common/helpers
  • Add Matic to common/helpers/constants COINS_WITH_DYNAMIC_FEE
  • Add Matic to common/helpers/constants DEFAULT_CURRENCY_PARAMETERS
  • Add Matic to common/helpers/constants MIN_AMOUNT
  • Add erc20Matic to common/erc20Like
  • add Matic chains id to web3connect in availableNetworks

Core:

  • Add Matic and MaticTokens to constants (COINS.ts)
  • Add Matic to swap.app/constants/TRADE_TICKERS
  • Add Matic to swap.app/util/typeforce
  • Add web3Matic to Swap.App
  • Add register erc20Matic tokens to Swap.App/utils (в дальнейшем лучше рефакторинг сделать как отдельный класс и наследовать от него форматы токенов)
  • Add swap.auth for matic
  • Add Flow MATIC2BTC, MATICTOKEN2BTC and vice versa (еще нужно на другие utxo валюты)
  • Add MaticSwap and MaticTokenSwap classes to swap.swaps
  • Add Matic to externalConfig —> blockchainSwapEnabled
  • Add maticData to ConfirmBeginSwap.tsx

Front:

  • Add Matic icon in CurrencyIcon/images
  • Add Matic icon in CurrencyActions.scss
  • Add Matic icon in RestoryMnemonicWallet.tsx
  • Correct routes in front/routes
  • Add Matic to front/helpers (deprecated. Replace with common/helpers)
  • Add Matic to front/helpers/getCurrencyKey.ts
  • Add Matic to front/helpers/user.ts
  • Add Matic to front/helpers/transactions.ts
  • Add Matic chains id to front/helpers/metamask.ts
  • Add Matic to front/helpers/constants/TRADE_TICKERS
  • Add Matic to front/helpers/constants/privateKeyNames
  • Add MATIC_TOKEN case to fetchCoinFee method
  • Add Matic and erc20Matic to helpers swaps
  • Add Matic and erc20Matic flows, privateKey and swaps to instances newSwap
  • Add Matic to CreateWallet Steps startPack
  • Add Matic ticker to prepareDropDownOptions
  • Add UTXO_to_ERC20MATIC, UTXO_to_MATIC classes and vice versa to swaps
  • Add Matic to redux/actions
  • Add erc20Matic to redux/actions
  • Add Matic to redux/actions/user
  • Add Matic to redux/actions/core
  • Add matic to redux/redusers/currencies
  • Add matic to redux/redusers/user
  • add erc20Matic fee to helpers/externalConfig
  • add maticData to Swap component

Tests:

  • add unit evm tests

Additional:

  • Add erc20Matic(addresses), feeRates and links to front/config/.. and helpers/externalConfig testnet and mainnet
  • Deploy Contracts to matic testnet (WBTC erc20Matic token, tokens swap, main currency swap) and add addresses to configs
  • Deploy Contracts to matic mainnet (tokens swap, main currency swap) and add addresses to configs
  • add matic faucet link https://faucet.matic.network/

@Disti4ct
Copy link
Collaborator

Disti4ct commented Jun 3, 2021

Всего не упомнишь. Будем по дороге сюда добавлять инфу с галочками. Помощь в будущем и легче следить за сложностью добавления. После всего имеет смысл обновить наши доки, тк что-то устарело/обновилось.

Сделал: добавил на кошелек (Создание, отображение, отправка).
Проблемы с получением всех транзакций. Как я думал что надо будет убрать эксплореры и делать через веб3, но у веб3 нет метода для получения сразу всех транз (плохо искал?). Это отдельный вопрос, что делать если будем сами все находить через веб3 и рпс. Главное я еще не нашел апи для Matic chain, чтобы получать все транзы и сейчас их не видно в истории (полезное: docs, chain data).
Для общего познания есть такой сервис Covalent

@VitaliyShulik
Copy link
Member

Проблемы с получением всех транзакций. Как я думал что надо будет убрать эксплореры и делать через веб3, но у веб3 нет метода для получения сразу всех транз (плохо искал?).

да, вроде нет такого метода, одно из решений - нужно по всем блокам пробегаться по всем транзакциям и сравнивать адреса куда или откуда со своим адресом - долгая и затратная операция

@VitaliyShulik VitaliyShulik added ready The required changes are merged into the master and removed in progress labels Jun 11, 2021
@Disti4ct Disti4ct added this to the ETHlike-s (BSC, ...) milestone Jun 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready The required changes are merged into the master
Projects
None yet
Development

No branches or pull requests

4 participants