Skip to content

Mint function does not strictly check Vault type #10

@Lucklyric

Description

@Lucklyric

Describe the bug
All mint-related functions expect a paymeValut which is in standard @FungibleToken.Vault inteface.

pub fun mintDappy(templateID: UInt32, paymentVault: @FungibleToken.Vault): @Dappy {

It should strictly define the Vault type e.g @FUSD.Valut otherwise anyone can deploy a FungibleToken and mint Dappies.

To Reproduce
Steps to reproduce the behaviour:

  1. Deploy a FakeUSD contract and mint to self
  2. Create Transaction and pass &FakeUSD.Vault resource as payment to mintDappy
  3. The current CrpytoDappy contract will still allow the minting

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions