Skip to content

Commit

Permalink
retd u8 array
Browse files Browse the repository at this point in the history
  • Loading branch information
xunilrj committed Oct 24, 2023
1 parent aa7d530 commit c37e200
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,41 +7,64 @@
"name": "main",
"output": {
"name": "",
"type": 1,
"type": 2,
"typeArguments": null
}
}
],
"loggedTypes": [],
"messagesTypes": [],
"types": [
{
"components": [
{
"name": "__array_element",
"type": 4,
"typeArguments": null
}
],
"type": "[_; 2]",
"typeId": 0,
"typeParameters": null
},
{
"components": null,
"type": "b256",
"typeId": 0,
"typeId": 1,
"typeParameters": null
},
{
"components": [
{
"name": "field_1",
"type": 2,
"type": 3,
"typeArguments": null
},
{
"name": "field_2",
"type": 1,
"typeArguments": null
},
{
"name": "field_3",
"type": 0,
"typeArguments": null
}
],
"type": "struct BiggerThanAWord",
"typeId": 1,
"typeId": 2,
"typeParameters": null
},
{
"components": null,
"type": "u64",
"typeId": 2,
"typeId": 3,
"typeParameters": null
},
{
"components": null,
"type": "u8",
"typeId": 4,
"typeParameters": null
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ script;
struct BiggerThanAWord {
field_1: u64,
field_2: b256,
field_3: [u8; 2],
}

fn main() -> BiggerThanAWord {
BiggerThanAWord {
field_1: 99999u64,
field_2: 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff,
field_3: [1, 2]
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
category = "run"
expected_result = { action = "return_data", value = "000000000001869fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" }
expected_result = { action = "return_data", value = "000000000001869fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0102000000000000" }
validate_abi = true
expected_warnings = 2
expected_warnings = 3

0 comments on commit c37e200

Please sign in to comment.