View Source: contracts/crowdsale/validation/IndividuallyCappedCrowdsale.sol
↗ Extends: Crowdsale, CapperRole ↘ Derived Contracts: IndividuallyCappedCrowdsaleImpl
IndividuallyCappedCrowdsale
Crowdsale with per-beneficiary caps.
Constants & Variables
mapping(address => uint256) private _contributions;
mapping(address => uint256) private _caps;
- setCap(address beneficiary, uint256 cap)
- getCap(address beneficiary)
- getContribution(address beneficiary)
- _preValidatePurchase(address beneficiary, uint256 weiAmount)
- _updatePurchasingState(address beneficiary, uint256 weiAmount)
Sets a specific beneficiary's maximum contribution.
function setCap(address beneficiary, uint256 cap) external undefined onlyCapper
Arguments
Name | Type | Description |
---|---|---|
beneficiary | address | Address to be capped |
cap | uint256 | Wei limit for individual contribution |
Returns the cap of a specific beneficiary.
function getCap(address beneficiary) public
returns(uint256)
Returns
Current cap for individual beneficiary
Arguments
Name | Type | Description |
---|---|---|
beneficiary | address | Address whose cap is to be checked |
Returns the amount contributed so far by a specific beneficiary.
function getContribution(address beneficiary) public
returns(uint256)
Returns
Beneficiary contribution so far
Arguments
Name | Type | Description |
---|---|---|
beneficiary | address | Address of contributor |
⤾ overrides Crowdsale._preValidatePurchase
Extend parent behavior requiring purchase to respect the beneficiary's funding cap.
function _preValidatePurchase(address beneficiary, uint256 weiAmount) internal
Arguments
Name | Type | Description |
---|---|---|
beneficiary | address | Token purchaser |
weiAmount | uint256 | Amount of wei contributed |
⤾ overrides Crowdsale._updatePurchasingState
Extend parent behavior to update beneficiary contributions
function _updatePurchasingState(address beneficiary, uint256 weiAmount) internal undefined
Arguments
Name | Type | Description |
---|---|---|
beneficiary | address | Token purchaser |
weiAmount | uint256 | Amount of wei contributed |
- Address
- AddressImpl
- AllowanceCrowdsale
- AllowanceCrowdsaleImpl
- Arrays
- ArraysImpl
- CappedCrowdsale
- CappedCrowdsaleImpl
- CapperRole
- CapperRoleMock
- ConditionalEscrow
- ConditionalEscrowMock
- Counter
- CounterImpl
- Crowdsale
- CrowdsaleMock
- ECDSA
- ECDSAMock
- ERC165
- ERC165Checker
- ERC165CheckerMock
- ERC165InterfacesSupported
- ERC165Mock
- ERC165NotSupported
- ERC20
- ERC20Burnable
- ERC20BurnableMock
- ERC20Capped
- ERC20Detailed
- ERC20DetailedMock
- ERC20FailingMock
- ERC20Migrator
- ERC20Mintable
- ERC20MintableMock
- ERC20Mock
- ERC20Pausable
- ERC20PausableMock
- ERC20SucceedingMock
- ERC20TokenMetadata
- ERC20WithMetadata
- ERC20WithMetadataMock
- ERC721
- ERC721Burnable
- ERC721Enumerable
- ERC721Full
- ERC721FullMock
- ERC721Holder
- ERC721Metadata
- ERC721MetadataMintable
- ERC721Mintable
- ERC721MintableBurnableImpl
- ERC721Mock
- ERC721Pausable
- ERC721PausableMock
- ERC721ReceiverMock
- Escrow
- EventEmitter
- FinalizableCrowdsale
- FinalizableCrowdsaleImpl
- IERC165
- IERC20
- IERC721
- IERC721Enumerable
- IERC721Full
- IERC721Metadata
- IERC721Receiver
- IncreasingPriceCrowdsale
- IncreasingPriceCrowdsaleImpl
- IndividuallyCappedCrowdsale
- IndividuallyCappedCrowdsaleImpl
- Math
- MathMock
- MerkleProof
- MerkleProofWrapper
- MintedCrowdsale
- MintedCrowdsaleImpl
- MinterRole
- MinterRoleMock
- Ownable
- OwnableMock
- Pausable
- PausableMock
- PauserRole
- PauserRoleMock
- PaymentSplitter
- PostDeliveryCrowdsale
- PostDeliveryCrowdsaleImpl
- PullPayment
- PullPaymentMock
- ReentrancyAttack
- ReentrancyGuard
- ReentrancyMock
- RefundableCrowdsale
- RefundableCrowdsaleImpl
- RefundEscrow
- Roles
- RolesMock
- SafeERC20
- SafeERC20Helper
- SafeMath
- SafeMathMock
- SampleCrowdsale
- SampleCrowdsaleToken
- Secondary
- SecondaryMock
- SignatureBouncer
- SignatureBouncerMock
- SignerRole
- SignerRoleMock
- SimpleToken
- SupportsInterfaceWithLookupMock
- TimedCrowdsale
- TimedCrowdsaleImpl
- TokenTimelock
- TokenVesting