Skip to content

Improve implementations, code style, and tests#33

Merged
austinkline merged 4 commits intogreen-goo-dao:mainfrom
turbolent:improvements
Nov 3, 2024
Merged

Improve implementations, code style, and tests#33
austinkline merged 4 commits intogreen-goo-dao:mainfrom
turbolent:improvements

Conversation

@turbolent
Copy link
Copy Markdown
Contributor

  • Use the latest version of the Flow CLI, the Cadence 1.0 preview release is outdated
  • Make the code more consistent, by fixing whitespace, improving argument labels, removing unnecessary type annotations, etc.
  • Replace implementations with functions (e.g. String.contains) and functionality (e.g. InclusiveRange) built into Cadence now. In some cases this makes the code much more efficient, e.g. InclusiveRange does not allocate a whole array of indices like before
  • Extend the test cases

Comment thread contracts/ArrayUtils.cdc Outdated
Comment thread contracts/ArrayUtils.cdc Outdated
@turbolent turbolent requested a review from bluesign October 25, 2024 17:03
Comment thread contracts/AddressUtils.cdc
@turbolent turbolent requested a review from bjartek October 30, 2024 16:04
@turbolent
Copy link
Copy Markdown
Contributor Author

@bjartek @austinkline Would be great to get this merged, so we can update the Cadence Source Compatibility Suite, which currently uses a fork with these changes: https://github.com/onflow/cadence/blob/master/compat/suite/green-goo-dao-flow-utils.yaml

Copy link
Copy Markdown
Contributor

@austinkline austinkline left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, @bjartek any objections?

@bjartek
Copy link
Copy Markdown
Contributor

bjartek commented Nov 3, 2024

No

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants