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

Web3.py V6 upgrade #96

Merged
merged 10 commits into from
Jul 31, 2024
Merged

Web3.py V6 upgrade #96

merged 10 commits into from
Jul 31, 2024

Commits on Jul 23, 2024

  1. Add logging to Flashbots module

    - Add logger to Flashbots class
    - Include log messages for key operations:
      - Sending bundle
      - Simulating bundle
      - Sending private transaction
      - Cancelling private transaction
    - Use proper logging instead of print in example.py
    odysseus0 committed Jul 23, 2024
    Configuration menu
    Copy the full SHA
    ad1cecc View commit details
    Browse the repository at this point in the history
  2. refactor simple.py

    odysseus0 committed Jul 23, 2024
    Configuration menu
    Copy the full SHA
    c485798 View commit details
    Browse the repository at this point in the history
  3. Refactor FlashbotProvider for improved clarity and efficiency

    - Streamline header combination in make_request method
    - Update docstring to accurately reflect provider's purpose
    - Improve overall code readability
    odysseus0 committed Jul 23, 2024
    Configuration menu
    Copy the full SHA
    a2ca980 View commit details
    Browse the repository at this point in the history
  4. Switch from Black to Ruff for code formatting and linting

    - Remove Black configuration and dependencies
    - Add Ruff configuration and dependencies
    - Update VSCode settings for Python to use Ruff
    - Add pre-commit config for Ruff
    - Replace GitHub Actions workflow for Black with Ruff
    - Update pyproject.toml to configure Ruff
    odysseus0 committed Jul 23, 2024
    Configuration menu
    Copy the full SHA
    594407a View commit details
    Browse the repository at this point in the history
  5. Refactor: Format and lint code with ruff

    - Reorder and optimize imports across multiple files
    - Remove unused imports
    - Standardize import order and grouping
    - Minor code formatting adjustments
    - Remove trailing whitespace
    
    This commit improves code consistency and readability by applying
    ruff's linting and formatting rules to the project.
    odysseus0 committed Jul 23, 2024
    Configuration menu
    Copy the full SHA
    4f60102 View commit details
    Browse the repository at this point in the history
  6. Refactor flashbot function and improve type safety

    - Introduce FlashbotsWeb3 class to enhance type checking
    - Remove Goerli-specific PoA middleware injection
    - Update flashbot function to return FlashbotsWeb3 instance
    - Improve error handling for environment variables in examples
    - Enhance address handling with Web3.to_checksum_address
    - Update transaction nonce type to use web3.types.Nonce
    - Minor code style improvements and type annotations
    odysseus0 committed Jul 23, 2024
    Configuration menu
    Copy the full SHA
    630d64b View commit details
    Browse the repository at this point in the history
  7. Refactor network configuration and setup

    - Add flashbots/constants.py with FLASHBOTS_NETWORKS
    - Update flashbots/types.py to include new network types
    - Modify setup_web3 function to use the new network configuration
    - Remove NETWORK_CONFIG and related functions from examples/simple.py
    odysseus0 committed Jul 23, 2024
    Configuration menu
    Copy the full SHA
    2fcc77a View commit details
    Browse the repository at this point in the history
  8. Improve transaction creation and gas price handling

    - Update create_transaction function to dynamically calculate gas prices
    - Modify transaction creation in main function
    odysseus0 committed Jul 23, 2024
    Configuration menu
    Copy the full SHA
    11962e7 View commit details
    Browse the repository at this point in the history
  9. Enhance simple.py example and improve Flashbots module

    - Add command-line arguments for network selection and log level
    - Implement dynamic logging configuration
    - Update docstrings with usage instructions and examples
    - Refactor network type to 'Network' for consistency
    - Add get_networks() function to retrieve available networks
    - Improve flashbot() function documentation
    - Minor code cleanup and formatting improvements
    odysseus0 committed Jul 23, 2024
    Configuration menu
    Copy the full SHA
    bd4a0b6 View commit details
    Browse the repository at this point in the history

Commits on Jul 30, 2024

  1. refactor: improve network handling and type safety

    - Convert Network type to Enum for better type safety
    - Update FLASHBOTS_NETWORKS to use Network enum as keys
    - Remove get_networks() function, use Network enum values directly
    - Add EnumAction class for argparse to handle Network enum
    - Update parse_arguments() and related functions to use Network enum
    - Adjust type hints throughout the code to reflect these changes
    odysseus0 committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    78ee934 View commit details
    Browse the repository at this point in the history