-
Notifications
You must be signed in to change notification settings - Fork 7
/
contract.go
28 lines (22 loc) · 800 Bytes
/
contract.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package main
import (
"fmt"
"math/big"
"github.com/ethereum/go-ethereum/accounts/abi/bind"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
)
func (arb *arbBot) UniswapWeth(_wethAmountToFirstMarket *big.Int, targets []common.Address, payloads [][]byte) (*types.Transaction, error) {
txAuth, err := arb.txAuth()
if err != nil {
return nil, fmt.Errorf("error getting tx auth: %v", err)
}
tx, err := arb.bundleExecutor.UniswapWeth(txAuth, _wethAmountToFirstMarket, targets, payloads)
if err != nil {
return nil, fmt.Errorf("error sending tx: %v", err)
}
return tx, nil
}
func (arb *arbBot) FindPairTokens(pairAddresses []common.Address) ([][]common.Address, error) {
return arb.bundleExecutor.FindPairTokens(&bind.CallOpts{}, pairAddresses)
}