File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 11import asyncio
22import math
3+ import uuid
34from collections .abc import Iterable , Mapping , Sequence
45from concurrent .futures import ProcessPoolExecutor , ThreadPoolExecutor
56from dataclasses import dataclass
910
1011import eth_abi .abi
1112from eth_typing import ChecksumAddress , HexStr
13+ from hexbytes import HexBytes
1214from scipy .optimize import OptimizeResult , minimize_scalar
1315from web3 import Web3
1416
@@ -74,7 +76,7 @@ def __init__(
7476 self ,
7577 input_token : Erc20Token ,
7678 swap_pools : Iterable [Pool ],
77- id : str , # noqa:A002
79+ id : str | None , # noqa:A002
7880 max_input : int | None = None ,
7981 ) -> None :
8082 for swap_pool in swap_pools :
@@ -86,7 +88,7 @@ def __init__(
8688 if len (set (self .swap_pools )) != len (self .swap_pools ):
8789 raise DegenbotValueError (message = "Swap pools must not contain duplicates." )
8890
89- self .id = id
91+ self .id = HexBytes ( uuid . uuid4 (). bytes ). to_0x_hex () if id is None else id
9092 self .input_token = input_token
9193
9294 if max_input is None :
You can’t perform that action at this time.
0 commit comments