I found the method “block_pb” in the ledger canister to get block info. But when I call it in command, it is failed. Like this: dfx canister --network=ic call ryjl3-tyaaa-aaaaa-aaaba-cai block_pb '(1763668)'
. So whitch is the best way to get block in motoko?
There’s a proxy canister here that you can call, it forwards on the data from the protobuf endpoint:
https://k7gat-daaaa-aaaae-qaahq-cai.ic0.app/listing/ledger-candid-10278/ockk2-xaaaa-aaaai-aaaua-cai
Eg
dfx canister --network=ic call ockk2-xaaaa-aaaai-aaaua-cai block '(1763668)'
Here is an example:
2 Likes
wonderful! Thank you~