Skip to content
This repository was archived by the owner on Aug 16, 2021. It is now read-only.
This repository was archived by the owner on Aug 16, 2021. It is now read-only.

Inconsistent formatting of Address return values #4228

@mwherman2000

Description

@mwherman2000

Here's two methods (actually one method and one property getter):

    public Address SenderAddress
    {
        get
        {
            return Message.Sender;
        }
    }

    public Address GetSenderAddress()
    {
        return Message.Sender;
    }

The first one (the property getter) works like I hope it would with a "properly" formatted Address value ("return" value):

{
  "internalTransfers": [],
  "gasConsumed": {
    "value": 10014
  },
  "revert": false,
  "errorMessage": null,
  "return": "CUtNvY1Jxpn4V4RD1tgphsUKpQdo4q5i54",
  "logs": []
}

The second one (an actual method) returns a hex string (the "returnValue" value):

{
    "transactionHash": "e2c161a08830f9ad2ce9fde6d5f14330e26040ed584ce2c39f47be0cbee5610e",
    "blockHash": "c895f54b774e901ae03d9f2a037b8934260bd0cee8e410dca60dc31cc1cfc1d4",
    "postState": "19aed953ff6f0200e21058c31ff10c30fea5d0cdf348a6d6ca32b6ddbb61c277",
    "gasUsed": 10014,
    "from": "CUtNvY1Jxpn4V4RD1tgphsUKpQdo4q5i54",
    "to": "CTE3W1QUpUKZUnaKa3ChcNKaGfbQaxUBDE",
    "newContractAddress": null,
    "success": true,
    "returnValue": "88432921B2B07617A42342597558CFA0BA429963",
    "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "error": null,
    "logs": []
}

Questions

  1. Why are these different?
  2. Is it a bug?
  3. In the calling app, how I can I convert the bye[] representation of the hexstring ("88432921B2B07617A42342597558CFA0BA429963") into something that looks like an Address ("CUtNvY1Jxpn4V4RD1tgphsUKpQdo4q5i54")?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions