Skip to content

v2: Merge feat/next in main#270

Merged
popenta merged 25 commits into
mainfrom
feat/next
Jul 29, 2025
Merged

v2: Merge feat/next in main#270
popenta merged 25 commits into
mainfrom
feat/next

Conversation

@popenta

@popenta popenta commented Jul 29, 2025

Copy link
Copy Markdown
Collaborator

No description provided.

@popenta popenta self-assigned this Jul 29, 2025
@popenta popenta added the ignore-for-release-notes Ignore for release notes label Jul 29, 2025
@github-actions

Copy link
Copy Markdown

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  multiversx_sdk/abi
  bigint_value.py
  bool_value.py
  code_metadata_value.py
  interface.py
  option_value.py
  small_int_values.py
  multiversx_sdk/account_management
  account_controller.py 14
  multiversx_sdk/core
  address.py
  errors.py
  interfaces.py
  transaction.py
  multiversx_sdk/delegation
  delegation_controller.py
  multiversx_sdk/entrypoints
  entrypoints.py 151, 164, 170, 190, 197, 206, 218, 224, 233, 240, 248, 269-273, 311-315, 332-336
  multiversx_sdk/governance
  governance_controller.py
  multiversx_sdk/multisig
  multisig_controller.py
  multisig_transactions_factory.py 485
  multiversx_sdk/network_providers
  api_network_provider.py 173, 176
  interface.py
  proxy_network_provider.py 195, 198, 201, 204
  resources.py
  transaction_awaiter.py
  multiversx_sdk/smart_contracts
  smart_contract_controller.py
  multiversx_sdk/testutils
  mock_network_provider.py 187
  multiversx_sdk/token_management
  token_management_controller.py 57-59
  multiversx_sdk/transfers
  transfers_controller.py
Project Total  

The report is truncated to 25 files out of 77. To see the full report, please visit the workflow summary page.

This report was generated by python-coverage-comment-action

andreibancioiu
andreibancioiu previously approved these changes Jul 29, 2025
@andreibancioiu
andreibancioiu requested a review from Copilot July 29, 2025 08:16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the SDK to version 2.0.0 and introduces significant architectural changes to transaction factories and controllers by implementing a new gas limit estimation system and removing deprecated relayed transaction functionality.

  • Migrated from TransactionBuilder pattern to BaseFactory with gas limit estimation support
  • Introduced GasLimitEstimator for automatic gas limit calculation with network provider integration
  • Removed deprecated relayed transactions V1/V2 functionality and components

Reviewed Changes

Copilot reviewed 63 out of 64 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
pyproject.toml Version bump to 2.0.0
multiversx_sdk/validators/validators_transactions_factory.py Refactored to inherit from BaseFactory, replaced TransactionBuilder usage
multiversx_sdk/transfers/transfer_transactions_factory.py Converted to BaseFactory pattern with gas limit estimator support
multiversx_sdk/token_management/token_management_transactions_factory.py Updated factory to use BaseFactory and new gas estimation system
multiversx_sdk/smart_contracts/smart_contract_transactions_factory.py Migrated to BaseFactory, made gas_limit optional with estimator fallback
multiversx_sdk/gas_estimator/ New module providing GasLimitEstimator class for automatic gas calculation
multiversx_sdk/core/base_factory.py New base class for all transaction factories with gas estimation logic
multiversx_sdk/entrypoints/entrypoints.py Added gas limit estimator support to all entrypoint factory methods
multiversx_sdk/builders/transaction_builder.py Removed deprecated TransactionBuilder class
multiversx_sdk/relayed/ Completely removed deprecated relayed transaction components
Comments suppressed due to low confidence (1)

multiversx_sdk/account_management/account_controller.py:13

  • Parameter name 'gasLimitEstimator' should follow snake_case convention to match other parameters in the codebase. It should be 'gas_limit_estimator'.
    def __init__(self, chain_id: str, gasLimitEstimator: Optional[IGasLimitEstimator] = None) -> None:

sender = Address.new_from_bech32("erd1qyu5wthldzr8wx5c9ucg8kjagg0jfs53s8nr3zpz3hypefsdd8ssycr6th")
contract_address = Address.new_from_bech32("erd1qqqqqqqqqqqqqpgqhy6nl6zq07rnzry8uyh6rtyq0uzgtk3e69fqgtz9l4")
new_owner = Address.from_bech32("erd1spyavw0956vq68xj8y4tenjpq2wd5a9p2c6j8gsz7ztyrnpxrruqzu66jx")
new_owner = Address.new_from_bech32("erd1spyavw0956vq68xj8y4tenjpq2wd5a9p2c6j8gsz7ztyrnpxrruqzu66jx")

Copilot AI Jul 29, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The method call was changed from 'Address.from_bech32' to 'Address.new_from_bech32', but this appears to be updating deprecated method usage which is good. However, this change suggests a breaking API change that should be documented.

Copilot uses AI. Check for mistakes.
if tx_copy.guardian and not tx_copy.guardian_signature:
tx_copy.guardian_signature = bytes([0]) * 64

if tx_copy.relayer_signature and not tx_copy.relayer_signature:

Copilot AI Jul 29, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The condition 'tx_copy.relayer_signature and not tx_copy.relayer_signature' is logically impossible and will never be true. This should likely be 'if tx_copy.relayer and not tx_copy.relayer_signature:' to check if relayer exists but signature is missing.

Suggested change
if tx_copy.relayer_signature and not tx_copy.relayer_signature:
if tx_copy.relayer and not tx_copy.relayer_signature:

Copilot uses AI. Check for mistakes.
if tx_copy.guardian and not tx_copy.guardian_signature:
tx_copy.guardian_signature = bytes([0]) * 64

if tx_copy.relayer_signature and not tx_copy.relayer_signature:

Copilot AI Jul 29, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The condition 'tx_copy.relayer_signature and not tx_copy.relayer_signature' is logically impossible and will never be true. This should likely be 'if tx_copy.relayer and not tx_copy.relayer_signature:' to check if relayer exists but signature is missing.

Suggested change
if tx_copy.relayer_signature and not tx_copy.relayer_signature:
if tx_copy.relayer and not tx_copy.relayer_signature:

Copilot uses AI. Check for mistakes.
Comment on lines +354 to 355
gas_limit=60_000_000,
native_token_amount=50000000000000000,

Copilot AI Jul 29, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The parameter order has been changed - 'gas_limit' moved after 'contract_to_copy'. This is a breaking change in the API that could affect existing code and should be carefully documented.

Suggested change
gas_limit=60_000_000,
native_token_amount=50000000000000000,
native_token_amount=50000000000000000,
gas_limit=60_000_000,

Copilot uses AI. Check for mistakes.
danielailie
danielailie previously approved these changes Jul 29, 2025
Fix patching transaction for /cost endpoint
@popenta
popenta dismissed stale reviews from danielailie and andreibancioiu via 3ab56ab July 29, 2025 08:42
@popenta
popenta merged commit d258365 into main Jul 29, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ignore-for-release-notes Ignore for release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants