decred / atomicswap

On-chain atomic swaps for Decred and other cryptocurrencies.
https://blog.decred.org/2017/09/20/On-Chain-Atomic-Swaps/
ISC License
507 stars 232 forks source link

DRY Implementation #117

Open ChrisCates opened 4 years ago

ChrisCates commented 4 years ago

Description

As it stands. A lot of code is rewritten in each folder. Each separate chain has its own module and checksums, but, we could have the commands be refactored into separate folders and the modules for each chain are used instead.

Example

Main source code is in.

src/initiate.go
src/participate.go
# etc...

Chain specific source code is in

btc/go.mod
btc/sum.mod
btc/btcatomicswap.go

And so forth.

Suggestions