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
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -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