erc20-deposit-svc

command module
v0.0.0-...-31acdf0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

README

Build Status

ERC20 Deposit service

ERC20 deposit service is a bridge between TokenD and Ethereum blockchain which allows to deposit tokens into TokenD from Ethereum blockchain. It listens for token transfers specific addresses.

Usage

Environmental variable KV_VIPER_FILE must be set and contain path to desired config file.

erc20-deposit-svc run withdraw

Watchlist

In order for service to start watching deposits in specific asset, asset details in TokenD must have entry of the following form:

{
//...
"erc20": {
   "deposit": true, 
   "address": "0x0000000000000000000",  //contract address
   },
//...
}

Config

rpc:
  endpoint: "ws://ETH_NODE_ADDRESS"

ethereum:
  checkpoint: #block to start listening for deposits from
  confirmations: 20 #number of confirmations to wait for

horizon:
  endpoint: "SOME_VALID_ADDRESS"
  signer: "S_ASSET_OWNER_SECRET_KEY" # only for requests

deposit:
  admin_signer: "S_ASSET_OWNER_SIGNER_SECRET_KEY" # used for signing transactions

log:
  level: debug
  disable_sentry: true

Just add public key of deposit: admin_signer as signer to corporate account for issuance

Ethereum node

Node must be configured to accept connections through websockets. Origin must be explicitly or implicitly whitelisted: either --wsorigins "some_origin", or --wsorigins * to accept all connections. WS APIs eth and web3 must be enabled as well. Do not forget to forward ports. We have faced OOM kills of the container even with 16 Gb of RAM so auto restart is recomended.

Example startup command for Docker image:

docker run -dit -p 0.0.0.0:8080:8080 -p 0.0.0.0:30303:30303 -p 0.0.0.0:8545:8545 -p 0.0.0.0:8546:8546 \
--name <preferred_container_name> \
--restart on-failure \
-v <path_to_volume>:/root/.ethereum \
ethereum/client-go:v1.9.11 \
--datadir "/root/.ethereum/data" \
--rpc --rpcaddr '0.0.0.0' --rpcapi "eth, web3" \
--ws --wsaddr '0.0.0.0' --wsapi "eth, web3"  --wsorigins="*"

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL