Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/PyWaves/Waves-ERC20-Gateway


https://github.com/PyWaves/Waves-ERC20-Gateway

Last synced: 26 days ago
JSON representation

Awesome Lists containing this project

README

        

# ERC-20 <-> Waves Platform Gateway Framework
This framework allows to easily establish a gateway between any ERC-20 token and the
Waves Platform.
## Installation
Clone this repository and edit the config.json file according to your needs. Install the following dependencies:
```
web3
pywaves
flask
ethtoken
```
via pip and run the gateway by
```
python gateway.py
```
## Configuration of the config file
The config.json file includes all necessary settings that need to be connfigured in order to run a proper gateway:
```
{
"erc20": {
"name": "",
"endpoint": "",
"contract": {
"address": "",
"decimals":
},
"fee": ,
"confirmations": ,
"timeInBetweenChecks": ,
"gatewayAddress": "",
"privateKey": ""
},
"waves": {
"gatewayAddress": "",
"gatewaySeed": "",
"fee": ,
"assetId": "",
"decimals": ,
"network": "",
"node": "",
"timeInBetweenChecks": ,
"confirmations":
}
}
```

## Running the gateway
After starting the gateway, it will provide a webpage on port 8080 on which tunnels can be established.

## Usage of the gateway
This is a simple gateway for ERC-20 tokens to the Waves Platform. It is based on tunnels. Users can define a tunnel between a source ETH address and a target Waves address. Whenever an ERC-20 token is send from the defined source ETH address to the gateway address, the corresponding amount of tokens are send to the defined Waves address on the Waves Platform. It is important to notice that tunnels will be removed after they are used. Therefore, if more than one transfer should be done via a tunnel, this tunnel needs to be re-established!

For sending tokens from the Waves Platform to the Ethereum blockchain, just add the ETH address that should receive the tokens as the description of the transfer and send the tokens to the Waves address of the gateway.

# Disclaimer
USE THIS FRAMEWORK AT YOUR OWN RISK!!! FULL RESPONSIBILITY FOR THE SECURITY AND RELIABILITY OF THE FUNDS TRANSFERRED IS WITH THE OWNER OF THE GATEWAY!!!