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

Code changes #2

Merged
merged 14 commits into from
Aug 10, 2022
Merged

Code changes #2

merged 14 commits into from
Aug 10, 2022

Conversation

jasonpaulos
Copy link
Contributor

@jasonpaulos jasonpaulos commented Aug 8, 2022

Child PR to #1

This PR contains code changes not present in the original go-algorand code, but that I think make sense in this standalone repo. The commit log contains one commit per "category" of change.

The largest change is removing ParseArgJSONtoByteSlice, which is responsible for parsing method arguments from JSON and encoding them into app call byte arrays. In it's current form, I think this function is too specialized to be in avm-abi, and there are a lot of undocumented assumptions about the inputs and outputs. I've decided to delete the function from this repo and instead move it to the one place it's used, in go-algorand's cmd/goal/application.go.

Copy link
Contributor

@ahangsu ahangsu left a comment

Choose a reason for hiding this comment

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

making sense to me, we should probably import this package to go-algorand, and re-declare the function ParseArgJSONtoByteSlice in cmd package.

@jasonpaulos
Copy link
Contributor Author

Yes, I have a draft PR in go-algorand that does that algorand/go-algorand#4375

abi/doc.go Outdated Show resolved Hide resolved
Copy link
Contributor

@michaeldiamant michaeldiamant left a comment

Choose a reason for hiding this comment

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

@jasonpaulos Changes seem reasonable. Thanks for adding abi/doc.go! I'll aim to be more mindful of package-level docs.

jasonpaulos and others added 2 commits August 10, 2022 09:33
Co-authored-by: Michael Diamant <michaeldiamant@users.noreply.github.com>
@jasonpaulos jasonpaulos merged commit 4e3333e into add-code Aug 10, 2022
@jasonpaulos jasonpaulos deleted the code-changes branch August 10, 2022 16:36
jasonpaulos added a commit that referenced this pull request Aug 10, 2022
* Add initial code

* Downgrade testify to match go-algorand's version (#3)

* Use `avm_abi` package name

* Revert "Use `avm_abi` package name"

This reverts commit 10a0279.

* Rename directory to abi

* Add `golangci-lint` (#4)

* Add golangci-lint

* Checkout code first

* Lint tests

* Code changes (#2)

* Make all txn types into variables

* Remove ParseArgJSONtoByteSlice

* Use '%w' for errors

* Remove no longer relevent comment

* Test VerifyMethodSignature

* Add documentation

* Make readme match docs

* Update docs package

* Update abi/doc.go

Co-authored-by: Michael Diamant <michaeldiamant@users.noreply.github.com>

Co-authored-by: Michael Diamant <michaeldiamant@users.noreply.github.com>

Co-authored-by: Michael Diamant <michaeldiamant@users.noreply.github.com>
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.

3 participants