Go to file
Alexander Kolotov 31e1c9efa1
Merge recent changes (abe561c) from RaidGuild repo
Based on abe561c115
2021-02-19 12:10:14 -06:00
.github/workflows switch deployment configuration to production 2021-02-04 11:17:56 -06:00
packages removed custom gas price 2021-02-19 00:48:45 +05:30
.eslintrc.json lint & formatting 2020-08-31 16:36:31 +05:30
.firebaserc Fix for syntax error in .firebaserc (#3) 2021-02-04 11:58:33 -06:00
.gitignore added tokens in subgraph 2020-09-06 17:54:34 +05:30
.prettierrc.json fetching system limits from contract 2020-09-02 18:30:40 +05:30
README.md updated README 2021-01-23 02:10:32 +05:30
firebase.json lint & formatting 2020-08-31 16:36:31 +05:30
package.json gas prices fix 2021-02-03 23:44:04 +05:30
yarn.lock fixed walletconnect ethersProvider bug 2021-02-17 23:54:29 +05:30

README.md

Omnibridge

The OmniBridge multi-token extension for the Arbitrary Message Bridge between Ethereum and the xDai chain is the simplest way to transfer ANY ERC20/ERC677/ERC827 token to the xDai chain.

Project Structure

This project is a monorepo created with Yarn Workspaces and Create Eth App.

xdai-omnibridge
├── .eslintrc.json
├── .firebaserc
├── .github
│   └── workflows
│       ├── sokol.yml
│       └── staging.yml
├── .gitignore
├── .prettierrc.json
├── README.md
├── firebase.json
├── package.json
├── packages
│   ├── react-app
│   │   ├── package.json
│   │   ├── public
│   │   │   ├── android-chrome-192x192.png
│   │   │   ├── android-chrome-512x512.png
│   │   │   ├── apple-touch-icon.png
│   │   │   ├── browserconfig.xml
│   │   │   ├── favicon-16x16.png
│   │   │   ├── favicon-32x32.png
│   │   │   ├── favicon.ico
│   │   │   ├── index.html
│   │   │   ├── manifest.json
│   │   │   ├── mstile-150x150.png
│   │   │   ├── robots.txt
│   │   │   └── safari-pinned-tab.svg
│   │   └── src
│   │       ├── App.jsx
│   │       ├── Routes.jsx
│   │       ├── assets
│   │       │   ├── advanced.svg
│   │       │   ├── alert.svg
│   │       │   ├── blue-tick.svg
│   │       │   ├── change-network.png
│   │       │   ├── claim.svg
│   │       │   ├── close.svg
│   │       │   ├── confirm-transfer.svg
│   │       │   ├── custom-token.svg
│   │       │   ├── details.svg
│   │       │   ├── down-triangle.svg
│   │       │   ├── drop-down.svg
│   │       │   ├── error.svg
│   │       │   ├── eth-logo.png
│   │       │   ├── eth.png
│   │       │   ├── info.svg
│   │       │   ├── loading.svg
│   │       │   ├── logo.svg
│   │       │   ├── multiple-claim.svg
│   │       │   ├── no-history.svg
│   │       │   ├── right-arrow.svg
│   │       │   ├── search.svg
│   │       │   ├── settings.svg
│   │       │   ├── transfer.svg
│   │       │   ├── unlock.svg
│   │       │   ├── up-triangle.svg
│   │       │   └── xdai-logo.png
│   │       ├── components
│   │       │   ├── AdvancedMenu.jsx
│   │       │   ├── BridgeHistory.jsx
│   │       │   ├── BridgeLoadingModal.jsx
│   │       │   ├── BridgeTokens.jsx
│   │       │   ├── ClaimTokensModal.jsx
│   │       │   ├── ClaimTransferModal.jsx
│   │       │   ├── ConfirmTransferModal.jsx
│   │       │   ├── ConnectWeb3.jsx
│   │       │   ├── CustomTokenModal.jsx
│   │       │   ├── DaiWarning.jsx
│   │       │   ├── ErrorBoundary.jsx
│   │       │   ├── Footer.jsx
│   │       │   ├── FromToken.jsx
│   │       │   ├── Header.jsx
│   │       │   ├── HistoryItem.jsx
│   │       │   ├── HistoryPagination.jsx
│   │       │   ├── Layout.jsx
│   │       │   ├── LoadingModal.jsx
│   │       │   ├── Logo.jsx
│   │       │   ├── NeedsConfirmationModal.jsx
│   │       │   ├── NeedsTransactions.jsx
│   │       │   ├── NoHistory.jsx
│   │       │   ├── ProgressRing.jsx
│   │       │   ├── ReverseWarning.jsx
│   │       │   ├── SelectTokenModal.jsx
│   │       │   ├── SystemFeedback.jsx
│   │       │   ├── TermsOfServiceModal.jsx
│   │       │   ├── ToToken.jsx
│   │       │   ├── TokenSelectorModal.jsx
│   │       │   ├── TransferButton.jsx
│   │       │   ├── TxLink.jsx
│   │       │   ├── UnlockButton.jsx
│   │       │   ├── UpdateSettings.jsx
│   │       │   └── WalletSelector.jsx
│   │       ├── contexts
│   │       │   ├── BridgeContext.jsx
│   │       │   └── Web3Context.jsx
│   │       ├── hooks
│   │       │   ├── useCurrentDay.js
│   │       │   ├── useFeeType.js
│   │       │   ├── useRewardAddress.js
│   │       │   ├── useTotalConfirms.js
│   │       │   └── useTransactionStatus.js
│   │       ├── icons
│   │       │   ├── DownArrowIcon.jsx
│   │       │   ├── ErrorIcon.jsx
│   │       │   ├── GithubIcon.jsx
│   │       │   ├── HistoryIcon.jsx
│   │       │   ├── LeftIcon.jsx
│   │       │   ├── NetworkIcon.jsx
│   │       │   ├── OmniBridgeIcon.jsx
│   │       │   ├── PlusIcon.jsx
│   │       │   ├── RaidGuildIcon.jsx
│   │       │   ├── RightIcon.jsx
│   │       │   ├── SettingsIcon.jsx
│   │       │   ├── TelegramIcon.jsx
│   │       │   ├── TwitterIcon.jsx
│   │       │   ├── WalletFilledIcon.jsx
│   │       │   ├── WalletIcon.jsx
│   │       │   └── XDaiIcon.jsx
│   │       ├── index.jsx
│   │       ├── lib
│   │       │   ├── amb.js
│   │       │   ├── bridge.js
│   │       │   ├── constants.js
│   │       │   ├── ethPrice.js
│   │       │   ├── gasPrice.js
│   │       │   ├── helpers.js
│   │       │   ├── history.js
│   │       │   ├── overrides.js
│   │       │   ├── providers.js
│   │       │   ├── proxy.js
│   │       │   ├── token.js
│   │       │   └── tokenList.js
│   │       ├── pages
│   │       │   ├── History.jsx
│   │       │   └── Home.jsx
│   │       └── theme.js
│   └── subgraph
│       ├── config
│       │   ├── kovan.json
│       │   ├── mainnet.json
│       │   ├── sokol.json
│       │   └── xdai.json
│       ├── package.json
│       ├── schema.graphql
│       ├── src
│       │   ├── abis
│       │   │   ├── amb.json
│       │   │   ├── mediator.json
│       │   │   └── token.json
│       │   └── mappings
│       │       ├── amb.ts
│       │       ├── bridge.ts
│       │       └── helpers.ts
│       └── subgraph.template.yaml
└── yarn.lock

Owing to this dependency on Yarn Workspaces, xdai-omnibridge can't be used with npm.

Available Scripts

In the project directory, you can run:

React App

yarn react-app:start

Runs the React app in development mode.
Open http://localhost:3000 to view it in the browser.

The page will automatically reload if you make changes to the code.
You will see the build errors and lint warnings in the console.

yarn react-app:test

Runs the React test watcher in an interactive mode.
By default, runs tests related to files changed since the last commit.

yarn react-app:build

Builds the React app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

Subgraph

yarn subgraph:auth

GRAPH_ACCESS_TOKEN=your-access-token-here yarn subgraph:auth

yarn subgraph:prepare-<network>

Generates subgraph.yaml for particular network. Supported networks are kovan, sokol, xdai and mainnet.

yarn subgraph:codegen

Generates AssemblyScript types for smart contract ABIs and the subgraph schema.

yarn subgraph:build

Compiles the subgraph to WebAssembly.

yarn subgraph:deploy-<network>

Deploys the subgraph for particular network to the official Graph Node.