Skip to content

Conversation

mpoplavkov
Copy link
Contributor

close #1305

This PR doesn't exactly solve the issue, but adds a possibility to get the tx id from the built transaction. I didn't want to change the deploy method signature, cause it'll trigger changes in the whole project.

So, the proposed solution to get the tx id is:

let tx = contract.build_deploy_transaction(account, tx_policies).await?;
let tx_id = tx.id(provider.chain_id());
contract.deploy(account, tx_policies).await?;
println!("Deployed contract at tx: {}", tx_id.to_string());

However, I'm not sure if that's correct, cause in that flow the deploy transaction will be built twice (by calling build_deploy_transaction and then deploy), so potentially these two transactions might differ. Let me know what you think

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.

Return tx id when deploying a contract

1 participant