"Failed to deserialize input into SignedTransaction: invalid value: integer `4`, expected variant index 0 <= i < 4"
Here is the code
const transaction = await aptosClient.publishPackageTransaction({
account: account.accountAddress,
metadataBytes,
moduleBytecode: byteCode,
});
const stimulationResult = await aptosClient.transaction.simulate.simple({
transaction
});
if(!stimulationResult[0].success) {
throw new Error(stimulationResult[0].vm_status)
}
const pendingTxn = await aptosClient.signAndSubmitTransaction({
signer: account,
transaction
})
await aptosClient.waitForTransaction({
transactionHash: pendingTxn.hash
})