Skip to content

Commit 499d09c

Browse files
central_systest_blobs: deploy test contract(s)
1 parent 35e9bfe commit 499d09c

3 files changed

Lines changed: 56 additions & 27 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
10
1+
11

crates/central_systest_blobs/resources/preconfirmed_block.json

Lines changed: 42 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"block_number": 4,
2+
"block_number": 6,
33
"pre_confirmed_block": {
44
"l1_da_mode": "CALLDATA",
55
"l1_data_gas_price": {
@@ -17,16 +17,16 @@
1717
"sequencer_address": "0x1000",
1818
"starknet_version": "0.14.3",
1919
"status": "PRE_CONFIRMED",
20-
"timestamp": 1004,
20+
"timestamp": 1006,
2121
"transaction_receipts": [
2222
{
23-
"actual_fee": "0x6d1f42b7",
23+
"actual_fee": "0x158bf1",
2424
"events": [
2525
{
2626
"data": [
2727
"0xf99e7cdfbcce0bf14ce17e4c57fd2d12ad1bca5fc8e46a9fbafc36b59a9955",
2828
"0x1000",
29-
"0x6d1f42b7",
29+
"0x158bf1",
3030
"0x0"
3131
],
3232
"from_address": "0x6bd1d71a2fb67a567618584ca31da288dbc2e1a8421e4045e05f52c19bfab83",
@@ -38,52 +38,58 @@
3838
"execution_resources": {
3939
"builtin_instance_counter": {
4040
"pedersen_builtin": 4,
41-
"poseidon_builtin": 15,
42-
"range_check_builtin": 72
41+
"poseidon_builtin": 17,
42+
"range_check_builtin": 90
4343
},
4444
"data_availability": {
4545
"l1_data_gas": 0,
46-
"l1_gas": 2754,
46+
"l1_gas": 4095,
4747
"l2_gas": 0
4848
},
4949
"n_memory_holes": 0,
50-
"n_steps": 3523,
50+
"n_steps": 4403,
5151
"total_gas_consumed": {
5252
"l1_data_gas": 0,
53-
"l1_gas": 2754,
54-
"l2_gas": 1830762485
53+
"l1_gas": 4646,
54+
"l2_gas": 1407435
5555
}
5656
},
5757
"execution_status": "SUCCEEDED",
5858
"l2_to_l1_messages": [],
59-
"transaction_hash": "0x5243be6398910bcd98bfbec1271759489364e2e35a73c1f42c0a83482c61aca",
59+
"transaction_hash": "0x69baeec4f5fd1665ef711e66f55b891ea8c8427d2cacb2eb39e3b66d320ae0d",
6060
"transaction_index": 0
6161
}
6262
],
6363
"transaction_state_diffs": [
6464
{
65-
"declared_classes": [
65+
"declared_classes": [],
66+
"deployed_contracts": [
6667
{
67-
"class_hash": "0x4b0dc3014cc21eeeeba97610d8fb3eaf61c428c513a2e9bfcf1b7beb9cb99c0",
68-
"compiled_class_hash": "0x50cb22f072d8c735911ff906272d7f4256b8fa8aea1c8c624f879f343694870"
68+
"address": "0x4021329459ab2dacdd89c397996da9214211fa2abf2cda1bfb8f4cffe6db51f",
69+
"class_hash": "0x4b0dc3014cc21eeeeba97610d8fb3eaf61c428c513a2e9bfcf1b7beb9cb99c0"
6970
}
7071
],
71-
"deployed_contracts": [],
7272
"migrated_compiled_classes": [],
7373
"nonces": {
74-
"0xf99e7cdfbcce0bf14ce17e4c57fd2d12ad1bca5fc8e46a9fbafc36b59a9955": "0x3"
74+
"0xf99e7cdfbcce0bf14ce17e4c57fd2d12ad1bca5fc8e46a9fbafc36b59a9955": "0x5"
7575
},
7676
"old_declared_contracts": [],
7777
"replaced_classes": [],
7878
"storage_diffs": {
79+
"0x4021329459ab2dacdd89c397996da9214211fa2abf2cda1bfb8f4cffe6db51f": [
80+
{
81+
"key": "0x1275130f95dda36bcbb6e9d28796c1d7e10b6e9fd5ed083e0ede4b12f613528",
82+
"value": "0x2"
83+
}
84+
],
7985
"0x6bd1d71a2fb67a567618584ca31da288dbc2e1a8421e4045e05f52c19bfab83": [
8086
{
8187
"key": "0x6fba6554adab51d0272b896b6f41768bd0491e5ad59c39fab38e65767974793",
82-
"value": "0xffffffffffffffffffffffff92e0bd48"
88+
"value": "0xffffffffffffffffffffffff92bbce2b"
8389
},
8490
{
8591
"key": "0x723973208639b7839ce298f7ffea61e3f9533872defd7abdb91023db4658812",
86-
"value": "0x6d1f42b7"
92+
"value": "0x6d4431d4"
8793
}
8894
]
8995
}
@@ -92,12 +98,23 @@
9298
"transactions": [
9399
{
94100
"account_deployment_data": [],
95-
"class_hash": "0x4b0dc3014cc21eeeeba97610d8fb3eaf61c428c513a2e9bfcf1b7beb9cb99c0",
96-
"compiled_class_hash": "0x50cb22f072d8c735911ff906272d7f4256b8fa8aea1c8c624f879f343694870",
101+
"calldata": [
102+
"0x1",
103+
"0xf99e7cdfbcce0bf14ce17e4c57fd2d12ad1bca5fc8e46a9fbafc36b59a9955",
104+
"0x2730079d734ee55315f4f141eaed376bddd8c2133523d223a344c5604e0f7f8",
105+
"0x6",
106+
"0x4b0dc3014cc21eeeeba97610d8fb3eaf61c428c513a2e9bfcf1b7beb9cb99c0",
107+
"0x0",
108+
"0x2",
109+
"0x1",
110+
"0x1",
111+
"0x0"
112+
],
97113
"fee_data_availability_mode": 0,
98-
"nonce": "0x2",
114+
"nonce": "0x4",
99115
"nonce_data_availability_mode": 0,
100116
"paymaster_data": [],
117+
"proof_facts": [],
101118
"resource_bounds": {
102119
"L1_DATA_GAS": {
103120
"max_amount": "0x186a0",
@@ -114,12 +131,12 @@
114131
},
115132
"sender_address": "0xf99e7cdfbcce0bf14ce17e4c57fd2d12ad1bca5fc8e46a9fbafc36b59a9955",
116133
"signature": [
117-
"0x147f1b7ec5f3836d7bd3be39af5136cb75f113deebcf7d1962da19ef00d8719",
118-
"0x4d083fb99ab11fb5a577a559c27f9e65c4de397a735054cd6e038716434b53b"
134+
"0x24b3b8fc254a82c56f7c592ebaf989fb2551228ac0f8d7fa2b0cb43ea94dc2a",
135+
"0x70feac66dc56daf6857c6a34a4b547ca653a96fb3d674b180ce403684e8dbba"
119136
],
120137
"tip": "0x0",
121-
"transaction_hash": "0x5243be6398910bcd98bfbec1271759489364e2e35a73c1f42c0a83482c61aca",
122-
"type": "DECLARE",
138+
"transaction_hash": "0x69baeec4f5fd1665ef711e66f55b891ea8c8427d2cacb2eb39e3b66d320ae0d",
139+
"type": "INVOKE_FUNCTION",
123140
"version": "0x3"
124141
}
125142
]

crates/central_systest_blobs/src/cende_blob_regression_test.rs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -829,9 +829,9 @@ async fn test_make_data() {
829829
// sender account.
830830
// (from this point - all txs include non-zero fees, and no more bootstrap declares)
831831
// 5. declare the test contract.
832-
// TODO(Dori): the rest of the txs.
833832
// 6. deploy the test contract.
834833
// 7. deploy another instance of the test contract.
834+
// TODO(Dori): the rest of the txs.
835835
// 8. invoke the test contract: something with a state change.
836836
// 9. invoke the test contract: test syscalls.
837837
let erc20_contract = FeatureContract::ERC20(CairoVersion::Cairo1(RunnableCairo1::Casm));
@@ -862,6 +862,18 @@ async fn test_make_data() {
862862
EXPECTED_FEE_TOKEN_ADDRESS.assert_eq(&token_address.to_string());
863863
blob_factory.close_block().await;
864864
blob_factory.make_declare_tx(test_contract, Some(*OPERATOR_ADDRESS));
865+
blob_factory.close_block().await;
866+
let _test_contract_address_0 = blob_factory.make_operator_deploy_tx(
867+
test_contract,
868+
calldata![Felt::ZERO, Felt::ZERO],
869+
true, // charge fee
870+
);
871+
blob_factory.close_block().await;
872+
let _test_contract_address_1 = blob_factory.make_operator_deploy_tx(
873+
test_contract,
874+
calldata![Felt::ONE, Felt::ONE],
875+
true, // charge fee
876+
);
865877

866878
let (blobs, preconfirmed_block) = blob_factory.finalize().await;
867879
expect_file![CHAIN_INFO_PATH].assert_eq(&serde_json::to_string_pretty(&chain_info).unwrap());

0 commit comments

Comments
 (0)