question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Describe the bug I use the full node RPC,like get_additions_and_removals,get_blocks,get_coin_records_by_puzzle_hash. It’s return like

"coin_records":[
{
"coin":{
"amount":250000000000,
"parent_coin_info":"0x3ff07eb358e8255a65c30a2dce0e5fbb00000000000000000000000000013927",
"puzzle_hash":"0x86ace7d6d38c3d1949c28eefc54e093bdc0249a7a07057f1374e134e7485e883"
},
"coinbase":true,
"confirmed_block_index":80169,
"spent":false,
"spent_block_index":0,
"timestamp":1617554786
},

But i can’t find any param about the coin hash and the address,Which interface method should I use to query the coin hash and address?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
kimskcommented, Nov 29, 2022

@uranik777 Try this code below instead:

from chia.types.blockchain_format.sized_bytes import bytes32
from chia.util.hash import std_hash
from clvm.casts import int_to_bytes

parent_coin = bytes32.from_hexstr('0x8b6b9557d83b9697abfdfc44963d6a6beb65f942530fb50d8da51fee449cec5e')
puzzle_hash = bytes32.from_hexstr('0x670e02175a4bf98033840e92e2c0a963ee2d6275f54804db797730b97273cf8d')
amount = int_to_bytes(3_293_826_240_000)

std_hash(
    parent_coin +
    puzzle_hash +
    amount
).hex()
1reaction
aqkcommented, Apr 27, 2021

Thank you for your bug report. You have run into a last minute change!

We changed the definition of coins from (amount, coin_id, puzzlehash) to (amount, parent_coin_id, puzzlehash)

To get information on how to get a coin’s parent_id, and how to set the address for a transaction,

Please install https://keybase.io/download And then come to keybase://chat/chia_network.public#dev for more discussion on RPC use and other development.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Two Simple Fixes for Revit Drag & Drop Issues (Recently ...
RPC Family.rft must be present inside this folder or Drag & Drop cannot be performed. The problem occurs when non-default install locations are...
Read more >
Players kicked with RPC error in CLProject - Event Manager
I'm trying to get an arena working. After the event if anyone fires a weapon in or near the area zone they are...
Read more >
PS Bug RPC Server / WMI
When I do this, I get a strange "RPC Server not available" error message: $klasse = 'Win32_Service' $methode = 'StopService' $class = [wmiclass]$klasse...
Read more >
ClientRpc is not being called on OnStartClient - Unity Answers
I'm using my Custom LobbyManager and I spawn my GameManager in it and when GameManager is spawned I call Rpc on startup but...
Read more >
thingsboard BUG rpc-reply-tutorial,,"status":503,"error":"
云腾物联网社区,是专业的物联网技术交流社区,致力于推进物联网行业的发展。提供专业的物联网技术、通信、硬件以及解决方案等交流平台。
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found