Skip to main content

DelegateRegistry

Functions

setDelegate

function setDelegate(
bytes32 id,
address delegate
) external

Parameters

NameTypeDescription
idbytes32
delegateaddress

clearDelegate

function clearDelegate(
bytes32 id
) external

Parameters

NameTypeDescription
idbytes32

delegation

function delegation(
address delegator,
bytes32 id
) external returns (address delegatee)

Parameters

NameTypeDescription
delegatoraddress
idbytes32

SnapshotDelegatorPCVDeposit

Functions

constructor

function constructor(
address _core,
contract IERC20 _token,
bytes32 _spaceId,
address _initialDelegate
) public

Snapshot Delegator PCV Deposit constructor

Parameters

NameTypeDescription
_coreaddressFei Core for reference
_tokencontract IERC20snapshot token
_spaceIdbytes32the id (or ENS name) of the snapshot space
_initialDelegateaddress

withdraw

function withdraw(
address to,
uint256 amountUnderlying
) external

withdraw tokens from the PCV allocation

Parameters

NameTypeDescription
toaddressthe address to send PCV to
amountUnderlyinguint256of tokens withdrawn

deposit

function deposit() external

no-op

balance

function balance() public returns (uint256)

returns total balance of PCV in the Deposit

balanceReportedIn

function balanceReportedIn() public returns (address)

display the related token of the balance reported

setSpaceId

function setSpaceId(
bytes32 _spaceId
) external

sets the snapshot space ID

Parameters

NameTypeDescription
_spaceIdbytes32

setDelegate

function setDelegate(
address newDelegate
) external

sets the snapshot delegate

Parameters

NameTypeDescription
newDelegateaddress

clearDelegate

function clearDelegate() external

clears the delegate from snapshot

_delegate

function _delegate(
address newDelegate
) internal

Parameters

NameTypeDescription
newDelegateaddress

Events

DelegateUpdate

event DelegateUpdate(
address oldDelegate,
address newDelegate
)

Parameters

NameTypeDescription
oldDelegateaddress
newDelegateaddress