Skip to content

docs: add authorization note to create_pool() - #1252

Merged
cyber-punk112 merged 1 commit into
Web3Novalabs:mainfrom
cyb3ralee:docs/create-pool-auth
Sep 2, 2026
Merged

docs: add authorization note to create_pool()#1252
cyber-punk112 merged 1 commit into
Web3Novalabs:mainfrom
cyb3ralee:docs/create-pool-auth

Conversation

@cyb3ralee

Copy link
Copy Markdown
Contributor

Closes #1119

What This Does

Adds documentation to create_pool() explaining that it does not require the creator address to authorize the call.

The Issue

  • create_pool() does NOT call creator.require_auth()
  • create_pool_for_school() DOES call creator.require_auth() before delegating to create_pool()
  • This inconsistency was not documented anywhere

The Fix

Added # Authorization section to create_pool() doc comment:

  • Clarifies that any address can call it "as" any other creator
  • References create_pool_for_school for the authorized version
  • Explains that creator.require_auth() is never called

Before

/// Create a new donation / sponsorship pool.
pub fn create_pool(
    env: Env,
    creator: Address,
    title: String,
    description: String,
    goal: u128,
    application_deadline: u64,
) -> u32 {

After

/// Create a new donation / sponsorship pool.
///
/// # Authorization
/// This function does **not** require the `creator` address to authorize the
/// call (`creator.require_auth()` is never called). Any address can create
/// a pool "as" any other address. For authorization, use
/// [`create_pool_for_school`] which validates that the caller is authorized.
pub fn create_pool(
    env: Env,
    creator: Address,
    title: String,
    description: String,
    goal: u128,
    application_deadline: u64,
) -> u32 {

Files Changed

  • nevo_contract/contracts/hello-world/src/lib.rs

Acceptance Criteria

  • Documentation note added to create_pool()
  • cargo test --lib passes (pre-existing errors not related to this change)

- Document that create_pool() does NOT require creator authorization
- Unlike create_pool_for_school() which does call require_auth()
- Clarify that any address can create a pool 'as' any other address

Closes Web3Novalabs#1119
@cyb3ralee
cyb3ralee requested a review from Akshola00 as a code owner September 1, 2026 13:34
@drips-wave

drips-wave Bot commented Sep 1, 2026

Copy link
Copy Markdown

@smartalee Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@cyber-punk112
cyber-punk112 merged commit 7cc8567 into Web3Novalabs:main Sep 2, 2026
1 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[P3] Document that create_pool() does not require creator authorization

2 participants