Rewards Berachain
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
Name | Type | Description |
---|---|---|
depositor | address | The 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
Name | Type | Description |
---|---|---|
depositor | address | The delegator address. |
receiver | address | The receiver address. |
Returns
Name | Type | Description |
---|---|---|
<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
Name | Type | Description |
---|---|---|
receiver | address | The 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
Name | Type | Description |
---|---|---|
withdrawAddress | address | The 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
Name | Type | Description |
---|---|---|
receiver | address | The receiver address. |
Returns
Name | Type | Description |
---|---|---|
<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
Name | Type | Description |
---|---|---|
receiver | address | The receiver address. |
amount | uint256 | The amount of rewards to withdraw. |
Returns
Name | Type | Description |
---|---|---|
<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
Name | Type | Description |
---|---|---|
receiver | address | The receiver address. |
recipient | address | The recipient address. |
amount | uint256 | The amount of rewards to withdraw. |
Returns
Name | Type | Description |
---|---|---|
<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
Name | Type | Description |
---|---|---|
caller | address | The caller address. |
depositor | address | The owner address. |
assets | Cosmos.Coin[] | The assets. |
shares | Cosmos.Coin | The 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
Name | Type | Description |
---|---|---|
rewardReceiver | address | the address that the withdraw is made from. |
withdrawer | address | the address that withdrawed the rewards. |
rewardRecipient | address | the address that the rewards were sent to. |
rewardAmount | Cosmos.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
Name | Type | Description |
---|---|---|
depositor | address | The owner address. |
withdrawAddress | address | The withdraw address. |