add traderjoe router
add usdt.e alias
This commit is contained in:
parent
f1729770e3
commit
005d54e57d
@ -75,5 +75,6 @@ func NewTokenMapper() evm.TokenMapper {
|
||||
tm.AddAlias("BTC", "WBTC.e")
|
||||
tm.AddAlias("USDC", "USDC.e")
|
||||
tm.AddAlias("DAI", "DAI.e")
|
||||
tm.AddAlias("USDT", "USDT.e")
|
||||
return tm
|
||||
}
|
||||
|
1
traderjoe/contracts/router.abi
Normal file
1
traderjoe/contracts/router.abi
Normal file
File diff suppressed because one or more lines are too long
775
traderjoe/contracts/router.go
Normal file
775
traderjoe/contracts/router.go
Normal file
File diff suppressed because one or more lines are too long
21
traderjoe/router.go
Normal file
21
traderjoe/router.go
Normal file
@ -0,0 +1,21 @@
|
||||
package traderjoe
|
||||
|
||||
import (
|
||||
"git.lehouerou.net/laurent/evm"
|
||||
"git.lehouerou.net/laurent/evm/avalanche"
|
||||
"git.lehouerou.net/laurent/evm/traderjoe/contracts"
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
const (
|
||||
RouterAddress = "0x60aE616a2155Ee3d9A68541Ba4544862310933d4"
|
||||
)
|
||||
|
||||
func NewRouter(client *avalanche.Client) (*evm.UniswapRouter, error) {
|
||||
contract, err := contracts.NewRouter(common.HexToAddress(RouterAddress), client)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "init contract")
|
||||
}
|
||||
return evm.NewUniswapRouter("traderjoe", client, contract), nil
|
||||
}
|
Loading…
Reference in New Issue
Block a user