JavaScript SDK AtomicTransactionComposer.addMethodCall missing accounts argument

Hi,

I’m curios, why JS code doesn’t have accounts argument inside AtomicTransactionComposer.addMethodCall, but Python code has it…

I have smart contract, which checks stored address with address inside group transaction, and my code crashes, when I send txn from JS without accounts. I patched JS lib and it works…

Example of PyTEAL code

Gtxn[0].receiver() == App.globalGet(Bytes("some_address"))

Thank you

In accordance with ARC-0004 accounts used in ABI methods should have the required accounts as method arguments. So when calling addMethodCall the should should be in methodArgs.

For example an ABI method might be log_message(string, account)void. Is JS sdk you would call atc.addMethodCall({appID, method, methodArgs: ['Hello World', some_account], ...})

1 Like