Previews a transaction against the latest network state, and returns the preview receipt. If the node has enabled it, you may be able to also preview against recent network state.
This endpoint supports V2 transactions (and beyond). If you still need to preview V1
transactions, you should use the /preview
endpoint instead.
The logical name of the network
{{network}}
POST /transaction/preview-v2 HTTP/1.1
Host: xrd.nownodes.io
Content-Type: application/json
Accept: */*
Content-Length: 314
{
"network": "{{network}}",
"at_ledger_state": {
"type": "ByStateVersion"
},
"preview_transaction": {
"type": "Compiled"
},
"flags": {
"use_free_credit": true,
"assume_all_signature_proofs": true,
"skip_epoch_check": true,
"disable_auth_checks": true
},
"options": {
"core_api_receipt": true,
"radix_engine_toolkit_receipt": true,
"logs": true
}
}
{
"at_ledger_state": {
"state_version": 1,
"header_summary": {
"epoch_round": {
"epoch": 1,
"round": 1
},
"ledger_hashes": {
"state_tree_hash": "text",
"transaction_tree_hash": "text",
"receipt_tree_hash": "text"
},
"proposer_timestamp": {
"unix_timestamp_ms": 1,
"date_time": "text"
}
}
},
"receipt": {
"status": "Succeeded",
"fee_summary": {
"execution_cost_units_consumed": 1,
"finalization_cost_units_consumed": 1,
"xrd_total_execution_cost": "text",
"xrd_total_finalization_cost": "text",
"xrd_total_royalty_cost": "text",
"xrd_total_storage_cost": "text",
"xrd_total_tipping_cost": "text"
},
"costing_parameters": {
"execution_cost_unit_price": "text",
"execution_cost_unit_limit": 1,
"execution_cost_unit_loan": 1,
"finalization_cost_unit_price": "text",
"finalization_cost_unit_limit": 1,
"xrd_usd_price": "text",
"xrd_storage_price": "text",
"xrd_archive_storage_price": "text",
"tip_proportion": "text"
},
"fee_source": {
"from_vaults": [
{
"vault_entity": {
"entity_type": "GlobalPackage",
"is_global": true,
"entity_address": "text"
},
"xrd_amount": "text"
}
]
},
"fee_destination": {
"to_proposer": "text",
"to_validator_set": "text",
"to_burn": "text",
"to_royalty_recipients": [
{
"royalty_recipient": {
"entity_type": "GlobalPackage",
"is_global": true,
"entity_address": "text"
},
"xrd_amount": "text"
}
]
},
"state_updates": {
"deleted_partitions": [
{
"entity_type": "GlobalPackage",
"entity_address": "text",
"entity_module": "TypeInfo",
"partition_kind": "Field",
"partition_number": 1
}
],
"created_substates": [
{
"substate_id": {
"entity_type": "GlobalPackage",
"entity_address": "text",
"entity_module": "TypeInfo",
"partition_kind": "Field",
"partition_number": 1,
"substate_type": "BootLoaderModuleFieldSystemBoot",
"substate_key": {
"key_type": "Field",
"db_sort_key_hex": "text"
}
},
"value": {
"substate_hex": "text",
"substate_data_hash": "text",
"substate_data": {
"substate_type": "BootLoaderModuleFieldSystemBoot",
"is_locked": true
}
},
"system_structure": {
"type": "SystemField"
}
}
],
"updated_substates": [
{
"substate_id": {
"entity_type": "GlobalPackage",
"entity_address": "text",
"entity_module": "TypeInfo",
"partition_kind": "Field",
"partition_number": 1,
"substate_type": "BootLoaderModuleFieldSystemBoot",
"substate_key": {
"key_type": "Field",
"db_sort_key_hex": "text"
}
},
"new_value": {
"substate_hex": "text",
"substate_data_hash": "text",
"substate_data": {
"substate_type": "BootLoaderModuleFieldSystemBoot",
"is_locked": true
}
},
"previous_value": {
"substate_hex": "text",
"substate_data_hash": "text",
"substate_data": {
"substate_type": "BootLoaderModuleFieldSystemBoot",
"is_locked": true
}
},
"system_structure": {
"type": "SystemField"
}
}
],
"deleted_substates": [
{
"substate_id": {
"entity_type": "GlobalPackage",
"entity_address": "text",
"entity_module": "TypeInfo",
"partition_kind": "Field",
"partition_number": 1,
"substate_type": "BootLoaderModuleFieldSystemBoot",
"substate_key": {
"key_type": "Field",
"db_sort_key_hex": "text"
}
},
"previous_value": {
"substate_hex": "text",
"substate_data_hash": "text",
"substate_data": {
"substate_type": "BootLoaderModuleFieldSystemBoot",
"is_locked": true
}
},
"system_structure": {
"type": "SystemField"
}
}
],
"new_global_entities": [
{
"entity_type": "GlobalPackage",
"is_global": true,
"entity_address": "text"
}
]
},
"events": [
{
"type": {
"emitter": {
"type": "Function"
},
"type_reference": {
"full_type_id": {
"entity_address": "text",
"schema_hash": "text",
"local_type_id": {
"kind": "WellKnown",
"id": 1,
"as_sbor": {
"hex": "text",
"programmatic_json": null
}
}
}
},
"name": "text"
},
"data": {
"hex": "text",
"programmatic_json": null
}
}
],
"next_epoch": {
"epoch": 1,
"validators": [
{
"address": "text",
"key": {
"key_type": "EcdsaSecp256k1",
"key_hex": "text"
},
"stake": "text"
}
],
"significant_protocol_update_readiness": [
{
"readiness_signal_name": "text",
"signalled_stake": "text"
}
]
},
"output": [
{
"hex": "text",
"programmatic_json": null
}
],
"error_message": "text"
},
"radix_engine_toolkit_receipt": {},
"logs": [
{
"level": "text",
"message": "text"
}
]
}