Skip to content

Misleading error rent-payer field position #93

Description

@julianzamt

Is your enhancement request related to a problem? Please describe.
If the rent-payer attr is not directly after the attributes kw, the generator throws with:
Unmarshall error the cursor is out of bound

This is misleading, since there ir no reference at where the problem is originated.
Also, I couldn't find in Codigo docs any reference to the expected position of rent-payer, so I'm not sure if this is an enhancement or a bug.

CIDL:

- name: create_pet_custom_rent_payer
    solana:
      signers:
          - name: fee_payer
          - name: owner
    inputs:
      - name: pet
        type: Pet
        solana:
          attributes: [ init_if_needed ]
          seeds:
            owner: owner
          rent-payer: owner  -------------------------> This produces the error
      - name: neim
        type: string

Fix:

- name: create_pet_custom_rent_payer
    solana:
      signers:
          - name: fee_payer
          - name: owner
    inputs:
      - name: pet
        type: Pet
        solana:
          attributes: [ init_if_needed ]
          rent-payer: owner
          seeds:
            owner: owner
      - name: neim
        type: string

Describe the solution you'd like
To allow rent-payer in any position of an inputs solana` extension, or to provide a better error hint.

Metadata

Metadata

Labels

BugThis is an item that causes unwanted behaviorDoneThis has been merged to develop

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions