- Start Here
- Networks
- Access Control List (ACL)
- Accounts (Addresses)
- Simulator
- Audits
- Unpack
- Abstract Syntax Tree (AST)
- Get Contract ASTGET
- Get Contract ConstantsGET
- Get Contract ConstructorsGET
- Get Contract DefinitionsGET
- Get Contract DocumentationGET
- Get Contract EnumsGET
- Get Contract ErrorsGET
- Get Contract EventsGET
- Get Contract FunctionsGET
- Get Contract ImportsGET
- Get Contract InterfacesGET
- Get Contract LibrariesGET
- Get Contract LicenseGET
- Get Contract State VariablesGET
- Get Contract StatisticsGET
- Get Contract StructsGET
- Control Flow Graphs (CFG)
- Constructors
- Contracts
- Metadata
- Tokens
- Variables
- Functions
- Events
- Standards
- Statistics
Simulate Transaction
POST
https://api.unpack.dev/v1/simulator/transaction/{networkId}
Simulator
Last modified:2024-05-31 11:02:21
NOTE: Endpoint is under alpha preview and as such expect errors. Please do report any error over our official Discord channel.
Request
Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.Example:
Authorization: Bearer ********************
Path Params
networkId
integer <int64>
required
Default:
1
Example:
1
Query Params
sender
string
optional
<= 42 characters
Example:
0xE5A173Cc9Bc3333ee8e89635764b9AB92D1da6ED
recipient
string
optional
<= 42 characters
Example:
0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
data
string
optional
Example:
0xd0e30db0
gasLimit
integer <int64>
optional
Example:
600000
value
string
optional
Example:
1000
blockNumber
integer <int64>
optional
formatTrace
boolean
optional
Example:
true
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.unpack.dev/v1/simulator/transaction/1'
Responses
🟢200OK
application/json
Body
$schema
string <uri>
read-onlyoptional
Example:
https://api.unpack.dev/schemas/SimulatedTransaction.json
blockNumber
integer <int64>
required
bytes
string
optional
completedStates
array[string]
optional
createdAt
string <date-time>
optional
decodedPayload
object (SimulatedTransactionDecoder)
required
function
object (PartialFunction)
required
inputs
object
required
signature
string
required
exitReason
string
optional
failedStates
array[string]
optional
formattedTrace
string
optional
gasUsed
integer <int64>
required
logs
array[object (Log) {13}]
optional
abi
string
required
address
object (NamedAddr)
required
anonymous
boolean
required
ast
object (EventDefinition)
required
data
object
required
decodedTopics
array[object (Topic) {2}]
required
eventSignature
string
required
name
string
required
rawData
string
required
removed
boolean
required
signature
string
required
topics
array[string]
required
type
string
required
networkId
integer <int64>
required
partial
boolean
optional
processed
boolean
optional
recipient
object (NamedAddr)
required
sender
object (NamedAddr)
required
simulationId
string
required
success
boolean
required
trace
array[object (SimulatedCallTrace) {4}]
required
callType
string
required
from
string
required
to
string
required
value
string
required
Example
{
"$schema": "https://api.unpack.dev/schemas/SimulatedTransaction.json",
"blockNumber": 0,
"bytes": "string",
"completedStates": [
"string"
],
"createdAt": "2019-08-24T14:15:22Z",
"decodedPayload": {
"function": {
"$schema": "https://api.unpack.dev/schemas/PartialFunction.json",
"abi": "string",
"contractAddress": "string",
"createdAt": "2019-08-24T14:15:22Z",
"id": "string",
"implemented": true,
"mutability": "string",
"name": "string",
"parameters": [
{
"constant": true,
"id": 0,
"indexed": true,
"name": "string",
"nameLocation": {
"column": 0,
"end": 0,
"length": 0,
"line": 0,
"parentIndex": 0,
"start": 0
},
"nodeType": 0,
"scope": 0,
"src": {
"column": 0,
"end": 0,
"length": 0,
"line": 0,
"parentIndex": 0,
"start": 0
},
"stateMutability": 0,
"stateVariable": true,
"storageLocation": 0,
"typeDescription": {
"typeIdentifier": "string",
"typeString": "string"
},
"typeName": {
"expression": null,
"id": 0,
"keyNameLocation": {
"column": 0,
"end": 0,
"length": 0,
"line": 0,
"parentIndex": 0,
"start": 0
},
"keyType": {},
"name": "string",
"nodeType": 0,
"pathNode": {
"id": 0,
"name": "string",
"nameLocation": {
"column": 0,
"end": 0,
"length": 0,
"line": 0,
"parentIndex": 0,
"start": 0
},
"nodeType": 0,
"referencedDeclaration": 0,
"src": {
"column": 0,
"end": 0,
"length": 0,
"line": 0,
"parentIndex": 0,
"start": 0
},
"typeDescription": {
"typeIdentifier": "string",
"typeString": "string"
}
},
"referencedDeclaration": 0,
"src": {
"column": 0,
"end": 0,
"length": 0,
"line": 0,
"parentIndex": 0,
"start": 0
},
"stateMutability": 0,
"typeDescription": {
"typeIdentifier": "string",
"typeString": "string"
},
"valueNameLocation": {
"column": 0,
"end": 0,
"length": 0,
"line": 0,
"parentIndex": 0,
"start": 0
},
"valueType": {}
},
"visibility": 0
}
],
"returnParameters": [
{
"constant": true,
"id": 0,
"indexed": true,
"name": "string",
"nameLocation": {
"column": 0,
"end": 0,
"length": 0,
"line": 0,
"parentIndex": 0,
"start": 0
},
"nodeType": 0,
"scope": 0,
"src": {
"column": 0,
"end": 0,
"length": 0,
"line": 0,
"parentIndex": 0,
"start": 0
},
"stateMutability": 0,
"stateVariable": true,
"storageLocation": 0,
"typeDescription": {
"typeIdentifier": "string",
"typeString": "string"
},
"typeName": {
"expression": null,
"id": 0,
"keyNameLocation": {
"column": 0,
"end": 0,
"length": 0,
"line": 0,
"parentIndex": 0,
"start": 0
},
"keyType": {},
"name": "string",
"nodeType": 0,
"pathNode": {
"id": 0,
"name": "string",
"nameLocation": {
"column": 0,
"end": 0,
"length": 0,
"line": 0,
"parentIndex": 0,
"start": 0
},
"nodeType": 0,
"referencedDeclaration": 0,
"src": {
"column": 0,
"end": 0,
"length": 0,
"line": 0,
"parentIndex": 0,
"start": 0
},
"typeDescription": {
"typeIdentifier": "string",
"typeString": "string"
}
},
"referencedDeclaration": 0,
"src": {
"column": 0,
"end": 0,
"length": 0,
"line": 0,
"parentIndex": 0,
"start": 0
},
"stateMutability": 0,
"typeDescription": {
"typeIdentifier": "string",
"typeString": "string"
},
"valueNameLocation": {
"column": 0,
"end": 0,
"length": 0,
"line": 0,
"parentIndex": 0,
"start": 0
},
"valueType": {}
},
"visibility": 0
}
],
"signature": "string",
"signatureDefinition": "string",
"updatedAt": "2019-08-24T14:15:22Z",
"virtual": true,
"visibility": "string"
},
"inputs": {
"property1": null,
"property2": null
},
"signature": "string"
},
"exitReason": "string",
"failedStates": [
"string"
],
"formattedTrace": "string",
"gasUsed": 0,
"logs": [
{
"abi": "string",
"address": {
"addr": "string",
"ens": "string",
"name": "string",
"tags": [
"string"
],
"type": "string"
},
"anonymous": true,
"ast": {
"anonymous": true,
"id": 0,
"name": "string",
"nodeType": 0,
"parameters": {
"id": 0,
"nodeType": 0,
"parameterTypes": [
{
"typeIdentifier": "string",
"typeString": "string"
}
],
"parameters": [
{
"constant": true,
"id": 0,
"indexed": true,
"name": "string",
"nameLocation": {
"column": 0,
"end": 0,
"length": 0,
"line": 0,
"parentIndex": 0,
"start": 0
},
"nodeType": 0,
"scope": 0,
"src": {
"column": 0,
"end": 0,
"length": 0,
"line": 0,
"parentIndex": 0,
"start": 0
},
"stateMutability": 0,
"stateVariable": true,
"storageLocation": 0,
"typeDescription": {
"typeIdentifier": "string",
"typeString": "string"
},
"typeName": {
"expression": null,
"id": 0,
"keyNameLocation": {
"column": 0,
"end": 0,
"length": 0,
"line": 0,
"parentIndex": 0,
"start": 0
},
"keyType": {},
"name": "string",
"nodeType": 0,
"pathNode": {
"id": 0,
"name": "string",
"nameLocation": {
"column": 0,
"end": 0,
"length": 0,
"line": 0,
"parentIndex": 0,
"start": 0
},
"nodeType": 0,
"referencedDeclaration": 0,
"src": {
"column": 0,
"end": 0,
"length": 0,
"line": 0,
"parentIndex": 0,
"start": 0
},
"typeDescription": {
"typeIdentifier": "string",
"typeString": "string"
}
},
"referencedDeclaration": 0,
"src": {
"column": 0,
"end": 0,
"length": 0,
"line": 0,
"parentIndex": 0,
"start": 0
},
"stateMutability": 0,
"typeDescription": {
"typeIdentifier": "string",
"typeString": "string"
},
"valueNameLocation": {
"column": 0,
"end": 0,
"length": 0,
"line": 0,
"parentIndex": 0,
"start": 0
},
"valueType": {}
},
"visibility": 0
}
],
"src": {
"column": 0,
"end": 0,
"length": 0,
"line": 0,
"parentIndex": 0,
"start": 0
}
},
"src": {
"column": 0,
"end": 0,
"length": 0,
"line": 0,
"parentIndex": 0,
"start": 0
},
"typeDescription": {
"typeIdentifier": "string",
"typeString": "string"
}
},
"data": {
"property1": null,
"property2": null
},
"decodedTopics": [
{
"name": "string",
"value": null
}
],
"eventSignature": "string",
"name": "string",
"rawData": "string",
"removed": true,
"signature": "string",
"topics": [
"string"
],
"type": "string"
}
],
"networkId": 0,
"partial": true,
"processed": true,
"recipient": {
"addr": "string",
"ens": "string",
"name": "string",
"tags": [
"string"
],
"type": "string"
},
"sender": {
"addr": "string",
"ens": "string",
"name": "string",
"tags": [
"string"
],
"type": "string"
},
"simulationId": "string",
"success": true,
"trace": [
{
"callType": "string",
"from": "string",
"to": "string",
"value": "string"
}
]
}
🔴500Error
Modified at 2024-05-31 11:02:21