From 211223bc3c48b73acc9fea6c20d67a186fb95ebb Mon Sep 17 00:00:00 2001 From: Felipe Alvarado Date: Tue, 27 Aug 2024 15:01:04 +0200 Subject: [PATCH] Rename `gnosis` package name to `safe_eth` (#1286) * Rename gnosis package name * Update sphinx doc --- .github/ISSUE_TEMPLATE/bug_report.md | 2 +- .../create_pr_with_new_address.py | 2 +- .../validate_new_address_issue_input_data.py | 4 +- .github/workflows/python.yml | 2 +- MANIFEST.in | 2 +- README.rst | 34 ++--- build_docs.sh | 2 +- config/settings/test.py | 2 +- docs/source/gnosis.eth.clients.rst | 53 ------- docs/source/gnosis.eth.contracts.rst | 10 -- docs/source/gnosis.eth.django.rst | 53 ------- docs/source/gnosis.eth.oracles.abis.rst | 53 ------- docs/source/gnosis.eth.rst | 57 -------- docs/source/gnosis.safe.rst | 101 ------------- docs/source/index.rst | 4 +- docs/source/modules.rst | 4 +- docs/source/quickstart.rst | 64 ++++----- docs/source/safe_eth.cowsap.rst | 37 +++++ .../safe_eth.eth.account_abstraction.rst | 53 +++++++ docs/source/safe_eth.eth.clients.rst | 53 +++++++ docs/source/safe_eth.eth.contracts.abis.rst | 21 +++ docs/source/safe_eth.eth.contracts.rst | 29 ++++ docs/source/safe_eth.eth.django.rst | 69 +++++++++ ...eth.eip712.rst => safe_eth.eth.eip712.rst} | 4 +- docs/source/safe_eth.eth.oracles.abis.rst | 85 +++++++++++ docs/source/safe_eth.eth.oracles.helpers.rst | 21 +++ docs/source/safe_eth.eth.oracles.rst | 86 +++++++++++ docs/source/safe_eth.eth.rst | 83 +++++++++++ docs/source/{gnosis.rst => safe_eth.rst} | 12 +- .../safe_eth.safe.account_abstraction.rst | 21 +++ ....eth.oracles.rst => safe_eth.safe.api.rst} | 12 +- ...e_eth.safe.api.transaction_service_api.rst | 45 ++++++ docs/source/safe_eth.safe.rst | 135 ++++++++++++++++++ docs/source/safe_eth.util.rst | 29 ++++ manage.py | 4 +- mypy.ini | 2 +- pyproject.toml | 18 +-- {gnosis => safe_eth}/__init__.py | 0 {gnosis => safe_eth}/cowsap/__init__.py | 0 {gnosis => safe_eth}/cowsap/cow_swap_api.py | 4 +- {gnosis => safe_eth}/cowsap/order.py | 0 {gnosis => safe_eth}/cowsap/tests/__init__.py | 0 .../cowsap/tests/test_cow_swap_api.py | 0 {gnosis => safe_eth}/eth/__init__.py | 0 .../eth/account_abstraction/__init__.py | 0 .../eth/account_abstraction/bundler_client.py | 2 +- .../eth/account_abstraction/constants.py | 0 .../eth/account_abstraction/exceptions.py | 0 .../eth/account_abstraction/user_operation.py | 2 +- .../user_operation_receipt.py | 4 +- {gnosis => safe_eth}/eth/clients/__init__.py | 0 .../eth/clients/blockscout_client.py | 0 .../eth/clients/contract_metadata.py | 0 .../eth/clients/ens_client.py | 0 .../eth/clients/etherscan_client.py | 0 .../eth/clients/sourcify_client.py | 0 {gnosis => safe_eth}/eth/constants.py | 0 .../eth/contracts/__init__.py | 0 .../eth/contracts/abis/CPKFactory.json | 0 .../CompatibilityFallbackHandler_V1_3_0.json | 0 .../CompatibilityFallbackHandler_V1_4_1.json | 0 .../abis/DelegateConstructorProxy.json | 0 .../eth/contracts/abis/ERC1155.json | 0 .../eth/contracts/abis/ERC20.json | 0 .../eth/contracts/abis/ERC20TestToken.json | 0 .../eth/contracts/abis/ERC721.json | 0 .../eth/contracts/abis/GnosisSafe_V0_0_1.json | 0 .../eth/contracts/abis/GnosisSafe_V1_0_0.json | 0 .../eth/contracts/abis/GnosisSafe_V1_1_1.json | 0 .../eth/contracts/abis/GnosisSafe_V1_3_0.json | 0 .../eth/contracts/abis/MultiSend.json | 0 .../eth/contracts/abis/PayingProxy.json | 0 .../contracts/abis/ProxyFactory_V1_0_0.json | 0 .../contracts/abis/ProxyFactory_V1_1_1.json | 0 .../contracts/abis/ProxyFactory_V1_3_0.json | 0 .../contracts/abis/ProxyFactory_V1_4_1.json | 0 .../eth/contracts/abis/Proxy_V1_0_0.json | 0 .../eth/contracts/abis/Proxy_V1_1_1.json | 0 .../eth/contracts/abis/Proxy_V1_3_0.json | 0 .../eth/contracts/abis/Proxy_V1_4_1.json | 0 .../eth/contracts/abis/Safe_V1_4_1.json | 0 .../eth/contracts/abis/SignMessageLib.json | 0 .../abis/SimulateTxAccessor_V1_4_1.json | 0 .../eth/contracts/abis/__init__.py | 0 .../contracts/abis/kyber_network_proxy.json | 0 .../eth/contracts/abis/multicall.py | 0 .../eth/contracts/abis/uniswap_exchange.json | 0 .../eth/contracts/abis/uniswap_factory.json | 0 .../contracts/abis/uniswap_v2_factory.json | 0 .../eth/contracts/abis/uniswap_v2_pair.json | 0 .../eth/contracts/abis/uniswap_v2_router.json | 0 .../eth/contracts/contract_base.py | 0 {gnosis => safe_eth}/eth/django/__init__.py | 0 {gnosis => safe_eth}/eth/django/admin.py | 0 {gnosis => safe_eth}/eth/django/filters.py | 0 {gnosis => safe_eth}/eth/django/forms.py | 2 +- {gnosis => safe_eth}/eth/django/models.py | 0 .../eth/django/serializers.py | 0 .../eth/django/tests/__init__.py | 0 .../eth/django/tests/models.py | 0 .../eth/django/tests/test_forms.py | 0 .../eth/django/tests/test_models.py | 0 .../eth/django/tests/test_serializers.py | 0 .../eth/django/tests/test_validators.py | 0 {gnosis => safe_eth}/eth/django/validators.py | 0 {gnosis => safe_eth}/eth/eip712/__init__.py | 0 {gnosis => safe_eth}/eth/ethereum_client.py | 4 +- {gnosis => safe_eth}/eth/ethereum_network.py | 0 {gnosis => safe_eth}/eth/exceptions.py | 0 {gnosis => safe_eth}/eth/multicall.py | 0 {gnosis => safe_eth}/eth/oracles/__init__.py | 0 .../eth/oracles/abis/__init__.py | 0 .../eth/oracles/abis/aave_abis.py | 0 .../eth/oracles/abis/balancer_abis.py | 0 .../eth/oracles/abis/cream_abis.py | 0 .../eth/oracles/abis/curve_abis.py | 0 .../eth/oracles/abis/mooniswap_abis.py | 0 .../eth/oracles/abis/superfluid_abis.py | 0 .../eth/oracles/abis/uniswap_v3.py | 0 .../eth/oracles/abis/yearn_abis.py | 0 .../eth/oracles/abis/zerion_abis.py | 0 {gnosis => safe_eth}/eth/oracles/cowswap.py | 2 +- .../eth/oracles/exceptions.py | 0 .../eth/oracles/helpers/__init__.py | 0 .../eth/oracles/helpers/curve_gauge_list.py | 0 {gnosis => safe_eth}/eth/oracles/kyber.py | 0 {gnosis => safe_eth}/eth/oracles/oracles.py | 0 .../eth/oracles/superfluid.py | 0 {gnosis => safe_eth}/eth/oracles/sushiswap.py | 0 .../eth/oracles/uniswap_v3.py | 0 {gnosis => safe_eth}/eth/oracles/utils.py | 2 +- {gnosis => safe_eth}/eth/tests/__init__.py | 0 .../eth/tests/account_abstraction/__init__.py | 0 .../test_bundler_client.py | 0 .../test_e2e_bundler_client.py | 0 .../test_user_operation.py | 0 .../test_user_operation_receipt.py | 0 .../eth/tests/clients/__init__.py | 0 .../eth/tests/clients/mocks.py | 4 +- .../tests/clients/test_blockscout_client.py | 0 .../eth/tests/clients/test_ens_client.py | 0 .../tests/clients/test_etherscan_client.py | 0 .../eth/tests/clients/test_sourcify_client.py | 0 .../eth/tests/eip712/__init__.py | 0 .../eth/tests/eip712/test_eip712.py | 2 +- .../eth/tests/ethereum_test_case.py | 0 .../eth/tests/mocks/__init__.py | 0 .../eth/tests/mocks/mock_bundler.py | 0 .../eth/tests/mocks/mock_internal_txs.py | 0 .../eth/tests/mocks/mock_log_receipts.py | 0 .../eth/tests/mocks/mock_trace_block.py | 0 .../eth/tests/mocks/mock_trace_filter.py | 0 .../eth/tests/mocks/mock_trace_transaction.py | 0 .../eth/tests/oracles/__init__.py | 0 .../eth/tests/oracles/test_cowswap.py | 2 +- .../eth/tests/oracles/test_kyber.py | 0 .../eth/tests/oracles/test_superfluid.py | 0 .../eth/tests/oracles/test_sushiswap.py | 0 .../eth/tests/oracles/test_uniswap_v3.py | 0 .../eth/tests/test_ethereum_client.py | 0 .../eth/tests/test_multicall.py | 0 .../eth/tests/test_oracles.py | 2 +- {gnosis => safe_eth}/eth/tests/test_utils.py | 0 {gnosis => safe_eth}/eth/tests/utils.py | 0 {gnosis => safe_eth}/eth/typing.py | 0 {gnosis => safe_eth}/eth/utils.py | 0 {gnosis => safe_eth}/py.typed | 0 {gnosis => safe_eth}/safe/__init__.py | 0 .../safe/account_abstraction/__init__.py | 0 .../account_abstraction/safe_operation.py | 4 +- {gnosis => safe_eth}/safe/addresses.py | 2 +- {gnosis => safe_eth}/safe/api/__init__.py | 0 {gnosis => safe_eth}/safe/api/base_api.py | 4 +- .../api/transaction_service_api/__init__.py | 0 .../api/transaction_service_api/entities.py | 0 .../transaction_service_api.py | 6 +- .../transaction_service_messages.py | 0 .../transaction_service_tx.py | 2 +- {gnosis => safe_eth}/safe/constants.py | 0 {gnosis => safe_eth}/safe/enums.py | 0 {gnosis => safe_eth}/safe/exceptions.py | 0 {gnosis => safe_eth}/safe/multi_send.py | 8 +- {gnosis => safe_eth}/safe/proxy_factory.py | 6 +- {gnosis => safe_eth}/safe/safe.py | 8 +- {gnosis => safe_eth}/safe/safe_create2_tx.py | 12 +- {gnosis => safe_eth}/safe/safe_creator.py | 8 +- {gnosis => safe_eth}/safe/safe_deployments.py | 0 {gnosis => safe_eth}/safe/safe_signature.py | 8 +- {gnosis => safe_eth}/safe/safe_tx.py | 10 +- {gnosis => safe_eth}/safe/serializers.py | 4 +- {gnosis => safe_eth}/safe/signatures.py | 2 +- {gnosis => safe_eth}/safe/tests/__init__.py | 0 .../tests/account_abstraction/__init__.py | 0 .../test_safe_operation.py | 4 +- .../safe/tests/api/__init__.py | 0 .../tests/api/test_transaction_service_api.py | 8 +- .../api/test_transaction_service_messages.py | 6 +- .../safe/tests/mocks/__init__.py | 0 .../safe/tests/mocks/mock_transactions.py | 0 .../safe/tests/safe_test_case.py | 18 +-- .../safe/tests/test_addresses.py | 6 +- .../safe/tests/test_multi_send.py | 2 +- .../safe/tests/test_proxy_factory/__init__.py | 0 .../test_proxy_factory/test_proxy_factory.py | 18 +-- {gnosis => safe_eth}/safe/tests/test_safe.py | 6 +- .../safe/tests/test_safe_create2_tx.py | 2 +- .../safe/tests/test_safe_signature.py | 2 +- .../safe/tests/test_safe_tx.py | 0 .../safe/tests/test_safe_v1_0_0.py | 0 .../safe/tests/test_safe_v1_3_0.py | 0 .../safe/tests/test_serializers.py | 0 .../safe/tests/test_signatures.py | 6 +- {gnosis => safe_eth}/safe/tests/utils.py | 2 +- {gnosis => safe_eth}/util/__init__.py | 0 {gnosis => safe_eth}/util/http.py | 0 {gnosis => safe_eth}/util/util.py | 0 scripts/cowswap/cow_swap_cli.py | 6 +- .../generators/generate_safe_deployments.py | 2 +- 218 files changed, 957 insertions(+), 515 deletions(-) delete mode 100644 docs/source/gnosis.eth.clients.rst delete mode 100644 docs/source/gnosis.eth.contracts.rst delete mode 100644 docs/source/gnosis.eth.django.rst delete mode 100644 docs/source/gnosis.eth.oracles.abis.rst delete mode 100644 docs/source/gnosis.eth.rst delete mode 100644 docs/source/gnosis.safe.rst create mode 100644 docs/source/safe_eth.cowsap.rst create mode 100644 docs/source/safe_eth.eth.account_abstraction.rst create mode 100644 docs/source/safe_eth.eth.clients.rst create mode 100644 docs/source/safe_eth.eth.contracts.abis.rst create mode 100644 docs/source/safe_eth.eth.contracts.rst create mode 100644 docs/source/safe_eth.eth.django.rst rename docs/source/{gnosis.eth.eip712.rst => safe_eth.eth.eip712.rst} (64%) create mode 100644 docs/source/safe_eth.eth.oracles.abis.rst create mode 100644 docs/source/safe_eth.eth.oracles.helpers.rst create mode 100644 docs/source/safe_eth.eth.oracles.rst create mode 100644 docs/source/safe_eth.eth.rst rename docs/source/{gnosis.rst => safe_eth.rst} (52%) create mode 100644 docs/source/safe_eth.safe.account_abstraction.rst rename docs/source/{gnosis.eth.oracles.rst => safe_eth.safe.api.rst} (53%) create mode 100644 docs/source/safe_eth.safe.api.transaction_service_api.rst create mode 100644 docs/source/safe_eth.safe.rst create mode 100644 docs/source/safe_eth.util.rst rename {gnosis => safe_eth}/__init__.py (100%) rename {gnosis => safe_eth}/cowsap/__init__.py (100%) rename {gnosis => safe_eth}/cowsap/cow_swap_api.py (98%) rename {gnosis => safe_eth}/cowsap/order.py (100%) rename {gnosis => safe_eth}/cowsap/tests/__init__.py (100%) rename {gnosis => safe_eth}/cowsap/tests/test_cow_swap_api.py (100%) rename {gnosis => safe_eth}/eth/__init__.py (100%) rename {gnosis => safe_eth}/eth/account_abstraction/__init__.py (100%) rename {gnosis => safe_eth}/eth/account_abstraction/bundler_client.py (99%) rename {gnosis => safe_eth}/eth/account_abstraction/constants.py (100%) rename {gnosis => safe_eth}/eth/account_abstraction/exceptions.py (100%) rename {gnosis => safe_eth}/eth/account_abstraction/user_operation.py (99%) rename {gnosis => safe_eth}/eth/account_abstraction/user_operation_receipt.py (96%) rename {gnosis => safe_eth}/eth/clients/__init__.py (100%) rename {gnosis => safe_eth}/eth/clients/blockscout_client.py (100%) rename {gnosis => safe_eth}/eth/clients/contract_metadata.py (100%) rename {gnosis => safe_eth}/eth/clients/ens_client.py (100%) rename {gnosis => safe_eth}/eth/clients/etherscan_client.py (100%) rename {gnosis => safe_eth}/eth/clients/sourcify_client.py (100%) rename {gnosis => safe_eth}/eth/constants.py (100%) rename {gnosis => safe_eth}/eth/contracts/__init__.py (100%) rename {gnosis => safe_eth}/eth/contracts/abis/CPKFactory.json (100%) rename {gnosis => safe_eth}/eth/contracts/abis/CompatibilityFallbackHandler_V1_3_0.json (100%) rename {gnosis => safe_eth}/eth/contracts/abis/CompatibilityFallbackHandler_V1_4_1.json (100%) rename {gnosis => safe_eth}/eth/contracts/abis/DelegateConstructorProxy.json (100%) rename {gnosis => safe_eth}/eth/contracts/abis/ERC1155.json (100%) rename {gnosis => safe_eth}/eth/contracts/abis/ERC20.json (100%) rename {gnosis => safe_eth}/eth/contracts/abis/ERC20TestToken.json (100%) rename {gnosis => safe_eth}/eth/contracts/abis/ERC721.json (100%) rename {gnosis => safe_eth}/eth/contracts/abis/GnosisSafe_V0_0_1.json (100%) rename {gnosis => safe_eth}/eth/contracts/abis/GnosisSafe_V1_0_0.json (100%) rename {gnosis => safe_eth}/eth/contracts/abis/GnosisSafe_V1_1_1.json (100%) rename {gnosis => safe_eth}/eth/contracts/abis/GnosisSafe_V1_3_0.json (100%) rename {gnosis => safe_eth}/eth/contracts/abis/MultiSend.json (100%) rename {gnosis => safe_eth}/eth/contracts/abis/PayingProxy.json (100%) rename {gnosis => safe_eth}/eth/contracts/abis/ProxyFactory_V1_0_0.json (100%) rename {gnosis => safe_eth}/eth/contracts/abis/ProxyFactory_V1_1_1.json (100%) rename {gnosis => safe_eth}/eth/contracts/abis/ProxyFactory_V1_3_0.json (100%) rename {gnosis => safe_eth}/eth/contracts/abis/ProxyFactory_V1_4_1.json (100%) rename {gnosis => safe_eth}/eth/contracts/abis/Proxy_V1_0_0.json (100%) rename {gnosis => safe_eth}/eth/contracts/abis/Proxy_V1_1_1.json (100%) rename {gnosis => safe_eth}/eth/contracts/abis/Proxy_V1_3_0.json (100%) rename {gnosis => safe_eth}/eth/contracts/abis/Proxy_V1_4_1.json (100%) rename {gnosis => safe_eth}/eth/contracts/abis/Safe_V1_4_1.json (100%) rename {gnosis => safe_eth}/eth/contracts/abis/SignMessageLib.json (100%) rename {gnosis => safe_eth}/eth/contracts/abis/SimulateTxAccessor_V1_4_1.json (100%) rename {gnosis => safe_eth}/eth/contracts/abis/__init__.py (100%) rename {gnosis => safe_eth}/eth/contracts/abis/kyber_network_proxy.json (100%) rename {gnosis => safe_eth}/eth/contracts/abis/multicall.py (100%) rename {gnosis => safe_eth}/eth/contracts/abis/uniswap_exchange.json (100%) rename {gnosis => safe_eth}/eth/contracts/abis/uniswap_factory.json (100%) rename {gnosis => safe_eth}/eth/contracts/abis/uniswap_v2_factory.json (100%) rename {gnosis => safe_eth}/eth/contracts/abis/uniswap_v2_pair.json (100%) rename {gnosis => safe_eth}/eth/contracts/abis/uniswap_v2_router.json (100%) rename {gnosis => safe_eth}/eth/contracts/contract_base.py (100%) rename {gnosis => safe_eth}/eth/django/__init__.py (100%) rename {gnosis => safe_eth}/eth/django/admin.py (100%) rename {gnosis => safe_eth}/eth/django/filters.py (100%) rename {gnosis => safe_eth}/eth/django/forms.py (97%) rename {gnosis => safe_eth}/eth/django/models.py (100%) rename {gnosis => safe_eth}/eth/django/serializers.py (100%) rename {gnosis => safe_eth}/eth/django/tests/__init__.py (100%) rename {gnosis => safe_eth}/eth/django/tests/models.py (100%) rename {gnosis => safe_eth}/eth/django/tests/test_forms.py (100%) rename {gnosis => safe_eth}/eth/django/tests/test_models.py (100%) rename {gnosis => safe_eth}/eth/django/tests/test_serializers.py (100%) rename {gnosis => safe_eth}/eth/django/tests/test_validators.py (100%) rename {gnosis => safe_eth}/eth/django/validators.py (100%) rename {gnosis => safe_eth}/eth/eip712/__init__.py (100%) rename {gnosis => safe_eth}/eth/ethereum_client.py (99%) rename {gnosis => safe_eth}/eth/ethereum_network.py (100%) rename {gnosis => safe_eth}/eth/exceptions.py (100%) rename {gnosis => safe_eth}/eth/multicall.py (100%) rename {gnosis => safe_eth}/eth/oracles/__init__.py (100%) rename {gnosis => safe_eth}/eth/oracles/abis/__init__.py (100%) rename {gnosis => safe_eth}/eth/oracles/abis/aave_abis.py (100%) rename {gnosis => safe_eth}/eth/oracles/abis/balancer_abis.py (100%) rename {gnosis => safe_eth}/eth/oracles/abis/cream_abis.py (100%) rename {gnosis => safe_eth}/eth/oracles/abis/curve_abis.py (100%) rename {gnosis => safe_eth}/eth/oracles/abis/mooniswap_abis.py (100%) rename {gnosis => safe_eth}/eth/oracles/abis/superfluid_abis.py (100%) rename {gnosis => safe_eth}/eth/oracles/abis/uniswap_v3.py (100%) rename {gnosis => safe_eth}/eth/oracles/abis/yearn_abis.py (100%) rename {gnosis => safe_eth}/eth/oracles/abis/zerion_abis.py (100%) rename {gnosis => safe_eth}/eth/oracles/cowswap.py (97%) rename {gnosis => safe_eth}/eth/oracles/exceptions.py (100%) rename {gnosis => safe_eth}/eth/oracles/helpers/__init__.py (100%) rename {gnosis => safe_eth}/eth/oracles/helpers/curve_gauge_list.py (100%) rename {gnosis => safe_eth}/eth/oracles/kyber.py (100%) rename {gnosis => safe_eth}/eth/oracles/oracles.py (100%) rename {gnosis => safe_eth}/eth/oracles/superfluid.py (100%) rename {gnosis => safe_eth}/eth/oracles/sushiswap.py (100%) rename {gnosis => safe_eth}/eth/oracles/uniswap_v3.py (100%) rename {gnosis => safe_eth}/eth/oracles/utils.py (96%) rename {gnosis => safe_eth}/eth/tests/__init__.py (100%) rename {gnosis => safe_eth}/eth/tests/account_abstraction/__init__.py (100%) rename {gnosis => safe_eth}/eth/tests/account_abstraction/test_bundler_client.py (100%) rename {gnosis => safe_eth}/eth/tests/account_abstraction/test_e2e_bundler_client.py (100%) rename {gnosis => safe_eth}/eth/tests/account_abstraction/test_user_operation.py (100%) rename {gnosis => safe_eth}/eth/tests/account_abstraction/test_user_operation_receipt.py (100%) rename {gnosis => safe_eth}/eth/tests/clients/__init__.py (100%) rename {gnosis => safe_eth}/eth/tests/clients/mocks.py (99%) rename {gnosis => safe_eth}/eth/tests/clients/test_blockscout_client.py (100%) rename {gnosis => safe_eth}/eth/tests/clients/test_ens_client.py (100%) rename {gnosis => safe_eth}/eth/tests/clients/test_etherscan_client.py (100%) rename {gnosis => safe_eth}/eth/tests/clients/test_sourcify_client.py (100%) rename {gnosis => safe_eth}/eth/tests/eip712/__init__.py (100%) rename {gnosis => safe_eth}/eth/tests/eip712/test_eip712.py (99%) rename {gnosis => safe_eth}/eth/tests/ethereum_test_case.py (100%) rename {gnosis => safe_eth}/eth/tests/mocks/__init__.py (100%) rename {gnosis => safe_eth}/eth/tests/mocks/mock_bundler.py (100%) rename {gnosis => safe_eth}/eth/tests/mocks/mock_internal_txs.py (100%) rename {gnosis => safe_eth}/eth/tests/mocks/mock_log_receipts.py (100%) rename {gnosis => safe_eth}/eth/tests/mocks/mock_trace_block.py (100%) rename {gnosis => safe_eth}/eth/tests/mocks/mock_trace_filter.py (100%) rename {gnosis => safe_eth}/eth/tests/mocks/mock_trace_transaction.py (100%) rename {gnosis => safe_eth}/eth/tests/oracles/__init__.py (100%) rename {gnosis => safe_eth}/eth/tests/oracles/test_cowswap.py (96%) rename {gnosis => safe_eth}/eth/tests/oracles/test_kyber.py (100%) rename {gnosis => safe_eth}/eth/tests/oracles/test_superfluid.py (100%) rename {gnosis => safe_eth}/eth/tests/oracles/test_sushiswap.py (100%) rename {gnosis => safe_eth}/eth/tests/oracles/test_uniswap_v3.py (100%) rename {gnosis => safe_eth}/eth/tests/test_ethereum_client.py (100%) rename {gnosis => safe_eth}/eth/tests/test_multicall.py (100%) rename {gnosis => safe_eth}/eth/tests/test_oracles.py (99%) rename {gnosis => safe_eth}/eth/tests/test_utils.py (100%) rename {gnosis => safe_eth}/eth/tests/utils.py (100%) rename {gnosis => safe_eth}/eth/typing.py (100%) rename {gnosis => safe_eth}/eth/utils.py (100%) rename {gnosis => safe_eth}/py.typed (100%) rename {gnosis => safe_eth}/safe/__init__.py (100%) rename {gnosis => safe_eth}/safe/account_abstraction/__init__.py (100%) rename {gnosis => safe_eth}/safe/account_abstraction/safe_operation.py (98%) rename {gnosis => safe_eth}/safe/addresses.py (99%) rename {gnosis => safe_eth}/safe/api/__init__.py (100%) rename {gnosis => safe_eth}/safe/api/base_api.py (95%) rename {gnosis => safe_eth}/safe/api/transaction_service_api/__init__.py (100%) rename {gnosis => safe_eth}/safe/api/transaction_service_api/entities.py (100%) rename {gnosis => safe_eth}/safe/api/transaction_service_api/transaction_service_api.py (99%) rename {gnosis => safe_eth}/safe/api/transaction_service_api/transaction_service_messages.py (100%) rename {gnosis => safe_eth}/safe/api/transaction_service_api/transaction_service_tx.py (87%) rename {gnosis => safe_eth}/safe/constants.py (100%) rename {gnosis => safe_eth}/safe/enums.py (100%) rename {gnosis => safe_eth}/safe/exceptions.py (100%) rename {gnosis => safe_eth}/safe/multi_send.py (98%) rename {gnosis => safe_eth}/safe/proxy_factory.py (98%) rename {gnosis => safe_eth}/safe/safe.py (99%) rename {gnosis => safe_eth}/safe/safe_create2_tx.py (97%) rename {gnosis => safe_eth}/safe/safe_creator.py (98%) rename {gnosis => safe_eth}/safe/safe_deployments.py (100%) rename {gnosis => safe_eth}/safe/safe_signature.py (98%) rename {gnosis => safe_eth}/safe/safe_tx.py (98%) rename {gnosis => safe_eth}/safe/serializers.py (91%) rename {gnosis => safe_eth}/safe/signatures.py (97%) rename {gnosis => safe_eth}/safe/tests/__init__.py (100%) rename {gnosis => safe_eth}/safe/tests/account_abstraction/__init__.py (100%) rename {gnosis => safe_eth}/safe/tests/account_abstraction/test_safe_operation.py (96%) rename {gnosis => safe_eth}/safe/tests/api/__init__.py (100%) rename {gnosis => safe_eth}/safe/tests/api/test_transaction_service_api.py (98%) rename {gnosis => safe_eth}/safe/tests/api/test_transaction_service_messages.py (92%) rename {gnosis => safe_eth}/safe/tests/mocks/__init__.py (100%) rename {gnosis => safe_eth}/safe/tests/mocks/mock_transactions.py (100%) rename {gnosis => safe_eth}/safe/tests/safe_test_case.py (97%) rename {gnosis => safe_eth}/safe/tests/test_addresses.py (88%) rename {gnosis => safe_eth}/safe/tests/test_multi_send.py (99%) rename {gnosis => safe_eth}/safe/tests/test_proxy_factory/__init__.py (100%) rename {gnosis => safe_eth}/safe/tests/test_proxy_factory/test_proxy_factory.py (93%) rename {gnosis => safe_eth}/safe/tests/test_safe.py (99%) rename {gnosis => safe_eth}/safe/tests/test_safe_create2_tx.py (99%) rename {gnosis => safe_eth}/safe/tests/test_safe_signature.py (99%) rename {gnosis => safe_eth}/safe/tests/test_safe_tx.py (100%) rename {gnosis => safe_eth}/safe/tests/test_safe_v1_0_0.py (100%) rename {gnosis => safe_eth}/safe/tests/test_safe_v1_3_0.py (100%) rename {gnosis => safe_eth}/safe/tests/test_serializers.py (100%) rename {gnosis => safe_eth}/safe/tests/test_signatures.py (95%) rename {gnosis => safe_eth}/safe/tests/utils.py (84%) rename {gnosis => safe_eth}/util/__init__.py (100%) rename {gnosis => safe_eth}/util/http.py (100%) rename {gnosis => safe_eth}/util/util.py (100%) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index ed984cb07..1c980662d 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -11,7 +11,7 @@ A clear and concise description of what the bug is. **To Reproduce** Steps to reproduce the behavior: -1. from gnosis import '...' +1. from safe_eth import '...' 2. '....' **Expected behavior** diff --git a/.github/scripts/github_adding_addresses/create_pr_with_new_address.py b/.github/scripts/github_adding_addresses/create_pr_with_new_address.py index abe36c77a..c1e9f9f96 100644 --- a/.github/scripts/github_adding_addresses/create_pr_with_new_address.py +++ b/.github/scripts/github_adding_addresses/create_pr_with_new_address.py @@ -13,7 +13,7 @@ from github.GithubException import GithubException from github.Repository import Repository -from gnosis.eth import EthereumClient +from safe_eth.eth import EthereumClient def convert_chain_name(name: str) -> str: diff --git a/.github/scripts/github_adding_addresses/validate_new_address_issue_input_data.py b/.github/scripts/github_adding_addresses/validate_new_address_issue_input_data.py index dd38b2078..95a6c54b3 100644 --- a/.github/scripts/github_adding_addresses/validate_new_address_issue_input_data.py +++ b/.github/scripts/github_adding_addresses/validate_new_address_issue_input_data.py @@ -15,8 +15,8 @@ import validators from tldextract import extract -from gnosis.eth import EthereumClient -from gnosis.eth.utils import mk_contract_address_2 +from safe_eth.eth import EthereumClient +from safe_eth.eth.utils import mk_contract_address_2 ERRORS = [] diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index bd5b4a640..72aa22894 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -70,7 +70,7 @@ jobs: - name: Run tests and coverage run: coverage run --source=$SOURCE_FOLDER -m pytest -W ignore::DeprecationWarning -rxXs --reruns 3 env: - SOURCE_FOLDER: gnosis + SOURCE_FOLDER: safe_eth DJANGO_SETTINGS_MODULE: config.settings.test ETHEREUM_MAINNET_NODE: ${{ secrets.ETHEREUM_MAINNET_NODE }} ETHEREUM_POLYGON_NODE: ${{ secrets.ETHEREUM_POLYGON_NODE }} diff --git a/MANIFEST.in b/MANIFEST.in index d951cca85..a465edafe 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,2 +1,2 @@ recursive-include docs * -recursive-include gnosis/eth/contracts *.json +recursive-include safe_eth/eth/contracts *.json diff --git a/README.rst b/README.rst index 87740c7a5..a4066d407 100644 --- a/README.rst +++ b/README.rst @@ -8,7 +8,7 @@ Safe-eth-py (previously known as Gnosis-py) Safe-eth-py includes a set of libraries to work with Ethereum and relevant Ethereum projects: - `EthereumClient`, a wrapper over Web3.py `Web3` client including utilities to deal with ERC20/721 tokens and tracing. - - `Gnosis Safe `_ classes and utilities. + - `Safe `_ classes and utilities. - Price oracles for `Uniswap`, `Kyber`... - Django serializers, models and utils. @@ -43,7 +43,7 @@ Once the issue is created or edited, an automatic validation will be executed an Ethereum utils -------------- -gnosis.eth +safe_eth.eth ~~~~~~~~~~~~~~~~~~~~ - ``class EthereumClient (ethereum_node_url: str)``: Class to connect and do operations with an ethereum node. Uses web3 and raw rpc calls for things not supported in web3. @@ -54,8 +54,8 @@ the possibility of doing ``batch_calls`` (a single request making read-only call .. code-block:: python - from gnosis.eth import EthereumClient - from gnosis.eth.contracts import get_erc721_contract + from safe_eth.eth import EthereumClient + from safe_eth.eth.contracts import get_erc721_contract ethereum_client = EthereumClient(ETHEREUM_NODE_URL) erc721_contract = get_erc721_contract(self.w3, token_address) name, symbol = ethereum_client.batch_call([ @@ -67,18 +67,18 @@ If you want to use the underlying `web3.py .. code-block:: python - from gnosis.eth import EthereumClient + from safe_eth.eth import EthereumClient ethereum_client = EthereumClient(ETHEREUM_NODE_URL) ethereum_client.w3.eth.get_block(57) -gnosis.eth.constants +safe_eth.eth.constants ~~~~~~~~~~~~~~~~~~~~ - ``NULL_ADDRESS (0x000...0)``: Solidity ``address(0)``. -- ``SENTINEL_ADDRESS (0x000...1)``: Used for Gnosis Safe's linked lists (modules, owners...). +- ``SENTINEL_ADDRESS (0x000...1)``: Used for Safe's linked lists (modules, owners...). - Maximum and minimum values for `R`, `S` and `V` in ethereum signatures. -gnosis.eth.oracles +safe_eth.eth.oracles ~~~~~~~~~~~~~~~~~~ Price oracles for Uniswap, UniswapV2, Kyber, SushiSwap, Aave, Balancer, Curve, Mooniswap, Yearn... @@ -86,8 +86,8 @@ Example: .. code-block:: python - from gnosis.eth import EthereumClient - from gnosis.eth.oracles import UniswapV2Oracle + from safe_eth.eth import EthereumClient + from safe_eth.eth.oracles import UniswapV2Oracle ethereum_client = EthereumClient(ETHEREUM_NODE_URL) uniswap_oracle = UniswapV2Oracle(ethereum_client) gno_token_mainnet_address = '0x6810e776880C02933D47DB1b9fc05908e5386b96' @@ -96,7 +96,7 @@ Example: -gnosis.eth.utils +safe_eth.eth.utils ~~~~~~~~~~~~~~~~ Contains utils for ethereum operations: @@ -106,16 +106,16 @@ Contains utils for ethereum operations: Ethereum django (REST) utils ---------------------------- -Django utils are available under ``gnosis.eth.django``. +Django utils are available under ``safe_eth.eth.django``. You can find a set of helpers for working with Ethereum using Django and Django Rest framework. It includes: -- **gnosis.eth.django.filters**: EthereumAddressFilter. -- **gnosis.eth.django.models**: Model fields (Ethereum address, Ethereum big integer field). -- **gnosis.eth.django.serializers**: Serializer fields (Ethereum address field, hexadecimal field). -- **gnosis.eth.django.validators**: Ethereum related validators. -- **gnosis.safe.serializers**: Serializers for Gnosis Safe (signature, transaction...). +- **safe_eth.eth.django.filters**: EthereumAddressFilter. +- **safe_eth.eth.django.models**: Model fields (Ethereum address, Ethereum big integer field). +- **safe_eth.eth.django.serializers**: Serializer fields (Ethereum address field, hexadecimal field). +- **safe_eth.eth.django.validators**: Ethereum related validators. +- **safe_eth.safe.serializers**: Serializers for Safe (signature, transaction...). - All the tests are written using Django Test suite. Contributors diff --git a/build_docs.sh b/build_docs.sh index 7290f9de0..f678201e7 100755 --- a/build_docs.sh +++ b/build_docs.sh @@ -2,7 +2,7 @@ export DJANGO_SETTINGS_MODULE=config.settings.test export DJANGO_DOT_ENV_FILE=.env.test -sphinx-apidoc -o docs/source/ gnosis/ +sphinx-apidoc -o docs/source/ safe_eth/ rm docs/source/*test*.rst make -C docs/ clean make -C docs/ html diff --git a/config/settings/test.py b/config/settings/test.py index da0a7c30a..80fcf246e 100644 --- a/config/settings/test.py +++ b/config/settings/test.py @@ -1,6 +1,6 @@ from .base import * # noqa -INSTALLED_APPS += ("gnosis.eth.django.tests",) # noqa +INSTALLED_APPS += ("safe_eth.eth.django.tests",) # noqa SECRET_KEY = "testtest" DEBUG = True diff --git a/docs/source/gnosis.eth.clients.rst b/docs/source/gnosis.eth.clients.rst deleted file mode 100644 index b13e32f27..000000000 --- a/docs/source/gnosis.eth.clients.rst +++ /dev/null @@ -1,53 +0,0 @@ -gnosis.eth.clients package -========================== - -Submodules ----------- - -gnosis.eth.clients.blockscout\_client module --------------------------------------------- - -.. automodule:: gnosis.eth.clients.blockscout_client - :members: - :undoc-members: - :show-inheritance: - -gnosis.eth.clients.contract\_metadata module --------------------------------------------- - -.. automodule:: gnosis.eth.clients.contract_metadata - :members: - :undoc-members: - :show-inheritance: - -gnosis.eth.clients.ens\_client module -------------------------------------------- - -.. automodule:: gnosis.eth.clients.ens_client - :members: - :undoc-members: - :show-inheritance: - -gnosis.eth.clients.etherscan\_client module -------------------------------------------- - -.. automodule:: gnosis.eth.clients.etherscan_client - :members: - :undoc-members: - :show-inheritance: - -gnosis.eth.clients.sourcify_client module ----------------------------------- - -.. automodule:: gnosis.eth.clients.sourcify_client - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: gnosis.eth.clients - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/source/gnosis.eth.contracts.rst b/docs/source/gnosis.eth.contracts.rst deleted file mode 100644 index ef857eeee..000000000 --- a/docs/source/gnosis.eth.contracts.rst +++ /dev/null @@ -1,10 +0,0 @@ -gnosis.eth.contracts package -============================ - -Module contents ---------------- - -.. automodule:: gnosis.eth.contracts - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/source/gnosis.eth.django.rst b/docs/source/gnosis.eth.django.rst deleted file mode 100644 index 2750a592b..000000000 --- a/docs/source/gnosis.eth.django.rst +++ /dev/null @@ -1,53 +0,0 @@ -gnosis.eth.django package -========================= - -Subpackages ------------ - -.. toctree:: - :maxdepth: 4 - - gnosis.eth.django.tests - -Submodules ----------- - -gnosis.eth.django.filters module --------------------------------- - -.. automodule:: gnosis.eth.django.filters - :members: - :undoc-members: - :show-inheritance: - -gnosis.eth.django.models module -------------------------------- - -.. automodule:: gnosis.eth.django.models - :members: - :undoc-members: - :show-inheritance: - -gnosis.eth.django.serializers module ------------------------------------- - -.. automodule:: gnosis.eth.django.serializers - :members: - :undoc-members: - :show-inheritance: - -gnosis.eth.django.validators module ------------------------------------ - -.. automodule:: gnosis.eth.django.validators - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: gnosis.eth.django - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/source/gnosis.eth.oracles.abis.rst b/docs/source/gnosis.eth.oracles.abis.rst deleted file mode 100644 index 2a9462e79..000000000 --- a/docs/source/gnosis.eth.oracles.abis.rst +++ /dev/null @@ -1,53 +0,0 @@ -gnosis.eth.oracles.abis package -=============================== - -Submodules ----------- - -gnosis.eth.oracles.abis.aave\_abis module ------------------------------------------ - -.. automodule:: gnosis.eth.oracles.abis.aave_abis - :members: - :undoc-members: - :show-inheritance: - -gnosis.eth.oracles.abis.balancer\_abis module ---------------------------------------------- - -.. automodule:: gnosis.eth.oracles.abis.balancer_abis - :members: - :undoc-members: - :show-inheritance: - -gnosis.eth.oracles.abis.curve\_abis module ------------------------------------------- - -.. automodule:: gnosis.eth.oracles.abis.curve_abis - :members: - :undoc-members: - :show-inheritance: - -gnosis.eth.oracles.abis.mooniswap\_abis module ----------------------------------------------- - -.. automodule:: gnosis.eth.oracles.abis.mooniswap_abis - :members: - :undoc-members: - :show-inheritance: - -gnosis.eth.oracles.abis.yearn\_abis module ------------------------------------------- - -.. automodule:: gnosis.eth.oracles.abis.yearn_abis - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: gnosis.eth.oracles.abis - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/source/gnosis.eth.rst b/docs/source/gnosis.eth.rst deleted file mode 100644 index 8a44e2d9e..000000000 --- a/docs/source/gnosis.eth.rst +++ /dev/null @@ -1,57 +0,0 @@ -gnosis.eth package -================== - -Subpackages ------------ - -.. toctree:: - :maxdepth: 4 - - gnosis.eth.clients - gnosis.eth.contracts - gnosis.eth.django - gnosis.eth.oracles - gnosis.eth.tests - -Submodules ----------- - -gnosis.eth.constants module ---------------------------- - -.. automodule:: gnosis.eth.constants - :members: - :undoc-members: - :show-inheritance: - -gnosis.eth.ethereum\_client module ----------------------------------- - -.. automodule:: gnosis.eth.ethereum_client - :members: - :undoc-members: - :show-inheritance: - -gnosis.eth.typing module ------------------------- - -.. automodule:: gnosis.eth.typing - :members: - :undoc-members: - :show-inheritance: - -gnosis.eth.utils module ------------------------ - -.. automodule:: gnosis.eth.utils - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: gnosis.eth - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/source/gnosis.safe.rst b/docs/source/gnosis.safe.rst deleted file mode 100644 index 746d43bb1..000000000 --- a/docs/source/gnosis.safe.rst +++ /dev/null @@ -1,101 +0,0 @@ -gnosis.safe package -=================== - -Subpackages ------------ - -.. toctree:: - :maxdepth: 4 - - gnosis.safe.tests - -Submodules ----------- - -gnosis.safe.exceptions module ------------------------------ - -.. automodule:: gnosis.safe.exceptions - :members: - :undoc-members: - :show-inheritance: - -gnosis.safe.multi\_send module ------------------------------- - -.. automodule:: gnosis.safe.multi_send - :members: - :undoc-members: - :show-inheritance: - -gnosis.safe.proxy\_factory module ---------------------------------- - -.. automodule:: gnosis.safe.proxy_factory - :members: - :undoc-members: - :show-inheritance: - -gnosis.safe.safe module ------------------------ - -.. automodule:: gnosis.safe.safe - :members: - :undoc-members: - :show-inheritance: - -gnosis.safe.safe\_create2\_tx module ------------------------------------- - -.. automodule:: gnosis.safe.safe_create2_tx - :members: - :undoc-members: - :show-inheritance: - -gnosis.safe.safe\_creation\_tx module -------------------------------------- - -.. automodule:: gnosis.safe.safe_creation_tx - :members: - :undoc-members: - :show-inheritance: - -gnosis.safe.safe\_signature module ----------------------------------- - -.. automodule:: gnosis.safe.safe_signature - :members: - :undoc-members: - :show-inheritance: - -gnosis.safe.safe\_tx module ---------------------------- - -.. automodule:: gnosis.safe.safe_tx - :members: - :undoc-members: - :show-inheritance: - -gnosis.safe.serializers module ------------------------------- - -.. automodule:: gnosis.safe.serializers - :members: - :undoc-members: - :show-inheritance: - -gnosis.safe.signatures module ------------------------------ - -.. automodule:: gnosis.safe.signatures - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: gnosis.safe - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/source/index.rst b/docs/source/index.rst index 07461b086..2d990e90d 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -6,10 +6,10 @@ Introduction ============ -Safe-eth-py includes a set of libraries to work with Ethereum and Gnosis projects: +Safe-eth-py includes a set of libraries to work with Ethereum and Safe projects: - `EthereumClient`, a wrapper over Web3.py `Web3` client including utilities to deal with ERC20/721 tokens and tracing. - - `Gnosis Safe `_ classes and utilities. + - `Safe `_ classes and utilities. - Price oracles for `Uniswap`, `Kyber`... - Django serializers, models and utils. diff --git a/docs/source/modules.rst b/docs/source/modules.rst index 3aed2ff48..4e59404bc 100644 --- a/docs/source/modules.rst +++ b/docs/source/modules.rst @@ -1,7 +1,7 @@ -gnosis +safe_eth ====== .. toctree:: :maxdepth: 4 - gnosis + safe_eth diff --git a/docs/source/quickstart.rst b/docs/source/quickstart.rst index 28dc49af8..c42dcd603 100644 --- a/docs/source/quickstart.rst +++ b/docs/source/quickstart.rst @@ -11,7 +11,7 @@ If you have issues building **coincurve** maybe Ethereum utils -------------- -gnosis.eth +safe_eth.eth ~~~~~~~~~~ - ``class EthereumClient (ethereum_node_url: str)``: Class to connect and do operations with an ethereum node. Uses web3 and raw rpc calls for things not supported in web3. @@ -22,8 +22,8 @@ the possibility of doing ``batch_calls`` (a single request making read-only call .. code-block:: python - from gnosis.eth import EthereumClient - from gnosis.eth.contracts import get_erc721_contract + from safe_eth.eth import EthereumClient + from safe_eth.eth.contracts import get_erc721_contract ethereum_client = EthereumClient(ETHEREUM_NODE_URL) erc721_contract = get_erc721_contract(ethereum_client.w3, token_address) name, symbol = ethereum_client.batch_call([ @@ -35,8 +35,8 @@ More optimal in case you want to call the same function in multiple contracts .. code-block:: python - from gnosis.eth import EthereumClient - from gnosis.eth.contracts import get_erc20_contract + from safe_eth.eth import EthereumClient + from safe_eth.eth.contracts import get_erc20_contract ethereum_client = EthereumClient(ETHEREUM_NODE_URL) erc20_contract = get_erc20_contract(ethereum_client.w3, token_address) my_account = '0xD0E03B027A367fED4fd0E7834a82CD8A73E76B45' @@ -49,7 +49,7 @@ If you want to use the underlying `web3.py .. code-block:: python - from gnosis.eth import EthereumClient + from safe_eth.eth import EthereumClient ethereum_client = EthereumClient(ETHEREUM_NODE_URL) ethereum_client.w3.eth.get_block(57) @@ -58,7 +58,7 @@ If you want to use the underlying `web3.py .. code-block:: python - from gnosis.eth import TxSpeed + from safe_eth.eth import TxSpeed base_fee, priority_fee = ethereum_client.estimate_fee_eip1559(tx_speed=TxSpeed.NORMAL) # If you want to convert a legacy tx to a EIP1559 one eip1559_tx = ethereum_client.set_eip1559_fees(legacy_tx, tx_speed=TxSpeed.NORMAL) @@ -70,26 +70,26 @@ You can modify timeouts (in seconds) for the RPC endpoints by setting By default every RPC request will be retried `3` times. You can modify that by setting `ETHEREUM_RPC_RETRY_COUNT`. -gnosis.eth.clients +safe_eth.eth.clients ~~~~~~~~~~ -You can modify timeouts (in seconds) for the gnosis.eth.clients by setting the following environment variables: +You can modify timeouts (in seconds) for the safe_eth.eth.clients by setting the following environment variables: - ``class EnsClient``: `ENS_CLIENT_REQUEST_TIMEOUT`. - ``class EtherscanClient``: `ETHERSCAN_CLIENT_REQUEST_TIMEOUT`. - ``class SourcifyClient``: `SOURCIFY_CLIENT_REQUEST_TIMEOUT`. -gnosis.eth.constants +safe_eth.eth.constants ~~~~~~~~~~~~~~~~~~~~ - ``NULL_ADDRESS (0x000...0)``: Solidity ``address(0)``. -- ``SENTINEL_ADDRESS (0x000...1)``: Used for Gnosis Safe's linked lists (modules, owners...). +- ``SENTINEL_ADDRESS (0x000...1)``: Used for Safe's linked lists (modules, owners...). - Maximum and minimum values for `R`, `S` and `V` in ethereum signatures. -gnosis.eth.eip712 +safe_eth.eth.eip712 ~~~~~~~~~~~~~~~~~~~~ .. code-block:: python - from gnosis.eth.eip712 import eip712_encode_hash + from safe_eth.eth.eip712 import eip712_encode_hash types = {'EIP712Domain': [{'name': 'name', 'type': 'string'}, {'name': 'version', 'type': 'string'}, @@ -126,15 +126,15 @@ gnosis.eth.eip712 -gnosis.eth.oracles +safe_eth.eth.oracles ~~~~~~~~~~~~~~~~~~ Price oracles for Uniswap, UniswapV2, Kyber, SushiSwap, Aave, Balancer, Curve, Mooniswap, Yearn... Example: .. code-block:: python - from gnosis.eth import EthereumClient - from gnosis.eth.oracles import UniswapV2Oracle + from safe_eth.eth import EthereumClient + from safe_eth.eth.oracles import UniswapV2Oracle ethereum_client = EthereumClient(ETHEREUM_NODE_URL) uniswap_oracle = UniswapV2Oracle(ethereum_client) gno_token_mainnet_address = '0x6810e776880C02933D47DB1b9fc05908e5386b96' @@ -143,7 +143,7 @@ Example: -gnosis.eth.utils +safe_eth.eth.utils ~~~~~~~~~~~~~~~~ Contains utils for ethereum operations: @@ -153,28 +153,28 @@ Contains utils for ethereum operations: Ethereum django (REST) utils ---------------------------- -Django utils are available under ``gnosis.eth.django``. +Django utils are available under ``safe_eth.eth.django``. You can find a set of helpers for working with Ethereum using Django and Django Rest framework. It includes: -- **gnosis.eth.django.filters**: EthereumAddressFilter. -- **gnosis.eth.django.models**: Model fields (Ethereum address, Ethereum big integer field). -- **gnosis.eth.django.serializers**: Serializer fields (Ethereum address field, hexadecimal field). -- **gnosis.eth.django.validators**: Ethereum related validators. -- **gnosis.safe.serializers**: Serializers for Gnosis Safe (signature, transaction...). +- **safe_eth.eth.django.filters**: EthereumAddressFilter. +- **safe_eth.eth.django.models**: Model fields (Ethereum address, Ethereum big integer field). +- **safe_eth.eth.django.serializers**: Serializer fields (Ethereum address field, hexadecimal field). +- **safe_eth.eth.django.validators**: Ethereum related validators. +- **safe_eth.safe.serializers**: Serializers for Safe (signature, transaction...). - All the tests are written using Django Test suite. -Gnosis Products +Safe Products --------------- Safe ~~~~ -On ``gnosis.safe`` there're classes to work with `Safe `_ +On ``safe_eth.safe`` there're classes to work with `Safe `_ .. code-block:: python - from gnosis.eth import EthereumClient - from gnosis.safe import Safe + from safe_eth.eth import EthereumClient + from safe_eth.safe import Safe safe_address = '' # Fill with checksummed version of a Safe address ethereum_client = EthereumClient(ETHEREUM_NODE_URL) safe = Safe(safe_address, ethereum_client) @@ -195,8 +195,8 @@ To interact with the Transaction Service API: .. code-block:: python - from gnosis.eth import EthereumClient - from gnosis.safe import Safe + from safe_eth.eth import EthereumClient + from safe_eth.safe import Safe ethereum_client = EthereumClient(ETHEREUM_NODE_URL) transaction_service_api = TransactionServiceApi( network=EthereumNetwork.SEPOLIA, @@ -208,13 +208,13 @@ You can modify the request timeout (in seconds) by setting `SAFE_TRANSACTION_SER CowSwap ~~~~~~~~ -On ``gnosis.cowswap`` there're classes to work with `CowSwap `_ +On ``safe_eth.cowswap`` there're classes to work with `CowSwap `_ .. code-block:: python import time - from gnosis.eth import EthereumNetwork - from gnosis.cowswap import Order, OrderKind, CowSwapAPI + from safe_eth.eth import EthereumNetwork + from safe_eth.cowswap import Order, OrderKind, CowSwapAPI account_address = '' # Fill with checksummed version of a CowSwap user address account_private_key = '' # Fill with private key of a user address diff --git a/docs/source/safe_eth.cowsap.rst b/docs/source/safe_eth.cowsap.rst new file mode 100644 index 000000000..7fe9bec43 --- /dev/null +++ b/docs/source/safe_eth.cowsap.rst @@ -0,0 +1,37 @@ +safe\_eth.cowsap package +======================== + +Subpackages +----------- + +.. toctree:: + :maxdepth: 4 + + safe_eth.cowsap.tests + +Submodules +---------- + +safe\_eth.cowsap.cow\_swap\_api module +-------------------------------------- + +.. automodule:: safe_eth.cowsap.cow_swap_api + :members: + :undoc-members: + :show-inheritance: + +safe\_eth.cowsap.order module +----------------------------- + +.. automodule:: safe_eth.cowsap.order + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: safe_eth.cowsap + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/source/safe_eth.eth.account_abstraction.rst b/docs/source/safe_eth.eth.account_abstraction.rst new file mode 100644 index 000000000..89a4baadc --- /dev/null +++ b/docs/source/safe_eth.eth.account_abstraction.rst @@ -0,0 +1,53 @@ +safe\_eth.eth.account\_abstraction package +========================================== + +Submodules +---------- + +safe\_eth.eth.account\_abstraction.bundler\_client module +--------------------------------------------------------- + +.. automodule:: safe_eth.eth.account_abstraction.bundler_client + :members: + :undoc-members: + :show-inheritance: + +safe\_eth.eth.account\_abstraction.constants module +--------------------------------------------------- + +.. automodule:: safe_eth.eth.account_abstraction.constants + :members: + :undoc-members: + :show-inheritance: + +safe\_eth.eth.account\_abstraction.exceptions module +---------------------------------------------------- + +.. automodule:: safe_eth.eth.account_abstraction.exceptions + :members: + :undoc-members: + :show-inheritance: + +safe\_eth.eth.account\_abstraction.user\_operation module +--------------------------------------------------------- + +.. automodule:: safe_eth.eth.account_abstraction.user_operation + :members: + :undoc-members: + :show-inheritance: + +safe\_eth.eth.account\_abstraction.user\_operation\_receipt module +------------------------------------------------------------------ + +.. automodule:: safe_eth.eth.account_abstraction.user_operation_receipt + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: safe_eth.eth.account_abstraction + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/source/safe_eth.eth.clients.rst b/docs/source/safe_eth.eth.clients.rst new file mode 100644 index 000000000..d644e3d43 --- /dev/null +++ b/docs/source/safe_eth.eth.clients.rst @@ -0,0 +1,53 @@ +safe\_eth.eth.clients package +============================= + +Submodules +---------- + +safe\_eth.eth.clients.blockscout\_client module +----------------------------------------------- + +.. automodule:: safe_eth.eth.clients.blockscout_client + :members: + :undoc-members: + :show-inheritance: + +safe\_eth.eth.clients.contract\_metadata module +----------------------------------------------- + +.. automodule:: safe_eth.eth.clients.contract_metadata + :members: + :undoc-members: + :show-inheritance: + +safe\_eth.eth.clients.ens\_client module +---------------------------------------- + +.. automodule:: safe_eth.eth.clients.ens_client + :members: + :undoc-members: + :show-inheritance: + +safe\_eth.eth.clients.etherscan\_client module +---------------------------------------------- + +.. automodule:: safe_eth.eth.clients.etherscan_client + :members: + :undoc-members: + :show-inheritance: + +safe\_eth.eth.clients.sourcify\_client module +--------------------------------------------- + +.. automodule:: safe_eth.eth.clients.sourcify_client + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: safe_eth.eth.clients + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/source/safe_eth.eth.contracts.abis.rst b/docs/source/safe_eth.eth.contracts.abis.rst new file mode 100644 index 000000000..57e5ef154 --- /dev/null +++ b/docs/source/safe_eth.eth.contracts.abis.rst @@ -0,0 +1,21 @@ +safe\_eth.eth.contracts.abis package +==================================== + +Submodules +---------- + +safe\_eth.eth.contracts.abis.multicall module +--------------------------------------------- + +.. automodule:: safe_eth.eth.contracts.abis.multicall + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: safe_eth.eth.contracts.abis + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/source/safe_eth.eth.contracts.rst b/docs/source/safe_eth.eth.contracts.rst new file mode 100644 index 000000000..b5607f250 --- /dev/null +++ b/docs/source/safe_eth.eth.contracts.rst @@ -0,0 +1,29 @@ +safe\_eth.eth.contracts package +=============================== + +Subpackages +----------- + +.. toctree:: + :maxdepth: 4 + + safe_eth.eth.contracts.abis + +Submodules +---------- + +safe\_eth.eth.contracts.contract\_base module +--------------------------------------------- + +.. automodule:: safe_eth.eth.contracts.contract_base + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: safe_eth.eth.contracts + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/source/safe_eth.eth.django.rst b/docs/source/safe_eth.eth.django.rst new file mode 100644 index 000000000..d0936569d --- /dev/null +++ b/docs/source/safe_eth.eth.django.rst @@ -0,0 +1,69 @@ +safe\_eth.eth.django package +============================ + +Subpackages +----------- + +.. toctree:: + :maxdepth: 4 + + safe_eth.eth.django.tests + +Submodules +---------- + +safe\_eth.eth.django.admin module +--------------------------------- + +.. automodule:: safe_eth.eth.django.admin + :members: + :undoc-members: + :show-inheritance: + +safe\_eth.eth.django.filters module +----------------------------------- + +.. automodule:: safe_eth.eth.django.filters + :members: + :undoc-members: + :show-inheritance: + +safe\_eth.eth.django.forms module +--------------------------------- + +.. automodule:: safe_eth.eth.django.forms + :members: + :undoc-members: + :show-inheritance: + +safe\_eth.eth.django.models module +---------------------------------- + +.. automodule:: safe_eth.eth.django.models + :members: + :undoc-members: + :show-inheritance: + +safe\_eth.eth.django.serializers module +--------------------------------------- + +.. automodule:: safe_eth.eth.django.serializers + :members: + :undoc-members: + :show-inheritance: + +safe\_eth.eth.django.validators module +-------------------------------------- + +.. automodule:: safe_eth.eth.django.validators + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: safe_eth.eth.django + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/source/gnosis.eth.eip712.rst b/docs/source/safe_eth.eth.eip712.rst similarity index 64% rename from docs/source/gnosis.eth.eip712.rst rename to docs/source/safe_eth.eth.eip712.rst index 18fd3c20f..1ced9233e 100644 --- a/docs/source/gnosis.eth.eip712.rst +++ b/docs/source/safe_eth.eth.eip712.rst @@ -1,10 +1,10 @@ -gnosis.eth.eip712 package +safe\_eth.eth.eip712 package ============================ Module contents --------------- -.. automodule:: gnosis.eth.eip712 +.. automodule:: safe_eth.eth.eip712 :members: :undoc-members: :show-inheritance: diff --git a/docs/source/safe_eth.eth.oracles.abis.rst b/docs/source/safe_eth.eth.oracles.abis.rst new file mode 100644 index 000000000..749c4019c --- /dev/null +++ b/docs/source/safe_eth.eth.oracles.abis.rst @@ -0,0 +1,85 @@ +safe\_eth.eth.oracles.abis package +================================== + +Submodules +---------- + +safe\_eth.eth.oracles.abis.aave\_abis module +-------------------------------------------- + +.. automodule:: safe_eth.eth.oracles.abis.aave_abis + :members: + :undoc-members: + :show-inheritance: + +safe\_eth.eth.oracles.abis.balancer\_abis module +------------------------------------------------ + +.. automodule:: safe_eth.eth.oracles.abis.balancer_abis + :members: + :undoc-members: + :show-inheritance: + +safe\_eth.eth.oracles.abis.cream\_abis module +--------------------------------------------- + +.. automodule:: safe_eth.eth.oracles.abis.cream_abis + :members: + :undoc-members: + :show-inheritance: + +safe\_eth.eth.oracles.abis.curve\_abis module +--------------------------------------------- + +.. automodule:: safe_eth.eth.oracles.abis.curve_abis + :members: + :undoc-members: + :show-inheritance: + +safe\_eth.eth.oracles.abis.mooniswap\_abis module +------------------------------------------------- + +.. automodule:: safe_eth.eth.oracles.abis.mooniswap_abis + :members: + :undoc-members: + :show-inheritance: + +safe\_eth.eth.oracles.abis.superfluid\_abis module +-------------------------------------------------- + +.. automodule:: safe_eth.eth.oracles.abis.superfluid_abis + :members: + :undoc-members: + :show-inheritance: + +safe\_eth.eth.oracles.abis.uniswap\_v3 module +--------------------------------------------- + +.. automodule:: safe_eth.eth.oracles.abis.uniswap_v3 + :members: + :undoc-members: + :show-inheritance: + +safe\_eth.eth.oracles.abis.yearn\_abis module +--------------------------------------------- + +.. automodule:: safe_eth.eth.oracles.abis.yearn_abis + :members: + :undoc-members: + :show-inheritance: + +safe\_eth.eth.oracles.abis.zerion\_abis module +---------------------------------------------- + +.. automodule:: safe_eth.eth.oracles.abis.zerion_abis + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: safe_eth.eth.oracles.abis + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/source/safe_eth.eth.oracles.helpers.rst b/docs/source/safe_eth.eth.oracles.helpers.rst new file mode 100644 index 000000000..ca040e264 --- /dev/null +++ b/docs/source/safe_eth.eth.oracles.helpers.rst @@ -0,0 +1,21 @@ +safe\_eth.eth.oracles.helpers package +===================================== + +Submodules +---------- + +safe\_eth.eth.oracles.helpers.curve\_gauge\_list module +------------------------------------------------------- + +.. automodule:: safe_eth.eth.oracles.helpers.curve_gauge_list + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: safe_eth.eth.oracles.helpers + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/source/safe_eth.eth.oracles.rst b/docs/source/safe_eth.eth.oracles.rst new file mode 100644 index 000000000..a20311833 --- /dev/null +++ b/docs/source/safe_eth.eth.oracles.rst @@ -0,0 +1,86 @@ +safe\_eth.eth.oracles package +============================= + +Subpackages +----------- + +.. toctree:: + :maxdepth: 4 + + safe_eth.eth.oracles.abis + safe_eth.eth.oracles.helpers + +Submodules +---------- + +safe\_eth.eth.oracles.cowswap module +------------------------------------ + +.. automodule:: safe_eth.eth.oracles.cowswap + :members: + :undoc-members: + :show-inheritance: + +safe\_eth.eth.oracles.exceptions module +--------------------------------------- + +.. automodule:: safe_eth.eth.oracles.exceptions + :members: + :undoc-members: + :show-inheritance: + +safe\_eth.eth.oracles.kyber module +---------------------------------- + +.. automodule:: safe_eth.eth.oracles.kyber + :members: + :undoc-members: + :show-inheritance: + +safe\_eth.eth.oracles.oracles module +------------------------------------ + +.. automodule:: safe_eth.eth.oracles.oracles + :members: + :undoc-members: + :show-inheritance: + +safe\_eth.eth.oracles.superfluid module +--------------------------------------- + +.. automodule:: safe_eth.eth.oracles.superfluid + :members: + :undoc-members: + :show-inheritance: + +safe\_eth.eth.oracles.sushiswap module +-------------------------------------- + +.. automodule:: safe_eth.eth.oracles.sushiswap + :members: + :undoc-members: + :show-inheritance: + +safe\_eth.eth.oracles.uniswap\_v3 module +---------------------------------------- + +.. automodule:: safe_eth.eth.oracles.uniswap_v3 + :members: + :undoc-members: + :show-inheritance: + +safe\_eth.eth.oracles.utils module +---------------------------------- + +.. automodule:: safe_eth.eth.oracles.utils + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: safe_eth.eth.oracles + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/source/safe_eth.eth.rst b/docs/source/safe_eth.eth.rst new file mode 100644 index 000000000..9d765a6ff --- /dev/null +++ b/docs/source/safe_eth.eth.rst @@ -0,0 +1,83 @@ +safe\_eth.eth package +===================== + +Subpackages +----------- + +.. toctree:: + :maxdepth: 4 + + safe_eth.eth.account_abstraction + safe_eth.eth.clients + safe_eth.eth.contracts + safe_eth.eth.django + safe_eth.eth.eip712 + safe_eth.eth.oracles + safe_eth.eth.tests + +Submodules +---------- + +safe\_eth.eth.constants module +------------------------------ + +.. automodule:: safe_eth.eth.constants + :members: + :undoc-members: + :show-inheritance: + +safe\_eth.eth.ethereum\_client module +------------------------------------- + +.. automodule:: safe_eth.eth.ethereum_client + :members: + :undoc-members: + :show-inheritance: + +safe\_eth.eth.ethereum\_network module +-------------------------------------- + +.. automodule:: safe_eth.eth.ethereum_network + :members: + :undoc-members: + :show-inheritance: + +safe\_eth.eth.exceptions module +------------------------------- + +.. automodule:: safe_eth.eth.exceptions + :members: + :undoc-members: + :show-inheritance: + +safe\_eth.eth.multicall module +------------------------------ + +.. automodule:: safe_eth.eth.multicall + :members: + :undoc-members: + :show-inheritance: + +safe\_eth.eth.typing module +--------------------------- + +.. automodule:: safe_eth.eth.typing + :members: + :undoc-members: + :show-inheritance: + +safe\_eth.eth.utils module +-------------------------- + +.. automodule:: safe_eth.eth.utils + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: safe_eth.eth + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/source/gnosis.rst b/docs/source/safe_eth.rst similarity index 52% rename from docs/source/gnosis.rst rename to docs/source/safe_eth.rst index d6eb316a9..a95c0ba1b 100644 --- a/docs/source/gnosis.rst +++ b/docs/source/safe_eth.rst @@ -1,5 +1,5 @@ -gnosis package -============== +safe\_eth package +================= Subpackages ----------- @@ -7,13 +7,15 @@ Subpackages .. toctree:: :maxdepth: 4 - gnosis.eth - gnosis.safe + safe_eth.cowsap + safe_eth.eth + safe_eth.safe + safe_eth.util Module contents --------------- -.. automodule:: gnosis +.. automodule:: safe_eth :members: :undoc-members: :show-inheritance: diff --git a/docs/source/safe_eth.safe.account_abstraction.rst b/docs/source/safe_eth.safe.account_abstraction.rst new file mode 100644 index 000000000..b674a8585 --- /dev/null +++ b/docs/source/safe_eth.safe.account_abstraction.rst @@ -0,0 +1,21 @@ +safe\_eth.safe.account\_abstraction package +=========================================== + +Submodules +---------- + +safe\_eth.safe.account\_abstraction.safe\_operation module +---------------------------------------------------------- + +.. automodule:: safe_eth.safe.account_abstraction.safe_operation + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: safe_eth.safe.account_abstraction + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/source/gnosis.eth.oracles.rst b/docs/source/safe_eth.safe.api.rst similarity index 53% rename from docs/source/gnosis.eth.oracles.rst rename to docs/source/safe_eth.safe.api.rst index 4683caf0f..2c60f3012 100644 --- a/docs/source/gnosis.eth.oracles.rst +++ b/docs/source/safe_eth.safe.api.rst @@ -1,4 +1,4 @@ -gnosis.eth.oracles package +safe\_eth.safe.api package ========================== Subpackages @@ -7,15 +7,15 @@ Subpackages .. toctree:: :maxdepth: 4 - gnosis.eth.oracles.abis + safe_eth.safe.api.transaction_service_api Submodules ---------- -gnosis.eth.oracles.oracles module ---------------------------------- +safe\_eth.safe.api.base\_api module +----------------------------------- -.. automodule:: gnosis.eth.oracles.oracles +.. automodule:: safe_eth.safe.api.base_api :members: :undoc-members: :show-inheritance: @@ -23,7 +23,7 @@ gnosis.eth.oracles.oracles module Module contents --------------- -.. automodule:: gnosis.eth.oracles +.. automodule:: safe_eth.safe.api :members: :undoc-members: :show-inheritance: diff --git a/docs/source/safe_eth.safe.api.transaction_service_api.rst b/docs/source/safe_eth.safe.api.transaction_service_api.rst new file mode 100644 index 000000000..144973c9b --- /dev/null +++ b/docs/source/safe_eth.safe.api.transaction_service_api.rst @@ -0,0 +1,45 @@ +safe\_eth.safe.api.transaction\_service\_api package +==================================================== + +Submodules +---------- + +safe\_eth.safe.api.transaction\_service\_api.entities module +------------------------------------------------------------ + +.. automodule:: safe_eth.safe.api.transaction_service_api.entities + :members: + :undoc-members: + :show-inheritance: + +safe\_eth.safe.api.transaction\_service\_api.transaction\_service\_api module +----------------------------------------------------------------------------- + +.. automodule:: safe_eth.safe.api.transaction_service_api.transaction_service_api + :members: + :undoc-members: + :show-inheritance: + +safe\_eth.safe.api.transaction\_service\_api.transaction\_service\_messages module +---------------------------------------------------------------------------------- + +.. automodule:: safe_eth.safe.api.transaction_service_api.transaction_service_messages + :members: + :undoc-members: + :show-inheritance: + +safe\_eth.safe.api.transaction\_service\_api.transaction\_service\_tx module +---------------------------------------------------------------------------- + +.. automodule:: safe_eth.safe.api.transaction_service_api.transaction_service_tx + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: safe_eth.safe.api.transaction_service_api + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/source/safe_eth.safe.rst b/docs/source/safe_eth.safe.rst new file mode 100644 index 000000000..4a047946a --- /dev/null +++ b/docs/source/safe_eth.safe.rst @@ -0,0 +1,135 @@ +safe\_eth.safe package +====================== + +Subpackages +----------- + +.. toctree:: + :maxdepth: 4 + + safe_eth.safe.account_abstraction + safe_eth.safe.api + safe_eth.safe.tests + +Submodules +---------- + +safe\_eth.safe.addresses module +------------------------------- + +.. automodule:: safe_eth.safe.addresses + :members: + :undoc-members: + :show-inheritance: + +safe\_eth.safe.constants module +------------------------------- + +.. automodule:: safe_eth.safe.constants + :members: + :undoc-members: + :show-inheritance: + +safe\_eth.safe.enums module +--------------------------- + +.. automodule:: safe_eth.safe.enums + :members: + :undoc-members: + :show-inheritance: + +safe\_eth.safe.exceptions module +-------------------------------- + +.. automodule:: safe_eth.safe.exceptions + :members: + :undoc-members: + :show-inheritance: + +safe\_eth.safe.multi\_send module +--------------------------------- + +.. automodule:: safe_eth.safe.multi_send + :members: + :undoc-members: + :show-inheritance: + +safe\_eth.safe.proxy\_factory module +------------------------------------ + +.. automodule:: safe_eth.safe.proxy_factory + :members: + :undoc-members: + :show-inheritance: + +safe\_eth.safe.safe module +-------------------------- + +.. automodule:: safe_eth.safe.safe + :members: + :undoc-members: + :show-inheritance: + +safe\_eth.safe.safe\_create2\_tx module +--------------------------------------- + +.. automodule:: safe_eth.safe.safe_create2_tx + :members: + :undoc-members: + :show-inheritance: + +safe\_eth.safe.safe\_creator module +----------------------------------- + +.. automodule:: safe_eth.safe.safe_creator + :members: + :undoc-members: + :show-inheritance: + +safe\_eth.safe.safe\_deployments module +--------------------------------------- + +.. automodule:: safe_eth.safe.safe_deployments + :members: + :undoc-members: + :show-inheritance: + +safe\_eth.safe.safe\_signature module +------------------------------------- + +.. automodule:: safe_eth.safe.safe_signature + :members: + :undoc-members: + :show-inheritance: + +safe\_eth.safe.safe\_tx module +------------------------------ + +.. automodule:: safe_eth.safe.safe_tx + :members: + :undoc-members: + :show-inheritance: + +safe\_eth.safe.serializers module +--------------------------------- + +.. automodule:: safe_eth.safe.serializers + :members: + :undoc-members: + :show-inheritance: + +safe\_eth.safe.signatures module +-------------------------------- + +.. automodule:: safe_eth.safe.signatures + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: safe_eth.safe + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/source/safe_eth.util.rst b/docs/source/safe_eth.util.rst new file mode 100644 index 000000000..d2a5e806d --- /dev/null +++ b/docs/source/safe_eth.util.rst @@ -0,0 +1,29 @@ +safe\_eth.util package +====================== + +Submodules +---------- + +safe\_eth.util.http module +-------------------------- + +.. automodule:: safe_eth.util.http + :members: + :undoc-members: + :show-inheritance: + +safe\_eth.util.util module +-------------------------- + +.. automodule:: safe_eth.util.util + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: safe_eth.util + :members: + :undoc-members: + :show-inheritance: diff --git a/manage.py b/manage.py index 26085e642..3d212daae 100644 --- a/manage.py +++ b/manage.py @@ -22,8 +22,8 @@ raise # This allows easy placement of apps within the interior - # gnosisdb directory. + # safedb directory. current_path = os.path.dirname(os.path.abspath(__file__)) - sys.path.append(os.path.join(current_path, "gnosis")) + sys.path.append(os.path.join(current_path, "safe_eth")) execute_from_command_line(sys.argv) diff --git a/mypy.ini b/mypy.ini index 739f07e24..9a35f7a2e 100644 --- a/mypy.ini +++ b/mypy.ini @@ -7,7 +7,7 @@ ignore_missing_imports = True ignore_missing_imports = True [mypy-pytest.*] ignore_missing_imports = True -[mypy-gnosis.eth.contracts] +[mypy-safe_eth.eth.contracts] ignore_missing_imports = True [mypy-py_eth_sig_utils.*] ignore_missing_imports = True diff --git a/pyproject.toml b/pyproject.toml index 886e13b5e..21294ef26 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,6 +19,7 @@ keywords = [ "gnosis", "safe", "web3", + "safe_eth", ] classifiers = [ "Environment :: Web Environment", @@ -60,7 +61,7 @@ Source = "https://github.com/safe-global/safe-eth-py" Tracker = "https://github.com/safe-global/safe-eth-py/issues" [tool.hatch.version] -path = "gnosis/__init__.py" +path = "safe_eth/__init__.py" [tool.hatch.envs.types] extra-dependencies = [ @@ -68,11 +69,11 @@ extra-dependencies = [ ] [tool.hatch.envs.types.scripts] -check = "mypy --install-types --non-interactive {args:gnosis}" +check = "mypy --install-types --non-interactive {args:safe_eth}" [tool.coverage.run] -include = ["gnosis/*"] -# source_pkgs = ["gnosis", "tests"] +include = ["safe_eth/*"] +# source_pkgs = ["safe_eth", "tests"] branch = true parallel = true omit = [ @@ -82,8 +83,7 @@ omit = [ ] #[tool.coverage.paths] -#prueba = ["src/gnosis", "*/gnosis/src/gnosis"] -#tests = ["tests", "*/gnosis/tests"] +#tests = ["tests", "*/safe_eth/tests"] [tool.coverage.report] exclude_lines = [ @@ -97,18 +97,18 @@ exclude_lines = [ [tool.hatch.build.targets.sdist] include = [ - "/gnosis", + "/safe_eth", ] [tool.hatch.build.targets.wheel] packages = [ - "/gnosis", + "/safe_eth", ] [tool.isort] profile = "black" default_section = "THIRDPARTY" -known_first_party = "gnosis" +known_first_party = "safe_eth" known_safe_foundation = "py_eth_sig_utils" known_django = "django" sections = [ diff --git a/gnosis/__init__.py b/safe_eth/__init__.py similarity index 100% rename from gnosis/__init__.py rename to safe_eth/__init__.py diff --git a/gnosis/cowsap/__init__.py b/safe_eth/cowsap/__init__.py similarity index 100% rename from gnosis/cowsap/__init__.py rename to safe_eth/cowsap/__init__.py diff --git a/gnosis/cowsap/cow_swap_api.py b/safe_eth/cowsap/cow_swap_api.py similarity index 98% rename from gnosis/cowsap/cow_swap_api.py rename to safe_eth/cowsap/cow_swap_api.py index ff94dcec2..102f2583c 100644 --- a/gnosis/cowsap/cow_swap_api.py +++ b/safe_eth/cowsap/cow_swap_api.py @@ -6,8 +6,8 @@ from eth_account.messages import encode_defunct from eth_typing import AnyAddress, ChecksumAddress, HexStr -from gnosis.eth import EthereumNetwork, EthereumNetworkNotSupported -from gnosis.eth.eip712 import eip712_encode_hash +from safe_eth.eth import EthereumNetwork, EthereumNetworkNotSupported +from safe_eth.eth.eip712 import eip712_encode_hash from ..eth.constants import NULL_ADDRESS from ..util.http import prepare_http_session diff --git a/gnosis/cowsap/order.py b/safe_eth/cowsap/order.py similarity index 100% rename from gnosis/cowsap/order.py rename to safe_eth/cowsap/order.py diff --git a/gnosis/cowsap/tests/__init__.py b/safe_eth/cowsap/tests/__init__.py similarity index 100% rename from gnosis/cowsap/tests/__init__.py rename to safe_eth/cowsap/tests/__init__.py diff --git a/gnosis/cowsap/tests/test_cow_swap_api.py b/safe_eth/cowsap/tests/test_cow_swap_api.py similarity index 100% rename from gnosis/cowsap/tests/test_cow_swap_api.py rename to safe_eth/cowsap/tests/test_cow_swap_api.py diff --git a/gnosis/eth/__init__.py b/safe_eth/eth/__init__.py similarity index 100% rename from gnosis/eth/__init__.py rename to safe_eth/eth/__init__.py diff --git a/gnosis/eth/account_abstraction/__init__.py b/safe_eth/eth/account_abstraction/__init__.py similarity index 100% rename from gnosis/eth/account_abstraction/__init__.py rename to safe_eth/eth/account_abstraction/__init__.py diff --git a/gnosis/eth/account_abstraction/bundler_client.py b/safe_eth/eth/account_abstraction/bundler_client.py similarity index 99% rename from gnosis/eth/account_abstraction/bundler_client.py rename to safe_eth/eth/account_abstraction/bundler_client.py index 6aa548cc9..adafe8ccd 100644 --- a/gnosis/eth/account_abstraction/bundler_client.py +++ b/safe_eth/eth/account_abstraction/bundler_client.py @@ -5,7 +5,7 @@ from eth_typing import ChecksumAddress, HexStr from hexbytes import HexBytes -from gnosis.util.http import prepare_http_session +from safe_eth.util.http import prepare_http_session from .exceptions import BundlerClientConnectionException, BundlerClientResponseException from .user_operation import UserOperation diff --git a/gnosis/eth/account_abstraction/constants.py b/safe_eth/eth/account_abstraction/constants.py similarity index 100% rename from gnosis/eth/account_abstraction/constants.py rename to safe_eth/eth/account_abstraction/constants.py diff --git a/gnosis/eth/account_abstraction/exceptions.py b/safe_eth/eth/account_abstraction/exceptions.py similarity index 100% rename from gnosis/eth/account_abstraction/exceptions.py rename to safe_eth/eth/account_abstraction/exceptions.py diff --git a/gnosis/eth/account_abstraction/user_operation.py b/safe_eth/eth/account_abstraction/user_operation.py similarity index 99% rename from gnosis/eth/account_abstraction/user_operation.py rename to safe_eth/eth/account_abstraction/user_operation.py index 9e31b344d..b6cd5e4a9 100644 --- a/gnosis/eth/account_abstraction/user_operation.py +++ b/safe_eth/eth/account_abstraction/user_operation.py @@ -6,7 +6,7 @@ from eth_typing import ChecksumAddress, HexStr from hexbytes import HexBytes -from gnosis.eth.utils import fast_keccak, fast_to_checksum_address +from safe_eth.eth.utils import fast_keccak, fast_to_checksum_address @dataclasses.dataclass(eq=True, frozen=True) diff --git a/gnosis/eth/account_abstraction/user_operation_receipt.py b/safe_eth/eth/account_abstraction/user_operation_receipt.py similarity index 96% rename from gnosis/eth/account_abstraction/user_operation_receipt.py rename to safe_eth/eth/account_abstraction/user_operation_receipt.py index f3ae79003..82bc6ea83 100644 --- a/gnosis/eth/account_abstraction/user_operation_receipt.py +++ b/safe_eth/eth/account_abstraction/user_operation_receipt.py @@ -5,13 +5,13 @@ from hexbytes import HexBytes from web3.types import LogReceipt -from gnosis.eth.account_abstraction.constants import ( +from safe_eth.eth.account_abstraction.constants import ( ACCOUNT_DEPLOYED_TOPIC, DEPOSIT_EVENT_TOPIC, EXECUTION_FROM_MODULE_FAILURE_TOPIC, EXECUTION_FROM_MODULE_SUCCESS_TOPIC, ) -from gnosis.eth.utils import fast_to_checksum_address +from safe_eth.eth.utils import fast_to_checksum_address @dataclasses.dataclass(eq=True, frozen=True) diff --git a/gnosis/eth/clients/__init__.py b/safe_eth/eth/clients/__init__.py similarity index 100% rename from gnosis/eth/clients/__init__.py rename to safe_eth/eth/clients/__init__.py diff --git a/gnosis/eth/clients/blockscout_client.py b/safe_eth/eth/clients/blockscout_client.py similarity index 100% rename from gnosis/eth/clients/blockscout_client.py rename to safe_eth/eth/clients/blockscout_client.py diff --git a/gnosis/eth/clients/contract_metadata.py b/safe_eth/eth/clients/contract_metadata.py similarity index 100% rename from gnosis/eth/clients/contract_metadata.py rename to safe_eth/eth/clients/contract_metadata.py diff --git a/gnosis/eth/clients/ens_client.py b/safe_eth/eth/clients/ens_client.py similarity index 100% rename from gnosis/eth/clients/ens_client.py rename to safe_eth/eth/clients/ens_client.py diff --git a/gnosis/eth/clients/etherscan_client.py b/safe_eth/eth/clients/etherscan_client.py similarity index 100% rename from gnosis/eth/clients/etherscan_client.py rename to safe_eth/eth/clients/etherscan_client.py diff --git a/gnosis/eth/clients/sourcify_client.py b/safe_eth/eth/clients/sourcify_client.py similarity index 100% rename from gnosis/eth/clients/sourcify_client.py rename to safe_eth/eth/clients/sourcify_client.py diff --git a/gnosis/eth/constants.py b/safe_eth/eth/constants.py similarity index 100% rename from gnosis/eth/constants.py rename to safe_eth/eth/constants.py diff --git a/gnosis/eth/contracts/__init__.py b/safe_eth/eth/contracts/__init__.py similarity index 100% rename from gnosis/eth/contracts/__init__.py rename to safe_eth/eth/contracts/__init__.py diff --git a/gnosis/eth/contracts/abis/CPKFactory.json b/safe_eth/eth/contracts/abis/CPKFactory.json similarity index 100% rename from gnosis/eth/contracts/abis/CPKFactory.json rename to safe_eth/eth/contracts/abis/CPKFactory.json diff --git a/gnosis/eth/contracts/abis/CompatibilityFallbackHandler_V1_3_0.json b/safe_eth/eth/contracts/abis/CompatibilityFallbackHandler_V1_3_0.json similarity index 100% rename from gnosis/eth/contracts/abis/CompatibilityFallbackHandler_V1_3_0.json rename to safe_eth/eth/contracts/abis/CompatibilityFallbackHandler_V1_3_0.json diff --git a/gnosis/eth/contracts/abis/CompatibilityFallbackHandler_V1_4_1.json b/safe_eth/eth/contracts/abis/CompatibilityFallbackHandler_V1_4_1.json similarity index 100% rename from gnosis/eth/contracts/abis/CompatibilityFallbackHandler_V1_4_1.json rename to safe_eth/eth/contracts/abis/CompatibilityFallbackHandler_V1_4_1.json diff --git a/gnosis/eth/contracts/abis/DelegateConstructorProxy.json b/safe_eth/eth/contracts/abis/DelegateConstructorProxy.json similarity index 100% rename from gnosis/eth/contracts/abis/DelegateConstructorProxy.json rename to safe_eth/eth/contracts/abis/DelegateConstructorProxy.json diff --git a/gnosis/eth/contracts/abis/ERC1155.json b/safe_eth/eth/contracts/abis/ERC1155.json similarity index 100% rename from gnosis/eth/contracts/abis/ERC1155.json rename to safe_eth/eth/contracts/abis/ERC1155.json diff --git a/gnosis/eth/contracts/abis/ERC20.json b/safe_eth/eth/contracts/abis/ERC20.json similarity index 100% rename from gnosis/eth/contracts/abis/ERC20.json rename to safe_eth/eth/contracts/abis/ERC20.json diff --git a/gnosis/eth/contracts/abis/ERC20TestToken.json b/safe_eth/eth/contracts/abis/ERC20TestToken.json similarity index 100% rename from gnosis/eth/contracts/abis/ERC20TestToken.json rename to safe_eth/eth/contracts/abis/ERC20TestToken.json diff --git a/gnosis/eth/contracts/abis/ERC721.json b/safe_eth/eth/contracts/abis/ERC721.json similarity index 100% rename from gnosis/eth/contracts/abis/ERC721.json rename to safe_eth/eth/contracts/abis/ERC721.json diff --git a/gnosis/eth/contracts/abis/GnosisSafe_V0_0_1.json b/safe_eth/eth/contracts/abis/GnosisSafe_V0_0_1.json similarity index 100% rename from gnosis/eth/contracts/abis/GnosisSafe_V0_0_1.json rename to safe_eth/eth/contracts/abis/GnosisSafe_V0_0_1.json diff --git a/gnosis/eth/contracts/abis/GnosisSafe_V1_0_0.json b/safe_eth/eth/contracts/abis/GnosisSafe_V1_0_0.json similarity index 100% rename from gnosis/eth/contracts/abis/GnosisSafe_V1_0_0.json rename to safe_eth/eth/contracts/abis/GnosisSafe_V1_0_0.json diff --git a/gnosis/eth/contracts/abis/GnosisSafe_V1_1_1.json b/safe_eth/eth/contracts/abis/GnosisSafe_V1_1_1.json similarity index 100% rename from gnosis/eth/contracts/abis/GnosisSafe_V1_1_1.json rename to safe_eth/eth/contracts/abis/GnosisSafe_V1_1_1.json diff --git a/gnosis/eth/contracts/abis/GnosisSafe_V1_3_0.json b/safe_eth/eth/contracts/abis/GnosisSafe_V1_3_0.json similarity index 100% rename from gnosis/eth/contracts/abis/GnosisSafe_V1_3_0.json rename to safe_eth/eth/contracts/abis/GnosisSafe_V1_3_0.json diff --git a/gnosis/eth/contracts/abis/MultiSend.json b/safe_eth/eth/contracts/abis/MultiSend.json similarity index 100% rename from gnosis/eth/contracts/abis/MultiSend.json rename to safe_eth/eth/contracts/abis/MultiSend.json diff --git a/gnosis/eth/contracts/abis/PayingProxy.json b/safe_eth/eth/contracts/abis/PayingProxy.json similarity index 100% rename from gnosis/eth/contracts/abis/PayingProxy.json rename to safe_eth/eth/contracts/abis/PayingProxy.json diff --git a/gnosis/eth/contracts/abis/ProxyFactory_V1_0_0.json b/safe_eth/eth/contracts/abis/ProxyFactory_V1_0_0.json similarity index 100% rename from gnosis/eth/contracts/abis/ProxyFactory_V1_0_0.json rename to safe_eth/eth/contracts/abis/ProxyFactory_V1_0_0.json diff --git a/gnosis/eth/contracts/abis/ProxyFactory_V1_1_1.json b/safe_eth/eth/contracts/abis/ProxyFactory_V1_1_1.json similarity index 100% rename from gnosis/eth/contracts/abis/ProxyFactory_V1_1_1.json rename to safe_eth/eth/contracts/abis/ProxyFactory_V1_1_1.json diff --git a/gnosis/eth/contracts/abis/ProxyFactory_V1_3_0.json b/safe_eth/eth/contracts/abis/ProxyFactory_V1_3_0.json similarity index 100% rename from gnosis/eth/contracts/abis/ProxyFactory_V1_3_0.json rename to safe_eth/eth/contracts/abis/ProxyFactory_V1_3_0.json diff --git a/gnosis/eth/contracts/abis/ProxyFactory_V1_4_1.json b/safe_eth/eth/contracts/abis/ProxyFactory_V1_4_1.json similarity index 100% rename from gnosis/eth/contracts/abis/ProxyFactory_V1_4_1.json rename to safe_eth/eth/contracts/abis/ProxyFactory_V1_4_1.json diff --git a/gnosis/eth/contracts/abis/Proxy_V1_0_0.json b/safe_eth/eth/contracts/abis/Proxy_V1_0_0.json similarity index 100% rename from gnosis/eth/contracts/abis/Proxy_V1_0_0.json rename to safe_eth/eth/contracts/abis/Proxy_V1_0_0.json diff --git a/gnosis/eth/contracts/abis/Proxy_V1_1_1.json b/safe_eth/eth/contracts/abis/Proxy_V1_1_1.json similarity index 100% rename from gnosis/eth/contracts/abis/Proxy_V1_1_1.json rename to safe_eth/eth/contracts/abis/Proxy_V1_1_1.json diff --git a/gnosis/eth/contracts/abis/Proxy_V1_3_0.json b/safe_eth/eth/contracts/abis/Proxy_V1_3_0.json similarity index 100% rename from gnosis/eth/contracts/abis/Proxy_V1_3_0.json rename to safe_eth/eth/contracts/abis/Proxy_V1_3_0.json diff --git a/gnosis/eth/contracts/abis/Proxy_V1_4_1.json b/safe_eth/eth/contracts/abis/Proxy_V1_4_1.json similarity index 100% rename from gnosis/eth/contracts/abis/Proxy_V1_4_1.json rename to safe_eth/eth/contracts/abis/Proxy_V1_4_1.json diff --git a/gnosis/eth/contracts/abis/Safe_V1_4_1.json b/safe_eth/eth/contracts/abis/Safe_V1_4_1.json similarity index 100% rename from gnosis/eth/contracts/abis/Safe_V1_4_1.json rename to safe_eth/eth/contracts/abis/Safe_V1_4_1.json diff --git a/gnosis/eth/contracts/abis/SignMessageLib.json b/safe_eth/eth/contracts/abis/SignMessageLib.json similarity index 100% rename from gnosis/eth/contracts/abis/SignMessageLib.json rename to safe_eth/eth/contracts/abis/SignMessageLib.json diff --git a/gnosis/eth/contracts/abis/SimulateTxAccessor_V1_4_1.json b/safe_eth/eth/contracts/abis/SimulateTxAccessor_V1_4_1.json similarity index 100% rename from gnosis/eth/contracts/abis/SimulateTxAccessor_V1_4_1.json rename to safe_eth/eth/contracts/abis/SimulateTxAccessor_V1_4_1.json diff --git a/gnosis/eth/contracts/abis/__init__.py b/safe_eth/eth/contracts/abis/__init__.py similarity index 100% rename from gnosis/eth/contracts/abis/__init__.py rename to safe_eth/eth/contracts/abis/__init__.py diff --git a/gnosis/eth/contracts/abis/kyber_network_proxy.json b/safe_eth/eth/contracts/abis/kyber_network_proxy.json similarity index 100% rename from gnosis/eth/contracts/abis/kyber_network_proxy.json rename to safe_eth/eth/contracts/abis/kyber_network_proxy.json diff --git a/gnosis/eth/contracts/abis/multicall.py b/safe_eth/eth/contracts/abis/multicall.py similarity index 100% rename from gnosis/eth/contracts/abis/multicall.py rename to safe_eth/eth/contracts/abis/multicall.py diff --git a/gnosis/eth/contracts/abis/uniswap_exchange.json b/safe_eth/eth/contracts/abis/uniswap_exchange.json similarity index 100% rename from gnosis/eth/contracts/abis/uniswap_exchange.json rename to safe_eth/eth/contracts/abis/uniswap_exchange.json diff --git a/gnosis/eth/contracts/abis/uniswap_factory.json b/safe_eth/eth/contracts/abis/uniswap_factory.json similarity index 100% rename from gnosis/eth/contracts/abis/uniswap_factory.json rename to safe_eth/eth/contracts/abis/uniswap_factory.json diff --git a/gnosis/eth/contracts/abis/uniswap_v2_factory.json b/safe_eth/eth/contracts/abis/uniswap_v2_factory.json similarity index 100% rename from gnosis/eth/contracts/abis/uniswap_v2_factory.json rename to safe_eth/eth/contracts/abis/uniswap_v2_factory.json diff --git a/gnosis/eth/contracts/abis/uniswap_v2_pair.json b/safe_eth/eth/contracts/abis/uniswap_v2_pair.json similarity index 100% rename from gnosis/eth/contracts/abis/uniswap_v2_pair.json rename to safe_eth/eth/contracts/abis/uniswap_v2_pair.json diff --git a/gnosis/eth/contracts/abis/uniswap_v2_router.json b/safe_eth/eth/contracts/abis/uniswap_v2_router.json similarity index 100% rename from gnosis/eth/contracts/abis/uniswap_v2_router.json rename to safe_eth/eth/contracts/abis/uniswap_v2_router.json diff --git a/gnosis/eth/contracts/contract_base.py b/safe_eth/eth/contracts/contract_base.py similarity index 100% rename from gnosis/eth/contracts/contract_base.py rename to safe_eth/eth/contracts/contract_base.py diff --git a/gnosis/eth/django/__init__.py b/safe_eth/eth/django/__init__.py similarity index 100% rename from gnosis/eth/django/__init__.py rename to safe_eth/eth/django/__init__.py diff --git a/gnosis/eth/django/admin.py b/safe_eth/eth/django/admin.py similarity index 100% rename from gnosis/eth/django/admin.py rename to safe_eth/eth/django/admin.py diff --git a/gnosis/eth/django/filters.py b/safe_eth/eth/django/filters.py similarity index 100% rename from gnosis/eth/django/filters.py rename to safe_eth/eth/django/filters.py diff --git a/gnosis/eth/django/forms.py b/safe_eth/eth/django/forms.py similarity index 97% rename from gnosis/eth/django/forms.py rename to safe_eth/eth/django/forms.py index 262e8bf21..560a0b1f5 100644 --- a/gnosis/eth/django/forms.py +++ b/safe_eth/eth/django/forms.py @@ -8,7 +8,7 @@ from hexbytes import HexBytes -from gnosis.eth.utils import fast_is_checksum_address +from safe_eth.eth.utils import fast_is_checksum_address class EthereumAddressFieldForm(forms.CharField): diff --git a/gnosis/eth/django/models.py b/safe_eth/eth/django/models.py similarity index 100% rename from gnosis/eth/django/models.py rename to safe_eth/eth/django/models.py diff --git a/gnosis/eth/django/serializers.py b/safe_eth/eth/django/serializers.py similarity index 100% rename from gnosis/eth/django/serializers.py rename to safe_eth/eth/django/serializers.py diff --git a/gnosis/eth/django/tests/__init__.py b/safe_eth/eth/django/tests/__init__.py similarity index 100% rename from gnosis/eth/django/tests/__init__.py rename to safe_eth/eth/django/tests/__init__.py diff --git a/gnosis/eth/django/tests/models.py b/safe_eth/eth/django/tests/models.py similarity index 100% rename from gnosis/eth/django/tests/models.py rename to safe_eth/eth/django/tests/models.py diff --git a/gnosis/eth/django/tests/test_forms.py b/safe_eth/eth/django/tests/test_forms.py similarity index 100% rename from gnosis/eth/django/tests/test_forms.py rename to safe_eth/eth/django/tests/test_forms.py diff --git a/gnosis/eth/django/tests/test_models.py b/safe_eth/eth/django/tests/test_models.py similarity index 100% rename from gnosis/eth/django/tests/test_models.py rename to safe_eth/eth/django/tests/test_models.py diff --git a/gnosis/eth/django/tests/test_serializers.py b/safe_eth/eth/django/tests/test_serializers.py similarity index 100% rename from gnosis/eth/django/tests/test_serializers.py rename to safe_eth/eth/django/tests/test_serializers.py diff --git a/gnosis/eth/django/tests/test_validators.py b/safe_eth/eth/django/tests/test_validators.py similarity index 100% rename from gnosis/eth/django/tests/test_validators.py rename to safe_eth/eth/django/tests/test_validators.py diff --git a/gnosis/eth/django/validators.py b/safe_eth/eth/django/validators.py similarity index 100% rename from gnosis/eth/django/validators.py rename to safe_eth/eth/django/validators.py diff --git a/gnosis/eth/eip712/__init__.py b/safe_eth/eth/eip712/__init__.py similarity index 100% rename from gnosis/eth/eip712/__init__.py rename to safe_eth/eth/eip712/__init__.py diff --git a/gnosis/eth/ethereum_client.py b/safe_eth/eth/ethereum_client.py similarity index 99% rename from gnosis/eth/ethereum_client.py rename to safe_eth/eth/ethereum_client.py index eee23ba16..d4ffb237b 100644 --- a/gnosis/eth/ethereum_client.py +++ b/safe_eth/eth/ethereum_client.py @@ -53,13 +53,13 @@ Wei, ) -from gnosis.eth.utils import ( +from safe_eth.eth.utils import ( fast_is_checksum_address, fast_to_checksum_address, mk_contract_address, mk_contract_address_2, ) -from gnosis.util import chunks +from safe_eth.util import chunks from ..util.http import prepare_http_session from .constants import ( diff --git a/gnosis/eth/ethereum_network.py b/safe_eth/eth/ethereum_network.py similarity index 100% rename from gnosis/eth/ethereum_network.py rename to safe_eth/eth/ethereum_network.py diff --git a/gnosis/eth/exceptions.py b/safe_eth/eth/exceptions.py similarity index 100% rename from gnosis/eth/exceptions.py rename to safe_eth/eth/exceptions.py diff --git a/gnosis/eth/multicall.py b/safe_eth/eth/multicall.py similarity index 100% rename from gnosis/eth/multicall.py rename to safe_eth/eth/multicall.py diff --git a/gnosis/eth/oracles/__init__.py b/safe_eth/eth/oracles/__init__.py similarity index 100% rename from gnosis/eth/oracles/__init__.py rename to safe_eth/eth/oracles/__init__.py diff --git a/gnosis/eth/oracles/abis/__init__.py b/safe_eth/eth/oracles/abis/__init__.py similarity index 100% rename from gnosis/eth/oracles/abis/__init__.py rename to safe_eth/eth/oracles/abis/__init__.py diff --git a/gnosis/eth/oracles/abis/aave_abis.py b/safe_eth/eth/oracles/abis/aave_abis.py similarity index 100% rename from gnosis/eth/oracles/abis/aave_abis.py rename to safe_eth/eth/oracles/abis/aave_abis.py diff --git a/gnosis/eth/oracles/abis/balancer_abis.py b/safe_eth/eth/oracles/abis/balancer_abis.py similarity index 100% rename from gnosis/eth/oracles/abis/balancer_abis.py rename to safe_eth/eth/oracles/abis/balancer_abis.py diff --git a/gnosis/eth/oracles/abis/cream_abis.py b/safe_eth/eth/oracles/abis/cream_abis.py similarity index 100% rename from gnosis/eth/oracles/abis/cream_abis.py rename to safe_eth/eth/oracles/abis/cream_abis.py diff --git a/gnosis/eth/oracles/abis/curve_abis.py b/safe_eth/eth/oracles/abis/curve_abis.py similarity index 100% rename from gnosis/eth/oracles/abis/curve_abis.py rename to safe_eth/eth/oracles/abis/curve_abis.py diff --git a/gnosis/eth/oracles/abis/mooniswap_abis.py b/safe_eth/eth/oracles/abis/mooniswap_abis.py similarity index 100% rename from gnosis/eth/oracles/abis/mooniswap_abis.py rename to safe_eth/eth/oracles/abis/mooniswap_abis.py diff --git a/gnosis/eth/oracles/abis/superfluid_abis.py b/safe_eth/eth/oracles/abis/superfluid_abis.py similarity index 100% rename from gnosis/eth/oracles/abis/superfluid_abis.py rename to safe_eth/eth/oracles/abis/superfluid_abis.py diff --git a/gnosis/eth/oracles/abis/uniswap_v3.py b/safe_eth/eth/oracles/abis/uniswap_v3.py similarity index 100% rename from gnosis/eth/oracles/abis/uniswap_v3.py rename to safe_eth/eth/oracles/abis/uniswap_v3.py diff --git a/gnosis/eth/oracles/abis/yearn_abis.py b/safe_eth/eth/oracles/abis/yearn_abis.py similarity index 100% rename from gnosis/eth/oracles/abis/yearn_abis.py rename to safe_eth/eth/oracles/abis/yearn_abis.py diff --git a/gnosis/eth/oracles/abis/zerion_abis.py b/safe_eth/eth/oracles/abis/zerion_abis.py similarity index 100% rename from gnosis/eth/oracles/abis/zerion_abis.py rename to safe_eth/eth/oracles/abis/zerion_abis.py diff --git a/gnosis/eth/oracles/cowswap.py b/safe_eth/eth/oracles/cowswap.py similarity index 97% rename from gnosis/eth/oracles/cowswap.py rename to safe_eth/eth/oracles/cowswap.py index c072fff9f..dcaf4c6dd 100644 --- a/gnosis/eth/oracles/cowswap.py +++ b/safe_eth/eth/oracles/cowswap.py @@ -1,7 +1,7 @@ import logging from typing import Optional -from gnosis.cowsap import CowSwapAPI, OrderKind +from safe_eth.cowsap import CowSwapAPI, OrderKind from .. import EthereumClient, EthereumNetworkNotSupported from .exceptions import CannotGetPriceFromOracle diff --git a/gnosis/eth/oracles/exceptions.py b/safe_eth/eth/oracles/exceptions.py similarity index 100% rename from gnosis/eth/oracles/exceptions.py rename to safe_eth/eth/oracles/exceptions.py diff --git a/gnosis/eth/oracles/helpers/__init__.py b/safe_eth/eth/oracles/helpers/__init__.py similarity index 100% rename from gnosis/eth/oracles/helpers/__init__.py rename to safe_eth/eth/oracles/helpers/__init__.py diff --git a/gnosis/eth/oracles/helpers/curve_gauge_list.py b/safe_eth/eth/oracles/helpers/curve_gauge_list.py similarity index 100% rename from gnosis/eth/oracles/helpers/curve_gauge_list.py rename to safe_eth/eth/oracles/helpers/curve_gauge_list.py diff --git a/gnosis/eth/oracles/kyber.py b/safe_eth/eth/oracles/kyber.py similarity index 100% rename from gnosis/eth/oracles/kyber.py rename to safe_eth/eth/oracles/kyber.py diff --git a/gnosis/eth/oracles/oracles.py b/safe_eth/eth/oracles/oracles.py similarity index 100% rename from gnosis/eth/oracles/oracles.py rename to safe_eth/eth/oracles/oracles.py diff --git a/gnosis/eth/oracles/superfluid.py b/safe_eth/eth/oracles/superfluid.py similarity index 100% rename from gnosis/eth/oracles/superfluid.py rename to safe_eth/eth/oracles/superfluid.py diff --git a/gnosis/eth/oracles/sushiswap.py b/safe_eth/eth/oracles/sushiswap.py similarity index 100% rename from gnosis/eth/oracles/sushiswap.py rename to safe_eth/eth/oracles/sushiswap.py diff --git a/gnosis/eth/oracles/uniswap_v3.py b/safe_eth/eth/oracles/uniswap_v3.py similarity index 100% rename from gnosis/eth/oracles/uniswap_v3.py rename to safe_eth/eth/oracles/uniswap_v3.py diff --git a/gnosis/eth/oracles/utils.py b/safe_eth/eth/oracles/utils.py similarity index 96% rename from gnosis/eth/oracles/utils.py rename to safe_eth/eth/oracles/utils.py index 6e4b58315..c2a2967b4 100644 --- a/gnosis/eth/oracles/utils.py +++ b/safe_eth/eth/oracles/utils.py @@ -5,7 +5,7 @@ from eth_typing import ChecksumAddress from web3.exceptions import Web3Exception -from gnosis.eth import EthereumClient +from safe_eth.eth import EthereumClient from .exceptions import CannotGetPriceFromOracle diff --git a/gnosis/eth/tests/__init__.py b/safe_eth/eth/tests/__init__.py similarity index 100% rename from gnosis/eth/tests/__init__.py rename to safe_eth/eth/tests/__init__.py diff --git a/gnosis/eth/tests/account_abstraction/__init__.py b/safe_eth/eth/tests/account_abstraction/__init__.py similarity index 100% rename from gnosis/eth/tests/account_abstraction/__init__.py rename to safe_eth/eth/tests/account_abstraction/__init__.py diff --git a/gnosis/eth/tests/account_abstraction/test_bundler_client.py b/safe_eth/eth/tests/account_abstraction/test_bundler_client.py similarity index 100% rename from gnosis/eth/tests/account_abstraction/test_bundler_client.py rename to safe_eth/eth/tests/account_abstraction/test_bundler_client.py diff --git a/gnosis/eth/tests/account_abstraction/test_e2e_bundler_client.py b/safe_eth/eth/tests/account_abstraction/test_e2e_bundler_client.py similarity index 100% rename from gnosis/eth/tests/account_abstraction/test_e2e_bundler_client.py rename to safe_eth/eth/tests/account_abstraction/test_e2e_bundler_client.py diff --git a/gnosis/eth/tests/account_abstraction/test_user_operation.py b/safe_eth/eth/tests/account_abstraction/test_user_operation.py similarity index 100% rename from gnosis/eth/tests/account_abstraction/test_user_operation.py rename to safe_eth/eth/tests/account_abstraction/test_user_operation.py diff --git a/gnosis/eth/tests/account_abstraction/test_user_operation_receipt.py b/safe_eth/eth/tests/account_abstraction/test_user_operation_receipt.py similarity index 100% rename from gnosis/eth/tests/account_abstraction/test_user_operation_receipt.py rename to safe_eth/eth/tests/account_abstraction/test_user_operation_receipt.py diff --git a/gnosis/eth/tests/clients/__init__.py b/safe_eth/eth/tests/clients/__init__.py similarity index 100% rename from gnosis/eth/tests/clients/__init__.py rename to safe_eth/eth/tests/clients/__init__.py diff --git a/gnosis/eth/tests/clients/mocks.py b/safe_eth/eth/tests/clients/mocks.py similarity index 99% rename from gnosis/eth/tests/clients/mocks.py rename to safe_eth/eth/tests/clients/mocks.py index 8ad1e6eac..5dfda2537 100644 --- a/gnosis/eth/tests/clients/mocks.py +++ b/safe_eth/eth/tests/clients/mocks.py @@ -847,7 +847,7 @@ }, }, }, - "title": "Gnosis Safe - A multisignature wallet with support for confirmations using signed messages based on ERC191.", + "title": "Safe - A multisignature wallet with support for confirmations using signed messages based on ERC191.", }, "userdoc": { "methods": { @@ -879,7 +879,7 @@ }, }, "settings": { - "compilationTarget": {"/gnosis-safe/contracts/GnosisSafe.sol": "GnosisSafe"}, + "compilationTarget": {"/safe/contracts/GnosisSafe.sol": "GnosisSafe"}, "evmVersion": "petersburg", "libraries": {}, "optimizer": {"enabled": False, "runs": 200}, diff --git a/gnosis/eth/tests/clients/test_blockscout_client.py b/safe_eth/eth/tests/clients/test_blockscout_client.py similarity index 100% rename from gnosis/eth/tests/clients/test_blockscout_client.py rename to safe_eth/eth/tests/clients/test_blockscout_client.py diff --git a/gnosis/eth/tests/clients/test_ens_client.py b/safe_eth/eth/tests/clients/test_ens_client.py similarity index 100% rename from gnosis/eth/tests/clients/test_ens_client.py rename to safe_eth/eth/tests/clients/test_ens_client.py diff --git a/gnosis/eth/tests/clients/test_etherscan_client.py b/safe_eth/eth/tests/clients/test_etherscan_client.py similarity index 100% rename from gnosis/eth/tests/clients/test_etherscan_client.py rename to safe_eth/eth/tests/clients/test_etherscan_client.py diff --git a/gnosis/eth/tests/clients/test_sourcify_client.py b/safe_eth/eth/tests/clients/test_sourcify_client.py similarity index 100% rename from gnosis/eth/tests/clients/test_sourcify_client.py rename to safe_eth/eth/tests/clients/test_sourcify_client.py diff --git a/gnosis/eth/tests/eip712/__init__.py b/safe_eth/eth/tests/eip712/__init__.py similarity index 100% rename from gnosis/eth/tests/eip712/__init__.py rename to safe_eth/eth/tests/eip712/__init__.py diff --git a/gnosis/eth/tests/eip712/test_eip712.py b/safe_eth/eth/tests/eip712/test_eip712.py similarity index 99% rename from gnosis/eth/tests/eip712/test_eip712.py rename to safe_eth/eth/tests/eip712/test_eip712.py index 7088563b1..7dd5504e2 100644 --- a/gnosis/eth/tests/eip712/test_eip712.py +++ b/safe_eth/eth/tests/eip712/test_eip712.py @@ -1,6 +1,6 @@ from unittest import TestCase -from gnosis.eth.eip712 import eip712_encode_hash +from safe_eth.eth.eip712 import eip712_encode_hash class TestEIP712(TestCase): diff --git a/gnosis/eth/tests/ethereum_test_case.py b/safe_eth/eth/tests/ethereum_test_case.py similarity index 100% rename from gnosis/eth/tests/ethereum_test_case.py rename to safe_eth/eth/tests/ethereum_test_case.py diff --git a/gnosis/eth/tests/mocks/__init__.py b/safe_eth/eth/tests/mocks/__init__.py similarity index 100% rename from gnosis/eth/tests/mocks/__init__.py rename to safe_eth/eth/tests/mocks/__init__.py diff --git a/gnosis/eth/tests/mocks/mock_bundler.py b/safe_eth/eth/tests/mocks/mock_bundler.py similarity index 100% rename from gnosis/eth/tests/mocks/mock_bundler.py rename to safe_eth/eth/tests/mocks/mock_bundler.py diff --git a/gnosis/eth/tests/mocks/mock_internal_txs.py b/safe_eth/eth/tests/mocks/mock_internal_txs.py similarity index 100% rename from gnosis/eth/tests/mocks/mock_internal_txs.py rename to safe_eth/eth/tests/mocks/mock_internal_txs.py diff --git a/gnosis/eth/tests/mocks/mock_log_receipts.py b/safe_eth/eth/tests/mocks/mock_log_receipts.py similarity index 100% rename from gnosis/eth/tests/mocks/mock_log_receipts.py rename to safe_eth/eth/tests/mocks/mock_log_receipts.py diff --git a/gnosis/eth/tests/mocks/mock_trace_block.py b/safe_eth/eth/tests/mocks/mock_trace_block.py similarity index 100% rename from gnosis/eth/tests/mocks/mock_trace_block.py rename to safe_eth/eth/tests/mocks/mock_trace_block.py diff --git a/gnosis/eth/tests/mocks/mock_trace_filter.py b/safe_eth/eth/tests/mocks/mock_trace_filter.py similarity index 100% rename from gnosis/eth/tests/mocks/mock_trace_filter.py rename to safe_eth/eth/tests/mocks/mock_trace_filter.py diff --git a/gnosis/eth/tests/mocks/mock_trace_transaction.py b/safe_eth/eth/tests/mocks/mock_trace_transaction.py similarity index 100% rename from gnosis/eth/tests/mocks/mock_trace_transaction.py rename to safe_eth/eth/tests/mocks/mock_trace_transaction.py diff --git a/gnosis/eth/tests/oracles/__init__.py b/safe_eth/eth/tests/oracles/__init__.py similarity index 100% rename from gnosis/eth/tests/oracles/__init__.py rename to safe_eth/eth/tests/oracles/__init__.py diff --git a/gnosis/eth/tests/oracles/test_cowswap.py b/safe_eth/eth/tests/oracles/test_cowswap.py similarity index 96% rename from gnosis/eth/tests/oracles/test_cowswap.py rename to safe_eth/eth/tests/oracles/test_cowswap.py index 93caed9a9..8d9e542be 100644 --- a/gnosis/eth/tests/oracles/test_cowswap.py +++ b/safe_eth/eth/tests/oracles/test_cowswap.py @@ -73,7 +73,7 @@ def test_get_price(self): cowswap_oracle.get_price(random_token) with mock.patch( - "gnosis.eth.oracles.cowswap.get_decimals", autospec=True, return_value=18 + "safe_eth.eth.oracles.cowswap.get_decimals", autospec=True, return_value=18 ): with self.assertRaises(CannotGetPriceFromOracle): cowswap_oracle.get_price(random_token) diff --git a/gnosis/eth/tests/oracles/test_kyber.py b/safe_eth/eth/tests/oracles/test_kyber.py similarity index 100% rename from gnosis/eth/tests/oracles/test_kyber.py rename to safe_eth/eth/tests/oracles/test_kyber.py diff --git a/gnosis/eth/tests/oracles/test_superfluid.py b/safe_eth/eth/tests/oracles/test_superfluid.py similarity index 100% rename from gnosis/eth/tests/oracles/test_superfluid.py rename to safe_eth/eth/tests/oracles/test_superfluid.py diff --git a/gnosis/eth/tests/oracles/test_sushiswap.py b/safe_eth/eth/tests/oracles/test_sushiswap.py similarity index 100% rename from gnosis/eth/tests/oracles/test_sushiswap.py rename to safe_eth/eth/tests/oracles/test_sushiswap.py diff --git a/gnosis/eth/tests/oracles/test_uniswap_v3.py b/safe_eth/eth/tests/oracles/test_uniswap_v3.py similarity index 100% rename from gnosis/eth/tests/oracles/test_uniswap_v3.py rename to safe_eth/eth/tests/oracles/test_uniswap_v3.py diff --git a/gnosis/eth/tests/test_ethereum_client.py b/safe_eth/eth/tests/test_ethereum_client.py similarity index 100% rename from gnosis/eth/tests/test_ethereum_client.py rename to safe_eth/eth/tests/test_ethereum_client.py diff --git a/gnosis/eth/tests/test_multicall.py b/safe_eth/eth/tests/test_multicall.py similarity index 100% rename from gnosis/eth/tests/test_multicall.py rename to safe_eth/eth/tests/test_multicall.py diff --git a/gnosis/eth/tests/test_oracles.py b/safe_eth/eth/tests/test_oracles.py similarity index 99% rename from gnosis/eth/tests/test_oracles.py rename to safe_eth/eth/tests/test_oracles.py index 7b693b12f..e6da57f7e 100644 --- a/gnosis/eth/tests/test_oracles.py +++ b/safe_eth/eth/tests/test_oracles.py @@ -141,7 +141,7 @@ def test_get_price_contract_not_deployed(self): ): uniswap_v2_oracle.get_price(random_token_address) - @mock.patch("gnosis.eth.oracles.oracles.get_decimals", autospec=True) + @mock.patch("safe_eth.eth.oracles.oracles.get_decimals", autospec=True) @mock.patch.object( UniswapV2Oracle, "factory_address", diff --git a/gnosis/eth/tests/test_utils.py b/safe_eth/eth/tests/test_utils.py similarity index 100% rename from gnosis/eth/tests/test_utils.py rename to safe_eth/eth/tests/test_utils.py diff --git a/gnosis/eth/tests/utils.py b/safe_eth/eth/tests/utils.py similarity index 100% rename from gnosis/eth/tests/utils.py rename to safe_eth/eth/tests/utils.py diff --git a/gnosis/eth/typing.py b/safe_eth/eth/typing.py similarity index 100% rename from gnosis/eth/typing.py rename to safe_eth/eth/typing.py diff --git a/gnosis/eth/utils.py b/safe_eth/eth/utils.py similarity index 100% rename from gnosis/eth/utils.py rename to safe_eth/eth/utils.py diff --git a/gnosis/py.typed b/safe_eth/py.typed similarity index 100% rename from gnosis/py.typed rename to safe_eth/py.typed diff --git a/gnosis/safe/__init__.py b/safe_eth/safe/__init__.py similarity index 100% rename from gnosis/safe/__init__.py rename to safe_eth/safe/__init__.py diff --git a/gnosis/safe/account_abstraction/__init__.py b/safe_eth/safe/account_abstraction/__init__.py similarity index 100% rename from gnosis/safe/account_abstraction/__init__.py rename to safe_eth/safe/account_abstraction/__init__.py diff --git a/gnosis/safe/account_abstraction/safe_operation.py b/safe_eth/safe/account_abstraction/safe_operation.py similarity index 98% rename from gnosis/safe/account_abstraction/safe_operation.py rename to safe_eth/safe/account_abstraction/safe_operation.py index b4344fc54..e9cc03cfa 100644 --- a/gnosis/safe/account_abstraction/safe_operation.py +++ b/safe_eth/safe/account_abstraction/safe_operation.py @@ -10,8 +10,8 @@ from eth_typing import ChecksumAddress from hexbytes import HexBytes -from gnosis.eth.account_abstraction import UserOperation -from gnosis.eth.utils import fast_keccak +from safe_eth.eth.account_abstraction import UserOperation +from safe_eth.eth.utils import fast_keccak logger = logging.getLogger(__name__) diff --git a/gnosis/safe/addresses.py b/safe_eth/safe/addresses.py similarity index 99% rename from gnosis/safe/addresses.py rename to safe_eth/safe/addresses.py index f4fd3de5f..07cbffba1 100644 --- a/gnosis/safe/addresses.py +++ b/safe_eth/safe/addresses.py @@ -7,7 +7,7 @@ from eth_typing import ChecksumAddress -from gnosis.eth import EthereumNetwork +from safe_eth.eth import EthereumNetwork SAFE_SIMULATE_TX_ACCESSOR_ADDRESS: ChecksumAddress = ( "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199" diff --git a/gnosis/safe/api/__init__.py b/safe_eth/safe/api/__init__.py similarity index 100% rename from gnosis/safe/api/__init__.py rename to safe_eth/safe/api/__init__.py diff --git a/gnosis/safe/api/base_api.py b/safe_eth/safe/api/base_api.py similarity index 95% rename from gnosis/safe/api/base_api.py rename to safe_eth/safe/api/base_api.py index 705380c7f..da19ba4bc 100644 --- a/gnosis/safe/api/base_api.py +++ b/safe_eth/safe/api/base_api.py @@ -4,12 +4,12 @@ import requests -from gnosis.eth.ethereum_client import ( +from safe_eth.eth.ethereum_client import ( EthereumClient, EthereumNetwork, EthereumNetworkNotSupported, ) -from gnosis.util.http import prepare_http_session +from safe_eth.util.http import prepare_http_session class SafeAPIException(Exception): diff --git a/gnosis/safe/api/transaction_service_api/__init__.py b/safe_eth/safe/api/transaction_service_api/__init__.py similarity index 100% rename from gnosis/safe/api/transaction_service_api/__init__.py rename to safe_eth/safe/api/transaction_service_api/__init__.py diff --git a/gnosis/safe/api/transaction_service_api/entities.py b/safe_eth/safe/api/transaction_service_api/entities.py similarity index 100% rename from gnosis/safe/api/transaction_service_api/entities.py rename to safe_eth/safe/api/transaction_service_api/entities.py diff --git a/gnosis/safe/api/transaction_service_api/transaction_service_api.py b/safe_eth/safe/api/transaction_service_api/transaction_service_api.py similarity index 99% rename from gnosis/safe/api/transaction_service_api/transaction_service_api.py rename to safe_eth/safe/api/transaction_service_api/transaction_service_api.py index b81b013de..64e824546 100644 --- a/gnosis/safe/api/transaction_service_api/transaction_service_api.py +++ b/safe_eth/safe/api/transaction_service_api/transaction_service_api.py @@ -6,9 +6,9 @@ from eth_typing import ChecksumAddress, Hash32, HexStr from hexbytes import HexBytes -from gnosis.eth import EthereumClient, EthereumNetwork -from gnosis.eth.eip712 import eip712_encode_hash -from gnosis.safe import SafeTx +from safe_eth.eth import EthereumClient, EthereumNetwork +from safe_eth.eth.eip712 import eip712_encode_hash +from safe_eth.safe import SafeTx from ..base_api import SafeAPIException, SafeBaseAPI from .entities import Balance, DataDecoded, DelegateUser, Message, Transaction diff --git a/gnosis/safe/api/transaction_service_api/transaction_service_messages.py b/safe_eth/safe/api/transaction_service_api/transaction_service_messages.py similarity index 100% rename from gnosis/safe/api/transaction_service_api/transaction_service_messages.py rename to safe_eth/safe/api/transaction_service_api/transaction_service_messages.py diff --git a/gnosis/safe/api/transaction_service_api/transaction_service_tx.py b/safe_eth/safe/api/transaction_service_api/transaction_service_tx.py similarity index 87% rename from gnosis/safe/api/transaction_service_api/transaction_service_tx.py rename to safe_eth/safe/api/transaction_service_api/transaction_service_tx.py index c2320b32e..0260a6288 100644 --- a/gnosis/safe/api/transaction_service_api/transaction_service_tx.py +++ b/safe_eth/safe/api/transaction_service_api/transaction_service_tx.py @@ -1,6 +1,6 @@ from eth_typing import ChecksumAddress -from gnosis.safe import SafeTx +from safe_eth.safe import SafeTx class TransactionServiceTx(SafeTx): diff --git a/gnosis/safe/constants.py b/safe_eth/safe/constants.py similarity index 100% rename from gnosis/safe/constants.py rename to safe_eth/safe/constants.py diff --git a/gnosis/safe/enums.py b/safe_eth/safe/enums.py similarity index 100% rename from gnosis/safe/enums.py rename to safe_eth/safe/enums.py diff --git a/gnosis/safe/exceptions.py b/safe_eth/safe/exceptions.py similarity index 100% rename from gnosis/safe/exceptions.py rename to safe_eth/safe/exceptions.py diff --git a/gnosis/safe/multi_send.py b/safe_eth/safe/multi_send.py similarity index 98% rename from gnosis/safe/multi_send.py rename to safe_eth/safe/multi_send.py index 75dfcf704..5d6438082 100644 --- a/gnosis/safe/multi_send.py +++ b/safe_eth/safe/multi_send.py @@ -7,10 +7,10 @@ from hexbytes import HexBytes from web3 import Web3 -from gnosis.eth import EthereumClient, EthereumTxSent -from gnosis.eth.contracts import get_multi_send_contract -from gnosis.eth.typing import EthereumData -from gnosis.eth.utils import ( +from safe_eth.eth import EthereumClient, EthereumTxSent +from safe_eth.eth.contracts import get_multi_send_contract +from safe_eth.eth.typing import EthereumData +from safe_eth.eth.utils import ( fast_bytes_to_checksum_address, fast_is_checksum_address, get_empty_tx_params, diff --git a/gnosis/safe/proxy_factory.py b/safe_eth/safe/proxy_factory.py similarity index 98% rename from gnosis/safe/proxy_factory.py rename to safe_eth/safe/proxy_factory.py index 365019fe4..71287bfcb 100644 --- a/gnosis/safe/proxy_factory.py +++ b/safe_eth/safe/proxy_factory.py @@ -9,8 +9,8 @@ from web3 import Web3 from web3.contract.contract import Contract, ContractFunction -from gnosis.eth import EthereumClient, EthereumTxSent -from gnosis.eth.contracts import ( +from safe_eth.eth import EthereumClient, EthereumTxSent +from safe_eth.eth.contracts import ( ContractBase, get_paying_proxy_deployed_bytecode, get_proxy_1_0_0_deployed_bytecode, @@ -23,7 +23,7 @@ get_proxy_factory_V1_3_0_contract, get_proxy_factory_V1_4_1_contract, ) -from gnosis.eth.utils import ( +from safe_eth.eth.utils import ( compare_byte_code, fast_keccak, get_empty_tx_params, diff --git a/gnosis/safe/safe.py b/safe_eth/safe/safe.py similarity index 99% rename from gnosis/safe/safe.py rename to safe_eth/safe/safe.py index c3571b6bb..5ee3abdbd 100644 --- a/gnosis/safe/safe.py +++ b/safe_eth/safe/safe.py @@ -18,9 +18,9 @@ from web3.exceptions import Web3Exception from web3.types import BlockIdentifier, TxParams -from gnosis.eth import EthereumClient, EthereumTxSent -from gnosis.eth.constants import GAS_CALL_DATA_BYTE, NULL_ADDRESS, SENTINEL_ADDRESS -from gnosis.eth.contracts import ( +from safe_eth.eth import EthereumClient, EthereumTxSent +from safe_eth.eth.constants import GAS_CALL_DATA_BYTE, NULL_ADDRESS, SENTINEL_ADDRESS +from safe_eth.eth.contracts import ( ContractBase, get_compatibility_fallback_handler_contract, get_safe_contract, @@ -31,7 +31,7 @@ get_safe_V1_4_1_contract, get_simulate_tx_accessor_V1_4_1_contract, ) -from gnosis.eth.utils import ( +from safe_eth.eth.utils import ( fast_bytes_to_checksum_address, fast_is_checksum_address, fast_keccak, diff --git a/gnosis/safe/safe_create2_tx.py b/safe_eth/safe/safe_create2_tx.py similarity index 97% rename from gnosis/safe/safe_create2_tx.py rename to safe_eth/safe/safe_create2_tx.py index 5b9997022..8e2518cb9 100644 --- a/gnosis/safe/safe_create2_tx.py +++ b/safe_eth/safe/safe_create2_tx.py @@ -8,8 +8,8 @@ from web3 import Web3 from web3.types import TxParams, Wei -from gnosis.eth.constants import GAS_CALL_DATA_BYTE, NULL_ADDRESS -from gnosis.eth.contracts import ( +from safe_eth.eth.constants import GAS_CALL_DATA_BYTE, NULL_ADDRESS +from safe_eth.eth.contracts import ( get_proxy_factory_contract, get_safe_contract, get_safe_V1_0_0_contract, @@ -17,7 +17,7 @@ get_safe_V1_3_0_contract, get_safe_V1_4_1_contract, ) -from gnosis.eth.utils import ( +from safe_eth.eth.utils import ( fast_is_checksum_address, get_empty_tx_params, mk_contract_address_2, @@ -70,8 +70,8 @@ def __init__( ): """ :param w3: Web3 instance - :param master_copy_address: `Gnosis Safe` master copy address - :param proxy_factory_address: `Gnosis Proxy Factory` address + :param master_copy_address: `Safe` master copy address + :param proxy_factory_address: `Safe Proxy Factory` address """ assert fast_is_checksum_address(master_copy_address) assert fast_is_checksum_address(proxy_factory_address) @@ -257,7 +257,7 @@ def _estimate_gas( Payment cannot be estimated, as ether/tokens don't have to be in the calculated Safe address, so we add some gas later. - :param initializer: Data initializer to send to GnosisSafe setup method + :param initializer: Data initializer to send to Safe setup method :param salt_nonce: Nonce that will be used to generate the salt to calculate the address of the new proxy contract. :return: Total gas estimation diff --git a/gnosis/safe/safe_creator.py b/safe_eth/safe/safe_creator.py similarity index 98% rename from gnosis/safe/safe_creator.py rename to safe_eth/safe/safe_creator.py index 712a85694..0ea9e92e1 100644 --- a/gnosis/safe/safe_creator.py +++ b/safe_eth/safe/safe_creator.py @@ -6,15 +6,15 @@ from eth_typing import ChecksumAddress from hexbytes import HexBytes -from gnosis.eth import EthereumClient, EthereumTxSent -from gnosis.eth.constants import NULL_ADDRESS -from gnosis.eth.contracts import ( +from safe_eth.eth import EthereumClient, EthereumTxSent +from safe_eth.eth.constants import NULL_ADDRESS +from safe_eth.eth.contracts import ( get_compatibility_fallback_handler_contract, get_delegate_constructor_proxy_contract, get_safe_contract, get_simulate_tx_accessor_V1_4_1_contract, ) -from gnosis.eth.utils import get_empty_tx_params +from safe_eth.eth.utils import get_empty_tx_params from .exceptions import InvalidERC20Token, InvalidPaymentToken from .proxy_factory import ProxyFactory diff --git a/gnosis/safe/safe_deployments.py b/safe_eth/safe/safe_deployments.py similarity index 100% rename from gnosis/safe/safe_deployments.py rename to safe_eth/safe/safe_deployments.py diff --git a/gnosis/safe/safe_signature.py b/safe_eth/safe/safe_signature.py similarity index 98% rename from gnosis/safe/safe_signature.py rename to safe_eth/safe/safe_signature.py index c6776ac62..12f89adfc 100644 --- a/gnosis/safe/safe_signature.py +++ b/safe_eth/safe/safe_signature.py @@ -11,13 +11,13 @@ from hexbytes import HexBytes from web3.exceptions import Web3Exception -from gnosis.eth import EthereumClient -from gnosis.eth.contracts import ( +from safe_eth.eth import EthereumClient +from safe_eth.eth.contracts import ( get_compatibility_fallback_handler_contract, get_safe_contract, ) -from gnosis.eth.utils import fast_to_checksum_address -from gnosis.safe.signatures import ( +from safe_eth.eth.utils import fast_to_checksum_address +from safe_eth.safe.signatures import ( get_signing_address, signature_split, signature_to_bytes, diff --git a/gnosis/safe/safe_tx.py b/safe_eth/safe/safe_tx.py similarity index 98% rename from gnosis/safe/safe_tx.py rename to safe_eth/safe/safe_tx.py index 3bc827002..1e36cbcec 100644 --- a/gnosis/safe/safe_tx.py +++ b/safe_eth/safe/safe_tx.py @@ -9,11 +9,11 @@ from web3.exceptions import Web3Exception from web3.types import BlockIdentifier, TxParams, Wei -from gnosis.eth import EthereumClient -from gnosis.eth.constants import NULL_ADDRESS -from gnosis.eth.contracts import get_safe_contract -from gnosis.eth.eip712 import eip712_encode -from gnosis.eth.ethereum_client import TxSpeed +from safe_eth.eth import EthereumClient +from safe_eth.eth.constants import NULL_ADDRESS +from safe_eth.eth.contracts import get_safe_contract +from safe_eth.eth.eip712 import eip712_encode +from safe_eth.eth.ethereum_client import TxSpeed from ..eth.utils import fast_keccak from .exceptions import ( diff --git a/gnosis/safe/serializers.py b/safe_eth/safe/serializers.py similarity index 91% rename from gnosis/safe/serializers.py rename to safe_eth/safe/serializers.py index df5e3a888..43062e0f5 100644 --- a/gnosis/safe/serializers.py +++ b/safe_eth/safe/serializers.py @@ -1,7 +1,7 @@ from rest_framework import serializers from rest_framework.exceptions import ValidationError -from gnosis.eth.django.serializers import EthereumAddressField, HexadecimalField +from safe_eth.eth.django.serializers import EthereumAddressField, HexadecimalField from .enums import SafeOperationEnum @@ -33,7 +33,7 @@ def validate(self, data): if data["operation"] == SafeOperationEnum.CREATE.value: raise ValidationError( - "Operation CREATE not supported. Please use Gnosis Safe CreateLib" + "Operation CREATE not supported. Please use Safe CreateLib" ) # if data['to']: # raise ValidationError('Operation is Create, but `to` was provided') diff --git a/gnosis/safe/signatures.py b/safe_eth/safe/signatures.py similarity index 97% rename from gnosis/safe/signatures.py rename to safe_eth/safe/signatures.py index 2c4e4c8fa..80e0f4f45 100644 --- a/gnosis/safe/signatures.py +++ b/safe_eth/safe/signatures.py @@ -4,7 +4,7 @@ from eth_keys.exceptions import BadSignature from hexbytes import HexBytes -from gnosis.eth.constants import NULL_ADDRESS +from safe_eth.eth.constants import NULL_ADDRESS def signature_split( diff --git a/gnosis/safe/tests/__init__.py b/safe_eth/safe/tests/__init__.py similarity index 100% rename from gnosis/safe/tests/__init__.py rename to safe_eth/safe/tests/__init__.py diff --git a/gnosis/safe/tests/account_abstraction/__init__.py b/safe_eth/safe/tests/account_abstraction/__init__.py similarity index 100% rename from gnosis/safe/tests/account_abstraction/__init__.py rename to safe_eth/safe/tests/account_abstraction/__init__.py diff --git a/gnosis/safe/tests/account_abstraction/test_safe_operation.py b/safe_eth/safe/tests/account_abstraction/test_safe_operation.py similarity index 96% rename from gnosis/safe/tests/account_abstraction/test_safe_operation.py rename to safe_eth/safe/tests/account_abstraction/test_safe_operation.py index 1f76a5230..8ad5051a2 100644 --- a/gnosis/safe/tests/account_abstraction/test_safe_operation.py +++ b/safe_eth/safe/tests/account_abstraction/test_safe_operation.py @@ -3,8 +3,8 @@ import zoneinfo from unittest import TestCase -from gnosis.eth.account_abstraction import UserOperation -from gnosis.eth.tests.mocks.mock_bundler import ( +from safe_eth.eth.account_abstraction import UserOperation +from safe_eth.eth.tests.mocks.mock_bundler import ( safe_4337_chain_id_mock, safe_4337_module_address_mock, safe_4337_module_domain_separator_mock, diff --git a/gnosis/safe/tests/api/__init__.py b/safe_eth/safe/tests/api/__init__.py similarity index 100% rename from gnosis/safe/tests/api/__init__.py rename to safe_eth/safe/tests/api/__init__.py diff --git a/gnosis/safe/tests/api/test_transaction_service_api.py b/safe_eth/safe/tests/api/test_transaction_service_api.py similarity index 98% rename from gnosis/safe/tests/api/test_transaction_service_api.py rename to safe_eth/safe/tests/api/test_transaction_service_api.py index d7a2d88f0..2305a4a00 100644 --- a/gnosis/safe/tests/api/test_transaction_service_api.py +++ b/safe_eth/safe/tests/api/test_transaction_service_api.py @@ -8,10 +8,10 @@ from eth_typing import HexStr from hexbytes import HexBytes -from gnosis.eth import EthereumClient, EthereumNetwork, EthereumNetworkNotSupported -from gnosis.eth.tests.ethereum_test_case import EthereumTestCaseMixin -from gnosis.safe import SafeTx -from gnosis.safe.api.transaction_service_api import ( +from safe_eth.eth import EthereumClient, EthereumNetwork, EthereumNetworkNotSupported +from safe_eth.eth.tests.ethereum_test_case import EthereumTestCaseMixin +from safe_eth.safe import SafeTx +from safe_eth.safe.api.transaction_service_api import ( ApiSafeTxHashNotMatchingException, TransactionServiceApi, ) diff --git a/gnosis/safe/tests/api/test_transaction_service_messages.py b/safe_eth/safe/tests/api/test_transaction_service_messages.py similarity index 92% rename from gnosis/safe/tests/api/test_transaction_service_messages.py rename to safe_eth/safe/tests/api/test_transaction_service_messages.py index ba7fc9e8d..49c977be5 100644 --- a/gnosis/safe/tests/api/test_transaction_service_messages.py +++ b/safe_eth/safe/tests/api/test_transaction_service_messages.py @@ -4,7 +4,7 @@ from eth_typing import ChecksumAddress from hexbytes import HexBytes -from gnosis.safe.api.transaction_service_api.transaction_service_messages import ( +from safe_eth.safe.api.transaction_service_api.transaction_service_messages import ( get_delegate_message, get_remove_transaction_message, get_totp, @@ -50,7 +50,7 @@ def test_get_delegate_message(self): } with patch( - "gnosis.safe.api.transaction_service_api.transaction_service_messages.get_totp", + "safe_eth.safe.api.transaction_service_api.transaction_service_messages.get_totp", return_value=mocked_totp, ): message = get_delegate_message(delegate_address, chain_id) @@ -94,7 +94,7 @@ def test_get_remove_transaction_message(self): } with patch( - "gnosis.safe.api.transaction_service_api.transaction_service_messages.get_totp", + "safe_eth.safe.api.transaction_service_api.transaction_service_messages.get_totp", return_value=mocked_totp, ): message = get_remove_transaction_message( diff --git a/gnosis/safe/tests/mocks/__init__.py b/safe_eth/safe/tests/mocks/__init__.py similarity index 100% rename from gnosis/safe/tests/mocks/__init__.py rename to safe_eth/safe/tests/mocks/__init__.py diff --git a/gnosis/safe/tests/mocks/mock_transactions.py b/safe_eth/safe/tests/mocks/mock_transactions.py similarity index 100% rename from gnosis/safe/tests/mocks/mock_transactions.py rename to safe_eth/safe/tests/mocks/mock_transactions.py diff --git a/gnosis/safe/tests/safe_test_case.py b/safe_eth/safe/tests/safe_test_case.py similarity index 97% rename from gnosis/safe/tests/safe_test_case.py rename to safe_eth/safe/tests/safe_test_case.py index fda87fa5d..686c74838 100644 --- a/gnosis/safe/tests/safe_test_case.py +++ b/safe_eth/safe/tests/safe_test_case.py @@ -8,8 +8,8 @@ from web3.contract import Contract from web3.types import Wei -from gnosis.eth.constants import NULL_ADDRESS, SAFE_SINGLETON_FACTORY_DEPLOYER_ADDRESS -from gnosis.eth.contracts import ( +from safe_eth.eth.constants import NULL_ADDRESS, SAFE_SINGLETON_FACTORY_DEPLOYER_ADDRESS +from safe_eth.eth.contracts import ( get_compatibility_fallback_handler_contract, get_multi_send_contract, get_proxy_factory_contract, @@ -20,13 +20,13 @@ get_sign_message_lib_contract, get_simulate_tx_accessor_V1_4_1_contract, ) -from gnosis.eth.exceptions import ContractAlreadyDeployed -from gnosis.eth.tests.ethereum_test_case import EthereumTestCaseMixin -from gnosis.eth.tests.utils import send_tx -from gnosis.eth.utils import get_empty_tx_params -from gnosis.safe import Safe -from gnosis.safe.multi_send import MultiSend -from gnosis.safe.proxy_factory import ProxyFactory, ProxyFactoryV141 +from safe_eth.eth.exceptions import ContractAlreadyDeployed +from safe_eth.eth.tests.ethereum_test_case import EthereumTestCaseMixin +from safe_eth.eth.tests.utils import send_tx +from safe_eth.eth.utils import get_empty_tx_params +from safe_eth.safe import Safe +from safe_eth.safe.multi_send import MultiSend +from safe_eth.safe.proxy_factory import ProxyFactory, ProxyFactoryV141 from ..safe import SafeV001, SafeV100, SafeV111, SafeV130, SafeV141 diff --git a/gnosis/safe/tests/test_addresses.py b/safe_eth/safe/tests/test_addresses.py similarity index 88% rename from gnosis/safe/tests/test_addresses.py rename to safe_eth/safe/tests/test_addresses.py index 91926dc73..cfbafd7cf 100644 --- a/gnosis/safe/tests/test_addresses.py +++ b/safe_eth/safe/tests/test_addresses.py @@ -2,9 +2,9 @@ from packaging.version import Version -from gnosis.eth import EthereumNetwork -from gnosis.eth.utils import fast_is_checksum_address -from gnosis.safe.addresses import MASTER_COPIES, PROXY_FACTORIES +from safe_eth.eth import EthereumNetwork +from safe_eth.eth.utils import fast_is_checksum_address +from safe_eth.safe.addresses import MASTER_COPIES, PROXY_FACTORIES class TestAddresses(TestCase): diff --git a/gnosis/safe/tests/test_multi_send.py b/safe_eth/safe/tests/test_multi_send.py similarity index 99% rename from gnosis/safe/tests/test_multi_send.py rename to safe_eth/safe/tests/test_multi_send.py index 31c04dcaa..a9d6ac5e9 100644 --- a/gnosis/safe/tests/test_multi_send.py +++ b/safe_eth/safe/tests/test_multi_send.py @@ -6,7 +6,7 @@ from eth_account import Account from hexbytes import HexBytes -from gnosis.eth import EthereumClient +from safe_eth.eth import EthereumClient from ..multi_send import MultiSend, MultiSendOperation, MultiSendTx from .safe_test_case import SafeTestCaseMixin diff --git a/gnosis/safe/tests/test_proxy_factory/__init__.py b/safe_eth/safe/tests/test_proxy_factory/__init__.py similarity index 100% rename from gnosis/safe/tests/test_proxy_factory/__init__.py rename to safe_eth/safe/tests/test_proxy_factory/__init__.py diff --git a/gnosis/safe/tests/test_proxy_factory/test_proxy_factory.py b/safe_eth/safe/tests/test_proxy_factory/test_proxy_factory.py similarity index 93% rename from gnosis/safe/tests/test_proxy_factory/test_proxy_factory.py rename to safe_eth/safe/tests/test_proxy_factory/test_proxy_factory.py index d41b76010..dac3de746 100644 --- a/gnosis/safe/tests/test_proxy_factory/test_proxy_factory.py +++ b/safe_eth/safe/tests/test_proxy_factory/test_proxy_factory.py @@ -5,24 +5,24 @@ from eth_account import Account -from gnosis.eth import EthereumClient -from gnosis.eth.contracts import ( +from safe_eth.eth import EthereumClient +from safe_eth.eth.contracts import ( get_proxy_1_0_0_deployed_bytecode, get_proxy_1_1_1_deployed_bytecode, get_proxy_1_3_0_deployed_bytecode, ) -from gnosis.eth.exceptions import ContractAlreadyDeployed -from gnosis.eth.tests.utils import just_test_if_mainnet_node -from gnosis.eth.utils import compare_byte_code, fast_is_checksum_address -from gnosis.safe import Safe -from gnosis.safe.proxy_factory import ( +from safe_eth.eth.exceptions import ContractAlreadyDeployed +from safe_eth.eth.tests.utils import just_test_if_mainnet_node +from safe_eth.eth.utils import compare_byte_code, fast_is_checksum_address +from safe_eth.safe import Safe +from safe_eth.safe.proxy_factory import ( ProxyFactory, ProxyFactoryV100, ProxyFactoryV111, ProxyFactoryV130, ) -from gnosis.safe.tests.safe_test_case import SafeTestCaseMixin -from gnosis.safe.tests.utils import generate_salt_nonce +from safe_eth.safe.tests.safe_test_case import SafeTestCaseMixin +from safe_eth.safe.tests.utils import generate_salt_nonce logger = logging.getLogger(__name__) diff --git a/gnosis/safe/tests/test_safe.py b/safe_eth/safe/tests/test_safe.py similarity index 99% rename from gnosis/safe/tests/test_safe.py rename to safe_eth/safe/tests/test_safe.py index 7fc07e7b2..115b9854d 100644 --- a/gnosis/safe/tests/test_safe.py +++ b/safe_eth/safe/tests/test_safe.py @@ -5,9 +5,9 @@ from eth_account import Account from hexbytes import HexBytes -from gnosis.eth.constants import GAS_CALL_DATA_BYTE, NULL_ADDRESS -from gnosis.eth.contracts import get_safe_contract, get_sign_message_lib_contract -from gnosis.eth.utils import fast_keccak_text, get_empty_tx_params +from safe_eth.eth.constants import GAS_CALL_DATA_BYTE, NULL_ADDRESS +from safe_eth.eth.contracts import get_safe_contract, get_sign_message_lib_contract +from safe_eth.eth.utils import fast_keccak_text, get_empty_tx_params from ..enums import SafeOperationEnum from ..exceptions import ( diff --git a/gnosis/safe/tests/test_safe_create2_tx.py b/safe_eth/safe/tests/test_safe_create2_tx.py similarity index 99% rename from gnosis/safe/tests/test_safe_create2_tx.py rename to safe_eth/safe/tests/test_safe_create2_tx.py index 7919ec5f1..0836ddb86 100644 --- a/gnosis/safe/tests/test_safe_create2_tx.py +++ b/safe_eth/safe/tests/test_safe_create2_tx.py @@ -4,7 +4,7 @@ from eth_account import Account -from gnosis.eth.contracts import get_safe_contract, get_safe_V1_0_0_contract +from safe_eth.eth.contracts import get_safe_contract, get_safe_V1_0_0_contract from ..safe_create2_tx import SafeCreate2TxBuilder from .safe_test_case import SafeTestCaseMixin diff --git a/gnosis/safe/tests/test_safe_signature.py b/safe_eth/safe/tests/test_safe_signature.py similarity index 99% rename from gnosis/safe/tests/test_safe_signature.py rename to safe_eth/safe/tests/test_safe_signature.py index 3aa9f92ca..3baa8ee45 100644 --- a/gnosis/safe/tests/test_safe_signature.py +++ b/safe_eth/safe/tests/test_safe_signature.py @@ -10,7 +10,7 @@ from hexbytes import HexBytes from web3 import Web3 -from gnosis.eth.utils import fast_keccak, fast_keccak_text +from safe_eth.eth.utils import fast_keccak, fast_keccak_text from ...eth.tests.ethereum_test_case import EthereumTestCaseMixin from ..safe_signature import ( diff --git a/gnosis/safe/tests/test_safe_tx.py b/safe_eth/safe/tests/test_safe_tx.py similarity index 100% rename from gnosis/safe/tests/test_safe_tx.py rename to safe_eth/safe/tests/test_safe_tx.py diff --git a/gnosis/safe/tests/test_safe_v1_0_0.py b/safe_eth/safe/tests/test_safe_v1_0_0.py similarity index 100% rename from gnosis/safe/tests/test_safe_v1_0_0.py rename to safe_eth/safe/tests/test_safe_v1_0_0.py diff --git a/gnosis/safe/tests/test_safe_v1_3_0.py b/safe_eth/safe/tests/test_safe_v1_3_0.py similarity index 100% rename from gnosis/safe/tests/test_safe_v1_3_0.py rename to safe_eth/safe/tests/test_safe_v1_3_0.py diff --git a/gnosis/safe/tests/test_serializers.py b/safe_eth/safe/tests/test_serializers.py similarity index 100% rename from gnosis/safe/tests/test_serializers.py rename to safe_eth/safe/tests/test_serializers.py diff --git a/gnosis/safe/tests/test_signatures.py b/safe_eth/safe/tests/test_signatures.py similarity index 95% rename from gnosis/safe/tests/test_signatures.py rename to safe_eth/safe/tests/test_signatures.py index faf5e8215..b1c42b237 100644 --- a/gnosis/safe/tests/test_signatures.py +++ b/safe_eth/safe/tests/test_signatures.py @@ -2,9 +2,9 @@ from eth_account import Account -from gnosis.eth.constants import NULL_ADDRESS -from gnosis.eth.contracts import get_compatibility_fallback_handler_contract -from gnosis.eth.utils import fast_keccak_text +from safe_eth.eth.constants import NULL_ADDRESS +from safe_eth.eth.contracts import get_compatibility_fallback_handler_contract +from safe_eth.eth.utils import fast_keccak_text from ..signatures import get_signing_address from .safe_test_case import SafeTestCaseMixin diff --git a/gnosis/safe/tests/utils.py b/safe_eth/safe/tests/utils.py similarity index 84% rename from gnosis/safe/tests/utils.py rename to safe_eth/safe/tests/utils.py index 42d5ce8ee..145a4c4d0 100644 --- a/gnosis/safe/tests/utils.py +++ b/safe_eth/safe/tests/utils.py @@ -1,7 +1,7 @@ import os import random -from gnosis.eth.constants import SECPK1_N +from safe_eth.eth.constants import SECPK1_N def generate_salt_nonce() -> int: diff --git a/gnosis/util/__init__.py b/safe_eth/util/__init__.py similarity index 100% rename from gnosis/util/__init__.py rename to safe_eth/util/__init__.py diff --git a/gnosis/util/http.py b/safe_eth/util/http.py similarity index 100% rename from gnosis/util/http.py rename to safe_eth/util/http.py diff --git a/gnosis/util/util.py b/safe_eth/util/util.py similarity index 100% rename from gnosis/util/util.py rename to safe_eth/util/util.py diff --git a/scripts/cowswap/cow_swap_cli.py b/scripts/cowswap/cow_swap_cli.py index 5e33f6555..3600f914c 100644 --- a/scripts/cowswap/cow_swap_cli.py +++ b/scripts/cowswap/cow_swap_cli.py @@ -11,9 +11,9 @@ def confirm_prompt(question: str) -> bool: import sys import time - from gnosis.cowsap import CowSwapAPI, Order, OrderKind - from gnosis.eth import EthereumNetwork - from gnosis.eth.constants import NULL_ADDRESS + from safe_eth.cowsap import CowSwapAPI, Order, OrderKind + from safe_eth.eth import EthereumNetwork + from safe_eth.eth.constants import NULL_ADDRESS PRIVATE_KEY = os.environ.get("PRIVATE_KEY") if not PRIVATE_KEY: diff --git a/scripts/generators/generate_safe_deployments.py b/scripts/generators/generate_safe_deployments.py index ea6e5606e..b59a3a55a 100644 --- a/scripts/generators/generate_safe_deployments.py +++ b/scripts/generators/generate_safe_deployments.py @@ -13,7 +13,7 @@ ) # folder where the deployments are CURRENT_DIRECTORY = os.path.dirname(__file__) SAFE_ETH_PY_DEPLOYMENTS_FILE = os.path.join( - CURRENT_DIRECTORY, "../../gnosis/safe/safe_deployments.py" + CURRENT_DIRECTORY, "../../safe_eth/safe/safe_deployments.py" ) # deployment dictionary to be stored