Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: module 'moralis.evm_api.transaction.transaction' has no attribute 'get_wallet_active_chains' #40

Open
abhie-lp opened this issue Aug 28, 2023 · 0 comments

Comments

@abhie-lp
Copy link

New Bug Report

Checklist

Issue Description

Trying to get the multi-chain activity of an address but getting AttributeError for the given method in documentation.
In the API Reference page it is using a different module but same thing AttributeError

Steps + code to reproduce

from moralis import evm_api

api_key = "YOUR_API_KEY"

params = {
    "address": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
    "chains": ["eth", "bsc", "polygon"],
}

result = evm_api.transaction.get_wallet_active_chains(
    api_key=api_key,
    params=params,
)

print(result)

AND

from moralis import evm_api

api_key = "YOUR_API_KEY"

params = {
  "chains": [
    "eth"
  ],
  "address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
}

result = evm_api.wallets.get_wallet_active_chains(
  api_key=api_key,
  params=params,
)

print(result)

Actual Outcome

AttributeError: module 'moralis.evm_api.transaction.transaction' has no attribute 'get_wallet_active_chains'

AND

AttributeError: module 'moralis.evm_api.evm_api' has no attribute 'wallets'

Expected Outcome

{
  "address": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e",
  "active_chains": {
    "chain": "eth",
    "chain_id": "0x1",
    "first_transaction": {
      "block_number": "123456789",
      "block_timestamp": "2022-08-23T20:58:31.000Z",
      "transaction_hash": "0x2d30ca6f024dbc1307ac8a1a44ca27de6f797ec22ef20627a1307243b0ab7d09"
    },
    "last_transaction": {
      "block_number": "123456789",
      "block_timestamp": "2022-08-23T20:58:31.000Z",
      "transaction_hash": "0x2d30ca6f024dbc1307ac8a1a44ca27de6f797ec22ef20627a1307243b0ab7d09"
    }
  }
}

Environment

Server

  • Moralis server version: 2.0

Client

  • Moralis SDK version: 0.1.37
  • Operating system: EndeavourOS
  • Browser: Google Chrome

Logs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant