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

GetContractAddressFromTransactionID returns different contract address in protomainnet and mainnet #2174

Open
chetan-zilliqa opened this issue Jan 20, 2025 · 3 comments · May be fixed by #2206
Assignees
Labels
Agate Required for mainnet launch

Comments

@chetan-zilliqa
Copy link
Contributor

chetan-zilliqa commented Jan 20, 2025

Mainnet:

curl --request POST \
  --url https://api.zilliqa.com/ \
  --header 'Content-Type: application/json' \
  --data '{
    "id": "1",
    "jsonrpc": "2.0",
    "method": "GetContractAddressFromTransactionID",
    "params": ["08bc0d50fe5aedf0d6b8a172424857281404abf4eaff259b67252e2c091d27ec"]
}'

response:

{
	"id": "1",
	"jsonrpc": "2.0",
	"result": "40d2225d5a8c99fda217c95c09cd0d9ac11c3499"
}

ProtoMainnet:

curl --request POST \
  --url https://api.zq2-protomainnet.zilliqa.com/ \
  --header 'Content-Type: application/json' \
  --data '{
    "id": "1",
    "jsonrpc": "2.0",
    "method": "GetContractAddressFromTransactionID",
    "params": ["08bc0d50fe5aedf0d6b8a172424857281404abf4eaff259b67252e2c091d27ec"]
}'

response:

{
	"jsonrpc": "2.0",
	"id": "1",
	"result": "cecbcfdcf83aa8b02fbc6aa0fe29572ffdf3be61"
}
@chetan-zilliqa chetan-zilliqa added the Agate Required for mainnet launch label Jan 20, 2025
@chetan-zilliqa
Copy link
Contributor Author

chetan-zilliqa commented Jan 20, 2025

I identified an issue while using Devex, where it displays an unusual contract creation address.
Here’s an example:
Devex Link

The reason Devex shows undefined under "Contract Creation" is that it identifies a different address than what it expects, leading to the inconsistency.

@chetan-zilliqa
Copy link
Contributor Author

cc @DrZoltanFazekas

@saeed-zil
Copy link
Contributor

Thanks to @chetan-zilliqa, I deployed and tested my #2206 branch on GCP and it looks good:

saeed_zilliqa_com@zq2-converter ~/persistence> curl --request POST \
                                                     --url http://localhost:4201/ \
                                                     --header 'Content-Type: application/json' \
                                                     --data '{
                                                   "id": "1",
                                                   "jsonrpc": "2.0",
                                                   "method": "GetContractAddressFromTransactionID",
                                                   "params": ["08bc0d50fe5aedf0d6b8a172424857281404abf4eaff259b67252e2c091d27ec"]
                                               }'
{"jsonrpc":"2.0","id":"1","result":"40d2225d5a8c99fda217c95c09cd0d9ac11c3499"}⏎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Agate Required for mainnet launch
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants