Skip to content

Rewards Berachain

Git Source

Note: Link to existing contract ABI's can be found on Github here.

Functions

getDepositorWithdrawAddress

Returns the address of the withdraw address.

solidity
function getDepositorWithdrawAddress(address depositor) external view returns (address);
function getDepositorWithdrawAddress(address depositor) external view returns (address);

Parameters

NameTypeDescription
depositoraddressThe depositor address.

getCurrentRewards

returns the rewards for the given delegator and receiver.

solidity
function getCurrentRewards(address depositor, address receiver) external view returns (Cosmos.Coin[] memory);
function getCurrentRewards(address depositor, address receiver) external view returns (Cosmos.Coin[] memory);

Parameters

NameTypeDescription
depositoraddressThe delegator address.
receiveraddressThe receiver address.

Returns

NameTypeDescription
<none>Cosmos.Coin[]rewards rewards.

getOutstandingRewards

returns the oustanding rewards owed to a receiver.

solidity
function getOutstandingRewards(address receiver) external view returns (Cosmos.Coin[] memory);
function getOutstandingRewards(address receiver) external view returns (Cosmos.Coin[] memory);

Parameters

NameTypeDescription
receiveraddressThe receiver address.

setDepositorWithdrawAddress

Sets the caller's withdraw address.

solidity
function setDepositorWithdrawAddress(address withdrawAddress) external returns (bool);
function setDepositorWithdrawAddress(address withdrawAddress) external returns (bool);

Parameters

NameTypeDescription
withdrawAddressaddressThe withdraw address to be set.

withdrawAllDepositorRewards

Withdraws all the rewards for the given delegator and receiver.

solidity
function withdrawAllDepositorRewards(address receiver) external returns (Cosmos.Coin[] memory);
function withdrawAllDepositorRewards(address receiver) external returns (Cosmos.Coin[] memory);

Parameters

NameTypeDescription
receiveraddressThe receiver address.

Returns

NameTypeDescription
<none>Cosmos.Coin[]rewards rewards.

withdrawDepositorRewards

Withdraws the rewards for the given delegator and receiver.

solidity
function withdrawDepositorRewards(address receiver, uint256 amount) external returns (Cosmos.Coin[] memory);
function withdrawDepositorRewards(address receiver, uint256 amount) external returns (Cosmos.Coin[] memory);

Parameters

NameTypeDescription
receiveraddressThe receiver address.
amountuint256The amount of rewards to withdraw.

Returns

NameTypeDescription
<none>Cosmos.Coin[]rewards rewards.

withdrawDepositorRewardsTo

Withdraws the rewards for the given delegator and receiver, to a given address.

solidity
function withdrawDepositorRewardsTo(address receiver, address recipient, uint256 amount)
    external
    returns (Cosmos.Coin[] memory);
function withdrawDepositorRewardsTo(address receiver, address recipient, uint256 amount)
    external
    returns (Cosmos.Coin[] memory);

Parameters

NameTypeDescription
receiveraddressThe receiver address.
recipientaddressThe recipient address.
amountuint256The amount of rewards to withdraw.

Returns

NameTypeDescription
<none>Cosmos.Coin[]rewards rewards.

Events

InitializeDeposit

Emitted when a deposit is initialized.

solidity
event InitializeDeposit(address indexed caller, address indexed depositor, Cosmos.Coin[] assets, Cosmos.Coin shares);
event InitializeDeposit(address indexed caller, address indexed depositor, Cosmos.Coin[] assets, Cosmos.Coin shares);

Parameters

NameTypeDescription
calleraddressThe caller address.
depositoraddressThe owner address.
assetsCosmos.Coin[]The assets.
sharesCosmos.CoinThe shares.

WithdrawDepositRewards

Emitted when a withdraw is made.

solidity
event WithdrawDepositRewards(
    address indexed rewardReceiver,
    address indexed withdrawer,
    address indexed rewardRecipient,
    Cosmos.Coin[] rewardAmount
);
event WithdrawDepositRewards(
    address indexed rewardReceiver,
    address indexed withdrawer,
    address indexed rewardRecipient,
    Cosmos.Coin[] rewardAmount
);

Parameters

NameTypeDescription
rewardReceiveraddressthe address that the withdraw is made from.
withdraweraddressthe address that withdrawed the rewards.
rewardRecipientaddressthe address that the rewards were sent to.
rewardAmountCosmos.Coin[]the rewards that were withdrawen.

SetDepositorWithdrawAddress

Emitted when a withdraw address is set.

solidity
event SetDepositorWithdrawAddress(address indexed depositor, address indexed withdrawAddress);
event SetDepositorWithdrawAddress(address indexed depositor, address indexed withdrawAddress);

Parameters

NameTypeDescription
depositoraddressThe owner address.
withdrawAddressaddressThe withdraw address.