Skip to content

Commit

Permalink
update method of retrieving account
Browse files Browse the repository at this point in the history
  • Loading branch information
thal0x committed Apr 10, 2023
1 parent b86714d commit a93edba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 2 additions & 0 deletions skipper-go/bot/uniswapv2.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ func (bot *Bot) HandleUniswapV2Transaction(exchange *uniswapv2.Exchange, targetT
return
}

fmt.Println(tx)

fmt.Println("-----")
fmt.Println("-----")
fmt.Println("Arbitrage opportunity found:")
Expand Down
8 changes: 0 additions & 8 deletions skipper-go/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/ethclient"
"github.com/lrita/cmap"
"github.com/thal0x/bn/bigint"

"github.com/skip-mev/skipper/bindings"
Expand Down Expand Up @@ -49,20 +48,13 @@ func startCommand() {

fmt.Println("backrunner listening for transactions...")

knownTxs := cmap.Map[common.Hash, bool]{}

txFeed := feed.NewTransactionFeed(config.CosmosRPC, config.PollMs)

txChan := txFeed.SubscribeNewTransactions()

for {
tx := <-txChan

_, known := knownTxs.LoadOrStore(tx.Hash(), true)
if known {
continue
}

go backrunner.OnTransaction(tx)
}
}
Expand Down

0 comments on commit a93edba

Please sign in to comment.