Skip to content

Commit

Permalink
Add class hash (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
piotmag769 authored Mar 8, 2024
1 parent 7e4ba86 commit 1d99cd0
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 0 deletions.
9 changes: 9 additions & 0 deletions crates/cairo-profiler/tests/data/deploy.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"entry_point": {
"class_hash": "",
"entry_point_type": "EXTERNAL",
"entry_point_selector": "0x017340c6779204ea2a91c87d1c2226a3aebda65c64da3672a36893c4330ea27b",
"contract_address": "0x0000000000000000000000000000000000001724987234973219347210837402",
Expand Down Expand Up @@ -39,6 +40,7 @@
"nested_calls": [
{
"entry_point": {
"class_hash": "",
"entry_point_type": "CONSTRUCTOR",
"entry_point_selector": "0x028ffe4ff0f226a9107253e17a904099aa4f63a02a5621de0576e5aa71bc5194",
"contract_address": "0x00cf5578e374fe3d4125ec101d93f211b9d9604440904da7683b0ad2a2b69489",
Expand Down Expand Up @@ -78,6 +80,7 @@
"nested_calls": [
{
"entry_point": {
"class_hash": "",
"entry_point_type": "EXTERNAL",
"entry_point_selector": "0x02eaa67a25fa536ec4c6f60d78307c722e85f57dafc8165de6b528b7b9a588e4",
"contract_address": "0x0712b80bc52e8ffba912d8827e0bcaaba0bc6242a8562f1235a66d6bea7aba1b",
Expand Down Expand Up @@ -122,6 +125,7 @@
},
{
"entry_point": {
"class_hash": "",
"entry_point_type": "CONSTRUCTOR",
"entry_point_selector": "0x028ffe4ff0f226a9107253e17a904099aa4f63a02a5621de0576e5aa71bc5194",
"contract_address": "0x04eddabccd939955073921d1d86c8b54b6c18d746b2147a0d0a18f73199538b7",
Expand Down Expand Up @@ -161,6 +165,7 @@
"nested_calls": [
{
"entry_point": {
"class_hash": "",
"entry_point_type": "EXTERNAL",
"entry_point_selector": "0x02eaa67a25fa536ec4c6f60d78307c722e85f57dafc8165de6b528b7b9a588e4",
"contract_address": "0x0712b80bc52e8ffba912d8827e0bcaaba0bc6242a8562f1235a66d6bea7aba1b",
Expand Down Expand Up @@ -205,6 +210,7 @@
},
{
"entry_point": {
"class_hash": "",
"entry_point_type": "CONSTRUCTOR",
"entry_point_selector": "0x028ffe4ff0f226a9107253e17a904099aa4f63a02a5621de0576e5aa71bc5194",
"contract_address": "0x000000000000000000000000000000000000000000000000000000000000007b",
Expand Down Expand Up @@ -244,6 +250,7 @@
"nested_calls": [
{
"entry_point": {
"class_hash": "",
"entry_point_type": "EXTERNAL",
"entry_point_selector": "0x02eaa67a25fa536ec4c6f60d78307c722e85f57dafc8165de6b528b7b9a588e4",
"contract_address": "0x0712b80bc52e8ffba912d8827e0bcaaba0bc6242a8562f1235a66d6bea7aba1b",
Expand Down Expand Up @@ -288,6 +295,7 @@
},
{
"entry_point": {
"class_hash": "",
"entry_point_type": "CONSTRUCTOR",
"entry_point_selector": "0x028ffe4ff0f226a9107253e17a904099aa4f63a02a5621de0576e5aa71bc5194",
"contract_address": "0x00f586ed97c4cc13396677dd46f8fad23cfb7ff4d847430daf0102bb4164fc42",
Expand Down Expand Up @@ -327,6 +335,7 @@
"nested_calls": [
{
"entry_point": {
"class_hash": "",
"entry_point_type": "EXTERNAL",
"entry_point_selector": "0x02eaa67a25fa536ec4c6f60d78307c722e85f57dafc8165de6b528b7b9a588e4",
"contract_address": "0x0712b80bc52e8ffba912d8827e0bcaaba0bc6242a8562f1235a66d6bea7aba1b",
Expand Down
6 changes: 6 additions & 0 deletions crates/cairo-profiler/tests/data/l1_handler.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"entry_point": {
"class_hash": "",
"entry_point_type": "EXTERNAL",
"entry_point_selector": "0x017340c6779204ea2a91c87d1c2226a3aebda65c64da3672a36893c4330ea27b",
"contract_address": "0x0000000000000000000000000000000000001724987234973219347210837402",
Expand Down Expand Up @@ -39,6 +40,7 @@
"nested_calls": [
{
"entry_point": {
"class_hash": "",
"entry_point_type": "CONSTRUCTOR",
"entry_point_selector": "0x028ffe4ff0f226a9107253e17a904099aa4f63a02a5621de0576e5aa71bc5194",
"contract_address": "0x00cf5578e374fe3d4125ec101d93f211b9d9604440904da7683b0ad2a2b69489",
Expand Down Expand Up @@ -78,6 +80,7 @@
"nested_calls": [
{
"entry_point": {
"class_hash": "",
"entry_point_type": "EXTERNAL",
"entry_point_selector": "0x02eaa67a25fa536ec4c6f60d78307c722e85f57dafc8165de6b528b7b9a588e4",
"contract_address": "0x0712b80bc52e8ffba912d8827e0bcaaba0bc6242a8562f1235a66d6bea7aba1b",
Expand Down Expand Up @@ -122,6 +125,7 @@
},
{
"entry_point": {
"class_hash": "",
"entry_point_type": "L1_HANDLER",
"entry_point_selector": "0x0084f38c3647f1eb0529feafe11451196f6f0413184d82a1660f32ea9b5da952",
"contract_address": "0x0712b80bc52e8ffba912d8827e0bcaaba0bc6242a8562f1235a66d6bea7aba1b",
Expand Down Expand Up @@ -161,6 +165,7 @@
"nested_calls": [
{
"entry_point": {
"class_hash": "",
"entry_point_type": "EXTERNAL",
"entry_point_selector": "0x014d7bff2015b0a213b958b57be5d1588a9720baebac310a441c990bae986710",
"contract_address": "0x00cf5578e374fe3d4125ec101d93f211b9d9604440904da7683b0ad2a2b69489",
Expand Down Expand Up @@ -200,6 +205,7 @@
"nested_calls": [
{
"entry_point": {
"class_hash": "",
"entry_point_type": "EXTERNAL",
"entry_point_selector": "0x02eaa67a25fa536ec4c6f60d78307c722e85f57dafc8165de6b528b7b9a588e4",
"contract_address": "0x0712b80bc52e8ffba912d8827e0bcaaba0bc6242a8562f1235a66d6bea7aba1b",
Expand Down
11 changes: 11 additions & 0 deletions crates/cairo-profiler/tests/data/trace.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"entry_point": {
"class_hash": "",
"entry_point_type": "EXTERNAL",
"entry_point_selector": "0x017340c6779204ea2a91c87d1c2226a3aebda65c64da3672a36893c4330ea27b",
"contract_address": "0x0000000000000000000000000000000000001724987234973219347210837402",
Expand Down Expand Up @@ -40,6 +41,7 @@
"nested_calls": [
{
"entry_point": {
"class_hash": "",
"entry_point_type": "CONSTRUCTOR",
"entry_point_selector": "0x028ffe4ff0f226a9107253e17a904099aa4f63a02a5621de0576e5aa71bc5194",
"contract_address": "0x06a72e95d9d261d01d7e41e79a49c751508c74a1fd4689f56d21d749ca6e17a0",
Expand Down Expand Up @@ -79,6 +81,7 @@
"nested_calls": [
{
"entry_point": {
"class_hash": "",
"entry_point_type": "EXTERNAL",
"entry_point_selector": "0x02eaa67a25fa536ec4c6f60d78307c722e85f57dafc8165de6b528b7b9a588e4",
"contract_address": "0x0712b80bc52e8ffba912d8827e0bcaaba0bc6242a8562f1235a66d6bea7aba1b",
Expand Down Expand Up @@ -123,6 +126,7 @@
},
{
"entry_point": {
"class_hash": "",
"entry_point_type": "EXTERNAL",
"entry_point_selector": "0x014d7bff2015b0a213b958b57be5d1588a9720baebac310a441c990bae986710",
"contract_address": "0x06a72e95d9d261d01d7e41e79a49c751508c74a1fd4689f56d21d749ca6e17a0",
Expand Down Expand Up @@ -162,6 +166,7 @@
"nested_calls": [
{
"entry_point": {
"class_hash": "",
"entry_point_type": "EXTERNAL",
"entry_point_selector": "0x02eaa67a25fa536ec4c6f60d78307c722e85f57dafc8165de6b528b7b9a588e4",
"contract_address": "0x0712b80bc52e8ffba912d8827e0bcaaba0bc6242a8562f1235a66d6bea7aba1b",
Expand Down Expand Up @@ -206,6 +211,7 @@
},
{
"entry_point": {
"class_hash": "",
"entry_point_type": "EXTERNAL",
"entry_point_selector": "0x004bdc46cbf005c1cd386c527a40ebef01d1a9ea4c226b74b6495539b8f16a7a",
"contract_address": "0x06a72e95d9d261d01d7e41e79a49c751508c74a1fd4689f56d21d749ca6e17a0",
Expand Down Expand Up @@ -245,6 +251,7 @@
"nested_calls": [
{
"entry_point": {
"class_hash": "",
"entry_point_type": "EXTERNAL",
"entry_point_selector": "0x02eaa67a25fa536ec4c6f60d78307c722e85f57dafc8165de6b528b7b9a588e4",
"contract_address": "0x06a72e95d9d261d01d7e41e79a49c751508c74a1fd4689f56d21d749ca6e17a0",
Expand Down Expand Up @@ -289,6 +296,7 @@
},
{
"entry_point": {
"class_hash": "",
"entry_point_type": "EXTERNAL",
"entry_point_selector": "0x03f55930393ea07087c654a727a871299cabe3617a1330514cdc490470be9aa0",
"contract_address": "0x06a72e95d9d261d01d7e41e79a49c751508c74a1fd4689f56d21d749ca6e17a0",
Expand Down Expand Up @@ -328,6 +336,7 @@
"nested_calls": [
{
"entry_point": {
"class_hash": "",
"entry_point_type": "EXTERNAL",
"entry_point_selector": "0x02eaa67a25fa536ec4c6f60d78307c722e85f57dafc8165de6b528b7b9a588e4",
"contract_address": "0x0712b80bc52e8ffba912d8827e0bcaaba0bc6242a8562f1235a66d6bea7aba1b",
Expand Down Expand Up @@ -369,6 +378,7 @@
},
{
"entry_point": {
"class_hash": "",
"entry_point_type": "EXTERNAL",
"entry_point_selector": "0x010d869dd492a59760ea0fa8b9f9ac52808445c51200f97727af69506e959b7f",
"contract_address": "0x0644932b4d54c062ffa3bf22500b314e154de99854df7245d64c8e2238e39742",
Expand Down Expand Up @@ -413,6 +423,7 @@
},
{
"entry_point": {
"class_hash": "",
"entry_point_type": "EXTERNAL",
"entry_point_selector": "0x02eaa67a25fa536ec4c6f60d78307c722e85f57dafc8165de6b528b7b9a588e4",
"contract_address": "0x0712b80bc52e8ffba912d8827e0bcaaba0bc6242a8562f1235a66d6bea7aba1b",
Expand Down
1 change: 1 addition & 0 deletions crates/trace-data/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ pub enum DeprecatedSyscallSelector {

#[derive(Clone, Debug, Default, Eq, PartialEq, Serialize, Deserialize)]
pub struct CallEntryPoint {
pub class_hash: ClassHash,
pub entry_point_type: EntryPointType,
pub entry_point_selector: EntryPointSelector,
pub contract_address: ContractAddress,
Expand Down

0 comments on commit 1d99cd0

Please sign in to comment.