Refactored Address to not be a partial class of Protobuf Address class #23
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.
Address
was the only Protobuf class from the SDK that was supposed to be used by end-users. Generally, this should not happen - Protobuf stuff is too low-level, and there's a reason why Protobuf classes aresealed
- they are not supposed to be extended in any way. It was also quite annoying to see Protobuf-related methods in autocomplete when working with addresses.This PR basically adds a nicer
Address
struct and hides all Protobuf stuff away from end users' eyes.Noteworthy:
Address
directly when encoding/decoding EVM data with Nethereum, instead of using plain strings. It is currently quite annoying to juggle betweenAddress
and purestring
representations of the same thing. This will make the usage patterns more uniform.Address
instances can now be compared using==
and!=
operators for convenience.struct
.Debug.Log(address);
now actually logs the address string