Skip to content

IClaimSetupManager#

Public interface for the ClaimSetupManager contract.

Events#

AllowedClaimRecipientsChanged#

Defined in IClaimSetupManager (Docs, Source).

event AllowedClaimRecipientsChanged(
    address owner,
    address[] recipients
)

ClaimExecutorFeeValueChanged#

Defined in IClaimSetupManager (Docs, Source).

event ClaimExecutorFeeValueChanged(
    address executor,
    uint256 validFromRewardEpoch,
    uint256 feeValueWei
)

ClaimExecutorsChanged#

Defined in IClaimSetupManager (Docs, Source).

event ClaimExecutorsChanged(
    address owner,
    address[] executors
)

DelegationAccountCreated#

Defined in IClaimSetupManager (Docs, Source).

event DelegationAccountCreated(
    address owner,
    contract IDelegationAccount delegationAccount
)

DelegationAccountUpdated#

Defined in IClaimSetupManager (Docs, Source).

event DelegationAccountUpdated(
    address owner,
    contract IDelegationAccount delegationAccount,
    bool enabled
)

ExecutorRegistered#

Defined in IClaimSetupManager (Docs, Source).

event ExecutorRegistered(
    address executor
)

ExecutorUnregistered#

Defined in IClaimSetupManager (Docs, Source).

event ExecutorUnregistered(
    address executor,
    uint256 validFromRewardEpoch
)

MaxFeeSet#

Defined in IClaimSetupManager (Docs, Source).

event MaxFeeSet(
    uint256 maxFeeValueWei
)

MinFeeSet#

Defined in IClaimSetupManager (Docs, Source).

event MinFeeSet(
    uint256 minFeeValueWei
)

RegisterExecutorFeeSet#

Defined in IClaimSetupManager (Docs, Source).

event RegisterExecutorFeeSet(
    uint256 registerExecutorFeeValueWei
)

SetExecutorsExcessAmountRefunded#

Defined in IClaimSetupManager (Docs, Source).

event SetExecutorsExcessAmountRefunded(
    address owner,
    uint256 excessAmount
)

Functions#

accountToDelegationAccount#

Defined in IClaimSetupManager (Docs, Source).

function accountToDelegationAccount(
    address _owner
) external view returns (
    address);

Gets the PDA of an account.

Parameters Type Description
_owner address Account to query.
Returns Type Description
[0] address Address of its PDA or address(0) if it has not been created yet.

allowedClaimRecipients#

Defined in IClaimSetupManager (Docs, Source).

function allowedClaimRecipients(
    address _rewardOwner
) external view returns (
    address[]);

Gets the addresses of recipients allowed to receive rewards on behalf of an account. Beside these, the owner of the rewards is always authorized. See setAllowedClaimRecipients.

Parameters Type Description
_rewardOwner address The account to query.
Returns Type Description
[0] address[] Addresses of all set authorized recipients.

batchDelegate#

Defined in IClaimSetupManager (Docs, Source).

function batchDelegate(
    address[] _delegatees,
    uint256[] _bips
) external;

Undelegates all percentage delegations from the caller's PDA and then delegate to a list of accounts.

See delegate.

Parameters Type Description
_delegatees address[] The addresses of the new recipients.
_bips uint256[] The percentage of voting power to be delegated to each delegatee, expressed in basis points (1/100 of one percent). Total of all _bips values must be lower than 10000.

claimExecutors#

Defined in IClaimSetupManager (Docs, Source).

function claimExecutors(
    address _owner
) external view returns (
    address[]);

Gets the addresses of executors authorized to claim for an account. See setClaimExecutors.

Parameters Type Description
_owner address The account to query.
Returns Type Description
[0] address[] Addresses of all set executors.

delegate#

Defined in IClaimSetupManager (Docs, Source).

function delegate(
    address _to,
    uint256 _bips
) external;

Delegates a percentage of the caller's PDA's voting power to another address.

Parameters Type Description
_to address The address of the recipient.
_bips uint256 The percentage of voting power to be delegated expressed in basis points (1/100 of one percent). Not cumulative: Every call resets the delegation value. A value of 0 revokes delegation.

delegateGovernance#

Defined in IClaimSetupManager (Docs, Source).

function delegateGovernance(
    address _to
) external;

Delegates all the governance vote power of the caller's PDA to another account.

Parameters Type Description
_to address Address of the recipient of the delegation.

disableDelegationAccount#

Defined in IClaimSetupManager (Docs, Source).

function disableDelegationAccount(
) external;

Disables the Personal Delegation Account (PDA).

When using automatic claiming, all airdrops and FTSO rewards will be sent to the owner's account. Rewards accrued by the PDA will no longer be automatically claimed.

Reverts if there is no PDA.

enableDelegationAccount#

Defined in IClaimSetupManager (Docs, Source).

function enableDelegationAccount(
) external returns (
    contract IDelegationAccount);

Enables (or creates) a Personal Delegation Account (PDA).

When using automatic claiming, all airdrops and FTSO rewards will be sent to the PDA, and any rewards accrued by the PDA will be claimed too.

Returns Type Description
[0] contract IDelegationAccount Address of the delegation account contract.

getDelegationAccountData#

Defined in IClaimSetupManager (Docs, Source).

function getDelegationAccountData(
    address _owner
) external view returns (
    contract IDelegationAccount _delegationAccount,
    bool _enabled);

Gets PDA data for an account.

Parameters Type Description
_owner address Account to query.
Returns Type Description
_delegationAccount contract IDelegationAccount Account's PDA address or address(0) if it has not been created yet.
_enabled bool Whether the PDA is enabled.

getExecutorCurrentFeeValue#

Defined in IClaimSetupManager (Docs, Source).

function getExecutorCurrentFeeValue(
    address _executor
) external view returns (
    uint256);

Returns the current fee of a registered executor. Reverts if the executor is not registered.

Parameters Type Description
_executor address The executor to query.
Returns Type Description
[0] uint256 Fee in wei.

getExecutorFeeValue#

Defined in IClaimSetupManager (Docs, Source).

function getExecutorFeeValue(
    address _executor,
    uint256 _rewardEpoch
) external view returns (
    uint256);

Returns the fee of an executor at a given reward epoch.

Parameters Type Description
_executor address The executor to query.
_rewardEpoch uint256 Reward Epoch ID to query.
Returns Type Description
[0] uint256 Fee in wei at that reward epoch.

getExecutorInfo#

Defined in IClaimSetupManager (Docs, Source).

function getExecutorInfo(
    address _executor
) external view returns (
    bool _registered,
    uint256 _currentFeeValue);

Returns information about an executor.

Parameters Type Description
_executor address The executor to query.
Returns Type Description
_registered bool Whether the executor is registered.
_currentFeeValue uint256 Executor's current fee value, if registered.

getExecutorScheduledFeeValueChanges#

Defined in IClaimSetupManager (Docs, Source).

function getExecutorScheduledFeeValueChanges(
    address _executor
) external view returns (
    uint256[] _feeValue,
    uint256[] _validFromEpoch,
    bool[] _fixed);

Returns the currently scheduled fee changes of an executor.

Parameters Type Description
_executor address Executor to query.
Returns Type Description
_feeValue uint256[] Array of scheduled fees.
_validFromEpoch uint256[] Array of reward epochs ID where the scheduled fees will become effective.
_fixed bool[] Array of booleans indicating if an scheduled fee change is fixed or it might still be changed.

getRegisteredExecutors#

Defined in IClaimSetupManager (Docs, Source).

function getRegisteredExecutors(
    uint256 _start,
    uint256 _end
) external view returns (
    address[] _registeredExecutors,
    uint256 _totalLength);

Returns the list of executors registered through registerExecutor. Supports paging.

Parameters Type Description
_start uint256 First executor to return.
_end uint256 Last executor to return.
Returns Type Description
_registeredExecutors address[] Addresses of the registered executors.
_totalLength uint256 Total amount of executors.

isClaimExecutor#

Defined in IClaimSetupManager (Docs, Source).

function isClaimExecutor(
    address _owner,
    address _executor
) external view returns (
    bool);

Returns whether an executor is authorized to claim on behalf of a reward owner. See setClaimExecutors.

Parameters Type Description
_owner address The reward owner to query.
_executor address The executor to query.

registerExecutor#

Defined in IClaimSetupManager (Docs, Source).

function registerExecutor(
    uint256 _feeValue
) external payable returns (
    uint256);

Registers the caller as an executor and sets its initial fee value.

If the executor was already registered, this method only updates the fee, which will take effect after feeValueUpdateOffset reward epochs have elapsed.

Executor must pay a fee in order to register. See registerExecutorFeeValueWei.

Parameters Type Description
_feeValue uint256 Desired fee, in wei. Must be between minFeeValueWei and maxFeeValueWei. 0 means no fee.
Returns Type Description
[0] uint256 Reward epoch ID when the changes become effective.

revokeDelegationAt#

Defined in IClaimSetupManager (Docs, Source).

function revokeDelegationAt(
    address _who,
    uint256 _blockNumber
) external;

Revokes all delegation from the caller's PDA to a given account at a given block.

Only affects the reads via votePowerOfAtCached() in the specified block.

This method should be used only to prevent rogue delegate voting in the current voting block. To stop delegating use delegate with percentage of 0 or undelegateAll.

Parameters Type Description
_who address The account to revoke.
_blockNumber uint256 Block number where the revoking will take place. Must be in the past.

setAllowedClaimRecipients#

Defined in IClaimSetupManager (Docs, Source).

function setAllowedClaimRecipients(
    address[] _recipients
) external;

Set the addresses of allowed recipients. The reward owner is always an allowed recipient.

Parameters Type Description
_recipients address[] The new allowed recipients. All old recipients will be deleted and replaced by these.

setAutoClaiming#

Defined in IClaimSetupManager (Docs, Source).

function setAutoClaiming(
    address[] _executors,
    bool _enableDelegationAccount
) external payable;

Sets the addresses of executors and optionally enables (creates) a Personal Delegation Account (PDA).

If any of the executors is a registered executor, some fee needs to be paid.

Parameters Type Description
_executors address[] The new executors. All old executors will be deleted and replaced by these.
_enableDelegationAccount bool Whether the PDA should be enabled.

setClaimExecutors#

Defined in IClaimSetupManager (Docs, Source).

function setClaimExecutors(
    address[] _executors
) external payable;

Sets the addresses of executors.

If any of the executors is a registered executor, some fee needs to be paid.

Parameters Type Description
_executors address[] The new executors. All old executors will be deleted and replaced by these.

transferExternalToken#

Defined in IClaimSetupManager (Docs, Source).

function transferExternalToken(
    contract IERC20 _token,
    uint256 _amount
) external;

Allows the caller to transfer ERC-20 tokens from their PDA to the owner account.

The main use case is to move ERC-20 tokes received by mistake (by an airdrop, for example) out of the PDA and into the main account, where they can be more easily managed.

Reverts if the target token is the WNat contract: use method withdraw for that.

Parameters Type Description
_token contract IERC20 Target token contract address.
_amount uint256 Amount of tokens to transfer.

undelegateAll#

Defined in IClaimSetupManager (Docs, Source).

function undelegateAll(
) external;

Removes all delegations from the caller's PDA.

undelegateGovernance#

Defined in IClaimSetupManager (Docs, Source).

function undelegateGovernance(
) external;

Undelegates all governance vote power currently delegated by the caller's PDA.

unregisterExecutor#

Defined in IClaimSetupManager (Docs, Source).

function unregisterExecutor(
) external returns (
    uint256);

Unregisters the caller as an executor.

Returns Type Description
[0] uint256 Reward epoch ID when the change becomes effective.

updateExecutorFeeValue#

Defined in IClaimSetupManager (Docs, Source).

function updateExecutorFeeValue(
    uint256 _feeValue
) external returns (
    uint256);

Sets the caller's executor fee. The caller must be an executor registered through registerExecutor.

When called multiple times inside the same reward epoch, only the last value remains.

Parameters Type Description
_feeValue uint256 Desired fee, in wei. Must be between minFeeValueWei and maxFeeValueWei. 0 means no fee.
Returns Type Description
[0] uint256 Reward epoch ID when the changes become effective.

withdraw#

Defined in IClaimSetupManager (Docs, Source).

function withdraw(
    uint256 _amount
) external;

Allows the caller to transfer WNat wrapped tokens from their PDA to the owner account.

Parameters Type Description
_amount uint256 Amount of tokens to transfer, in wei.