Skip to content

await InBlock or Broadcast status when sending extrinsic #65

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

Closed
brenzi opened this issue Apr 15, 2020 · 9 comments
Closed

await InBlock or Broadcast status when sending extrinsic #65

brenzi opened this issue Apr 15, 2020 · 9 comments
Labels
F7-enhancement Enhances an already existing functionality

Comments

@brenzi
Copy link
Contributor

brenzi commented Apr 15, 2020

(for v2.0.0-alpha.5 and later)
The lifetime of an extrinsic goes like this:

send {"id":"3","jsonrpc":"2.0","method":"author_submitAndWatchExtrinsic","params":["0x2d0284d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d017693d988ff9b4d3577c0b9d2b9424e647fbec5875fef096644e311cb7499fd2a7cb99850c7e2806ffafecb3c63de17caa382340752077d6ca63e8995564f7d820068000400ce8f99245b836fa93f021c02c14a80d5029e2d43fb6265a0c610e5ac8d043e1b02286bee"]}
get {"jsonrpc":"2.0","result":232,"id":"3"}
get {"jsonrpc":"2.0","method":"author_extrinsicUpdate","params":{"result":"ready","subscription":232}}
get {"jsonrpc":"2.0","method":"author_extrinsicUpdate","params":{"result":{"broadcast":["QmfSF4VYWNqNf5KYHpDEdY8Rt1nPUgSkMweDkYzhSWirGY","Qmchhx9SRFeNvqjUK4ZVQ9jH4zhARFkutf9KhbbAmZWBLx","QmQJAqr98EF1X3YfjVKNwQUG9RryqX4Hv33RqGChbz3Ncg"]},"subscription":232}}
get {"jsonrpc":"2.0","method":"author_extrinsicUpdate","params":{"result":{"inBlock":"0x3104d362365ff5ddb61845e1de441b56c6722e94c1aee362f8aa8ba75bd7a3aa"},"subscription":232}}
get {"jsonrpc":"2.0","method":"author_extrinsicUpdate","params":{"result":{"finalized":"0x3104d362365ff5ddb61845e1de441b56c6722e94c1aee362f8aa8ba75bd7a3aa"},"subscription":232}}

currently, we only offer to submit and await ready or finalized.
It would make sense to support inBlock too and maybe broadcast

@brenzi brenzi added F7-enhancement Enhances an already existing functionality good first issue labels Apr 15, 2020
@gitcoinbot
Copy link

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


This issue now has a funding of 70.0 DAI (70.0 USD @ $1.0/DAI) attached to it as part of the web3foundation fund.

@gitcoinbot
Copy link

gitcoinbot commented Apr 30, 2020

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work has been started.

These users each claimed they can complete the work by 266 years, 6 months from now.
Please review their action plans below:

1) developerfred has been approved to start work.

would love to program this functionality
2) hoani has been approved to start work.

Very cool library - I have worked with the JS SDK quite a lot and the underlying substrate code base.

It looks like some work needs to be done on the extrinsics module and exposing the interface.

Learn more on the Gitcoin Issue Details page.

@brenzi
Copy link
Contributor Author

brenzi commented May 1, 2020

@developerfred and @hoani: For the next time: Please wait with working on our bounty issues until you have been approved. We don't want to frustrate people

@gitcoinbot
Copy link

gitcoinbot commented May 1, 2020

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work for 70.0 DAI (70.0 USD @ $1.0/DAI) has been submitted by:

  1. @developerfred
  2. @hoani

@Web3Foundation please take a look at the submitted work:


developerfred added a commit to developerfred/substrate-api-client that referenced this issue May 2, 2020
developerfred added a commit to developerfred/substrate-api-client that referenced this issue May 2, 2020
@Web3Foundation
Copy link

@hoani you've been approved to start working on this issue. Please continue with your PR for this one.

@brenzi
Copy link
Contributor Author

brenzi commented May 4, 2020

@hoani We've merged your work, thanks a lot for your contribution! @Web3Foundation please reward @hoani according to plan

@Web3Foundation
Copy link

This is paid out; the state from @gitcoinbot side didn't update though.

@gitcoinbot
Copy link

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


The funding of 70.0 DAI (70.0 USD @ $1.0/DAI) attached to this issue has been approved & issued to @hoani.

@Web3Foundation
Copy link

@hoani Thanks for all the work! We are looking at ways to improve our bounty program and would like to ask you to take part in a quick survey. It will just take a minute!

https://info.polkadot.network/bounty-completion-satisfaction-survey

Thank you!

@brenzi brenzi closed this as completed May 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F7-enhancement Enhances an already existing functionality
Projects
None yet
Development

No branches or pull requests

3 participants