Skip to main content

Don't have an API key yet?

Sign-up to Moralis to get your free API key and start building today.

Get Your Free API Key
Version: 2.2

Simulate transaction

🚨Aptos: Confirmed Deprecation (60 Days Notice)

Aptos mainnet and testnet will be discontinued on November 22nd, in line with the network’s deprecation of their v1 Indexers. We recommend exploring alternative providers, which you can find at Aptos APIs.

POSThttps://mainnet-aptos-api.moralis.io/transactions/simulate

Simulate a transaction.

BODY PARAM
senderstring
A hex encoded 32 byte Aptos account address.
sequence_numberstring
A string containing a 64-bit unsigned integer.
max_gas_amountstring
A string containing a 64-bit unsigned integer.
gas_unit_pricestring
A string containing a 64-bit unsigned integer.
expiration_timestamp_secsstring
A string containing a 64-bit unsigned integer returned in milliseconds.
payloadjson
An enum of the possible transaction payloads
signaturejson
Responses
API KEY
import Moralis from 'moralis';

try {
await Moralis.start({
apiKey: "YOUR_API_KEY"
});

const response = await Moralis.AptosApi.transactions.simulateTransaction({
"network": "mainnet"
});

console.log(response);
} catch (e) {
console.error(e);
}
Response Example
Empty