Project Queries

This section covers the view functions for querying project information.

projectOwners

Gets the owner of a specific project ID.

function projectOwners(uint256) external view returns (address)

Parameters

  • projectId (uint256): The project ID

Returns

  • owner (address): The project owner's address

Description

Returns the owner address for a specific project ID.

Example

// Get project owner
const owner = await papayaContract.projectOwners(1);
console.log("Project 1 owner:", owner);

allProjectOwners

Gets all project owners.

Returns

  • owners (address[]): Array of all project owner addresses

Description

Returns an array of all project owner addresses.

Example

defaultSettings

Gets the default settings for a project.

Parameters

  • projectId (uint256): The project ID

Returns

  • initialized (bool): Whether the settings are initialized

  • projectFee (uint16): The project fee percentage

Description

Returns the default settings for a specific project.

Example

userSettings

Gets the custom settings for a user in a specific project.

Parameters

  • projectId (uint256): The project ID

  • account (address): The user's address

Returns

  • initialized (bool): Whether the settings are initialized

  • projectFee (uint16): The project fee percentage

Description

Returns the custom settings for a specific user in a specific project.

Example

Last updated