Skip to content

Code changes#2

Merged
jasonpaulos merged 14 commits into
add-codefrom
code-changes
Aug 10, 2022
Merged

Code changes#2
jasonpaulos merged 14 commits into
add-codefrom
code-changes

Conversation

@jasonpaulos
Copy link
Copy Markdown
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.

@jasonpaulos jasonpaulos requested a review from ahangsu August 8, 2022 22:54
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

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

Comment thread abi/doc.go Outdated
Copy link
Copy Markdown
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