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

Add cw1155 and cw1155-metatdat-onchain #78

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

ALPAC-4
Copy link

@ALPAC-4 ALPAC-4 commented Aug 18, 2022

Cw1155 PR seems stop update. So I made new PR for adding cw1155

Most of the codes are based on cw-plus repository

What is Added?

  1. Can add token_uri and extension (metadata) when the first mint.
  2. Add balance query (all_balances) by token_id
  3. Add NumTokens query
  4. Add Minter query

What is Removed?

  1. Remove batch_mint

Copy link
Collaborator

@shanev shanev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it makes sense for cw1155 to live in this repo. Happy to take another look after it has been updated to the latest versions and modernized (i.e: uses query response types, cw_serde macro, etc.).

@giorgionocera
Copy link

Hi! I was rapidly looking at this contract to provide some support.
I'm sorry because I don't have much time right now to help with the code; I noticed something I think is wrong.
https://github.com/ALPAC-4/cw-nfts/blob/9e35f1ebacf0db34b2d9cad5c078c0d99cde6a24/contracts/cw1155-base/src/execute.rs#L119

Here, the token increment happens only if the token does not already exist.
So when you mint a token after the first mint, this quantity is not updated and the state is corrupted.
You can try to modify the tests to see the error, for example by minting the token at two different moments in time and then trying to access the balance.

What do you think?
I hope this could help.

@@ -0,0 +1,41 @@
use cosmwasm_std::{attr, Response, Uint128};
use cw_utils::Event;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you try removing the dependency on this Event trait? I think we should remove it from cw_utils (CosmWasm/cw-minus#17).

You probably can design this simpler without a trait but if you really need/want it, it's better to have it in here.

Thanks!

@apolloshab
Copy link

apolloshab commented May 6, 2024

development of cw1155 is being continued here: #162

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants