L2 Transactions Examples

An L1 limit order

1
{
2
"token_sell": "0x10",
3
"amount_sell": "50",
4
"amount_buy": "140",
5
"nonce": 1,
6
"expiration_timestamp": 623456,
7
"eth_address": "0xDABadaBadabADaBadabADabAdabadABadAbadAbA",
8
"fee_info": {
9
"token_id": "0x10",
10
"source_vault_id": 48,
11
"fee_limit": "1000"
12
},
13
"vault_id_sell": 48,
14
"vault_id_buy": 64,
15
"order_type": 0,
16
"token_buy": "0x20",
17
"type": "OrderL1Request"
18
}
Copied!

A settlement matching an L2 order with an L1 order

1
{
2
"party_b_order": {
3
"expiration_timestamp": 623456,
4
"eth_address": "0xDABadaBadabADaBadabADabAdabadABadAbadAbA",
5
"amount_buy": "140",
6
"amount_sell": "50",
7
"fee_info": {
8
"fee_limit": "2000",
9
"token_id": "0x20",
10
"source_vault_id": 1
11
},
12
"order_type": 0,
13
"vault_id_sell": 1,
14
"nonce": 1,
15
"token_sell": "0x20",
16
"token_buy": "0x10",
17
"vault_id_buy": 2,
18
"type": "OrderL1Request"
19
},
20
"settlement_info": {
21
"party_a_sold": "75",
22
"party_b_sold": "25",
23
"party_b_fee_info": {
24
"fee_taken": "15",
25
"destination_vault_id": 80,
26
"destination_stark_key": "0x60"
27
},
28
"party_a_fee_info": {
29
"fee_taken": "15",
30
"destination_vault_id": 80,
31
"destination_stark_key": "0x60"
32
}
33
},
34
"party_a_order": {
35
"expiration_timestamp": 642956,
36
"amount_buy": "40",
37
"signature": {
38
"s": "0x0",
39
"r": "0x0"
40
},
41
"amount_sell": "150",
42
"fee_info": {
43
"fee_limit": "1000",
44
"token_id": "0x10",
45
"source_vault_id": 48
46
},
47
"order_type": 0,
48
"vault_id_sell": 48,
49
"nonce": 0,
50
"public_key": "0x70",
51
"token_sell": "0x10",
52
"token_buy": "0x20",
53
"vault_id_buy": 64,
54
"type": "OrderL2Request"
55
},
56
"type": "SettlementRequest"
57
}
Copied!
Last modified 2mo ago