Skip to content

Error while decoding response with Opcode.FUNC #3

Description

@chinaryov

Hello!

Error while decoding bytes (response from canister):

Exception in thread "main" org.ic4j.candid.CandidError: Unsupported op_code -22 in type table
	at org.ic4j.candid.CandidError.create(CandidError.java:40)
	at org.ic4j.candid.TypeTable.fromBytes(TypeTable.java:108)
	at org.ic4j.candid.Deserializer.fromBytes(Deserializer.java:57)
	at org.ic4j.candid.IDLDeserialize.create(IDLDeserialize.java:32)
	at org.ic4j.candid.parser.IDLArgs.fromBytes(IDLArgs.java:50)

Calling canister ID - "ryjl3-tyaaa-aaaaa-aaaba-cai"
Method:

query_blocks (GetBlocksArgs = { start : BlockIndex; length : Nat64 });

Using parameters start = 0, length = 0;

Expecting response:

public type QueryBlocksResponse = {
    certificate : ?[Nat8];
    blocks : [Block];
    chain_length : Nat64;
    first_block_index : BlockIndex;
    archived_blocks : [
      { callback : QueryArchiveFn; start : BlockIndex; length : Nat64 }
    ];
  };

Best regards,
Alexander

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions