Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
9ff8063
types/bnctypes: add BinanceChain tx support
susruth Aug 4, 2019
98dd008
Add BinanceChain and Tendermint dependencies
susruth Aug 4, 2019
1346d93
types: add Binance Chain
susruth Aug 6, 2019
0afe4dc
types/bnctypes: add Address
susruth Aug 6, 2019
04b7864
types/bnctypes: add binance chain networks
susruth Aug 6, 2019
d09cb3c
sdk/client/bncclient: add basic binance client
susruth Aug 6, 2019
33e9bc9
updated dependencies
susruth Aug 6, 2019
43baab7
sdk/client/bncclient: add basic test for bncclient
susruth Aug 7, 2019
a091ed7
Merge branch 'master' into feat/binance-chain
susruth Aug 7, 2019
63f5299
types/bnctypes: updated AddressFromBech32
susruth Aug 29, 2019
54638e6
sdk/client/bncclient: add OpenOrder
susruth Aug 29, 2019
3250974
updated go modules
susruth Aug 29, 2019
b2f007c
Renamed Kovan to EthKovan
susruth Sep 4, 2019
54f59c5
Add Matic network support
susruth Sep 4, 2019
7772161
types/ethtypes: updated transaction interface to follow the standard
susruth Sep 4, 2019
4f393a1
sdk/account/ethaccount: updated to use Transact
susruth Sep 4, 2019
5035960
sdk/client/ethclient: updated PublishSignedTx
susruth Sep 4, 2019
8798fdc
types: updated Tx interface for backwards compatibility
susruth Sep 4, 2019
871677e
types/btctypes: moved InjectSignatures to BtcTx
susruth Sep 4, 2019
90d7f87
sdk/client/bncclient: fixed binance base urls
susruth Sep 6, 2019
47961aa
updated go modules
susruth Sep 10, 2019
6646f65
resolved conflicts with master
susruth Sep 10, 2019
34cbaa8
resolved conflicts with master
susruth Sep 10, 2019
8f47640
resolved merge conflicts with master
susruth Sep 10, 2019
08637f6
types/bnctypes: updated to use binance sdk for address en/decoding
susruth Sep 11, 2019
d23c66e
sdk/client/bncclient: fixed to use the correct ChainID
susruth Sep 11, 2019
7c5bd37
updated to use the latest Ginkgo
susruth Sep 11, 2019
32679e9
types/bnctypes: add NewCoins
susruth Sep 12, 2019
564887e
sdk/client/bncclient: fixed balances function
susruth Sep 12, 2019
76f8cc4
Merge branch 'master' into feat/binance-chain
susruth Sep 12, 2019
2f4add5
testutil/btcaccount: updated to use fixed fee
susruth Sep 12, 2019
ec2ec32
sdk/client/bncclient: add mint and burn requests
susruth Sep 12, 2019
b7221a4
Merged feat/binance-chain
susruth Sep 12, 2019
a9fce1b
types: add stringer impl for Binance
susruth Sep 12, 2019
4f6b9c9
types: merged feat/binance-chain
susruth Sep 12, 2019
a209c22
types/bnctypes: add InjectSigs method
susruth Sep 12, 2019
f840f8a
testutil: add RandomKey helper function
susruth Sep 13, 2019
477943a
types/ethtypes: add tests for calculating addresses
susruth Sep 13, 2019
9e5740a
types/ethtypes: add negative test for address generation
susruth Sep 13, 2019
d5185ac
sdk/gateway/btcgateway: add negative test for gateway creation
susruth Sep 13, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions cmd/mercury/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ func main() {
zecCache := cache.New(zecStore, logger)
bchStore := kv.NewJSON(kv.NewMemDB())
bchCache := cache.New(bchStore, logger)
maticStore := kv.NewJSON(kv.NewMemDB())
maticCache := cache.New(maticStore, logger)

// Initialise Bitcoin API.
btcTestnetURL := os.Getenv("BITCOIN_TESTNET_RPC_URL")
Expand Down Expand Up @@ -62,25 +64,29 @@ func main() {
"renex-ui": os.Getenv("INFURA_KEY_RENEX_UI"),
"dcc": os.Getenv("INFURA_KEY_DCC"),
}
infuraMainnetClient := rpc.NewInfuraClient(ethtypes.Mainnet, taggedKeys)
infuraMainnetClient := rpc.NewInfuraClient(ethtypes.EthMainnet, taggedKeys)
ethMainnetProxy := proxy.NewProxy(infuraMainnetClient)
ethMainnetAPI := api.NewApi(ethtypes.Mainnet, ethMainnetProxy, ethCache, logger)
ethMainnetAPI := api.NewApi(ethtypes.EthMainnet, ethMainnetProxy, ethCache, logger)

var testnetClient rpc.Client
var ethTestnetClient rpc.Client
ethKovanRPCURL := os.Getenv("ETH_KOVAN_RPC_URL")
if ethKovanRPCURL == "" {
logger.Infof("Using Infura")
testnetClient = rpc.NewInfuraClient(ethtypes.Kovan, taggedKeys)
ethTestnetClient = rpc.NewInfuraClient(ethtypes.EthKovan, taggedKeys)
} else {
logger.Infof("Using local ETH node at: %s", ethKovanRPCURL)
ethKovanUser := os.Getenv("ETH_KOVAN_RPC_USERNAME")
ethKovanPassword := os.Getenv("ETH_KOVAN_RPC_PASSWORD")
testnetClient = rpc.NewClient(ethKovanRPCURL, ethKovanUser, ethKovanPassword)
ethTestnetClient = rpc.NewClient(ethKovanRPCURL, ethKovanUser, ethKovanPassword)
}
ethTestnetProxy := proxy.NewProxy(testnetClient)
ethTestnetAPI := api.NewApi(ethtypes.Kovan, ethTestnetProxy, ethKovanCache, logger)
ethTestnetProxy := proxy.NewProxy(ethTestnetClient)
ethTestnetAPI := api.NewApi(ethtypes.EthKovan, ethTestnetProxy, ethKovanCache, logger)

maticTestnetClient := rpc.NewClient(os.Getenv("MATIC_TESTNET_RPC_URL"), "", "")
maticTestnetProxy := proxy.NewProxy(maticTestnetClient)
maticTestnetAPI := api.NewApi(ethtypes.MaticTestnet, maticTestnetProxy, maticCache, logger)

// Set-up and start the server.
server := api.NewServer(logger, "5000", btcTestnetAPI, zecTestnetAPI, bchTestnetAPI, ethMainnetAPI, ethTestnetAPI)
server := api.NewServer(logger, "5000", btcTestnetAPI, zecTestnetAPI, bchTestnetAPI, ethMainnetAPI, ethTestnetAPI, maticTestnetAPI)
server.Run()
}
12 changes: 10 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ module github.com/renproject/mercury
go 1.12

require (
github.com/VividCortex/gohistogram v1.0.0 // indirect
github.com/allegro/bigcache v1.2.1 // indirect
github.com/apilayer/freegeoip v3.5.0+incompatible // indirect
github.com/aristanetworks/goarista v0.0.0-20190712234253-ed1100a1c015 // indirect
github.com/binance-chain/go-sdk v1.0.8
github.com/btcsuite/btcd v0.0.0-20190807005414-4063feeff79a
github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d
github.com/cespare/cp v1.1.1 // indirect
Expand All @@ -16,24 +18,26 @@ require (
github.com/elastic/gosigar v0.10.4 // indirect
github.com/ethereum/go-ethereum v1.9.2
github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 // indirect
github.com/fortytw2/leaktest v1.3.0 // indirect
github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff // indirect
github.com/golang/protobuf v1.3.2 // indirect
github.com/google/gofuzz v1.0.0 // indirect
github.com/gorilla/mux v1.7.3
github.com/gorilla/websocket v1.4.0 // indirect
github.com/graph-gophers/graphql-go v0.0.0-20190724201507-010347b5f9e6 // indirect
github.com/hashicorp/golang-lru v0.5.3 // indirect
github.com/howeyc/fsnotify v0.9.0 // indirect
github.com/huin/goupnp v1.0.0 // indirect
github.com/influxdata/influxdb v1.7.7 // indirect
github.com/jackpal/go-nat-pmp v1.0.1 // indirect
github.com/jmhodges/levigo v1.0.0 // indirect
github.com/karalabe/usb v0.0.0-20190819132248-550797b1cad8 // indirect
github.com/mattn/go-colorable v0.1.2 // indirect
github.com/mattn/go-isatty v0.0.9 // indirect
github.com/mattn/go-runewidth v0.0.4 // indirect
github.com/miguelmota/go-ethereum-hdwallet v0.0.0-20190720004541-5f6b3168e4a0
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
github.com/olekukonko/tablewriter v0.0.1 // indirect
github.com/onsi/ginkgo v1.9.0
github.com/onsi/ginkgo v1.10.1
github.com/onsi/gomega v1.6.0
github.com/oschwald/maxminddb-golang v1.3.1 // indirect
github.com/pborman/uuid v1.2.0 // indirect
Expand All @@ -48,6 +52,8 @@ require (
github.com/steakknife/bloomfilter v0.0.0-20180922174646-6819c0d2a570 // indirect
github.com/steakknife/hamming v0.0.0-20180906055917-c99c65617cd3 // indirect
github.com/syndtr/goleveldb v1.0.1-0.20190318030020-c3a204f8e965 // indirect
github.com/tendermint/btcd v0.0.0-20180816174608-e5840949ff4f
github.com/tendermint/tendermint v0.31.2-rc0
github.com/tyler-smith/go-bip39 v1.0.2
github.com/wsddn/go-ecdh v0.0.0-20161211032359-48726bab9208 // indirect
golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586
Expand All @@ -56,3 +62,5 @@ require (
gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect
gopkg.in/olebedev/go-duktape.v3 v3.0.0-20190709231704-1e4459ed25ff // indirect
)

replace github.com/tendermint/go-amino => github.com/binance-chain/bnc-go-amino v0.14.1-binance.1
Loading