-
Notifications
You must be signed in to change notification settings - Fork 20.4k
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
ABI explicit difference between Unpack and UnpackIntoInterface #21091
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
199bfba
accounts/abi: refactored abi.Unpack
MariusVanDerWijden 9b90470
accounts/abi/bind: fixed error
MariusVanDerWijden 8946e6e
accounts/abi/bind: modified template
MariusVanDerWijden 5006a51
accounts/abi/bind: added ToStruct for conversion
MariusVanDerWijden c2e7250
accounts/abi: reenabled tests
MariusVanDerWijden a2e0db2
accounts/abi: fixed tests
MariusVanDerWijden e87a6be
accounts/abi: fixed tests for packing/unpacking
MariusVanDerWijden f3e714c
accounts/abi: fixed tests
MariusVanDerWijden 7e08e31
accounts/abi: added more logic to ToStruct
MariusVanDerWijden d2e5302
accounts/abi/bind: fixed template
MariusVanDerWijden e442a50
accounts/abi/bind: fixed ToStruct conversion
MariusVanDerWijden 36439b9
accounts/abi/: removed unused code
MariusVanDerWijden 5bbdaba
accounts/abi: updated template
MariusVanDerWijden 9dd8e6d
accounts/abi: refactored unused code
MariusVanDerWijden e95dfd7
contracts/checkpointoracle: updated contracts to sol ^0.6.0
MariusVanDerWijden 644bc14
accounts/abi: refactored reflection logic
MariusVanDerWijden f74d73c
accounts/abi: less code duplication in Unpack*
MariusVanDerWijden 368a952
accounts/abi: fixed rebasing bug
MariusVanDerWijden 56328d7
fix a few typos in comments
gballet 6d1d680
rebase on master
MariusVanDerWijden File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1696,11 +1696,11 @@ func TestGolangBindings(t *testing.T) { | |
t.Skip("go sdk not found for testing") | ||
} | ||
// Create a temporary workspace for the test suite | ||
ws, err := ioutil.TempDir("", "") | ||
ws, err := ioutil.TempDir("", "binding-test") | ||
if err != nil { | ||
t.Fatalf("failed to create temporary workspace: %v", err) | ||
} | ||
defer os.RemoveAll(ws) | ||
//defer os.RemoveAll(ws) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove after work is done |
||
|
||
pkg := filepath.Join(ws, "bindtest") | ||
if err = os.MkdirAll(pkg, 0700); err != nil { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that doesn't seem necessary since you have another check for
len(results) == 0
before results is used for the first time.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately not, as I have to dereference result in the length check.
len(*results) == 0
, If results is nil the dereference panics. It is valid for the user to pass in a valid slice pointer with length 0 which we will fill with our result. If he's lazy, he might pass nil which means he doesn't need the result.