Skip to content

Question about the rgbasm of ifa_lib_inflation() #1

Description

@cymqqqq

Description:
The part validation of inflation is as follows:
// Check that input inflation rights equals issued supply + allowed inflation put a8[0],ERRNO_INFLATION_EXCEEDS_ALLOWANCE; add.uc a64[1],a64[0]; // result is stored in a64[0] test; // fails in case of an overflow sps OS_INFLATION; // check sum of inflation rights in input equals a64[0] test;
Here we can see that the sps instruction is used in the above code, but there is a load_revealed_inputs function defined here:

Image And, `context.op_info.prev_state`, the prev_state is extracted from the consignment: Image

But the utxo-bind rgb asset transfer history is defined in the consignment, so I think maybe we should use the sas instruction to validate(because the owned_state is used here, but not prev_state) instead of sps. When we perform the inflate action, we directly use a new utxo with a fixed amount of rgb asset to execute the inflate operation.

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