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

Contract field is undefined after Blueprint is deployed #3125

Closed
gregzaitsev opened this issue Jan 29, 2021 · 7 comments
Closed

Contract field is undefined after Blueprint is deployed #3125

gregzaitsev opened this issue Jan 29, 2021 · 7 comments

Comments

@gregzaitsev
Copy link

This code from this tutorial used to work, but now result.contract is undefined:

    const unsub = await blueprint.tx
    .new(endowment, gasLimit, initValue)
    .signAndSend(alice, (result) => {
      if (result.status.isInBlock || result.status.isFinalized) {

        console.log("Contract deployed: ", result.contract); // <--- Prints undefined

        unsub();
        resolve(result);
      }
    });    
@jacogr
Copy link
Member

jacogr commented Jan 29, 2021

Ummmm.... there has been no changes, so indeed should still be the same.

The only place it should not be included s if it doesn't pickup the event. Will test against a recent Substrate master.

@gregzaitsev
Copy link
Author

I am using the API 3.6.4, but noticed that UI has newer API (3.6.5-6), and the UI contracts work.

@jacogr
Copy link
Member

jacogr commented Jan 29, 2021

There really has been no changes in that layer :) All the stuff in the current betas have mostly revolved around parachains.

Ys, the UI uses the same api-contracts interface, so it doesn't use anything else or take shortcuts. Will try both though.

@gregzaitsev
Copy link
Author

Turned out it was my fault, the deploying account did not have enough balance to pay for endowment.

But the documentation still refers to createContract, which is marked as deprecated. Would you like to leave this issue open to track this update?

@jacogr
Copy link
Member

jacogr commented Feb 1, 2021

Ok, have not been able to reproduce.

Yes, the docs need an update. Additionally to support this #3112 - the put code & deploy would become one (the API will detect old vs new) and handle appropriately. Obviously once the code is deployed, you can still new the contract as per normal. That will go into the betas this week.

@jacogr
Copy link
Member

jacogr commented Jun 4, 2021

Closing, replaced by polkadot-js/docs#172

@jacogr jacogr closed this as completed Jun 4, 2021
@polkadot-js-bot
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue if you think you have a related problem or query.

@polkadot-js polkadot-js locked as resolved and limited conversation to collaborators Jun 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants