Skip to content

FastLane-Labs/bdn-operations-relay

 
 

Repository files navigation

bdn-operations-relay

BDN implementation of Atlas Operations Relay

Overview

BDN operations relay is a service that binds Atlas and BDN.

Running the service

To run the service, you need to set values into the config.yaml file.

Docker

To run the service using docker, you can use the following command:

docker build -t bloxroute/bdn-operations-relay:v0.0.1 .
docker run bloxroute/bdn-operations-relay:v0.0.1 -p 9080:9080 --config=config.yml

Test config

You can generate test values for the dapp-private-key, dapp-address, and solver-private-key using the following code:

package main

import (
	"encoding/hex"
	"fmt"

	"github.com/ethereum/go-ethereum/crypto"
)

func generateConfig() {
	dappPrivateKey, err := crypto.GenerateKey()
	if err != nil {
		panic(err)
	}
	dAppAddress := crypto.PubkeyToAddress(dappPrivateKey.PublicKey).String()
	dappPrivateKeyHex := hex.EncodeToString(crypto.FromECDSA(dappPrivateKey))

	solverProvateKey, err := crypto.GenerateKey()
	if err != nil {
		panic(err)
	}
	solverPrivateKeyHex := hex.EncodeToString(crypto.FromECDSA(solverProvateKey))

	fmt.Println("dapp-private-key", dappPrivateKeyHex)
	fmt.Println("dapp-address", dAppAddress)
	fmt.Println("solver-private-key", solverPrivateKeyHex)
}

About

BDN implementation of Atlas Operations Relay

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 97.3%
  • Dockerfile 1.7%
  • Makefile 1.0%