Skip to content
Open
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
23 changes: 23 additions & 0 deletions core-pool/admins.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Admins and ownership

Most of our contracts have a dedicated admin. The admin of most of the contracts is Governance. The admin can be changed with a two-step procedure that guarantees there's no error during transferring the rights.

The interface is similar but for historical reasons some of the contracts do not revert in case of failure. These contracts return 0 if the transaction was successful and an error code otherwise.

## _setPendingAdmin

```
function _setPendingAdmin(
address newPendingAdmin
) external [returns (uint256 error)];
```

Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer. The function is only callable by admin.

## _acceptAdmin

```solidity
function _acceptAdmin() external [returns (uint256)];
```

Accepts transfer of admin rights. The function is only callable by pendingAdmin.
Loading