Skip to content
This repository was archived by the owner on Aug 17, 2026. It is now read-only.
This repository was archived by the owner on Aug 17, 2026. It is now read-only.

Handle fixed arrays in memory #253

Description

@clearloop

Describe the feature

for example as the parameters of internal functions, we need to at least pass the test below

#[zink::call]
fn method_with_fix_array_as_parameter(addresses: [Address; 3]) {
   if addresses[0].ne(Address::from(0)) {
       revert!("The first address is not matched")
   }

   if addresses[1].ne(Address::from(1)) {
       revert!("The second address is not matched");
   }

   if addresses[2].ne(Address::from(2)) {
      revert!("The third address is not matched");
   }
}

Solution

do not need to store the length of fixed array since it has been declared in function signatures

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions