-
Notifications
You must be signed in to change notification settings - Fork 4
Description
historicalSwaps(limit: 10, where: {extrinsic: {hash_eq: "0x5d468b452f07238371595f2e087451a9c2347c06728934b9ae24d25e5578fcd9"}}) {
assetAmountIn
accountId
assetAmountOut
assetIn
assetOut
blockNumber
event
extrinsic {
hash
name
}
timestamp
id
}
historicalAccountBalances(orderBy: timestamp_ASC, where: {
accountId_eq: "dDyDKjNJnefrw3mq8YDiZ1udq8PyrE8LiBm3q2cVCcar8yFqd",
extrinsic: {hash_eq: "0x5d468b452f07238371595f2e087451a9c2347c06728934b9ae24d25e5578fcd9"}
}
) {
accountId
dBalance
event
blockNumber
timestamp
extrinsic {
hash
name
}
assetId
id
} "historicalSwaps": [
{
"assetAmountIn": "16180000000",
"accountId": "dDyDKjNJnefrw3mq8YDiZ1udq8PyrE8LiBm3q2cVCcar8yFqd",
"assetAmountOut": "16986873968",
"assetIn": "Ztg",
"assetOut": "{\"categoricalOutcome\":[329,0]}",
"blockNumber": 4534229,
"event": "BuyExecuted",
"extrinsic": {
"hash": "0x5d468b452f07238371595f2e087451a9c2347c06728934b9ae24d25e5578fcd9",
"name": "NeoSwaps.buy"
},
"timestamp": "2023-12-23T14:15:30.364000Z",
"id": "0004534229-c6dc7-000011"
}
],
"historicalAccountBalances": [
{
"accountId": "dDyDKjNJnefrw3mq8YDiZ1udq8PyrE8LiBm3q2cVCcar8yFqd",
"dBalance": "-242841481",
"event": "Withdraw",
"blockNumber": 4534229,
"timestamp": "2023-12-23T14:15:30.364000Z",
"extrinsic": {
"hash": "0x5d468b452f07238371595f2e087451a9c2347c06728934b9ae24d25e5578fcd9",
"name": "NeoSwaps.buy"
},
"assetId": "Ztg",
"id": "0004534229-c6dc7-000003-8yFqd"
},
{
"accountId": "dDyDKjNJnefrw3mq8YDiZ1udq8PyrE8LiBm3q2cVCcar8yFqd",
"dBalance": "-16180000000",
"event": "Transfer",
"blockNumber": 4534229,
"timestamp": "2023-12-23T14:15:30.364000Z",
"extrinsic": {
"hash": "0x5d468b452f07238371595f2e087451a9c2347c06728934b9ae24d25e5578fcd9",
"name": "NeoSwaps.buy"
},
"assetId": "Ztg",
"id": "0004534229-c6dc7-000004-8yFqd"
},
{
"accountId": "dDyDKjNJnefrw3mq8YDiZ1udq8PyrE8LiBm3q2cVCcar8yFqd",
"dBalance": "80900000",
"event": "Transfer",
"blockNumber": 4534229,
"timestamp": "2023-12-23T14:15:30.364000Z",
"extrinsic": {
"hash": "0x5d468b452f07238371595f2e087451a9c2347c06728934b9ae24d25e5578fcd9",
"name": "NeoSwaps.buy"
},
"assetId": "Ztg",
"id": "0004534229-c6dc7-000005-8yFqd"
},
{
"accountId": "dDyDKjNJnefrw3mq8YDiZ1udq8PyrE8LiBm3q2cVCcar8yFqd",
"dBalance": "16986873968",
"event": "Transfer",
"blockNumber": 4534229,
"timestamp": "2023-12-23T14:15:30.364000Z",
"extrinsic": {
"hash": "0x5d468b452f07238371595f2e087451a9c2347c06728934b9ae24d25e5578fcd9",
"name": "NeoSwaps.buy"
},
"assetId": "{\"categoricalOutcome\":[329,0]}",
"id": "0004534229-c6dc7-000010-8yFqd"
}
]
}The same happens for the following other extrinsic hash 0x388cd620d2f1f55883fd5b40626b8ec54d58e3554fb378826627412ace8996c2.
The behaviour is the following: The trader is the market creator themselves and therefore gets a transfer of the external fee amount 4534229 from themselves to themselves. Can we attach a name to those Transfer events like extrinsic: name: "External Fees"? Mhh I think it's even hard for you to figure out which Transfer belongs to external fees paid, right? Mhhh... That's really hard on my side, because my current approach of the swap export is to look in historicalSwaps, use the extrinsic hash and then after it to look in historicalAccountBalances and assert for all expected transactions. The above transactions were unexpected and are regarded as a special case that I unfortunately need to handle too..