Skip to content

Tracking Support

Querying Initiative Data

Get Initiative Details

function getInitiative(uint256 initiativeId) external view returns (Initiative memory)

Returns complete initiative information including state, proposer, timestamps.

Get Total Initiatives

function initiativeCount() external view returns (uint256)

Returns the total number of initiatives created on the board.

Querying Weight

Current Weight

function getWeight(uint256 initiativeId) external view returns (uint256)

Returns the initiative's current total weight (at block.timestamp), accounting for all active locks and decay.

Historical Weight

function getWeightAt(uint256 initiativeId, uint256 timestamp) external view returns (uint256)

Returns the initiative's weight at a specific timestamp. Useful for:

  • Creating weight charts over time
  • Verifying historical data
  • Calculating rewards

Supporter's Weight

function getWeightForSupporterAt(
    uint256 initiativeId,
    address supporter,
    uint256 timestamp
) external view returns (uint256)

Returns a specific supporter's weight contribution at a given timestamp.

Querying Lock Positions

Get Lock Details

function getTokenLock(uint256 tokenId) external view returns (TokenLock memory)

Returns detailed lock information for a specific NFT token ID.

Get Standardized Lock Data

function getLockData(uint256 tokenId) external view returns (LockData memory)

Returns standardized lock data conforming to the ISignalsLock interface.

Get Initiative's Lock Positions

function locksForInitiative(uint256 initiativeId) external view returns (uint256[] memory)

Returns all NFT token IDs supporting a specific initiative.

Checking Acceptance Threshold

Get Threshold

function getAcceptanceThreshold() external view returns (uint256)

Returns the current acceptance threshold, calculated as:

max(totalSupply * thresholdPercentTotalSupplyWAD / 1e18, minThreshold)

Get Full Acceptance Criteria

function getAcceptanceCriteria() external view returns (AcceptanceCriteria memory)

Returns the complete acceptance criteria including permissions, threshold override, and both threshold values.

Check if Threshold Reached

Compare getWeight(initiativeId) to getAcceptanceThreshold() to determine progress toward acceptance.

Weight Decay Configuration

Query Decay Settings

// Get decay curve type (0 = linear, 1 = exponential)
function decayCurveType() external view returns (uint256)
 
// Get decay parameter at index 0
function decayCurveParameters(uint256 index) external view returns (uint256)
 
// Get interval duration in seconds
function lockInterval() external view returns (uint256)
 
// Get maximum lock duration
function maxLockIntervals() external view returns (uint256)

Understanding Weight Decay

Linear Decay (Type 0):
weight = lockAmount * lockDuration - (lockAmount * elapsedIntervals * decayRate)
Exponential Decay (Type 1):
weight = lockAmount * lockDuration * (decayMultiplier ^ elapsedIntervals)

Both curves have a floor at lockAmount (nominal value).

ERC721 Position Enumeration

Standard ERC721 Functions

// Get NFT count for owner
function balanceOf(address owner) external view returns (uint256)
 
// Get token ID by index
function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256)
 
// Get total supply of NFTs
function totalSupply() external view returns (uint256)
 
// Get lock count
function lockCount() external view returns (uint256)