Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix docstrings #57

Merged
merged 3 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/contracts/common/StaticDelegateCallable.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.25;

abstract contract StaticDelegateCallable {
import {IStaticDelegateCallable} from "../../interfaces/common/IStaticDelegateCallable.sol";

abstract contract StaticDelegateCallable is IStaticDelegateCallable {
/**
* @inheritdoc IStaticDelegateCallable
*/
function staticDelegateCall(address target, bytes calldata data) external {
(bool success, bytes memory returndata) = target.delegatecall(data);
bytes memory revertData = abi.encode(success, returndata);
Expand Down
12 changes: 12 additions & 0 deletions src/interfaces/common/IStaticDelegateCallable.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IStaticDelegateCallable {
/**
* @notice Make a delegatecall from this contract to a given target contract with a particular data (always reverts with a return data).
* @param target address of the contract to make a delegatecall to
* @param data data to make a delegatecall with
* @dev It allows to use this contract's storage on-chain.
*/
function staticDelegateCall(address target, bytes calldata data) external;
}
3 changes: 2 additions & 1 deletion src/interfaces/vault/IVault.sol
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,8 @@ interface IVault is IMigratableEntity, IVaultStorage {

/**
* @notice Get a total amount of the collateral that can be slashed for a given account.
* @return total amount of the slashable collateral
* @param account account to get the slashable collateral for
* @return total amount of the account's slashable collateral
*/
function slashableBalanceOf(
address account
Expand Down
2 changes: 1 addition & 1 deletion src/interfaces/vault/IVaultStorage.sol
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ interface IVaultStorage {
function collateral() external view returns (address);

/**
* @dev Get a burner to issue debt to (e.g., 0xdEaD or some unwrapper contract).
* @notice Get a burner to issue debt to (e.g., 0xdEaD or some unwrapper contract).
* @return address of the burner
*/
function burner() external view returns (address);
Expand Down
Loading