Skip to content

Commit 45df63e

Browse files
authored
feat: implement cairo fixed array support (#1310)
1 parent 1dc3eee commit 45df63e

File tree

15 files changed

+2235
-25
lines changed

15 files changed

+2235
-25
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// Cairo 2.9.2
2+
3+
#[starknet::interface]
4+
trait ITestFixedArray<TContractState> {
5+
//fn test_u384(self:@TContractState)->u384;
6+
fn fixed_array(self: @TContractState, x: [core::integer::u32; 8]) -> [core::integer::u32; 8];
7+
}
8+
9+
#[starknet::contract]
10+
mod testfixed_array {
11+
12+
#[storage]
13+
struct Storage {
14+
}
15+
16+
#[abi(embed_v0)]
17+
impl TestFixed of super::ITestFixedArray<ContractState> {
18+
fn fixed_array(self: @ContractState, x: [core::integer::u32; 8]) -> [core::integer::u32; 8] {
19+
x
20+
}
21+
}
22+
}

0 commit comments

Comments
 (0)