Transactions
Simulate transactions to get human-readable summaries of expected state changes, as well as risk scores and warnings.
Simulate an unsigned transaction
POST https://trykoi.com/api/v1/:network/tx/simulate
Path Parameters
network
string
Any supported network string, including "ethereum", "polygon", "arbitrum", "optimism", and "astar".
Request Body
tx*
object
An unsigned transaction request, including...
from - The Ethereum address the transaction is from, as a hex string.
to - Optional. The EVM address the transaction is interacting with, or optional in the case of a contract deployment.
data - Optional. The transaction data as a hex string.
value - Optional. The value of the base asset sent in the transaction, as a string. Eg "1.0" for 1 ETH
origin
string
The URL that originated this transaction signature request, if any.
{
"stateChanges": [
{
"type": "native-asset-transfer",
"data": {
"from": "0x0dafCC68323e70812f86D13453502AeB57352337",
"to": "0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1",
"value": "100000000000000000"
},
"asset": {
"chainID": "137",
"name": "Polygon (MATIC)",
"decimals": 18,
"symbol": "MATIC",
"logoURL": "https://assets.coingecko.com/coins/images/4713/small/matic-token-icon.png",
"tokenType": "native"
},
"summary": {
"text": "0x0dafCC68323e70812f86D13453502AeB57352337 sent 0.1 MATIC to 0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1"
}
}
],
"relevantAddresses": [
{
"address": "0x0dafcc68323e70812f86d13453502aeb57352337",
"nonce": 49378,
"hasBytecode": false,
"balance": "530212540735654295609"
},
{
"address": "0x99c9fc46f92e8a1c0dec1b1747d010903e884be1",
"nonce": 0,
"hasBytecode": false,
"balance": "11415161521110723"
}
],
"origin": "https://seaclaim.xyz",
"warnings": [
{
"type": "blocked-domain",
"severity": "critical"
}
],
"gasUsed": "21000"
}Ethereum
https://trykoi.com/api/v1/ethereum/tx/simulate
Polygon
https://trykoi.com/api/v1/polygon/tx/simulate
Arbitrum One
https://trykoi.com/api/v1/arbitrum/tx/simulate
Optimism
https://trykoi.com/api/v1/optimism/tx/simulate
Astar
https://trykoi.com/api/v1/astar/tx/simulate
Last updated