Source Code
Latest 25 from a total of 1,102 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Withdraw Tokens | 12556260 | 1714 days ago | IN | 0 ETH | 0.00443052 | ||||
| Buy Tokens | 12553512 | 1715 days ago | IN | 0.04 ETH | 0.00061791 | ||||
| Withdraw Unsold ... | 12552967 | 1715 days ago | IN | 0 ETH | 0.00289566 | ||||
| Withdraw Tokens | 12552664 | 1715 days ago | IN | 0 ETH | 0.00406162 | ||||
| Withdraw Tokens | 12552549 | 1715 days ago | IN | 0 ETH | 0.00343008 | ||||
| Buy Tokens | 12552462 | 1715 days ago | IN | 0.2 ETH | 0.0007633 | ||||
| Withdraw Tokens | 12552217 | 1715 days ago | IN | 0 ETH | 0.00400142 | ||||
| Transfer | 12551979 | 1715 days ago | IN | 0.07062376 ETH | 0.000525 | ||||
| Transfer | 12551958 | 1715 days ago | IN | 0.07114876 ETH | 0.000483 | ||||
| Transfer | 12551928 | 1715 days ago | IN | 0.07163176 ETH | 0.000546 | ||||
| Buy Tokens | 12551846 | 1715 days ago | IN | 0.08 ETH | 0.00079965 | ||||
| Buy Tokens | 12551596 | 1715 days ago | IN | 2 ETH | 0.00079965 | ||||
| Withdraw Tokens | 12551544 | 1715 days ago | IN | 0 ETH | 0.00226601 | ||||
| Withdraw Tokens | 12551537 | 1715 days ago | IN | 0 ETH | 0.00314424 | ||||
| Withdraw Tokens | 12551460 | 1715 days ago | IN | 0 ETH | 0.00300132 | ||||
| Withdraw Tokens | 12551416 | 1715 days ago | IN | 0 ETH | 0.00314397 | ||||
| Buy Tokens | 12551320 | 1715 days ago | IN | 0.85 ETH | 0.00079965 | ||||
| Buy Tokens | 12551320 | 1715 days ago | IN | 0.85 ETH | 0.00079965 | ||||
| Buy Tokens | 12551320 | 1715 days ago | IN | 0.85 ETH | 0.00079965 | ||||
| Withdraw Tokens | 12551186 | 1715 days ago | IN | 0 ETH | 0.00101712 | ||||
| Withdraw Tokens | 12551141 | 1715 days ago | IN | 0 ETH | 0.00314424 | ||||
| Withdraw Tokens | 12551128 | 1715 days ago | IN | 0 ETH | 0.00457344 | ||||
| Buy Tokens | 12551075 | 1715 days ago | IN | 0.0011 ETH | 0.00079965 | ||||
| Buy Tokens | 12551056 | 1715 days ago | IN | 0.002 ETH | 0.00079939 | ||||
| Buy Tokens | 12551053 | 1715 days ago | IN | 0.5 ETH | 0.00079965 |
Latest 25 internal transactions (View All)
Advanced mode:
| Parent Transaction Hash | Method | Block |
From
|
|
To
|
||
|---|---|---|---|---|---|---|---|
| - | 12549349 | 1715 days ago | 0.00026077 ETH | ||||
| - | 12549321 | 1715 days ago | 0.000001 ETH | ||||
| - | 12549305 | 1715 days ago | 0.001 ETH | ||||
| - | 12549303 | 1715 days ago | 0.001 ETH | ||||
| - | 12549299 | 1715 days ago | 0.001 ETH | ||||
| - | 12549294 | 1715 days ago | 0.001 ETH | ||||
| - | 12549292 | 1715 days ago | 0.001 ETH | ||||
| - | 12549288 | 1715 days ago | 0.001 ETH | ||||
| - | 12549283 | 1715 days ago | 0.001 ETH | ||||
| - | 12549276 | 1715 days ago | 0.001 ETH | ||||
| - | 12549261 | 1715 days ago | 0.02 ETH | ||||
| - | 12549257 | 1715 days ago | 0.00015 ETH | ||||
| - | 12549250 | 1715 days ago | 0.233 ETH | ||||
| - | 12549250 | 1715 days ago | 0.1 ETH | ||||
| - | 12549249 | 1715 days ago | 0.4 ETH | ||||
| - | 12549249 | 1715 days ago | 0.231 ETH | ||||
| - | 12549249 | 1715 days ago | 0.275 ETH | ||||
| - | 12549249 | 1715 days ago | 2 ETH | ||||
| - | 12549249 | 1715 days ago | 1 ETH | ||||
| - | 12549249 | 1715 days ago | 0.7 ETH | ||||
| - | 12549249 | 1715 days ago | 1 ETH | ||||
| - | 12549249 | 1715 days ago | 0.075 ETH | ||||
| - | 12549249 | 1715 days ago | 0.01 ETH | ||||
| - | 12549249 | 1715 days ago | 1.9 ETH | ||||
| - | 12549249 | 1715 days ago | 0.1 ETH |
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
KojiCrowdSale
Compiler Version
v0.5.0+commit.1d4f565a
Optimization Enabled:
Yes with 200 runs
Other Settings:
byzantium EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
/*
,╓╦▄▄▄█████████████▄▄╦╖,
,╓▄████████████████████████████████▄w,
,╓▄██████████████████████████████████████████▄w,
╓▄███████████████████████████████████████████████████w
╔███████████████████████████████████████████████▓▓███████▓█▄
╓█████████████████████████████████████████████████▓███▓██▓▓▓▓▓▓▓█w
▄█▓▓▓▓▓▓██████▓██▓▓███▓▓▓▓▓▓▓▓▓█████▓▓▓▓▓▓▓▓█▒▀╛'²▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█▄
▄▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▀` \ ╓╜▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▄
g▓▓▓▓▓▓▓▓▓▓▌]╢╢╢╢╣▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▀"`╓╫ ╓╩▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▄
╓█▓▓▓▓▓▓▓▓▓▓▓█`╙▓╢╢╣╢╢╢╢╢╢╢╢╢╣▓▓▓▓▓▓▓▓▓▓▓▓▓▀╜,g▓▓▌╙╖▀▓`]▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓W
▄▓▓▓▓▓▓▓▓▓▓▓▓▓▓▌─¿'▓╢╢╢╢╢╢╢╢╢╢╢╢╢╢╢╢▓▀▀▓█▀`,φ▓▓▓▓▓▓▓▓▓▓ ]▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█
,█▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ╣ ,~╙▓╢╢╢╢╢╢╢╣╣╣╣╣╢╣▓╜ ╓@╙▀▓▓▓▓▓▓▓▓▓▓▓L]▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓,
┌▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓└ `"Ç~╙▓╢╢╢╢╢╢╢╣╢▓`╓▓▓▓w ▀▀▓▓▓▓▓▓[ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓L
╒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▌ (:]w`\▒,"▓╢╢▓▓"╔▓▓▓▓▓▓▓▓▓, '╨▓▓▌ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▄
╒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓U',²`╓╙.▒"╦≥ ╨▓▓▓▓▓▓▓▓▓▓▓▓▓▓▄ ` ▓▓▓▓▓▓▓╣▓▓╢▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓L
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓W\ ╙¡Ü╗*▒░,╙╨╖─"▀▓▓▓▓▓▓▓▓▓▓▓▓N, "▀▓╣╣╣╣▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
▓╣╣╢╢▓╣╣╬▓▓╣╣╢╢▓╣╢╢╣▓╣▓▓╣╢▓Ç. '` ▒H`╚▒»╙╝╦▒╥,▀▓▓▓▓▓╣▓▓▓▓▓╖ "▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
╒▓▓╣▓▓╣╢╣╣╣╢╬╣╣╢╣╣╢╣╢╣╢╣╣╣╣╣▓▓Ç ⁿ╕ "w║▓Ü╢▒▓╥Z═Ç▀▓▓╣▓▓▓▓▓▓▓M═ W,,, `▀▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓L
▓▓▓▓▓▓▓╢▓▓╣╢▓▓▓▓╣╢╣╣▓▓╢▓▓▓▓▓▓▓╣▓@`~ r,╨ `\[cN╗"╟▓▓▓ⁿ«▓▓▓╢╢╢▓▓B [ ```╙▓╣╢╢╣╢╢╢╣╢╣╣╢╢╣╢╢╢╢▓
▓▓▓▓▓▓╣▓▓▓▓▓▓▓▓▓╢▓▓▓▓▓▓▓▓▓▓▓▓▓╣▓@╦ ]m"`,.╜H"╙H╖▒▓▓▓▓▓R╩Ö▓╣▓▓╣Ü ╟▓""""""""""``` ╙▓╢╢╢╢╢╢╢╢╢╢╢╢╢╢╢╢
]▓▓╢╣╢╣▒╢╢╢╢▓╢▒╢╢╢╢╢╢╣╢╣▓▓▓╣╢╢▓▓▓╝▓▓▓M╣╣╖"=∩╖ ╖▀║▄╓╗▄Ö▓▓▓▓▓▓▓ÑW╟▓▓╖ J▓╣╢╢╢╢╢╣╢╢╢╢╢╣╢╡
╟╢╣╣╢╣╢╢╢╢▒▒▒╢╢╢╢▒╢╢╢╣╢╢╣╣╢╢╢╣╢▓µ╣▓▓▓k"╖ ]╝~> â▓▓▓▓▓▓▓╬▓▓▓@▓▓▓▓▓▓▓▓▓▓▄,,.⌐══^"` .▓╢╣╢╢╢╢╢╢╢╣╢╣╣
╟▒▒╣▒▒╢▒▒▒▒▒▒▒▒▒▒╢╢╣╢╢╣╣╣╣╣╣╢╢▓║▓░╙▓╦╣▐▄▄▄, φ▓▄▓▀▀Θ╫╙▓▄▓▓▓▀▓▓▓▀▓▓▓█▓▓▓▓▓█▓▄╥╥ç^` ╓▒▒▒▒▒▒▒▒▒▒▒▒▒
╟╢▒╢╢╢╢╢╢╢▒▒╢╢╢╣╢╢╢╢╢╢╢╢╢╢╢╢╢╢╨╨▀~`─╗,▓▓▄p╜╟▓╙▓▓▓▄▄▓▓▓▓▓▓▀`▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
╚╣╢╢╢╢╢╣╢╢╢╢╢╢╣╢╢╣╢╢╢╢╢╢╢╢╢╢╢╣&▓%▓▓▓▓▓▓▓▓▓▓▒╣╢╣▓"║▓▓▀▓▓▓▓╬▓▓▓▓▓╣▓▓▓▀▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▌
j╢╣╣╢╢╢╢╢╢╣╢╢╢╢╢╣╣╢╢╢╣╢╣╢╣╢╢╣╣╣▒Ü╣┐╛"" ╫▓▓▓▓▓█▒║"╓ ╒▐▓▓▓▓▓▒╢╢▓▓▓╢║▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒[
╫╢╣╢╢╢╢╣╣╣╣╣▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒@▒▒[ ╘╢▓▓▓▓▓▓▓╜,▄▌▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
▐▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒[▒; ▒ ╙╣╢▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░░╝
╣▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒║@M ⁿ ╚╣╣▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
╘▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ░ ]╥╥gq@▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░░░░░░░░░░ ░░ ` ' ╛
╚▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░░░░░░░▒ ▒ ▒░▒∩L ▌`"▓▓▓▓░░░░░░░░░'░░░ ╜
╟░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒]▒ ▒▒▒┘╙Φ²"`",╙▓▓▓░ ▒
╟░░░░░░░░░░░░░░ `[─ ▒╜╓┐ ╟┴,▓▓ ╙▓▓▓ ▒
╙░ `∩ ░[ ]M▓▓╢╝ ╥╙▓▓ ▒
└░ ^╙ ╓]╦`╔╜╓┐ L`╟▓▄╖ `
║ ` ```` ,╢Üg╙▓▄╗▄▄▓▓▓▓▓@▓ ░
╙@Ñ▓▓@@@@gggm@╣@@▓@gr mrr,`╓,,,╓╖,, , :──, ╔█▓▄, ,,,,╓╓╓╓╓╓╓╖╖,, ,,,,,╓,,,
╙╜╜╙╜╜╜╜╙░░▄▄╜''`'─╧▓╢ / ░⌡ w╓▄▄▄ ▐▓▓▓`, , ,, ┘
╙▓▓╢╢╣▒▓▒███▓███▀▀▀▀█▓▓▀▓▓▓█▀▀█████`▀▀▄█▓███████▒▓█▀▀▒▀╜▀▀▀▓█╜▓▓╣▓▓▓▒[h╜
╙▓]╬▓▄▓███▄▄▓▄▄▄▓▓█▓▓▓▓▓▓▓▓▓█▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██▓▓▓▓▓▓▀▓█ ▀▒▓██▓`
╙╢▒▒██▒░▒░▒▒▒░░░░▒▒▒▒▒▒▒▒▒▒▒▒░▒▒▒▒▒▒▒▒▒▒▒░░░░▒░░░░░░░░░░░░░░▒╝
╚▓█╣╣╫╣╣╣╬╬@╬╣▓╣╫▒▓╨╜╙╜║╜╨╜╙╢╜▒▒▒▒▒╢▒▒░╙╜╜╙╙╙╙╙╙╜*└─░▒╢╜`
"╩▓╢╢╢╣╢╢╣╜▓██▓@░▒░░▒▒▒▒▒╖╓░░╓≤pHU▒▒╨╜░╙╝╨╩╜` ▒╜╜"
`╙▀▓╬▒ ▓█╣▓▓▓█████▓▒╠╙ '░,╙░` ` *╜^ ╚╜`
`"╨▓▓▓▓╜▀███▓▄▒,╓╖▒░╓╖░,,▒╩╨╙`
```````
"The universe is a big place, until one day it lands on your doorstep"
KOJI Public Sale { koji.earth properties {
400 B Hardcap First NFT Collectible Comic
Refundable if softcap not met 1% to Charity
Tokens can't be withdrawn until LP added Deflationary
https://publicsale.koji.earth Public Ambassador
} Doxxed Team
}
Hi Mom!
*/
pragma solidity ^0.5.0;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/crowdsale/Crowdsale.sol";
import "@openzeppelin/contracts/crowdsale/emission/AllowanceCrowdsale.sol";
import "@openzeppelin/contracts/crowdsale/validation/TimedCrowdsale.sol";
import "@openzeppelin/contracts/crowdsale/validation/CappedCrowdsale.sol";
import "@openzeppelin/contracts/crowdsale/distribution/RefundableCrowdsale.sol";
import "@openzeppelin/contracts/crowdsale/distribution/FinalizableCrowdsale.sol";
import "@openzeppelin/contracts/crowdsale/distribution/PostDeliveryCrowdsale.sol";
import "@openzeppelin/contracts/access/roles/CapperRole.sol";
contract KojiCrowdSale is Crowdsale, AllowanceCrowdsale, TimedCrowdsale, FinalizableCrowdsale, RefundableCrowdsale, PostDeliveryCrowdsale, CappedCrowdsale, CapperRole {
using SafeMath for uint256;
mapping(address => uint256) private _contributions;
mapping(address => uint256) private _caps;
uint256 private _individualDefaultCap;
constructor(
uint256 _rate, //000000003 = 3 billion per eth
address payable _wallet, //where the eth goes
IERC20 _token, //token contract address
address _tokenWallet, //address holding the tokens
uint256 _openingTime, //start time in unix time
uint256 _closingTime, //end time in unix time
uint256 individualCap, //per wallet cap in wei
uint256 _softcap, //minimum goal
uint256 _cap //total sale cap in wei
)
public
AllowanceCrowdsale(_tokenWallet)
Crowdsale(_rate, _wallet, _token)
TimedCrowdsale(_openingTime, _closingTime)
FinalizableCrowdsale()
RefundableCrowdsale(_softcap)
PostDeliveryCrowdsale(_softcap)
CappedCrowdsale(_cap)
{
_individualDefaultCap = individualCap;
}
address payable owner = msg.sender;
modifier onlyOwner() {
require(msg.sender == owner);
_;
}
function withdrawUnsoldTokens(address tokenAddress) onlyOwner public
{
require(msg.sender == owner);
ERC20 mytoken = ERC20(tokenAddress);
uint256 unsold = mytoken.balanceOf(address(this));
mytoken.transfer(owner, unsold);
}
/**
* @dev Sets a specific beneficiary's maximum contribution.
* @param beneficiary Address to be capped
* @param cap Wei limit for individual contribution
*/
function setCap(address beneficiary, uint256 cap) external onlyCapper {
_caps[beneficiary] = cap;
}
/**
* @dev Returns the cap of a specific beneficiary.
* @param beneficiary Address whose cap is to be checked
* @return Current cap for individual beneficiary
*/
function getCap(address beneficiary) public view returns (uint256) {
uint256 cap = _caps[beneficiary];
if (cap == 0) {
cap = _individualDefaultCap;
}
return cap;
}
/**
* @dev Returns the amount contributed so far by a specific beneficiary.
* @param beneficiary Address of contributor
* @return Beneficiary contribution so far
*/
function getContribution(address beneficiary) public view returns (uint256) {
return _contributions[beneficiary];
}
/**
* @dev Extend parent behavior requiring purchase to respect the beneficiary's funding cap.
* @param beneficiary Token purchaser
* @param weiAmount Amount of wei contributed
*/
function _preValidatePurchase(address beneficiary, uint256 weiAmount) internal view {
super._preValidatePurchase(beneficiary, weiAmount);
// solhint-disable-next-line max-line-length
require(_contributions[beneficiary].add(weiAmount) <= getCap(beneficiary), "KOJISale: wallet cap exceeded");
}
/**
* @dev Extend parent behavior to update beneficiary contributions.
* @param beneficiary Token purchaser
* @param weiAmount Amount of wei contributed
*/
function _updatePurchasingState(address beneficiary, uint256 weiAmount) internal {
super._updatePurchasingState(beneficiary, weiAmount);
_contributions[beneficiary] = _contributions[beneficiary].add(weiAmount);
}
}pragma solidity ^0.5.0;
/**
* @title Roles
* @dev Library for managing addresses assigned to a Role.
*/
library Roles {
struct Role {
mapping (address => bool) bearer;
}
/**
* @dev Give an account access to this role.
*/
function add(Role storage role, address account) internal {
require(!has(role, account), "Roles: account already has role");
role.bearer[account] = true;
}
/**
* @dev Remove an account's access to this role.
*/
function remove(Role storage role, address account) internal {
require(has(role, account), "Roles: account does not have role");
role.bearer[account] = false;
}
/**
* @dev Check if an account has this role.
* @return bool
*/
function has(Role storage role, address account) internal view returns (bool) {
require(account != address(0), "Roles: account is the zero address");
return role.bearer[account];
}
}pragma solidity ^0.5.0;
import "../Roles.sol";
contract CapperRole {
using Roles for Roles.Role;
event CapperAdded(address indexed account);
event CapperRemoved(address indexed account);
Roles.Role private _cappers;
constructor () internal {
_addCapper(msg.sender);
}
modifier onlyCapper() {
require(isCapper(msg.sender), "CapperRole: caller does not have the Capper role");
_;
}
function isCapper(address account) public view returns (bool) {
return _cappers.has(account);
}
function addCapper(address account) public onlyCapper {
_addCapper(account);
}
function renounceCapper() public {
_removeCapper(msg.sender);
}
function _addCapper(address account) internal {
_cappers.add(account);
emit CapperAdded(account);
}
function _removeCapper(address account) internal {
_cappers.remove(account);
emit CapperRemoved(account);
}
}pragma solidity ^0.5.0;
import "../token/ERC20/IERC20.sol";
import "../math/SafeMath.sol";
import "../token/ERC20/SafeERC20.sol";
import "../utils/ReentrancyGuard.sol";
/**
* @title Crowdsale
* @dev Crowdsale is a base contract for managing a token crowdsale,
* allowing investors to purchase tokens with ether. This contract implements
* such functionality in its most fundamental form and can be extended to provide additional
* functionality and/or custom behavior.
* The external interface represents the basic interface for purchasing tokens, and conforms
* the base architecture for crowdsales. It is *not* intended to be modified / overridden.
* The internal interface conforms the extensible and modifiable surface of crowdsales. Override
* the methods to add functionality. Consider using 'super' where appropriate to concatenate
* behavior.
*/
contract Crowdsale is ReentrancyGuard {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// The token being sold
IERC20 private _token;
// Address where funds are collected
address payable private _wallet;
// How many token units a buyer gets per wei.
// The rate is the conversion between wei and the smallest and indivisible token unit.
// So, if you are using a rate of 1 with a ERC20Detailed token with 3 decimals called TOK
// 1 wei will give you 1 unit, or 0.001 TOK.
uint256 private _rate;
// Amount of wei raised
uint256 private _weiRaised;
/**
* Event for token purchase logging
* @param purchaser who paid for the tokens
* @param beneficiary who got the tokens
* @param value weis paid for purchase
* @param amount amount of tokens purchased
*/
event TokensPurchased(address indexed purchaser, address indexed beneficiary, uint256 value, uint256 amount);
/**
* @param rate Number of token units a buyer gets per wei
* @dev The rate is the conversion between wei and the smallest and indivisible
* token unit. So, if you are using a rate of 1 with a ERC20Detailed token
* with 3 decimals called TOK, 1 wei will give you 1 unit, or 0.001 TOK.
* @param wallet Address where collected funds will be forwarded to
* @param token Address of the token being sold
*/
constructor (uint256 rate, address payable wallet, IERC20 token) public {
require(rate > 0, "Crowdsale: rate is 0");
require(wallet != address(0), "Crowdsale: wallet is the zero address");
require(address(token) != address(0), "Crowdsale: token is the zero address");
_rate = rate;
_wallet = wallet;
_token = token;
}
/**
* @dev fallback function ***DO NOT OVERRIDE***
* Note that other contracts will transfer funds with a base gas stipend
* of 2300, which is not enough to call buyTokens. Consider calling
* buyTokens directly when purchasing tokens from a contract.
*/
function () external payable {
buyTokens(msg.sender);
}
/**
* @return the token being sold.
*/
function token() public view returns (IERC20) {
return _token;
}
/**
* @return the address where funds are collected.
*/
function wallet() public view returns (address payable) {
return _wallet;
}
/**
* @return the number of token units a buyer gets per wei.
*/
function rate() public view returns (uint256) {
return _rate;
}
/**
* @return the amount of wei raised.
*/
function weiRaised() public view returns (uint256) {
return _weiRaised;
}
/**
* @dev low level token purchase ***DO NOT OVERRIDE***
* This function has a non-reentrancy guard, so it shouldn't be called by
* another `nonReentrant` function.
* @param beneficiary Recipient of the token purchase
*/
function buyTokens(address beneficiary) public nonReentrant payable {
uint256 weiAmount = msg.value;
_preValidatePurchase(beneficiary, weiAmount);
// calculate token amount to be created
uint256 tokens = _getTokenAmount(weiAmount);
// update state
_weiRaised = _weiRaised.add(weiAmount);
_processPurchase(beneficiary, tokens);
emit TokensPurchased(msg.sender, beneficiary, weiAmount, tokens);
_updatePurchasingState(beneficiary, weiAmount);
_forwardFunds();
_postValidatePurchase(beneficiary, weiAmount);
}
/**
* @dev Validation of an incoming purchase. Use require statements to revert state when conditions are not met.
* Use `super` in contracts that inherit from Crowdsale to extend their validations.
* Example from CappedCrowdsale.sol's _preValidatePurchase method:
* super._preValidatePurchase(beneficiary, weiAmount);
* require(weiRaised().add(weiAmount) <= cap);
* @param beneficiary Address performing the token purchase
* @param weiAmount Value in wei involved in the purchase
*/
function _preValidatePurchase(address beneficiary, uint256 weiAmount) internal view {
require(beneficiary != address(0), "Crowdsale: beneficiary is the zero address");
require(weiAmount != 0, "Crowdsale: weiAmount is 0");
}
/**
* @dev Validation of an executed purchase. Observe state and use revert statements to undo rollback when valid
* conditions are not met.
* @param beneficiary Address performing the token purchase
* @param weiAmount Value in wei involved in the purchase
*/
function _postValidatePurchase(address beneficiary, uint256 weiAmount) internal view {
// solhint-disable-previous-line no-empty-blocks
}
/**
* @dev Source of tokens. Override this method to modify the way in which the crowdsale ultimately gets and sends
* its tokens.
* @param beneficiary Address performing the token purchase
* @param tokenAmount Number of tokens to be emitted
*/
function _deliverTokens(address beneficiary, uint256 tokenAmount) internal {
_token.safeTransfer(beneficiary, tokenAmount);
}
/**
* @dev Executed when a purchase has been validated and is ready to be executed. Doesn't necessarily emit/send
* tokens.
* @param beneficiary Address receiving the tokens
* @param tokenAmount Number of tokens to be purchased
*/
function _processPurchase(address beneficiary, uint256 tokenAmount) internal {
_deliverTokens(beneficiary, tokenAmount);
}
/**
* @dev Override for extensions that require an internal state to check for validity (current user contributions,
* etc.)
* @param beneficiary Address receiving the tokens
* @param weiAmount Value in wei involved in the purchase
*/
function _updatePurchasingState(address beneficiary, uint256 weiAmount) internal {
// solhint-disable-previous-line no-empty-blocks
}
/**
* @dev Override to extend the way in which ether is converted to tokens.
* @param weiAmount Value in wei to be converted into tokens
* @return Number of tokens that can be purchased with the specified _weiAmount
*/
function _getTokenAmount(uint256 weiAmount) internal view returns (uint256) {
return weiAmount.mul(_rate);
}
/**
* @dev Determines how ETH is stored/forwarded on purchases.
*/
function _forwardFunds() internal {
_wallet.transfer(msg.value);
}
}pragma solidity ^0.5.0;
import "../../math/SafeMath.sol";
import "../validation/TimedCrowdsale.sol";
/**
* @title FinalizableCrowdsale
* @dev Extension of TimedCrowdsale with a one-off finalization action, where one
* can do extra work after finishing.
*/
contract FinalizableCrowdsale is TimedCrowdsale {
using SafeMath for uint256;
bool private _finalized;
event CrowdsaleFinalized();
constructor () internal {
_finalized = false;
}
/**
* @return true if the crowdsale is finalized, false otherwise.
*/
function finalized() public view returns (bool) {
return _finalized;
}
/**
* @dev Must be called after crowdsale ends, to do some extra finalization
* work. Calls the contract's finalization function.
*/
function finalize() public {
require(!_finalized, "FinalizableCrowdsale: already finalized");
//require(hasClosed(), "FinalizableCrowdsale: not closed");
_finalized = true;
_finalization();
emit CrowdsaleFinalized();
}
/**
* @dev Can be overridden to add finalization logic. The overriding function
* should call super._finalization() to ensure the chain of finalization is
* executed entirely.
*/
function _finalization() internal {
// solhint-disable-previous-line no-empty-blocks
}
}pragma solidity ^0.5.0;
import "../validation/TimedCrowdsale.sol";
import "./FinalizableCrowdsale.sol";
import "../../math/SafeMath.sol";
import "../../ownership/Secondary.sol";
import "../../token/ERC20/IERC20.sol";
/**
* @title PostDeliveryCrowdsale
* @dev Crowdsale that locks tokens from withdrawal until it ends.
*/
contract PostDeliveryCrowdsale is TimedCrowdsale, FinalizableCrowdsale {
using SafeMath for uint256;
// minimum amount of funds to be raised in weis
uint256 private _goal;
mapping(address => uint256) private _balances;
__unstable__TokenVault private _vault;
constructor (uint256 goal) public {
require(goal > 0, "RefundableCrowdsale: goal is 0");
_vault = new __unstable__TokenVault();
_goal = goal;
}
/**
* @dev Withdraw tokens only after crowdsale ends.
* @param beneficiary Whose tokens will be withdrawn.
*/
function withdrawTokens(address beneficiary) public {
require(goalReached(), "RefundableCrowdsale: goal not reached");
//require(hasClosed(), "PostDeliveryCrowdsale: not closed");
require(finalized(), "Withdraw Tokens: crowdsale not finalized");
uint256 amount = _balances[beneficiary];
require(amount > 0, "PostDeliveryCrowdsale: beneficiary is not due any tokens");
_balances[beneficiary] = 0;
//_vault.transfer(token(), beneficiary, amount); //so taxes are avoided
_deliverTokens(address(beneficiary), amount);
}
/**
* @dev Checks whether funding goal was reached.
* @return Whether funding goal was reached
*/
function goalReached() public view returns (bool) {
return weiRaised() >= _goal;
}
/**
* @return the balance of an account.
*/
function balanceOf(address account) public view returns (uint256) {
return _balances[account];
}
/**
* @dev Overrides parent by storing due balances, and delivering tokens to the vault instead of the end user. This
* ensures that the tokens will be available by the time they are withdrawn (which may not be the case if
* `_deliverTokens` was called later).
* @param beneficiary Token purchaser
* @param tokenAmount Amount of tokens purchased
*/
function _processPurchase(address beneficiary, uint256 tokenAmount) internal {
_balances[beneficiary] = _balances[beneficiary].add(tokenAmount);
// _deliverTokens(address(_vault), tokenAmount); //so taxes are avoided
}
}
/**
* @title __unstable__TokenVault
* @dev Similar to an Escrow for tokens, this contract allows its primary account to spend its tokens as it sees fit.
* This contract is an internal helper for PostDeliveryCrowdsale, and should not be used outside of this context.
*/
// solhint-disable-next-line contract-name-camelcase
contract __unstable__TokenVault is Secondary {
function transfer(IERC20 token, address to, uint256 amount) public onlyPrimary {
token.transfer(to, amount);
}
}pragma solidity ^0.5.0;
import "../validation/TimedCrowdsale.sol";
import "../../math/SafeMath.sol";
import "./FinalizableCrowdsale.sol";
import "../../payment/escrow/RefundEscrow.sol";
/**
* @title RefundableCrowdsale
* @dev Extension of `FinalizableCrowdsale` contract that adds a funding goal, and the possibility of users
* getting a refund if goal is not met.
*
* Deprecated, use `RefundablePostDeliveryCrowdsale` instead. Note that if you allow tokens to be traded before the goal
* is met, then an attack is possible in which the attacker purchases tokens from the crowdsale and when they sees that
* the goal is unlikely to be met, they sell their tokens (possibly at a discount). The attacker will be refunded when
* the crowdsale is finalized, and the users that purchased from them will be left with worthless tokens.
*/
contract RefundableCrowdsale is FinalizableCrowdsale {
using SafeMath for uint256;
// minimum amount of funds to be raised in weis
uint256 private _goal;
// refund escrow used to hold funds while crowdsale is running
RefundEscrow private _escrow;
/**
* @dev Constructor, creates RefundEscrow.
* @param goal Funding goal
*/
constructor (uint256 goal) public {
require(goal > 0, "RefundableCrowdsale: goal is 0");
_escrow = new RefundEscrow(wallet());
_goal = goal;
}
address payable owner = msg.sender;
modifier onlyOwner() {
require(msg.sender == owner);
_;
}
/**
* @return minimum amount of funds to be raised in wei.
*/
function goal() public view returns (uint256) {
return _goal;
}
/**
* @dev Investors can claim refunds here if crowdsale is unsuccessful.
* @param refundee Whose refund will be claimed.
*/
function claimRefund(address payable refundee) public {
require(finalized(), "RefundableCrowdsale: not finalized");
require(!goalReached(), "RefundableCrowdsale: goal reached");
_escrow.withdraw(refundee);
}
/**
* @dev Checks whether funding goal was reached.
* @return Whether funding goal was reached
*/
function goalReached() public view returns (bool) {
return weiRaised() >= _goal;
}
/**
* @dev Escrow finalization task, called when finalize() is called.
*/
function _finalization() internal {
if (goalReached()) {
//escrow used to get transferred here, but that allows people to withdraw tokens before LP is created
} else {
_escrow.enableRefunds();
}
super._finalization();
}
/**
* @dev Escrow withdraw, called seperately from finalize().
This is called prior to finalize() to allow ETH + Token to be added to LP. Once added, finalize can be called
to allow token withdrawal and trading.
*/
function withdrawETH() onlyOwner public {
require(goalReached(), "RefundableCrowdsale: goal not reached");
//require(hasClosed(), "PostDeliveryCrowdsale: not closed");
_escrow.close();
_escrow.beneficiaryWithdraw();
}
/**
* @dev Overrides Crowdsale fund forwarding, sending funds to escrow.
*/
function _forwardFunds() internal {
_escrow.deposit.value(msg.value)(msg.sender);
}
}pragma solidity ^0.5.0;
import "../Crowdsale.sol";
import "../../token/ERC20/IERC20.sol";
import "../../token/ERC20/SafeERC20.sol";
import "../../math/SafeMath.sol";
import "../../math/Math.sol";
/**
* @title AllowanceCrowdsale
* @dev Extension of Crowdsale where tokens are held by a wallet, which approves an allowance to the crowdsale.
*/
contract AllowanceCrowdsale is Crowdsale {
using SafeMath for uint256;
using SafeERC20 for IERC20;
address private _tokenWallet;
/**
* @dev Constructor, takes token wallet address.
* @param tokenWallet Address holding the tokens, which has approved allowance to the crowdsale.
*/
constructor (address tokenWallet) public {
require(tokenWallet != address(0), "AllowanceCrowdsale: token wallet is the zero address");
_tokenWallet = tokenWallet;
}
/**
* @return the address of the wallet that will hold the tokens.
*/
function tokenWallet() public view returns (address) {
return _tokenWallet;
}
/**
* @dev Checks the amount of tokens left in the allowance.
* @return Amount of tokens left in the allowance
*/
function remainingTokens() public view returns (uint256) {
return Math.min(token().balanceOf(_tokenWallet), token().allowance(_tokenWallet, address(this)));
}
/**
* @dev Overrides parent behavior by transferring tokens from wallet.
* @param beneficiary Token purchaser
* @param tokenAmount Amount of tokens purchased
*/
function _deliverTokens(address beneficiary, uint256 tokenAmount) internal {
token().safeTransferFrom(_tokenWallet, beneficiary, tokenAmount);
}
}pragma solidity ^0.5.0;
import "../../math/SafeMath.sol";
import "../Crowdsale.sol";
/**
* @title CappedCrowdsale
* @dev Crowdsale with a limit for total contributions.
*/
contract CappedCrowdsale is Crowdsale {
using SafeMath for uint256;
uint256 private _cap;
/**
* @dev Constructor, takes maximum amount of wei accepted in the crowdsale.
* @param cap Max amount of wei to be contributed
*/
constructor (uint256 cap) public {
require(cap > 0, "CappedCrowdsale: cap is 0");
_cap = cap;
}
/**
* @return the cap of the crowdsale.
*/
function cap() public view returns (uint256) {
return _cap;
}
/**
* @dev Checks whether the cap has been reached.
* @return Whether the cap was reached
*/
function capReached() public view returns (bool) {
return weiRaised() >= _cap;
}
/**
* @dev Extend parent behavior requiring purchase to respect the funding cap.
* @param beneficiary Token purchaser
* @param weiAmount Amount of wei contributed
*/
function _preValidatePurchase(address beneficiary, uint256 weiAmount) internal view {
super._preValidatePurchase(beneficiary, weiAmount);
require(weiRaised().add(weiAmount) <= _cap, "CappedCrowdsale: cap exceeded");
}
}pragma solidity ^0.5.0;
import "../../math/SafeMath.sol";
import "../Crowdsale.sol";
/**
* @title TimedCrowdsale
* @dev Crowdsale accepting contributions only within a time frame.
*/
contract TimedCrowdsale is Crowdsale {
using SafeMath for uint256;
uint256 private _openingTime;
uint256 private _closingTime;
/**
* Event for crowdsale extending
* @param newClosingTime new closing time
* @param prevClosingTime old closing time
*/
event TimedCrowdsaleExtended(uint256 prevClosingTime, uint256 newClosingTime);
/**
* @dev Reverts if not in crowdsale time range.
*/
modifier onlyWhileOpen {
require(isOpen(), "TimedCrowdsale: not open");
_;
}
/**
* @dev Constructor, takes crowdsale opening and closing times.
* @param openingTime Crowdsale opening time
* @param closingTime Crowdsale closing time
*/
constructor (uint256 openingTime, uint256 closingTime) public {
// solhint-disable-next-line not-rely-on-time
//require(openingTime >= block.timestamp, "TimedCrowdsale: opening time is before current time");
// solhint-disable-next-line max-line-length
require(closingTime > openingTime, "TimedCrowdsale: opening time is not before closing time");
_openingTime = openingTime;
_closingTime = closingTime;
}
/**
* @return the crowdsale opening time.
*/
function openingTime() public view returns (uint256) {
return _openingTime;
}
/**
* @return the crowdsale closing time.
*/
function closingTime() public view returns (uint256) {
return _closingTime;
}
/**
* @return true if the crowdsale is open, false otherwise.
*/
function isOpen() public view returns (bool) {
// solhint-disable-next-line not-rely-on-time
return block.timestamp >= _openingTime && block.timestamp <= _closingTime;
}
/**
* @dev Checks whether the period in which the crowdsale is open has already elapsed.
* @return Whether crowdsale period has elapsed
*/
function hasClosed() public view returns (bool) {
// solhint-disable-next-line not-rely-on-time
return block.timestamp > _closingTime;
}
/**
* @dev Extend parent behavior requiring to be within contributing period.
* @param beneficiary Token purchaser
* @param weiAmount Amount of wei contributed
*/
function _preValidatePurchase(address beneficiary, uint256 weiAmount) internal onlyWhileOpen view {
super._preValidatePurchase(beneficiary, weiAmount);
}
/**
* @dev Extend crowdsale.
* @param newClosingTime Crowdsale closing time
*/
function _extendTime(uint256 newClosingTime) internal {
require(!hasClosed(), "TimedCrowdsale: already closed");
// solhint-disable-next-line max-line-length
require(newClosingTime > _closingTime, "TimedCrowdsale: new closing time is before current closing time");
emit TimedCrowdsaleExtended(_closingTime, newClosingTime);
_closingTime = newClosingTime;
}
}pragma solidity ^0.5.0;
/**
* @dev Standard math utilities missing in the Solidity language.
*/
library Math {
/**
* @dev Returns the largest of two numbers.
*/
function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a >= b ? a : b;
}
/**
* @dev Returns the smallest of two numbers.
*/
function min(uint256 a, uint256 b) internal pure returns (uint256) {
return a < b ? a : b;
}
/**
* @dev Returns the average of two numbers. The result is rounded towards
* zero.
*/
function average(uint256 a, uint256 b) internal pure returns (uint256) {
// (a + b) / 2 can overflow, so we distribute
return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);
}
}pragma solidity ^0.5.0;
/**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming languages.
* `SafeMath` restores this intuition by reverting the transaction when an
* operation overflows.
*
* Using this library instead of the unchecked operations eliminates an entire
* class of bugs, so it's recommended to use it always.
*/
library SafeMath {
/**
* @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) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
/**
* @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) {
require(b <= a, "SafeMath: subtraction overflow");
uint256 c = a - b;
return c;
}
/**
* @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) {
// 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 0;
}
uint256 c = a * b;
require(c / a == b, "SafeMath: multiplication overflow");
return c;
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts 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) internal pure returns (uint256) {
// Solidity only automatically asserts when dividing by 0
require(b > 0, "SafeMath: division by zero");
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts 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) {
require(b != 0, "SafeMath: modulo by zero");
return a % b;
}
}pragma solidity ^0.5.0;
/**
* @dev A Secondary contract can only be used by its primary account (the one that created it).
*/
contract Secondary {
address private _primary;
/**
* @dev Emitted when the primary contract changes.
*/
event PrimaryTransferred(
address recipient
);
/**
* @dev Sets the primary account to the one that is creating the Secondary contract.
*/
constructor () internal {
_primary = msg.sender;
emit PrimaryTransferred(_primary);
}
/**
* @dev Reverts if called from any account other than the primary.
*/
modifier onlyPrimary() {
require(msg.sender == _primary, "Secondary: caller is not the primary account");
_;
}
/**
* @return the address of the primary.
*/
function primary() public view returns (address) {
return _primary;
}
/**
* @dev Transfers contract to a new primary.
* @param recipient The address of new primary.
*/
function transferPrimary(address recipient) public onlyPrimary {
require(recipient != address(0), "Secondary: new primary is the zero address");
_primary = recipient;
emit PrimaryTransferred(_primary);
}
}pragma solidity ^0.5.0;
import "./Escrow.sol";
/**
* @title ConditionalEscrow
* @dev Base abstract escrow to only allow withdrawal if a condition is met.
* @dev Intended usage: See Escrow.sol. Same usage guidelines apply here.
*/
contract ConditionalEscrow is Escrow {
/**
* @dev Returns whether an address is allowed to withdraw their funds. To be
* implemented by derived contracts.
* @param payee The destination address of the funds.
*/
function withdrawalAllowed(address payee) public view returns (bool);
function withdraw(address payable payee) public {
require(withdrawalAllowed(payee), "ConditionalEscrow: payee is not allowed to withdraw");
super.withdraw(payee);
}
}pragma solidity ^0.5.0;
import "../../math/SafeMath.sol";
import "../../ownership/Secondary.sol";
/**
* @title Escrow
* @dev Base escrow contract, holds funds designated for a payee until they
* withdraw them.
* @dev Intended usage: This contract (and derived escrow contracts) should be a
* standalone contract, that only interacts with the contract that instantiated
* it. That way, it is guaranteed that all Ether will be handled according to
* the Escrow rules, and there is no need to check for payable functions or
* transfers in the inheritance tree. The contract that uses the escrow as its
* payment method should be its primary, and provide public methods redirecting
* to the escrow's deposit and withdraw.
*/
contract Escrow is Secondary {
using SafeMath for uint256;
event Deposited(address indexed payee, uint256 weiAmount);
event Withdrawn(address indexed payee, uint256 weiAmount);
mapping(address => uint256) private _deposits;
function depositsOf(address payee) public view returns (uint256) {
return _deposits[payee];
}
/**
* @dev Stores the sent amount as credit to be withdrawn.
* @param payee The destination address of the funds.
*/
function deposit(address payee) public onlyPrimary payable {
uint256 amount = msg.value;
_deposits[payee] = _deposits[payee].add(amount);
emit Deposited(payee, amount);
}
/**
* @dev Withdraw accumulated balance for a payee.
* @param payee The address whose funds will be withdrawn and transferred to.
*/
function withdraw(address payable payee) public onlyPrimary {
uint256 payment = _deposits[payee];
_deposits[payee] = 0;
payee.transfer(payment);
emit Withdrawn(payee, payment);
}
}pragma solidity ^0.5.0;
import "./ConditionalEscrow.sol";
/**
* @title RefundEscrow
* @dev Escrow that holds funds for a beneficiary, deposited from multiple
* parties.
* @dev Intended usage: See Escrow.sol. Same usage guidelines apply here.
* @dev The primary account (that is, the contract that instantiates this
* contract) may deposit, close the deposit period, and allow for either
* withdrawal by the beneficiary, or refunds to the depositors. All interactions
* with RefundEscrow will be made through the primary contract. See the
* RefundableCrowdsale contract for an example of RefundEscrow’s use.
*/
contract RefundEscrow is ConditionalEscrow {
enum State { Active, Refunding, Closed }
event RefundsClosed();
event RefundsEnabled();
State private _state;
address payable private _beneficiary;
/**
* @dev Constructor.
* @param beneficiary The beneficiary of the deposits.
*/
constructor (address payable beneficiary) public {
require(beneficiary != address(0), "RefundEscrow: beneficiary is the zero address");
_beneficiary = beneficiary;
_state = State.Active;
}
/**
* @return The current state of the escrow.
*/
function state() public view returns (State) {
return _state;
}
/**
* @return The beneficiary of the escrow.
*/
function beneficiary() public view returns (address) {
return _beneficiary;
}
/**
* @dev Stores funds that may later be refunded.
* @param refundee The address funds will be sent to if a refund occurs.
*/
function deposit(address refundee) public payable {
require(_state == State.Active, "RefundEscrow: can only deposit while active");
super.deposit(refundee);
}
/**
* @dev Allows for the beneficiary to withdraw their funds, rejecting
* further deposits.
*/
function close() public onlyPrimary {
require(_state == State.Active, "RefundEscrow: can only close while active");
_state = State.Closed;
emit RefundsClosed();
}
/**
* @dev Allows for refunds to take place, rejecting further deposits.
*/
function enableRefunds() public onlyPrimary {
require(_state == State.Active, "RefundEscrow: can only enable refunds while active");
_state = State.Refunding;
emit RefundsEnabled();
}
/**
* @dev Withdraws the beneficiary's funds.
*/
function beneficiaryWithdraw() public {
require(_state == State.Closed, "RefundEscrow: beneficiary can only withdraw while closed");
_beneficiary.transfer(address(this).balance);
}
/**
* @dev Returns whether refundees can withdraw their deposits (be refunded). The overridden function receives a
* 'payee' argument, but we ignore it here since the condition is global, not per-payee.
*/
function withdrawalAllowed(address) public view returns (bool) {
return _state == State.Refunding;
}
}pragma solidity ^0.5.0;
import "./IERC20.sol";
import "../../math/SafeMath.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 `ERC20Mintable`.
*
* *For a detailed writeup see our guide [How to implement supply
* mechanisms](https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226).*
*
* We have followed general OpenZeppelin guidelines: functions revert instead
* of 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 IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See `IERC20.totalSupply`.
*/
function totalSupply() public view returns (uint256) {
return _totalSupply;
}
/**
* @dev See `IERC20.balanceOf`.
*/
function balanceOf(address account) public view returns (uint256) {
return _balances[account];
}
/**
* @dev See `IERC20.transfer`.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(address recipient, uint256 amount) public returns (bool) {
_transfer(msg.sender, recipient, amount);
return true;
}
/**
* @dev See `IERC20.allowance`.
*/
function allowance(address owner, address spender) public view returns (uint256) {
return _allowances[owner][spender];
}
/**
* @dev See `IERC20.approve`.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 value) public returns (bool) {
_approve(msg.sender, spender, value);
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`;
*
* Requirements:
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `value`.
* - the caller must have allowance for `sender`'s tokens of at least
* `amount`.
*/
function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) {
_transfer(sender, recipient, amount);
_approve(sender, msg.sender, _allowances[sender][msg.sender].sub(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 returns (bool) {
_approve(msg.sender, spender, _allowances[msg.sender][spender].add(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 returns (bool) {
_approve(msg.sender, spender, _allowances[msg.sender][spender].sub(subtractedValue));
return true;
}
/**
* @dev Moves tokens `amount` from `sender` to `recipient`.
*
* This is 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:
*
* - `sender` cannot be the zero address.
* - `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
*/
function _transfer(address sender, address recipient, uint256 amount) internal {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_balances[sender] = _balances[sender].sub(amount);
_balances[recipient] = _balances[recipient].add(amount);
emit Transfer(sender, recipient, 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
*
* - `to` cannot be the zero address.
*/
function _mint(address account, uint256 amount) internal {
require(account != address(0), "ERC20: mint to the zero address");
_totalSupply = _totalSupply.add(amount);
_balances[account] = _balances[account].add(amount);
emit Transfer(address(0), account, amount);
}
/**
* @dev Destoys `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 value) internal {
require(account != address(0), "ERC20: burn from the zero address");
_totalSupply = _totalSupply.sub(value);
_balances[account] = _balances[account].sub(value);
emit Transfer(account, address(0), value);
}
/**
* @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.
*
* This is 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 value) internal {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = value;
emit Approval(owner, spender, value);
}
/**
* @dev Destoys `amount` tokens from `account`.`amount` is then deducted
* from the caller's allowance.
*
* See `_burn` and `_approve`.
*/
function _burnFrom(address account, uint256 amount) internal {
_burn(account, amount);
_approve(account, msg.sender, _allowances[account][msg.sender].sub(amount));
}
}pragma solidity ^0.5.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP. Does not include
* the optional functions; to access them see `ERC20Detailed`.
*/
interface IERC20 {
/**
* @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 `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a `Transfer` event.
*/
function transfer(address recipient, 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.
*
* > 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 `sender` to `recipient` 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 sender, address recipient, uint256 amount) external returns (bool);
/**
* @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);
}pragma solidity ^0.5.0;
import "./IERC20.sol";
import "../../math/SafeMath.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 ERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
}
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'
// solhint-disable-next-line max-line-length
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));
}
function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 newAllowance = token.allowance(address(this), spender).add(value);
callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 newAllowance = token.allowance(address(this), spender).sub(value);
callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
/**
* @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.
// A Solidity high level call has three parts:
// 1. The target address is checked to verify it contains contract code
// 2. The call itself is made, and success asserted
// 3. The return value is decoded, which in turn checks the size of the returned data.
// solhint-disable-next-line max-line-length
require(address(token).isContract(), "SafeERC20: call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = address(token).call(data);
require(success, "SafeERC20: low-level call failed");
if (returndata.length > 0) { // Return data is optional
// solhint-disable-next-line max-line-length
require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
}
}pragma solidity ^0.5.0;
/**
* @dev Collection of functions related to the address type,
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* This test is non-exhaustive, and there may be false-negatives: during the
* execution of a contract's constructor, its address will be reported as
* not containing a contract.
*
* > It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*/
function isContract(address account) internal view returns (bool) {
// This method relies in extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.
uint256 size;
// solhint-disable-next-line no-inline-assembly
assembly { size := extcodesize(account) }
return size > 0;
}
}pragma solidity ^0.5.0;
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the `nonReentrant` modifier
* available, which can be aplied 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.
*/
contract ReentrancyGuard {
/// @dev counter to allow mutex lock with only one SSTORE operation
uint256 private _guardCounter;
constructor () internal {
// The counter starts at one to prevent changing it from zero to a non-zero
// value, which is a more expensive operation.
_guardCounter = 1;
}
/**
* @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 make it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
_guardCounter += 1;
uint256 localCounter = _guardCounter;
_;
require(localCounter == _guardCounter, "ReentrancyGuard: reentrant call");
}
}{
"remappings": [],
"optimizer": {
"enabled": true,
"runs": 200
},
"evmVersion": "byzantium",
"libraries": {},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"abi"
]
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"constant":true,"inputs":[],"name":"hasClosed","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"beneficiary","type":"address"}],"name":"getContribution","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"rate","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"cap","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"account","type":"address"}],"name":"isCapper","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"goal","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"weiRaised","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isOpen","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"beneficiary","type":"address"}],"name":"withdrawTokens","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"closingTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"finalize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"capReached","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"wallet","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceCapper","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"account","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"tokenAddress","type":"address"}],"name":"withdrawUnsoldTokens","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"goalReached","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"beneficiary","type":"address"},{"name":"cap","type":"uint256"}],"name":"setCap","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"account","type":"address"}],"name":"addCapper","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"beneficiary","type":"address"}],"name":"getCap","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"finalized","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"openingTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"remainingTokens","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"tokenWallet","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"refundee","type":"address"}],"name":"claimRefund","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"withdrawETH","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"beneficiary","type":"address"}],"name":"buyTokens","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"token","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_rate","type":"uint256"},{"name":"_wallet","type":"address"},{"name":"_token","type":"address"},{"name":"_tokenWallet","type":"address"},{"name":"_openingTime","type":"uint256"},{"name":"_closingTime","type":"uint256"},{"name":"individualCap","type":"uint256"},{"name":"_softcap","type":"uint256"},{"name":"_cap","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"account","type":"address"}],"name":"CapperAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"account","type":"address"}],"name":"CapperRemoved","type":"event"},{"anonymous":false,"inputs":[],"name":"CrowdsaleFinalized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"prevClosingTime","type":"uint256"},{"indexed":false,"name":"newClosingTime","type":"uint256"}],"name":"TimedCrowdsaleExtended","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"purchaser","type":"address"},{"indexed":true,"name":"beneficiary","type":"address"},{"indexed":false,"name":"value","type":"uint256"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"TokensPurchased","type":"event"}]Contract Creation Code
6080604052600b805433600160a060020a031991821681179092556014805490911690911790553480156200003357600080fd5b50604051610120806200340b83398101806040526101208110156200005757600080fd5b508051602082015160408301516060840151608085015160a086015160c087015160e08801516101009098015160016000908155979896979596949593949293919291819083908190889088908b908f908f908f9083116200011a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f43726f776473616c653a20726174652069732030000000000000000000000000604482015290519081900360640190fd5b600160a060020a0382161515620001b857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f43726f776473616c653a2077616c6c657420697320746865207a65726f20616460448201527f6472657373000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600160a060020a03811615156200025557604080517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f43726f776473616c653a20746f6b656e20697320746865207a65726f2061646460448201527f7265737300000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60039290925560028054600160a060020a0319908116600160a060020a03938416179091556001805490911692821692909217909155811615156200032157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603460248201527f416c6c6f77616e636543726f776473616c653a20746f6b656e2077616c6c657460448201527f20697320746865207a65726f2061646472657373000000000000000000000000606482015290519081900360840190fd5b60058054600160a060020a031916600160a060020a0392909216919091179055818111620003d657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f54696d656443726f776473616c653a206f70656e696e672074696d652069732060448201527f6e6f74206265666f726520636c6f73696e672074696d65000000000000000000606482015290519081900360840190fd5b6006919091556007556008805460ff19169055600081116200045957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f526566756e6461626c6543726f776473616c653a20676f616c20697320300000604482015290519081900360640190fd5b6200046c6401000000006200061c810204565b62000476620007e4565b600160a060020a03909116815260405190819003602001906000f080158015620004a4573d6000803e3d6000fd5b50600a8054600160a060020a031916600160a060020a0392909216919091179055600955600081116200053857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f526566756e6461626c6543726f776473616c653a20676f616c20697320300000604482015290519081900360640190fd5b62000542620007f5565b604051809103906000f0801580156200055f573d6000803e3d6000fd5b50600e8054600160a060020a031916600160a060020a0392909216919091179055600c5560008111620005f357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f43617070656443726f776473616c653a20636170206973203000000000000000604482015290519081900360640190fd5b600f556200060a336401000000006200062b810204565b50506013555062000806945050505050565b600254600160a060020a031690565b62000646601082640100000000620016e26200067d82021704565b604051600160a060020a038216907fa7555c95b69d4f5cc847881feb4ab2883a1921319e34fa2043747b793d65b36e90600090a250565b62000692828264010000000062000724810204565b15620006ff57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f526f6c65733a206163636f756e7420616c72656164792068617320726f6c6500604482015290519081900360640190fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b6000600160a060020a0382161515620007c457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f526f6c65733a206163636f756e7420697320746865207a65726f20616464726560448201527f7373000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b604051610c8880620022fb83390190565b6040516104888062002f8383390190565b611ae580620008166000396000f3fe6080604052600436106101505763ffffffff60e060020a6000350416631515bc2b811461015b57806321eff7fc146101845780632c4e722e146101c9578063355274ea146101de57806339564561146101f357806340193883146102265780634042b66f1461023b57806347535d7b1461025057806349df728c146102655780634b6753bc146102985780634bb278f3146102ad5780634f935945146102c2578063521eb273146102d75780635d5576f81461030857806370a082311461031d57806372f57f1f146103505780637d3d65221461038357806380ad2cf3146103985780638dfbcf36146103d1578063b3aefb7514610404578063b3f05b9714610437578063b7a8807c1461044c578063bf58390314610461578063bff99c6c14610476578063bffa55d51461048b578063e086e5ec146104be578063ec8ac4d8146104d3578063fc0c546a146104f9575b6101593361050e565b005b34801561016757600080fd5b50610170610615565b604080519115158252519081900360200190f35b34801561019057600080fd5b506101b7600480360360208110156101a757600080fd5b5035600160a060020a031661061d565b60408051918252519081900360200190f35b3480156101d557600080fd5b506101b7610638565b3480156101ea57600080fd5b506101b761063e565b3480156101ff57600080fd5b506101706004803603602081101561021657600080fd5b5035600160a060020a0316610644565b34801561023257600080fd5b506101b761065d565b34801561024757600080fd5b506101b7610663565b34801561025c57600080fd5b50610170610669565b34801561027157600080fd5b506101596004803603602081101561028857600080fd5b5035600160a060020a0316610684565b3480156102a457600080fd5b506101b7610845565b3480156102b957600080fd5b5061015961084b565b3480156102ce57600080fd5b5061017061090c565b3480156102e357600080fd5b506102ec610920565b60408051600160a060020a039092168252519081900360200190f35b34801561031457600080fd5b5061015961092f565b34801561032957600080fd5b506101b76004803603602081101561034057600080fd5b5035600160a060020a031661093a565b34801561035c57600080fd5b506101596004803603602081101561037357600080fd5b5035600160a060020a0316610955565b34801561038f57600080fd5b50610170610ab6565b3480156103a457600080fd5b50610159600480360360408110156103bb57600080fd5b50600160a060020a038135169060200135610ac3565b3480156103dd57600080fd5b50610159600480360360208110156103f457600080fd5b5035600160a060020a0316610b64565b34801561041057600080fd5b506101b76004803603602081101561042757600080fd5b5035600160a060020a0316610bf5565b34801561044357600080fd5b50610170610c1f565b34801561045857600080fd5b506101b7610c28565b34801561046d57600080fd5b506101b7610c2e565b34801561048257600080fd5b506102ec610d74565b34801561049757600080fd5b50610159600480360360208110156104ae57600080fd5b5035600160a060020a0316610d83565b3480156104ca57600080fd5b50610159610f05565b610159600480360360208110156104e957600080fd5b5035600160a060020a031661050e565b34801561050557600080fd5b506102ec611078565b6000805460010190819055346105248382611087565b600061052f82611119565b600454909150610545908363ffffffff61113016565b6004556105528482611194565b60408051838152602081018390528151600160a060020a0387169233927f6faf93231a456e552dbc9961f58d9713ee4f2e69d15f1975b050ef0911053a7b929081900390910190a36105a484836111dd565b6105ac611230565b6105b68483610611565b50506000548114610611576040805160e560020a62461bcd02815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b5050565b600754421190565b600160a060020a031660009081526011602052604090205490565b60035490565b600f5490565b600061065760108363ffffffff61129616565b92915050565b60095490565b60045490565b6000600654421015801561067f57506007544211155b905090565b61068c610ab6565b1515610708576040805160e560020a62461bcd02815260206004820152602560248201527f526566756e6461626c6543726f776473616c653a20676f616c206e6f7420726560448201527f6163686564000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b610710610c1f565b151561078c576040805160e560020a62461bcd02815260206004820152602860248201527f576974686472617720546f6b656e733a2063726f776473616c65206e6f74206660448201527f696e616c697a6564000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600160a060020a0381166000908152600d6020526040812054908111610822576040805160e560020a62461bcd02815260206004820152603860248201527f506f737444656c697665727943726f776473616c653a2062656e65666963696160448201527f7279206973206e6f742064756520616e7920746f6b656e730000000000000000606482015290519081900360840190fd5b600160a060020a0382166000908152600d6020526040812055610611828261133e565b60075490565b60085460ff16156108cc576040805160e560020a62461bcd02815260206004820152602760248201527f46696e616c697a61626c6543726f776473616c653a20616c726561647920666960448201527f6e616c697a656400000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6008805460ff191660011790556108e161136f565b6040517f9270cc390c096600a1c17c44345a1ba689fafd99d97487b10cfccf86cf73183690600090a1565b6000600f54610919610663565b1015905090565b600254600160a060020a031690565b610938336113f5565b565b600160a060020a03166000908152600d602052604090205490565b601454600160a060020a0316331461096c57600080fd5b601454600160a060020a0316331461098357600080fd5b604080517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290518291600091600160a060020a038416916370a08231916024808301926020929190829003018186803b1580156109e757600080fd5b505afa1580156109fb573d6000803e3d6000fd5b505050506040513d6020811015610a1157600080fd5b5051601454604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a0392831660048201526024810184905290519293509084169163a9059cbb916044808201926020929091908290030181600087803b158015610a8557600080fd5b505af1158015610a99573d6000803e3d6000fd5b505050506040513d6020811015610aaf57600080fd5b5050505050565b6000600c54610919610663565b610acc33610644565b1515610b48576040805160e560020a62461bcd02815260206004820152603060248201527f436170706572526f6c653a2063616c6c657220646f6573206e6f74206861766560448201527f207468652043617070657220726f6c6500000000000000000000000000000000606482015290519081900360840190fd5b600160a060020a03909116600090815260126020526040902055565b610b6d33610644565b1515610be9576040805160e560020a62461bcd02815260206004820152603060248201527f436170706572526f6c653a2063616c6c657220646f6573206e6f74206861766560448201527f207468652043617070657220726f6c6500000000000000000000000000000000606482015290519081900360840190fd5b610bf28161143d565b50565b600160a060020a038116600090815260126020526040812054801515610657575060135492915050565b60085460ff1690565b60065490565b600061067f610c3b611078565b600554604080517f70a08231000000000000000000000000000000000000000000000000000000008152600160a060020a039283166004820152905192909116916370a0823191602480820192602092909190829003018186803b158015610ca257600080fd5b505afa158015610cb6573d6000803e3d6000fd5b505050506040513d6020811015610ccc57600080fd5b5051610cd6611078565b600554604080517fdd62ed3e000000000000000000000000000000000000000000000000000000008152600160a060020a0392831660048201523060248201529051929091169163dd62ed3e91604480820192602092909190829003018186803b158015610d4357600080fd5b505afa158015610d57573d6000803e3d6000fd5b505050506040513d6020811015610d6d57600080fd5b5051611485565b600554600160a060020a031690565b610d8b610c1f565b1515610e07576040805160e560020a62461bcd02815260206004820152602260248201527f526566756e6461626c6543726f776473616c653a206e6f742066696e616c697a60448201527f6564000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b610e0f610ab6565b15610e8a576040805160e560020a62461bcd02815260206004820152602160248201527f526566756e6461626c6543726f776473616c653a20676f616c2072656163686560448201527f6400000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600a54604080517f51cff8d9000000000000000000000000000000000000000000000000000000008152600160a060020a038481166004830152915191909216916351cff8d991602480830192600092919082900301818387803b158015610ef157600080fd5b505af1158015610aaf573d6000803e3d6000fd5b601454600160a060020a03163314610f1c57600080fd5b610f24610ab6565b1515610fa0576040805160e560020a62461bcd02815260206004820152602560248201527f526566756e6461626c6543726f776473616c653a20676f616c206e6f7420726560448201527f6163686564000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600a60009054906101000a9004600160a060020a0316600160a060020a03166343d726d66040518163ffffffff1660e060020a028152600401600060405180830381600087803b158015610ff357600080fd5b505af1158015611007573d6000803e3d6000fd5b50505050600a60009054906101000a9004600160a060020a0316600160a060020a0316639af6549a6040518163ffffffff1660e060020a028152600401600060405180830381600087803b15801561105e57600080fd5b505af1158015611072573d6000803e3d6000fd5b50505050565b600154600160a060020a031690565b611091828261149b565b61109a82610bf5565b600160a060020a0383166000908152601160205260409020546110c3908363ffffffff61113016565b1115610611576040805160e560020a62461bcd02815260206004820152601d60248201527f4b4f4a4953616c653a2077616c6c657420636170206578636565646564000000604482015290519081900360640190fd5b60006106576003548361151690919063ffffffff16565b60008282018381101561118d576040805160e560020a62461bcd02815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b600160a060020a0382166000908152600d60205260409020546111bd908263ffffffff61113016565b600160a060020a039092166000908152600d602052604090209190915550565b6111e78282610611565b600160a060020a038216600090815260116020526040902054611210908263ffffffff61113016565b600160a060020a0390921660009081526011602052604090209190915550565b600a54604080517ff340fa010000000000000000000000000000000000000000000000000000000081523360048201529051600160a060020a039092169163f340fa01913491602480830192600092919082900301818588803b158015610ef157600080fd5b6000600160a060020a038216151561131e576040805160e560020a62461bcd02815260206004820152602260248201527f526f6c65733a206163636f756e7420697320746865207a65726f20616464726560448201527f7373000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b60055461061190600160a060020a03168383611358611078565b600160a060020a031692919063ffffffff6115b216565b611377610ab6565b15611381576113ed565b600a60009054906101000a9004600160a060020a0316600160a060020a0316638c52dc416040518163ffffffff1660e060020a028152600401600060405180830381600087803b1580156113d457600080fd5b505af11580156113e8573d6000803e3d6000fd5b505050505b610938610938565b61140660108263ffffffff61163a16565b604051600160a060020a038216907f427400d279c506df610224b22ecce89b693fc1865864113f21c8d19c1f0c2a3b90600090a250565b61144e60108263ffffffff6116e216565b604051600160a060020a038216907fa7555c95b69d4f5cc847881feb4ab2883a1921319e34fa2043747b793d65b36e90600090a250565b6000818310611494578161118d565b5090919050565b6114a58282611766565b600f546114c0826114b4610663565b9063ffffffff61113016565b1115610611576040805160e560020a62461bcd02815260206004820152601d60248201527f43617070656443726f776473616c653a20636170206578636565646564000000604482015290519081900360640190fd5b600082151561152757506000610657565b82820282848281151561153657fe5b041461118d576040805160e560020a62461bcd02815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60448201527f7700000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60408051600160a060020a0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526110729085906117ce565b6116448282611296565b15156116c0576040805160e560020a62461bcd02815260206004820152602160248201527f526f6c65733a206163636f756e7420646f6573206e6f74206861766520726f6c60448201527f6500000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600160a060020a0316600090815260209190915260409020805460ff19169055565b6116ec8282611296565b15611741576040805160e560020a62461bcd02815260206004820152601f60248201527f526f6c65733a206163636f756e7420616c72656164792068617320726f6c6500604482015290519081900360640190fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b61176e610669565b15156117c4576040805160e560020a62461bcd02815260206004820152601860248201527f54696d656443726f776473616c653a206e6f74206f70656e0000000000000000604482015290519081900360640190fd5b61061182826119d4565b6117e082600160a060020a0316611ab1565b1515611836576040805160e560020a62461bcd02815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b6000606083600160a060020a0316836040518082805190602001908083835b602083106118745780518252601f199092019160209182019101611855565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146118d6576040519150601f19603f3d011682016040523d82523d6000602084013e6118db565b606091505b5091509150811515611937576040805160e560020a62461bcd02815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b6000815111156110725780806020019051602081101561195657600080fd5b50511515611072576040805160e560020a62461bcd02815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f74207375636365656400000000000000000000000000000000000000000000606482015290519081900360840190fd5b600160a060020a0382161515611a5a576040805160e560020a62461bcd02815260206004820152602a60248201527f43726f776473616c653a2062656e656669636961727920697320746865207a6560448201527f726f206164647265737300000000000000000000000000000000000000000000606482015290519081900360840190fd5b801515610611576040805160e560020a62461bcd02815260206004820152601960248201527f43726f776473616c653a20776569416d6f756e74206973203000000000000000604482015290519081900360640190fd5b6000903b119056fea165627a7a72305820a3bc78ded0aa57ef867d37315914d260f87503947805125f7c7d0ee7b213d6a20029608060405234801561001057600080fd5b50604051602080610c888339810180604052602081101561003057600080fd5b505160008054600160a060020a03191633179081905560408051600160a060020a03929092168252517f4101e71e974f68df5e9730cc223280b41654676bbb052cdcc735c3337e64d2d99181900360200190a1600160a060020a038116151561012057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f526566756e64457363726f773a2062656e65666963696172792069732074686560448201527f207a65726f206164647265737300000000000000000000000000000000000000606482015290519081900360840190fd5b6002805460ff19600160a060020a03939093166101000261010060a860020a031990911617919091169055610b2e8061015a6000396000f3fe6080604052600436106100ae5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416632348238c81146100b357806338af3eed146100e857806343d726d61461011957806351cff8d91461012e578063685ca194146101615780638c52dc41146101a85780639af6549a146101bd578063c19d93fb146101d2578063c6dbdf611461020b578063e3a9db1a14610220578063f340fa0114610265575b600080fd5b3480156100bf57600080fd5b506100e6600480360360208110156100d657600080fd5b5035600160a060020a031661028b565b005b3480156100f457600080fd5b506100fd6103dc565b60408051600160a060020a039092168252519081900360200190f35b34801561012557600080fd5b506100e66103f0565b34801561013a57600080fd5b506100e66004803603602081101561015157600080fd5b5035600160a060020a0316610519565b34801561016d57600080fd5b506101946004803603602081101561018457600080fd5b5035600160a060020a03166105aa565b604080519115158252519081900360200190f35b3480156101b457600080fd5b506100e66105c6565b3480156101c957600080fd5b506100e66106f0565b3480156101de57600080fd5b506101e76107bd565b604051808260028111156101f757fe5b60ff16815260200191505060405180910390f35b34801561021757600080fd5b506100fd6107c6565b34801561022c57600080fd5b506102536004803603602081101561024357600080fd5b5035600160a060020a03166107d5565b60408051918252519081900360200190f35b6100e66004803603602081101561027b57600080fd5b5035600160a060020a03166107f0565b600054600160a060020a031633146102ef576040805160e560020a62461bcd02815260206004820152602c6024820152600080516020610ac38339815191526044820152600080516020610ae3833981519152606482015290519081900360840190fd5b600160a060020a0381161515610375576040805160e560020a62461bcd02815260206004820152602a60248201527f5365636f6e646172793a206e6577207072696d61727920697320746865207a6560448201527f726f206164647265737300000000000000000000000000000000000000000000606482015290519081900360840190fd5b6000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03838116919091179182905560408051929091168252517f4101e71e974f68df5e9730cc223280b41654676bbb052cdcc735c3337e64d2d9916020908290030190a150565b6002546101009004600160a060020a031690565b600054600160a060020a03163314610454576040805160e560020a62461bcd02815260206004820152602c6024820152600080516020610ac38339815191526044820152600080516020610ae3833981519152606482015290519081900360840190fd5b60006002805460ff169081111561046757fe5b146104e2576040805160e560020a62461bcd02815260206004820152602960248201527f526566756e64457363726f773a2063616e206f6e6c7920636c6f73652077686960448201527f6c65206163746976650000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6002805460ff1916811790556040517f088672c3a6e342f7cd94a65ba63b79df24a8973927b4d05d803c44bbf787d12f90600090a1565b610522816105aa565b151561059e576040805160e560020a62461bcd02815260206004820152603360248201527f436f6e646974696f6e616c457363726f773a207061796565206973206e6f742060448201527f616c6c6f77656420746f20776974686472617700000000000000000000000000606482015290519081900360840190fd5b6105a781610887565b50565b600060016002805460ff16908111156105bf57fe5b1492915050565b600054600160a060020a0316331461062a576040805160e560020a62461bcd02815260206004820152602c6024820152600080516020610ac38339815191526044820152600080516020610ae3833981519152606482015290519081900360840190fd5b60006002805460ff169081111561063d57fe5b146106b8576040805160e560020a62461bcd02815260206004820152603260248201527f526566756e64457363726f773a2063616e206f6e6c7920656e61626c6520726560448201527f66756e6473207768696c65206163746976650000000000000000000000000000606482015290519081900360840190fd5b6002805460ff191660011790556040517f599d8e5a83cffb867d051598c4d70e805d59802d8081c1c7d6dffc5b6aca2b8990600090a1565b6002805460ff168181111561070157fe5b1461077c576040805160e560020a62461bcd02815260206004820152603860248201527f526566756e64457363726f773a2062656e65666963696172792063616e206f6e60448201527f6c79207769746864726177207768696c6520636c6f7365640000000000000000606482015290519081900360840190fd5b600254604051600160a060020a036101009092049190911690303180156108fc02916000818181858888f193505050501580156105a7573d6000803e3d6000fd5b60025460ff1690565b600054600160a060020a031690565b600160a060020a031660009081526001602052604090205490565b60006002805460ff169081111561080357fe5b1461087e576040805160e560020a62461bcd02815260206004820152602b60248201527f526566756e64457363726f773a2063616e206f6e6c79206465706f736974207760448201527f68696c6520616374697665000000000000000000000000000000000000000000606482015290519081900360840190fd5b6105a781610979565b600054600160a060020a031633146108eb576040805160e560020a62461bcd02815260206004820152602c6024820152600080516020610ac38339815191526044820152600080516020610ae3833981519152606482015290519081900360840190fd5b600160a060020a038116600081815260016020526040808220805490839055905190929183156108fc02918491818181858888f19350505050158015610935573d6000803e3d6000fd5b50604080518281529051600160a060020a038416917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a25050565b600054600160a060020a031633146109dd576040805160e560020a62461bcd02815260206004820152602c6024820152600080516020610ac38339815191526044820152600080516020610ae3833981519152606482015290519081900360840190fd5b600160a060020a0381166000908152600160205260409020543490610a08908263ffffffff610a5e16565b600160a060020a038316600081815260016020908152604091829020939093558051848152905191927f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c492918290030190a25050565b600082820183811015610abb576040805160e560020a62461bcd02815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b939250505056fe5365636f6e646172793a2063616c6c6572206973206e6f7420746865207072696d617279206163636f756e740000000000000000000000000000000000000000a165627a7a7230582080cf30e4e4891d657a824a99cd3438ef8026d75ab999729e9ebd8b05c9bb656200296080604081905260008054600160a060020a031916331790819055600160a060020a031681527f4101e71e974f68df5e9730cc223280b41654676bbb052cdcc735c3337e64d2d990602090a161042e8061005a6000396000f3fe6080604052600436106100565763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416632348238c811461005b578063beabacc814610090578063c6dbdf61146100d3575b600080fd5b34801561006757600080fd5b5061008e6004803603602081101561007e57600080fd5b5035600160a060020a0316610104565b005b34801561009c57600080fd5b5061008e600480360360608110156100b357600080fd5b50600160a060020a038135811691602081013590911690604001356102a7565b3480156100df57600080fd5b506100e86103f3565b60408051600160a060020a039092168252519081900360200190f35b600054600160a060020a031633146101a357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f5365636f6e646172793a2063616c6c6572206973206e6f74207468652070726960448201527f6d617279206163636f756e740000000000000000000000000000000000000000606482015290519081900360840190fd5b600160a060020a038116151561024057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5365636f6e646172793a206e6577207072696d61727920697320746865207a6560448201527f726f206164647265737300000000000000000000000000000000000000000000606482015290519081900360840190fd5b6000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03838116919091179182905560408051929091168252517f4101e71e974f68df5e9730cc223280b41654676bbb052cdcc735c3337e64d2d9916020908290030190a150565b600054600160a060020a0316331461034657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f5365636f6e646172793a2063616c6c6572206973206e6f74207468652070726960448201527f6d617279206163636f756e740000000000000000000000000000000000000000606482015290519081900360840190fd5b82600160a060020a031663a9059cbb83836040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b1580156103c257600080fd5b505af11580156103d6573d6000803e3d6000fd5b505050506040513d60208110156103ec57600080fd5b5050505050565b600054600160a060020a03169056fea165627a7a723058209d32e8b25d82ff49f813db3a11d2d39914d719b90f23cb72c342f13a60457f56002900000000000000000000000000000000000000000000000000000000b2d05e000000000000000000000000001930f96d7aff9321836e3fbcce96b0f48dad890e0000000000000000000000001c8266a4369af6d80df2659ba47b3c98f35cb8be0000000000000000000000001930f96d7aff9321836e3fbcce96b0f48dad890e0000000000000000000000000000000000000000000000000000000060b64b700000000000000000000000000000000000000000000000000000000060ba3ff00000000000000000000000000000000000000000000000001bc16d674ec800000000000000000000000000000000000000000000000000047fdb3c3f456c000000000000000000000000000000000000000000000000000735beeb55f6f40000
Deployed Bytecode
0x6080604052600436106101505763ffffffff60e060020a6000350416631515bc2b811461015b57806321eff7fc146101845780632c4e722e146101c9578063355274ea146101de57806339564561146101f357806340193883146102265780634042b66f1461023b57806347535d7b1461025057806349df728c146102655780634b6753bc146102985780634bb278f3146102ad5780634f935945146102c2578063521eb273146102d75780635d5576f81461030857806370a082311461031d57806372f57f1f146103505780637d3d65221461038357806380ad2cf3146103985780638dfbcf36146103d1578063b3aefb7514610404578063b3f05b9714610437578063b7a8807c1461044c578063bf58390314610461578063bff99c6c14610476578063bffa55d51461048b578063e086e5ec146104be578063ec8ac4d8146104d3578063fc0c546a146104f9575b6101593361050e565b005b34801561016757600080fd5b50610170610615565b604080519115158252519081900360200190f35b34801561019057600080fd5b506101b7600480360360208110156101a757600080fd5b5035600160a060020a031661061d565b60408051918252519081900360200190f35b3480156101d557600080fd5b506101b7610638565b3480156101ea57600080fd5b506101b761063e565b3480156101ff57600080fd5b506101706004803603602081101561021657600080fd5b5035600160a060020a0316610644565b34801561023257600080fd5b506101b761065d565b34801561024757600080fd5b506101b7610663565b34801561025c57600080fd5b50610170610669565b34801561027157600080fd5b506101596004803603602081101561028857600080fd5b5035600160a060020a0316610684565b3480156102a457600080fd5b506101b7610845565b3480156102b957600080fd5b5061015961084b565b3480156102ce57600080fd5b5061017061090c565b3480156102e357600080fd5b506102ec610920565b60408051600160a060020a039092168252519081900360200190f35b34801561031457600080fd5b5061015961092f565b34801561032957600080fd5b506101b76004803603602081101561034057600080fd5b5035600160a060020a031661093a565b34801561035c57600080fd5b506101596004803603602081101561037357600080fd5b5035600160a060020a0316610955565b34801561038f57600080fd5b50610170610ab6565b3480156103a457600080fd5b50610159600480360360408110156103bb57600080fd5b50600160a060020a038135169060200135610ac3565b3480156103dd57600080fd5b50610159600480360360208110156103f457600080fd5b5035600160a060020a0316610b64565b34801561041057600080fd5b506101b76004803603602081101561042757600080fd5b5035600160a060020a0316610bf5565b34801561044357600080fd5b50610170610c1f565b34801561045857600080fd5b506101b7610c28565b34801561046d57600080fd5b506101b7610c2e565b34801561048257600080fd5b506102ec610d74565b34801561049757600080fd5b50610159600480360360208110156104ae57600080fd5b5035600160a060020a0316610d83565b3480156104ca57600080fd5b50610159610f05565b610159600480360360208110156104e957600080fd5b5035600160a060020a031661050e565b34801561050557600080fd5b506102ec611078565b6000805460010190819055346105248382611087565b600061052f82611119565b600454909150610545908363ffffffff61113016565b6004556105528482611194565b60408051838152602081018390528151600160a060020a0387169233927f6faf93231a456e552dbc9961f58d9713ee4f2e69d15f1975b050ef0911053a7b929081900390910190a36105a484836111dd565b6105ac611230565b6105b68483610611565b50506000548114610611576040805160e560020a62461bcd02815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b5050565b600754421190565b600160a060020a031660009081526011602052604090205490565b60035490565b600f5490565b600061065760108363ffffffff61129616565b92915050565b60095490565b60045490565b6000600654421015801561067f57506007544211155b905090565b61068c610ab6565b1515610708576040805160e560020a62461bcd02815260206004820152602560248201527f526566756e6461626c6543726f776473616c653a20676f616c206e6f7420726560448201527f6163686564000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b610710610c1f565b151561078c576040805160e560020a62461bcd02815260206004820152602860248201527f576974686472617720546f6b656e733a2063726f776473616c65206e6f74206660448201527f696e616c697a6564000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600160a060020a0381166000908152600d6020526040812054908111610822576040805160e560020a62461bcd02815260206004820152603860248201527f506f737444656c697665727943726f776473616c653a2062656e65666963696160448201527f7279206973206e6f742064756520616e7920746f6b656e730000000000000000606482015290519081900360840190fd5b600160a060020a0382166000908152600d6020526040812055610611828261133e565b60075490565b60085460ff16156108cc576040805160e560020a62461bcd02815260206004820152602760248201527f46696e616c697a61626c6543726f776473616c653a20616c726561647920666960448201527f6e616c697a656400000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6008805460ff191660011790556108e161136f565b6040517f9270cc390c096600a1c17c44345a1ba689fafd99d97487b10cfccf86cf73183690600090a1565b6000600f54610919610663565b1015905090565b600254600160a060020a031690565b610938336113f5565b565b600160a060020a03166000908152600d602052604090205490565b601454600160a060020a0316331461096c57600080fd5b601454600160a060020a0316331461098357600080fd5b604080517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290518291600091600160a060020a038416916370a08231916024808301926020929190829003018186803b1580156109e757600080fd5b505afa1580156109fb573d6000803e3d6000fd5b505050506040513d6020811015610a1157600080fd5b5051601454604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a0392831660048201526024810184905290519293509084169163a9059cbb916044808201926020929091908290030181600087803b158015610a8557600080fd5b505af1158015610a99573d6000803e3d6000fd5b505050506040513d6020811015610aaf57600080fd5b5050505050565b6000600c54610919610663565b610acc33610644565b1515610b48576040805160e560020a62461bcd02815260206004820152603060248201527f436170706572526f6c653a2063616c6c657220646f6573206e6f74206861766560448201527f207468652043617070657220726f6c6500000000000000000000000000000000606482015290519081900360840190fd5b600160a060020a03909116600090815260126020526040902055565b610b6d33610644565b1515610be9576040805160e560020a62461bcd02815260206004820152603060248201527f436170706572526f6c653a2063616c6c657220646f6573206e6f74206861766560448201527f207468652043617070657220726f6c6500000000000000000000000000000000606482015290519081900360840190fd5b610bf28161143d565b50565b600160a060020a038116600090815260126020526040812054801515610657575060135492915050565b60085460ff1690565b60065490565b600061067f610c3b611078565b600554604080517f70a08231000000000000000000000000000000000000000000000000000000008152600160a060020a039283166004820152905192909116916370a0823191602480820192602092909190829003018186803b158015610ca257600080fd5b505afa158015610cb6573d6000803e3d6000fd5b505050506040513d6020811015610ccc57600080fd5b5051610cd6611078565b600554604080517fdd62ed3e000000000000000000000000000000000000000000000000000000008152600160a060020a0392831660048201523060248201529051929091169163dd62ed3e91604480820192602092909190829003018186803b158015610d4357600080fd5b505afa158015610d57573d6000803e3d6000fd5b505050506040513d6020811015610d6d57600080fd5b5051611485565b600554600160a060020a031690565b610d8b610c1f565b1515610e07576040805160e560020a62461bcd02815260206004820152602260248201527f526566756e6461626c6543726f776473616c653a206e6f742066696e616c697a60448201527f6564000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b610e0f610ab6565b15610e8a576040805160e560020a62461bcd02815260206004820152602160248201527f526566756e6461626c6543726f776473616c653a20676f616c2072656163686560448201527f6400000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600a54604080517f51cff8d9000000000000000000000000000000000000000000000000000000008152600160a060020a038481166004830152915191909216916351cff8d991602480830192600092919082900301818387803b158015610ef157600080fd5b505af1158015610aaf573d6000803e3d6000fd5b601454600160a060020a03163314610f1c57600080fd5b610f24610ab6565b1515610fa0576040805160e560020a62461bcd02815260206004820152602560248201527f526566756e6461626c6543726f776473616c653a20676f616c206e6f7420726560448201527f6163686564000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600a60009054906101000a9004600160a060020a0316600160a060020a03166343d726d66040518163ffffffff1660e060020a028152600401600060405180830381600087803b158015610ff357600080fd5b505af1158015611007573d6000803e3d6000fd5b50505050600a60009054906101000a9004600160a060020a0316600160a060020a0316639af6549a6040518163ffffffff1660e060020a028152600401600060405180830381600087803b15801561105e57600080fd5b505af1158015611072573d6000803e3d6000fd5b50505050565b600154600160a060020a031690565b611091828261149b565b61109a82610bf5565b600160a060020a0383166000908152601160205260409020546110c3908363ffffffff61113016565b1115610611576040805160e560020a62461bcd02815260206004820152601d60248201527f4b4f4a4953616c653a2077616c6c657420636170206578636565646564000000604482015290519081900360640190fd5b60006106576003548361151690919063ffffffff16565b60008282018381101561118d576040805160e560020a62461bcd02815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b600160a060020a0382166000908152600d60205260409020546111bd908263ffffffff61113016565b600160a060020a039092166000908152600d602052604090209190915550565b6111e78282610611565b600160a060020a038216600090815260116020526040902054611210908263ffffffff61113016565b600160a060020a0390921660009081526011602052604090209190915550565b600a54604080517ff340fa010000000000000000000000000000000000000000000000000000000081523360048201529051600160a060020a039092169163f340fa01913491602480830192600092919082900301818588803b158015610ef157600080fd5b6000600160a060020a038216151561131e576040805160e560020a62461bcd02815260206004820152602260248201527f526f6c65733a206163636f756e7420697320746865207a65726f20616464726560448201527f7373000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b60055461061190600160a060020a03168383611358611078565b600160a060020a031692919063ffffffff6115b216565b611377610ab6565b15611381576113ed565b600a60009054906101000a9004600160a060020a0316600160a060020a0316638c52dc416040518163ffffffff1660e060020a028152600401600060405180830381600087803b1580156113d457600080fd5b505af11580156113e8573d6000803e3d6000fd5b505050505b610938610938565b61140660108263ffffffff61163a16565b604051600160a060020a038216907f427400d279c506df610224b22ecce89b693fc1865864113f21c8d19c1f0c2a3b90600090a250565b61144e60108263ffffffff6116e216565b604051600160a060020a038216907fa7555c95b69d4f5cc847881feb4ab2883a1921319e34fa2043747b793d65b36e90600090a250565b6000818310611494578161118d565b5090919050565b6114a58282611766565b600f546114c0826114b4610663565b9063ffffffff61113016565b1115610611576040805160e560020a62461bcd02815260206004820152601d60248201527f43617070656443726f776473616c653a20636170206578636565646564000000604482015290519081900360640190fd5b600082151561152757506000610657565b82820282848281151561153657fe5b041461118d576040805160e560020a62461bcd02815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60448201527f7700000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60408051600160a060020a0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526110729085906117ce565b6116448282611296565b15156116c0576040805160e560020a62461bcd02815260206004820152602160248201527f526f6c65733a206163636f756e7420646f6573206e6f74206861766520726f6c60448201527f6500000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600160a060020a0316600090815260209190915260409020805460ff19169055565b6116ec8282611296565b15611741576040805160e560020a62461bcd02815260206004820152601f60248201527f526f6c65733a206163636f756e7420616c72656164792068617320726f6c6500604482015290519081900360640190fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b61176e610669565b15156117c4576040805160e560020a62461bcd02815260206004820152601860248201527f54696d656443726f776473616c653a206e6f74206f70656e0000000000000000604482015290519081900360640190fd5b61061182826119d4565b6117e082600160a060020a0316611ab1565b1515611836576040805160e560020a62461bcd02815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b6000606083600160a060020a0316836040518082805190602001908083835b602083106118745780518252601f199092019160209182019101611855565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146118d6576040519150601f19603f3d011682016040523d82523d6000602084013e6118db565b606091505b5091509150811515611937576040805160e560020a62461bcd02815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b6000815111156110725780806020019051602081101561195657600080fd5b50511515611072576040805160e560020a62461bcd02815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f74207375636365656400000000000000000000000000000000000000000000606482015290519081900360840190fd5b600160a060020a0382161515611a5a576040805160e560020a62461bcd02815260206004820152602a60248201527f43726f776473616c653a2062656e656669636961727920697320746865207a6560448201527f726f206164647265737300000000000000000000000000000000000000000000606482015290519081900360840190fd5b801515610611576040805160e560020a62461bcd02815260206004820152601960248201527f43726f776473616c653a20776569416d6f756e74206973203000000000000000604482015290519081900360640190fd5b6000903b119056fea165627a7a72305820a3bc78ded0aa57ef867d37315914d260f87503947805125f7c7d0ee7b213d6a20029
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000b2d05e000000000000000000000000001930f96d7aff9321836e3fbcce96b0f48dad890e0000000000000000000000001c8266a4369af6d80df2659ba47b3c98f35cb8be0000000000000000000000001930f96d7aff9321836e3fbcce96b0f48dad890e0000000000000000000000000000000000000000000000000000000060b64b700000000000000000000000000000000000000000000000000000000060ba3ff00000000000000000000000000000000000000000000000001bc16d674ec800000000000000000000000000000000000000000000000000047fdb3c3f456c000000000000000000000000000000000000000000000000000735beeb55f6f40000
-----Decoded View---------------
Arg [0] : _rate (uint256): 3000000000
Arg [1] : _wallet (address): 0x1930F96d7afF9321836E3fbCCE96b0f48daD890e
Arg [2] : _token (address): 0x1c8266A4369aF6d80Df2659Ba47B3c98f35cB8bE
Arg [3] : _tokenWallet (address): 0x1930F96d7afF9321836E3fbCCE96b0f48daD890e
Arg [4] : _openingTime (uint256): 1622559600
Arg [5] : _closingTime (uint256): 1622818800
Arg [6] : individualCap (uint256): 2000000000000000000
Arg [7] : _softcap (uint256): 83000000000000000000
Arg [8] : _cap (uint256): 133000000000000000000
-----Encoded View---------------
9 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000b2d05e00
Arg [1] : 0000000000000000000000001930f96d7aff9321836e3fbcce96b0f48dad890e
Arg [2] : 0000000000000000000000001c8266a4369af6d80df2659ba47b3c98f35cb8be
Arg [3] : 0000000000000000000000001930f96d7aff9321836e3fbcce96b0f48dad890e
Arg [4] : 0000000000000000000000000000000000000000000000000000000060b64b70
Arg [5] : 0000000000000000000000000000000000000000000000000000000060ba3ff0
Arg [6] : 0000000000000000000000000000000000000000000000001bc16d674ec80000
Arg [7] : 0000000000000000000000000000000000000000000000047fdb3c3f456c0000
Arg [8] : 00000000000000000000000000000000000000000000000735beeb55f6f40000
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 34 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ 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.