-
Notifications
You must be signed in to change notification settings - Fork 95
feat: Comprehensive Tests and Integration for NFT & Reputation Contracts #774
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
- 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
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
WalkthroughThis PR introduces two new Soroban smart contracts for the KindFi platform: an NFT contract for minting and burning NFTs with metadata management, and a Reputation contract for tracking user reputation through events with automatic NFT level upgrades. It includes workspace dependency updates, build configuration adjustments, and comprehensive test suites for both contracts. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant ReputationContract as Reputation<br/>Contract
participant NFTContract as NFT<br/>Contract
participant Storage as Persistent<br/>Storage
User->>ReputationContract: record_event(user, EventType)
ReputationContract->>Storage: get_points(user)
Storage-->>ReputationContract: current_points
ReputationContract->>Storage: add_points(user, event_points)
ReputationContract->>Storage: get_user_level(user)
Storage-->>ReputationContract: current_level
ReputationContract->>ReputationContract: calculate_level(new_points)
alt Level Up
ReputationContract->>Storage: get_user_nft_token_id(user)
Storage-->>ReputationContract: token_id
ReputationContract->>NFTContract: get_metadata(token_id)
NFTContract->>Storage: fetch_metadata
Storage-->>NFTContract: metadata
NFTContract-->>ReputationContract: metadata
ReputationContract->>ReputationContract: build_level_attribute(new_level)
ReputationContract->>ReputationContract: update_attributes_with_level()
ReputationContract->>NFTContract: update_metadata(token_id, new_metadata)
NFTContract->>Storage: set_metadata(token_id, new_metadata)
NFTContract-->>ReputationContract: success
ReputationContract->>Storage: set_user_level(user, new_level)
ReputationContract-->>User: LevelUpEventData emitted
end
ReputationContract-->>User: ReputationEventData emitted
sequenceDiagram
participant Caller
participant NFTContract as NFT<br/>Contract
participant Base as OpenZeppelin<br/>Base
participant Storage as Persistent<br/>Storage
Caller->>NFTContract: mint_with_metadata(to, metadata)
NFTContract->>Storage: get_token_counter()
Storage-->>NFTContract: current_id
NFTContract->>NFTContract: increment_token_counter()
NFTContract->>Base: mint(to, token_id)
Base->>Storage: update_owner(token_id, to)
Base-->>NFTContract: success
NFTContract->>Storage: set_metadata(token_id, metadata)
NFTContract->>NFTContract: publish(MintedEventData)
NFTContract-->>Caller: token_id returned
Caller->>NFTContract: update_metadata(token_id, new_metadata)
NFTContract->>Storage: get_metadata(token_id)
Storage-->>NFTContract: current_metadata
NFTContract->>Storage: set_metadata(token_id, new_metadata)
NFTContract->>NFTContract: publish(MetadataUpdatedEventData)
NFTContract-->>Caller: success
Estimated code review effort🎯 4 (Complex) | ⏱️ ~55 minutes Possibly related issues
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Constructive ObservationsStrengths Observed:
Areas for Enhancement:
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 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: 14
🤖 Fix all issues with AI agents
In `@apps/contract/Cargo.toml`:
- Around line 33-38: Update the git dependencies (stellar-access,
stellar-macros, stellar-tokens, stellar-contract-utils) to pin to specific
commit revs instead of tags (or replace with crates.io versions) to ensure
reproducible builds, and then verify compatibility between soroban-sdk =
"23.4.0" and the stellar-* v0.6.0 set; specifically, change the dependency
entries to include rev = "<commit-hash>" for each stellar-* entry and run cargo
build/tests to confirm no breaking API or feature mismatches with soroban-sdk
23.4.0.
In `@apps/contract/contracts/nft-kindfi/README.md`:
- Around line 45-50: In the README parameter list for base_uri (the `base_uri`
example) replace the bare URL "https://api.kindfi.org/nft/" with a wrapped form
(e.g., `<https://api.kindfi.org/nft/>` or `` `https://api.kindfi.org/nft/` ``)
so the `admin`, `name`, `symbol`, and `base_uri` example avoids MD034 bare-URL
lint failures; update the `base_uri` line accordingly.
- Around line 15-24: Update the README's architecture tree code block to include
a language tag for proper markdown linting and rendering: change the fenced
block from ``` to ```text so the listing (src/, lib.rs, mint.rs, burn.rs,
metadata.rs, events.rs, types.rs, errors.rs) is labeled; locate the block that
lists filenames (e.g., lib.rs, mint.rs, burn.rs, metadata.rs, events.rs,
types.rs, errors.rs) and add "text" immediately after the opening backticks.
In `@apps/contract/contracts/nft-kindfi/src/lib.rs`:
- Around line 118-150: The update_metadata function currently causes two events
to be emitted because metadata::set_metadata already publishes
MetadataSetEventData and update_metadata additionally publishes
MetadataUpdatedEventData; decide which single event you want and remove the
duplicate: either stop update_metadata from publishing MetadataUpdatedEventData
(remove the MetadataUpdatedEventData publish call in update_metadata) or add a
parameter to metadata::set_metadata (e.g., emit_event: bool) to control emission
and call it with emit_event=false from update_metadata, ensuring references to
MetadataSetEventData and MetadataUpdatedEventData and functions update_metadata
and metadata::set_metadata are updated accordingly.
In `@apps/contract/contracts/nft-kindfi/src/metadata.rs`:
- Around line 1-22: Replace the assert!-based validation with Soroban typed
errors: change require_valid_metadata signature to accept the Env (fn
require_valid_metadata(e: &Env, metadata: &NFTMetadata)) and replace both
assert! checks with panic_with_error!(e, Error::InvalidMetadata) when name or
image_uri are empty; update the set_metadata call to pass e into
require_valid_metadata(e, metadata). Ensure the Error enum contains
InvalidMetadata (use Error::InvalidMetadata) so the contract returns a typed
error code to clients.
In `@apps/contract/contracts/reputation/README.md`:
- Around line 14-25: Update the README fenced code blocks (starting with the
Architecture block in apps/contract/contracts/reputation/README.md) to include a
language identifier (e.g., "text" or "rust") and ensure there is a blank line
before and after each fenced block; specifically modify the architecture block
to use ```text and to have an empty line above the opening ``` and below the
closing ```, and apply the same pattern to other fenced blocks in the file for
consistent rendering and lint compliance.
In `@apps/contract/contracts/reputation/src/lib.rs`:
- Around line 334-356: The set_level_thresholds function should validate that
provided thresholds are non‑decreasing across levels before applying them:
gather thresholds for all defined levels (use Level::from_u32 to map keys and
iterate levels in the canonical order Rookie→Bronze→Silver→Gold→Diamond), check
each threshold is >= the previous one, and if any ordering violation is found
abort the update (do not call set_level_threshold or publish
ThresholdsUpdatedData); only after the monotonic check passes call
set_level_threshold for each level and then publish ThresholdsUpdatedData and
call Self::extend_instance_ttl. Ensure the validation logic lives in
set_level_thresholds and references Level::from_u32, set_level_threshold,
ThresholdsUpdatedData, and Self::extend_instance_ttl so it’s easy to locate.
- Around line 282-292: The current get_level_threshold(e: &Env, level: u32)
silently maps invalid numeric levels to Level::Rookie via
Level::from_u32(...).unwrap_or(...), which hides errors; change the function to
explicitly handle invalid input by returning Option<u32> or Result<u32, Error>,
e.g., call Level::from_u32(level) and if None return None (or Err with a clear
message) instead of unwrapping to Rookie, and update callers of
get_level_threshold(e, level_enum) to handle the new Option/Result return value
accordingly so invalid levels are surfaced rather than masked.
- Around line 429-448: register_user_nft currently writes the mapping
immediately; add a verification step that the NFT token exists and is owned by
`user` before calling set_user_nft_token_id and publishing
UserNFTRegisteredData. Use the NFT contract's on-chain entrypoint (e.g.,
owner_of or equivalent) via Env::invoke_contract or cross-contract call to check
token existence and ownership, aborting (returning an error or panicking) if the
token is missing or owned by someone else; then proceed to call
set_user_nft_token_id(e, &user, token_id), publish UserNFTRegisteredData{user,
token_id}, and call Self::extend_instance_ttl(e).
- Around line 384-402: Summary: Don't silently default invalid numeric levels to
Rookie; reject them. Change the method signature of the contract method
set_permission_threshold to return a Result (e.g., Result<(), Error>), validate
the incoming level using Level::from_u32(level).ok_or(Error::InvalidLevel)
instead of unwrap_or, propagate the error back to the caller when invalid, and
only call the internal set_permission_threshold(e, threshold_type, level_enum)
and Self::extend_instance_ttl(e) on Ok; add an Error::InvalidLevel variant if it
doesn't exist.
- Around line 73-98: Add explicit address validation in the __constructor: after
admin.require_auth() assert admin is not the zero/invalid address
(panic_with_error!(e, Error::InvalidAddress) or existing invalid-address error)
before calling set_admin, and for nft_contract when Some(nft_addr) verify
nft_addr is not the zero/invalid address before calling set_nft_contract; keep
the existing is_initialized and set_initialized logic and use the same error
helper macros for consistency.
In `@apps/contract/contracts/reputation/src/storage.rs`:
- Around line 86-95: Add a fixed bound when appending to user event history in
add_user_event: after retrieving events via get_user_events and pushing the new
ReputationEventRecord, prune the queue to keep only the last N entries (e.g.,
define MAX_USER_EVENTS constant) by popping from the front until length <=
MAX_USER_EVENTS, then persist with e.storage().persistent().set and extend_ttl
as before; reference StorageKey::UserEvents, add_user_event, get_user_events,
and introduce MAX_USER_EVENTS to control the limit so on-chain storage cannot
grow unbounded.
In `@apps/contract/contracts/reputation/src/test.rs`:
- Around line 29-38: The TestEnv::new_with_nft helper creates a fresh Env
(Env::default()) while accepting an nft_contract Address created in another Env,
causing Env/address mismatch; change new_with_nft to accept a reference to the
Env (e.g., new_with_nft(env: &Env, nft_contract: &Address)) or otherwise reuse
the caller's Env so the nft_contract and the Reputation client are created
against the same Env, update uses of Env::default() and Address::generate calls
inside new_with_nft to use the provided env, and ensure TestEnv construction
(env, admin, client) uses that same env instance.
In `@apps/contract/rust-toolchain.toml`:
- Around line 1-4: The toolchain file currently uses a floating channel
("stable") and an unusual target ("wasm32v1-none"); update the [toolchain] entry
so the channel is pinned to a specific Rust version (e.g., a concrete semver
like 1.xx.yy) instead of "stable", and verify/replace the targets value to the
intended Soroban target (confirm if "wasm32v1-none" should be
"wasm32-unknown-unknown" or another Soroban-supported target) so CI builds
reproducibly; adjust the components list only if Soroban requires different
components, run CI locally or in a branch to confirm the pinned version and
target work, and then commit the modified rust-toolchain.toml.
| ``` | ||
| src/ | ||
| ├── lib.rs # Main contract and implemented traits | ||
| ├── mint.rs # Minting logic with sequential IDs | ||
| ├── burn.rs # Burning logic with metadata cleanup | ||
| ├── metadata.rs # Metadata storage and retrieval | ||
| ├── events.rs # Contract event definitions | ||
| ├── types.rs # Data types (NFTMetadata, StorageKey) | ||
| └── errors.rs # Custom error codes | ||
| ``` |
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 labeling the architecture tree code block.
Nice overview of the module layout. We could enhance this by adding a language tag (e.g., text) to satisfy MD040 and improve rendering consistency.
Proposed doc tweak
-```
+```text
src/
├── lib.rs # Main contract and implemented traits
├── mint.rs # Minting logic with sequential IDs
├── burn.rs # Burning logic with metadata cleanup
├── metadata.rs # Metadata storage and retrieval
├── events.rs # Contract event definitions
├── types.rs # Data types (NFTMetadata, StorageKey)
└── errors.rs # Custom error codes
-```
+```🧰 Tools
🪛 markdownlint-cli2 (0.18.1)
15-15: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 Prompt for AI Agents
In `@apps/contract/contracts/nft-kindfi/README.md` around lines 15 - 24, Update
the README's architecture tree code block to include a language tag for proper
markdown linting and rendering: change the fenced block from ``` to ```text so
the listing (src/, lib.rs, mint.rs, burn.rs, metadata.rs, events.rs, types.rs,
errors.rs) is labeled; locate the block that lists filenames (e.g., lib.rs,
mint.rs, burn.rs, metadata.rs, events.rs, types.rs, errors.rs) and add "text"
immediately after the opening backticks.
| /// 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); | ||
|
|
||
| Self::extend_instance_ttl(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.
🧹 Nitpick | 🔵 Trivial
Update flow is clear; consider whether two events are intended.
Good role check and owner validation. Since metadata::set_metadata already emits MetadataSetEventData (apps/contract/contracts/nft-kindfi/src/metadata.rs lines 19-30), this method will also publish MetadataUpdatedEventData. Consider consolidating if you only want a single update signal.
🤖 Prompt for AI Agents
In `@apps/contract/contracts/nft-kindfi/src/lib.rs` around lines 118 - 150, The
update_metadata function currently causes two events to be emitted because
metadata::set_metadata already publishes MetadataSetEventData and
update_metadata additionally publishes MetadataUpdatedEventData; decide which
single event you want and remove the duplicate: either stop update_metadata from
publishing MetadataUpdatedEventData (remove the MetadataUpdatedEventData publish
call in update_metadata) or add a parameter to metadata::set_metadata (e.g.,
emit_event: bool) to control emission and call it with emit_event=false from
update_metadata, ensuring references to MetadataSetEventData and
MetadataUpdatedEventData and functions update_metadata and
metadata::set_metadata are updated accordingly.
| use soroban_sdk::Env; | ||
|
|
||
| use crate::events::MetadataSetEventData; | ||
| use crate::types::{NFTMetadata, StorageKey}; | ||
|
|
||
| /// TTL constants for metadata storage (30 days in ledgers) | ||
| const DAY_IN_LEDGERS: u32 = 17280; | ||
| const METADATA_TTL_AMOUNT: u32 = 30 * DAY_IN_LEDGERS; | ||
| const METADATA_TTL_THRESHOLD: u32 = METADATA_TTL_AMOUNT - DAY_IN_LEDGERS; | ||
|
|
||
| /// 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); |
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:
# First, let's check if the file exists and inspect the current state
find . -name "metadata.rs" -path "*/nft-kindfi/*" | head -20Repository: kindfi-org/kindfi
Length of output: 113
🏁 Script executed:
# Check the error handling structure in the nft-kindfi contract
find . -path "*/nft-kindfi/src/*" -type f -name "*.rs" | head -20Repository: kindfi-org/kindfi
Length of output: 460
🏁 Script executed:
# Search for Error enum definition in the contract
rg "enum Error|InvalidMetadata" --type rs apps/contract/contracts/nft-kindfi/ -A 2Repository: kindfi-org/kindfi
Length of output: 87
🏁 Script executed:
# Check existing panic_with_error usage patterns in the codebase
rg "panic_with_error" --type rs apps/contract/contracts/ -B 2 -A 2 | head -50Repository: kindfi-org/kindfi
Length of output: 87
🏁 Script executed:
# Check how assert is currently used in the nft-kindfi contract
rg "assert!" --type rs apps/contract/contracts/nft-kindfi/ -B 1 -A 1Repository: kindfi-org/kindfi
Length of output: 87
🌐 Web query:
Soroban SDK 23.4.0 error handling panic_with_error vs assert recommended pattern
💡 Result:
Recommended pattern in Soroban SDK (incl. 23.4.0)
1) Prefer Result<_, E> for “expected”/business-logic failures (best UX for callers).
If the error is something an external caller (client or another contract) might reasonably handle (limits, authorization, missing state, invalid args, etc.), expose it in the contract interface by returning Result<T, ErrorEnum>. This makes the possible errors part of the contract spec and improves integration. [1]
2) Use panic_with_error! when you want to trap but still return a typed contract error.
This is the typed alternative to panic!()—the error value is propagated to the caller. It’s useful for “must not continue” situations or for convenience wrappers that don’t return Result. [2][1]
Also, Stellar docs explicitly recommend using panic_with_error!() instead of panic!() because panic!() messages typically aren’t available in Wasm builds (you often just see a generic failure). [4]
3) Use assert_with_error! for preconditions (it’s just a concise guard that panics with a typed error).
Treat it as the contract-friendly equivalent of assert!, but producing a contract error code rather than a string panic. [3]
Practical “best of both worlds” layout
#[contracterror]
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
#[repr(u32)]
pub enum Error {
Unauthorized = 1,
LimitReached = 2,
}
pub fn do_thing(env: Env, x: u32) -> Result<u32, Error> {
// expected failures => Result
if x > 10 { return Err(Error::LimitReached); }
Ok(x + 1)
}
// Optional convenience wrapper that traps with a typed error:
pub fn do_thing_or_panic(env: Env, x: u32) -> u32 {
do_thing(env.clone(), x).unwrap_or_else(|e| soroban_sdk::panic_with_error!(&env, e))
}Rule of thumb
- Caller-meaningful failure ⇒
Result(preferred). [1] - Invariant/precondition check ⇒
assert_with_error!. [3] - Abort execution but keep a typed error ⇒
panic_with_error!(avoidpanic!()/assert!()for contract errors). [2][4]
Sources:
[1] https://developers.stellar.org/docs/build/smart-contracts/example-contracts/errors
[2] https://docs.rs/soroban-sdk/latest/soroban_sdk/macro.panic_with_error.html
[3] https://docs.rs/soroban-sdk/latest/soroban_sdk/
[4] https://developers.stellar.org/docs/learn/encyclopedia/errors-and-debugging/debugging-errors
🏁 Script executed:
# Read the errors.rs file to check for InvalidMetadata variant
cat -n apps/contract/contracts/nft-kindfi/src/errors.rsRepository: kindfi-org/kindfi
Length of output: 890
🏁 Script executed:
# Read the metadata.rs file to see current implementation
cat -n apps/contract/contracts/nft-kindfi/src/metadata.rsRepository: kindfi-org/kindfi
Length of output: 2276
🏁 Script executed:
# Check how require_valid_metadata is being used in the codebase
grep -r "require_valid_metadata" apps/contract/contracts/nft-kindfi/ --include="*.rs" -B 2 -A 2Repository: kindfi-org/kindfi
Length of output: 1124
Consider using typed error codes for input validation.
Good to see validation in place. We could enhance this by using panic_with_error!(e, Error::InvalidMetadata) instead of assert! so clients receive the documented error code. This follows Soroban SDK best practices and ensures proper contract error semantics instead of generic panic messages.
Proposed fix
-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 1 - 22,
Replace the assert!-based validation with Soroban typed errors: change
require_valid_metadata signature to accept the Env (fn require_valid_metadata(e:
&Env, metadata: &NFTMetadata)) and replace both assert! checks with
panic_with_error!(e, Error::InvalidMetadata) when name or image_uri are empty;
update the set_metadata call to pass e into require_valid_metadata(e, metadata).
Ensure the Error enum contains InvalidMetadata (use Error::InvalidMetadata) so
the contract returns a typed error code to clients.
| fn new_with_nft(nft_contract: &Address) -> Self { | ||
| let env = Env::default(); | ||
| env.mock_all_auths(); | ||
|
|
||
| let admin = Address::generate(&env); | ||
|
|
||
| let contract_id = env.register(Reputation, (&admin, Some(nft_contract.clone()))); | ||
| let client = ReputationClient::new(&env, &contract_id); | ||
|
|
||
| TestEnv { env, admin, client } |
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 . -type f -name "test.rs" | head -20Repository: kindfi-org/kindfi
Length of output: 357
🏁 Script executed:
fd -t f "test.rs" apps/contract/contracts/reputationRepository: kindfi-org/kindfi
Length of output: 107
🏁 Script executed:
wc -l apps/contract/contracts/reputation/src/test.rsRepository: kindfi-org/kindfi
Length of output: 111
🏁 Script executed:
cat -n apps/contract/contracts/reputation/src/test.rs | head -100Repository: kindfi-org/kindfi
Length of output: 3614
🏁 Script executed:
rg "new_with_nft" apps/contract/contracts/reputation/src/test.rsRepository: kindfi-org/kindfi
Length of output: 168
🏁 Script executed:
rg "new_with_nft" apps/contract/contracts/reputation/Repository: kindfi-org/kindfi
Length of output: 262
🌐 Web query:
Soroban SDK Env Address cross-environment test usage
💡 Result:
In soroban-sdk, an Address is bound to the Env it was created in, so you generally can’t reuse the same Address value across two different Env::default() test environments (you’ll hit env/object mismatches).
What to do instead (cross-Env / cross-environment tests):
-
Create addresses inside each env (normal unit tests):
- In tests, addresses are meant to be created with
Address::generate(&env). [1]
- In tests, addresses are meant to be created with
-
If you must move an address between envs, serialize + rehydrate via StrKey (special case):
- Convert in env A:
let s = addr_a.to_string();[1] - Recreate in env B:
let addr_b = Address::from_str(&env_b, s.as_str());[1] - This “string bridge” is explicitly intended only for special cases where addresses need to be shared between different environments (e.g., different chains). [1]
- Convert in env A:
Minimal example:
use soroban_sdk::{Address, Env};
#[test]
fn cross_env_address() {
let env_a = Env::default();
let a = Address::generate(&env_a);
let strkey = a.to_string(); // bridge format
let env_b = Env::default();
let b = Address::from_str(&env_b, strkey.as_str()); // new Address in env_b
assert_eq!(b.to_string(), strkey);
}Rule of thumb: keep Address values within a single Env; if you need to “share” between envs, share the StrKey string and reconstruct. [1]
Sources
soroban_sdk::Addressdocs (methods + guidance on tests and cross-environment sharing). [1]
🌐 Web query:
Soroban testutils Address generation different Env instances
💡 Result:
In Soroban tests, Address::generate(&env) is not globally unique across different Env instances. Each Env owns its own host/PRNG, and in local tests “the base PRNG of each host is seeded to zero when the host is constructed”, so PRNG-derived outputs are deterministic per-host (and thus can repeat across separate Env::default() instances that perform the same sequence of operations). [1]
Also, Address values are Env-hosted; you generally shouldn’t “move” an Address created in one Env into another. If you truly need to share an address across environments, convert it to a Stellar strkey and re-create it in the other Env using Address::from_str(...) (or from_string*). The Soroban docs explicitly call this out as a special-case for “sharing between different environments (e.g. different chains)”. [2]
Practical fixes
- Use one
Envper test (or per fixture) and generate all addresses from that env. - If you must pass an address between envs:
let s = addr.to_string();thenlet addr2 = Address::from_str(&env2, s.as_str());[2]
Sources: [1] [2]
Align NFT contract Address with the same Env instance.
In Soroban, Address values are bound to the Env they're created in. The current implementation creates nft_contract in one Env (line 74) but uses it in a different Env::default() inside new_with_nft (line 30), which can cause env/object mismatches. Consider passing the Env to the function to keep both the address and environment from the same source:
🔧 Proposed fix to keep `Address` and `Env` aligned
- fn new_with_nft(nft_contract: &Address) -> Self {
- let env = Env::default();
- env.mock_all_auths();
-
- let admin = Address::generate(&env);
-
- let contract_id = env.register(Reputation, (&admin, Some(nft_contract.clone())));
- let client = ReputationClient::new(&env, &contract_id);
-
- TestEnv { env, admin, client }
- }
+ fn new_with_nft(env: Env, nft_contract: Address) -> Self {
+ env.mock_all_auths();
+
+ let admin = Address::generate(&env);
+
+ let contract_id = env.register(Reputation, (&admin, Some(nft_contract)));
+ let client = ReputationClient::new(&env, &contract_id);
+
+ TestEnv { env, admin, client }
+ }- let env = Env::default();
- env.mock_all_auths();
-
- let nft_contract = Address::generate(&env);
- let _test = TestEnv::new_with_nft(&nft_contract);
+ let env = Env::default();
+ let nft_contract = Address::generate(&env);
+ let _test = TestEnv::new_with_nft(env, nft_contract);📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| fn new_with_nft(nft_contract: &Address) -> Self { | |
| let env = Env::default(); | |
| env.mock_all_auths(); | |
| let admin = Address::generate(&env); | |
| let contract_id = env.register(Reputation, (&admin, Some(nft_contract.clone()))); | |
| let client = ReputationClient::new(&env, &contract_id); | |
| TestEnv { env, admin, client } | |
| fn new_with_nft(env: Env, nft_contract: Address) -> Self { | |
| env.mock_all_auths(); | |
| let admin = Address::generate(&env); | |
| let contract_id = env.register(Reputation, (&admin, Some(nft_contract))); | |
| let client = ReputationClient::new(&env, &contract_id); | |
| TestEnv { env, admin, client } | |
| } |
🤖 Prompt for AI Agents
In `@apps/contract/contracts/reputation/src/test.rs` around lines 29 - 38, The
TestEnv::new_with_nft helper creates a fresh Env (Env::default()) while
accepting an nft_contract Address created in another Env, causing Env/address
mismatch; change new_with_nft to accept a reference to the Env (e.g.,
new_with_nft(env: &Env, nft_contract: &Address)) or otherwise reuse the caller's
Env so the nft_contract and the Reputation client are created against the same
Env, update uses of Env::default() and Address::generate calls inside
new_with_nft to use the provided env, and ensure TestEnv construction (env,
admin, client) uses that same env instance.
| [toolchain] | ||
| channel = "stable" | ||
| targets = ["wasm32v1-none"] | ||
| components = ["rustfmt", "clippy", "rust-src"] No newline at end of file |
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.
🧹 Nitpick | 🔵 Trivial
Consider pinning the toolchain version and confirming the target.
Nice to see a dedicated toolchain file. We could enhance reproducibility by pinning a specific Rust version, and please verify that wasm32v1-none is the intended build target for your Soroban toolchain in CI.
🤖 Prompt for AI Agents
In `@apps/contract/rust-toolchain.toml` around lines 1 - 4, The toolchain file
currently uses a floating channel ("stable") and an unusual target
("wasm32v1-none"); update the [toolchain] entry so the channel is pinned to a
specific Rust version (e.g., a concrete semver like 1.xx.yy) instead of
"stable", and verify/replace the targets value to the intended Soroban target
(confirm if "wasm32v1-none" should be "wasm32-unknown-unknown" or another
Soroban-supported target) so CI builds reproducibly; adjust the components list
only if Soroban requires different components, run CI locally or in a branch to
confirm the pinned version and target work, and then commit the modified
rust-toolchain.toml.
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.
Nice job with the test, all of them are running and proving the contracts are strongly build. LGTM
|
@coderabbitai create a new issue to improve the operability with the 0050 standard |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: Length of output: 83 🌐 Web query: 💡 Result: SEP-0050 (often written “SEP-50”) is Stellar’s standard interface for Non-Fungible Tokens (NFTs) implemented as Soroban smart contracts, meant to make NFTs interoperable across wallets, marketplaces, and other contracts (similar in spirit to Ethereum’s ERC-721). [1] Key points:
Where to start building: Stellar’s docs point developers to OpenZeppelin-based example NFT contracts on Soroban that implement the standard interface. [5] Sources: Citations:
🏁 Script executed: Length of output: 74
SEP-0050 is Stellar's standard interface for NFTs on Soroban smart contracts, designed to ensure interoperability across wallets, marketplaces, and other ecosystem tools (similar to Ethereum's ERC-721). OpenZeppelin provides a SEP-50 compliant NonFungibleToken module which your contract already uses via stellar-tokens v0.6.0. The issue outlines objectives for verifying full compliance, implementing any missing optional features, ensuring metadata format alignment, and documenting SEP-0050 compliance clearly. I've included relevant resources from the Stellar documentation and OpenZeppelin to help guide the implementation. Issue: #776 🧠 Learnings used |
* 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>
Test Coverage for NFT and Reputation Contracts
Description
Added the test suite for NFT and Reputation contracts, ensuring coverage of key functionalities.
Changes
Reputation Contract Tests (
apps/contract/contracts/reputation/src/test.rs)NFT Contract Tests (
apps/contract/contracts/nft-kindfi/src/test.rs)Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.