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

Missing contractAddress in Contract.Deploy() due to absent contract address in transaction response #122

Open
PurrProof opened this issue Oct 11, 2024 · 1 comment · May be fixed by #123

Comments

@PurrProof
Copy link

PurrProof commented Oct 11, 2024

Missing ContractAddress in GoZilliqa SDK due to Missing Contract Address in Transaction Response

In the GoZilliqa SDK library, at the following code:

result := rsp.Result.(map[string]interface{})
hash := result["TranID"].(string)
contractAddress := result["ContractAddress"].(string)

tx.ID = hash
tx.ContractAddress = contractAddress
return tx, nil

The contractAddress field is expected to be present in the transaction response. However, it is never included because of the underlying issue described in Zilliqa's ZQ2 repository, where the transaction response never contains the contract address.

Possible Solutions:

  1. Wait for the issue in ZQ2 to be fixed (if it is not a design decision).
  2. If it is intentional, we can use the GetContractAddressFromTransactionID API call to fetch the contract address after receiving the transaction response.
@PurrProof
Copy link
Author

@rrw-zilliqa, could you please check this?
If everything is ok on the ZQ2 side, I could submit fix PR for Gozilliqa.

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 a pull request may close this issue.

1 participant