Skip to content

Conversation

@recule556688
Copy link
Contributor

Description:

This pull request introduces the initial, work-in-progress implementation of the geo-resto package.

This is a foundational contribution for a location-based application realm and is not yet feature-complete. The goal is to get the initial structure and code into the repository.

Current state:

  • Includes basic data structures and initial logic for locations, events, and visits.
  • Contains placeholder implementations for authentication and QR code verification.
  • Basic unit tests for the existing functionality are included.

Known limitations and next steps:

  • The authentication and security features are not fully implemented.
  • The core logic for events and visits needs further refinement.
  • The rendering is minimal and requires work.
    This is the first step, and more development is needed to make it a fully functional realm.

@leohhhn
Copy link
Contributor

leohhhn commented Oct 23, 2025

Can you fix the CI?

feat: implement GetLocationsByCategory function in LocationManager
fix: rename GetLocationsByUser to GetUserLocations in location tests
@recule556688
Copy link
Contributor Author

@leohhhn yes i'm working on it with the refactor to use txlink

@recule556688
Copy link
Contributor Author

Still need to finish implementing some functions and all the txlink like discussed during the meeting and find a suitable replacement at my zk proof idea

Comment on lines 12 to 16
type AuthManager struct {
trustedVerifiers map[string]bool // Trusted verifier addresses
adminAddresses map[string]bool // Admin addresses
rateLimitTracker map[string]int64 // Tracks last action time for a user and action
accessTokens map[string]int64 // token -> expiration time
Copy link
Contributor

Choose a reason for hiding this comment

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

We do not use map in Gno. Please switch to avl.Tree

Copy link
Contributor

Choose a reason for hiding this comment

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

This whole file and functionality already exists in packages like p/nt/ownable & gno.land/p/nt/ownable/exts/authorizable. Please remove this code and use existing libraries. This will shorten your code, make it more readable, and increase the reusability value and trust of your code.

Copy link
Contributor

Choose a reason for hiding this comment

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

still unresolved

Comment on lines 82 to 97
// VerifyEventAccess verifies access to a password-protected event
func (am *AuthManager) VerifyEventAccess(eventID, password string, user address) bool {
event := eventManager.GetEvent(eventID)
if event == nil {
return false
}

// If no password required, access is granted
if event.Password == "" {
return true
}

// Verify password
hashedPassword := am.hashString(password)
return hashedPassword == event.Password
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Passing in the password like this will make it available to everyone as transaction data is public. Please figure out a different way to do this.

Copy link
Contributor

@leohhhn leohhhn left a comment

Choose a reason for hiding this comment

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

I think you should use less AI in your code, especially when starting out with new tech. It seems you do not understand some basic concepts of blockchains & Gno currently. I suggest you read the documentation, see existing examples and common patterns, and try writing your code manually.

Copy link
Contributor

Choose a reason for hiding this comment

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

This does not need to exist. The package itself has tests for what it does.

@leohhhn
Copy link
Contributor

leohhhn commented Nov 10, 2025

@recule556688, I see you haven't done anything since the review I left 7 days ago. Can you take a look at the comments?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants