diff --git a/dexorder-alpha.toml b/dexorder-alpha.toml new file mode 100644 index 0000000..2efe055 --- /dev/null +++ b/dexorder-alpha.toml @@ -0,0 +1,8 @@ +account='test1' # Dev Account #1 +rpc_url='http://anvil:8545' +ws_url='ws://anvil:8545' +db_url='postgresql://dexorder:redroxed@postgres/dexorder' +redis_url='redis://redis:6379' + +[deployments] +53261='alpha' diff --git a/dexorder-mock.toml b/dexorder-mock.toml index c0e70a6..3889313 100644 --- a/dexorder-mock.toml +++ b/dexorder-mock.toml @@ -1,3 +1,3 @@ -account='test' +account='test1' rpc_url='local' ws_url='local_ws' diff --git a/src/dexorder/base/chain.py b/src/dexorder/base/chain.py index c9fb8df..e770b4e 100644 --- a/src/dexorder/base/chain.py +++ b/src/dexorder/base/chain.py @@ -45,5 +45,6 @@ Mumbai = Blockchain(80001, 'Mumbai') BSC = Blockchain(56, 'BSC') Arbitrum = Blockchain(42161, 'Arbitrum', 3, batch_size=1000) # todo configure batch size... does it depend on log count? :( Mock = Blockchain(31337, 'Mock', 3, batch_size=10000) +Alpha = Blockchain(53261, 'Dexorder Alpha', 3, batch_size=10000) current_chain = ContextVar[Blockchain]('current_chain') diff --git a/src/dexorder/uniswap.py b/src/dexorder/uniswap.py index 127e18d..f82275f 100644 --- a/src/dexorder/uniswap.py +++ b/src/dexorder/uniswap.py @@ -2,7 +2,7 @@ from charset_normalizer.md import getLogger from eth_utils import keccak, to_bytes, to_checksum_address from dexorder import dec, db -from dexorder.base.chain import Ethereum, Polygon, Goerli, Mumbai, Arbitrum, Mock +from dexorder.base.chain import Ethereum, Polygon, Goerli, Mumbai, Arbitrum, Mock, Alpha from dexorder.blockchain import ByBlockchainDict from dexorder.contract import ContractProxy from dexorder.util.abiencode import abi_encoder @@ -83,7 +83,7 @@ class _UniswapContracts (ByBlockchainDict[ContractProxy]): 'quoter': ContractProxy('0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6', 'IQuoter'), 'swap_router': ContractProxy('0xE592427A0AEce92De3Edee1F18E0157C05861564', 'ISwapRouter'), } - super().__init__({chain.chain_id:std for chain in (Ethereum, Polygon, Goerli, Mumbai, Arbitrum, Mock)}) + super().__init__({chain.chain_id:std for chain in (Ethereum, Polygon, Goerli, Mumbai, Arbitrum, Mock, Alpha)}) uniswapV3 = _UniswapContracts()