kadena-io / marmalade

Decentralized Infrastructure for Poly-Fungibles and NFTs
24 stars 16 forks source link

[Bug]: #78

Closed daplcor closed 1 year ago

daplcor commented 1 year ago

Expected Behavior

I should be able to pass my mint guard to the non-fungible-policy-v1 and mint NFT's

Current Behavior

When I try to mint a token, it's trying to find the defconst guard for minting which does not pass proper information.

Possible Solution

Revert the change and ensure the guard is accessible when minting tokens from ledger. I can provide working code snips from the non-fungible policy that works if you need.

Steps to Reproduce

create marmalade token in collection policy as usual. Then pass account, guard, and other references to marmalade.ledger.mint. Then non-fungible-policy-v1.enforce-init fails to read guard as it's expecting the defconst

Relevant log output

concrete-policies/non-fungible-policy/non-fungible-policy-v1.pact:38:29: No such key in message: nfp-mint-guard.
jermaine150 commented 1 year ago

Are you providing the key nfp-mint-guard in your transaction? That key was renamed and It seems like that's missing right now. I just created and minted a token with collection and non-fungible policy enabled

ggobugi27 commented 1 year ago

We did require policy-specific mint-guards. nfp-mint-guard for non-fungible-policy, but we realized that it's better to have one place to register the mint guard and check at mint, which is the change described here:

https://github.com/kadena-io/marmalade/pull/79