Skip to content

TypedAppClient calls fails with "Not an address" despite valid sender #399

@diegocalvetti

Description

@diegocalvetti

Subject of the issue

When calling a contract abi method through a TypedAppClient group, I receive an error Not an address even though the same signer and sender work perfectly with AtomicTransactionComposer

Your environment

  • timestamp: 2025-05-19T12:45:31+00:00
  • AlgoKit: 2.6.2 (latest: 2.7.0)
  • AlgoKit Python: 3.12.9 (v3.12.9:fdb81425a9a, Feb 4 2025, 12:21:36) [Clang 13.0.0 (clang-1300.0.29.30)] (location: /opt/homebrew/Caskroom/algokit/2.6.2/_internal)
  • OS: macOS-12.6-arm64-arm-64bit
  • docker: 28.0.1
  • docker compose: 2.33.1-desktop.1

Steps to reproduce

  1. Connect a funded wallet using txn-lab on localnet
const wallet = walletManager.getWallet(WalletId.LUTE)!
const sender = wallet.activeAddress!
const signer = wallet.transactionSigner!
  1. This works as expected
const algorand = algokit.AlgorandClient.defaultLocalNet();

const atc = new AtomicTransactionComposer();
const suggestedParams = await algorand.client.algod.getTransactionParams().do();
const contract = new algosdk.ABIContract(ABI_FACTORY);

atc.addMethodCall({
    appID: appID,
    method: contract.getMethodByName('opUp'),
    suggestedParams,
    sender,
    signer,
})

const res = await atc.execute(algorand.client.algod, 4);

While this version throws the error Not an address: PMCRUVNTDXUNG6FSP5CHCFRRV64HOD2UM2LN72QQGCA42MKTNDRSXU23VM

const factoryClient = algorand.client.getTypedAppClientById(FactoryClient, {
  appId: appID,
  defaultSender: sender,
  defaultSigner: signer,
});

const group = factoryClient.newGroup()
group.opUp({
  args: [],
})

await group.send({ populateAppCallResources: true });

Expected behaviour

Calling the method opUp() on the group should work identically to the ATC call, since sender and signer are the same and valid.

Actual behaviour

transaction.ts:84 Uncaught (in promise) Error: Not an address: PMCRUVNTDXUNG6FSP5CHCFRRV64HOD2UM2LN72QQGCA42MKTNDRSXU23VM
    at ensureAddress (transaction.ts:84:9)
    at new _Transaction (transaction.ts:490:19)

It seems that the SDK is misinterpreting a signer as an address or a bad value is being passed internally.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions