harmony-one / ethhmy-bridge.frontend Goto Github PK
View Code? Open in Web Editor NEWEthereum<>Harmony two way bridge (trusted version) - frontend part
Ethereum<>Harmony two way bridge (trusted version) - frontend part
Let’s put ‘Horizon by Harmony’ where Harmony logo is right now on the upper left corner. Use Nunito font and dark navy color.
we need a disclaimer and a link to the help message on the FE. The help can bring the init pop-up message.
Can you add a welcome pop-up message with following information:
Welcome to Ethereum<>Harmony Bridge
You can use this bridge to
1) send your ethereum BUSD to harmony
2) send your ethereum LINK to harmony
3) send any ERC20 from ethereum to harmony
Each Ethereum to Harmony transfer requires two transactions to be signed by the user:
1) approve token lock
2) the actual lock
Each of these two ETH transactions may cost you: 0.0001 to 0.0075 Ether (or $1 to $2.6 at $350/ether)
You can also do the reverse transfer, i.e., redeem your tokens back to your ethereum account. The cost is bared by Harmony and you will only pay for Harmony gas (which is a small fraction of a cent).
This is a permissioned bridge and your tokens are never lost. However, use the bridge with caution.
Report any issues to [email protected] with one or more of the following informations:
1) operation id, e.g., 7fa14f19-219f8220-1f209e61-8911e539 in https://bridge.harmony.one/busd/operations/7fa14f19-219f8220-1f209e61-8911e539. Every bridge operation is associated with a unique operation id, which is available in your webpage URL. If you didn't store the operation id, it is okay, follow 2) or 3)
2) your transaction hashes on Ethereum or Harmony
3) your ETH or ONE account address
Please allow 24-48 hours for your issue resolution. Happy Bridging!!!
```
Also add a Contact Us button that mailsTo: [email protected]
another problem i noticed is:
Add a Contact Us button that mailsTo: [email protected]
Let's add this text to the 'info' page
"Please find more instructions here" and link URL: https://docs.harmony.one/home/showcases/crosschain/horizon-bridge
After the flow is complete and switching panel should not automatically close, unless closed by the user
currently, we do not force the user wait for 13 blocks confirmation of the unlock transaction in the harmony to Ethereum flow. this could lead to security flaw, where assume the unlock tx succeed, but fail to get finalized (due to forking), then on the harmony side burn happened, but on the Ethereum side unlock didn't, leading to loss of funds.
could you change to also wait for 13 block confirmation? if confirmation fails, then call revert burn on harmony side to give back user's token.
let us limit the number of harmony to ethereum transactions to 5 per account over 24 hours. basically you need to query all harmony managers (BUSD, LINK, ERC20), getTransactionHistory(manager contract) and then filter using user address and transaction timestamp. If there are already 5 transactions within an hour from the user account (harmony) then disable the frontend.
any other ways?
make the assets explorer searchable using any of these (case-insensitive prefix search):
also make at least the Total Locked
column sortable.
It seems the bridge is using a fixed or very low gas price of 20 gwei for transactions. The experience is nott that pleasant because i had to bump the gas on Metamask for the txs to get through.
Is it possible to calculate the best gas price to be used at the time the user tries to send the tx? For example, at the time i write this issue the recommended gas price is 50 Gwei for a tx to be confirmed in less than 5 min accordingly to https://ethgasstation.info/
Confirmation panel is ugly, change it to progress bar? or at least remove block numbers and show like "1/13 blocks confirmed"
ETH - HMY
https://kovan.etherscan.io/tx/0xbf3c8e588825ef17305b9a82ba8818c2227be84cadc78ce35a70125a04ec75c0
had 100 BUSD from faucet
sorry for opening this this one in frontend instead of backend!
Can you add a feature that shows all eth token to hmy token mappings
Token Name Ethereum Address Harmony Address Total Value Locked (TVL)
BUSD <link to ethereum contract> <link to harmony contract> 54
LINK <link to ethereum contract> <link to harmony contract> 20
also a search bar, where user can input their ethereum token address and it will fetch the above details.
there are two ways to get the mappings
if you know the ethereum address, you can simply do
tokenManagerContract.methods.mappedTokens(<eth-token-addr>).call(options)
get past event logs of x blocks for the TokenMapAck event (you could keep cache the last queried block)
event TokenMapAck(address indexed tokenReq, address indexed tokenAck)
show total locked value in $ in the top of the https://bridge.harmony.one/tokens page. this could be accomplished by querying etherscan (etherscan api).
for example: https://etherscan.io/address/0x2dCCDB493827E15a5dC8f8b72147E6c4A5620857 shows $521.40 under token:
. This is for ETH_ERC20_MANAGER_CONTRACT
. You will also need to query for ETH_BUSD_MANAGER_CONTRACT
(https://etherscan.io/address/0xfD53b1B4AF84D59B20bF2C20CA89a6BeeAa2c628) and ETH_LINK_MANAGER_CONTRACT
(https://etherscan.io/address/0xfE601dE9D4295274b9904D5a9Ad7069F23eE2B32) contracts and add the three values to show TVL.
basically, figure out a consistent way to show the tx fee (either dollars or ether).
frontend should fail at each step of the operation if not enough validators are live
currently, if the approve or lock transaction on ethereum takes too long, metamask provides a way to speedup, which creates another transaction with same nonce, but higher gas to make it succeed faster. however, in our backend, we need to take care of this situation. if the original transaction fails due to dropped & replaced
, then follow the replaced transaction status. this logic needs to fully follow the replacement chain, as a transaction may get bumped several times by the user (if the user is not willing to wait, he may just keep on bumping it). see the attached case:
the operation failed:
the original transaction was dropped and replaced by the tx below by the user:
the replaced transaction succeeded, however our backend could not capture that.
the logic needs to accommodate regular checking of the transactions whether they are being replaced by some other transactions due to user bumping.
Currently the main bridge explorer will show all users. Can we have a personalized explorer for users flows? This could be shown right below the flow screen (split screen horizontally). This way, user can better track what happened with their operations. Basically, filter operations based on user's ETH and ONE accounts.
we'd add the bottom bar to link to harmony main website, twitter, and discord, telegram.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.