View Source: contracts/CappedTransfer.sol
↗ Extends: CustomPausable ↘ Derived Contracts: TransferBase
CappedTransfer
The capped transfer contract outlines the rules on the maximum amount of ERC20 or Ether transfer for each transaction.
Constants & Variables
uint256 private _maximumTransfer;
uint256 private _maximumTransferWei;
Events
event CapChanged(uint256 maximumTransfer, uint256 maximumTransferWei, uint256 oldMaximumTransfer, uint256 oldMaximumTransferWei);
- checkIfValidTransfer(uint256 amount)
- checkIfValidWeiTransfer(uint256 amount)
- setCap(uint256 cap, uint256 weiCap)
- getCap()
Ensures that the requested ERC20 transfer amount is within the maximum allowed limit.
function checkIfValidTransfer(uint256 amount) public view
returns(bool)
Returns
Returns true if the transfer request is valid and acceptable.
Arguments
Name | Type | Description |
---|---|---|
amount | uint256 | The amount being requested to be transferred out of this contract. |
Ensures that the requested wei transfer amount is within the maximum allowed limit.
function checkIfValidWeiTransfer(uint256 amount) public view
returns(bool)
Returns
Returns true if the transfer request is valid and acceptable.
Arguments
Name | Type | Description |
---|---|---|
amount | uint256 | The Ether wei unit amount being requested to be transferred out of this contract. |
Sets the maximum cap for a single ERC20 and Ether transfer.
function setCap(uint256 cap, uint256 weiCap) external nonpayable onlyOwner whenNotPaused
returns(bool)
Returns
Returns true if the operation was successful.
Arguments
Name | Type | Description |
---|---|---|
cap | uint256 | |
weiCap | uint256 |
Gets the transfer cap defined in this contract.
function getCap() external view
returns(uint256, uint256)
Returns
Returns maximum allowed value for a single transfer operation of ERC20 token and Ethereum.
Arguments
Name | Type | Description |
---|