Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Telos Updated #659

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export WEB3_FANTOM="FANTOM-API-KEY-HERE" // "public" can be used in place of a p
export WEB3_MANTLE="MANTLE-API-KEY-HERE"
export WEB3_LINEA="LINEA-API-KEY-HERE" //
export WEB3_SEI="SEI-API-KEY-HERE" //
export WEB3_TELOS="TELOS-API-KEY-HERE"

#******** For Development - not required to run bot ********#
export ETHERSCAN_TOKEN="ONLY_REQUIRED_IN_DEV"
Expand Down
2 changes: 2 additions & 0 deletions fastlane_bot/config/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"coinbase_base": 0,
"fantom": 0.0003,
"mantle": 0,
"telos": 0,
}

ETHEREUM = "ethereum"
Expand Down Expand Up @@ -46,4 +47,5 @@
"mantle": 0,
"linea": 0,
"sei": 0,
"telos": 0,
}
67 changes: 61 additions & 6 deletions fastlane_bot/config/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ class ConfigNetwork(ConfigBase):
DEFAULT_MIN_PROFIT_GAS_TOKEN = Decimal("0.02")

IS_INJECT_POA_MIDDLEWARE = False
SUPPORTS_EIP1559 = True
# SUNDRY SECTION
#######################################################################################
COINGECKO_URL = "https://tokens.coingecko.com/uniswap/all.json"
Expand All @@ -277,6 +278,7 @@ class ConfigNetwork(ConfigBase):
NETWORK_MANTLE = S.NETWORK_MANTLE
NETWORK_LINEA = S.NETWORK_LINEA
NETWORK_SEI = S.NETWORK_SEI
NETWORK_TELOS = S.NETWORK_TELOS

# FLAGS
#######################################################################################
Expand All @@ -285,13 +287,18 @@ class ConfigNetwork(ConfigBase):
# HOOKS
#######################################################################################
@staticmethod
def gas_strategy(web3):
def gas_strategy(web3, supports_eip1559):
gas_price = web3.eth.gas_price # send `eth_gasPrice` request
max_priority_fee = web3.eth.max_priority_fee # send `eth_maxPriorityFeePerGas` request
return {
"maxFeePerGas": gas_price + max_priority_fee,
"maxPriorityFeePerGas": max_priority_fee
}
if supports_eip1559:
max_priority_fee = 0 #web3.eth.max_priority_fee # send `eth_maxPriorityFeePerGas` request
return {
"maxFeePerGas": gas_price + max_priority_fee,
"maxPriorityFeePerGas": max_priority_fee
}
else:
return {
"gasPrice": gas_price,
}

@classmethod
def new(cls, network=None):
Expand Down Expand Up @@ -320,6 +327,8 @@ def new(cls, network=None):
return _ConfigNetworkLinea(_direct=False)
elif network == cls.NETWORK_SEI:
return _ConfigNetworkSei(_direct=False)
elif network == cls.NETWORK_TELOS:
return _ConfigNetworkTelos(_direct=False)
elif network == cls.NETWORK_TENDERLY:
return _ConfigNetworkTenderly(_direct=False)
else:
Expand Down Expand Up @@ -821,6 +830,52 @@ class _ConfigNetworkSei(ConfigNetwork):
# Add any exchanges unique to the chain here
CHAIN_SPECIFIC_EXCHANGES = []

class _ConfigNetworkTelos(ConfigNetwork):
"""
Fastlane bot config -- network [Base Mainnet]
"""

NETWORK = S.NETWORK_TELOS
NETWORK_ID = "40"
NETWORK_NAME = "telos"
DEFAULT_PROVIDER = S.PROVIDER_ALCHEMY
RPC_ENDPOINT = "https://lb.drpc.org/ogrpc?network=telos&dkey="
WEB3_ALCHEMY_PROJECT_ID = os.environ.get("WEB3_TELOS")

SUPPORTS_EIP1559 = False
GAS_ORACLE_ADDRESS = None
network_df = get_multichain_addresses(network=NETWORK_NAME)
FASTLANE_CONTRACT_ADDRESS = "0x8c05EA305235a67c7095a32Ad4a2Ee2688aDe636"
MULTICALL_CONTRACT_ADDRESS = "0xcA11bde05977b3631167028862bE2a173976CA11"
IS_NO_FLASHLOAN_AVAILABLE = False

CARBON_CONTROLLER_ADDRESS = (
GRAPHENE_CONTROLLER_ADDRESS
) = "0xb4A4f26eC3A4Fd405468A610ba811720Ecd9E4d4"
CARBON_CONTROLLER_VOUCHER = (
GRAPHENE_CONTROLLER_VOUCHER
) = "0xA1a058aEc4D7C4654E704e42E4E9C2f32871B44c"

NATIVE_GAS_TOKEN_ADDRESS = "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"
WRAPPED_GAS_TOKEN_ADDRESS = "0xD102cE6A4dB07D247fcc28F366A623Df0938CA9E"
NATIVE_GAS_TOKEN_SYMBOL = "TLOS"
WRAPPED_GAS_TOKEN_SYMBOL = "WTLOS"
STABLECOIN_ADDRESS = "0x8D97Cea50351Fb4329d591682b148D43a0C3611b"

# Balancer
BALANCER_VAULT_ADDRESS = "0xbccc4b4c6530F82FE309c5E845E50b5E9C89f2AD" # Symmetric

CHAIN_FLASHLOAN_TOKENS = {
"0xD102cE6A4dB07D247fcc28F366A623Df0938CA9E": "WTLOS",
"0x8D97Cea50351Fb4329d591682b148D43a0C3611b": "USDC",
}
# Add any exchanges unique to the chain here
CHAIN_SPECIFIC_EXCHANGES = []

TAX_TOKENS = set([
"0x3E51e37350356B2D3ad84bD8146e48ac63E371a8", # BABYZAP
])

class _ConfigNetworkTenderly(ConfigNetwork):
"""
Fastlane bot config -- network [Ethereum Tenderly]
Expand Down
1 change: 1 addition & 0 deletions fastlane_bot/config/selectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
NETWORK_FANTOM = "fantom"
NETWORK_LINEA = "linea"
NETWORK_SEI = "sei"
NETWORK_TELOS = "telos"
NETWORK_MANTLE = "mantle"
NETWORK_SCROLL = "scroll"
NETWORK_BSC = "binance_smart_chain"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
address,exchange
0x0B4D65DA21e71C873401a25D2A0b2ACDFDedadC7,archly_v2
0x24fAB125Eb14b7e288C1D8f74D368bc33e126D4B,archly_v2
0x526de6Ab61339Cb7B19520B3E2882E3aa3f28b03,archly_v2
0x5796F4CBC3124DCBcE43e296D45B25E0e3C25B59,archly_v2
0x62D076fAFa1091F667582935Eedc2d063F40Bf53,archly_v2
0x7337D2Fa74e9ad69CC7a584A458131b48034FeBd,archly_v2
0x743faFdef7c3f70Fd5CbA3F45a13BD7E55E41E9e,archly_v2
0x749E3304fee2aa3eD5B57e0099F371E68AE00a22,archly_v2
0x7D7256bcF9b79463D2709FedfAa6e57838138808,archly_v2
0x7b201BCbc425E4A87f9dbB2CC59e0246Af17cdde,archly_v2
0x9F707A63efEe09A71cbe2edB173ef17938955Eca,archly_v2
0xAb334F5f553056afC9399410eC7dAC63ddc0f0C0,archly_v2
0xD800a78893c204F35D2C567a27F73852f7be2972,archly_v2
0xe7F2AED9670933eDdc71634aAC0A13a187D4fE8f,archly_v2
0xea057987Eb08BE9AE9eB36BA1981C1D99b7e996A,archly_v2
0xeaF72F36d5100e1Ed52F03C53D133e26046439E8,archly_v2
0xf086aE7b932aE228027f5A46212a6E0B19c477f4,archly_v2
Loading
Loading