Skip to content

Convert ErgoTree Scans to Coll[Byte]  #83

@sethdusek

Description

@sethdusek

See: ergoplatform/ergo#1781 (comment)

Currently scans for contract address fail, because ergo node expects serialized Coll[Byte] in scans it seems. The easiest way to convert ErgoTree to this format would be something like:

fn ergo_tree_to_scan_bytes(tree: &ErgoTree) -> String {
   base16::encode_lower(Constant::from(tree.sigma_serialize_bytes().unwrap()).sigma_serialize_bytes())
}

edit: I have a fix in my updatecontract branch, and I can confirm that the scans now work. Before ergo node was also throwing an exception in one of the scans.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions