Skip to content

Commit

Permalink
Satisfy asset.Driver interface.
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeGruffins committed Apr 27, 2021
1 parent fda6e98 commit 3912b63
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions server/asset/eth/eth.go
Expand Up @@ -22,6 +22,7 @@ func init() {
}

const (
version = 0
assetName = "eth"
// coinIdSize = flags (2) + smart contract address where funds are locked (20) + secret
// hash map key (32)
Expand All @@ -32,13 +33,19 @@ const (
)

var (
zeroHash = common.Hash{}
notImplementedErr = errors.New("not implemented")
zeroHash = common.Hash{}
notImplementedErr = errors.New("not implemented")
_ asset.Driver = (*Driver)(nil)
)

// Driver implements asset.Driver.
type Driver struct{}

// Version returns the Backend implementation's version number.
func (d *Driver) Version() uint32 {
return version
}

// Setup creates the ETH backend. Start the backend with its Run method.
func (d *Driver) Setup(configPath string, logger dex.Logger, network dex.Network) (asset.Backend, error) {
return NewBackend(configPath, logger, network)
Expand Down

0 comments on commit 3912b63

Please sign in to comment.