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

cis2-dynamic-nft example contract #368

Merged
merged 14 commits into from
Jan 11, 2024

Conversation

bogacyigitbasi
Copy link
Contributor

Purpose

cis2-dynamic-nft smart contract is a derivative of cis2-multi that allows multiple metadata URLs in a vector for a token. A new metadata URL can be pushed to the vector, and the token can be upgraded. An upgrade means the metadata index is increased by one, and the function tokenMetadata returns only the last element in the vector, and the whole history of metadata URLs is visible with another function called tokenMetadataList. A real life (!) example of a dynamic NFT could be the evolution of a Pokemon or a game character. OR a service book history for a car.

Changes

_Describe the changes that were needed.

Checklist

  • My code follows the style of this project.
  • The code compiles without warnings.
  • I have performed a self-review of the changes.
  • I have documented my code, in particular the intent of the
    hard-to-understand areas.
  • (If necessary) I have updated the CHANGELOG.

CLA acceptance

_Remove if not applicable.

By submitting the contribution I accept the terms and conditions of the
Contributor License Agreement v1.0

examples/cis2-dynamic-nft/Cargo.toml Show resolved Hide resolved
examples/cis2-dynamic-nft/src/lib.rs Outdated Show resolved Hide resolved
examples/cis2-dynamic-nft/Cargo.toml Outdated Show resolved Hide resolved
examples/cis2-dynamic-nft/Cargo.toml Outdated Show resolved Hide resolved
examples/cis2-dynamic-nft/src/lib.rs Outdated Show resolved Hide resolved
examples/cis2-dynamic-nft/src/lib.rs Outdated Show resolved Hide resolved
examples/cis2-dynamic-nft/src/lib.rs Outdated Show resolved Hide resolved
examples/cis2-dynamic-nft/src/lib.rs Outdated Show resolved Hide resolved
examples/cis2-dynamic-nft/src/lib.rs Outdated Show resolved Hide resolved
examples/cis2-dynamic-nft/src/lib.rs Outdated Show resolved Hide resolved
.github/workflows/linter.yml Show resolved Hide resolved
examples/README.md Outdated Show resolved Hide resolved
examples/cis2-dynamic-nft/Cargo.toml Outdated Show resolved Hide resolved
examples/cis2-dynamic-nft/tests/tests.rs Outdated Show resolved Hide resolved
examples/cis2-dynamic-nft/Cargo.toml Outdated Show resolved Hide resolved
examples/cis2-dynamic-nft/src/lib.rs Outdated Show resolved Hide resolved
examples/cis2-dynamic-nft/src/lib.rs Outdated Show resolved Hide resolved
examples/cis2-dynamic-nft/src/lib.rs Outdated Show resolved Hide resolved
examples/cis2-dynamic-nft/src/lib.rs Outdated Show resolved Hide resolved
examples/cis2-dynamic-nft/src/lib.rs Outdated Show resolved Hide resolved
Copy link
Member

@DOBEN DOBEN left a comment

Choose a reason for hiding this comment

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

Looks good now. Let's try to resolve the last comments and get the CI pipeline to run.

There is a merge conflict in the Read.me file. Please resolve (e.g. rebase your PR on top of the most up-to-date main branch).

examples/cis2-dynamic-nft/src/lib.rs Outdated Show resolved Hide resolved
examples/cis2-dynamic-nft/src/lib.rs Show resolved Hide resolved
examples/cis2-dynamic-nft/src/lib.rs Show resolved Hide resolved
examples/cis2-dynamic-nft/src/lib.rs Show resolved Hide resolved
examples/cis2-dynamic-nft/src/lib.rs Outdated Show resolved Hide resolved
examples/cis2-dynamic-nft/src/lib.rs Show resolved Hide resolved
examples/cis2-dynamic-nft/src/lib.rs Show resolved Hide resolved
examples/cis2-dynamic-nft/src/lib.rs Show resolved Hide resolved
examples/cis2-dynamic-nft/src/lib.rs Outdated Show resolved Hide resolved
examples/cis2-dynamic-nft/tests/tests.rs Outdated Show resolved Hide resolved
Copy link
Member

@DOBEN DOBEN left a comment

Choose a reason for hiding this comment

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

A few minor comments and we need to get the CI pipeline to run (fix some clippy warnings). We are not far away from having this PR ready.

examples/cis2-dynamic-nft/src/lib.rs Outdated Show resolved Hide resolved
examples/cis2-dynamic-nft/src/lib.rs Outdated Show resolved Hide resolved
examples/cis2-dynamic-nft/src/lib.rs Outdated Show resolved Hide resolved
examples/cis2-dynamic-nft/src/lib.rs Outdated Show resolved Hide resolved
examples/cis2-dynamic-nft/src/lib.rs Outdated Show resolved Hide resolved
examples/cis2-dynamic-nft/src/lib.rs Outdated Show resolved Hide resolved
examples/cis2-dynamic-nft/src/lib.rs Outdated Show resolved Hide resolved
examples/cis2-dynamic-nft/src/lib.rs Outdated Show resolved Hide resolved
examples/cis2-dynamic-nft/src/lib.rs Outdated Show resolved Hide resolved
examples/cis2-dynamic-nft/src/lib.rs Outdated Show resolved Hide resolved
@DOBEN DOBEN merged commit 667bead into Concordium:main Jan 11, 2024
132 checks passed
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.

3 participants