Skip to content

Explore adding a lookup function in the contract API #409

Open
@iduartgomez

Description

@iduartgomez

The change in the the API would be something similar to:

type Key = &[u8];

trait ContractInterface {
    fn lookup_data(
        key: Key
        state: State<'static>,
    ) -> Result<Vec<u8>, ContractError>;
}

We can make this work only locally (relatively straightforward) or also support it over the network (would add a bit more complexity to the node).

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-contract-sdkArea: contract SDKC-proposalCategory: A proposal seeking feedbackplannedThis has been synced to PT for triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions