How to pass the fromAddress argument to the tx trigger

I’m trying to pass the fromAddress argument to the tx trigger, and getting error. How can i fix it?

Hi @orus

Can you share the ABI of the contract which you used in this stream? I will check if I can reproce it.

@johnversus

{
“constant”: true,
“inputs”: [
{
“name”: “_owner”,
“type”: “address”
}
],
“name”: “balanceOf”,
“outputs”: [
{
“name”: “balance”,
“type”: “uint256”
}
],
“payable”: false,
“stateMutability”: “view”,
“type”: “function”
}

1 Like

Hi @orus

It seems like the error is related to $contract field. I will report this to the devs and will get back to you on this.
For a temporary fix you can try replacing the $contract with the contract address.

@johnversus I tried replacing $contract with the contract address, but it didn’t work. Still the same problem. As it say on screenshot, the error is in the _owner field.

That _owner error might me due to some other reason. When I test I only received the top error.
Do you have any other triggers or do you see a way to reproduce 2nd error?

I have two triggers, one for erc20transactions and one for tx. Everything works fine with erc20, no errors have occurred.

I didn’t have issues adding a tx stream trigger with that abi. Did you try with $fromAddress instead of fromAddress?

1 Like

@cryptokid, yes, and i recieving first error on screenshot from first post

Can you try again from the start? Can you also look in network tab to see that is sent to the server?

I even removed the other trigger, but it still doesn’t work.

instead of contract there can you add a contract address?

It worked, but what if I want this field to be dynamic?

Where from it should be that dynamic contract address value?

From the $contract field

and that $contract field where from it is?

I’m not familiar with triggers, don’t know

my assumption is that a trigger of type transaction doesn’t have access to a variable named $contract, you could try with $toAddress instead of $contract if you know that toAddress is a contract

1 Like

Thanks, close thread

1 Like