Skip to content

Commit

Permalink
Merge pull request #69 from skalenetwork/beta
Browse files Browse the repository at this point in the history
Release 1.1.0
  • Loading branch information
dmytrotkk authored May 11, 2023
2 parents 67c9442 + 38a8d0d commit 4f8c870
Show file tree
Hide file tree
Showing 90 changed files with 4,131 additions and 46,415 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@ src/metadata/metaportConfig*.json
src/meta/

src/metadata/chainsData.json
src/metadata/faucet.json
.vercel
43 changes: 43 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,49 @@ The SKALE Interchain Bridge UI is built on top of the [SKALE IMA contracts](http

The Interchain Bridge UI consists of a user interface that allows users to initiate and track transfers of assets and data between different blockchain networks. Users can connect their wallets to the Interchain Bridge UI and select the source and destination blockchains for their transfers.

## Bridge integration

It's possible to embed Bridge UI link with fallback into your dApp.

#### Directing users to the particular source chain

```
https://[BASE_BRIDGE_URL]/#/bridge/transfer/[FROM_CHAIN_NAME]
```

#### Directing users to the particular pair of chains

```
https://[BASE_BRIDGE_URL]/#/bridge/transfer/[FROM_CHAIN_NAME]/[TO_CHAIN_NAME]
```

#### Customizing transfer parameters

You can customize the link with the following parameters:

All params are optional.

- `amount` - amount of tokens to transfer
- `token` - symbol of the token to transfer
- `from-app` - when transfering from a Hub chain, it's possible to specify the name of the app to transfer from
- `to-app` - when transfering to a Hub chain, it's possible to specify the name of the app to transfer to
- `fallback-url` - URL with fallback link to redirect user after the transfer is completed (should be encoded)
- `fallback-text` - Text to display on the fallback button (should be encoded)

Example of the link with all params:

```
http://[BASE_BRIDGE_URL]/#/bridge/transfer/staging-perfect-parallel-gacrux/staging-severe-violet-wezen?to-app=nftrade&from-app=ruby&token=skl&amount=250&fallback-url=https%3A%2F%2Fnftrade.com%2Fassets%2Fskale%2F0x3b6f8d50938900ef14fbac48575c33a849ffd683%2F1&fallback-text=Return%20to%20NFT%20%22Solitude%22
```

In JS you can use the following function to encode the URL:

```js
function encodeUrl(url) {
return encodeURIComponent('https://www.example.com/some/path')
}
```

## Getting Started
To get started with the SKALE Bridge UI, users can visit the [SKALE Bridge UI](https://bridge.skale.network/) website and click on the "Connect wallet" button. Users can then connect their wallets and select the source and destination blockchains for their transfers.

Expand Down
5 changes: 5 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ META_DIR=$DIR/src/meta/

CHAINS_DATA_PATH=$DIR/env/$NETWORK_NAME/chainsData.json
METAPORT_CONFIG_PATH=$DIR/env/$NETWORK_NAME/metaportConfig.json
FAUCET_DATA_PATH=$DIR/env/$NETWORK_NAME/faucet.json

CHAINS_DATA_PATH_SRC=$DIR/src/metadata/chainsData.json
METAPORT_CONFIG_PATH_SRC=$DIR/src/metadata/metaportConfig.json
FAUCET_DATA_PATH_SRC=$DIR/src/metadata/faucet.json

if [ -d "$META_DIR" ]; then
echo "Removing ${META_DIR}..."
Expand All @@ -36,5 +38,8 @@ cp $CHAINS_DATA_PATH $CHAINS_DATA_PATH_SRC
echo "Copying ${METAPORT_CONFIG_PATH} -> ${METAPORT_CONFIG_PATH_SRC}..."
cp $METAPORT_CONFIG_PATH $METAPORT_CONFIG_PATH_SRC

echo "Copying ${FAUCET_DATA_PATH} -> ${FAUCET_DATA_PATH_SRC}..."
cp $FAUCET_DATA_PATH $FAUCET_DATA_PATH_SRC

echo "Building..."
yarn build
38 changes: 38 additions & 0 deletions env/legacy/chainsData.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"mainnet": {
"hub": "ethereum",
"chains": {
"elated-tan-skat": {
"tokens": {
"eth": {
"keyname": "eth",
"recommendedValues": [
"0.01",
"0.1",
"0.2",
"0.5"
]
}
}
}
}
},
"elated-tan-skat": {
"chains": {
"mainnet": {
"tokens": {
"eth": {
"keyname": "eth",
"recommendedValues": [
"0.01",
"0.1",
"0.2",
"0.5"
],
"address": "0xD2Aaa00700000000000000000000000000000000"
}
}
}
}
}
}
2 changes: 2 additions & 0 deletions env/legacy/faucet.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{
}
32 changes: 32 additions & 0 deletions env/legacy/metaportConfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"skaleNetwork": "legacy",
"autoLookup": false,
"openOnLoad": false,
"openButton": true,
"debug": false,
"chains": [
"mainnet",
"elated-tan-skat"
],
"chainsMetadata": {
},
"tokens": {
"mainnet": {
"eth": {
"chains": [
"elated-tan-skat"
]
},
"erc20": {
},
"erc721meta": {
},
"erc1155": {
}
}

},
"theme": {
"mode": "dark"
}
}
Loading

1 comment on commit 4f8c870

@vercel
Copy link

@vercel vercel bot commented on 4f8c870 May 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

bridge-ui – ./

bridge.skale.network
bridge-ui-skale-network.vercel.app
bridge-ui-git-main-skale-network.vercel.app

Please sign in to comment.