Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename encoded_string to demarcate internal usage #466

Merged
merged 1 commit into from
Jul 22, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pyteal/ast/abi/string.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from pyteal.errors import TealInputError


def encoded_string(s: Expr):
def _encoded_string(s: Expr):
return Concat(Suffix(Itob(Len(s)), Int(6)), s)


Expand Down Expand Up @@ -102,9 +102,9 @@ def set(
f"Got {value} with type spec {value.type_spec()}, expected {StringTypeSpec}"
)
case str() | bytes():
return self.stored_value.store(encoded_string(Bytes(value)))
return self.stored_value.store(_encoded_string(Bytes(value)))
case Expr():
return self.stored_value.store(encoded_string(value))
return self.stored_value.store(_encoded_string(value))
case CollectionSequence():
return super().set(cast(Sequence[Byte], value))

Expand Down