omni / bridge-ui Goto Github PK
View Code? Open in Web Editor NEWUI for TokenBridge, an interoperability solution between Ethereum networks for native and ERC tokens
Home Page: https://bridge.poa.net/
UI for TokenBridge, an interoperability solution between Ethereum networks for native and ERC tokens
Home Page: https://bridge.poa.net/
I'm running Parity-bridge, based on the current version of the README, using:
./parity-bridge/target/release/bridge --config config.toml --database db.toml
And my db.toml
file is like this:
home_contract_address = "0x74A71bFb6C4903d79EbDd77C556D2d43A9346BdD"
foreign_contract_address = "0xD6fE4c32ADDe8e4b5eD6272Ecb5c434Dc7b120c4"
home_deploy = 2025251 # block number at which the contract was created for home contract you can find in `bridgeDeploymentResults.json`
foreign_deploy = 6923247 # block number at which the contract was created for foreign contract you can find in `bridgeDeploymentResults.json`
checked_deposit_relay = 2025251 # last checked deposits events on Home network
checked_withdraw_relay = 6923247 # last checked withdraw events on Foreign network
checked_withdraw_confirm = 6923247 # last checked withdraw events on Foreign network
However, once the parity-bridge process starts, the file gets corrupted. It looks like this:
home_contract_address = "0x74a71bfb6c4903d79ebdd77c556d2d43a9346bdd"
foreign_contract_address = "0xd6fe4c32adde8e4b5ed6272ecb5c434dc7b120c4"
home_deploy = 2025251
foreign_deploy = 6923247
checked_deposit_relay = 2026365
checked_withdraw_relay = 6924041
checked_withdraw_confirm = 6924041
loy = 6923247 # block number at which the contract was created for foreign contract you can find in `bridgeDeploymentResults.json`
checked_deposit_relay = 2025251 # last checked deposits events on Home network
checked_withdraw_relay = 6923247 # last checked withdraw events on Foreign network
checked_withdraw_confirm = 6923247 # last checked withdraw events on Foreign network
The Home and Foreign account balances show as zero, even though I transferred ETH into them, and I suspect this is the cause.
We need to indicate to the user via alert that he is on unknown to the bridge network and tell him that he needs to specify a particular network (Sokol or Kovan) in order to communicate with the bridge
Problem
On the confirmation window, the TX hash being displayed is just a string and not a link
Solution
The TX hash should be clickable to an external explorer window.
This is the first item of #20. When running the app on dev mode there are a couple of warnings. Fixing them will help to easily notice new warnings while working on new features.
please show confirmation box with some information:
Please confirm that you would like to send 0.1 POA from POA.network to receive 0.1 POA20 on Ethereum Mainnet.
After confirmation, please allow metamask to submit transaction.
Cancel/Confirm buttons
Also, run validation checks on this click to make sure he is connected to right network.
there is something wrong with overflow
css on mobile views
Solution:
Every event CollectedSignated & SignedForWithdraw has messageHash param,
so I have to call message
method on the contract and substract txHash
from it by doing the following:
message =
0x0039f22efb07a647557c7c5d17854cfd6d489ef3000000000000000000000000000000000000000000000000016345785d8a00002aba426015916079a2a10306fa1bb2edd18ed030a1a04cd9dcba2d1bd77b096c000000000000000000000000000000000000000000000000000000003b9aca00
txHash = '0x' + message.substring(106,170)
Make it more modular by decoupling React components into tiny modules
send sweetalert when the token is received on another chain
Now "Please switch metamask network to Sokol"
Should be "Please switch Metamask to Sokol network"
so when tx deposit is done
wrong tx hash is being show to sweetalert
example:
The app is showing:
https://etherscan.io/tx/0x69efa6763588b4c932fda3066bb74538382ad906e3cab2dcf0ab120cf50437c7
should be next one:
https://etherscan.io/tx/0xaa3c04a06ef24da1d62328007984eeb2b34d7e7668c592386479c9252d1bae93
we should be able to setup gasPrice speed from .env var
fast
, standard
, instant
, etc
similar to
https://github.com/poanetwork/bridge-monitor/blob/master/.env.example#L6
Problem: We need to make sure each PR satisfies our requirements to send tx via metamask from Home to Foreign and from Foreign to Home
Solution: Write end to end test script
Problem:
README.md is missing the general description of the product. Would be good to add
Solutions:
add info
if Metamask isn't installed wrong error message is repeatedly appears
Test URL :https://poabridge.netlify.com/
https://drive.google.com/open?id=15D7bKHLg-osqQ96EMv8Svb6F0Vsnyh9e
Console log:
getAcc.log
I'm thinking of adding some class to html
or body
tag like web3Loaded
Problem
Add the embeddable zendesk widget.
Solution
Add the following to the head
<!-- Start of poanet Zendesk Widget script -->
<script>
/*<![CDATA[*/
window.zE || (function(e, t, s) {
var n = window.zE = window.zEmbed = function() {
n._.push(arguments)
},
a = n.s = e.createElement(t),
r = e.getElementsByTagName(t)[0];
n.set = function(e) {
n.set._.push(e)
}, n._ = [], n.set._ = [], a.async = true, a.setAttribute("charset", "utf-8"), a.src = "https://static.zdassets.com/ekr/asset_composer.js?key=" + s, n.t = +new Date, a.type = "text/javascript", r.parentNode.insertBefore(a, r)
})(document, "script", "bb7f35c0-88a9-46f8-8807-01dd723665ea"); /*]]>*/
</script>
<!-- End of poanet Zendesk Widget script -->
https://rstormsf.github.io/skdjfalskdjfhkjhldsjhf7278_23/
Transaction was not mined within 50 blocks, please make sure your transaction was properly sent. Be aware that it might still be mined!
if we see this issue, we should ignore it and keep waiting for confirmations/receipts
Continue button should not be visible at all unless you tick the terms and conditions
Please update the README.md file to reflect changes made under:
.env
fileAlso I think it is not necessary to install and configure parity binary any more. So, it could be removed from documentation also.
Integration test
It may be that I have used some incorrect information, as there is some ambiguity in the instructions. In particular, I have used the same account throughout, for 0xETH_ACCOUNT_VALIDATOR_SOKOL
and the VALIDATORS
and PROXY_OWNER
parameters for running the deployment.
Another change I made, was to include this same account as the from
field in each network configuration:
module.exports = {
networks: {
development: {
host: "localhost",
port: 7545,
network_id: "*", // Match any network id
from: "0xMY_ACCOUNT"
},
home: {
host: "localhost",
port: "8545", // check your sokol.toml [rpc] port section
network_id: "*",
from: "0xMY_ACCOUNT",
gas: 4700000,
gasPrice: 1000000000
}
}
}
This was because I was getting an error saying that the from
parameter was missing.
With this setup, I have tried followed the instructions up to the bridge contract deployment:
$ VALIDATORS="0xMY_ACCOUNT" REQUIRED_NUMBER_OF_VALIDATORS=1 HOME_LIMIT=1000000000000000000 MAX_AMOUNT_PER_TX=100000000000000000 PROXY_OWNER="0xMY_ACCOUNT" NETWORK=home npm run deploy
But the process just hangs here:
> [email protected] deploy /Users/peter/dev/poa/sokol-kovan-bridge/poa-parity-bridge-contracts
> truffle migrate --reset --network $NETWORK
Using network 'home'.
Running migration: 1_initial_migration.js
Deploying Migrations...
With Parity UI connected to Kovan, I do get a request for a signature, but this is on the wrong network. I believe this needs to be signed on the Sokol chain instead. However, I cannot get Parity UI to connect to me Sokol chain.
Commas in number to make it more readable (2,999,999.5)
Remove the word “limit” on both info boxes.
Also, close the modal if clicked outside
This refers to the second item of #20 . It would be nice to decouple the store logic from web3 and contracts functions. Also there are some functions that can be refactored to more reusable code.
Problem:
When changing to Ethereum / Kovan network, it is not obvious to the user that the arrow has changed direction and that you can transfer POA20 to POA.
Solution:
In my opinion, the tokens to transfer should always be on the left side. No need to change the arrows when changing the network, just swap the texts.
Problem: hard to review changes from PRs
Solution: Use netlify for each PR deployment
allow users to show all events when search query has txHash
Reproduce:
Expected result:
Actual result:
https://drive.google.com/open?id=1ZMCr3L8UezFSnWy5II89lpq59lApjHEY
Network (Instead of RPC URL)
Home Address - Bridge Home Address
Current Deposit Limit
Maximum Amount Per Transaction
Minimum Amount Per Transaction
Locked POA native tokens Amount
Your POA Balance (This should be the only value bolded)
Network (Instead of RPC URL)
Foreign Address - Bridge Foreign Address
Current Withdraw Limit -
Maximum Amount Per Transaction
Minimum Amount Per Transaction
Custom Token Address
POA20 tokens Amount
Your POA20 Balance (This should be the only value bolded)
Problem: Kovan did hard hard fork to enable WASM
Solution: we need to change instruction
When the app cannot establish connection to Home/Foreign Network it shows a sweetalert for every request it fails. Example https://cl.ly/1n173908110w
Home deposits should only wait 8 block from HOME, not Foreign
Foreign withdrawals should wait 8 blocks on Foreign
This issue refers to the third and fourth item of #20 . Some components can be refactored to reusable components, splitting logic and stateless components.
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.