How to test autotask on BSCtestnet

I have try to config autotask for bsc testnet. When I run auto task, status's success (check on my image)
But I check transaction on bscscan (testnet) , function Smartcontract not run . please help me

Hey @Mr_Sid,

The Autotask will be marked as success as long as nothing inside throws an exception. This means that your Autotask might run successfully without actually relaying any transaction.

We'd appreciate having a code example to replicate the issue you're experiencing so I can provide you with more details.

Also, if there's a transaction hash you're looking at, please share too.

Best

Thanks ernestognw,
This's my sample hash :

Result
"0x118880902d00596504e00bd9451136be29399115626ec574dd71d8d6bad06a5a"
Logs
AUTOTASK START
2022-04-22T01:30:05.475Z INFO {
chainId: 97,
hash: '0x118880902d00596504e00bd9451136be29399115626ec574dd71d8d6bad06a5a',
transactionId: '3f49401d-50dc-4eb7-a7e8-e8c2a456ae06',
value: '0x64',
gasPrice: 15000000000,
gasLimit: 21000,
to: '0xc7464dbcA260A8faF033460622B23467Df5AEA42',
from: '0xc629d108aac5b7481f6ebccb61736080e996369c',
data: '0x',
nonce: 155,
status: 'sent',
speed: 'fast',
validUntil: '2022-04-22T09:30:04.136Z',
createdAt: '2022-04-22T01:30:05.314Z',
sentAt: '2022-04-22T01:30:05.314Z',
pricedAt: '2022-04-22T01:30:05.314Z'
}
END RequestId: 270298d0-9837-45e8-bfff-0e104df743ad
AUTOTASK COMPLETE

Please help me !

I see I didn't set Send transaction for relay.Maybe it's reason.
But I set Send Transaction, it show error : Transaction would revert: could not estimate gas for transaction.
I have tried, but it not work

please help me

That's the Autotask log, I think you're only console.loging the transaction but actually sending it.
If it's throwing an error related to a bad gas estimation, it means that your transaction is likely to fail.

Please just double check that the transaction you're sending is doable, and doesn't require permissions on your contract or that there is no condition that will make it revert.

hi @ernestognw
How to console.log in the transaction. I don't get it. I have set transaction successfully and I see log transaction on BSCTestnet. But I have tried run autotask, I didn't see log transaction of function smart contract on BSCtestnet
This's my log running

{
chainId: 97,
hash: '0x98ec1176d30d996190bf3e8d987702da3ce8819ef0dce9ec8fb85ff1e778e85e',
transactionId: 'de198587-ea13-4e55-b32c-065b99e8d2bd',
value: '0x64',
gasPrice: 15000000000,
gasLimit: 21000,
to: '0xc7464dbcA260A8faF033460622B23467Df5AEA42',
from: '0xc629d108aac5b7481f6ebccb61736080e996369c',
data: '0x',
nonce: 191,
status: 'sent',
speed: 'fast',
validUntil: '2022-04-25T00:56:44.336Z',
createdAt: '2022-04-24T16:56:46.407Z',
sentAt: '2022-04-24T16:56:46.407Z',
pricedAt: '2022-04-24T16:56:46.407Z'
}

I'm referring to the fact that the transaction is being logged on the Autotask logs, so you're either returning the tx at the end or making a console.log in the middle of the execution.

I'm taking a look at your transaction and it passed. I'm trying to understand your issue and I get that you're trying to call a function, right?

The data field in your transaction is empty, which means that you're not correctly constructing the call on your script. Also, the address where the transaction is going doesn't seem to be a contract, but an EOA.

I'm asking you for a code example again, otherwise, we can't help you further :thinking: