Skip to content

Update to 0.2.0#20

Merged
Starsakary merged 13 commits into
tronprotocol:developfrom
Cletitia:develop
Aug 5, 2021
Merged

Update to 0.2.0#20
Starsakary merged 13 commits into
tronprotocol:developfrom
Cletitia:develop

Conversation

@Cletitia
Copy link
Copy Markdown
Contributor

@Cletitia Cletitia commented Aug 5, 2021

  1. Feat(core): Add a class SignatureValidator which verifies signatures

  2. Feat(core): Add a static function which accepts private key and transaction hash to calculate signature.

  3. Update(proto): Add a field of used_energy in TransactionExtention to be compatible with java-tron 4.3.0

  4. Refactor(core): Make small refactors according to the new features.

Copy link
Copy Markdown

@Benson0224 Benson0224 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Contributor

@Starsakary Starsakary left a comment

Choose a reason for hiding this comment

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

LGTM

@Starsakary Starsakary merged commit f9b359b into tronprotocol:develop Aug 5, 2021
0xbigapple added a commit to 0xbigapple/trident that referenced this pull request May 14, 2026
  - Utils.getStructType: @parameterized on StaticArrayN struct fields now
    correctly emits "foo[N]" instead of collapsing to "foo[]". Throws
    RuntimeException on ClassNotFoundException instead of silent fallback;
    extractStaticArraySize now takes Class<?> and validates that the class
    is a generated StaticArrayN subclass (rejects raw StaticArray.class
    with a guidance message).

  - Utils.getParameterizedTypeName: build canonical ABI names for nested
    arrays via the new getArrayElementTypeName helper, which recurses on
    TypeReference rather than collapsing the inner type to a Class. The
    old path produced non-canonical strings like "staticarray2[]".

  - DefaultFunctionReturnDecoder.getDataOffset: include DynamicStruct in
    the dynamic-offset detection. The hand-rolled OR-chain was missing
    it, causing DynamicStruct return values to be decoded from the wrong
    offset.

  - DynamicArray.getTypeAsString: throw when an empty array's component
    type is the generic DynamicStruct/StaticStruct base or a raw Array
    subclass — Java type erasure cannot recover the inner element type
    in those cases. Concrete StructType subclasses still resolve through
    Utils.getStructType.

  - Utf8String.bytes32PaddedLength: guard against null value, matching
    the null-tolerance already in equals()/hashCode().

  - Array: remove the unused getNativeValueCopy() method. It was dead
    code in this PR (zero callers) and only unwrapped one level, so
    nested arrays/structs still contained ABI Type objects rather than
    native values.

  - UtilsTest: positive/negative cases for issue tronprotocol#20, DynamicArray
    regression guard, and canonical nested array type names
    (uint256[2][], uint256[2][2]).
  - EventEncoderTest: nested static array method signature.
  - DynamicArrayTest: empty concrete struct array (allowed),
    empty raw Array subclass (throws), empty generic struct array
    (throws).
  - Utf8StringTest: bytes32PaddedLength with null value.
  - CustomErrorTest: assert parameter count before per-element
    comparison; the previous loop could pass silently if getParameters()
    returned fewer elements than expected.
  - TridentAbiEncodeDecodeCompatibilityTest.isSignedIntOutOfRange:
    treat bare `int` as ABI alias for int256.
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