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

Adds Go package to get contracts, transactions, and scripts #163

Merged
merged 16 commits into from
Feb 12, 2025

Conversation

joshuahannan
Copy link
Member

@joshuahannan joshuahannan commented Jan 30, 2025

Closes: #18

Description

Adds additional code to the go package to be able to return contracts and transactions.
I would like to use embed instead of go-bindata because that seems to be easier to maintain and use.

Still working on adding and testing the rest of the transactions and scripts

The bridge standup code in main.go is commented out for now to allow for testing.


For contributor use:

  • Targeted PR against main branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the standards mentioned here.
  • Updated relevant documentation
  • Re-reviewed Files changed in the Github PR explorer
  • Added appropriate labels

@codecov-commenter
Copy link

codecov-commenter commented Jan 30, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.35%. Comparing base (02aab3f) to head (faae363).
Report is 219 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #163      +/-   ##
==========================================
+ Coverage   86.19%   87.35%   +1.15%     
==========================================
  Files          18       18              
  Lines         884     1020     +136     
==========================================
+ Hits          762      891     +129     
- Misses        122      129       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@joshuahannan joshuahannan changed the title Adds Go package to get contracts and transactions Adds Go package to get contracts, transactions, and scripts Feb 4, 2025
@joshuahannan joshuahannan marked this pull request as ready for review February 4, 2025 21:20
@joshuahannan joshuahannan requested a review from a team as a code owner February 4, 2025 21:20
@joshuahannan
Copy link
Member Author

@sisyphusSmiling Do you have an idea about why the CI test is failing? I don't think I made any changes to that test and it is passing locally.

Also, I updated to the latest version of flow CLI, and it is now generating a lcov.info. I assume that is just another coverage related thing, so I just added it to .gitignore.

@sisyphusSmiling
Copy link
Contributor

sisyphusSmiling commented Feb 10, 2025

@joshuahannan looks like the last successful tests passed in a prior version of Flow CLI - v2.2.3 vs v2.2.4. I'll pull down this branch and replicate locally

@sisyphusSmiling
Copy link
Contributor

sisyphusSmiling commented Feb 10, 2025

Pushed a fix. @joshuahannan I'm not sure what happened here. The failing test case expected the foo trait serialized as nil, but the trait has always had a value of bar and so should always have been serializable. Odd that CI didn't fail until the recent changes which had nothing to do with the failing files. I wonder if there were changes in the way AnyStruct is serialized in Cadence that were included in the latest CLI release? Looks like Cadence v1.3.0 included onflow/cadence#3594 which implemented FLIP 293 - this very well could have affected serialization patterns.

I updated the test case to expect the serialized value in 8eceb59

@sisyphusSmiling sisyphusSmiling merged commit 1f35931 into main Feb 12, 2025
2 checks passed
@sisyphusSmiling sisyphusSmiling deleted the add-go-pkg branch February 12, 2025 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Create go package
3 participants