-
Notifications
You must be signed in to change notification settings - Fork 95
feat: kindfi nft open zeppelin #769
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
Conversation
- Add Cargo.toml for nft-kindfi contract with OpenZeppelin dependencies - Add types.rs with NFTMetadata struct and StorageKey enum - Add errors.rs with custom error definitions - Add events.rs with metadata update events
- Add lib.rs with main contract implementing NonFungibleToken, AccessControl, and custom metadata functions - Add metadata.rs for on-chain metadata storage and retrieval - Add mint.rs for sequential token ID minting with metadata - Add burn.rs for token burning functionality - Implement role-based access control (minter, burner, metadata_manager) - Add OpenZeppelin Stellar Contracts integration
- Comment out non-existent contract members to allow compilation - Add nft-kindfi to implemented contracts - Reorganize workspace members with clear sections
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
WalkthroughAdds a new KindFi NFT Soroban contract crate ( Changes
Sequence Diagram(s)sequenceDiagram
participant Caller as Caller
participant Kindfi as KindfiNFT
participant AC as AccessControl
participant Storage as Storage
participant Events as Events
Caller->>Kindfi: mint_with_metadata(caller, to, metadata)
Kindfi->>AC: has_role(caller, minter)
AC-->>Kindfi: ok
Kindfi->>Storage: get_token_counter()
Storage-->>Kindfi: current_id
Kindfi->>Storage: Base::mint(to, new_id)
Kindfi->>Storage: set_metadata(new_id, metadata)
Kindfi->>Events: emit(MINTED, {token_id,to,metadata})
Events-->>Caller: event_published
Kindfi->>Storage: extend_ttl()
Kindfi-->>Caller: token_id
sequenceDiagram
participant Caller as Caller
participant Kindfi as KindfiNFT
participant AC as AccessControl
participant Storage as Storage
participant Events as Events
Caller->>Kindfi: update_metadata(caller, token_id, new_metadata)
Kindfi->>AC: has_role(caller, metadata_manager)
AC-->>Kindfi: ok
Kindfi->>Storage: owner_of(token_id)
Storage-->>Kindfi: owner_address
Kindfi->>Storage: set_metadata(token_id, new_metadata)
Kindfi->>Events: emit(METADATA_UPDATED, {token_id,new_metadata})
Events-->>Caller: event_published
Kindfi->>Storage: extend_ttl()
Kindfi-->>Caller: ok
sequenceDiagram
participant Caller as Caller
participant Kindfi as KindfiNFT
participant AC as AccessControl
participant Storage as Storage
participant Events as Events
Caller->>Kindfi: burn(caller_from, token_id)
Kindfi->>AC: has_role(caller, burner)
AC-->>Kindfi: ok
Kindfi->>Storage: Base::burn(from, token_id)
Kindfi->>Storage: remove_metadata(token_id)
Kindfi->>Events: emit(BURNED, {token_id,from})
Events-->>Caller: event_published
Kindfi->>Storage: extend_ttl()
Kindfi-->>Caller: ok
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Possibly related issues
Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 5
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
apps/contract/Cargo.toml (1)
21-33: Dependencies are properly pinned to a specific release tag.Using
tag = "v0.3.0"for the OpenZeppelin stellar-contracts dependencies ensures reproducible builds. Consider updating the dependencies to v0.6.0 (the current latest release) and documenting the upgrade process to keep pace with security updates and new features. If staying on v0.3.0 is intentional, document the rationale for this decision.
🤖 Fix all issues with AI agents
In `@apps/contract/contracts/nft-kindfi/src/lib.rs`:
- Around line 215-227: Add TTL-extension to the approval mutators: after calling
Self::ContractType::approve(...) in fn approve and after
Self::ContractType::approve_for_all(...) in fn approve_for_all, invoke the same
instance-TTL extension helper used by other mutations (e.g.
Self::extend_instance_ttl(e, live_until_ledger) or the project's equivalent) to
update the instance TTL using the live_until_ledger value so approvals mirror
transfer()/burn() behavior.
- Around line 69-93: The constructor currently sets the admin without verifying
that the provided Address consents; add a call to require_auth() on the incoming
admin Address in the __constructor function (after the existing
already-initialized check and before set_admin) so the provided admin must
authorize the initialization (i.e., call admin.require_auth() in __constructor
before invoking set_admin and Base::set_metadata while preserving the existing
AlreadyInitialized guard and TTL extension).
In `@apps/contract/contracts/nft-kindfi/src/metadata.rs`:
- Around line 22-33: Replace the explicit is_some() check in get_metadata with
an if let to unwrap the Option and extend TTL in one step: after retrieving
metadata via e.storage().persistent().get(&StorageKey::TokenMetadata(token_id))
use if let Some(ref m) = metadata {
e.storage().persistent().extend_ttl(&StorageKey::TokenMetadata(token_id),
METADATA_TTL_THRESHOLD, METADATA_TTL_AMOUNT); } and then return metadata; this
simplifies the flow while keeping the TTL extension logic (refer to function
get_metadata, StorageKey::TokenMetadata, METADATA_TTL_THRESHOLD,
METADATA_TTL_AMOUNT, and extend_ttl).
- Around line 11-18: The set_metadata function currently stores NFTMetadata
without validation; update set_metadata(&Env, token_id: u32, metadata:
&NFTMetadata) to perform validation of required fields on NFTMetadata (e.g.,
ensure name and image_uri are non-empty and any other invariants), and change
its signature to return Result<(), Error> (using the existing
Error::InvalidMetadata) so it returns Err(Error::InvalidMetadata) when
validation fails; only call e.storage().persistent().set(...) and
extend_ttl(...) (StorageKey::TokenMetadata, METADATA_TTL_THRESHOLD,
METADATA_TTL_AMOUNT) after validation passes.
In `@apps/contract/contracts/nft-kindfi/src/types.rs`:
- Around line 5-18: The comment requests adding the Debug derive to the
StorageKey type to make debugging easier; update the StorageKey struct
declaration to include #[derive(Debug, Clone, Eq, PartialEq)] (or add Debug to
its existing derive list) so it implements Debug alongside its current
derives—locate the StorageKey struct in the file (symbol: StorageKey) and add
Debug to the derive attributes, keeping other derives intact.
- Update soroban-sdk from 22.0.6 to 23.4.0 - Update all OpenZeppelin dependencies from v0.3.0 to v0.6.0 - Restructure dependencies: stellar-access-control → stellar-access, stellar-non-fungible → stellar-tokens
- Update contract dependencies to use new package structure - stellar-access-control → stellar-access - stellar-access-control-macros → stellar-macros - stellar-non-fungible → stellar-tokens
- Update stellar_access_control imports to stellar_access::access_control - Update stellar_non_fungible imports to stellar_tokens::non_fungible - Update stellar_access_control_macros to stellar_macros - Fix AccessControl trait method signatures to match v0.6.0 API
… and change crate-type to just (cdylib)
…base and the tests did not compile
…ey are now used with the contractevent and topic macro
…e) for the different files that propagate the events
…ndfi-org/kindfi into feat/kindfi-nft-open-zeppelin
…on and security of contract initialization
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
🤖 Fix all issues with AI agents
In `@apps/contract/contracts/nft-kindfi/README.md`:
- Around line 45-50: The README currently shows the example base_uri as a bare
URL which triggers linting and renders poorly; update the `base_uri` example so
the URL is a proper Markdown link or autolink (e.g., replace the plain
"https://api.kindfi.org/nft/" with a Markdown link or
<https://api.kindfi.org/nft/>) in the README entry for `base_uri` to remove the
bare-URL warning and improve rendering.
- Around line 15-24: Update the README.md tree code block to use a labeled
"text" fenced block so it renders without fenced-code lint warnings;
specifically replace the unlabeled triple-backtick block that lists src/ and the
file tree with a ```text fenced block (i.e., change the opening ``` to ```text)
around the existing tree so the architecture diagram is treated as text.
In `@apps/contract/contracts/nft-kindfi/src/lib.rs`:
- Around line 128-149: Replace the manual role check in update_metadata with the
project’s role macro (e.g., #[only_role] or #[has_role]) to match
mint_with_metadata and burn functions: remove the explicit
Symbol::new/METADATA_MANAGER_ROLE + storage_has_role check and rely on the macro
to enforce the METADATA_MANAGER_ROLE before caller.require_auth, keeping the
subsequent Base::owner_of(token_id) existence check, metadata::set_metadata
call, MetadataUpdatedEventData.publish, and Self::extend_instance_ttl intact;
ensure the chosen macro resolves long role names via Symbol::new internally so
the full METADATA_MANAGER_ROLE constant continues to work.
In `@apps/contract/contracts/nft-kindfi/src/mint.rs`:
- Around line 32-50: The mint_with_metadata function is currently public
allowing external callers to bypass lib.rs access control; change its signature
from pub fn mint_with_metadata(...) to pub(crate) fn mint_with_metadata(...) and
do the same for get_token_counter (make it pub(crate) if only used internally
and exposed via total_supply()), then update any internal call sites (e.g.,
where lib’s total_supply or mint flow calls these functions) to ensure
visibility still permits compilation and that the external API surface only
exposes the intended functions.
♻️ Duplicate comments (1)
apps/contract/contracts/nft-kindfi/src/lib.rs (1)
79-93: Consider addingadmin.require_auth()in the constructor.The initialization logic is solid with proper already-initialized guard and TTL extension. However, as noted in a previous review, adding
admin.require_auth()would enhance security by ensuring the admin address explicitly consents to being assigned that role—particularly important if the deployer and admin differ.Based on learnings, parameter validation should verify that the admin address is valid and has authorized this assignment.
🔐 Suggested enhancement
// Check if already initialized by checking if admin is set if storage_get_admin(e).is_some() { panic_with_error!(e, Error::AlreadyInitialized); } + // Ensure admin consents to the role assignment + admin.require_auth(); + // Set the admin for access control set_admin(e, &admin);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In `@apps/contract/contracts/nft-kindfi/src/lib.rs`:
- Around line 118-148: update_metadata currently calls metadata::set_metadata
which both writes storage and emits a MetadataSetEventData, then update_metadata
emits MetadataUpdatedEventData resulting in double events; add a helper in
metadata.rs (e.g., write_metadata_no_event or set_metadata_internal) that only
writes the metadata + TTL to storage without publishing events, refactor
existing metadata::set_metadata to call that helper then publish the original
MetadataSetEventData, and change update_metadata to call the new helper
(write_metadata_no_event/set_metadata_internal) and then publish only
MetadataUpdatedEventData so a single semantic event is emitted for this action.
In `@apps/contract/contracts/nft-kindfi/src/metadata.rs`:
- Around line 11-27: The validation currently panics via assert! in
require_valid_metadata; change it to return a typed contract error (e.g.,
Result<(), Error>) and replace the assert! checks with returning
Err(Error::InvalidMetadata) (optionally include a small reason or field tag),
add an InvalidMetadata variant to the contract Error enum if missing, and update
callers like set_metadata to propagate/handle the Result (return early on Err)
instead of relying on panics so clients receive a consistent
Error::InvalidMetadata response.
| /// Update the metadata for an existing NFT. | ||
| /// | ||
| /// Requires the "metadata_manager" role. | ||
| /// | ||
| /// # Arguments | ||
| /// * `caller` - Address initiating the update (must have metadata_manager role) | ||
| /// * `token_id` - ID of the token to update | ||
| /// * `nft_metadata` - New metadata for the NFT | ||
| /// | ||
| /// # Errors | ||
| /// * `Error::Unauthorized` - If caller doesn't have metadata_manager role | ||
| pub fn update_metadata(e: &Env, caller: Address, token_id: u32, nft_metadata: NFTMetadata) { | ||
| // Verify caller has metadata_manager role (using full name with Symbol::new) | ||
| let role = Symbol::new(e, METADATA_MANAGER_ROLE); | ||
| if storage_has_role(e, &caller, &role).is_none() { | ||
| panic_with_error!(e, Error::Unauthorized); | ||
| } | ||
| caller.require_auth(); | ||
|
|
||
| // Verify token exists by checking owner (will panic if not found) | ||
| let _ = Base::owner_of(e, token_id); | ||
|
|
||
| // Update metadata | ||
| metadata::set_metadata(e, token_id, &nft_metadata); | ||
|
|
||
| // Emit metadata updated event | ||
| MetadataUpdatedEventData { | ||
| token_id, | ||
| metadata: nft_metadata, | ||
| }.publish(e); | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider avoiding double event emission on metadata updates.
Right now update_metadata triggers MetadataSetEventData (via set_metadata) and then MetadataUpdatedEventData. That can confuse indexers that expect one semantic event per action. We could enhance this by separating “store metadata” from “emit set event.”
♻️ Proposed change
- // Update metadata
- metadata::set_metadata(e, token_id, &nft_metadata);
+ // Update metadata (store only)
+ metadata::store_metadata(e, token_id, &nft_metadata);To support this, add a helper in metadata.rs that writes + TTL without emitting events, and keep set_metadata as the event-emitting wrapper.
📌 Supporting change (metadata.rs)
+pub fn store_metadata(e: &Env, token_id: u32, metadata: &NFTMetadata) {
+ require_valid_metadata(e, metadata);
+ let key = StorageKey::TokenMetadata(token_id);
+ e.storage().persistent().set(&key, metadata);
+ e.storage()
+ .persistent()
+ .extend_ttl(&key, METADATA_TTL_THRESHOLD, METADATA_TTL_AMOUNT);
+}
+
pub fn set_metadata(e: &Env, token_id: u32, metadata: &NFTMetadata) {
- require_valid_metadata(e, metadata);
- let key = StorageKey::TokenMetadata(token_id);
- e.storage().persistent().set(&key, metadata);
- e.storage()
- .persistent()
- .extend_ttl(&key, METADATA_TTL_THRESHOLD, METADATA_TTL_AMOUNT);
+ store_metadata(e, token_id, metadata);
MetadataSetEventData {
token_id,
metadata: metadata.clone(),
}.publish(e);
}🤖 Prompt for AI Agents
In `@apps/contract/contracts/nft-kindfi/src/lib.rs` around lines 118 - 148,
update_metadata currently calls metadata::set_metadata which both writes storage
and emits a MetadataSetEventData, then update_metadata emits
MetadataUpdatedEventData resulting in double events; add a helper in metadata.rs
(e.g., write_metadata_no_event or set_metadata_internal) that only writes the
metadata + TTL to storage without publishing events, refactor existing
metadata::set_metadata to call that helper then publish the original
MetadataSetEventData, and change update_metadata to call the new helper
(write_metadata_no_event/set_metadata_internal) and then publish only
MetadataUpdatedEventData so a single semantic event is emitted for this action.
| /// Validates that the metadata fields meet minimum requirements. | ||
| /// Panics if validation fails. | ||
| fn require_valid_metadata(metadata: &NFTMetadata) { | ||
| assert!(metadata.name.len() > 0, "name cannot be empty"); | ||
| assert!(metadata.image_uri.len() > 0, "image_uri cannot be empty"); | ||
| } | ||
|
|
||
| /// Store metadata for a specific token ID. | ||
| /// Uses persistent storage with automatic TTL extension. | ||
| pub fn set_metadata(e: &Env, token_id: u32, metadata: &NFTMetadata) { | ||
| require_valid_metadata(metadata); | ||
| let key = StorageKey::TokenMetadata(token_id); | ||
| e.storage().persistent().set(&key, metadata); | ||
| e.storage() | ||
| .persistent() | ||
| .extend_ttl(&key, METADATA_TTL_THRESHOLD, METADATA_TTL_AMOUNT); | ||
| MetadataSetEventData { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
find apps/contract/contracts/nft-kindfi -type f -name "*.rs" | head -20Repository: kindfi-org/kindfi
Length of output: 397
🏁 Script executed:
cat apps/contract/contracts/nft-kindfi/src/metadata.rsRepository: kindfi-org/kindfi
Length of output: 1898
🏁 Script executed:
find apps/contract/contracts/nft-kindfi -type f -name "*error*" -o -name "*lib.rs"Repository: kindfi-org/kindfi
Length of output: 155
🏁 Script executed:
cat apps/contract/contracts/nft-kindfi/src/errors.rsRepository: kindfi-org/kindfi
Length of output: 743
🏁 Script executed:
cat apps/contract/contracts/nft-kindfi/src/lib.rsRepository: kindfi-org/kindfi
Length of output: 11751
🏁 Script executed:
rg "require_valid_metadata" apps/contract/contracts/nft-kindfi/src/Repository: kindfi-org/kindfi
Length of output: 252
🏁 Script executed:
rg "panic_with_error" apps/contract/contracts/nft-kindfi/src/ -A 1 -B 1 | head -40Repository: kindfi-org/kindfi
Length of output: 1299
Consider using contract error codes for metadata validation.
Nice to see validation added. We could enhance this by emitting a typed contract error (e.g., Error::InvalidMetadata) instead of string-based assert!, which is easier for clients to handle consistently.
♻️ Proposed change
-use soroban_sdk::Env;
+use soroban_sdk::{panic_with_error, Env};
+use crate::errors::Error;
use crate::events::MetadataSetEventData;
use crate::types::{NFTMetadata, StorageKey};
/// Validates that the metadata fields meet minimum requirements.
/// Panics if validation fails.
-fn require_valid_metadata(metadata: &NFTMetadata) {
- assert!(metadata.name.len() > 0, "name cannot be empty");
- assert!(metadata.image_uri.len() > 0, "image_uri cannot be empty");
+fn require_valid_metadata(e: &Env, metadata: &NFTMetadata) {
+ if metadata.name.is_empty() || metadata.image_uri.is_empty() {
+ panic_with_error!(e, Error::InvalidMetadata);
+ }
}
pub fn set_metadata(e: &Env, token_id: u32, metadata: &NFTMetadata) {
- require_valid_metadata(metadata);
+ require_valid_metadata(e, metadata);
let key = StorageKey::TokenMetadata(token_id);🤖 Prompt for AI Agents
In `@apps/contract/contracts/nft-kindfi/src/metadata.rs` around lines 11 - 27, The
validation currently panics via assert! in require_valid_metadata; change it to
return a typed contract error (e.g., Result<(), Error>) and replace the assert!
checks with returning Err(Error::InvalidMetadata) (optionally include a small
reason or field tag), add an InvalidMetadata variant to the contract Error enum
if missing, and update callers like set_metadata to propagate/handle the Result
(return early on Err) instead of relying on panics so clients receive a
consistent Error::InvalidMetadata response.
Bran18
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, nice job setting up the contract, and thanks for the other improvements you did. Really nice job
* feat: add didit KYC user flow (#768) * feat: add dididt KYC user flow * fix: build issues * fix(auth): add pending role state and fix user signup default role * chore: generate Supabase types from remote instance * fix: configure Vercel for monorepo and add Supabase types * feat: kindfi nft open zeppelin (#769) * feat: add KindFi NFT contract structure and types - Add Cargo.toml for nft-kindfi contract with OpenZeppelin dependencies - Add types.rs with NFTMetadata struct and StorageKey enum - Add errors.rs with custom error definitions - Add events.rs with metadata update events * feat: implement KindFi NFT core functionality - Add lib.rs with main contract implementing NonFungibleToken, AccessControl, and custom metadata functions - Add metadata.rs for on-chain metadata storage and retrieval - Add mint.rs for sequential token ID minting with metadata - Add burn.rs for token burning functionality - Implement role-based access control (minter, burner, metadata_manager) - Add OpenZeppelin Stellar Contracts integration * fix: update workspace members for compilation - Comment out non-existent contract members to allow compilation - Add nft-kindfi to implemented contracts - Reorganize workspace members with clear sections * chore: update Cargo.lock with new contract dependencies * feat: update to OpenZeppelin Stellar Contracts v0.6.0 - Update soroban-sdk from 22.0.6 to 23.4.0 - Update all OpenZeppelin dependencies from v0.3.0 to v0.6.0 - Restructure dependencies: stellar-access-control → stellar-access, stellar-non-fungible → stellar-tokens * feat: update nft-kindfi dependencies for v0.6.0 - Update contract dependencies to use new package structure - stellar-access-control → stellar-access - stellar-access-control-macros → stellar-macros - stellar-non-fungible → stellar-tokens * refactor: update imports for OpenZeppelin v0.6.0 - Update stellar_access_control imports to stellar_access::access_control - Update stellar_non_fungible imports to stellar_tokens::non_fungible - Update stellar_access_control_macros to stellar_macros - Fix AccessControl trait method signatures to match v0.6.0 API * chore: kindfi information in the workspace.package and comments added in members * fix: target changed to wasm32v1-none and leaving necessary components * chore: Add additional information about kindfi to contract cargo.toml and change crate-type to just (cdylib) * fix: config.toml file removed since it generated conflicts with rust base and the tests did not compile * refactor: change in the use of events, since due to the sdk update they are now used with the contractevent and topic macro * refactor: structure change in the use of events of the form .publish(e) for the different files that propagate the events * doc: detailed documentation about the nft-kindfi contract * chore: add admin.require_auth() add admin.require_auth() for validation and security of contract initialization * fix: validation was added for the metadata and the event was created to send this * feat: Reputation Contract for NFT Level Management (#773) * feat: add KindFi NFT contract structure and types - Add Cargo.toml for nft-kindfi contract with OpenZeppelin dependencies - Add types.rs with NFTMetadata struct and StorageKey enum - Add errors.rs with custom error definitions - Add events.rs with metadata update events * feat: implement KindFi NFT core functionality - Add lib.rs with main contract implementing NonFungibleToken, AccessControl, and custom metadata functions - Add metadata.rs for on-chain metadata storage and retrieval - Add mint.rs for sequential token ID minting with metadata - Add burn.rs for token burning functionality - Implement role-based access control (minter, burner, metadata_manager) - Add OpenZeppelin Stellar Contracts integration * fix: update workspace members for compilation - Comment out non-existent contract members to allow compilation - Add nft-kindfi to implemented contracts - Reorganize workspace members with clear sections * chore: update Cargo.lock with new contract dependencies * feat: update to OpenZeppelin Stellar Contracts v0.6.0 - Update soroban-sdk from 22.0.6 to 23.4.0 - Update all OpenZeppelin dependencies from v0.3.0 to v0.6.0 - Restructure dependencies: stellar-access-control → stellar-access, stellar-non-fungible → stellar-tokens * feat: update nft-kindfi dependencies for v0.6.0 - Update contract dependencies to use new package structure - stellar-access-control → stellar-access - stellar-access-control-macros → stellar-macros - stellar-non-fungible → stellar-tokens * refactor: update imports for OpenZeppelin v0.6.0 - Update stellar_access_control imports to stellar_access::access_control - Update stellar_non_fungible imports to stellar_tokens::non_fungible - Update stellar_access_control_macros to stellar_macros - Fix AccessControl trait method signatures to match v0.6.0 API * chore: kindfi information in the workspace.package and comments added in members * fix: target changed to wasm32v1-none and leaving necessary components * chore: Add additional information about kindfi to contract cargo.toml and change crate-type to just (cdylib) * fix: config.toml file removed since it generated conflicts with rust base and the tests did not compile * refactor: change in the use of events, since due to the sdk update they are now used with the contractevent and topic macro * refactor: structure change in the use of events of the form .publish(e) for the different files that propagate the events * doc: detailed documentation about the nft-kindfi contract * chore: add admin.require_auth() add admin.require_auth() for validation and security of contract initialization * fix: validation was added for the metadata and the event was created to send this * feat: add root cargo manifest for contracts workspace * feat(reputation): add cargo manifest for reputation contract * feat(reputation): add reputation contract main library * feat(reputation): add reputation contract types and data structures * feat(reputation): add reputation contract storage layer * feat(reputation): add reputation contract error types * feat(reputation): add reputation contract events * feat(reputation): add NFT client integration for reputation contract * docs(reputation): add reputation contract documentation --------- Co-authored-by: Brandon Fernández <31634868+Bran18@users.noreply.github.com> * feat: Comprehensive Tests and Integration for NFT & Reputation Contracts (#774) * feat: add KindFi NFT contract structure and types - Add Cargo.toml for nft-kindfi contract with OpenZeppelin dependencies - Add types.rs with NFTMetadata struct and StorageKey enum - Add errors.rs with custom error definitions - Add events.rs with metadata update events * feat: implement KindFi NFT core functionality - Add lib.rs with main contract implementing NonFungibleToken, AccessControl, and custom metadata functions - Add metadata.rs for on-chain metadata storage and retrieval - Add mint.rs for sequential token ID minting with metadata - Add burn.rs for token burning functionality - Implement role-based access control (minter, burner, metadata_manager) - Add OpenZeppelin Stellar Contracts integration * fix: update workspace members for compilation - Comment out non-existent contract members to allow compilation - Add nft-kindfi to implemented contracts - Reorganize workspace members with clear sections * chore: update Cargo.lock with new contract dependencies * feat: update to OpenZeppelin Stellar Contracts v0.6.0 - Update soroban-sdk from 22.0.6 to 23.4.0 - Update all OpenZeppelin dependencies from v0.3.0 to v0.6.0 - Restructure dependencies: stellar-access-control → stellar-access, stellar-non-fungible → stellar-tokens * feat: update nft-kindfi dependencies for v0.6.0 - Update contract dependencies to use new package structure - stellar-access-control → stellar-access - stellar-access-control-macros → stellar-macros - stellar-non-fungible → stellar-tokens * refactor: update imports for OpenZeppelin v0.6.0 - Update stellar_access_control imports to stellar_access::access_control - Update stellar_non_fungible imports to stellar_tokens::non_fungible - Update stellar_access_control_macros to stellar_macros - Fix AccessControl trait method signatures to match v0.6.0 API * chore: kindfi information in the workspace.package and comments added in members * fix: target changed to wasm32v1-none and leaving necessary components * chore: Add additional information about kindfi to contract cargo.toml and change crate-type to just (cdylib) * fix: config.toml file removed since it generated conflicts with rust base and the tests did not compile * refactor: change in the use of events, since due to the sdk update they are now used with the contractevent and topic macro * refactor: structure change in the use of events of the form .publish(e) for the different files that propagate the events * doc: detailed documentation about the nft-kindfi contract * chore: add admin.require_auth() add admin.require_auth() for validation and security of contract initialization * fix: validation was added for the metadata and the event was created to send this * feat: add root cargo manifest for contracts workspace * feat(reputation): add cargo manifest for reputation contract * feat(reputation): add reputation contract main library * feat(reputation): add reputation contract types and data structures * feat(reputation): add reputation contract storage layer * feat(reputation): add reputation contract error types * feat(reputation): add reputation contract events * feat(reputation): add NFT client integration for reputation contract * docs(reputation): add reputation contract documentation * test(reputation): add reputation contract tests * test(nft): add NFT contract tests --------- Co-authored-by: Brandon Fernández <31634868+Bran18@users.noreply.github.com> * feat: Deployment Scripts and Configuration for NFT & Reputation Contracts (#775) * feat: add KindFi NFT contract structure and types - Add Cargo.toml for nft-kindfi contract with OpenZeppelin dependencies - Add types.rs with NFTMetadata struct and StorageKey enum - Add errors.rs with custom error definitions - Add events.rs with metadata update events * feat: implement KindFi NFT core functionality - Add lib.rs with main contract implementing NonFungibleToken, AccessControl, and custom metadata functions - Add metadata.rs for on-chain metadata storage and retrieval - Add mint.rs for sequential token ID minting with metadata - Add burn.rs for token burning functionality - Implement role-based access control (minter, burner, metadata_manager) - Add OpenZeppelin Stellar Contracts integration * fix: update workspace members for compilation - Comment out non-existent contract members to allow compilation - Add nft-kindfi to implemented contracts - Reorganize workspace members with clear sections * chore: update Cargo.lock with new contract dependencies * feat: update to OpenZeppelin Stellar Contracts v0.6.0 - Update soroban-sdk from 22.0.6 to 23.4.0 - Update all OpenZeppelin dependencies from v0.3.0 to v0.6.0 - Restructure dependencies: stellar-access-control → stellar-access, stellar-non-fungible → stellar-tokens * feat: update nft-kindfi dependencies for v0.6.0 - Update contract dependencies to use new package structure - stellar-access-control → stellar-access - stellar-access-control-macros → stellar-macros - stellar-non-fungible → stellar-tokens * refactor: update imports for OpenZeppelin v0.6.0 - Update stellar_access_control imports to stellar_access::access_control - Update stellar_non_fungible imports to stellar_tokens::non_fungible - Update stellar_access_control_macros to stellar_macros - Fix AccessControl trait method signatures to match v0.6.0 API * chore: kindfi information in the workspace.package and comments added in members * fix: target changed to wasm32v1-none and leaving necessary components * chore: Add additional information about kindfi to contract cargo.toml and change crate-type to just (cdylib) * fix: config.toml file removed since it generated conflicts with rust base and the tests did not compile * refactor: change in the use of events, since due to the sdk update they are now used with the contractevent and topic macro * refactor: structure change in the use of events of the form .publish(e) for the different files that propagate the events * doc: detailed documentation about the nft-kindfi contract * chore: add admin.require_auth() add admin.require_auth() for validation and security of contract initialization * fix: validation was added for the metadata and the event was created to send this * feat: add root cargo manifest for contracts workspace * feat(reputation): add cargo manifest for reputation contract * feat(reputation): add reputation contract main library * feat(reputation): add reputation contract types and data structures * feat(reputation): add reputation contract storage layer * feat(reputation): add reputation contract error types * feat(reputation): add reputation contract events * feat(reputation): add NFT client integration for reputation contract * docs(reputation): add reputation contract documentation * test(reputation): add reputation contract tests * test(nft): add NFT contract tests * chore: update cargo lock file * docs: update contracts README * script: add NFT contract deployment script * script: add reputation contract deployment script * chore: add environment example file --------- Co-authored-by: Brandon Fernández <31634868+Bran18@users.noreply.github.com> * feat: refactor nft-kindfi with SEP-0050 compatibility (#778) * feat: add SEP-0050 compliant NFTAttribute struct to nft-kindfi types Replace Vec<String> attributes with Vec<NFTAttribute> using structured fields (trait_type, value, display_type, max_value) to comply with the SEP-0050 Non-Fungible Metadata JSON Schema. * feat: update nft-kindfi tests to use NFTAttribute struct Adapt all test helpers and test cases to use the new SEP-0050 compliant NFTAttribute struct instead of plain strings for metadata attributes. * feat: update reputation nft_client to SEP-0050 attribute format Refactor NFTMetadata mirror and level attribute helpers to use the new NFTAttribute struct. Update cross-contract call types and all related tests for SEP-0050 compliance. * fix(kyc): prevent URL params cleanup on failure and add error toasts (#777) * fix(kyc): prevent URL params cleanup on failure and add error toasts * refactor(kyc): deduplicate error message string per code review * fix(kyc): sync with develop and add error logging per code review * refactor: centralize didit kyc status mapping logic (#779) * refactor: centralize didit kyc status mapping logic * refactor: apply code review feedback (arrow functions, type-only imports, and alias paths) * style(ui): use bg-primary token instead of hex code in progress bar (#780) Co-authored-by: Brandon Fernández <31634868+Bran18@users.noreply.github.com> * chore: add vercel skills set for OSS * fix: add new migration strategy * feat: add fundation support * chore: generate Supabase database types using MCP tool - Generated complete TypeScript types from Supabase database - Includes all tables, enums, functions, and relationships - Fixes Vercel build error: Module '@services/supabase' has no exported member 'Database' Co-authored-by: Cursor <cursoragent@cursor.com> * fix: add complete Supabase database types - Generated TypeScript types from Supabase database using MCP tool - Includes all tables, enums, functions, and relationships - Fixes Vercel build error: Module '@services/supabase' has no exported member 'Database' Co-authored-by: Cursor <cursoragent@cursor.com> * fix: add complete Supabase database types - Generated TypeScript types from Supabase database using MCP tool - Includes all tables, enums, functions, and relationships - Fixes Vercel build error: Module '@services/supabase' has no exported member 'Database' Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Matias Aguilar <aaguilar1x@gmail.com> Co-authored-by: Karen Giannetto <karengiannetto99@gmail.com> Co-authored-by: Delfina luna Corradini <105253541+delfinacorr@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com>
* feat: add didit KYC user flow (#768) * feat: add dididt KYC user flow * fix: build issues * fix(auth): add pending role state and fix user signup default role * chore: generate Supabase types from remote instance * fix: configure Vercel for monorepo and add Supabase types * feat: kindfi nft open zeppelin (#769) * feat: add KindFi NFT contract structure and types - Add Cargo.toml for nft-kindfi contract with OpenZeppelin dependencies - Add types.rs with NFTMetadata struct and StorageKey enum - Add errors.rs with custom error definitions - Add events.rs with metadata update events * feat: implement KindFi NFT core functionality - Add lib.rs with main contract implementing NonFungibleToken, AccessControl, and custom metadata functions - Add metadata.rs for on-chain metadata storage and retrieval - Add mint.rs for sequential token ID minting with metadata - Add burn.rs for token burning functionality - Implement role-based access control (minter, burner, metadata_manager) - Add OpenZeppelin Stellar Contracts integration * fix: update workspace members for compilation - Comment out non-existent contract members to allow compilation - Add nft-kindfi to implemented contracts - Reorganize workspace members with clear sections * chore: update Cargo.lock with new contract dependencies * feat: update to OpenZeppelin Stellar Contracts v0.6.0 - Update soroban-sdk from 22.0.6 to 23.4.0 - Update all OpenZeppelin dependencies from v0.3.0 to v0.6.0 - Restructure dependencies: stellar-access-control → stellar-access, stellar-non-fungible → stellar-tokens * feat: update nft-kindfi dependencies for v0.6.0 - Update contract dependencies to use new package structure - stellar-access-control → stellar-access - stellar-access-control-macros → stellar-macros - stellar-non-fungible → stellar-tokens * refactor: update imports for OpenZeppelin v0.6.0 - Update stellar_access_control imports to stellar_access::access_control - Update stellar_non_fungible imports to stellar_tokens::non_fungible - Update stellar_access_control_macros to stellar_macros - Fix AccessControl trait method signatures to match v0.6.0 API * chore: kindfi information in the workspace.package and comments added in members * fix: target changed to wasm32v1-none and leaving necessary components * chore: Add additional information about kindfi to contract cargo.toml and change crate-type to just (cdylib) * fix: config.toml file removed since it generated conflicts with rust base and the tests did not compile * refactor: change in the use of events, since due to the sdk update they are now used with the contractevent and topic macro * refactor: structure change in the use of events of the form .publish(e) for the different files that propagate the events * doc: detailed documentation about the nft-kindfi contract * chore: add admin.require_auth() add admin.require_auth() for validation and security of contract initialization * fix: validation was added for the metadata and the event was created to send this * feat: Reputation Contract for NFT Level Management (#773) * feat: add KindFi NFT contract structure and types - Add Cargo.toml for nft-kindfi contract with OpenZeppelin dependencies - Add types.rs with NFTMetadata struct and StorageKey enum - Add errors.rs with custom error definitions - Add events.rs with metadata update events * feat: implement KindFi NFT core functionality - Add lib.rs with main contract implementing NonFungibleToken, AccessControl, and custom metadata functions - Add metadata.rs for on-chain metadata storage and retrieval - Add mint.rs for sequential token ID minting with metadata - Add burn.rs for token burning functionality - Implement role-based access control (minter, burner, metadata_manager) - Add OpenZeppelin Stellar Contracts integration * fix: update workspace members for compilation - Comment out non-existent contract members to allow compilation - Add nft-kindfi to implemented contracts - Reorganize workspace members with clear sections * chore: update Cargo.lock with new contract dependencies * feat: update to OpenZeppelin Stellar Contracts v0.6.0 - Update soroban-sdk from 22.0.6 to 23.4.0 - Update all OpenZeppelin dependencies from v0.3.0 to v0.6.0 - Restructure dependencies: stellar-access-control → stellar-access, stellar-non-fungible → stellar-tokens * feat: update nft-kindfi dependencies for v0.6.0 - Update contract dependencies to use new package structure - stellar-access-control → stellar-access - stellar-access-control-macros → stellar-macros - stellar-non-fungible → stellar-tokens * refactor: update imports for OpenZeppelin v0.6.0 - Update stellar_access_control imports to stellar_access::access_control - Update stellar_non_fungible imports to stellar_tokens::non_fungible - Update stellar_access_control_macros to stellar_macros - Fix AccessControl trait method signatures to match v0.6.0 API * chore: kindfi information in the workspace.package and comments added in members * fix: target changed to wasm32v1-none and leaving necessary components * chore: Add additional information about kindfi to contract cargo.toml and change crate-type to just (cdylib) * fix: config.toml file removed since it generated conflicts with rust base and the tests did not compile * refactor: change in the use of events, since due to the sdk update they are now used with the contractevent and topic macro * refactor: structure change in the use of events of the form .publish(e) for the different files that propagate the events * doc: detailed documentation about the nft-kindfi contract * chore: add admin.require_auth() add admin.require_auth() for validation and security of contract initialization * fix: validation was added for the metadata and the event was created to send this * feat: add root cargo manifest for contracts workspace * feat(reputation): add cargo manifest for reputation contract * feat(reputation): add reputation contract main library * feat(reputation): add reputation contract types and data structures * feat(reputation): add reputation contract storage layer * feat(reputation): add reputation contract error types * feat(reputation): add reputation contract events * feat(reputation): add NFT client integration for reputation contract * docs(reputation): add reputation contract documentation --------- Co-authored-by: Brandon Fernández <31634868+Bran18@users.noreply.github.com> * feat: Comprehensive Tests and Integration for NFT & Reputation Contracts (#774) * feat: add KindFi NFT contract structure and types - Add Cargo.toml for nft-kindfi contract with OpenZeppelin dependencies - Add types.rs with NFTMetadata struct and StorageKey enum - Add errors.rs with custom error definitions - Add events.rs with metadata update events * feat: implement KindFi NFT core functionality - Add lib.rs with main contract implementing NonFungibleToken, AccessControl, and custom metadata functions - Add metadata.rs for on-chain metadata storage and retrieval - Add mint.rs for sequential token ID minting with metadata - Add burn.rs for token burning functionality - Implement role-based access control (minter, burner, metadata_manager) - Add OpenZeppelin Stellar Contracts integration * fix: update workspace members for compilation - Comment out non-existent contract members to allow compilation - Add nft-kindfi to implemented contracts - Reorganize workspace members with clear sections * chore: update Cargo.lock with new contract dependencies * feat: update to OpenZeppelin Stellar Contracts v0.6.0 - Update soroban-sdk from 22.0.6 to 23.4.0 - Update all OpenZeppelin dependencies from v0.3.0 to v0.6.0 - Restructure dependencies: stellar-access-control → stellar-access, stellar-non-fungible → stellar-tokens * feat: update nft-kindfi dependencies for v0.6.0 - Update contract dependencies to use new package structure - stellar-access-control → stellar-access - stellar-access-control-macros → stellar-macros - stellar-non-fungible → stellar-tokens * refactor: update imports for OpenZeppelin v0.6.0 - Update stellar_access_control imports to stellar_access::access_control - Update stellar_non_fungible imports to stellar_tokens::non_fungible - Update stellar_access_control_macros to stellar_macros - Fix AccessControl trait method signatures to match v0.6.0 API * chore: kindfi information in the workspace.package and comments added in members * fix: target changed to wasm32v1-none and leaving necessary components * chore: Add additional information about kindfi to contract cargo.toml and change crate-type to just (cdylib) * fix: config.toml file removed since it generated conflicts with rust base and the tests did not compile * refactor: change in the use of events, since due to the sdk update they are now used with the contractevent and topic macro * refactor: structure change in the use of events of the form .publish(e) for the different files that propagate the events * doc: detailed documentation about the nft-kindfi contract * chore: add admin.require_auth() add admin.require_auth() for validation and security of contract initialization * fix: validation was added for the metadata and the event was created to send this * feat: add root cargo manifest for contracts workspace * feat(reputation): add cargo manifest for reputation contract * feat(reputation): add reputation contract main library * feat(reputation): add reputation contract types and data structures * feat(reputation): add reputation contract storage layer * feat(reputation): add reputation contract error types * feat(reputation): add reputation contract events * feat(reputation): add NFT client integration for reputation contract * docs(reputation): add reputation contract documentation * test(reputation): add reputation contract tests * test(nft): add NFT contract tests --------- Co-authored-by: Brandon Fernández <31634868+Bran18@users.noreply.github.com> * feat: Deployment Scripts and Configuration for NFT & Reputation Contracts (#775) * feat: add KindFi NFT contract structure and types - Add Cargo.toml for nft-kindfi contract with OpenZeppelin dependencies - Add types.rs with NFTMetadata struct and StorageKey enum - Add errors.rs with custom error definitions - Add events.rs with metadata update events * feat: implement KindFi NFT core functionality - Add lib.rs with main contract implementing NonFungibleToken, AccessControl, and custom metadata functions - Add metadata.rs for on-chain metadata storage and retrieval - Add mint.rs for sequential token ID minting with metadata - Add burn.rs for token burning functionality - Implement role-based access control (minter, burner, metadata_manager) - Add OpenZeppelin Stellar Contracts integration * fix: update workspace members for compilation - Comment out non-existent contract members to allow compilation - Add nft-kindfi to implemented contracts - Reorganize workspace members with clear sections * chore: update Cargo.lock with new contract dependencies * feat: update to OpenZeppelin Stellar Contracts v0.6.0 - Update soroban-sdk from 22.0.6 to 23.4.0 - Update all OpenZeppelin dependencies from v0.3.0 to v0.6.0 - Restructure dependencies: stellar-access-control → stellar-access, stellar-non-fungible → stellar-tokens * feat: update nft-kindfi dependencies for v0.6.0 - Update contract dependencies to use new package structure - stellar-access-control → stellar-access - stellar-access-control-macros → stellar-macros - stellar-non-fungible → stellar-tokens * refactor: update imports for OpenZeppelin v0.6.0 - Update stellar_access_control imports to stellar_access::access_control - Update stellar_non_fungible imports to stellar_tokens::non_fungible - Update stellar_access_control_macros to stellar_macros - Fix AccessControl trait method signatures to match v0.6.0 API * chore: kindfi information in the workspace.package and comments added in members * fix: target changed to wasm32v1-none and leaving necessary components * chore: Add additional information about kindfi to contract cargo.toml and change crate-type to just (cdylib) * fix: config.toml file removed since it generated conflicts with rust base and the tests did not compile * refactor: change in the use of events, since due to the sdk update they are now used with the contractevent and topic macro * refactor: structure change in the use of events of the form .publish(e) for the different files that propagate the events * doc: detailed documentation about the nft-kindfi contract * chore: add admin.require_auth() add admin.require_auth() for validation and security of contract initialization * fix: validation was added for the metadata and the event was created to send this * feat: add root cargo manifest for contracts workspace * feat(reputation): add cargo manifest for reputation contract * feat(reputation): add reputation contract main library * feat(reputation): add reputation contract types and data structures * feat(reputation): add reputation contract storage layer * feat(reputation): add reputation contract error types * feat(reputation): add reputation contract events * feat(reputation): add NFT client integration for reputation contract * docs(reputation): add reputation contract documentation * test(reputation): add reputation contract tests * test(nft): add NFT contract tests * chore: update cargo lock file * docs: update contracts README * script: add NFT contract deployment script * script: add reputation contract deployment script * chore: add environment example file --------- Co-authored-by: Brandon Fernández <31634868+Bran18@users.noreply.github.com> * feat: refactor nft-kindfi with SEP-0050 compatibility (#778) * feat: add SEP-0050 compliant NFTAttribute struct to nft-kindfi types Replace Vec<String> attributes with Vec<NFTAttribute> using structured fields (trait_type, value, display_type, max_value) to comply with the SEP-0050 Non-Fungible Metadata JSON Schema. * feat: update nft-kindfi tests to use NFTAttribute struct Adapt all test helpers and test cases to use the new SEP-0050 compliant NFTAttribute struct instead of plain strings for metadata attributes. * feat: update reputation nft_client to SEP-0050 attribute format Refactor NFTMetadata mirror and level attribute helpers to use the new NFTAttribute struct. Update cross-contract call types and all related tests for SEP-0050 compliance. * fix(kyc): prevent URL params cleanup on failure and add error toasts (#777) * fix(kyc): prevent URL params cleanup on failure and add error toasts * refactor(kyc): deduplicate error message string per code review * fix(kyc): sync with develop and add error logging per code review * refactor: centralize didit kyc status mapping logic (#779) * refactor: centralize didit kyc status mapping logic * refactor: apply code review feedback (arrow functions, type-only imports, and alias paths) * style(ui): use bg-primary token instead of hex code in progress bar (#780) Co-authored-by: Brandon Fernández <31634868+Bran18@users.noreply.github.com> * chore: add vercel skills set for OSS * fix: add new migration strategy * feat: add fundation support * chore: generate Supabase database types using MCP tool - Generated complete TypeScript types from Supabase database - Includes all tables, enums, functions, and relationships - Fixes Vercel build error: Module '@services/supabase' has no exported member 'Database' Co-authored-by: Cursor <cursoragent@cursor.com> * fix: add complete Supabase database types - Generated TypeScript types from Supabase database using MCP tool - Includes all tables, enums, functions, and relationships - Fixes Vercel build error: Module '@services/supabase' has no exported member 'Database' Co-authored-by: Cursor <cursoragent@cursor.com> * fix: add complete Supabase database types - Generated TypeScript types from Supabase database using MCP tool - Includes all tables, enums, functions, and relationships - Fixes Vercel build error: Module '@services/supabase' has no exported member 'Database' Co-authored-by: Cursor <cursoragent@cursor.com> * Fix: WebAuthn cross environments --------- Co-authored-by: Matias Aguilar <aaguilar1x@gmail.com> Co-authored-by: Karen Giannetto <karengiannetto99@gmail.com> Co-authored-by: Delfina luna Corradini <105253541+delfinacorr@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com>
* feat: add didit KYC user flow (#768) * feat: add dididt KYC user flow * fix: build issues * fix(auth): add pending role state and fix user signup default role * chore: generate Supabase types from remote instance * fix: configure Vercel for monorepo and add Supabase types * feat: kindfi nft open zeppelin (#769) * feat: add KindFi NFT contract structure and types - Add Cargo.toml for nft-kindfi contract with OpenZeppelin dependencies - Add types.rs with NFTMetadata struct and StorageKey enum - Add errors.rs with custom error definitions - Add events.rs with metadata update events * feat: implement KindFi NFT core functionality - Add lib.rs with main contract implementing NonFungibleToken, AccessControl, and custom metadata functions - Add metadata.rs for on-chain metadata storage and retrieval - Add mint.rs for sequential token ID minting with metadata - Add burn.rs for token burning functionality - Implement role-based access control (minter, burner, metadata_manager) - Add OpenZeppelin Stellar Contracts integration * fix: update workspace members for compilation - Comment out non-existent contract members to allow compilation - Add nft-kindfi to implemented contracts - Reorganize workspace members with clear sections * chore: update Cargo.lock with new contract dependencies * feat: update to OpenZeppelin Stellar Contracts v0.6.0 - Update soroban-sdk from 22.0.6 to 23.4.0 - Update all OpenZeppelin dependencies from v0.3.0 to v0.6.0 - Restructure dependencies: stellar-access-control → stellar-access, stellar-non-fungible → stellar-tokens * feat: update nft-kindfi dependencies for v0.6.0 - Update contract dependencies to use new package structure - stellar-access-control → stellar-access - stellar-access-control-macros → stellar-macros - stellar-non-fungible → stellar-tokens * refactor: update imports for OpenZeppelin v0.6.0 - Update stellar_access_control imports to stellar_access::access_control - Update stellar_non_fungible imports to stellar_tokens::non_fungible - Update stellar_access_control_macros to stellar_macros - Fix AccessControl trait method signatures to match v0.6.0 API * chore: kindfi information in the workspace.package and comments added in members * fix: target changed to wasm32v1-none and leaving necessary components * chore: Add additional information about kindfi to contract cargo.toml and change crate-type to just (cdylib) * fix: config.toml file removed since it generated conflicts with rust base and the tests did not compile * refactor: change in the use of events, since due to the sdk update they are now used with the contractevent and topic macro * refactor: structure change in the use of events of the form .publish(e) for the different files that propagate the events * doc: detailed documentation about the nft-kindfi contract * chore: add admin.require_auth() add admin.require_auth() for validation and security of contract initialization * fix: validation was added for the metadata and the event was created to send this * feat: Reputation Contract for NFT Level Management (#773) * feat: add KindFi NFT contract structure and types - Add Cargo.toml for nft-kindfi contract with OpenZeppelin dependencies - Add types.rs with NFTMetadata struct and StorageKey enum - Add errors.rs with custom error definitions - Add events.rs with metadata update events * feat: implement KindFi NFT core functionality - Add lib.rs with main contract implementing NonFungibleToken, AccessControl, and custom metadata functions - Add metadata.rs for on-chain metadata storage and retrieval - Add mint.rs for sequential token ID minting with metadata - Add burn.rs for token burning functionality - Implement role-based access control (minter, burner, metadata_manager) - Add OpenZeppelin Stellar Contracts integration * fix: update workspace members for compilation - Comment out non-existent contract members to allow compilation - Add nft-kindfi to implemented contracts - Reorganize workspace members with clear sections * chore: update Cargo.lock with new contract dependencies * feat: update to OpenZeppelin Stellar Contracts v0.6.0 - Update soroban-sdk from 22.0.6 to 23.4.0 - Update all OpenZeppelin dependencies from v0.3.0 to v0.6.0 - Restructure dependencies: stellar-access-control → stellar-access, stellar-non-fungible → stellar-tokens * feat: update nft-kindfi dependencies for v0.6.0 - Update contract dependencies to use new package structure - stellar-access-control → stellar-access - stellar-access-control-macros → stellar-macros - stellar-non-fungible → stellar-tokens * refactor: update imports for OpenZeppelin v0.6.0 - Update stellar_access_control imports to stellar_access::access_control - Update stellar_non_fungible imports to stellar_tokens::non_fungible - Update stellar_access_control_macros to stellar_macros - Fix AccessControl trait method signatures to match v0.6.0 API * chore: kindfi information in the workspace.package and comments added in members * fix: target changed to wasm32v1-none and leaving necessary components * chore: Add additional information about kindfi to contract cargo.toml and change crate-type to just (cdylib) * fix: config.toml file removed since it generated conflicts with rust base and the tests did not compile * refactor: change in the use of events, since due to the sdk update they are now used with the contractevent and topic macro * refactor: structure change in the use of events of the form .publish(e) for the different files that propagate the events * doc: detailed documentation about the nft-kindfi contract * chore: add admin.require_auth() add admin.require_auth() for validation and security of contract initialization * fix: validation was added for the metadata and the event was created to send this * feat: add root cargo manifest for contracts workspace * feat(reputation): add cargo manifest for reputation contract * feat(reputation): add reputation contract main library * feat(reputation): add reputation contract types and data structures * feat(reputation): add reputation contract storage layer * feat(reputation): add reputation contract error types * feat(reputation): add reputation contract events * feat(reputation): add NFT client integration for reputation contract * docs(reputation): add reputation contract documentation --------- Co-authored-by: Brandon Fernández <31634868+Bran18@users.noreply.github.com> * feat: Comprehensive Tests and Integration for NFT & Reputation Contracts (#774) * feat: add KindFi NFT contract structure and types - Add Cargo.toml for nft-kindfi contract with OpenZeppelin dependencies - Add types.rs with NFTMetadata struct and StorageKey enum - Add errors.rs with custom error definitions - Add events.rs with metadata update events * feat: implement KindFi NFT core functionality - Add lib.rs with main contract implementing NonFungibleToken, AccessControl, and custom metadata functions - Add metadata.rs for on-chain metadata storage and retrieval - Add mint.rs for sequential token ID minting with metadata - Add burn.rs for token burning functionality - Implement role-based access control (minter, burner, metadata_manager) - Add OpenZeppelin Stellar Contracts integration * fix: update workspace members for compilation - Comment out non-existent contract members to allow compilation - Add nft-kindfi to implemented contracts - Reorganize workspace members with clear sections * chore: update Cargo.lock with new contract dependencies * feat: update to OpenZeppelin Stellar Contracts v0.6.0 - Update soroban-sdk from 22.0.6 to 23.4.0 - Update all OpenZeppelin dependencies from v0.3.0 to v0.6.0 - Restructure dependencies: stellar-access-control → stellar-access, stellar-non-fungible → stellar-tokens * feat: update nft-kindfi dependencies for v0.6.0 - Update contract dependencies to use new package structure - stellar-access-control → stellar-access - stellar-access-control-macros → stellar-macros - stellar-non-fungible → stellar-tokens * refactor: update imports for OpenZeppelin v0.6.0 - Update stellar_access_control imports to stellar_access::access_control - Update stellar_non_fungible imports to stellar_tokens::non_fungible - Update stellar_access_control_macros to stellar_macros - Fix AccessControl trait method signatures to match v0.6.0 API * chore: kindfi information in the workspace.package and comments added in members * fix: target changed to wasm32v1-none and leaving necessary components * chore: Add additional information about kindfi to contract cargo.toml and change crate-type to just (cdylib) * fix: config.toml file removed since it generated conflicts with rust base and the tests did not compile * refactor: change in the use of events, since due to the sdk update they are now used with the contractevent and topic macro * refactor: structure change in the use of events of the form .publish(e) for the different files that propagate the events * doc: detailed documentation about the nft-kindfi contract * chore: add admin.require_auth() add admin.require_auth() for validation and security of contract initialization * fix: validation was added for the metadata and the event was created to send this * feat: add root cargo manifest for contracts workspace * feat(reputation): add cargo manifest for reputation contract * feat(reputation): add reputation contract main library * feat(reputation): add reputation contract types and data structures * feat(reputation): add reputation contract storage layer * feat(reputation): add reputation contract error types * feat(reputation): add reputation contract events * feat(reputation): add NFT client integration for reputation contract * docs(reputation): add reputation contract documentation * test(reputation): add reputation contract tests * test(nft): add NFT contract tests --------- Co-authored-by: Brandon Fernández <31634868+Bran18@users.noreply.github.com> * feat: Deployment Scripts and Configuration for NFT & Reputation Contracts (#775) * feat: add KindFi NFT contract structure and types - Add Cargo.toml for nft-kindfi contract with OpenZeppelin dependencies - Add types.rs with NFTMetadata struct and StorageKey enum - Add errors.rs with custom error definitions - Add events.rs with metadata update events * feat: implement KindFi NFT core functionality - Add lib.rs with main contract implementing NonFungibleToken, AccessControl, and custom metadata functions - Add metadata.rs for on-chain metadata storage and retrieval - Add mint.rs for sequential token ID minting with metadata - Add burn.rs for token burning functionality - Implement role-based access control (minter, burner, metadata_manager) - Add OpenZeppelin Stellar Contracts integration * fix: update workspace members for compilation - Comment out non-existent contract members to allow compilation - Add nft-kindfi to implemented contracts - Reorganize workspace members with clear sections * chore: update Cargo.lock with new contract dependencies * feat: update to OpenZeppelin Stellar Contracts v0.6.0 - Update soroban-sdk from 22.0.6 to 23.4.0 - Update all OpenZeppelin dependencies from v0.3.0 to v0.6.0 - Restructure dependencies: stellar-access-control → stellar-access, stellar-non-fungible → stellar-tokens * feat: update nft-kindfi dependencies for v0.6.0 - Update contract dependencies to use new package structure - stellar-access-control → stellar-access - stellar-access-control-macros → stellar-macros - stellar-non-fungible → stellar-tokens * refactor: update imports for OpenZeppelin v0.6.0 - Update stellar_access_control imports to stellar_access::access_control - Update stellar_non_fungible imports to stellar_tokens::non_fungible - Update stellar_access_control_macros to stellar_macros - Fix AccessControl trait method signatures to match v0.6.0 API * chore: kindfi information in the workspace.package and comments added in members * fix: target changed to wasm32v1-none and leaving necessary components * chore: Add additional information about kindfi to contract cargo.toml and change crate-type to just (cdylib) * fix: config.toml file removed since it generated conflicts with rust base and the tests did not compile * refactor: change in the use of events, since due to the sdk update they are now used with the contractevent and topic macro * refactor: structure change in the use of events of the form .publish(e) for the different files that propagate the events * doc: detailed documentation about the nft-kindfi contract * chore: add admin.require_auth() add admin.require_auth() for validation and security of contract initialization * fix: validation was added for the metadata and the event was created to send this * feat: add root cargo manifest for contracts workspace * feat(reputation): add cargo manifest for reputation contract * feat(reputation): add reputation contract main library * feat(reputation): add reputation contract types and data structures * feat(reputation): add reputation contract storage layer * feat(reputation): add reputation contract error types * feat(reputation): add reputation contract events * feat(reputation): add NFT client integration for reputation contract * docs(reputation): add reputation contract documentation * test(reputation): add reputation contract tests * test(nft): add NFT contract tests * chore: update cargo lock file * docs: update contracts README * script: add NFT contract deployment script * script: add reputation contract deployment script * chore: add environment example file --------- Co-authored-by: Brandon Fernández <31634868+Bran18@users.noreply.github.com> * feat: refactor nft-kindfi with SEP-0050 compatibility (#778) * feat: add SEP-0050 compliant NFTAttribute struct to nft-kindfi types Replace Vec<String> attributes with Vec<NFTAttribute> using structured fields (trait_type, value, display_type, max_value) to comply with the SEP-0050 Non-Fungible Metadata JSON Schema. * feat: update nft-kindfi tests to use NFTAttribute struct Adapt all test helpers and test cases to use the new SEP-0050 compliant NFTAttribute struct instead of plain strings for metadata attributes. * feat: update reputation nft_client to SEP-0050 attribute format Refactor NFTMetadata mirror and level attribute helpers to use the new NFTAttribute struct. Update cross-contract call types and all related tests for SEP-0050 compliance. * fix(kyc): prevent URL params cleanup on failure and add error toasts (#777) * fix(kyc): prevent URL params cleanup on failure and add error toasts * refactor(kyc): deduplicate error message string per code review * fix(kyc): sync with develop and add error logging per code review * refactor: centralize didit kyc status mapping logic (#779) * refactor: centralize didit kyc status mapping logic * refactor: apply code review feedback (arrow functions, type-only imports, and alias paths) * style(ui): use bg-primary token instead of hex code in progress bar (#780) Co-authored-by: Brandon Fernández <31634868+Bran18@users.noreply.github.com> * chore: add vercel skills set for OSS * fix: add new migration strategy * feat: add fundation support * chore: generate Supabase database types using MCP tool - Generated complete TypeScript types from Supabase database - Includes all tables, enums, functions, and relationships - Fixes Vercel build error: Module '@services/supabase' has no exported member 'Database' Co-authored-by: Cursor <cursoragent@cursor.com> * fix: add complete Supabase database types - Generated TypeScript types from Supabase database using MCP tool - Includes all tables, enums, functions, and relationships - Fixes Vercel build error: Module '@services/supabase' has no exported member 'Database' Co-authored-by: Cursor <cursoragent@cursor.com> * fix: add complete Supabase database types - Generated TypeScript types from Supabase database using MCP tool - Includes all tables, enums, functions, and relationships - Fixes Vercel build error: Module '@services/supabase' has no exported member 'Database' Co-authored-by: Cursor <cursoragent@cursor.com> * Fix: WebAuthn cross environments * Fix: WebAuthn non dynamic * Fix: add path alias --------- Co-authored-by: Matias Aguilar <aaguilar1x@gmail.com> Co-authored-by: Karen Giannetto <karengiannetto99@gmail.com> Co-authored-by: Delfina luna Corradini <105253541+delfinacorr@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com>
KindFi NFT Contract
A non-fungible token (NFT) contract for the KindFi platform's reputation and incentivization system. Built on OpenZeppelin Stellar Contracts v0.6.0 for Soroban.
Key Features
Architecture
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.