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

Fix contract address retrieval for Zilliqa transactions. #2206

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

saeed-zil
Copy link
Contributor

No description provided.

Copy link
Contributor

github-actions bot commented Jan 21, 2025

🐰 Bencher Report

Branch2174-getcontractaddressfromtransactionid-returns-different-contract-address-in-protomainnet-and-mainnet
Testbedself-hosted
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
milliseconds (ms)
(Result Δ%)
Upper Boundary
milliseconds (ms)
(Limit %)
full-blocks-erc20-transfers/full-blocks-erc20-transfers📈 view plot
🚷 view threshold
1,073.70
(-20.45%)
1,834.40
(58.53%)
full-blocks-evm-transfers/full-blocks-evm-transfers📈 view plot
🚷 view threshold
435.57
(-25.57%)
751.04
(58.00%)
full-blocks-zil-transfers/full-blocks-zil-transfers📈 view plot
🚷 view threshold
4,115.90
(-1.51%)
5,401.85
(76.19%)
process-empty/process-empty📈 view plot
🚷 view threshold
7.82
(-11.85%)
10.48
(74.69%)
🐰 View full continuous benchmarking report in Bencher

Copy link
Contributor

@JamesHinshelwood JamesHinshelwood left a comment

Choose a reason for hiding this comment

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

Didn't @bzawisto fix this already?

@saeed-zil
Copy link
Contributor Author

Didn't @bzawisto fix this already?

I already asked @bzawisto before starting this ticket, and he said no. Maybe he can add more details.

…urns-different-contract-address-in-protomainnet-and-mainnet
@saeed-zil
Copy link
Contributor Author

@JamesHinshelwood The main branch returned the wrong address when I ran a node with persistence.

@bzawisto
Copy link
Contributor

It's a different API call hence PR and tickets are different but the root cause is the same. @JamesHinshelwood @saeed-zil

…urns-different-contract-address-in-protomainnet-and-mainnet
…urns-different-contract-address-in-protomainnet-and-mainnet
@saeed-zil saeed-zil enabled auto-merge January 27, 2025 13:53
…urns-different-contract-address-in-protomainnet-and-mainnet
…urns-different-contract-address-in-protomainnet-and-mainnet
…urns-different-contract-address-in-protomainnet-and-mainnet

let contract_address = receipt
.contract_address
.ok_or_else(|| anyhow!("ID is not a contract txn"))?;

let contract_address = match signed_transaction.tx {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add this as a method to TxZilliqa instead. @bzawisto made a similar change in #2190 and there might be more places we need this logic too. I don't think it makes sense to duplicate the logic everywhere.

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.

GetContractAddressFromTransactionID returns different contract address in protomainnet and mainnet
3 participants