Skip to content

Commit

Permalink
Merge pull request #737 from tonlabs/gitbook
Browse files Browse the repository at this point in the history
Update docs from gitbook
  • Loading branch information
tonjen authored May 11, 2022
2 parents 60033bb + f2f0431 commit 30e6fc3
Showing 1 changed file with 0 additions and 68 deletions.
68 changes: 0 additions & 68 deletions docs/graphql-samples/transactions.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,74 +224,6 @@ Result:
}
```

## Query transaction data

```graphql
query{
transactions(filter:{
id:{
eq:"29948390d177f9ab10e48e3aad4d64af6f20441954d7e689cca5116e6ccbf5bf"
}
}){
id
tr_type
tr_type_name
aborted # if the transaction was executed successfully
block_id
account_addr
balance_delta # how balance of account_addr has changed after transaction
workchain_id
lt # transaction logical time
prev_trans_lt
now # block time that contains transaction. transaction execution time
outmsg_cnt # number of external messages, generated by the transaction
orig_status_name
end_status_name
in_msg # message that produced the transaction
in_message{
msg_type_name
src # account that sent the message
dst # same as account_addr
value # value attached to the message
}
}
}
```

The result:

```graphql
{
"data": {
"transactions": [
{
"id": "29948390d177f9ab10e48e3aad4d64af6f20441954d7e689cca5116e6ccbf5bf",
"tr_type": 0,
"tr_type_name": "Ordinary",
"aborted": false,
"block_id": "1c93bad89390b71ceb537707cff49167aabe6fbaa65e28c8357e12570c67c644",
"account_addr": "-1:f6967e2ce65843a5cc450362b898e87a0fab3925bdc507195fa5003465cd62af",
"balance_delta": "0x9520368f50aab",
"workchain_id": -1,
"lt": "0x448c10cd4c1",
"prev_trans_lt": "0x4093667f781",
"now": 1599752024,
"outmsg_cnt": 0,
"orig_status_name": "Active",
"end_status_name": "Active",
"in_msg": "0e82f3c1c5f7e0414257954370c02890ad9046f5f2c0c9e1d7119591be7ae93f",
"in_message": {
"msg_type_name": "Internal",
"src": "0:d1938ecc8a53ae58a6bf4416f9045a80b533227d79463b25424a8fd7c6de88fe",
"dst": "-1:f6967e2ce65843a5cc450362b898e87a0fab3925bdc507195fa5003465cd62af",
"value": "0x95203900d92ee"
}
}
]
}
}
```

## Get the number of transactions in a specified shard over a period of time.

Here we specify the only shard of "-1" workchain and time from 18.43 till 19.43. You can do the same for any shard of "0" workchain.
Expand Down

0 comments on commit 30e6fc3

Please sign in to comment.