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

ehancement(Bytes32): apply left hand padding in UnmarshalJSON #867

Closed
wants to merge 2 commits into from

Conversation

darrenvechain
Copy link
Member

Description

Applies left hand padding when parsing thor.Bytes32

Copies ethereum form a client perspective, because now clients can call with actual values:

curl --request POST \
  --url https://mainnet.vechain.org/logs/event \
  --header 'Accept: application/json, text/plain' \
  --header 'Content-Type: application/json' \
  --data '{
  "range": {
    "unit": "block",
    "from": 17240365,
    "to": 17289864
  },
  "options": {
    "offset": 0,
    "limit": 100
  },
  "criteriaSet": [
    {
      "address": "0x0000000000000000000000000000456E65726779",
      "topic0": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
      "topic1": "0x6d95e6dca01d109882fe1726a2fb9865fa41e7aa"
    }
  ],
  "order": "asc"
}'

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • bytes32_test.go

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • New and existing E2E tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have not added any vulnerable dependencies to my code

@darrenvechain darrenvechain requested a review from a team as a code owner October 25, 2024 09:47
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.

1 participant