Methods
Reads
| Method | Returns | Description |
|---|---|---|
getProtocolAdminAddress() | Address | Protocol admin wallet |
getProtocolFeePercent() | bigint | Protocol fee in basis points |
getNumberOfListedPlatforms() | bigint | Total listed platform count |
checkIfPlatformIsListed(platformBytes) | boolean | Whether a platform is listed |
checkIfPlatformDataKeyValid(platformDataKey) | boolean | Whether a platform data key is valid |
getPlatformAdminAddress(platformBytes) | Address | Admin address for a platform |
getPlatformFeePercent(platformBytes) | bigint | Platform fee in basis points |
getPlatformClaimDelay(platformBytes) | bigint | Claim delay in seconds |
getPlatformAdapter(platformBytes) | Address | Platform adapter contract |
getPlatformDataOwner(platformDataKey) | Hex | Owner of a platform data key |
getPlatformLineItemType(platformHash, typeId) | LineItemTypeInfo | Line item type configuration |
getTokensForCurrency(currency) | Address[] | Accepted tokens for a currency |
getFromRegistry(key) | Hex | Value from the key-value registry |
owner() | Address | Contract owner |
Writes
All write methods returnPromise<Hex> (transaction hash).
| Method | Description |
|---|---|
enlistPlatform(platformHash, adminAddress, feePercent, adapterAddress) | Register a new platform |
delistPlatform(platformBytes) | Remove a platform |
updatePlatformAdminAddress(platformBytes, adminAddress) | Change platform admin |
updatePlatformClaimDelay(platformBytes, claimDelay) | Update claim delay |
updateProtocolAdminAddress(adminAddress) | Change protocol admin |
updateProtocolFeePercent(feePercent) | Update protocol fee |
setPlatformAdapter(platformBytes, adapterAddress) | Set platform adapter contract |
setPlatformLineItemType(platformHash, typeId, label, countsTowardGoal, applyProtocolFee, canRefund, instantTransfer) | Register a line item type |
removePlatformLineItemType(platformHash, typeId) | Remove a line item type |
addTokenToCurrency(currency, token) | Add an accepted token for a currency |
removeTokenFromCurrency(currency, token) | Remove a token from a currency |
addPlatformData(platformBytes, platformDataKey) | Add a platform data key |
removePlatformData(platformBytes, platformDataKey) | Remove a platform data key |
addToRegistry(key, value) | Set a key-value pair in the registry |
transferOwnership(newOwner) | Transfer contract ownership |
renounceOwnership() | Renounce contract ownership |
Usage examples
Read protocol configuration
Enlist a platform
Configure line item types
Query accepted tokens
Simulation
Usesimulate to dry-run write operations before sending a transaction. Simulations throw typed errors on revert without spending gas.
Related
- CampaignInfoFactory — uses GlobalParams for campaign creation
- Utilities —
keccak256,toHex, and other encoding helpers - Error Handling — decoding
GlobalParams*revert errors