sway
sway copied to clipboard
More than 64 characters in str array in `configurable` block crashes the compiler
If you have a str array in a configurable block with more than 64 characters, the compiler will crash with internal error: entered unreachable code: non encoded configurable inside encoding v1. This is used in the SRC-11 Information Security Standard
Minimal Repo:
contract;
configurable {
MY_CONFIG: str[65] = __to_str_array("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"),
}
abi MyContract {
fn test_function() -> bool;
}
impl MyContract for Contract {
fn test_function() -> bool {
true
}
}
I will look into this.
I will look into this.
It looks like it's hardcoded to 64 here. This will be a problem as the SRC-11 example uses 741 characters.
Using forc v0.59.0 the compiler no longer crashes but outputs these errors instead