How to get the block by motoko?

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:

dfx canister --network=ic call ockk2-xaaaa-aaaai-aaaua-cai block '(1763668)'

Here is an example:


wonderful! Thank you~