Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misleading error rent-payer field position #93

Open
julianzamt opened this issue Oct 24, 2023 · 0 comments
Open

Misleading error rent-payer field position #93

julianzamt opened this issue Oct 24, 2023 · 0 comments
Assignees
Labels
Bug This is an item that causes unwanted behavior Done This has been merged to develop

Comments

@julianzamt
Copy link

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.

@julianzamt julianzamt added Enhancement This improve the product or Código's source code Triage This item needs to be prioritize labels Oct 24, 2023
@JazielGuerrero JazielGuerrero added Bug This is an item that causes unwanted behavior Todo This item hasn't been started and removed Triage This item needs to be prioritize Enhancement This improve the product or Código's source code labels Dec 4, 2023
@JazielGuerrero JazielGuerrero removed their assignment Dec 4, 2023
@JazielGuerrero JazielGuerrero added In progress This is actively being worked on and removed Todo This item hasn't been started labels Jan 9, 2024
@JazielGuerrero JazielGuerrero self-assigned this Jan 9, 2024
@JazielGuerrero JazielGuerrero added Done This has been merged to develop and removed In progress This is actively being worked on labels Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This is an item that causes unwanted behavior Done This has been merged to develop
Projects
None yet
Development

No branches or pull requests

2 participants