- (TokenSender.sol)
View Source: contracts/governance/Vesting/TokenSender.sol
↗ Extends: Ownable
This contract includes functions to transfer SOV tokens to a recipient or to several recipients in a list. There is an ACL control check by modifier.
Constants & Variables
address public SOV;
mapping(address => bool) public admins;
Events
event SOVTransferred(address indexed receiver, uint256 amount);
event AdminAdded(address admin);
event AdminRemoved(address admin);
Throws if called by any account other than the owner or admin.
modifier onlyAuthorized() internal
- constructor(address _SOV)
- addAdmin(address _admin)
- removeAdmin(address _admin)
- transferSOVusingList(address[] _receivers, uint256[] _amounts)
- transferSOV(address _receiver, uint256 _amount)
- _transferSOV(address _receiver, uint256 _amount)
function (address _SOV) public nonpayable
Arguments
Name | Type | Description |
---|---|---|
_SOV | address |
Source Code
constructor(address _SOV) public {
require(_SOV != address(0), "SOV address invalid");
SOV = _SOV;
}
Add account to ACL.
function addAdmin(address _admin) public nonpayable onlyOwner
Arguments
Name | Type | Description |
---|---|---|
_admin | address | The addresses of the account to grant permissions. |
Source Code
function addAdmin(address _admin) public onlyOwner {
admins[_admin] = true;
emit AdminAdded(_admin);
}
Remove account from ACL.
function removeAdmin(address _admin) public nonpayable onlyOwner
Arguments
Name | Type | Description |
---|---|---|
_admin | address | The addresses of the account to revoke permissions. |
Source Code
function removeAdmin(address _admin) public onlyOwner {
admins[_admin] = false;
emit AdminRemoved(_admin);
}
Transfer given amounts of SOV to the given addresses.
function transferSOVusingList(address[] _receivers, uint256[] _amounts) public nonpayable onlyAuthorized
Arguments
Name | Type | Description |
---|---|---|
_receivers | address[] | The addresses of the SOV receivers. |
_amounts | uint256[] | The amounts to be transferred. |
Source Code
function transferSOVusingList(address[] memory _receivers, uint256[] memory _amounts)
public
onlyAuthorized
{
require(_receivers.length == _amounts.length, "arrays mismatch");
for (uint256 i = 0; i < _receivers.length; i++) {
_transferSOV(_receivers[i], _amounts[i]);
}
}
Transfer SOV tokens to given address.
function transferSOV(address _receiver, uint256 _amount) public nonpayable onlyAuthorized
Arguments
Name | Type | Description |
---|---|---|
_receiver | address | The address of the SOV receiver. |
_amount | uint256 | The amount to be transferred. |
Source Code
function transferSOV(address _receiver, uint256 _amount) public onlyAuthorized {
_transferSOV(_receiver, _amount);
}
function _transferSOV(address _receiver, uint256 _amount) internal nonpayable
Arguments
Name | Type | Description |
---|---|---|
_receiver | address | |
_amount | uint256 |
Source Code
function _transferSOV(address _receiver, uint256 _amount) internal {
require(_receiver != address(0), "receiver address invalid");
require(_amount != 0, "amount invalid");
require(IERC20(SOV).transfer(_receiver, _amount), "transfer failed");
emit SOVTransferred(_receiver, _amount);
}
- Address
- Administered
- AdminRole
- AdvancedToken
- AdvancedTokenStorage
- Affiliates
- AffiliatesEvents
- ApprovalReceiver
- BProPriceFeed
- CheckpointsShared
- Constants
- Context
- DevelopmentFund
- DummyContract
- EnumerableAddressSet
- EnumerableBytes32Set
- EnumerableBytes4Set
- ERC20
- ERC20Detailed
- ErrorDecoder
- Escrow
- EscrowReward
- FeedsLike
- FeesEvents
- FeeSharingCollector
- FeeSharingCollectorProxy
- FeeSharingCollectorStorage
- FeesHelper
- FourYearVesting
- FourYearVestingFactory
- FourYearVestingLogic
- FourYearVestingStorage
- GenericTokenSender
- GovernorAlpha
- GovernorVault
- IApproveAndCall
- IChai
- IContractRegistry
- IConverterAMM
- IERC1820Registry
- IERC20_
- IERC20
- IERC777
- IERC777Recipient
- IERC777Sender
- IFeeSharingCollector
- IFourYearVesting
- IFourYearVestingFactory
- IFunctionsList
- ILiquidityMining
- ILiquidityPoolV1Converter
- ILoanPool
- ILoanToken
- ILoanTokenLogicBeacon
- ILoanTokenLogicModules
- ILoanTokenLogicProxy
- ILoanTokenModules
- ILoanTokenWRBTC
- ILockedSOV
- IMoCState
- IModulesProxyRegistry
- Initializable
- InterestUser
- IPot
- IPriceFeeds
- IPriceFeedsExt
- IProtocol
- IRSKOracle
- ISovryn
- ISovrynSwapNetwork
- IStaking
- ISwapsImpl
- ITeamVesting
- ITimelock
- IV1PoolOracle
- IVesting
- IVestingFactory
- IVestingRegistry
- IWrbtc
- IWrbtcERC20
- LenderInterestStruct
- LiquidationHelper
- LiquidityMining
- LiquidityMiningConfigToken
- LiquidityMiningProxy
- LiquidityMiningStorage
- LoanClosingsEvents
- LoanClosingsLiquidation
- LoanClosingsRollover
- LoanClosingsShared
- LoanClosingsWith
- LoanClosingsWithoutInvariantCheck
- LoanInterestStruct
- LoanMaintenance
- LoanMaintenanceEvents
- LoanOpenings
- LoanOpeningsEvents
- LoanParamsStruct
- LoanSettings
- LoanSettingsEvents
- LoanStruct
- LoanToken
- LoanTokenBase
- LoanTokenLogicBeacon
- LoanTokenLogicLM
- LoanTokenLogicProxy
- LoanTokenLogicStandard
- LoanTokenLogicStorage
- LoanTokenLogicWrbtc
- LoanTokenSettingsLowerAdmin
- LockedSOV
- MarginTradeStructHelpers
- Medianizer
- ModuleCommonFunctionalities
- ModulesCommonEvents
- ModulesProxy
- ModulesProxyRegistry
- MultiSigKeyHolders
- MultiSigWallet
- Mutex
- Objects
- OrderStruct
- OrigingVestingCreator
- OriginInvestorsClaim
- Ownable
- Pausable
- PausableOz
- PreviousLoanToken
- PreviousLoanTokenSettingsLowerAdmin
- PriceFeedRSKOracle
- PriceFeeds
- PriceFeedsLocal
- PriceFeedsMoC
- PriceFeedV1PoolOracle
- ProtocolAffiliatesInterface
- ProtocolLike
- ProtocolSettings
- ProtocolSettingsEvents
- ProtocolSettingsLike
- ProtocolSwapExternalInterface
- ProtocolTokenUser
- Proxy
- ProxyOwnable
- ReentrancyGuard
- RewardHelper
- RSKAddrValidator
- SafeERC20
- SafeMath
- SafeMath96
- setGet
- SharedReentrancyGuard
- SignedSafeMath
- SOV
- sovrynProtocol
- StakingAdminModule
- StakingGovernanceModule
- StakingInterface
- StakingProxy
- StakingRewards
- StakingRewardsProxy
- StakingRewardsStorage
- StakingShared
- StakingStakeModule
- StakingStorageModule
- StakingStorageShared
- StakingVestingModule
- StakingWithdrawModule
- State
- SwapsEvents
- SwapsExternal
- SwapsImplLocal
- SwapsImplSovrynSwap
- SwapsUser
- TeamVesting
- Timelock
- TimelockHarness
- TimelockInterface
- TokenSender
- UpgradableProxy
- USDTPriceFeed
- Utils
- VaultController
- Vesting
- VestingCreator
- VestingFactory
- VestingLogic
- VestingRegistry
- VestingRegistry2
- VestingRegistry3
- VestingRegistryLogic
- VestingRegistryProxy
- VestingRegistryStorage
- VestingStorage
- WeightedStakingModule
- WRBTC