Source Code
Latest 25 from a total of 733 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Set Redemption A... | 5555645 | 2870 days ago | IN | 0 ETH | 0.0002646 | ||||
| Set Redemption A... | 5552088 | 2871 days ago | IN | 0 ETH | 0.00011785 | ||||
| Set Redemption A... | 5499859 | 2880 days ago | IN | 0 ETH | 0.00005892 | ||||
| Reclaim Ether | 5498493 | 2880 days ago | IN | 0 ETH | 0.00010541 | ||||
| Mint Ref Credits | 5482565 | 2883 days ago | IN | 0 ETH | 0.00004344 | ||||
| Mint Ref Credits | 5475338 | 2884 days ago | IN | 0 ETH | 0.00018439 | ||||
| Mint Ref Credits | 5469029 | 2885 days ago | IN | 0 ETH | 0.00021292 | ||||
| Mint Ref Credits | 5463594 | 2886 days ago | IN | 0 ETH | 0.00006146 | ||||
| Mint Ref Credits | 5458930 | 2887 days ago | IN | 0 ETH | 0.00006146 | ||||
| Adopt Axies | 5453308 | 2888 days ago | IN | 0.4136 ETH | 0.00002844 | ||||
| Adopt Axies | 5453130 | 2888 days ago | IN | 0.4064 ETH | 0.00003555 | ||||
| Adopt Axies | 5453100 | 2888 days ago | IN | 0.4173 ETH | 0.00007111 | ||||
| Adopt Axies | 5453059 | 2888 days ago | IN | 0.4135 ETH | 0.00007111 | ||||
| Adopt Axies | 5453038 | 2888 days ago | IN | 0.4172 ETH | 0.00011801 | ||||
| Adopt Axies | 5452944 | 2888 days ago | IN | 0.4134 ETH | 0.00206026 | ||||
| Adopt Axies | 5452858 | 2888 days ago | IN | 1.2295 ETH | 0.00142605 | ||||
| Adopt Axies | 5452764 | 2888 days ago | IN | 1.2363 ETH | 0.0035861 | ||||
| Adopt Axies | 5452758 | 2888 days ago | IN | 0.4131 ETH | 0.00169982 | ||||
| Adopt Axies | 5452651 | 2888 days ago | IN | 0.4169 ETH | 0.0017223 | ||||
| Adopt Axies | 5452610 | 2888 days ago | IN | 3.2916 ETH | 0.00307434 | ||||
| Adopt Axies | 5452609 | 2888 days ago | IN | 3.7044 ETH | 0.0030799 | ||||
| Adopt Axies | 5452583 | 2888 days ago | IN | 3.6936 ETH | 0.0030799 | ||||
| Adopt Axies | 5452580 | 2888 days ago | IN | 3.6936 ETH | 0.0030799 | ||||
| Adopt Axies | 5452579 | 2888 days ago | IN | 3.6936 ETH | 0.0030799 | ||||
| Adopt Axies | 5452578 | 2888 days ago | IN | 3.6936 ETH | 0.0030799 |
Latest 25 internal transactions (View All)
Advanced mode:
| Parent Transaction Hash | Method | Block |
From
|
|
To
|
||
|---|---|---|---|---|---|---|---|
| Transfer | 5498493 | 2880 days ago | 773.7135 ETH | ||||
| Transfer | 5453308 | 2888 days ago | 0.0024 ETH | ||||
| Transfer | 5453130 | 2888 days ago | 0.0024 ETH | ||||
| Transfer | 5453100 | 2888 days ago | 0.0024 ETH | ||||
| Transfer | 5453059 | 2888 days ago | 0.0024 ETH | ||||
| Transfer | 5453038 | 2888 days ago | 0.0024 ETH | ||||
| Transfer | 5452944 | 2888 days ago | 0.0024 ETH | ||||
| Transfer | 5452764 | 2888 days ago | 0.0071 ETH | ||||
| Transfer | 5452758 | 2888 days ago | 0.0024 ETH | ||||
| Transfer | 5452651 | 2888 days ago | 0.0024 ETH | ||||
| Transfer | 5452610 | 2888 days ago | 0.0168 ETH | ||||
| Transfer | 5452609 | 2888 days ago | 0.0216 ETH | ||||
| Transfer | 5452583 | 2888 days ago | 0.0135 ETH | ||||
| Transfer | 5452580 | 2888 days ago | 0.0162 ETH | ||||
| Transfer | 5452579 | 2888 days ago | 0.0189 ETH | ||||
| Transfer | 5452578 | 2888 days ago | 0.0216 ETH | ||||
| Transfer | 5452551 | 2888 days ago | 0.0162 ETH | ||||
| Transfer | 5452551 | 2888 days ago | 0.0189 ETH | ||||
| Transfer | 5452551 | 2888 days ago | 0.0216 ETH | ||||
| Transfer | 5452356 | 2888 days ago | 0.0096 ETH | ||||
| Transfer | 5452144 | 2888 days ago | 0.0144 ETH | ||||
| Transfer | 5452136 | 2888 days ago | 0.0189 ETH | ||||
| Transfer | 5452136 | 2888 days ago | 0.0216 ETH | ||||
| Transfer | 5452052 | 2888 days ago | 0.0024 ETH | ||||
| Transfer | 5452046 | 2888 days ago | 0.0024 ETH |
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
AxiePresaleExtended
Compiler Version
v0.4.19+commit.c4cbbb05
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/**
*Submitted for verification at Etherscan.io on 2018-04-02
*/
pragma solidity ^0.4.19;
// File: zeppelin/contracts/ownership/Ownable.sol
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() {
owner = msg.sender;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(msg.sender == owner);
_;
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) onlyOwner public {
require(newOwner != address(0));
OwnershipTransferred(owner, newOwner);
owner = newOwner;
}
}
// File: zeppelin/contracts/lifecycle/Pausable.sol
/**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/
contract Pausable is Ownable {
event Pause();
event Unpause();
bool public paused = false;
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier whenNotPaused() {
require(!paused);
_;
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*/
modifier whenPaused() {
require(paused);
_;
}
/**
* @dev called by the owner to pause, triggers stopped state
*/
function pause() onlyOwner whenNotPaused public {
paused = true;
Pause();
}
/**
* @dev called by the owner to unpause, returns to normal state
*/
function unpause() onlyOwner whenPaused public {
paused = false;
Unpause();
}
}
// File: zeppelin/contracts/math/SafeMath.sol
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
function mul(uint256 a, uint256 b) internal constant returns (uint256) {
uint256 c = a * b;
assert(a == 0 || c / a == b);
return c;
}
function div(uint256 a, uint256 b) internal constant returns (uint256) {
// assert(b > 0); // Solidity automatically throws when dividing by 0
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
function sub(uint256 a, uint256 b) internal constant returns (uint256) {
assert(b <= a);
return a - b;
}
function add(uint256 a, uint256 b) internal constant returns (uint256) {
uint256 c = a + b;
assert(c >= a);
return c;
}
}
// File: zeppelin/contracts/ownership/HasNoEther.sol
/**
* @title Contracts that should not own Ether
* @author Remco Bloemen <remco@2π.com>
* @dev This tries to block incoming ether to prevent accidental loss of Ether. Should Ether end up
* in the contract, it will allow the owner to reclaim this ether.
* @notice Ether can still be send to this contract by:
* calling functions labeled `payable`
* `selfdestruct(contract_address)`
* mining directly to the contract address
*/
contract HasNoEther is Ownable {
/**
* @dev Constructor that rejects incoming Ether
* @dev The `payable` flag is added so we can access `msg.value` without compiler warning. If we
* leave out payable, then Solidity will allow inheriting contracts to implement a payable
* constructor. By doing it this way we prevent a payable constructor from working. Alternatively
* we could use assembly to access msg.value.
*/
function HasNoEther() payable {
require(msg.value == 0);
}
/**
* @dev Disallows direct send by settings a default function without the `payable` flag.
*/
function() external {
}
/**
* @dev Transfer all Ether held by the contract to the owner.
*/
function reclaimEther() external onlyOwner {
assert(owner.send(this.balance));
}
}
// File: contracts/presale/AxiePresale.sol
contract AxiePresale is HasNoEther, Pausable {
using SafeMath for uint256;
// No Axies can be adopted after this end date: Friday, March 16, 2018 11:59:59 PM GMT.
uint256 constant public PRESALE_END_TIMESTAMP = 1521244799;
uint8 constant public CLASS_BEAST = 0;
uint8 constant public CLASS_AQUATIC = 2;
uint8 constant public CLASS_PLANT = 4;
uint256 constant public INITIAL_PRICE_INCREMENT = 1600 szabo; // 0.0016 Ether
uint256 constant public INITIAL_PRICE = INITIAL_PRICE_INCREMENT;
uint256 constant public REF_CREDITS_PER_AXIE = 5;
mapping (uint8 => uint256) public currentPrices;
mapping (uint8 => uint256) public priceIncrements;
mapping (uint8 => uint256) public totalAxiesAdopted;
mapping (address => mapping (uint8 => uint256)) public axiesAdopted;
mapping (address => uint256) public referralCredits;
mapping (address => uint256) public axiesRewarded;
uint256 public totalAxiesRewarded;
event AxiesAdopted(
address indexed adopter,
uint8 indexed clazz,
uint256 quantity,
address indexed referrer
);
event AxiesRewarded(address indexed receiver, uint256 quantity);
event AdoptedAxiesRedeemed(address indexed receiver, uint8 indexed clazz, uint256 quantity);
event RewardedAxiesRedeemed(address indexed receiver, uint256 quantity);
function AxiePresale() public {
priceIncrements[CLASS_BEAST] = priceIncrements[CLASS_AQUATIC] = //
priceIncrements[CLASS_PLANT] = INITIAL_PRICE_INCREMENT;
currentPrices[CLASS_BEAST] = currentPrices[CLASS_AQUATIC] = //
currentPrices[CLASS_PLANT] = INITIAL_PRICE;
}
function axiesPrice(
uint256 beastQuantity,
uint256 aquaticQuantity,
uint256 plantQuantity
)
public
view
returns (uint256 totalPrice)
{
uint256 price;
(price,,) = _axiesPrice(CLASS_BEAST, beastQuantity);
totalPrice = totalPrice.add(price);
(price,,) = _axiesPrice(CLASS_AQUATIC, aquaticQuantity);
totalPrice = totalPrice.add(price);
(price,,) = _axiesPrice(CLASS_PLANT, plantQuantity);
totalPrice = totalPrice.add(price);
}
function adoptAxies(
uint256 beastQuantity,
uint256 aquaticQuantity,
uint256 plantQuantity,
address referrer
)
public
payable
whenNotPaused
{
require(now <= PRESALE_END_TIMESTAMP);
require(beastQuantity <= 3);
require(aquaticQuantity <= 3);
require(plantQuantity <= 3);
address adopter = msg.sender;
address actualReferrer = 0x0;
// An adopter cannot be his/her own referrer.
if (referrer != adopter) {
actualReferrer = referrer;
}
uint256 value = msg.value;
uint256 price;
if (beastQuantity > 0) {
price = _adoptAxies(
adopter,
CLASS_BEAST,
beastQuantity,
actualReferrer
);
require(value >= price);
value -= price;
}
if (aquaticQuantity > 0) {
price = _adoptAxies(
adopter,
CLASS_AQUATIC,
aquaticQuantity,
actualReferrer
);
require(value >= price);
value -= price;
}
if (plantQuantity > 0) {
price = _adoptAxies(
adopter,
CLASS_PLANT,
plantQuantity,
actualReferrer
);
require(value >= price);
value -= price;
}
msg.sender.transfer(value);
// The current referral is ignored if the referrer's address is 0x0.
if (actualReferrer != 0x0) {
uint256 numCredit = referralCredits[actualReferrer]
.add(beastQuantity)
.add(aquaticQuantity)
.add(plantQuantity);
uint256 numReward = numCredit / REF_CREDITS_PER_AXIE;
if (numReward > 0) {
referralCredits[actualReferrer] = numCredit % REF_CREDITS_PER_AXIE;
axiesRewarded[actualReferrer] = axiesRewarded[actualReferrer].add(numReward);
totalAxiesRewarded = totalAxiesRewarded.add(numReward);
AxiesRewarded(actualReferrer, numReward);
} else {
referralCredits[actualReferrer] = numCredit;
}
}
}
function redeemAdoptedAxies(
address receiver,
uint256 beastQuantity,
uint256 aquaticQuantity,
uint256 plantQuantity
)
public
onlyOwner
returns (
uint256 /* remainingBeastQuantity */,
uint256 /* remainingAquaticQuantity */,
uint256 /* remainingPlantQuantity */
)
{
return (
_redeemAdoptedAxies(receiver, CLASS_BEAST, beastQuantity),
_redeemAdoptedAxies(receiver, CLASS_AQUATIC, aquaticQuantity),
_redeemAdoptedAxies(receiver, CLASS_PLANT, plantQuantity)
);
}
function redeemRewardedAxies(
address receiver,
uint256 quantity
)
public
onlyOwner
returns (uint256 remainingQuantity)
{
remainingQuantity = axiesRewarded[receiver] = axiesRewarded[receiver].sub(quantity);
if (quantity > 0) {
// This requires that rewarded Axies are always included in the total
// to make sure overflow won't happen.
totalAxiesRewarded -= quantity;
RewardedAxiesRedeemed(receiver, quantity);
}
}
/**
* @dev Calculate price of Axies from the same class.
* @param clazz The class of Axies.
* @param quantity Number of Axies to be calculated.
*/
function _axiesPrice(
uint8 clazz,
uint256 quantity
)
private
view
returns (uint256 totalPrice, uint256 priceIncrement, uint256 currentPrice)
{
priceIncrement = priceIncrements[clazz];
currentPrice = currentPrices[clazz];
uint256 nextPrice;
for (uint256 i = 0; i < quantity; i++) {
totalPrice = totalPrice.add(currentPrice);
nextPrice = currentPrice.add(priceIncrement);
if (nextPrice / 100 finney != currentPrice / 100 finney) {
priceIncrement >>= 1;
}
currentPrice = nextPrice;
}
}
/**
* @dev Adopt some Axies from the same class.
* @param adopter Address of the adopter.
* @param clazz The class of adopted Axies.
* @param quantity Number of Axies to be adopted, this should be positive.
* @param referrer Address of the referrer.
*/
function _adoptAxies(
address adopter,
uint8 clazz,
uint256 quantity,
address referrer
)
private
returns (uint256 totalPrice)
{
(totalPrice, priceIncrements[clazz], currentPrices[clazz]) = _axiesPrice(clazz, quantity);
axiesAdopted[adopter][clazz] = axiesAdopted[adopter][clazz].add(quantity);
totalAxiesAdopted[clazz] = totalAxiesAdopted[clazz].add(quantity);
AxiesAdopted(
adopter,
clazz,
quantity,
referrer
);
}
/**
* @dev Redeem adopted Axies from the same class.
* @param receiver Address of the receiver.
* @param clazz The class of adopted Axies.
* @param quantity Number of adopted Axies to be redeemed.
*/
function _redeemAdoptedAxies(
address receiver,
uint8 clazz,
uint256 quantity
)
private
returns (uint256 remainingQuantity)
{
remainingQuantity = axiesAdopted[receiver][clazz] = axiesAdopted[receiver][clazz].sub(quantity);
if (quantity > 0) {
// This requires that adopted Axies are always included in the total
// to make sure overflow won't happen.
totalAxiesAdopted[clazz] -= quantity;
AdoptedAxiesRedeemed(receiver, clazz, quantity);
}
}
}
// File: zeppelin/contracts/ownership/HasNoContracts.sol
/**
* @title Contracts that should not own Contracts
* @author Remco Bloemen <remco@2π.com>
* @dev Should contracts (anything Ownable) end up being owned by this contract, it allows the owner
* of this contract to reclaim ownership of the contracts.
*/
contract HasNoContracts is Ownable {
/**
* @dev Reclaim ownership of Ownable contracts
* @param contractAddr The address of the Ownable to be reclaimed.
*/
function reclaimContract(address contractAddr) external onlyOwner {
Ownable contractInst = Ownable(contractAddr);
contractInst.transferOwnership(owner);
}
}
// File: contracts/presale/AxiePresaleExtended.sol
contract AxiePresaleExtended is HasNoContracts, Pausable {
using SafeMath for uint256;
// No Axies can be adopted after this end date: Monday, April 16, 2018 11:59:59 PM GMT.
uint256 constant public PRESALE_END_TIMESTAMP = 1523923199;
// The total number of adopted Axies will be capped at 5250,
// so the number of Axies which have Mystic parts will be capped roughly at 2000.
uint256 constant public MAX_TOTAL_ADOPTED_AXIES = 5250;
uint8 constant public CLASS_BEAST = 0;
uint8 constant public CLASS_AQUATIC = 2;
uint8 constant public CLASS_PLANT = 4;
// The initial price increment and the initial price are for reference only
uint256 constant public INITIAL_PRICE_INCREMENT = 1600 szabo; // 0.0016 Ether
uint256 constant public INITIAL_PRICE = INITIAL_PRICE_INCREMENT;
uint256 constant public REF_CREDITS_PER_AXIE = 5;
AxiePresale public presaleContract;
address public redemptionAddress;
mapping (uint8 => uint256) public currentPrice;
mapping (uint8 => uint256) public priceIncrement;
mapping (uint8 => uint256) private _totalAdoptedAxies;
mapping (uint8 => uint256) private _totalDeductedAdoptedAxies;
mapping (address => mapping (uint8 => uint256)) private _numAdoptedAxies;
mapping (address => mapping (uint8 => uint256)) private _numDeductedAdoptedAxies;
mapping (address => uint256) private _numRefCredits;
mapping (address => uint256) private _numDeductedRefCredits;
uint256 public numBountyCredits;
uint256 private _totalRewardedAxies;
uint256 private _totalDeductedRewardedAxies;
mapping (address => uint256) private _numRewardedAxies;
mapping (address => uint256) private _numDeductedRewardedAxies;
event AxiesAdopted(
address indexed _adopter,
uint8 indexed _class,
uint256 _quantity,
address indexed _referrer
);
event AxiesRewarded(address indexed _receiver, uint256 _quantity);
event AdoptedAxiesRedeemed(address indexed _receiver, uint8 indexed _class, uint256 _quantity);
event RewardedAxiesRedeemed(address indexed _receiver, uint256 _quantity);
event RefCreditsMinted(address indexed _receiver, uint256 _numMintedCredits);
function AxiePresaleExtended() public payable {
require(msg.value == 0);
paused = true;
numBountyCredits = 300;
}
function () external payable {
require(msg.sender == address(presaleContract));
}
modifier whenNotInitialized {
require(presaleContract == address(0));
_;
}
modifier whenInitialized {
require(presaleContract != address(0));
_;
}
modifier onlyRedemptionAddress {
require(msg.sender == redemptionAddress);
_;
}
function reclaimEther() external onlyOwner whenInitialized {
presaleContract.reclaimEther();
owner.transfer(this.balance);
}
/**
* @dev This must be called only once after the owner of the presale contract
* has been updated to this contract.
*/
function initialize(address _presaleAddress) external onlyOwner whenNotInitialized {
// Set the presale address.
presaleContract = AxiePresale(_presaleAddress);
presaleContract.pause();
// Restore price increments from the old contract.
priceIncrement[CLASS_BEAST] = presaleContract.priceIncrements(CLASS_BEAST);
priceIncrement[CLASS_AQUATIC] = presaleContract.priceIncrements(CLASS_AQUATIC);
priceIncrement[CLASS_PLANT] = presaleContract.priceIncrements(CLASS_PLANT);
// Restore current prices from the old contract.
currentPrice[CLASS_BEAST] = presaleContract.currentPrices(CLASS_BEAST);
currentPrice[CLASS_AQUATIC] = presaleContract.currentPrices(CLASS_AQUATIC);
currentPrice[CLASS_PLANT] = presaleContract.currentPrices(CLASS_PLANT);
paused = false;
}
function setRedemptionAddress(address _redemptionAddress) external onlyOwner whenInitialized {
redemptionAddress = _redemptionAddress;
}
function totalAdoptedAxies(
uint8 _class,
bool _deduction
)
external
view
whenInitialized
returns (uint256 _number)
{
_number = _totalAdoptedAxies[_class]
.add(presaleContract.totalAxiesAdopted(_class));
if (_deduction) {
_number = _number.sub(_totalDeductedAdoptedAxies[_class]);
}
}
function numAdoptedAxies(
address _owner,
uint8 _class,
bool _deduction
)
external
view
whenInitialized
returns (uint256 _number)
{
_number = _numAdoptedAxies[_owner][_class]
.add(presaleContract.axiesAdopted(_owner, _class));
if (_deduction) {
_number = _number.sub(_numDeductedAdoptedAxies[_owner][_class]);
}
}
function numRefCredits(
address _owner,
bool _deduction
)
external
view
whenInitialized
returns (uint256 _number)
{
_number = _numRefCredits[_owner]
.add(presaleContract.referralCredits(_owner));
if (_deduction) {
_number = _number.sub(_numDeductedRefCredits[_owner]);
}
}
function totalRewardedAxies(
bool _deduction
)
external
view
whenInitialized
returns (uint256 _number)
{
_number = _totalRewardedAxies
.add(presaleContract.totalAxiesRewarded());
if (_deduction) {
_number = _number.sub(_totalDeductedRewardedAxies);
}
}
function numRewardedAxies(
address _owner,
bool _deduction
)
external
view
whenInitialized
returns (uint256 _number)
{
_number = _numRewardedAxies[_owner]
.add(presaleContract.axiesRewarded(_owner));
if (_deduction) {
_number = _number.sub(_numDeductedRewardedAxies[_owner]);
}
}
function axiesPrice(
uint256 _beastQuantity,
uint256 _aquaticQuantity,
uint256 _plantQuantity
)
external
view
whenInitialized
returns (uint256 _totalPrice)
{
uint256 price;
(price,,) = _sameClassAxiesPrice(CLASS_BEAST, _beastQuantity);
_totalPrice = _totalPrice.add(price);
(price,,) = _sameClassAxiesPrice(CLASS_AQUATIC, _aquaticQuantity);
_totalPrice = _totalPrice.add(price);
(price,,) = _sameClassAxiesPrice(CLASS_PLANT, _plantQuantity);
_totalPrice = _totalPrice.add(price);
}
function adoptAxies(
uint256 _beastQuantity,
uint256 _aquaticQuantity,
uint256 _plantQuantity,
address _referrer
)
external
payable
whenInitialized
whenNotPaused
{
require(now <= PRESALE_END_TIMESTAMP);
require(_beastQuantity <= 3 && _aquaticQuantity <= 3 && _plantQuantity <= 3);
uint256 _totalAdopted = this.totalAdoptedAxies(CLASS_BEAST, false)
.add(this.totalAdoptedAxies(CLASS_AQUATIC, false))
.add(this.totalAdoptedAxies(CLASS_PLANT, false))
.add(_beastQuantity)
.add(_aquaticQuantity)
.add(_plantQuantity);
require(_totalAdopted <= MAX_TOTAL_ADOPTED_AXIES);
address _adopter = msg.sender;
address _actualReferrer = 0x0;
// An adopter cannot be his/her own referrer.
if (_referrer != _adopter) {
_actualReferrer = _referrer;
}
uint256 _value = msg.value;
uint256 _price;
if (_beastQuantity > 0) {
_price = _adoptSameClassAxies(
_adopter,
CLASS_BEAST,
_beastQuantity,
_actualReferrer
);
require(_value >= _price);
_value -= _price;
}
if (_aquaticQuantity > 0) {
_price = _adoptSameClassAxies(
_adopter,
CLASS_AQUATIC,
_aquaticQuantity,
_actualReferrer
);
require(_value >= _price);
_value -= _price;
}
if (_plantQuantity > 0) {
_price = _adoptSameClassAxies(
_adopter,
CLASS_PLANT,
_plantQuantity,
_actualReferrer
);
require(_value >= _price);
_value -= _price;
}
msg.sender.transfer(_value);
// The current referral is ignored if the referrer's address is 0x0.
if (_actualReferrer != 0x0) {
_applyRefCredits(
_actualReferrer,
_beastQuantity.add(_aquaticQuantity).add(_plantQuantity)
);
}
}
function mintRefCredits(
address _receiver,
uint256 _numMintedCredits
)
external
onlyOwner
whenInitialized
returns (uint256)
{
require(_receiver != address(0));
numBountyCredits = numBountyCredits.sub(_numMintedCredits);
_applyRefCredits(_receiver, _numMintedCredits);
RefCreditsMinted(_receiver, _numMintedCredits);
return numBountyCredits;
}
function redeemAdoptedAxies(
address _receiver,
uint256 _beastQuantity,
uint256 _aquaticQuantity,
uint256 _plantQuantity
)
external
onlyRedemptionAddress
whenInitialized
returns (
uint256 /* remainingBeastQuantity */,
uint256 /* remainingAquaticQuantity */,
uint256 /* remainingPlantQuantity */
)
{
return (
_redeemSameClassAdoptedAxies(_receiver, CLASS_BEAST, _beastQuantity),
_redeemSameClassAdoptedAxies(_receiver, CLASS_AQUATIC, _aquaticQuantity),
_redeemSameClassAdoptedAxies(_receiver, CLASS_PLANT, _plantQuantity)
);
}
function redeemRewardedAxies(
address _receiver,
uint256 _quantity
)
external
onlyRedemptionAddress
whenInitialized
returns (uint256 _remainingQuantity)
{
_remainingQuantity = this.numRewardedAxies(_receiver, true).sub(_quantity);
if (_quantity > 0) {
_numDeductedRewardedAxies[_receiver] = _numDeductedRewardedAxies[_receiver].add(_quantity);
_totalDeductedRewardedAxies = _totalDeductedRewardedAxies.add(_quantity);
RewardedAxiesRedeemed(_receiver, _quantity);
}
}
/**
* @notice Calculate price of Axies from the same class.
* @param _class The class of Axies.
* @param _quantity Number of Axies to be calculated.
*/
function _sameClassAxiesPrice(
uint8 _class,
uint256 _quantity
)
private
view
returns (
uint256 _totalPrice,
uint256 /* should be _subsequentIncrement */ _currentIncrement,
uint256 /* should be _subsequentPrice */ _currentPrice
)
{
_currentIncrement = priceIncrement[_class];
_currentPrice = currentPrice[_class];
uint256 _nextPrice;
for (uint256 i = 0; i < _quantity; i++) {
_totalPrice = _totalPrice.add(_currentPrice);
_nextPrice = _currentPrice.add(_currentIncrement);
if (_nextPrice / 100 finney != _currentPrice / 100 finney) {
_currentIncrement >>= 1;
}
_currentPrice = _nextPrice;
}
}
/**
* @notice Adopt some Axies from the same class.
* @dev The quantity MUST be positive.
* @param _adopter Address of the adopter.
* @param _class The class of adopted Axies.
* @param _quantity Number of Axies to be adopted.
* @param _referrer Address of the referrer.
*/
function _adoptSameClassAxies(
address _adopter,
uint8 _class,
uint256 _quantity,
address _referrer
)
private
returns (uint256 _totalPrice)
{
(_totalPrice, priceIncrement[_class], currentPrice[_class]) = _sameClassAxiesPrice(_class, _quantity);
_numAdoptedAxies[_adopter][_class] = _numAdoptedAxies[_adopter][_class].add(_quantity);
_totalAdoptedAxies[_class] = _totalAdoptedAxies[_class].add(_quantity);
AxiesAdopted(
_adopter,
_class,
_quantity,
_referrer
);
}
function _applyRefCredits(address _receiver, uint256 _numAppliedCredits) private {
_numRefCredits[_receiver] = _numRefCredits[_receiver].add(_numAppliedCredits);
uint256 _numCredits = this.numRefCredits(_receiver, true);
uint256 _numRewards = _numCredits / REF_CREDITS_PER_AXIE;
if (_numRewards > 0) {
_numDeductedRefCredits[_receiver] = _numDeductedRefCredits[_receiver]
.add(_numRewards.mul(REF_CREDITS_PER_AXIE));
_numRewardedAxies[_receiver] = _numRewardedAxies[_receiver].add(_numRewards);
_totalRewardedAxies = _totalRewardedAxies.add(_numRewards);
AxiesRewarded(_receiver, _numRewards);
}
}
/**
* @notice Redeem adopted Axies from the same class.
* @dev Emit the `AdoptedAxiesRedeemed` event if the quantity is positive.
* @param _receiver The address of the receiver.
* @param _class The class of adopted Axies.
* @param _quantity The number of adopted Axies to be redeemed.
*/
function _redeemSameClassAdoptedAxies(
address _receiver,
uint8 _class,
uint256 _quantity
)
private
returns (uint256 _remainingQuantity)
{
_remainingQuantity = this.numAdoptedAxies(_receiver, _class, true).sub(_quantity);
if (_quantity > 0) {
_numDeductedAdoptedAxies[_receiver][_class] = _numDeductedAdoptedAxies[_receiver][_class].add(_quantity);
_totalDeductedAdoptedAxies[_class] = _totalDeductedAdoptedAxies[_class].add(_quantity);
AdoptedAxiesRedeemed(_receiver, _class, _quantity);
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"constant":false,"inputs":[{"name":"_beastQuantity","type":"uint256"},{"name":"_aquaticQuantity","type":"uint256"},{"name":"_plantQuantity","type":"uint256"},{"name":"_referrer","type":"address"}],"name":"adoptAxies","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[{"name":"_class","type":"uint8"},{"name":"_deduction","type":"bool"}],"name":"totalAdoptedAxies","outputs":[{"name":"_number","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint8"}],"name":"priceIncrement","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"INITIAL_PRICE_INCREMENT","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"contractAddr","type":"address"}],"name":"reclaimContract","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_receiver","type":"address"},{"name":"_numMintedCredits","type":"uint256"}],"name":"mintRefCredits","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"unpause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"CLASS_BEAST","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"redemptionAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"numBountyCredits","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"paused","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"presaleContract","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_deduction","type":"bool"}],"name":"numRewardedAxies","outputs":[{"name":"_number","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"INITIAL_PRICE","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"CLASS_PLANT","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint8"}],"name":"currentPrice","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"pause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_beastQuantity","type":"uint256"},{"name":"_aquaticQuantity","type":"uint256"},{"name":"_plantQuantity","type":"uint256"}],"name":"axiesPrice","outputs":[{"name":"_totalPrice","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"PRESALE_END_TIMESTAMP","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"reclaimEther","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"REF_CREDITS_PER_AXIE","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MAX_TOTAL_ADOPTED_AXIES","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_receiver","type":"address"},{"name":"_beastQuantity","type":"uint256"},{"name":"_aquaticQuantity","type":"uint256"},{"name":"_plantQuantity","type":"uint256"}],"name":"redeemAdoptedAxies","outputs":[{"name":"","type":"uint256"},{"name":"","type":"uint256"},{"name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"CLASS_AQUATIC","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_presaleAddress","type":"address"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_class","type":"uint8"},{"name":"_deduction","type":"bool"}],"name":"numAdoptedAxies","outputs":[{"name":"_number","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_redemptionAddress","type":"address"}],"name":"setRedemptionAddress","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_receiver","type":"address"},{"name":"_quantity","type":"uint256"}],"name":"redeemRewardedAxies","outputs":[{"name":"_remainingQuantity","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_deduction","type":"bool"}],"name":"totalRewardedAxies","outputs":[{"name":"_number","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_deduction","type":"bool"}],"name":"numRefCredits","outputs":[{"name":"_number","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[],"payable":true,"stateMutability":"payable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_adopter","type":"address"},{"indexed":true,"name":"_class","type":"uint8"},{"indexed":false,"name":"_quantity","type":"uint256"},{"indexed":true,"name":"_referrer","type":"address"}],"name":"AxiesAdopted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_receiver","type":"address"},{"indexed":false,"name":"_quantity","type":"uint256"}],"name":"AxiesRewarded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_receiver","type":"address"},{"indexed":true,"name":"_class","type":"uint8"},{"indexed":false,"name":"_quantity","type":"uint256"}],"name":"AdoptedAxiesRedeemed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_receiver","type":"address"},{"indexed":false,"name":"_quantity","type":"uint256"}],"name":"RewardedAxiesRedeemed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_receiver","type":"address"},{"indexed":false,"name":"_numMintedCredits","type":"uint256"}],"name":"RefCreditsMinted","type":"event"},{"anonymous":false,"inputs":[],"name":"Pause","type":"event"},{"anonymous":false,"inputs":[],"name":"Unpause","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"}]Contract Creation Code
606060405260008054600160a860020a03191633600160a060020a0316179055341561002a57600080fd5b6000805460a060020a60ff0219167401000000000000000000000000000000000000000017905561012c600b55611d31806100666000396000f30060606040526004361061017c5763ffffffff60e060020a6000350416630c6360918114610199578063172c61e6146101b6578063241497a3146101e657806325b10186146101ff5780632aed7f3f146102125780633999968c146102315780633f4ba83a146102535780634939ce85146102665780634dde3fe11461028f5780635a650f45146102be5780635c975abb146102d157806363d9df85146102f85780636694e8451461030b5780637c5e2795146101ff57806380e183a31461032f57806383f4cc7e146103425780638456cb591461035b578063852c061a1461036e5780638da5cb5b1461038a57806399110d3c1461039d5780639f727c27146103b0578063a6df0344146103c3578063ad7738b6146103d6578063bfce8cbf146103e9578063c3cd999614610435578063c4d66de814610448578063cc17aa2814610467578063cc7e1b9a14610491578063d2b1569e146104b0578063d52a7e86146104d2578063f2fde38b146104ea578063fdf5552314610509575b60015433600160a060020a0390811691161461019757600080fd5b005b610197600435602435604435600160a060020a036064351661052d565b34156101c157600080fd5b6101d460ff600435166024351515610845565b60405190815260200160405180910390f35b34156101f157600080fd5b6101d460ff60043516610924565b341561020a57600080fd5b6101d4610936565b341561021d57600080fd5b610197600160a060020a0360043516610941565b341561023c57600080fd5b6101d4600160a060020a03600435166024356109cc565b341561025e57600080fd5b610197610a7b565b341561027157600080fd5b610279610afa565b60405160ff909116815260200160405180910390f35b341561029a57600080fd5b6102a2610aff565b604051600160a060020a03909116815260200160405180910390f35b34156102c957600080fd5b6101d4610b0e565b34156102dc57600080fd5b6102e4610b14565b604051901515815260200160405180910390f35b341561030357600080fd5b6102a2610b24565b341561031657600080fd5b6101d4600160a060020a03600435166024351515610b33565b341561033a57600080fd5b610279610c1b565b341561034d57600080fd5b6101d460ff60043516610c20565b341561036657600080fd5b610197610c32565b341561037957600080fd5b6101d4600435602435604435610cb6565b341561039557600080fd5b6102a2610d42565b34156103a857600080fd5b6101d4610d51565b34156103bb57600080fd5b610197610d59565b34156103ce57600080fd5b6101d4610e19565b34156103e157600080fd5b6101d4610e1e565b34156103f457600080fd5b610411600160a060020a0360043516602435604435606435610e24565b60405180848152602001838152602001828152602001935050505060405180910390f35b341561044057600080fd5b610279610e91565b341561045357600080fd5b610197600160a060020a0360043516610e96565b341561047257600080fd5b6101d4600160a060020a036004351660ff602435166044351515611316565b341561049c57600080fd5b610197600160a060020a036004351661142d565b34156104bb57600080fd5b6101d4600160a060020a036004351660243561148e565b34156104dd57600080fd5b6101d460043515156115f4565b34156104f557600080fd5b610197600160a060020a03600435166116a7565b341561051457600080fd5b6101d4600160a060020a03600435166024351515611742565b6001546000908190819081908190600160a060020a0316151561054f57600080fd5b60005460a060020a900460ff161561056657600080fd5b635ad538ff42111561057757600080fd5b60038911158015610589575060038811155b8015610596575060038711155b15156105a157600080fd5b61072a8761071e8a61071e8d61071e30600160a060020a031663172c61e660046000806040516020015260405160e060020a63ffffffff851602815260ff909216600483015215156024820152604401602060405180830381600087803b151561060a57600080fd5b6102c65a03f1151561061b57600080fd5b5050506040518051905061071e30600160a060020a031663172c61e660026000806040516020015260405160e060020a63ffffffff851602815260ff909216600483015215156024820152604401602060405180830381600087803b151561068257600080fd5b6102c65a03f1151561069357600080fd5b5050506040518051905030600160a060020a031663172c61e660008060006040516020015260405160e060020a63ffffffff851602815260ff909216600483015215156024820152604401602060405180830381600087803b15156106f757600080fd5b6102c65a03f1151561070857600080fd5b505050604051805191905063ffffffff61182a16565b9063ffffffff61182a16565b945061148285111561073b57600080fd5b33935060009250600160a060020a0386811690851614610759578592505b3491506000891115610787576107728460008b86611839565b90508082101561078157600080fd5b80820391505b60008811156107b25761079d8460028a86611839565b9050808210156107ac57600080fd5b80820391505b60008711156107dd576107c88460048986611839565b9050808210156107d757600080fd5b80820391505b600160a060020a03331682156108fc0283604051600060405180830381858888f19350505050151561080e57600080fd5b600160a060020a0383161561083a5761083a836108358961071e8d8d63ffffffff61182a16565b611939565b505050505050505050565b600154600090600160a060020a0316151561085f57600080fd5b6001546108ef90600160a060020a031663093e58ba8560006040516020015260405160e060020a63ffffffff841602815260ff9091166004820152602401602060405180830381600087803b15156108b657600080fd5b6102c65a03f115156108c757600080fd5b505050604051805160ff8616600090815260056020526040902054915063ffffffff61182a16565b9050811561091e5760ff831660009081526006602052604090205461091b90829063ffffffff611af916565b90505b92915050565b60046020526000908152604090205481565b6605af3107a4000081565b6000805433600160a060020a0390811691161461095d57600080fd5b506000548190600160a060020a038083169163f2fde38b911660405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401600060405180830381600087803b15156109b457600080fd5b6102c65a03f115156109c557600080fd5b5050505050565b6000805433600160a060020a039081169116146109e857600080fd5b600154600160a060020a031615156109ff57600080fd5b600160a060020a0383161515610a1457600080fd5b600b54610a27908363ffffffff611af916565b600b55610a348383611939565b82600160a060020a03167ff3de1e0f26bcea621632646102d48e20d0a0d68b18abf9e730c002773c02ca178360405190815260200160405180910390a250600b5492915050565b60005433600160a060020a03908116911614610a9657600080fd5b60005460a060020a900460ff161515610aae57600080fd5b6000805474ff0000000000000000000000000000000000000000191690557f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3360405160405180910390a1565b600081565b600254600160a060020a031681565b600b5481565b60005460a060020a900460ff1681565b600154600160a060020a031681565b600154600090600160a060020a03161515610b4d57600080fd5b600154610be990600160a060020a031663ebe979868560006040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b1515610baa57600080fd5b6102c65a03f11515610bbb57600080fd5b5050506040518051600160a060020a0386166000908152600e6020526040902054915063ffffffff61182a16565b9050811561091e57600160a060020a0383166000908152600f602052604090205461091b90829063ffffffff611af916565b600481565b60036020526000908152604090205481565b60005433600160a060020a03908116911614610c4d57600080fd5b60005460a060020a900460ff1615610c6457600080fd5b6000805474ff0000000000000000000000000000000000000000191660a060020a1790557f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62560405160405180910390a1565b6001546000908190600160a060020a03161515610cd257600080fd5b610cdd600086611b0b565b50909150610cf39050828263ffffffff61182a16565b9150610d00600285611b0b565b50909150610d169050828263ffffffff61182a16565b9150610d23600484611b0b565b50909150610d399050828263ffffffff61182a16565b95945050505050565b600054600160a060020a031681565b635ad538ff81565b60005433600160a060020a03908116911614610d7457600080fd5b600154600160a060020a03161515610d8b57600080fd5b600154600160a060020a0316639f727c276040518163ffffffff1660e060020a028152600401600060405180830381600087803b1515610dca57600080fd5b6102c65a03f11515610ddb57600080fd5b5050600054600160a060020a03908116915030163180156108fc0290604051600060405180830381858888f193505050501515610e1757600080fd5b565b600581565b61148281565b6002546000908190819033600160a060020a03908116911614610e4657600080fd5b600154600160a060020a03161515610e5d57600080fd5b610e6987600088611b90565b610e7588600288611b90565b610e8189600488611b90565b9250925092509450945094915050565b600281565b60005433600160a060020a03908116911614610eb157600080fd5b600154600160a060020a031615610ec757600080fd5b6001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03838116919091179182905516638456cb596040518163ffffffff1660e060020a028152600401600060405180830381600087803b1515610f2957600080fd5b6102c65a03f11515610f3a57600080fd5b5050600154600160a060020a0316905063c8a5a7936000806040516020015260405160e060020a63ffffffff841602815260ff9091166004820152602401602060405180830381600087803b1515610f9157600080fd5b6102c65a03f11515610fa257600080fd5b5050506040518051600080805260046020527f17ef568e3e12ab5b9c7254a8d58478811de00f9e6eb34345acd53bf8fd09d3ec91909155600154600160a060020a0316915063c8a5a793906002906040516020015260405160e060020a63ffffffff841602815260ff9091166004820152602401602060405180830381600087803b151561102f57600080fd5b6102c65a03f1151561104057600080fd5b505050604051805160026000908152600460208190527f91da3fd0782e51c6b3986e9e672fd566868e71f3dbc2d6c2cd6fbb3e361af2a792909255600154600160a060020a0316925063c8a5a79391906040516020015260405160e060020a63ffffffff841602815260ff9091166004820152602401602060405180830381600087803b15156110cf57600080fd5b6102c65a03f115156110e057600080fd5b5050506040518051600460008181526020919091527f1a1e6821cde7d0159c0d293177871e09677b4e42307c7db3ba94f8648a5a050f91909155600154600160a060020a0316915063939d170690806040516020015260405160e060020a63ffffffff841602815260ff9091166004820152602401602060405180830381600087803b151561116e57600080fd5b6102c65a03f1151561117f57600080fd5b5050506040518051600080805260036020527f3617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92eff91909155600154600160a060020a0316915063939d1706906002906040516020015260405160e060020a63ffffffff841602815260ff9091166004820152602401602060405180830381600087803b151561120c57600080fd5b6102c65a03f1151561121d57600080fd5b50505060405180516002600090815260036020527fc3a24b0501bd2c13a7e57f2db4369ec4c223447539fc0724a9d55ac4a06ebd4d91909155600154600160a060020a0316915063939d1706906004906040516020015260405160e060020a63ffffffff841602815260ff9091166004820152602401602060405180830381600087803b15156112ac57600080fd5b6102c65a03f115156112bd57600080fd5b50505060405180516004600090815260036020527f83ec6a1f0257b830b5e016457c9cf1435391bf56cc98f369a58a54fe9377246591909155805474ff0000000000000000000000000000000000000000191690555050565b600154600090600160a060020a0316151561133057600080fd5b6001546113e390600160a060020a0316631ee87a74868660006040516020015260405160e060020a63ffffffff8516028152600160a060020a03909216600483015260ff166024820152604401602060405180830381600087803b151561139657600080fd5b6102c65a03f115156113a757600080fd5b5050506040518051600160a060020a038716600090815260076020908152604080832060ff8a168452909152902054915063ffffffff61182a16565b9050811561142657600160a060020a038416600090815260086020908152604080832060ff8716845290915290205461142390829063ffffffff611af916565b90505b9392505050565b60005433600160a060020a0390811691161461144857600080fd5b600154600160a060020a0316151561145f57600080fd5b6002805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60025460009033600160a060020a039081169116146114ac57600080fd5b600154600160a060020a031615156114c357600080fd5b61154e8230600160a060020a0316636694e84586600160006040516020015260405160e060020a63ffffffff8516028152600160a060020a03909216600483015215156024820152604401602060405180830381600087803b151561152757600080fd5b6102c65a03f1151561153857600080fd5b505050604051805191905063ffffffff611af916565b9050600082111561091e57600160a060020a0383166000908152600f6020526040902054611582908363ffffffff61182a16565b600160a060020a0384166000908152600f6020526040902055600d546115ae908363ffffffff61182a16565b600d55600160a060020a0383167fb5a9210266fef3e55f37dd4e8763305bf6c5a16e234d4a3cea91dc7d0ecfc3bc8360405190815260200160405180910390a292915050565b600154600090600160a060020a0316151561160e57600080fd5b60015461168390600160a060020a031663f34368736000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b151561165a57600080fd5b6102c65a03f1151561166b57600080fd5b5050506040518051600c54915063ffffffff61182a16565b905081156116a257600d5461169f90829063ffffffff611af916565b90505b919050565b60005433600160a060020a039081169116146116c257600080fd5b600160a060020a03811615156116d757600080fd5b600054600160a060020a0380831691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600154600090600160a060020a0316151561175c57600080fd5b6001546117f890600160a060020a0316634d82d2628560006040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b15156117b957600080fd5b6102c65a03f115156117ca57600080fd5b5050506040518051600160a060020a038616600090815260096020526040902054915063ffffffff61182a16565b9050811561091e57600160a060020a0383166000908152600a602052604090205461091b90829063ffffffff611af916565b60008282018381101561142657fe5b60006118458484611b0b565b60ff87166000818152600460209081526040808320600383528184209590955594909355600160a060020a038a1681526007835283812091815291522054909150611896908463ffffffff61182a16565b600160a060020a038616600090815260076020908152604080832060ff891684528252808320939093556005905220546118d6908463ffffffff61182a16565b60ff85166000818152600560205260409081902092909255600160a060020a0380851692908816907f4cca885907a1439610e4a3c6c07208e98c0cf27fab65301fe20bad2d0cd7145d9087905190815260200160405180910390a4949350505050565b600160a060020a0382166000908152600960205260408120548190611964908463ffffffff61182a16565b6009600086600160a060020a0316600160a060020a031681526020019081526020016000208190555030600160a060020a031663fdf5552385600160006040516020015260405160e060020a63ffffffff8516028152600160a060020a03909216600483015215156024820152604401602060405180830381600087803b15156119ed57600080fd5b6102c65a03f115156119fe57600080fd5b50505060405180519250506005820490506000811115611af357611a51611a2c82600563ffffffff611ce116565b600160a060020a0386166000908152600a60205260409020549063ffffffff61182a16565b600160a060020a0385166000908152600a6020908152604080832093909355600e90522054611a86908263ffffffff61182a16565b600160a060020a0385166000908152600e6020526040902055600c54611ab2908263ffffffff61182a16565b600c55600160a060020a0384167fd10165fd5b921c47fdb2555c3f7acdb72b54e3dc98d8bba85b66980434d58bb88260405190815260200160405180910390a25b50505050565b600082821115611b0557fe5b50900390565b60ff8216600090815260046020908152604080832054600390925282205482805b85811015611b8757611b44858463ffffffff61182a16565b9450611b56838563ffffffff61182a16565b915067016345785d8a0000830467016345785d8a0000830414611b7a576002909304925b9091508190600101611b2c565b50509250925092565b6000611c018230600160a060020a031663cc17aa288787600160006040516020015260405160e060020a63ffffffff8616028152600160a060020a03909316600484015260ff909116602483015215156044820152606401602060405180830381600087803b151561152757600080fd5b9050600082111561142657600160a060020a038416600090815260086020908152604080832060ff87168452909152902054611c43908363ffffffff61182a16565b600160a060020a038516600090815260086020908152604080832060ff88168452825280832093909355600690522054611c83908363ffffffff61182a16565b60ff8416600081815260066020526040908190209290925590600160a060020a038616907fce0806d48b62bb7ef7be6dad40d4b45c9a58267ef45bf528cdbb8810db3da73e9085905190815260200160405180910390a39392505050565b6000828202831580611cfd5750828482811515611cfa57fe5b04145b151561142657fe00a165627a7a7230582052011fcf2d7981df31e01f179008bc31d5123260b3f1da30fc58f9e489fce3810029
Deployed Bytecode
0x60606040526004361061017c5763ffffffff60e060020a6000350416630c6360918114610199578063172c61e6146101b6578063241497a3146101e657806325b10186146101ff5780632aed7f3f146102125780633999968c146102315780633f4ba83a146102535780634939ce85146102665780634dde3fe11461028f5780635a650f45146102be5780635c975abb146102d157806363d9df85146102f85780636694e8451461030b5780637c5e2795146101ff57806380e183a31461032f57806383f4cc7e146103425780638456cb591461035b578063852c061a1461036e5780638da5cb5b1461038a57806399110d3c1461039d5780639f727c27146103b0578063a6df0344146103c3578063ad7738b6146103d6578063bfce8cbf146103e9578063c3cd999614610435578063c4d66de814610448578063cc17aa2814610467578063cc7e1b9a14610491578063d2b1569e146104b0578063d52a7e86146104d2578063f2fde38b146104ea578063fdf5552314610509575b60015433600160a060020a0390811691161461019757600080fd5b005b610197600435602435604435600160a060020a036064351661052d565b34156101c157600080fd5b6101d460ff600435166024351515610845565b60405190815260200160405180910390f35b34156101f157600080fd5b6101d460ff60043516610924565b341561020a57600080fd5b6101d4610936565b341561021d57600080fd5b610197600160a060020a0360043516610941565b341561023c57600080fd5b6101d4600160a060020a03600435166024356109cc565b341561025e57600080fd5b610197610a7b565b341561027157600080fd5b610279610afa565b60405160ff909116815260200160405180910390f35b341561029a57600080fd5b6102a2610aff565b604051600160a060020a03909116815260200160405180910390f35b34156102c957600080fd5b6101d4610b0e565b34156102dc57600080fd5b6102e4610b14565b604051901515815260200160405180910390f35b341561030357600080fd5b6102a2610b24565b341561031657600080fd5b6101d4600160a060020a03600435166024351515610b33565b341561033a57600080fd5b610279610c1b565b341561034d57600080fd5b6101d460ff60043516610c20565b341561036657600080fd5b610197610c32565b341561037957600080fd5b6101d4600435602435604435610cb6565b341561039557600080fd5b6102a2610d42565b34156103a857600080fd5b6101d4610d51565b34156103bb57600080fd5b610197610d59565b34156103ce57600080fd5b6101d4610e19565b34156103e157600080fd5b6101d4610e1e565b34156103f457600080fd5b610411600160a060020a0360043516602435604435606435610e24565b60405180848152602001838152602001828152602001935050505060405180910390f35b341561044057600080fd5b610279610e91565b341561045357600080fd5b610197600160a060020a0360043516610e96565b341561047257600080fd5b6101d4600160a060020a036004351660ff602435166044351515611316565b341561049c57600080fd5b610197600160a060020a036004351661142d565b34156104bb57600080fd5b6101d4600160a060020a036004351660243561148e565b34156104dd57600080fd5b6101d460043515156115f4565b34156104f557600080fd5b610197600160a060020a03600435166116a7565b341561051457600080fd5b6101d4600160a060020a03600435166024351515611742565b6001546000908190819081908190600160a060020a0316151561054f57600080fd5b60005460a060020a900460ff161561056657600080fd5b635ad538ff42111561057757600080fd5b60038911158015610589575060038811155b8015610596575060038711155b15156105a157600080fd5b61072a8761071e8a61071e8d61071e30600160a060020a031663172c61e660046000806040516020015260405160e060020a63ffffffff851602815260ff909216600483015215156024820152604401602060405180830381600087803b151561060a57600080fd5b6102c65a03f1151561061b57600080fd5b5050506040518051905061071e30600160a060020a031663172c61e660026000806040516020015260405160e060020a63ffffffff851602815260ff909216600483015215156024820152604401602060405180830381600087803b151561068257600080fd5b6102c65a03f1151561069357600080fd5b5050506040518051905030600160a060020a031663172c61e660008060006040516020015260405160e060020a63ffffffff851602815260ff909216600483015215156024820152604401602060405180830381600087803b15156106f757600080fd5b6102c65a03f1151561070857600080fd5b505050604051805191905063ffffffff61182a16565b9063ffffffff61182a16565b945061148285111561073b57600080fd5b33935060009250600160a060020a0386811690851614610759578592505b3491506000891115610787576107728460008b86611839565b90508082101561078157600080fd5b80820391505b60008811156107b25761079d8460028a86611839565b9050808210156107ac57600080fd5b80820391505b60008711156107dd576107c88460048986611839565b9050808210156107d757600080fd5b80820391505b600160a060020a03331682156108fc0283604051600060405180830381858888f19350505050151561080e57600080fd5b600160a060020a0383161561083a5761083a836108358961071e8d8d63ffffffff61182a16565b611939565b505050505050505050565b600154600090600160a060020a0316151561085f57600080fd5b6001546108ef90600160a060020a031663093e58ba8560006040516020015260405160e060020a63ffffffff841602815260ff9091166004820152602401602060405180830381600087803b15156108b657600080fd5b6102c65a03f115156108c757600080fd5b505050604051805160ff8616600090815260056020526040902054915063ffffffff61182a16565b9050811561091e5760ff831660009081526006602052604090205461091b90829063ffffffff611af916565b90505b92915050565b60046020526000908152604090205481565b6605af3107a4000081565b6000805433600160a060020a0390811691161461095d57600080fd5b506000548190600160a060020a038083169163f2fde38b911660405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401600060405180830381600087803b15156109b457600080fd5b6102c65a03f115156109c557600080fd5b5050505050565b6000805433600160a060020a039081169116146109e857600080fd5b600154600160a060020a031615156109ff57600080fd5b600160a060020a0383161515610a1457600080fd5b600b54610a27908363ffffffff611af916565b600b55610a348383611939565b82600160a060020a03167ff3de1e0f26bcea621632646102d48e20d0a0d68b18abf9e730c002773c02ca178360405190815260200160405180910390a250600b5492915050565b60005433600160a060020a03908116911614610a9657600080fd5b60005460a060020a900460ff161515610aae57600080fd5b6000805474ff0000000000000000000000000000000000000000191690557f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3360405160405180910390a1565b600081565b600254600160a060020a031681565b600b5481565b60005460a060020a900460ff1681565b600154600160a060020a031681565b600154600090600160a060020a03161515610b4d57600080fd5b600154610be990600160a060020a031663ebe979868560006040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b1515610baa57600080fd5b6102c65a03f11515610bbb57600080fd5b5050506040518051600160a060020a0386166000908152600e6020526040902054915063ffffffff61182a16565b9050811561091e57600160a060020a0383166000908152600f602052604090205461091b90829063ffffffff611af916565b600481565b60036020526000908152604090205481565b60005433600160a060020a03908116911614610c4d57600080fd5b60005460a060020a900460ff1615610c6457600080fd5b6000805474ff0000000000000000000000000000000000000000191660a060020a1790557f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62560405160405180910390a1565b6001546000908190600160a060020a03161515610cd257600080fd5b610cdd600086611b0b565b50909150610cf39050828263ffffffff61182a16565b9150610d00600285611b0b565b50909150610d169050828263ffffffff61182a16565b9150610d23600484611b0b565b50909150610d399050828263ffffffff61182a16565b95945050505050565b600054600160a060020a031681565b635ad538ff81565b60005433600160a060020a03908116911614610d7457600080fd5b600154600160a060020a03161515610d8b57600080fd5b600154600160a060020a0316639f727c276040518163ffffffff1660e060020a028152600401600060405180830381600087803b1515610dca57600080fd5b6102c65a03f11515610ddb57600080fd5b5050600054600160a060020a03908116915030163180156108fc0290604051600060405180830381858888f193505050501515610e1757600080fd5b565b600581565b61148281565b6002546000908190819033600160a060020a03908116911614610e4657600080fd5b600154600160a060020a03161515610e5d57600080fd5b610e6987600088611b90565b610e7588600288611b90565b610e8189600488611b90565b9250925092509450945094915050565b600281565b60005433600160a060020a03908116911614610eb157600080fd5b600154600160a060020a031615610ec757600080fd5b6001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03838116919091179182905516638456cb596040518163ffffffff1660e060020a028152600401600060405180830381600087803b1515610f2957600080fd5b6102c65a03f11515610f3a57600080fd5b5050600154600160a060020a0316905063c8a5a7936000806040516020015260405160e060020a63ffffffff841602815260ff9091166004820152602401602060405180830381600087803b1515610f9157600080fd5b6102c65a03f11515610fa257600080fd5b5050506040518051600080805260046020527f17ef568e3e12ab5b9c7254a8d58478811de00f9e6eb34345acd53bf8fd09d3ec91909155600154600160a060020a0316915063c8a5a793906002906040516020015260405160e060020a63ffffffff841602815260ff9091166004820152602401602060405180830381600087803b151561102f57600080fd5b6102c65a03f1151561104057600080fd5b505050604051805160026000908152600460208190527f91da3fd0782e51c6b3986e9e672fd566868e71f3dbc2d6c2cd6fbb3e361af2a792909255600154600160a060020a0316925063c8a5a79391906040516020015260405160e060020a63ffffffff841602815260ff9091166004820152602401602060405180830381600087803b15156110cf57600080fd5b6102c65a03f115156110e057600080fd5b5050506040518051600460008181526020919091527f1a1e6821cde7d0159c0d293177871e09677b4e42307c7db3ba94f8648a5a050f91909155600154600160a060020a0316915063939d170690806040516020015260405160e060020a63ffffffff841602815260ff9091166004820152602401602060405180830381600087803b151561116e57600080fd5b6102c65a03f1151561117f57600080fd5b5050506040518051600080805260036020527f3617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92eff91909155600154600160a060020a0316915063939d1706906002906040516020015260405160e060020a63ffffffff841602815260ff9091166004820152602401602060405180830381600087803b151561120c57600080fd5b6102c65a03f1151561121d57600080fd5b50505060405180516002600090815260036020527fc3a24b0501bd2c13a7e57f2db4369ec4c223447539fc0724a9d55ac4a06ebd4d91909155600154600160a060020a0316915063939d1706906004906040516020015260405160e060020a63ffffffff841602815260ff9091166004820152602401602060405180830381600087803b15156112ac57600080fd5b6102c65a03f115156112bd57600080fd5b50505060405180516004600090815260036020527f83ec6a1f0257b830b5e016457c9cf1435391bf56cc98f369a58a54fe9377246591909155805474ff0000000000000000000000000000000000000000191690555050565b600154600090600160a060020a0316151561133057600080fd5b6001546113e390600160a060020a0316631ee87a74868660006040516020015260405160e060020a63ffffffff8516028152600160a060020a03909216600483015260ff166024820152604401602060405180830381600087803b151561139657600080fd5b6102c65a03f115156113a757600080fd5b5050506040518051600160a060020a038716600090815260076020908152604080832060ff8a168452909152902054915063ffffffff61182a16565b9050811561142657600160a060020a038416600090815260086020908152604080832060ff8716845290915290205461142390829063ffffffff611af916565b90505b9392505050565b60005433600160a060020a0390811691161461144857600080fd5b600154600160a060020a0316151561145f57600080fd5b6002805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60025460009033600160a060020a039081169116146114ac57600080fd5b600154600160a060020a031615156114c357600080fd5b61154e8230600160a060020a0316636694e84586600160006040516020015260405160e060020a63ffffffff8516028152600160a060020a03909216600483015215156024820152604401602060405180830381600087803b151561152757600080fd5b6102c65a03f1151561153857600080fd5b505050604051805191905063ffffffff611af916565b9050600082111561091e57600160a060020a0383166000908152600f6020526040902054611582908363ffffffff61182a16565b600160a060020a0384166000908152600f6020526040902055600d546115ae908363ffffffff61182a16565b600d55600160a060020a0383167fb5a9210266fef3e55f37dd4e8763305bf6c5a16e234d4a3cea91dc7d0ecfc3bc8360405190815260200160405180910390a292915050565b600154600090600160a060020a0316151561160e57600080fd5b60015461168390600160a060020a031663f34368736000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b151561165a57600080fd5b6102c65a03f1151561166b57600080fd5b5050506040518051600c54915063ffffffff61182a16565b905081156116a257600d5461169f90829063ffffffff611af916565b90505b919050565b60005433600160a060020a039081169116146116c257600080fd5b600160a060020a03811615156116d757600080fd5b600054600160a060020a0380831691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600154600090600160a060020a0316151561175c57600080fd5b6001546117f890600160a060020a0316634d82d2628560006040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b15156117b957600080fd5b6102c65a03f115156117ca57600080fd5b5050506040518051600160a060020a038616600090815260096020526040902054915063ffffffff61182a16565b9050811561091e57600160a060020a0383166000908152600a602052604090205461091b90829063ffffffff611af916565b60008282018381101561142657fe5b60006118458484611b0b565b60ff87166000818152600460209081526040808320600383528184209590955594909355600160a060020a038a1681526007835283812091815291522054909150611896908463ffffffff61182a16565b600160a060020a038616600090815260076020908152604080832060ff891684528252808320939093556005905220546118d6908463ffffffff61182a16565b60ff85166000818152600560205260409081902092909255600160a060020a0380851692908816907f4cca885907a1439610e4a3c6c07208e98c0cf27fab65301fe20bad2d0cd7145d9087905190815260200160405180910390a4949350505050565b600160a060020a0382166000908152600960205260408120548190611964908463ffffffff61182a16565b6009600086600160a060020a0316600160a060020a031681526020019081526020016000208190555030600160a060020a031663fdf5552385600160006040516020015260405160e060020a63ffffffff8516028152600160a060020a03909216600483015215156024820152604401602060405180830381600087803b15156119ed57600080fd5b6102c65a03f115156119fe57600080fd5b50505060405180519250506005820490506000811115611af357611a51611a2c82600563ffffffff611ce116565b600160a060020a0386166000908152600a60205260409020549063ffffffff61182a16565b600160a060020a0385166000908152600a6020908152604080832093909355600e90522054611a86908263ffffffff61182a16565b600160a060020a0385166000908152600e6020526040902055600c54611ab2908263ffffffff61182a16565b600c55600160a060020a0384167fd10165fd5b921c47fdb2555c3f7acdb72b54e3dc98d8bba85b66980434d58bb88260405190815260200160405180910390a25b50505050565b600082821115611b0557fe5b50900390565b60ff8216600090815260046020908152604080832054600390925282205482805b85811015611b8757611b44858463ffffffff61182a16565b9450611b56838563ffffffff61182a16565b915067016345785d8a0000830467016345785d8a0000830414611b7a576002909304925b9091508190600101611b2c565b50509250925092565b6000611c018230600160a060020a031663cc17aa288787600160006040516020015260405160e060020a63ffffffff8616028152600160a060020a03909316600484015260ff909116602483015215156044820152606401602060405180830381600087803b151561152757600080fd5b9050600082111561142657600160a060020a038416600090815260086020908152604080832060ff87168452909152902054611c43908363ffffffff61182a16565b600160a060020a038516600090815260086020908152604080832060ff88168452825280832093909355600690522054611c83908363ffffffff61182a16565b60ff8416600081815260066020526040908190209290925590600160a060020a038616907fce0806d48b62bb7ef7be6dad40d4b45c9a58267ef45bf528cdbb8810db3da73e9085905190815260200160405180910390a39392505050565b6000828202831580611cfd5750828482811515611cfa57fe5b04145b151561142657fe00a165627a7a7230582052011fcf2d7981df31e01f179008bc31d5123260b3f1da30fc58f9e489fce3810029
Swarm Source
bzzr://52011fcf2d7981df31e01f179008bc31d5123260b3f1da30fc58f9e489fce381
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 33 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.