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

Add: Testnet && Doc #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,26 @@ Join the translation efforts on [Transifex](https://transifex.com/blockstream/es

- Mainnet, Testnet and Elements high performance electrum server

## Sugarchain Testing

To start on local machine, you may do, run:

```bash
$ git clone https://github.com/sugarchain-project/esplora.git && cd esplora
$ npm install
$ npm run dist sugar-mainnet # (or sugar-testnet)
# change URL in `flavors/sugar-testnet/config.env`:
# export BASE_HREF=${BASE_HREF:-'/esplora-testnet/'}
# change "/esplora/" to "/" for local testing
# if you want to host on github pages: `/esplora-testnet/` for `https://sugarchain-project.github.io/esplora-testnet/`
$ cd dist
$ python3 -m http.server
```

*Warning: `BASE_HREF` will be hardcoded. If your URL is changed, you have to change in `config.env`.*

The server will be available at http://localhost:8000/

## Developing

To start a development server with live babel/browserify transpilation, run:
Expand Down
14 changes: 14 additions & 0 deletions flavors/sugar-testnet/config.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

export SITE_TITLE='TSugar TExplorer'
export HOME_TITLE='TSugar TExplorer'
export NATIVE_ASSET_LABEL=TSUGAR
export NATIVE_ASSET_NAME='TSugar'

export MENU_ACTIVE='Sugar Testnet'
export BASE_HREF=${BASE_HREF:-'/esplora-testnet/'}

export CUSTOM_ASSETS="$CUSTOM_ASSETS flavors/sugar-testnet/www/*"
export CUSTOM_CSS="$CUSTOM_CSS flavors/sugar-testnet/extras.css"

export API_URL=https://api-testnet.sugarchain.org/esplora/
22 changes: 22 additions & 0 deletions flavors/sugar-testnet/extras.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

.jumbotron-fluid {
background-image: linear-gradient(-90deg, rgba(13, 141, 119, 1) 0%, rgba(17, 103, 97, 1) 16%, rgba(25, 68, 74, 1) 35%, rgba(29, 42, 48, 1) 57%, rgba(14, 16, 17, 1) 100%);
}

.search-bar {
border: 1px solid rgba(168, 184, 201, 1);
box-shadow: 0px 0px 6px 0px rgba(168, 184, 201, 1);
}

.details-btn > div {
color: rgba(168, 184, 201, 1);
border: 1px solid rgba(168, 184, 201, 1);
}

.transaction-box > .footer > div:nth-child(3) {
color: rgba(168, 184, 201, 1);
}

.navbar {
background-image: linear-gradient(-90deg, rgba(13, 141, 119, 1) 0%, rgba(17, 103, 97, 1) 16%, rgba(25, 68, 74, 1) 35%, rgba(29, 42, 48, 1) 57%, rgba(14, 16, 17, 1) 100%);
}
Binary file added flavors/sugar-testnet/www/img/block.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added flavors/sugar-testnet/www/img/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added flavors/sugar-testnet/www/img/icons/menu-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added flavors/sugar-testnet/www/img/icons/minus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added flavors/sugar-testnet/www/img/icons/plus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added flavors/sugar-testnet/www/img/icons/search.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added flavors/sugar-testnet/www/img/transaction.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.