⬅️ Contracts
ETH implementation for a Tokemak PCV Deposit
Author: Fei Protocol
Mainnet implementations
Core
Events
ClaimRewards
event ClaimRewards(address,address,address,uint256)
Params
Param |
Type |
Notes |
_caller |
address indexed |
|
_token |
address indexed |
|
_to |
address indexed |
|
_amount |
uint256 |
|
ContractAdminRoleUpdate
event ContractAdminRoleUpdate(bytes32,bytes32)
Params
Param |
Type |
Notes |
oldContractAdminRole |
bytes32 indexed |
|
newContractAdminRole |
bytes32 indexed |
|
CoreUpdate
event CoreUpdate(address,address)
Params
Param |
Type |
Notes |
oldCore |
address indexed |
|
newCore |
address indexed |
|
Deposit
event Deposit(address,uint256)
Params
Param |
Type |
Notes |
_from |
address indexed |
|
_amount |
uint256 |
|
Paused
event Paused(address)
Params
Param |
Type |
Notes |
account |
address |
|
RequestWithdrawal
event RequestWithdrawal(address,address,uint256)
Params
Param |
Type |
Notes |
_caller |
address indexed |
|
_to |
address indexed |
|
_amount |
uint256 |
|
Unpaused
event Unpaused(address)
Params
Param |
Type |
Notes |
account |
address |
|
WithdrawERC20
event WithdrawERC20(address,address,address,uint256)
Params
Param |
Type |
Notes |
_caller |
address indexed |
|
_token |
address indexed |
|
_to |
address indexed |
|
_amount |
uint256 |
|
WithdrawETH
event WithdrawETH(address,address,uint256)
Params
Param |
Type |
Notes |
_caller |
address indexed |
|
_to |
address indexed |
|
_amount |
uint256 |
|
Withdrawal
event Withdrawal(address,address,uint256)
Params
Param |
Type |
Notes |
_caller |
address indexed |
|
_to |
address indexed |
|
_amount |
uint256 |
|
Methods
CONTRACT_ADMIN_ROLE
function CONTRACT_ADMIN_ROLE() view returns(bytes32)
a role used with a subset of governor permissions for this contract only
Returns
balance
function balance() view returns(uint256)
returns total balance of PCV in the Deposit excluding the FEI
Returns
balanceReportedIn
function balanceReportedIn() view returns(address)
display the related token of the balance reported
Returns
claimRewards
function claimRewards(uint256,uint256,uint8,bytes32,bytes32) nonpayable
For an example of IPFS json file, see :
Params
Param |
Type |
Notes |
cycle |
uint256 |
|
amount |
uint256 |
|
v |
uint8 |
|
r |
bytes32 |
|
s |
bytes32 |
|
core
function core() view returns(address)
address of the Core contract referenced
Returns
Param |
Type |
Notes |
|
address |
ICore implementation address |
deposit
function deposit() nonpayable
deposit ETH to Tokemak
fei
function fei() view returns(address)
address of the Fei contract referenced by Core
Returns
Param |
Type |
Notes |
|
address |
IFei implementation address |
feiBalance
function feiBalance() view returns(uint256)
fei balance of contract
Returns
Param |
Type |
Notes |
|
uint256 |
fei amount held |
isContractAdmin
function isContractAdmin(address) view returns(bool)
returns whether a given address has the admin role for this contract
Params
Param |
Type |
Notes |
_admin |
address |
|
Returns
pause
function pause() nonpayable
set pausable methods to paused
paused
function paused() view returns(bool)
Returns true if the contract is paused, and false otherwise.
Returns
pool
function pool() view returns(address)
the tokemak pool to deposit in
Returns
requestWithdrawal
function requestWithdrawal(uint256) nonpayable
request to withdraw a given amount of tokens to Tokemak. These tokens will be available for withdraw in the next cycles. This function can be called by the contract admin, e.g. the OA multisig, in anticipation of the execution of a DAO proposal that will call withdraw().
note that withdraw() calls will revert if this function has not been called before.
Params
Param |
Type |
Notes |
amountUnderlying |
uint256 |
of tokens to withdraw in a subsequent withdraw() call. |
resistantBalanceAndFei
function resistantBalanceAndFei() view returns(uint256,uint256)
gets the resistant token balance and protocol owned fei of this deposit
Returns
Param |
Type |
Notes |
|
uint256 |
|
|
uint256 |
|
rewards
function rewards() view returns(address)
the tokemak rewards contract to claim TOKE incentives
Returns
setContractAdminRole
function setContractAdminRole(bytes32) nonpayable
sets a new admin role for this contract
Params
Param |
Type |
Notes |
newContractAdminRole |
bytes32 |
|
setCore
function setCore(address) nonpayable
set new Core reference address
Params
Param |
Type |
Notes |
newCore |
address |
the new core address |
token
function token() view returns(address)
the token stored in the Tokemak pool
Returns
tribe
function tribe() view returns(address)
address of the Tribe contract referenced by Core
Returns
Param |
Type |
Notes |
|
address |
IERC20 implementation address |
tribeBalance
function tribeBalance() view returns(uint256)
tribe balance of contract
Returns
Param |
Type |
Notes |
|
uint256 |
tribe amount held |
unpause
function unpause() nonpayable
set pausable methods to unpaused
withdraw
function withdraw(address,uint256) nonpayable
withdraw tokens from the PCV allocation
Params
Param |
Type |
Notes |
to |
address |
the address to send PCV to |
amountUnderlying |
uint256 |
of tokens withdrawn |
withdrawERC20
function withdrawERC20(address,address,uint256) nonpayable
withdraw ERC20 from the contract
Params
Param |
Type |
Notes |
token |
address |
address of the ERC20 to send |
to |
address |
address destination of the ERC20 |
amount |
uint256 |
quantity of ERC20 to send |
withdrawETH
function withdrawETH(address,uint256) nonpayable
withdraw ETH from the contract
Params
Param |
Type |
Notes |
to |
address |
address to send ETH |
amountOut |
uint256 |
amount of ETH to send |
⬅️ Contracts