I'm using alchemy to mint NFT and in the specific case this piece of code
//the transaction
const tx = {
from: PUBLIC_KEY,
to: blockChainAddress,
nonce: nonce,
gas: 500000,
data: nftContract.methods.mintNFT(PUBLIC_KEY, urlS3Metadata.Location).encodeABI(),
}
try {
var signPromise = await web3.eth.accounts.signTransaction(tx, PRIVATE_KEY);
var signedTransaction = await web3.eth.sendSignedTransaction(
signPromise.rawTransaction);
if (signedTransaction.status == true)
status = "IN PROGRESS";
else
status = "FAILED";
var obj = { Hash: signedTransaction.transactionHash, Payload: signedTransaction, Token: token, Status: status, UserToken: userToken };
return obj;
}
catch (err) {
console.log(err);
}
I'm still on Rinkeby network and during the test the process is quite fast. In the last days sometime it tooks more then the 15min that's the max time AWS can keep on a Lambda function and I was wondering if I can invoke the sendSignedTransaction and then leave it on the Alchemy side without waiting for a response.
Otherwise I think I should use a Fargate + a container and perform those steps on that side. Or even it's possible to pass some userdata to the Alchemy API then read them back when the notification api is invoked?
Thanks