argotorg / argotorg/fe

Dynamically sized bytes type.

Open
#280 7 comments 0 reactions 0 assignees View on GitHub
comp: analyzer comp: compiler
Dominant language
Rust
Stars
1.7k
Forks
218
Avg merge
1d 7h
Merged PRs (30d)
6

Description

### What is wrong?

Dynamically sized byte arrays are commonly used and can be found in the public interfaces of many contracts. For example, it's used [here](https://github.com/Uniswap/uniswap-v2-core/blob/4dd59067c76dea4a0e8e4bfdda41877a6b16dedc/contracts/UniswapV2Pair.sol#L159) in the Uniswap core contracts. Since it's so common, we need to deal with it somehow.

See #258 for discussion about the future of bytes in Fe. For now tho, we may just want to add a type similar to `stringN` for practical reasons. We can always remove it at a future date.

### How can it be fixed

The easiest way to support bytes would be to do what we currently do with strings. That is, set a limit on the size of the string, but keep it dynamic otherwise.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading the discussion in #258 and examining the existing stringN support referenced in the issue. Define a bounded, dynamically sized bytes type for public contract interfaces, and verify that the resulting type behaves consistently with the current string approach.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
blockchain, compilers
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.