Zilliqa / zq2

Zilliqa 2.0 code base
Apache License 2.0
9 stars 0 forks source link

Mixed Case in `ContractAddress` field of `CreateTx` response: Bug or Feature? #1849

Open PurrProof opened 4 days ago

PurrProof commented 4 days ago

Issue: Mixed Case in ContractAddress in Response

The ContractAddress field in the JSON-RPC response of a CreateTx appears in mixed case:

{
    "id": 0,
    "jsonrpc": "2.0",
    "result": {
        "ContractAddress": "7ACb6a641Ad9b3BB9dC947aa019d9B44b4aD572c",
        "Info": "Txn processed",
        "TranID": "42d0ddae6ce111353638c12ae2359c84d19e9e59cca751cf5d6d74e0e6bd18d5"
    }
}

Description

In previous versions (ZQ1), the ContractAddress field seems(!) to have been consistently lowercase. In ZQ2, the ContractAddress now appears in mixed case.

Could you clarify:

  1. Is this change intentional (feature) or a bug?
  2. Which case should be awaited/standardized for ContractAddress?

This change could potentially affect integrations that rely on specific casing conventions.

PurrProof commented 3 days ago

Same question for the event_logs[i].address of a Transaction Receipt. Now it's in the mixed case.

"event_logs": [
  {
      "_eventname": "DelegateStake",
      "address": "0x0052321384ff976C323eF1f3f3A1BEeE3a725920",
         "params": [

Seems it was strictly lowercase in ZQ1.

PurrProof commented 1 day ago

Same for transitions[i].addr, transitions[i].msg._recipient of a Transaction Receipt:

 {
      "accept": false,
      "addr": "0x113c4DA41B6CF43B8701f1497F5f307326c728A8",
      "depth": 4,
      "msg": {
           "_amount": "0",
           "_recipient": "0x86D430583F1Dfd8f4948a131c37d4De3ed75F63e",
           "_tag": "DelegateStake",
           "params": [
                {
                     "vname": "amount",
                     "type": "Uint128",
                     "value": "100000000000000"
                }
           ]
      }
 }
DrZoltanFazekas commented 12 hours ago

It's a feature, was introduced in this EIP long time ago: https://eips.ethereum.org/EIPS/eip-55