ProjectSale | Address 0xa3169755c89807a7c3a70eb29fe3134cbc8cb387 | BscScan (2024)

ProjectSale | Address 0xa3169755c89807a7c3a70eb29fe3134cbc8cb387 | BscScan (1)

0xA3169755C89807A7C3A70eb29FE3134cBc8cB387

Sponsored

MetaMask Manage your web3 everything with MetaMask Portfolio. Try Now!Ready to onboard to BNB Smart Chain? With MetaMask Portfolio, you're in control.

ZeeDex Earn $Zdex with each swap. Swap Now You will earn $Zdex as rewards for any trade or stake on ZeeDex exchange.

NexoJoin the hunt for $12,000,000+ in NEXO Tokens. Get NEXOCollect points for eligible actions and use multipliers to win big.

Sponsored

Sponsored

Сoins.game - 100 free spins for registration. Spin Now! Everyday giveaways up to 8.88BTC, Lucky Spins.Deposit BONUS 300% and Cashbacks!

NanoGames.io Daily Free Spin to win 10 ETH Free SpinStart your new gambling journey with NanoGames and claim free spin and lottery tickets!

Sponsored

BC.GAME The Best BNB Casino with 1,000,000 BNB Daily Bonus. Claim Now5000+ Slots, Live casino games, 50+ cryptos, 100% bet insurance. Register with Bscscan and get 240% first deposit bonus.

Source Code

  • Token Approvals Beta
  • Check Previous Balance
  • Update Name Tag or Label
  • Report/Flag Address

Overview

BNB Balance

ProjectSale | Address 0xa3169755c89807a7c3a70eb29fe3134cbc8cb387 | BscScan (12)ProjectSale | Address 0xa3169755c89807a7c3a70eb29fe3134cbc8cb387 | BscScan (13)ProjectSale | Address 0xa3169755c89807a7c3a70eb29fe3134cbc8cb387 | BscScan (14)0 BNB

BNB Value

$0.00

More Info

Private Name Tags

Add

ContractCreator:

0x5424404D...43027a4A1 at txn 0xc1d563a7cfa0fa2691058caec5e8c4a3de73d438d4bbc6649ab856823b32dd23

  • Transactions
  • Token Transfers (BEP-20)
  • Contract
  • Events
  • Analytics

Advanced Filter

  • Filter by Tx Type:
  • Tx
  • BEP-20

Latest 25 from a total of 39 transactions

  • View Completed Txns
  • View Pending Txns
  • View Failed Txns
  • View Outgoing Txns
  • View Incoming Txns
  • View Contract Creation
Transaction Hash

Method

Block

From

To

Value

0x7d1a772e3fe7e5d0dda007f817e4839d786878ff695efa376a63b087a542ef8d

Pause3906097818 hrs ago

0x5424404D...43027a4A1

IN

0xA3169755...cBc8cB387

0 BNB0.0000834

0x1658041ced63dd51045e9fc9038208448c28317acafb03e6b1150b4ef670a9a4

Deposit3905813621 hrs ago

0x57BfF8a4...26538090A

IN

0xA3169755...cBc8cB387

0 BNB0.00039286

0xde4c6e09ee976041242bde73922b7a3897cecbae6700e29836c27cb49144adb5

Deposit3905808721 hrs ago

0xc9Cab456...E872B4967

IN

0xA3169755...cBc8cB387

0 BNB0.00039286

0x449229ed510712e686b91652753184734336e4c36ee9d57f4885450aa9a206a2

Deposit3905785121 hrs ago

0xAA05BD88...538b6c8C5

IN

0xA3169755...cBc8cB387

0 BNB0.00039286

0x37a33fa7d60a55ae28320ae442d30cd3ef95b82b49524f0f878c6bc457c02d15

Deposit3905777621 hrs ago

0x88015D43...aB1EA3971

IN

0xA3169755...cBc8cB387

0 BNB0.00058773

0x18a2194aeac6cea8efe618a87d36c0c7c688526a3debb8f6b7749bc05124c51c

Deposit3905771221 hrs ago

0xF41C9873...6fa157e06

IN

0xA3169755...cBc8cB387

0 BNB0.00039286

0xaad24539ea2d8c523f64c8ebf6825ca466260068d88cc29bc960f0da2ebdbfe4

Deposit3905586023 hrs ago

0xe2e66DD7...11a8203D2

IN

0xA3169755...cBc8cB387

0 BNB0.00058773

0xcfb30ae9a3d56b51d82c2c330a35c6d30bf6c74cecd9980aa57f6e539fe4464f

Deposit3905510923 hrs ago

0x12be9DC0...2099A1844

IN

0xA3169755...cBc8cB387

0 BNB0.00058773

0xfb05841b4e6d93c9c89edadeebf0a01978dee3e4c390cd9aeefc69f8d8babc47

Deposit3904852429 hrs ago

0x7c0fE856...6e86CD3b8

IN

0xA3169755...cBc8cB387

0 BNB0.00019591

0x2e4990de59850a8dc3cb46f6c1753df8afa5021fb50f2a64e313005fc4973e41

Deposit3902947745 hrs ago

0xB5787ad7...043478851

IN

0xA3169755...cBc8cB387

0 BNB0.00058773

0x261515b10809f8819c942831e953621b2a5f96eccbe1da10cefb58b9c2fc9d0a

Deposit3902793046 hrs ago

0x84402D91...76bC29196

IN

0xA3169755...cBc8cB387

0 BNB0.00058773

0x8bced0a1d16eacd9f7ac055d3cc6101e805a8fbf4a169662a1ebe962f87770bc

Deposit3902745046 hrs ago

0xE6901A12...86D20aD5d

IN

0xA3169755...cBc8cB387

0 BNB0.00058773

0xd5fc8c82fcd14c4d6002d40b68acf1ee87b4d6ca4be1723f1afbe22cddb32bdc

Admin Register3902726047 hrs ago

0x5424404D...43027a4A1

IN

0xA3169755...cBc8cB387

0 BNB0.00022561

0x5a5e1d542cc43d21780b94eba9c9cc1cfd33577560bc45d253b83aa09dfbd501

Deposit390096852 days ago

0xCD9DaA0b...39355CFab

IN

0xA3169755...cBc8cB387

0 BNB0.00058773

0x6ee76b662e4ed8f420448afa0828baadef9e01a64eedb37950395ed37bb617f3

Deposit390092592 days ago

0x99aC3853...8616125af

IN

0xA3169755...cBc8cB387

0 BNB0.00058773

0xfbf128ce910a2c6cd37fd47a48d8505d739926f9116978a6c304b755821db626

Deposit390091812 days ago

0x2364797F...941c86AFd

IN

0xA3169755...cBc8cB387

0 BNB0.00058773

0x836b21b3a91108d0015a718ca43dcda97e838e8621858099e80c6d795960cfe4

Deposit390088232 days ago

0xAA05BD88...538b6c8C5

IN

0xA3169755...cBc8cB387

0 BNB0.00058773

0xbf3248d295ebbc375b82936f90a71f65429772764440cb433e38867df4920ae6

Deposit390087562 days ago

0xc9Cab456...E872B4967

IN

0xA3169755...cBc8cB387

0 BNB0.00058773

0x253f0b5b605d3eb16ab5d761a7c956605cc2cc50dc35f907dff17b447b3a7c4a

Deposit390086512 days ago

0x57BfF8a4...26538090A

IN

0xA3169755...cBc8cB387

0 BNB0.00058773

0xa6a063d70b804a5fc552c07929f8d3e3efb37d084ff51517d6edd19e72d2bb8b

Deposit390083512 days ago

0x6640c824...DCB503320

IN

0xA3169755...cBc8cB387

0 BNB0.00058773

0xd238bb019d8bd2ad7300d396a10ca45aa355735c7c6defe4660a1ff0419ec72e

Deposit390076442 days ago

0xF41C9873...6fa157e06

IN

0xA3169755...cBc8cB387

0 BNB0.00058773

0x33e9a2c403d0414c544e2cb10adc0278c542a9230817ebcfe18e4918af54094f

Deposit390075082 days ago

0xa445Df80...C13772fF1

IN

0xA3169755...cBc8cB387

0 BNB0.00057333

0x4967912dc483669d9cf1927695d1e7179dadd6492fba4fd9d38db594c01e4525

Deposit390051842 days ago

0x1fBDCdb7...88C61E5e4

IN

0xA3169755...cBc8cB387

0 BNB0.00075603

0xd21fa55b1faa746a12cddd95047f70ba7df801113fe5a94c2b800f6aca20c0f4

Unpause390042892 days ago

0x5424404D...43027a4A1

IN

0xA3169755...cBc8cB387

0 BNB0.00008319

0xb33c2772a758aee0cd0f63c29bb1ca5a58c987ca66c42a92a855d085d596e61a

Pause390041242 days ago

0x5424404D...43027a4A1

IN

0xA3169755...cBc8cB387

0 BNB0.0000834

View all transactions

Parent Transaction HashBlockFromToValue

View All Internal Transactions

Loading...

Loading

  • Code
  • Read Contract
  • Write Contract

Similar Match Source Code

This contract matches the deployed Bytecode of the Source Code for Contract 0x11ef33EA...Ccca7F31e

The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:

ProjectSale

Compiler Version

v0.8.16+commit.07a7930e

Optimization Enabled:

Yes with 200 runs

Other Settings:

default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

ProjectSale | Address 0xa3169755c89807a7c3a70eb29fe3134cbc8cb387 | BscScan (15)ProjectSale | Address 0xa3169755c89807a7c3a70eb29fe3134cbc8cb387 | BscScan (16)ProjectSale | Address 0xa3169755c89807a7c3a70eb29fe3134cbc8cb387 | BscScan (17)IDE

  • Similar
  • Sol2Uml
  • Submit Audit
  • Compare

File 1 of 20 : ProjectSale.sol

// SPDX-License-Identifier: BSD-3-Clausepragma solidity 0.8.16;import "@openzeppelin/contracts/access/Ownable.sol";import "@openzeppelin/contracts/security/Pausable.sol";import "@openzeppelin/contracts/security/ReentrancyGuard.sol";import "@openzeppelin/contracts/utils/math/SafeMath.sol";import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";import "contracts/allocation/IAllocationProvider.sol";import "contracts/kyc/IKYCProvider.sol";import "@openzeppelin/contracts/utils/structs/EnumerableMap.sol";import "contracts/projectSale/AbstractProjectSale.sol";import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";import "contracts/staking/IStakingAmounts.sol";/** * @title ProjectSale contract * @author Finceptor * @notice This contract is responsible for the sale of a project' tokens. * @dev Used with the following contracts: * - KYCProvider * - StakingAllocationProvider */contract ProjectSale is AbstractProjectSale, ReentrancyGuard, Pausable, Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; using EnumerableMap for EnumerableMap.AddressToUintMap; using EnumerableSet for EnumerableSet.AddressSet; struct Providers { /// @notice External providers for allocation and KYC address kycProvider; /// @notice allocation provider external contracts address allocationProvider; } struct SaleDetails { /// @notice Total value of tokens to be sold uint256 totalSaleValueCap; /// @notice Price of the project token uint256 projectTokenPrice; /// @notice Amount of project tokens to be sold uint256 projectTokenAmount; /// @notice Address to claim deposited funds address saleClaimAddress; /// @notice Address to claim fees address feeClaimAddress; /// @notice Total current value of tokens sold uint256 totalSaleValue; /// @notice Total current public sale value uint256 totalPublicSaleValue; /// @notice Pubic sale deposit cap per user uint256 publicSaleDepositCap; /// @notice The Staking Amounts holder contract IStakingAmounts stakingAmounts; /// @notice Minimum stake amount to participate in the public sale uint256 minStake; /// @notice The fee taken on registers uint256 registerFee; /// @notice The nominator of the allocation multiplier on public round uint8 nom; /// @notice The denominator of the allocation multiplier on public round uint8 denom; } /** * @notice Sale status enum * @dev `NOT_FINALIZED` sale has not been finalized yet * @dev `FINALIZED` sale has been finalized */ enum SaleStatus { NOT_FINALIZED, FINALIZED } bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /// @notice Sale status SaleStatus private _saleStatus; /// @notice Fee to be taken on public round deposits uint8 public FCFS_ROUND_FEE = 15; // 10% uint8 public PUBLIC_ROUND_FEE = 10; // 10% uint8 public STAKING_ROUND_FEE = 0; // 0% bool public isFcfs = false; /// @notice External providers for allocation, KYC Providers public providers; /// @notice Sale details SaleDetails public saleDetails; /// @notice USD token to be used for staking and public round deposits IERC20 public immutable usdToken; /// @notice Project token to be sold IERC20 public immutable projectToken; /// @notice Address to claim deposited funds address public saleClaimAddress; /// @notice Address to claim fees address public feeClaimAddress; /// @notice Mapping of deposited values of addresses EnumerableMap.AddressToUintMap private _depositBalances; /// @notice Mapping of credit deposited values of addresses EnumerableMap.AddressToUintMap private _creditDepositBalances; /// @notice Public sale deposit balances mapping(address => uint256) private _publicSaleDepositBalances; /// @notice Mapping of registered addresses EnumerableSet.AddressSet private _participants; /** * @notice Modifier to check if the address is whitelisted or not */ modifier onlyWhiteListed(address _account) { require( IKYCProvider(providers.kycProvider).isWhitelisted(_account), "ProjectSale: account is not whitelisted" ); _; } /** * @notice Constructor for ProjectSale contract that initializes the sale. * @param _saleTimes Sale times * @param _providers External providers for allocation and KYC * @param _usdToken Address of USD token * @param _projectToken Address of project token * @param _projectTokenPrice Price of project token * @param _projectTokenAmount Amount of project tokens to be sold * @param _totalSaleValueCap Total value of tokens to be sold * @param _saleClaimAddress Address to claim deposited funds * @param _feeClaimAddress Address to claim fees * @dev _projectTokenPrice * _projectTokenAmount == _totalSaleValueCap */ constructor( SaleTimes memory _saleTimes, Providers memory _providers, address _usdToken, address _projectToken, uint256 _projectTokenPrice, uint256 _projectTokenAmount, uint256 _totalSaleValueCap, address _saleClaimAddress, address _feeClaimAddress ) AbstractProjectSale(_saleTimes) { require( (_projectTokenPrice * _projectTokenAmount) / (10 ** 18) == _totalSaleValueCap, "ProjectSale: invalid sale value" ); require( address(_providers.allocationProvider) != address(0), "ProjectSale: allocation provider cannot be zero address" ); require( address(_providers.kycProvider) != address(0), "ProjectSale: kyc provider cannot be zero address" ); // Sale Details usdToken = IERC20(_usdToken); projectToken = IERC20(_projectToken); saleDetails.totalSaleValueCap = _totalSaleValueCap; saleDetails.projectTokenPrice = _projectTokenPrice; saleDetails.projectTokenAmount = _projectTokenAmount; saleDetails.publicSaleDepositCap = 250 * (10 ** 18); _saleStatus = SaleStatus.NOT_FINALIZED; // External providers for allocation and KYC providers = _providers; feeClaimAddress = _feeClaimAddress; saleClaimAddress = _saleClaimAddress; saleDetails.nom = 3; saleDetails.denom = 4; } function setSaleCap(uint256 _totalSaleValueCap) external onlyOwner { saleDetails.totalSaleValueCap = _totalSaleValueCap; } function setFees( uint8 _stakingRoundFee, uint8 _publicRoundFee, uint8 _fcsfRoundFee ) external onlyOwner { STAKING_ROUND_FEE = _stakingRoundFee; PUBLIC_ROUND_FEE = _publicRoundFee; FCFS_ROUND_FEE = _fcsfRoundFee; } function setPublicRoundMultiplier(uint8 _nom, uint8 _denom) external onlyOwner { saleDetails.nom = _nom; saleDetails.denom = _denom; } function activateFCFS() external onlyOwner { require(!isFcfs, "ProjectSale: FCFS is already active"); require( saleTimes.publicRoundStart < block.timestamp, "ProjectSale: Public round has not started yet" ); isFcfs = true; } function deactivateFCFS() external onlyOwner { require(isFcfs, "ProjectSale: FCFS is already inactive"); isFcfs = false; } function pause() external onlyOwner { _pause(); } function unpause() external onlyOwner { _unpause(); } function setRegisterFee(uint256 _registerFee) external onlyOwner { saleDetails.registerFee = _registerFee; } function setStakingAmounts(address _stakingAmounts, uint256 _minStake) external onlyOwner { require( address(_stakingAmounts) != address(0), "ProjectSale: staking amounts cannot be zero address" ); saleDetails.stakingAmounts = IStakingAmounts(_stakingAmounts); saleDetails.minStake = _minStake; } function updateKycProvider(address _kycProvider) external onlyOwner { require(_kycProvider != address(0), "ProjectSale: kyc provider cannot be zero address"); providers.kycProvider = _kycProvider; } function updateAllocationProvider(address _allocationProvider) external onlyOwner { require( _allocationProvider != address(0), "ProjectSale: allocation provider cannot be zero address" ); providers.allocationProvider = _allocationProvider; } /** * @notice Fuction to update sale times. * @dev Can only be called by the owner. And when sale is not finalized. * @param _saleTimes New sale times. */ function updateTimes(SaleTimes memory _saleTimes) external override onlyOwner { require(_saleStatus == SaleStatus.NOT_FINALIZED, "ProjectSale: sale is finalized"); require( _saleTimes.registerStart < _saleTimes.registerEnd && _saleTimes.stakingRoundStart < _saleTimes.stakingRoundEnd && _saleTimes.publicRoundStart < _saleTimes.publicRoundEnd, "ProjectSale: invalid time" ); require( _saleTimes.registerEnd < _saleTimes.stakingRoundStart && _saleTimes.stakingRoundEnd < _saleTimes.publicRoundStart, "ProjectSale: invalid time" ); saleTimes = _saleTimes; } /** * @notice Fuction to update public sale deposit cap. * @dev Can only be called by the owner. * @param _publicSaleDepositCap New public sale deposit cap. */ function setPublicSaleCap(uint256 _publicSaleDepositCap) external onlyOwner { require(_publicSaleDepositCap > 0, "ProjectSale: cap cannot be zero"); saleDetails.publicSaleDepositCap = _publicSaleDepositCap; } /** * @notice Fuction to update sale funds receiver address. * @dev Can only be called by the owner. * @param _newAddress New sale funds receiver address. */ function updateSaleClaimAddress(address _newAddress) external onlyOwner { require(_newAddress != address(0), "ProjectSale: address cannot be zero"); saleClaimAddress = _newAddress; } /** * @notice Fuction to update fee funds receiver address. * @dev Can only be called by the owner. * @param _newAddress New fee funds receiver address. */ function updateFeeClaimAddress(address _newAddress) external onlyOwner { require(_newAddress != address(0), "ProjectSale: address cannot be zero"); feeClaimAddress = _newAddress; } /** * @notice Registers the sender to the sale. * @dev Only allowed during registeration period. */ function register() external payable override whenNotPaused onlyDuringRegisteration { require(!isRegistered(msg.sender), "ProjectSale: already registered"); require(msg.value >= saleDetails.registerFee, "ProjectSale: insufficient fee"); _participants.add(msg.sender); if (msg.value > 0) { (bool sent, ) = payable(feeClaimAddress).call{value: msg.value}(""); require(sent, "Failed to send fee"); } emit Registered(msg.sender); } /** * @notice Registers the given address to the sale. * @dev Only allowed before staking period start and by the contract owner. * @param _user Address to be registered. */ function adminRegister(address _user) external onlyOwner whenNotPaused { require(!isRegistered(_user), "ProjectSale: already registered"); _participants.add(_user); emit Registered(_user); } /** * @notice Registers the given addresses to the sale. * @dev Only allowed before staking period start and by the contract owner. * @param _users Addresses to be registered. */ function batchAdminRegister(address[] memory _users) external onlyOwner whenNotPaused { for (uint256 i = 0; i < _users.length; i++) { //require(!isRegistered(_users[i]), "ProjectSale: already registered"); if (!isRegistered(_users[i])) { _participants.add(_users[i]); emit Registered(_users[i]); } } } /** * @notice Function to deposit tokens to the sale. * Deposits from whitelisted account are allowed * if it is during the staking round and the account is registered or * if it is during the public round. * @dev Also includes depositable amount from credit token, * `creditDeposit()` should be used first if user has credit. * @param _amount is the amount of tokens to be deposited */ function deposit( uint256 _amount ) external override nonReentrant whenNotPaused onlyWhiteListed(msg.sender) //@note Give alloc to staker, registers, whitelist ortak kume { require(_amount > 0, "ProjectSale: amount is zero"); require( (isStakingRound() && isRegistered(msg.sender)) || isPublicRound(), "ProjectSale: not allowed to deposit" ); uint256 depositableAmount = depositableOf(msg.sender); require(depositableAmount > 0, "ProjectSale: depositable amount is zero"); uint256 fee; if (isPublicRound()) { require( saleDetails.stakingAmounts.stakedOf(msg.sender) >= saleDetails.minStake, "ProjectSale: You do not have enough Staked FINC to participate in the Public Sale" ); require( _publicSaleDepositBalances[msg.sender] + _amount <= saleDetails.publicSaleDepositCap, "ProjectSale: amount exceeds depositable amount" ); if (_amount > depositableAmount) { _amount = depositableAmount; } if (isFcfs) { fee = (_amount * FCFS_ROUND_FEE) / 100; } else { fee = (_amount * PUBLIC_ROUND_FEE) / 100; } _publicSaleDepositBalances[msg.sender] += _amount; saleDetails.totalPublicSaleValue += _amount; } else { require(_amount <= depositableAmount, "ProjectSale: amount exceeds depositable amount"); fee = (_amount * STAKING_ROUND_FEE) / 100; } (bool found, uint256 _deposited) = _depositBalances.tryGet(msg.sender); if (found) { _depositBalances.set(msg.sender, _deposited + _amount); } else { _depositBalances.set(msg.sender, _amount); } saleDetails.totalSaleValue += _amount; usdToken.safeTransferFrom(msg.sender, saleClaimAddress, _amount); if (fee > 0) { require( usdToken.balanceOf(msg.sender) >= fee, "ProjectSale: insufficient balance for fee" ); usdToken.safeTransferFrom(msg.sender, feeClaimAddress, fee); } emit Deposit(msg.sender, _amount); } /** * @notice Function to get the total number of participants. * @return uint256 is the total number of participants. */ function participantCount() external view returns (uint256) { return _participants.length(); } /** * @notice Function to get the participant at the given index. * @param index is the index of the participant. * @return address is the participant. */ function participantAt(uint256 index) external view returns (address) { require(index < _participants.length(), "ProjectSale: index out of bounds"); return _participants.at(index); } /** * @notice Function to get participants between the given indexes. * @param start is the start index. * @param end is the end index. * @return address[] is the array of participants. */ function participantsBetween( uint256 start, uint256 end ) external view returns (address[] memory) { require(start <= end, "ProjectSale: start > end"); require(end <= _participants.length(), "ProjectSale: index out of bounds"); address[] memory _participantsArray = new address[](end - start); for (uint256 i = start; i < end; i++) { _participantsArray[i - start] = _participants.at(i); } return _participantsArray; } /** * @notice Function to view the total sale value * @return uint256 is the total sale value. */ function totalSaleValue() external view returns (uint256) { return saleDetails.totalSaleValue; } /** * @notice Function to view the total sale value cap * @return uint256 is the total sale value cap. */ function totalSaleValueCap() external view returns (uint256) { return saleDetails.totalSaleValueCap; } /** * @notice Function to view the total public sale deposited of a user * @param _account is the address to check. * @return uint256 is the total public sale deposited. */ function publicSaleDepositedOf(address _account) external view returns (uint256) { return _publicSaleDepositBalances[_account]; } /** * @notice Function to view the final deposit value of any given amount with fees included. * @param _amount is the amount to check. * @return uint256 is the final deposit value with fees. */ function depositAmountWithFees(uint256 _amount) external view override returns (uint256) { if ( block.timestamp >= saleTimes.stakingRoundStart && block.timestamp <= saleTimes.stakingRoundEnd ) { return (_amount * (100 + STAKING_ROUND_FEE)) / 100; } if ( block.timestamp >= saleTimes.publicRoundStart && block.timestamp <= saleTimes.publicRoundEnd ) { if (isFcfs) { return (_amount * (100 + FCFS_ROUND_FEE)) / 100; } else { return (_amount * (100 + PUBLIC_ROUND_FEE)) / 100; } } return _amount; } function getDepositAmounts( uint256 _start, uint256 _end ) external view returns (address[] memory, uint256[] memory) { if (_end > _depositBalances.length()) { _end = _depositBalances.length(); } require(_start < _end, "Invalid start index"); address[] memory addresses = new address[](_end - _start); uint256[] memory amounts = new uint256[](_end - _start); for (uint256 i = _start; i < _end; i++) { (address _address, uint256 _amount) = _depositBalances.at(i); addresses[i - _start] = _address; amounts[i - _start] = _amount; } return (addresses, amounts); } /** * @notice Function to see if an address is registered or not. * @param _account is the address to check. * @return bool is if the address is registered or not. */ function isRegistered(address _account) public view override returns (bool) { return _participants.contains(_account); } /** * @notice Function to see total deposited amount of an address. * @param _account is the address to check. * @return uint256 is the total deposited amount. */ function depositedOf(address _account) public view override returns (uint256) { (bool success, uint256 _deposited) = _depositBalances.tryGet(_account); if (success) { return _deposited; } return 0; } /** * @notice Function to see remaining depositable amount from direct and staking alloction of an address. * @dev If its the public round, every address gets the same amount. * @param _account is the address to check. * @return uint256 is the remaining depositable amount. */ function depositableOf(address _account) public view override returns (uint256) { if (isRegistered(_account) && isStakingRound()) { return stakingRoundAllocationOf(_account); } else if (isPublicRound() && !isFcfs) { return publicRoundAllocationOf(_account); } else if (isPublicRound() && isFcfs) { return saleDetails.publicSaleDepositCap - _publicSaleDepositBalances[_account] < saleDetails.totalSaleValueCap - saleDetails.totalSaleValue ? saleDetails.publicSaleDepositCap - _publicSaleDepositBalances[_account] : saleDetails.totalSaleValueCap - saleDetails.totalSaleValue; } else { return 0; } } /** * @notice Function to see remaining depositable amount from direct and staking alloction of an address. * @dev Only relevant in the staking round. * @param _account is the address to check. * @return uint256 is the remaining depositable amount. */ function stakingRoundAllocationOf(address _account) public view override returns (uint256) { return IAllocationProvider(providers.allocationProvider).allocationOf(_account) - depositedOf(_account); } function publicRoundAllocationOf(address _account) public view override returns (uint256) { uint256 alloc = (IAllocationProvider(providers.allocationProvider).allocationOf(_account) * saleDetails.nom) / saleDetails.denom; if (alloc > saleDetails.publicSaleDepositCap) { alloc = saleDetails.publicSaleDepositCap; } alloc = alloc - _publicSaleDepositBalances[_account]; if (alloc > saleDetails.totalSaleValueCap - saleDetails.totalSaleValue) { alloc = saleDetails.totalSaleValueCap - saleDetails.totalSaleValue; } return alloc; }}

File 1 of 20 : Ownable.sol

// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)pragma solidity ^0.8.0;import "../utils/Context.sol";/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); }}

File 1 of 20 : Pausable.sol

// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)pragma solidity ^0.8.0;import "../utils/Context.sol";/** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { _requireNotPaused(); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { _requirePaused(); _; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { require(!paused(), "Pausable: paused"); } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { require(paused(), "Pausable: not paused"); } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); }}

File 1 of 20 : ReentrancyGuard.sol

// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)pragma solidity ^0.8.0;/** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } /** * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a * `nonReentrant` function in the call stack. */ function _reentrancyGuardEntered() internal view returns (bool) { return _status == _ENTERED; }}

File 1 of 20 : ERC20.sol

// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)pragma solidity ^0.8.0;import "./IERC20.sol";import "./extensions/IERC20Metadata.sol";import "../../utils/Context.sol";/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * The default value of {decimals} is 18. To change this, you should override * this function so it returns a different value. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the default value returned by this function, unless * it's overridden. * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address to, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _transfer(owner, to, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _approve(owner, spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. * - the caller must have allowance for ``from``'s tokens of at least * `amount`. */ function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, amount); _transfer(from, to, amount); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { address owner = _msgSender(); _approve(owner, spender, allowance(owner, spender) + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { address owner = _msgSender(); uint256 currentAllowance = allowance(owner, spender); require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(owner, spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `amount` of tokens from `from` to `to`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. */ function _transfer(address from, address to, uint256 amount) internal virtual { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(from, to, amount); uint256 fromBalance = _balances[from]; require(fromBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[from] = fromBalance - amount; // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by // decrementing then incrementing. _balances[to] += amount; } emit Transfer(from, to, amount); _afterTokenTransfer(from, to, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; unchecked { // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above. _balances[account] += amount; } emit Transfer(address(0), account, amount); _afterTokenTransfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); unchecked { _balances[account] = accountBalance - amount; // Overflow not possible: amount <= accountBalance <= totalSupply. _totalSupply -= amount; } emit Transfer(account, address(0), amount); _afterTokenTransfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Updates `owner` s allowance for `spender` based on spent `amount`. * * Does not update the allowance amount in case of infinite allowance. * Revert if not enough allowance is available. * * Might emit an {Approval} event. */ function _spendAllowance(address owner, address spender, uint256 amount) internal virtual { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance != type(uint256).max) { require(currentAllowance >= amount, "ERC20: insufficient allowance"); unchecked { _approve(owner, spender, currentAllowance - amount); } } } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}}

File 1 of 20 : ERC20Burnable.sol

// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Burnable.sol)pragma solidity ^0.8.0;import "../ERC20.sol";import "../../../utils/Context.sol";/** * @dev Extension of {ERC20} that allows token holders to destroy both their own * tokens and those that they have an allowance for, in a way that can be * recognized off-chain (via event analysis). */abstract contract ERC20Burnable is Context, ERC20 { /** * @dev Destroys `amount` tokens from the caller. * * See {ERC20-_burn}. */ function burn(uint256 amount) public virtual { _burn(_msgSender(), amount); } /** * @dev Destroys `amount` tokens from `account`, deducting from the caller's * allowance. * * See {ERC20-_burn} and {ERC20-allowance}. * * Requirements: * * - the caller must have allowance for ``accounts``'s tokens of at least * `amount`. */ function burnFrom(address account, uint256 amount) public virtual { _spendAllowance(account, _msgSender(), amount); _burn(account, amount); }}

File 1 of 20 : IERC20Metadata.sol

// SPDX-License-Identifier: MIT// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)pragma solidity ^0.8.0;import "../IERC20.sol";/** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8);}

File 1 of 20 : IERC20Permit.sol

// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol)pragma solidity ^0.8.0;/** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32);}

File 1 of 20 : IERC20.sol

// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)pragma solidity ^0.8.0;/** * @dev Interface of the ERC20 standard as defined in the EIP. */interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 amount) external returns (bool);}

File 1 of 20 : SafeERC20.sol

// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)pragma solidity ^0.8.0;import "../IERC20.sol";import "../extensions/IERC20Permit.sol";import "../../../utils/Address.sol";/** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */library SafeERC20 { using Address for address; /** * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } /** * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful. */ function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove(IERC20 token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } /** * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 oldAllowance = token.allowance(address(this), spender); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value)); } /** * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value)); } } /** * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval * to be set to zero before setting it to a non-zero value, such as USDT. */ function forceApprove(IERC20 token, address spender, uint256 value) internal { bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value); if (!_callOptionalReturnBool(token, approvalCall)) { _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0)); _callOptionalReturn(token, approvalCall); } } /** * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`. * Revert on invalid signature. */ function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). * * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead. */ function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false // and not revert is the subcall reverts. (bool success, bytes memory returndata) = address(token).call(data); return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token)); }}

File 1 of 20 : Address.sol

// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)pragma solidity ^0.8.1;/** * @dev Collection of functions related to the address type */library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * * Furthermore, `isContract` will also return true if the target contract within * the same transaction is already scheduled for destruction by `SELFDESTRUCT`, * which only has an effect at the end of a transaction. * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } }}

File 1 of 20 : Context.sol

// SPDX-License-Identifier: MIT// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)pragma solidity ^0.8.0;/** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; }}

File 1 of 20 : SafeMath.sol

// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/SafeMath.sol)pragma solidity ^0.8.0;// CAUTION// This version of SafeMath should only be used with Solidity 0.8 or later,// because it relies on the compiler's built in overflow checks./** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the subtraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } }}

File 1 of 20 : EnumerableMap.sol

// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableMap.sol)// This file was procedurally generated from scripts/generate/templates/EnumerableMap.js.pragma solidity ^0.8.0;import "./EnumerableSet.sol";/** * @dev Library for managing an enumerable variant of Solidity's * https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`] * type. * * Maps have the following properties: * * - Entries are added, removed, and checked for existence in constant time * (O(1)). * - Entries are enumerated in O(n). No guarantees are made on the ordering. * * ```solidity * contract Example { * // Add the library methods * using EnumerableMap for EnumerableMap.UintToAddressMap; * * // Declare a set state variable * EnumerableMap.UintToAddressMap private myMap; * } * ``` * * The following map types are supported: * * - `uint256 -> address` (`UintToAddressMap`) since v3.0.0 * - `address -> uint256` (`AddressToUintMap`) since v4.6.0 * - `bytes32 -> bytes32` (`Bytes32ToBytes32Map`) since v4.6.0 * - `uint256 -> uint256` (`UintToUintMap`) since v4.7.0 * - `bytes32 -> uint256` (`Bytes32ToUintMap`) since v4.7.0 * * [WARNING] * ==== * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure * unusable. * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. * * In order to clean an EnumerableMap, you can either remove all elements one by one or create a fresh instance using an * array of EnumerableMap. * ==== */library EnumerableMap { using EnumerableSet for EnumerableSet.Bytes32Set; // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Map type with // bytes32 keys and values. // The Map implementation uses private functions, and user-facing // implementations (such as Uint256ToAddressMap) are just wrappers around // the underlying Map. // This means that we can only create new EnumerableMaps for types that fit // in bytes32. struct Bytes32ToBytes32Map { // Storage of keys EnumerableSet.Bytes32Set _keys; mapping(bytes32 => bytes32) _values; } /** * @dev Adds a key-value pair to a map, or updates the value for an existing * key. O(1). * * Returns true if the key was added to the map, that is if it was not * already present. */ function set(Bytes32ToBytes32Map storage map, bytes32 key, bytes32 value) internal returns (bool) { map._values[key] = value; return map._keys.add(key); } /** * @dev Removes a key-value pair from a map. O(1). * * Returns true if the key was removed from the map, that is if it was present. */ function remove(Bytes32ToBytes32Map storage map, bytes32 key) internal returns (bool) { delete map._values[key]; return map._keys.remove(key); } /** * @dev Returns true if the key is in the map. O(1). */ function contains(Bytes32ToBytes32Map storage map, bytes32 key) internal view returns (bool) { return map._keys.contains(key); } /** * @dev Returns the number of key-value pairs in the map. O(1). */ function length(Bytes32ToBytes32Map storage map) internal view returns (uint256) { return map._keys.length(); } /** * @dev Returns the key-value pair stored at position `index` in the map. O(1). * * Note that there are no guarantees on the ordering of entries inside the * array, and it may change when more entries are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32ToBytes32Map storage map, uint256 index) internal view returns (bytes32, bytes32) { bytes32 key = map._keys.at(index); return (key, map._values[key]); } /** * @dev Tries to returns the value associated with `key`. O(1). * Does not revert if `key` is not in the map. */ function tryGet(Bytes32ToBytes32Map storage map, bytes32 key) internal view returns (bool, bytes32) { bytes32 value = map._values[key]; if (value == bytes32(0)) { return (contains(map, key), bytes32(0)); } else { return (true, value); } } /** * @dev Returns the value associated with `key`. O(1). * * Requirements: * * - `key` must be in the map. */ function get(Bytes32ToBytes32Map storage map, bytes32 key) internal view returns (bytes32) { bytes32 value = map._values[key]; require(value != 0 || contains(map, key), "EnumerableMap: nonexistent key"); return value; } /** * @dev Same as {get}, with a custom error message when `key` is not in the map. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryGet}. */ function get( Bytes32ToBytes32Map storage map, bytes32 key, string memory errorMessage ) internal view returns (bytes32) { bytes32 value = map._values[key]; require(value != 0 || contains(map, key), errorMessage); return value; } /** * @dev Return the an array containing all the keys * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block. */ function keys(Bytes32ToBytes32Map storage map) internal view returns (bytes32[] memory) { return map._keys.values(); } // UintToUintMap struct UintToUintMap { Bytes32ToBytes32Map _inner; } /** * @dev Adds a key-value pair to a map, or updates the value for an existing * key. O(1). * * Returns true if the key was added to the map, that is if it was not * already present. */ function set(UintToUintMap storage map, uint256 key, uint256 value) internal returns (bool) { return set(map._inner, bytes32(key), bytes32(value)); } /** * @dev Removes a value from a map. O(1). * * Returns true if the key was removed from the map, that is if it was present. */ function remove(UintToUintMap storage map, uint256 key) internal returns (bool) { return remove(map._inner, bytes32(key)); } /** * @dev Returns true if the key is in the map. O(1). */ function contains(UintToUintMap storage map, uint256 key) internal view returns (bool) { return contains(map._inner, bytes32(key)); } /** * @dev Returns the number of elements in the map. O(1). */ function length(UintToUintMap storage map) internal view returns (uint256) { return length(map._inner); } /** * @dev Returns the element stored at position `index` in the map. O(1). * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintToUintMap storage map, uint256 index) internal view returns (uint256, uint256) { (bytes32 key, bytes32 value) = at(map._inner, index); return (uint256(key), uint256(value)); } /** * @dev Tries to returns the value associated with `key`. O(1). * Does not revert if `key` is not in the map. */ function tryGet(UintToUintMap storage map, uint256 key) internal view returns (bool, uint256) { (bool success, bytes32 value) = tryGet(map._inner, bytes32(key)); return (success, uint256(value)); } /** * @dev Returns the value associated with `key`. O(1). * * Requirements: * * - `key` must be in the map. */ function get(UintToUintMap storage map, uint256 key) internal view returns (uint256) { return uint256(get(map._inner, bytes32(key))); } /** * @dev Same as {get}, with a custom error message when `key` is not in the map. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryGet}. */ function get(UintToUintMap storage map, uint256 key, string memory errorMessage) internal view returns (uint256) { return uint256(get(map._inner, bytes32(key), errorMessage)); } /** * @dev Return the an array containing all the keys * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block. */ function keys(UintToUintMap storage map) internal view returns (uint256[] memory) { bytes32[] memory store = keys(map._inner); uint256[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // UintToAddressMap struct UintToAddressMap { Bytes32ToBytes32Map _inner; } /** * @dev Adds a key-value pair to a map, or updates the value for an existing * key. O(1). * * Returns true if the key was added to the map, that is if it was not * already present. */ function set(UintToAddressMap storage map, uint256 key, address value) internal returns (bool) { return set(map._inner, bytes32(key), bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a map. O(1). * * Returns true if the key was removed from the map, that is if it was present. */ function remove(UintToAddressMap storage map, uint256 key) internal returns (bool) { return remove(map._inner, bytes32(key)); } /** * @dev Returns true if the key is in the map. O(1). */ function contains(UintToAddressMap storage map, uint256 key) internal view returns (bool) { return contains(map._inner, bytes32(key)); } /** * @dev Returns the number of elements in the map. O(1). */ function length(UintToAddressMap storage map) internal view returns (uint256) { return length(map._inner); } /** * @dev Returns the element stored at position `index` in the map. O(1). * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintToAddressMap storage map, uint256 index) internal view returns (uint256, address) { (bytes32 key, bytes32 value) = at(map._inner, index); return (uint256(key), address(uint160(uint256(value)))); } /** * @dev Tries to returns the value associated with `key`. O(1). * Does not revert if `key` is not in the map. */ function tryGet(UintToAddressMap storage map, uint256 key) internal view returns (bool, address) { (bool success, bytes32 value) = tryGet(map._inner, bytes32(key)); return (success, address(uint160(uint256(value)))); } /** * @dev Returns the value associated with `key`. O(1). * * Requirements: * * - `key` must be in the map. */ function get(UintToAddressMap storage map, uint256 key) internal view returns (address) { return address(uint160(uint256(get(map._inner, bytes32(key))))); } /** * @dev Same as {get}, with a custom error message when `key` is not in the map. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryGet}. */ function get( UintToAddressMap storage map, uint256 key, string memory errorMessage ) internal view returns (address) { return address(uint160(uint256(get(map._inner, bytes32(key), errorMessage)))); } /** * @dev Return the an array containing all the keys * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block. */ function keys(UintToAddressMap storage map) internal view returns (uint256[] memory) { bytes32[] memory store = keys(map._inner); uint256[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // AddressToUintMap struct AddressToUintMap { Bytes32ToBytes32Map _inner; } /** * @dev Adds a key-value pair to a map, or updates the value for an existing * key. O(1). * * Returns true if the key was added to the map, that is if it was not * already present. */ function set(AddressToUintMap storage map, address key, uint256 value) internal returns (bool) { return set(map._inner, bytes32(uint256(uint160(key))), bytes32(value)); } /** * @dev Removes a value from a map. O(1). * * Returns true if the key was removed from the map, that is if it was present. */ function remove(AddressToUintMap storage map, address key) internal returns (bool) { return remove(map._inner, bytes32(uint256(uint160(key)))); } /** * @dev Returns true if the key is in the map. O(1). */ function contains(AddressToUintMap storage map, address key) internal view returns (bool) { return contains(map._inner, bytes32(uint256(uint160(key)))); } /** * @dev Returns the number of elements in the map. O(1). */ function length(AddressToUintMap storage map) internal view returns (uint256) { return length(map._inner); } /** * @dev Returns the element stored at position `index` in the map. O(1). * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressToUintMap storage map, uint256 index) internal view returns (address, uint256) { (bytes32 key, bytes32 value) = at(map._inner, index); return (address(uint160(uint256(key))), uint256(value)); } /** * @dev Tries to returns the value associated with `key`. O(1). * Does not revert if `key` is not in the map. */ function tryGet(AddressToUintMap storage map, address key) internal view returns (bool, uint256) { (bool success, bytes32 value) = tryGet(map._inner, bytes32(uint256(uint160(key)))); return (success, uint256(value)); } /** * @dev Returns the value associated with `key`. O(1). * * Requirements: * * - `key` must be in the map. */ function get(AddressToUintMap storage map, address key) internal view returns (uint256) { return uint256(get(map._inner, bytes32(uint256(uint160(key))))); } /** * @dev Same as {get}, with a custom error message when `key` is not in the map. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryGet}. */ function get( AddressToUintMap storage map, address key, string memory errorMessage ) internal view returns (uint256) { return uint256(get(map._inner, bytes32(uint256(uint160(key))), errorMessage)); } /** * @dev Return the an array containing all the keys * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block. */ function keys(AddressToUintMap storage map) internal view returns (address[] memory) { bytes32[] memory store = keys(map._inner); address[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // Bytes32ToUintMap struct Bytes32ToUintMap { Bytes32ToBytes32Map _inner; } /** * @dev Adds a key-value pair to a map, or updates the value for an existing * key. O(1). * * Returns true if the key was added to the map, that is if it was not * already present. */ function set(Bytes32ToUintMap storage map, bytes32 key, uint256 value) internal returns (bool) { return set(map._inner, key, bytes32(value)); } /** * @dev Removes a value from a map. O(1). * * Returns true if the key was removed from the map, that is if it was present. */ function remove(Bytes32ToUintMap storage map, bytes32 key) internal returns (bool) { return remove(map._inner, key); } /** * @dev Returns true if the key is in the map. O(1). */ function contains(Bytes32ToUintMap storage map, bytes32 key) internal view returns (bool) { return contains(map._inner, key); } /** * @dev Returns the number of elements in the map. O(1). */ function length(Bytes32ToUintMap storage map) internal view returns (uint256) { return length(map._inner); } /** * @dev Returns the element stored at position `index` in the map. O(1). * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32ToUintMap storage map, uint256 index) internal view returns (bytes32, uint256) { (bytes32 key, bytes32 value) = at(map._inner, index); return (key, uint256(value)); } /** * @dev Tries to returns the value associated with `key`. O(1). * Does not revert if `key` is not in the map. */ function tryGet(Bytes32ToUintMap storage map, bytes32 key) internal view returns (bool, uint256) { (bool success, bytes32 value) = tryGet(map._inner, key); return (success, uint256(value)); } /** * @dev Returns the value associated with `key`. O(1). * * Requirements: * * - `key` must be in the map. */ function get(Bytes32ToUintMap storage map, bytes32 key) internal view returns (uint256) { return uint256(get(map._inner, key)); } /** * @dev Same as {get}, with a custom error message when `key` is not in the map. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryGet}. */ function get( Bytes32ToUintMap storage map, bytes32 key, string memory errorMessage ) internal view returns (uint256) { return uint256(get(map._inner, key, errorMessage)); } /** * @dev Return the an array containing all the keys * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block. */ function keys(Bytes32ToUintMap storage map) internal view returns (bytes32[] memory) { bytes32[] memory store = keys(map._inner); bytes32[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; }}

File 1 of 20 : EnumerableSet.sol

// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.pragma solidity ^0.8.0;/** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ```solidity * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. * * [WARNING] * ==== * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure * unusable. * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. * * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an * array of EnumerableSet. * ==== */library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastValue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastValue; // Update the index for the moved value set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { bytes32[] memory store = _values(set._inner); bytes32[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values in the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; }}

File 1 of 20 : IAllocationProvider.sol

// SPDX-License-Identifier: BSD-3-Clausepragma solidity 0.8.16;interface IAllocationProvider { /** * @dev Returns allocation in USD of `_account` * @param _account Account to check * @return Allocation of `_account` */ function allocationOf(address _account) external view returns (uint256); /** * @dev Returns total allocation in USD * @return Total allocation */ function totalAllocation() external view returns (uint256);}

File 1 of 20 : IKYCProvider.sol

// SPDX-License-Identifier: BSD-3-Clausepragma solidity 0.8.16;interface IKYCProvider { /** * @dev Emitted when `_account` is added to whitelist */ event Whitelisted(address indexed _account, uint256 _timestamp); /** * @dev Emitted when `_account` is removed from whitelist */ event Blacklisted(address indexed _account, uint256 _timestamp); /** * @dev Returns true if `_account` is KYC approve * @param _account Account to check */ function isWhitelisted(address _account) external view returns (bool); /** * @dev Adds `_account` to whitelist * @param _account Account to add to whitelist */ function addToWhitelist(address _account) external; /** * @dev Adds `_accounts` to whitelist in a single transaction */ function batchAddToWhitelist(address[] memory _accounts) external; /** * @dev Removes `_account` from whitelist * @param _account Account to remove from whitelist */ function removeFromWhitelist(address _account) external; /** * @dev Removes `_accounts` from whitelist in a single transaction * @param _accounts Accounts to remove from whitelist */ function batchRemoveFromWhitelist(address[] memory _accounts) external;}

File 1 of 20 : AbstractProjectSale.sol

// SPDX-License-Identifier: BSD-3-Clausepragma solidity 0.8.16;import "./IProjectSale.sol";abstract contract AbstractProjectSale is IProjectSale { struct SaleTimes { uint256 registerStart; uint256 registerEnd; uint256 stakingRoundStart; uint256 stakingRoundEnd; uint256 publicRoundStart; uint256 publicRoundEnd; } SaleTimes public saleTimes; /** * @dev Throws if block time isn't between `registerStart` and `registerEnd` */ modifier onlyDuringRegisteration() { require( block.timestamp >= saleTimes.registerStart, "ProjectSale: registration period has not started yet" ); require( block.timestamp <= saleTimes.registerEnd, "ProjectSale: registration period has ended" ); _; } constructor(SaleTimes memory _saleTimes) { require( _saleTimes.registerStart < _saleTimes.registerEnd, "ProjectSale: registerStart must be before registerEnd" ); require( _saleTimes.registerEnd < _saleTimes.stakingRoundStart, "ProjectSale: registerEnd must be before stakingRoundStart" ); require( _saleTimes.stakingRoundStart < _saleTimes.stakingRoundEnd, "ProjectSale: stakingRoundStart must be before stakingRoundEnd" ); require( _saleTimes.stakingRoundEnd < _saleTimes.publicRoundStart, "ProjectSale: stakingRoundEnd must be before publicRoundStart" ); require( _saleTimes.publicRoundStart < _saleTimes.publicRoundEnd, "ProjectSale: publicRoundStart must be before publicRoundEnd" ); saleTimes = _saleTimes; } /** * @notice Function to update the times after setting. * Should have admin role. * * @param _saleTimes The new sale times */ function updateTimes(SaleTimes memory _saleTimes) external virtual; /** * @dev Returns true if time is between staking round * @return True if time is between staking round */ function isStakingRound() public view returns (bool) { return block.timestamp >= saleTimes.stakingRoundStart && block.timestamp <= saleTimes.stakingRoundEnd; } /** * @dev Returns true if time is between public round * @return True if time is between public round */ function isPublicRound() public view returns (bool) { return block.timestamp >= saleTimes.publicRoundStart && block.timestamp <= saleTimes.publicRoundEnd; }}

File 1 of 20 : IProjectSale.sol

// SPDX-License-Identifier: BSD-3-Clausepragma solidity 0.8.16;interface IProjectSale { /** * @dev Emitted when `_account` registers to sale */ event Registered(address _account); /** * @dev Emitted when `_account` deposits `_amount` USD pegged coin */ event Deposit(address _account, uint256 _amount); /** * @dev Register to sale * * Emits a {Registered} event. */ function register() external payable; /** * @dev Returns true if `_account` is registered * @param _account Account to check */ function isRegistered(address _account) external view returns (bool); /** * @dev Returns amount of pegged tokens to be transferred to deposit `_amount` pegged token * @param _amount Amount of USD to deposit. * @return Amount of pegged tokens to be transferred to deposit `_amount` pegged token */ function depositAmountWithFees(uint256 _amount) external view returns (uint256); /** * @dev Deposit USD * @param _amount Amount of USD to deposit. * * Emits a {Deposit} event. */ function deposit(uint256 _amount) external; /** * @dev Returns USD deposited by `_account` * @param _account Account to check */ function depositedOf(address _account) external view returns (uint256); /** * @dev Returns depositable USD of `_account` * @param _account Account to check * @return Depositable USD of `_account` */ function depositableOf(address _account) external view returns (uint256); /** * @dev Returns current sale value in terms of pegged token * @return uint256 current sale value */ function totalSaleValue() external view returns (uint256); /** * @dev Returns total sale value cap in terms of pegged token * @return uint256 total sale value */ function totalSaleValueCap() external view returns (uint256); /** * @notice Function to view the total public sale deposited of a user * @param _account is the address to check. * @return uint256 is the total public sale deposited. */ function publicSaleDepositedOf(address _account) external view returns (uint256); /** * @dev Returns staking round allocation of user, excluding credit token allocation * @return uint256 staking round allocation of user */ function stakingRoundAllocationOf(address _account) external view returns (uint256); function publicRoundAllocationOf(address _account) external view returns (uint256);}

File 2 of 20 : IStakingAmounts.sol

// SPDX-License-Identifier: BSD-3-Clausepragma solidity 0.8.16;/** * @dev Interface of Staking Amounts . */interface IStakingAmounts { /** * @dev Returns the total staked amount for a user * @param _user Address of the user * @return uint256 Total staked amount for the user * */ function stakedOf(address _user) external view returns (uint256); /** * @dev Returns the total staked amount for all users * @return uint256 Total staked amount for all users * */ function totalStaked() external view returns (uint256);}

Settings

{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {}}

Contract Security Audit

  • No Contract Security Audit Submitted- Submit Audit Here

Contract ABI

  • JSON Format
  • RAW/Text Format
[{"inputs":[{"components":[{"internalType":"uint256","name":"registerStart","type":"uint256"},{"internalType":"uint256","name":"registerEnd","type":"uint256"},{"internalType":"uint256","name":"stakingRoundStart","type":"uint256"},{"internalType":"uint256","name":"stakingRoundEnd","type":"uint256"},{"internalType":"uint256","name":"publicRoundStart","type":"uint256"},{"internalType":"uint256","name":"publicRoundEnd","type":"uint256"}],"internalType":"struct AbstractProjectSale.SaleTimes","name":"_saleTimes","type":"tuple"},{"components":[{"internalType":"address","name":"kycProvider","type":"address"},{"internalType":"address","name":"allocationProvider","type":"address"}],"internalType":"struct ProjectSale.Providers","name":"_providers","type":"tuple"},{"internalType":"address","name":"_usdToken","type":"address"},{"internalType":"address","name":"_projectToken","type":"address"},{"internalType":"uint256","name":"_projectTokenPrice","type":"uint256"},{"internalType":"uint256","name":"_projectTokenAmount","type":"uint256"},{"internalType":"uint256","name":"_totalSaleValueCap","type":"uint256"},{"internalType":"address","name":"_saleClaimAddress","type":"address"},{"internalType":"address","name":"_feeClaimAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_account","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_account","type":"address"}],"name":"Registered","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FCFS_ROUND_FEE","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PUBLIC_ROUND_FEE","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STAKING_ROUND_FEE","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"activateFCFS","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"adminRegister","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_users","type":"address[]"}],"name":"batchAdminRegister","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"deactivateFCFS","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"depositAmountWithFees","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"depositableOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"depositedOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeClaimAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_start","type":"uint256"},{"internalType":"uint256","name":"_end","type":"uint256"}],"name":"getDepositAmounts","outputs":[{"internalType":"address[]","name":"","type":"address[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isFcfs","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isPublicRound","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"isRegistered","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isStakingRound","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"participantAt","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"participantCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"end","type":"uint256"}],"name":"participantsBetween","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"projectToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"providers","outputs":[{"internalType":"address","name":"kycProvider","type":"address"},{"internalType":"address","name":"allocationProvider","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"publicRoundAllocationOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"publicSaleDepositedOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"register","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"saleClaimAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"saleDetails","outputs":[{"internalType":"uint256","name":"totalSaleValueCap","type":"uint256"},{"internalType":"uint256","name":"projectTokenPrice","type":"uint256"},{"internalType":"uint256","name":"projectTokenAmount","type":"uint256"},{"internalType":"address","name":"saleClaimAddress","type":"address"},{"internalType":"address","name":"feeClaimAddress","type":"address"},{"internalType":"uint256","name":"totalSaleValue","type":"uint256"},{"internalType":"uint256","name":"totalPublicSaleValue","type":"uint256"},{"internalType":"uint256","name":"publicSaleDepositCap","type":"uint256"},{"internalType":"contract IStakingAmounts","name":"stakingAmounts","type":"address"},{"internalType":"uint256","name":"minStake","type":"uint256"},{"internalType":"uint256","name":"registerFee","type":"uint256"},{"internalType":"uint8","name":"nom","type":"uint8"},{"internalType":"uint8","name":"denom","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"saleTimes","outputs":[{"internalType":"uint256","name":"registerStart","type":"uint256"},{"internalType":"uint256","name":"registerEnd","type":"uint256"},{"internalType":"uint256","name":"stakingRoundStart","type":"uint256"},{"internalType":"uint256","name":"stakingRoundEnd","type":"uint256"},{"internalType":"uint256","name":"publicRoundStart","type":"uint256"},{"internalType":"uint256","name":"publicRoundEnd","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"_stakingRoundFee","type":"uint8"},{"internalType":"uint8","name":"_publicRoundFee","type":"uint8"},{"internalType":"uint8","name":"_fcsfRoundFee","type":"uint8"}],"name":"setFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_nom","type":"uint8"},{"internalType":"uint8","name":"_denom","type":"uint8"}],"name":"setPublicRoundMultiplier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_publicSaleDepositCap","type":"uint256"}],"name":"setPublicSaleCap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_registerFee","type":"uint256"}],"name":"setRegisterFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_totalSaleValueCap","type":"uint256"}],"name":"setSaleCap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_stakingAmounts","type":"address"},{"internalType":"uint256","name":"_minStake","type":"uint256"}],"name":"setStakingAmounts","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"stakingRoundAllocationOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSaleValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSaleValueCap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_allocationProvider","type":"address"}],"name":"updateAllocationProvider","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newAddress","type":"address"}],"name":"updateFeeClaimAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_kycProvider","type":"address"}],"name":"updateKycProvider","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newAddress","type":"address"}],"name":"updateSaleClaimAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"registerStart","type":"uint256"},{"internalType":"uint256","name":"registerEnd","type":"uint256"},{"internalType":"uint256","name":"stakingRoundStart","type":"uint256"},{"internalType":"uint256","name":"stakingRoundEnd","type":"uint256"},{"internalType":"uint256","name":"publicRoundStart","type":"uint256"},{"internalType":"uint256","name":"publicRoundEnd","type":"uint256"}],"internalType":"struct AbstractProjectSale.SaleTimes","name":"_saleTimes","type":"tuple"}],"name":"updateTimes","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"usdToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

Deployed Bytecode

0x6080604052600436106102c95760003560e01c806375cd11ad11610175578063d3d37a31116100dc578063e729ccd911610095578063f8401fe61161006f578063f8401fe61461096d578063f897a22b146109b4578063f89977b8146109e8578063fd8dd42c14610a0857600080fd5b8063e729ccd91461090d578063f2fde38b1461092d578063f6794fdb1461094d57600080fd5b8063d3d37a3114610857578063d3dd9f7414610877578063d77696511461088c578063e2307128146108ac578063e31964f9146108cc578063e5daeecd146108ec57600080fd5b80639c75bd301161012e5780639c75bd30146107ac578063a217fddf146107cd578063aa8af221146107e2578063b6b55f25146107f7578063c090746f14610817578063c3c5a5471461083757600080fd5b806375cd11ad146106f457806377f405641461071457806382cf4bc4146107345780638456cb59146107545780638da5cb5b1461076957806392be2ab81461078c57600080fd5b8063362f04c0116102345780635c975abb116101ed5780636f6a46b1116101c75780636f6a46b11461068a5780636fdcbef4146106aa578063715018a6146106bf57806374288f72146106d457600080fd5b80635c975abb146106325780635c99d8cc1461064a5780636f12bbe71461066a57600080fd5b8063362f04c0146105585780633f4ba83a1461056d5780634b60ce77146105825780634e36ee6a146105b657806351c6476b146105d757806352f230111461060d57600080fd5b8063128e1d2f11610286578063128e1d2f146104065780631aa3a008146104285780631f5b9d3b14610430578063238041a9146104455780632f91926e146104655780633474a4a61461048557600080fd5b80630232ebc1146102ce57806302fcc99814610306578063065bab2d1461035e57806307d7d923146103965780630a276c75146103c45780630b5d000c146103d9575b600080fd5b3480156102da57600080fd5b506007546102ef90600160b01b900460ff1681565b60405160ff90911681526020015b60405180910390f35b34801561031257600080fd5b5060005460015460025460035460045460055461033195949392919086565b604080519687526020870195909552938501929092526060840152608083015260a082015260c0016102fd565b34801561036a57600080fd5b5061037e61037936600461297c565b610a36565b6040516001600160a01b0390911681526020016102fd565b3480156103a257600080fd5b506103b66103b136600461297c565b610aa6565b6040519081526020016102fd565b3480156103d057600080fd5b50600a546103b6565b3480156103e557600080fd5b506103f96103f4366004612995565b610b56565b6040516102fd91906129fb565b34801561041257600080fd5b50610426610421366004612a25565b610cb3565b005b610426610d03565b34801561043c57600080fd5b50600f546103b6565b34801561045157600080fd5b506103b6610460366004612a25565b610f69565b34801561047157600080fd5b5060165461037e906001600160a01b031681565b34801561049157600080fd5b50600a54600b54600c54600d54600e54600f546010546011546012546013546014546015546104e29b9a99986001600160a01b03908116988116979695941692919060ff808216916101009004168d565b604080519d8e5260208e019c909c529a8c01999099526001600160a01b0397881660608c015295871660808b015260a08a019490945260c089019290925260e088015290921661010086015261012085019190915261014084015260ff908116610160840152166101808201526101a0016102fd565b34801561056457600080fd5b506103b6610fec565b34801561057957600080fd5b50610426610ffd565b34801561058e57600080fd5b5061037e7f000000000000000000000000a856098dcbc1b2b3a9c96c35c32bc4f71e49aed281565b3480156105c257600080fd5b506007546102ef90600160c01b900460ff1681565b3480156105e357600080fd5b506103b66105f2366004612a25565b6001600160a01b03166000908152601e602052604090205490565b34801561061957600080fd5b5061062261100f565b60405190151581526020016102fd565b34801561063e57600080fd5b5060075460ff16610622565b34801561065657600080fd5b506103b6610665366004612a25565b611029565b34801561067657600080fd5b50610426610685366004612a25565b611053565b34801561069657600080fd5b506104266106a5366004612a87565b6110f9565b3480156106b657600080fd5b506106226111df565b3480156106cb57600080fd5b506104266111f9565b3480156106e057600080fd5b506103b66106ef366004612a25565b61120b565b34801561070057600080fd5b5060175461037e906001600160a01b031681565b34801561072057600080fd5b5061042661072f366004612a25565b611304565b34801561074057600080fd5b5061042661074f36600461297c565b6113b5565b34801561076057600080fd5b50610426611412565b34801561077557600080fd5b5060075461010090046001600160a01b031661037e565b34801561079857600080fd5b506104266107a736600461297c565b611422565b3480156107b857600080fd5b5060075461062290600160c81b900460ff1681565b3480156107d957600080fd5b506103b6600081565b3480156107ee57600080fd5b5061042661142f565b34801561080357600080fd5b5061042661081236600461297c565b6114ad565b34801561082357600080fd5b50610426610832366004612b34565b611b14565b34801561084357600080fd5b50610622610852366004612a25565b611bb4565b34801561086357600080fd5b5061042661087236600461297c565b611bc1565b34801561088357600080fd5b50610426611bce565b34801561089857600080fd5b506104266108a7366004612b5e565b611cb8565b3480156108b857600080fd5b506103b66108c7366004612a25565b611e37565b3480156108d857600080fd5b506104266108e7366004612be9565b611f31565b3480156108f857600080fd5b506007546102ef90600160b81b900460ff1681565b34801561091957600080fd5b50610426610928366004612a25565b611f5d565b34801561093957600080fd5b50610426610948366004612a25565b611fad565b34801561095957600080fd5b50610426610968366004612c1c565b612023565b34801561097957600080fd5b50600854600954610994916001600160a01b03908116911682565b604080516001600160a01b039384168152929091166020830152016102fd565b3480156109c057600080fd5b5061037e7f00000000000000000000000055d398326f99059ff775485246999027b319795581565b3480156109f457600080fd5b50610426610a03366004612a25565b612073565b348015610a1457600080fd5b50610a28610a23366004612995565b61210c565b6040516102fd929190612c5f565b6000610a42601f6122ae565b8210610a955760405162461bcd60e51b815260206004820181905260248201527f50726f6a65637453616c653a20696e646578206f7574206f6620626f756e647360448201526064015b60405180910390fd5b610aa0601f836122b8565b92915050565b6002546000904210801590610abd57506003544211155b15610af357600754606490610adc90600160c01b900460ff1682612ccc565b610ae99060ff1684612ce5565b610aa09190612d04565b6004544210801590610b0757506005544211155b15610b5257600754600160c81b900460ff1615610b3857600754606490610adc90600160b01b900460ff1682612ccc565b600754606490610adc90600160b81b900460ff1682612ccc565b5090565b606081831115610ba85760405162461bcd60e51b815260206004820152601860248201527f50726f6a65637453616c653a207374617274203e20656e6400000000000000006044820152606401610a8c565b610bb2601f6122ae565b821115610c015760405162461bcd60e51b815260206004820181905260248201527f50726f6a65637453616c653a20696e646578206f7574206f6620626f756e64736044820152606401610a8c565b6000610c0d8484612d26565b67ffffffffffffffff811115610c2557610c25612a40565b604051908082528060200260200182016040528015610c4e578160200160208202803683370190505b509050835b83811015610cab57610c66601f826122b8565b82610c718784612d26565b81518110610c8157610c81612d39565b6001600160a01b039092166020928302919091019091015280610ca381612d4f565b915050610c53565b509392505050565b610cbb6122c4565b6001600160a01b038116610ce15760405162461bcd60e51b8152600401610a8c90612d68565b601680546001600160a01b0319166001600160a01b0392909216919091179055565b610d0b612324565b600054421015610d7a5760405162461bcd60e51b815260206004820152603460248201527f50726f6a65637453616c653a20726567697374726174696f6e20706572696f64604482015273081a185cc81b9bdd081cdd185c9d1959081e595d60621b6064820152608401610a8c565b600154421115610ddf5760405162461bcd60e51b815260206004820152602a60248201527f50726f6a65637453616c653a20726567697374726174696f6e20706572696f64604482015269081a185cc8195b99195960b21b6064820152608401610a8c565b610de833611bb4565b15610e355760405162461bcd60e51b815260206004820152601f60248201527f50726f6a65637453616c653a20616c72656164792072656769737465726564006044820152606401610a8c565b601454341015610e875760405162461bcd60e51b815260206004820152601d60248201527f50726f6a65637453616c653a20696e73756666696369656e74206665650000006044820152606401610a8c565b610e92601f3361236a565b503415610f33576017546040516000916001600160a01b03169034908381818185875af1925050503d8060008114610ee6576040519150601f19603f3d011682016040523d82523d6000602084013e610eeb565b606091505b5050905080610f315760405162461bcd60e51b81526020600482015260126024820152714661696c656420746f2073656e642066656560701b6044820152606401610a8c565b505b6040513381527f2d3734a8e47ac8316e500ac231c90a6e1848ca2285f40d07eaa52005e4b3a0e9906020015b60405180910390a1565b6000610f7482611029565b60095460405163a4f82f2760e01b81526001600160a01b0385811660048301529091169063a4f82f2790602401602060405180830381865afa158015610fbe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fe29190612dab565b610aa09190612d26565b6000610ff8601f6122ae565b905090565b6110056122c4565b61100d61237f565b565b6002546000904210801590610ff857505060035442111590565b600080806110386018856123cc565b915091508115611049579392505050565b5060009392505050565b61105b6122c4565b6001600160a01b0381166110d75760405162461bcd60e51b815260206004820152603760248201527f50726f6a65637453616c653a20616c6c6f636174696f6e2070726f766964657260448201527f2063616e6e6f74206265207a65726f20616464726573730000000000000000006064820152608401610a8c565b600980546001600160a01b0319166001600160a01b0392909216919091179055565b6111016122c4565b611109612324565b60005b81518110156111db5761113782828151811061112a5761112a612d39565b6020026020010151611bb4565b6111c95761116882828151811061115057611150612d39565b6020026020010151601f61236a90919063ffffffff16565b507f2d3734a8e47ac8316e500ac231c90a6e1848ca2285f40d07eaa52005e4b3a0e982828151811061119c5761119c612d39565b60200260200101516040516111c091906001600160a01b0391909116815260200190565b60405180910390a15b806111d381612d4f565b91505061110c565b5050565b6004546000904210801590610ff857505060055442111590565b6112016122c4565b61100d60006123f1565b600061121682611bb4565b8015611225575061122561100f565b1561123357610aa082610f69565b61123b6111df565b80156112515750600754600160c81b900460ff16155b1561125f57610aa082611e37565b6112676111df565b801561127c5750600754600160c81b900460ff165b156112f757600f54600a546112919190612d26565b6001600160a01b0383166000908152601e60205260409020546011546112b79190612d26565b106112d157600f54600a546112cc9190612d26565b610aa0565b6001600160a01b0382166000908152601e6020526040902054601154610aa09190612d26565b506000919050565b919050565b61130c6122c4565b611314612324565b61131d81611bb4565b1561136a5760405162461bcd60e51b815260206004820152601f60248201527f50726f6a65637453616c653a20616c72656164792072656769737465726564006044820152606401610a8c565b611375601f8261236a565b506040516001600160a01b03821681527f2d3734a8e47ac8316e500ac231c90a6e1848ca2285f40d07eaa52005e4b3a0e99060200160405180910390a150565b6113bd6122c4565b6000811161140d5760405162461bcd60e51b815260206004820152601f60248201527f50726f6a65637453616c653a206361702063616e6e6f74206265207a65726f006044820152606401610a8c565b601155565b61141a6122c4565b61100d61244b565b61142a6122c4565b601455565b6114376122c4565b600754600160c81b900460ff1661149e5760405162461bcd60e51b815260206004820152602560248201527f50726f6a65637453616c653a204643465320697320616c726561647920696e61604482015264637469766560d81b6064820152608401610a8c565b6007805460ff60c81b19169055565b6114b5612488565b6114bd612324565b600854604051633af32abf60e01b81523360048201819052916001600160a01b031690633af32abf90602401602060405180830381865afa158015611506573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061152a9190612dc4565b6115865760405162461bcd60e51b815260206004820152602760248201527f50726f6a65637453616c653a206163636f756e74206973206e6f742077686974604482015266195b1a5cdd195960ca1b6064820152608401610a8c565b600082116115d65760405162461bcd60e51b815260206004820152601b60248201527f50726f6a65637453616c653a20616d6f756e74206973207a65726f00000000006044820152606401610a8c565b6115de61100f565b80156115ee57506115ee33611bb4565b806115fc57506115fc6111df565b6116545760405162461bcd60e51b815260206004820152602360248201527f50726f6a65637453616c653a206e6f7420616c6c6f77656420746f206465706f6044820152621cda5d60ea1b6064820152608401610a8c565b600061165f3361120b565b9050600081116116c15760405162461bcd60e51b815260206004820152602760248201527f50726f6a65637453616c653a206465706f73697461626c6520616d6f756e74206044820152666973207a65726f60c81b6064820152608401610a8c565b60006116cb6111df565b156118bd5760135460125460405163af500ba360e01b81523360048201526001600160a01b039091169063af500ba390602401602060405180830381865afa15801561171b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061173f9190612dab565b10156117cd5760405162461bcd60e51b815260206004820152605160248201527f50726f6a65637453616c653a20596f7520646f206e6f74206861766520656e6f60448201527f756768205374616b65642046494e4320746f20706172746963697061746520696064820152706e20746865205075626c69632053616c6560781b608482015260a401610a8c565b601154336000908152601e60205260409020546117eb908690612de6565b11156118095760405162461bcd60e51b8152600401610a8c90612df9565b81841115611815578193505b600754600160c81b900460ff16156118525760075460649061184190600160b01b900460ff1686612ce5565b61184b9190612d04565b9050611879565b60075460649061186c90600160b81b900460ff1686612ce5565b6118769190612d04565b90505b336000908152601e602052604081208054869290611898908490612de6565b9091555050601080548591906000906118b2908490612de6565b909155506119049050565b818411156118dd5760405162461bcd60e51b8152600401610a8c90612df9565b6007546064906118f790600160c01b900460ff1686612ce5565b6119019190612d04565b90505b6000806119126018336123cc565b915091508115611939576119333361192a8884612de6565b601891906124e1565b50611947565b611945601833886124e1565b505b85600a600501600082825461195c9190612de6565b909155505060165461199d906001600160a01b037f00000000000000000000000055d398326f99059ff775485246999027b3197955811691339116896124ff565b8215611ac9576040516370a0823160e01b815233600482015283907f00000000000000000000000055d398326f99059ff775485246999027b31979556001600160a01b0316906370a0823190602401602060405180830381865afa158015611a09573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a2d9190612dab565b1015611a8d5760405162461bcd60e51b815260206004820152602960248201527f50726f6a65637453616c653a20696e73756666696369656e742062616c616e636044820152686520666f722066656560b81b6064820152608401610a8c565b601754611ac9906001600160a01b037f00000000000000000000000055d398326f99059ff775485246999027b3197955811691339116866124ff565b60408051338152602081018890527fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c910160405180910390a15050505050611b116001600655565b50565b611b1c6122c4565b6001600160a01b038216611b8e5760405162461bcd60e51b815260206004820152603360248201527f50726f6a65637453616c653a207374616b696e6720616d6f756e74732063616e6044820152726e6f74206265207a65726f206164647265737360681b6064820152608401610a8c565b601280546001600160a01b0319166001600160a01b039390931692909217909155601355565b6000610aa0601f8361255f565b611bc96122c4565b600a55565b611bd66122c4565b600754600160c81b900460ff1615611c3c5760405162461bcd60e51b815260206004820152602360248201527f50726f6a65637453616c653a204643465320697320616c72656164792061637460448201526269766560e81b6064820152608401610a8c565b6004544211611ca35760405162461bcd60e51b815260206004820152602d60248201527f50726f6a65637453616c653a205075626c696320726f756e6420686173206e6f60448201526c1d081cdd185c9d1959081e595d609a1b6064820152608401610a8c565b6007805460ff60c81b1916600160c81b179055565b611cc06122c4565b6000600754600160a81b900460ff166001811115611ce057611ce0612e47565b14611d2d5760405162461bcd60e51b815260206004820152601e60248201527f50726f6a65637453616c653a2073616c652069732066696e616c697a656400006044820152606401610a8c565b60208101518151108015611d48575080606001518160400151105b8015611d5b57508060a001518160800151105b611da35760405162461bcd60e51b815260206004820152601960248201527850726f6a65637453616c653a20696e76616c69642074696d6560381b6044820152606401610a8c565b80604001518160200151108015611dc1575080608001518160600151105b611e095760405162461bcd60e51b815260206004820152601960248201527850726f6a65637453616c653a20696e76616c69642074696d6560381b6044820152606401610a8c565b8051600055602081015160015560408101516002556060810151600355608081015160045560a00151600555565b60155460095460405163a4f82f2760e01b81526001600160a01b038481166004830152600093849360ff6101008304811694921692169063a4f82f2790602401602060405180830381865afa158015611e94573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611eb89190612dab565b611ec29190612ce5565b611ecc9190612d04565b601154909150811115611ede57506011545b6001600160a01b0383166000908152601e6020526040902054611f019082612d26565b600f54600a54919250611f1391612d26565b811115610aa057600f54600a54611f2a9190612d26565b9392505050565b611f396122c4565b6015805460ff9283166101000261ffff199091169290931691909117919091179055565b611f656122c4565b6001600160a01b038116611f8b5760405162461bcd60e51b8152600401610a8c90612d68565b601780546001600160a01b0319166001600160a01b0392909216919091179055565b611fb56122c4565b6001600160a01b03811661201a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610a8c565b611b11816123f1565b61202b6122c4565b6007805461ffff60b81b1916600160c01b60ff9586160260ff60b81b191617600160b81b938516939093029290921760ff60b01b1916600160b01b9190931602919091179055565b61207b6122c4565b6001600160a01b0381166120ea5760405162461bcd60e51b815260206004820152603060248201527f50726f6a65637453616c653a206b79632070726f76696465722063616e6e6f7460448201526f206265207a65726f206164647265737360801b6064820152608401610a8c565b600880546001600160a01b0319166001600160a01b0392909216919091179055565b6060806121196018612581565b83111561212d5761212a6018612581565b92505b8284106121725760405162461bcd60e51b8152602060048201526013602482015272092dcecc2d8d2c840e6e8c2e4e840d2dcc8caf606b1b6044820152606401610a8c565b600061217e8585612d26565b67ffffffffffffffff81111561219657612196612a40565b6040519080825280602002602001820160405280156121bf578160200160208202803683370190505b50905060006121ce8686612d26565b67ffffffffffffffff8111156121e6576121e6612a40565b60405190808252806020026020018201604052801561220f578160200160208202803683370190505b509050855b858110156122a05760008061222a60188461258c565b9092509050818561223b8b86612d26565b8151811061224b5761224b612d39565b6001600160a01b0390921660209283029190910190910152808461226f8b86612d26565b8151811061227f5761227f612d39565b6020026020010181815250505050808061229890612d4f565b915050612214565b5090925090505b9250929050565b6000610aa0825490565b6000611f2a838361259b565b6007546001600160a01b0361010090910416331461100d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a8c565b60075460ff161561100d5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610a8c565b6000611f2a836001600160a01b0384166125c5565b612387612614565b6007805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b039091168152602001610f5f565b60008080806123e4866001600160a01b03871661265d565b9097909650945050505050565b600780546001600160a01b03838116610100818102610100600160a81b031985161790945560405193909204169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b612453612324565b6007805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586123b43390565b6002600654036124da5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610a8c565b6002600655565b60006124f7846001600160a01b03851684612697565b949350505050565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526125599085906126b4565b50505050565b6001600160a01b03811660009081526001830160205260408120541515611f2a565b6000610aa08261278e565b60008080806123e48686612799565b60008260000182815481106125b2576125b2612d39565b9060005260206000200154905092915050565b600081815260018301602052604081205461260c57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610aa0565b506000610aa0565b60075460ff1661100d5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610a8c565b600081815260028301602052604081205481908061268c5761267f85856127c4565b9250600091506122a79050565b6001925090506122a7565b600082815260028401602052604081208290556124f784846127d0565b6000612709826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166127dc9092919063ffffffff16565b905080516000148061272a57508080602001905181019061272a9190612dc4565b6127895760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610a8c565b505050565b6000610aa0826122ae565b600080806127a785856122b8565b600081815260029690960160205260409095205494959350505050565b6000611f2a83836127eb565b6000611f2a83836125c5565b60606124f78484600085612803565b60008181526001830160205260408120541515611f2a565b6060824710156128645760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610a8c565b600080866001600160a01b031685876040516128809190612e81565b60006040518083038185875af1925050503d80600081146128bd576040519150601f19603f3d011682016040523d82523d6000602084013e6128c2565b606091505b50915091506128d3878383876128de565b979650505050505050565b6060831561294d578251600003612946576001600160a01b0385163b6129465760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610a8c565b50816124f7565b6124f783838151156129625781518083602001fd5b8060405162461bcd60e51b8152600401610a8c9190612e9d565b60006020828403121561298e57600080fd5b5035919050565b600080604083850312156129a857600080fd5b50508035926020909101359150565b600081518084526020808501945080840160005b838110156129f05781516001600160a01b0316875295820195908201906001016129cb565b509495945050505050565b602081526000611f2a60208301846129b7565b80356001600160a01b03811681146112ff57600080fd5b600060208284031215612a3757600080fd5b611f2a82612a0e565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715612a7f57612a7f612a40565b604052919050565b60006020808385031215612a9a57600080fd5b823567ffffffffffffffff80821115612ab257600080fd5b818501915085601f830112612ac657600080fd5b813581811115612ad857612ad8612a40565b8060051b9150612ae9848301612a56565b8181529183018401918481019088841115612b0357600080fd5b938501935b83851015612b2857612b1985612a0e565b82529385019390850190612b08565b98975050505050505050565b60008060408385031215612b4757600080fd5b612b5083612a0e565b946020939093013593505050565b600060c08284031215612b7057600080fd5b60405160c0810181811067ffffffffffffffff82111715612b9357612b93612a40565b8060405250823581526020830135602082015260408301356040820152606083013560608201526080830135608082015260a083013560a08201528091505092915050565b803560ff811681146112ff57600080fd5b60008060408385031215612bfc57600080fd5b612c0583612bd8565b9150612c1360208401612bd8565b90509250929050565b600080600060608486031215612c3157600080fd5b612c3a84612bd8565b9250612c4860208501612bd8565b9150612c5660408501612bd8565b90509250925092565b604081526000612c7260408301856129b7565b82810360208481019190915284518083528582019282019060005b81811015612ca957845183529383019391830191600101612c8d565b5090979650505050505050565b634e487b7160e01b600052601160045260246000fd5b60ff8181168382160190811115610aa057610aa0612cb6565b6000816000190483118215151615612cff57612cff612cb6565b500290565b600082612d2157634e487b7160e01b600052601260045260246000fd5b500490565b81810381811115610aa057610aa0612cb6565b634e487b7160e01b600052603260045260246000fd5b600060018201612d6157612d61612cb6565b5060010190565b60208082526023908201527f50726f6a65637453616c653a20616464726573732063616e6e6f74206265207a60408201526265726f60e81b606082015260800190565b600060208284031215612dbd57600080fd5b5051919050565b600060208284031215612dd657600080fd5b81518015158114611f2a57600080fd5b80820180821115610aa057610aa0612cb6565b6020808252602e908201527f50726f6a65637453616c653a20616d6f756e742065786365656473206465706f60408201526d1cda5d18589b1948185b5bdd5b9d60921b606082015260800190565b634e487b7160e01b600052602160045260246000fd5b60005b83811015612e78578181015183820152602001612e60565b50506000910152565b60008251612e93818460208701612e5d565b9190910192915050565b6020815260008251806020840152612ebc816040850160208701612e5d565b601f01601f1916919091016040019291505056fea264697066735822122094a4cd66392950b0d11fd8ac60327a25659ec15f46d2f1ba3bc3375fe68cbb9164736f6c63430008100033

BlockTransactionDifficultyGas UsedReward

View All Blocks Produced

AgeBlockFee AddressBC Fee AddressVoting PowerJailedIncoming

View All Validatorset

BlockUncle NumberDifficultyGas UsedReward

View All Uncles

Loading...

Loading

Loading...

Loading

Loading...

Loading

Validator IndexBlockAmount

View All Withdrawals

Transaction HashBlockValueEth2 PubKeyValid

View All Deposits

[Download: CSV Export ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.

Address QR Code
My Address - Private Name Tag or Note

My Name Tag:

Private Name Tags (up to 35 characters) can be used for easy identification of addresses

Private Note:

A private note (up to 500 characters) can be attached to this address.
Please DO NOT store any passwords or private keys here.

View all Private Name Tags

Compiler specific version warnings:

The compiled contract might be susceptible to VerbatimInvalidDeduplication (low-severity), FullInlinerNonExpressionSplitArgumentEvaluationOrder (low-severity), MissingSideEffectsOnSelectorAccess (low-severity), StorageWriteRemovalBeforeConditionalTermination (medium/high-severity) Solidity Compiler Bugs.

Connect a Wallet
Connect a Wallet
Connect a Wallet
ProjectSale | Address 0xa3169755c89807a7c3a70eb29fe3134cbc8cb387 | BscScan (2024)
Top Articles
Latest Posts
Article information

Author: Reed Wilderman

Last Updated:

Views: 6807

Rating: 4.1 / 5 (52 voted)

Reviews: 83% of readers found this page helpful

Author information

Name: Reed Wilderman

Birthday: 1992-06-14

Address: 998 Estell Village, Lake Oscarberg, SD 48713-6877

Phone: +21813267449721

Job: Technology Engineer

Hobby: Swimming, Do it yourself, Beekeeping, Lapidary, Cosplaying, Hiking, Graffiti

Introduction: My name is Reed Wilderman, I am a faithful, bright, lucky, adventurous, lively, rich, vast person who loves writing and wants to share my knowledge and understanding with you.