0

I am using web3 to make transactions but I am stuck on how can I add transaction deadlines in web3.eth.sendTransaction function. I am using 0x API for getting the swap quote.

My code :-

await web3.eth.sendTransaction(rawTransaction)
  .then((data: any) => {
     console.log(data)
   })
  .catch(() => {
     alert('error')
  })
3
  • what do you mean with deadlines?
    – Majd TL
    Jan 18, 2022 at 14:51
  • @MajdTL if tranx will not complete in x minutes than it should be canceled automatically
    – Mohit
    Jan 19, 2022 at 5:40
  • that is a feature of 0x protocol, right? if yes then it has nothing to do with the "sendTransaction" method and this deadline infromation should be included somehow in the data of rawTranasction.
    – Majd TL
    Jan 19, 2022 at 12:10

1 Answer 1

0

There is no transaction deadline on a transaction, you can create Limit Orders with an expiration for this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.