TransferableStakeManager
TransferStake
event TransferStake(address from, address to, uint256 stakeId)
removeTransferrability
function removeTransferrability(uint256 stakeId) external payable returns (uint256 settings)
removes transfer abilities from a stake
Parameters
Name | Type | Description |
---|---|---|
stakeId | uint256 | the stake that the sender owns and wishes to remove transfer abilities from |
_removeTransferrability
function _removeTransferrability(uint256 stakeId) internal returns (uint256 settings)
removes transfer abilities from a stake
Parameters
Name | Type | Description |
---|---|---|
stakeId | uint256 | the stake that the sender owns and wishes to remove transfer abilities from |
removeTransferrabilityFromEncodedSettings
function removeTransferrabilityFromEncodedSettings(uint256 settings) external pure returns (uint256)
rewrite encoded settings to remove the transferable flag and leave all other settings in tact
Parameters
Name | Type | Description |
---|---|---|
settings | uint256 | encoded settings to rewrite without a transferable flag |
_removeTransferrabilityFromEncodedSettings
function _removeTransferrabilityFromEncodedSettings(uint256 settings) internal pure returns (uint256)
rewrite encoded settings to remove the transferable flag and leave all other settings in tact
Parameters
Name | Type | Description |
---|---|---|
settings | uint256 | encoded settings to rewrite without a transferable flag |
canTransfer
function canTransfer(uint256 stakeId) external view returns (bool)
check if a given stake under a stake id can be transferred
Parameters
Name | Type | Description |
---|---|---|
stakeId | uint256 | the stake id to check transferrability settings |
_canTransfer
function _canTransfer(uint256 stakeId) internal view returns (bool)
check if a given stake under a stake id can be transferred
Parameters
Name | Type | Description |
---|---|---|
stakeId | uint256 | the stake id to check transferrability settings |
stakeTransfer
function stakeTransfer(uint256 stakeId, address to) external payable
transfer a stake from one owner to another
this method is only payable to reduce gas costs. Any value sent to this method will be unattributed
Parameters
Name | Type | Description |
---|---|---|
stakeId | uint256 | the stake id to transfer |
to | address | the account to receive the stake |