Contract 0x0de7Ae58CE6449200F48faAc96e28c1DA4E992aD

 

Contract Overview

Balance:
0 MATIC

MATIC Value:
$0.00

Token:
 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xe62c082439699c2d3badf7c73a423795f51dc7392e7b5c73fa69c671bb5f7a10Set Buddy Logic ...282845902022-05-13 22:48:1911 days 21 hrs agoMicroBuddies: Deployer IN  0x0de7ae58ce6449200f48faac96e28c1da4e992ad0 MATIC0.0017411460
0xcc33684c91ac1dfc21abde4fbc6c2cbdb8abbc0f329599342d872cee05748dd3Set Mutations Co...242334972022-01-27 17:21:04118 days 2 hrs agoMicroBuddies: Deployer IN  0x0de7ae58ce6449200f48faac96e28c1da4e992ad0 MATIC0.00108206415537.315130536
0xdec1fc3c85d697170c3d976684519cb5c7be036f4745c4bb5f644f6aab804cfaSet Buddy Logic ...226220112021-12-17 6:50:49159 days 13 hrs agoMicroBuddies: Deployer IN  0x0de7ae58ce6449200f48faac96e28c1da4e992ad0 MATIC0.0032283370
0x0a10773cfadc1901221582565dd1d1e7460b7ac0b07d4ad8c783c627dedc2d7a0x60806040226220052021-12-17 6:50:37159 days 13 hrs agoMicroBuddies: Deployer IN  Create: Synthesizer0 MATIC0.1494416770
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Synthesizer

Compiler Version
v0.8.10+commit.fc410830

Optimization Enabled:
Yes with 336 runs

Other Settings:
default evmVersion
File 1 of 8 : Synthesizer.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.10;

// |  \/  (_)              |  _ \          | |   | (_)
// | \  / |_  ___ _ __ ___ | |_) |_   _  __| | __| |_  ___  ___ ™
// | |\/| | |/ __| '__/ _ \|  _ <| | | |/ _` |/ _` | |/ _ \/ __|
// | |  | | | (__| | | (_) | |_) | |_| | (_| | (_| | |  __/\__ \
// |_|  |_|_|\___|_|  \___/|____/ \__,_|\__,_|\__,_|_|\___||___/ 2021
import "./interfaces/IBuddyLogic.sol";
import "./interfaces/ISynthesizer.sol";
import "./interfaces/IMutations.sol";
import "./interfaces/IBuddyRandomness.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

contract Synthesizer is ISynthesizer, Ownable {
    IBuddyLogic public _buddyLogic;
    IBuddyRandomness _buddyRandomness;
    IMutations public _mutations;

    uint32 public _ALGAE_COUNT = 400;
    uint32 public _PROTOZOA_COUNT = _ALGAE_COUNT + 325;
    uint32 public _PROTIST_COUNT = _PROTOZOA_COUNT + 325;
    uint32 public _ARCHAEA_COUNT = _PROTIST_COUNT + 205;

    uint32 public _AMOEBA_COUNT = _ARCHAEA_COUNT + 300;
    uint32 public _BACTERIA_COUNT = _AMOEBA_COUNT + 250;
    uint16 public _VIRUS_COUNT = uint16(_BACTERIA_COUNT) + 205;

    uint16 public _FUNGI_COUNT = _VIRUS_COUNT + 250;
    uint16 public _YEAST_COUNT = _FUNGI_COUNT + 200;

    uint16 public _WATERBEAR_COUNT = _YEAST_COUNT + 30;

    constructor(address _buddyRandomnessAddr, address _mutationsAddr) {
        _buddyRandomness = IBuddyRandomness(_buddyRandomnessAddr);
        _mutations = IMutations(_mutationsAddr);
    }

    function setBuddyLogicContract(address buddyLogicContractAddr)
        public
        onlyOwner
    {
        _buddyLogic = IBuddyLogic(buddyLogicContractAddr);
    }

    function setRandomnessContract(address _randomnessContractAddr)
        external
        onlyOwner
    {
        _buddyRandomness = IBuddyRandomness(_randomnessContractAddr);
    }

    function setMutationsContract(address _mutationsContractAddr)
        external
        onlyOwner
    {
        _mutations = IMutations(_mutationsContractAddr);
    }

    modifier onlyBuddyLogic() {
        require(msg.sender == address(_buddyLogic), "Unauthorized");
        _;
    }

    function grabRandomBuddy(uint256 tokenId)
        external
        onlyBuddyLogic
        returns (uint256)
    {
        uint256 dna = buildDNA(tokenId, getSpecies(tokenId));
        return dna;
    }

    function getSpecies(uint256 tokenId) private returns (uint8 species) {
        require(_WATERBEAR_COUNT > 0, "All Gen 0s claimed");
        uint256 r = _buddyRandomness.rng(tokenId, _WATERBEAR_COUNT);

        if (r <= _ALGAE_COUNT) {
            _ALGAE_COUNT -= 1;
            _PROTOZOA_COUNT -= 1;
            _PROTIST_COUNT -= 1;
            _ARCHAEA_COUNT -= 1;
            _AMOEBA_COUNT -= 1;
            _BACTERIA_COUNT -= 1;
            _VIRUS_COUNT -= 1;
            _FUNGI_COUNT -= 1;
            _YEAST_COUNT -= 1;
            _WATERBEAR_COUNT -= 1;
            return 10;
        } else if (r <= _PROTOZOA_COUNT) {
            _PROTOZOA_COUNT -= 1;
            _PROTIST_COUNT -= 1;
            _ARCHAEA_COUNT -= 1;
            _AMOEBA_COUNT -= 1;
            _BACTERIA_COUNT -= 1;
            _VIRUS_COUNT -= 1;
            _FUNGI_COUNT -= 1;
            _YEAST_COUNT -= 1;
            _WATERBEAR_COUNT -= 1;
            return 9;
        } else if (r <= _PROTIST_COUNT) {
            _PROTIST_COUNT -= 1;
            _ARCHAEA_COUNT -= 1;
            _AMOEBA_COUNT -= 1;
            _BACTERIA_COUNT -= 1;
            _VIRUS_COUNT -= 1;
            _FUNGI_COUNT -= 1;
            _YEAST_COUNT -= 1;
            _WATERBEAR_COUNT -= 1;
            return 8;
        } else if (r <= _ARCHAEA_COUNT) {
            _ARCHAEA_COUNT -= 1;
            _AMOEBA_COUNT -= 1;
            _BACTERIA_COUNT -= 1;
            _VIRUS_COUNT -= 1;
            _FUNGI_COUNT -= 1;
            _YEAST_COUNT -= 1;
            _WATERBEAR_COUNT -= 1;
            return 7;
        } else if (r <= _AMOEBA_COUNT) {
            _AMOEBA_COUNT -= 1;
            _BACTERIA_COUNT -= 1;
            _VIRUS_COUNT -= 1;
            _FUNGI_COUNT -= 1;
            _YEAST_COUNT -= 1;
            _WATERBEAR_COUNT -= 1;
            return 6;
        } else if (r <= _BACTERIA_COUNT) {
            _BACTERIA_COUNT -= 1;
            _VIRUS_COUNT -= 1;
            _FUNGI_COUNT -= 1;
            _YEAST_COUNT -= 1;
            _WATERBEAR_COUNT -= 1;
            return 5;
        } else if (r <= _VIRUS_COUNT) {
            _VIRUS_COUNT -= 1;
            _FUNGI_COUNT -= 1;
            _YEAST_COUNT -= 1;
            _WATERBEAR_COUNT -= 1;
            return 4;
        } else if (r <= _FUNGI_COUNT) {
            _FUNGI_COUNT -= 1;
            _YEAST_COUNT -= 1;
            _WATERBEAR_COUNT -= 1;
            return 3;
        } else if (r <= _YEAST_COUNT) {
            _YEAST_COUNT -= 1;
            _WATERBEAR_COUNT -= 1;
            return 2;
        } else if (r <= _WATERBEAR_COUNT) {
            _WATERBEAR_COUNT -= 1;
            return 1;
        }
    }

    function buildDNA(uint256 tokenId, uint8 species)
        private
        returns (uint256)
    {
        uint8[] memory traits = new uint8[](32);
        traits[0] = species;

        // Top (dominant, recessive, recessive, recessive, recessive, recessive)
        // We don't want 5 to be possible in rtop because that is the rare+
        bool common = false;
        uint256 rTop = _buddyRandomness.rng(tokenId, 4);
        for (uint256 i = 1; i < 6; i++) {
            uint256 rand = 0;

            if (i != rTop) {
                if (species > 3 && i > 1 && !common) {
                    rand = 255;
                    common = true;
                } else {
                    rand = raribleRandom(tokenId, calcTraitType(0), i, species);
                }
            }

            traits[i] = uint8(rand);
        }
        // Mouth (dominant, recessive, recessive, recessive, recessive, recessive)
        common = false;
        for (uint256 i = 6; i < 11; i++) {
            uint256 rand = 0;

            if (species > 3 && i > 6 && !common) {
                rand = 255;
                common = true;
            } else {
                rand = raribleRandom(tokenId, calcTraitType(1), i, species);
            }

            traits[i] = uint8(rand);
        }
        // Eyes (dominant, recessive, recessive, recessive, recessive, recessive)
        common = false;
        for (uint256 i = 11; i < 16; i++) {
            uint256 rand = 0;

            if (species > 3 && i > 11 && !common) {
                rand = 255;
                common = true;
            } else {
                rand = raribleRandom(tokenId, calcTraitType(2), i, species);
            }

            traits[i] = uint8(rand);
        }
        // Body Patterns (dominant, recessive, recessive, recessive, recessive,
        // recessive)
        common = false;
        uint256 rBP = _buddyRandomness.rng(tokenId, 4);
        for (uint256 i = 16; i < 21; i++) {
            uint256 rand = 0;

            if (i - 15 != rBP) {
                if (species > 3 && i > 16 && !common) {
                    rand = 255;
                    common = true;
                } else {
                    rand = raribleRandom(tokenId, calcTraitType(3), i, species);
                }
            }

            traits[i] = uint8(rand);
        }
        // Body Color (dominant, recessive, recessive, recessive, recessive, recessive)
        common = false;
        for (uint256 i = 21; i < 26; i++) {
            uint256 rand = 0;

            if (species > 3 && i > 21 && !common) {
                rand = 255;
                common = true;
            } else {
                rand = raribleRandom(tokenId, calcTraitType(4), i, species);
            }

            traits[i] = uint8(rand);
        }
        // Bottoms (dominant, recessive, recessive, recessive, recessive, recessive)
        common = false;
        uint256 rB = _buddyRandomness.rng(tokenId, 4);
        for (uint256 i = 26; i < 31; i++) {
            uint256 rand = 0;

            if (i - 25 != rB) {
                if (species > 3 && i > 26 && !common) {
                    rand = 255;
                    common = true;
                } else {
                    rand = raribleRandom(tokenId, calcTraitType(5), i, species);
                }
            }

            traits[i] = uint8(rand);
        }

        traits[31] = 0;

        return BuddyLib.encode(traits);
    }

    function calcTraitType(uint8 offset)
        private
        pure
        returns (uint8 traitType)
    {
        if (offset == 0) {
            traitType = 3;
        } else if (offset == 1) {
            traitType = 7;
        } else if (offset == 2) {
            traitType = 11;
        } else if (offset == 3) {
            traitType = 15;
        } else if (offset == 4) {
            traitType = 19;
        } else {
            traitType = 23;
        }
    }

    function raribleRandom(
        uint256 tokenId,
        uint256 traitType,
        uint256 i,
        uint8 species
    ) private returns (uint256) {
        uint256 min = 1;
        uint256 max = 1;
        uint256 rarity;

        // Guarantees one trait is rare or better
        if (i % 5 == 0) {
            rarity = _buddyRandomness.rng(tokenId, 14) > 1
                ? 96
                : _buddyRandomness.rng(tokenId, 20) + 80;
        } else {
            rarity = _buddyRandomness.rng(tokenId, 100);
        }

        // Common
        if (rarity <= 80) {
            max = _mutations.getRarity(species, traitType - 3);
            // Rare
        } else if (rarity <= 96) {
            min = _mutations.getRarity(species, traitType - 3) + 1;
            max = _mutations.getRarity(species, traitType - 2);
            // Legendary
        } else if (rarity <= 99) {
            min = _mutations.getRarity(species, traitType - 2) + 1;
            max = _mutations.getRarity(species, traitType - 1);
            // Exalted
        } else {
            min = _mutations.getRarity(species, traitType - 1) + 1;
            max = _mutations.getRarity(species, traitType);
        }

        return traitRandom(tokenId, min, max);
    }

    function traitRandom(
        uint256 tokenId,
        uint256 min,
        uint256 max
    ) private returns (uint256 trait) {
        uint256 n = max - (min - 1);
        uint256 total = ((n * 2 + 1) * n * (n + 1)) / 6;

        uint256 rand = _buddyRandomness.rng(tokenId, total);

        for (uint256 i = min; i <= max; i++) {
            // Lower numbers = higher probability
            total -= BuddyLib.pow(max - (i - 1), 2);

            if (total <= rand) {
                return i;
            }
        }
    }
}

File 2 of 8 : IBuddyLogic.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.10;

import "../libraries/BuddyLib.sol";

interface IBuddyLogic {
    function getMaxGen() external pure returns (uint8);

    function calcFounderClaim(BuddyLib.Buddy calldata)
        external
        view
        returns (uint256);

    function founderClaim(BuddyLib.Buddy calldata) external returns (uint256);

    function createGen0(uint256) external returns (uint256);

    function calcClaim(BuddyLib.Buddy calldata) external view returns (uint256);

    function calcGGPD(
        BuddyLib.Buddy calldata,
        bool,
        bool
    ) external view returns (uint256);

    function getMaxBalance(BuddyLib.Buddy calldata)
        external
        view
        returns (uint256);

    function calcApop(uint256) external view returns (uint256);

    function replicatePreview(
        int8[6] calldata,
        int8[24] calldata,
        BuddyLib.Buddy calldata
    ) external view returns (uint256);

    function repBuddy(
        uint256,
        BuddyLib.Buddy calldata,
        int8[6] calldata,
        int8[24] calldata
    ) external returns (uint256);

    function simpleReplicatePreview(BuddyLib.Buddy calldata)
        external
        view
        returns (uint256);

    function simpleRepBuddy(uint256, BuddyLib.Buddy calldata)
        external
        returns (uint256);

    function calcReps(uint256, uint8) external returns (uint8);

    function calcPeg() external view returns (uint256);

    function getFund() external view returns (address);

    function getBurnPercent() external view returns (uint256);

    function getPayment() external view returns (uint256);

    function getStartingGoo() external view returns (uint256);
}

File 3 of 8 : ISynthesizer.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.10;

import "../libraries/BuddyLib.sol";

interface ISynthesizer {
    function grabRandomBuddy(uint256) external returns (uint256);
}

File 4 of 8 : IMutations.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.10;

import "../libraries/BuddyLib.sol";

interface IMutations {
    function getMutation(
        uint8 species,
        uint8 trait,
        uint8 r1,
        uint8 r2,
        uint8 r3,
        uint8 r4,
        uint8 traitType
    ) external view returns (uint8);

    function getRarity(uint8 species, uint256 index)
        external
        view
        returns (uint256);
}

File 5 of 8 : IBuddyRandomness.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.10;

interface IBuddyRandomness {
    function generateRandom(uint256) external;

    function getRandomResult(uint256) external view returns (uint256);

    function rng(uint256, uint256) external returns (uint256);
}

File 6 of 8 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _setOwner(_msgSender());
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _setOwner(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _setOwner(newOwner);
    }

    function _setOwner(address newOwner) private {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 7 of 8 : BuddyLib.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.10;

// |  \/  (_)              |  _ \          | |   | (_)
// | \  / |_  ___ _ __ ___ | |_) |_   _  __| | __| |_  ___  ___ ™
// | |\/| | |/ __| '__/ _ \|  _ <| | | |/ _` |/ _` | |/ _ \/ __|
// | |  | | | (__| | | (_) | |_) | |_| | (_| | (_| | |  __/\__ \
// |_|  |_|_|\___|_|  \___/|____/ \__,_|\__,_|\__,_|_|\___||___/ 2021

library BuddyLib {
    //Specials
    // 0 = None
    // 1 = Blackhole
    // 2 = Founder
    struct Buddy {
        uint8 species;
        uint8[30] traits;
        uint8 gen;
        uint8 repMax;
        uint8 repCur;
        uint8 special;
        uint256 dna;
        uint256 birth;
        uint256 totalProduced;
        uint256 lastRewardTime;
        uint256 parent;
        uint256 lock;
    }

    function generate(uint256 dna) external view returns (Buddy memory base) {
        uint8[] memory unpack = decode(dna);
        base.species = unpack[0];

        for (uint8 i = 1; i < 31; i++) {
            base.traits[i - 1] = unpack[i];
        }

        base.birth = block.timestamp;
        base.totalProduced = 0;
        base.lastRewardTime = block.timestamp;
        base.dna = dna;
        base.gen = unpack[31];
        base.repMax = 5;
        base.repCur = 0;
        base.lock = block.timestamp - 300;

        return base;
    }

    function decode(uint256 dna) public pure returns (uint8[] memory) {
        uint8[] memory traits = new uint8[](32);
        uint256 i;
        for (i = 0; i < 32; i++) {
            traits[i] = uint8(sliceNumber(dna, 8, i * 8));
        }
        return traits;
    }

    /// @dev given a number get a slice of any bits, at certain offset
    /// @param _n a number to be sliced
    /// @param _nbits how many bits long is the new number
    /// @param _offset how many bits to skip
    function sliceNumber(
        uint256 _n,
        uint256 _nbits,
        uint256 _offset
    ) public pure returns (uint256) {
        // mask is made by shifting left an offset number of times
        uint256 mask = (pow(2, _nbits) - 1) << _offset;
        // AND n with mask, and trim to max of _nbits bits
        return uint256((_n & mask) >> _offset);
    }

    function pow(uint256 A, uint256 B) public pure returns (uint256) {
        return A**B;
    }

    function encode(uint8[] memory traits) external pure returns (uint256 dna) {
        dna = 0;
        for (uint256 i = 0; i < 32; i++) {
            dna = dna << 8;
            // bitwise OR trait with _genes
            dna = dna | traits[31 - i];
        }
    }
}

File 8 of 8 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 336
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {
    "contracts/libraries/BuddyLib.sol": {
      "BuddyLib": "0x900d069f9934861b83656992b530c616b327b0b4"
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_buddyRandomnessAddr","type":"address"},{"internalType":"address","name":"_mutationsAddr","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"_ALGAE_COUNT","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_AMOEBA_COUNT","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_ARCHAEA_COUNT","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_BACTERIA_COUNT","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_FUNGI_COUNT","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_PROTIST_COUNT","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_PROTOZOA_COUNT","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_VIRUS_COUNT","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_WATERBEAR_COUNT","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_YEAST_COUNT","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_buddyLogic","outputs":[{"internalType":"contract IBuddyLogic","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_mutations","outputs":[{"internalType":"contract IMutations","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"grabRandomBuddy","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"buddyLogicContractAddr","type":"address"}],"name":"setBuddyLogicContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_mutationsContractAddr","type":"address"}],"name":"setMutationsContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_randomnessContractAddr","type":"address"}],"name":"setRandomnessContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040526003805463ffffffff60a01b1916601960a41b1790819055620000389063ffffffff600160a01b90910416610145620002c4565b6003805463ffffffff60c01b1916600160c01b63ffffffff938416810291909117918290556200006e92910416610145620002c4565b600380546001600160e01b0316600160e01b63ffffffff93841681029190911791829055620000a29291041660cd620002c4565b6004805463ffffffff191663ffffffff929092169182179055620000c99061012c620002c4565b6004805463ffffffff60201b191664010000000063ffffffff93841681029190911791829055620000ff9291041660fa620002c4565b6004805463ffffffff60401b19166801000000000000000063ffffffff93841681029190911791829055620001399291041660cd620002ef565b6004805461ffff60601b19166c0100000000000000000000000061ffff93841681029190911791829055620001739291041660fa620002ef565b6004805461ffff60701b1916600160701b61ffff93841681029190911791829055620001a49291041660c8620002ef565b6004805461ffff60801b1916600160801b61ffff93841681029190911791829055620001d592910416601e620002ef565b600460126101000a81548161ffff021916908361ffff160217905550348015620001fe57600080fd5b506040516200272c3803806200272c83398101604081905262000221916200032c565b6200022c336200025e565b600280546001600160a01b039384166001600160a01b0319918216179091556003805492909316911617905562000364565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b634e487b7160e01b600052601160045260246000fd5b600063ffffffff808316818516808303821115620002e657620002e6620002ae565b01949350505050565b600061ffff808316818516808303821115620002e657620002e6620002ae565b80516001600160a01b03811681146200032757600080fd5b919050565b600080604083850312156200034057600080fd5b6200034b836200030f565b91506200035b602084016200030f565b90509250929050565b6123b880620003746000396000f3fe608060405234801561001057600080fd5b50600436106101215760003560e01c8063723a4812116100ad578063b7e82b8811610071578063b7e82b881461028d578063c46005fd146102a4578063cb3a2e02146102bb578063ea52a318146102ce578063f2fde38b146102e357600080fd5b8063723a48121461022e578063776e8eee146102465780638d099690146102595780638da5cb5b14610269578063a98bfe081461027a57600080fd5b806323de35a1116100f457806323de35a1146101ae57806339914265146101cf5780633f56d253146101e6578063450ce95b146101fb578063715018a61461022657600080fd5b806304d46d211461012657806306db01f114610153578063073d166d1461018457806314230b7b14610199575b600080fd5b60045461013b90600160901b900461ffff1681565b60405161ffff90911681526020015b60405180910390f35b60045461016f9068010000000000000000900463ffffffff1681565b60405163ffffffff909116815260200161014a565b60045461013b90600160801b900461ffff1681565b6101ac6101a73660046121ad565b6102f6565b005b6101c16101bc3660046121d6565b610365565b60405190815260200161014a565b60035461016f90600160c01b900463ffffffff1681565b60045461013b90600160701b900461ffff1681565b60035461020e906001600160a01b031681565b6040516001600160a01b03909116815260200161014a565b6101ac6103cc565b60045461016f90640100000000900463ffffffff1681565b60015461020e906001600160a01b031681565b60045461016f9063ffffffff1681565b6000546001600160a01b031661020e565b6101ac6102883660046121ad565b610420565b60035461016f90600160a01b900463ffffffff1681565b60035461016f90600160e01b900463ffffffff1681565b6101ac6102c93660046121ad565b61048a565b60045461013b90600160601b900461ffff1681565b6101ac6102f13660046121ad565b6104f4565b6000546001600160a01b031633146103435760405162461bcd60e51b8152602060048201819052602482015260008051602061236383398151915260448201526064015b60405180910390fd5b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6001546000906001600160a01b031633146103b15760405162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b604482015260640161033a565b60006103c5836103c0856105ad565b6114ab565b9392505050565b6000546001600160a01b031633146104145760405162461bcd60e51b81526020600482018190526024820152600080516020612363833981519152604482015260640161033a565b61041e6000611a8d565b565b6000546001600160a01b031633146104685760405162461bcd60e51b81526020600482018190526024820152600080516020612363833981519152604482015260640161033a565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146104d25760405162461bcd60e51b81526020600482018190526024820152600080516020612363833981519152604482015260640161033a565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331461053c5760405162461bcd60e51b81526020600482018190526024820152600080516020612363833981519152604482015260640161033a565b6001600160a01b0381166105a15760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161033a565b6105aa81611a8d565b50565b600454600090600160901b900461ffff166105ff5760405162461bcd60e51b8152602060048201526012602482015271105b1b0811d95b880c1cc818db185a5b595960721b604482015260640161033a565b6002546004805460405163067fc99b60e11b8152918201859052600160901b900461ffff1660248201526000916001600160a01b031690630cff9336906044016020604051808303816000875af115801561065e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061068291906121ef565b600354909150600160a01b900463ffffffff16811161090c576001600360148282829054906101000a900463ffffffff166106bd919061221e565b92506101000a81548163ffffffff021916908363ffffffff1602179055506001600360188282829054906101000a900463ffffffff166106fd919061221e565b92506101000a81548163ffffffff021916908363ffffffff16021790555060016003601c8282829054906101000a900463ffffffff1661073d919061221e565b92506101000a81548163ffffffff021916908363ffffffff1602179055506001600460008282829054906101000a900463ffffffff1661077d919061221e565b92506101000a81548163ffffffff021916908363ffffffff16021790555060016004808282829054906101000a900463ffffffff166107bc919061221e565b92506101000a81548163ffffffff021916908363ffffffff1602179055506001600460088282829054906101000a900463ffffffff166107fc919061221e565b92506101000a81548163ffffffff021916908363ffffffff16021790555060016004600c8282829054906101000a900461ffff1661083a9190612243565b92506101000a81548161ffff021916908361ffff16021790555060016004600e8282829054906101000a900461ffff166108749190612243565b92506101000a81548161ffff021916908361ffff1602179055506001600460108282829054906101000a900461ffff166108ae9190612243565b92506101000a81548161ffff021916908361ffff1602179055506001600460128282829054906101000a900461ffff166108e89190612243565b92506101000a81548161ffff021916908361ffff160217905550600a915050919050565b600354600160c01b900463ffffffff168111610b53576001600360188282829054906101000a900463ffffffff16610944919061221e565b92506101000a81548163ffffffff021916908363ffffffff16021790555060016003601c8282829054906101000a900463ffffffff16610984919061221e565b92506101000a81548163ffffffff021916908363ffffffff1602179055506001600460008282829054906101000a900463ffffffff166109c4919061221e565b92506101000a81548163ffffffff021916908363ffffffff16021790555060016004808282829054906101000a900463ffffffff16610a03919061221e565b92506101000a81548163ffffffff021916908363ffffffff1602179055506001600460088282829054906101000a900463ffffffff16610a43919061221e565b92506101000a81548163ffffffff021916908363ffffffff16021790555060016004600c8282829054906101000a900461ffff16610a819190612243565b92506101000a81548161ffff021916908361ffff16021790555060016004600e8282829054906101000a900461ffff16610abb9190612243565b92506101000a81548161ffff021916908361ffff1602179055506001600460108282829054906101000a900461ffff16610af59190612243565b92506101000a81548161ffff021916908361ffff1602179055506001600460128282829054906101000a900461ffff16610b2f9190612243565b92506101000a81548161ffff021916908361ffff1602179055506009915050919050565b600354600160e01b900463ffffffff168111610d5a5760016003601c8282829054906101000a900463ffffffff16610b8b919061221e565b92506101000a81548163ffffffff021916908363ffffffff1602179055506001600460008282829054906101000a900463ffffffff16610bcb919061221e565b92506101000a81548163ffffffff021916908363ffffffff16021790555060016004808282829054906101000a900463ffffffff16610c0a919061221e565b92506101000a81548163ffffffff021916908363ffffffff1602179055506001600460088282829054906101000a900463ffffffff16610c4a919061221e565b92506101000a81548163ffffffff021916908363ffffffff16021790555060016004600c8282829054906101000a900461ffff16610c889190612243565b92506101000a81548161ffff021916908361ffff16021790555060016004600e8282829054906101000a900461ffff16610cc29190612243565b92506101000a81548161ffff021916908361ffff1602179055506001600460108282829054906101000a900461ffff16610cfc9190612243565b92506101000a81548161ffff021916908361ffff1602179055506001600460128282829054906101000a900461ffff16610d369190612243565b92506101000a81548161ffff021916908361ffff1602179055506008915050919050565b60045463ffffffff168111610f14576004805460019190600090610d8590849063ffffffff1661221e565b92506101000a81548163ffffffff021916908363ffffffff16021790555060016004808282829054906101000a900463ffffffff16610dc4919061221e565b92506101000a81548163ffffffff021916908363ffffffff1602179055506001600460088282829054906101000a900463ffffffff16610e04919061221e565b92506101000a81548163ffffffff021916908363ffffffff16021790555060016004600c8282829054906101000a900461ffff16610e429190612243565b92506101000a81548161ffff021916908361ffff16021790555060016004600e8282829054906101000a900461ffff16610e7c9190612243565b92506101000a81548161ffff021916908361ffff1602179055506001600460108282829054906101000a900461ffff16610eb69190612243565b92506101000a81548161ffff021916908361ffff1602179055506001600460128282829054906101000a900461ffff16610ef09190612243565b92506101000a81548161ffff021916908361ffff1602179055506007915050919050565b600454640100000000900463ffffffff16811161109c5760016004808282829054906101000a900463ffffffff16610f4c919061221e565b92506101000a81548163ffffffff021916908363ffffffff1602179055506001600460088282829054906101000a900463ffffffff16610f8c919061221e565b92506101000a81548163ffffffff021916908363ffffffff16021790555060016004600c8282829054906101000a900461ffff16610fca9190612243565b92506101000a81548161ffff021916908361ffff16021790555060016004600e8282829054906101000a900461ffff166110049190612243565b92506101000a81548161ffff021916908361ffff1602179055506001600460108282829054906101000a900461ffff1661103e9190612243565b92506101000a81548161ffff021916908361ffff1602179055506001600460128282829054906101000a900461ffff166110789190612243565b92506101000a81548161ffff021916908361ffff1602179055506006915050919050565b60045468010000000000000000900463ffffffff1681116111e9576001600460088282829054906101000a900463ffffffff166110d9919061221e565b92506101000a81548163ffffffff021916908363ffffffff16021790555060016004600c8282829054906101000a900461ffff166111179190612243565b92506101000a81548161ffff021916908361ffff16021790555060016004600e8282829054906101000a900461ffff166111519190612243565b92506101000a81548161ffff021916908361ffff1602179055506001600460108282829054906101000a900461ffff1661118b9190612243565b92506101000a81548161ffff021916908361ffff1602179055506001600460128282829054906101000a900461ffff166111c59190612243565b92506101000a81548161ffff021916908361ffff1602179055506005915050919050565b600454600160601b900461ffff1681116112ef5760016004600c8282829054906101000a900461ffff1661121d9190612243565b92506101000a81548161ffff021916908361ffff16021790555060016004600e8282829054906101000a900461ffff166112579190612243565b92506101000a81548161ffff021916908361ffff1602179055506001600460108282829054906101000a900461ffff166112919190612243565b92506101000a81548161ffff021916908361ffff1602179055506001600460128282829054906101000a900461ffff166112cb9190612243565b92506101000a81548161ffff021916908361ffff1602179055506004915050919050565b600454600160701b900461ffff1681116113bb5760016004600e8282829054906101000a900461ffff166113239190612243565b92506101000a81548161ffff021916908361ffff1602179055506001600460108282829054906101000a900461ffff1661135d9190612243565b92506101000a81548161ffff021916908361ffff1602179055506001600460128282829054906101000a900461ffff166113979190612243565b92506101000a81548161ffff021916908361ffff1602179055506003915050919050565b600454600160801b900461ffff16811161144d576001600460108282829054906101000a900461ffff166113ef9190612243565b92506101000a81548161ffff021916908361ffff1602179055506001600460128282829054906101000a900461ffff166114299190612243565b92506101000a81548161ffff021916908361ffff1602179055506002915050919050565b600454600160901b900461ffff1681116114a5576001600460128282829054906101000a900461ffff166114819190612243565b92506101000a81548161ffff021916908361ffff1602179055506001915050919050565b50919050565b60408051602080825261042082019092526000918291908082016104008036833701905050905082816000815181106114e6576114e661225e565b60ff929092166020928302919091019091015260025460405163067fc99b60e11b81526004808201879052602482015260009182916001600160a01b0390911690630cff9336906044016020604051808303816000875af115801561154f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061157391906121ef565b905060015b600681101561160b5760008282146115d35760038760ff1611801561159d5750600182115b80156115a7575083155b156115b857506001925060ff6115d3565b6115d0886115c66000611add565b60ff16848a611b47565b90505b808583815181106115e6576115e661225e565b60ff90921660209283029190910190910152508061160381612274565b915050611578565b506000915060065b600b81101561169557600060038760ff161180156116315750600682115b801561163b575083155b1561164c57506001925060ff61165d565b61165a886115c66001611add565b90505b808583815181106116705761167061225e565b60ff90921660209283029190910190910152508061168d81612274565b915050611613565b5060009150600b5b601081101561171f57600060038760ff161180156116bb5750600b82115b80156116c5575083155b156116d657506001925060ff6116e7565b6116e4886115c66002611add565b90505b808583815181106116fa576116fa61225e565b60ff90921660209283029190910190910152508061171781612274565b91505061169d565b5060025460405163067fc99b60e11b8152600480820189905260248201526000935083916001600160a01b031690630cff9336906044016020604051808303816000875af1158015611775573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061179991906121ef565b905060105b601581101561183b576000826117b5600f8461228f565b146118035760038860ff161180156117cd5750601082115b80156117d7575084155b156117e857506001935060ff611803565b611800896117f66003611add565b60ff16848b611b47565b90505b808683815181106118165761181661225e565b60ff90921660209283029190910190910152508061183381612274565b91505061179e565b506000925060155b601a8110156118c557600060038860ff161180156118615750601582115b801561186b575084155b1561187c57506001935060ff61188d565b61188a896117f66004611add565b90505b808683815181106118a0576118a061225e565b60ff9092166020928302919091019091015250806118bd81612274565b915050611843565b5060025460405163067fc99b60e11b815260048082018a905260248201526000945084916001600160a01b031690630cff9336906044016020604051808303816000875af115801561191b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061193f91906121ef565b9050601a5b601f8110156119e15760008261195b60198461228f565b146119a95760038960ff161180156119735750601a82115b801561197d575085155b1561198e57506001945060ff6119a9565b6119a68a61199c6005611add565b60ff16848c611b47565b90505b808783815181106119bc576119bc61225e565b60ff9092166020928302919091019091015250806119d981612274565b915050611944565b50600085601f815181106119f7576119f761225e565b60ff90921660209283029190910190910152604051630565fb9160e21b815273900d069f9934861b83656992b530c616b327b0b490631597ee4490611a409088906004016122a6565b602060405180830381865af4158015611a5d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a8191906121ef565b98975050505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600060ff8216611aef57506003919050565b8160ff1660011415611b0357506007919050565b8160ff1660021415611b175750600b919050565b8160ff1660031415611b2b5750600f919050565b8160ff1660041415611b3f57506013919050565b506017919050565b600060018082611b58600587612303565b611c685760025460405163067fc99b60e11b8152600481018a9052600e60248201526001916001600160a01b031690630cff9336906044016020604051808303816000875af1158015611baf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bd391906121ef565b11611c5e5760025460405163067fc99b60e11b8152600481018a9052601460248201526001600160a01b0390911690630cff9336906044016020604051808303816000875af1158015611c2a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c4e91906121ef565b611c59906050612317565b611c61565b60605b9050611ce1565b60025460405163067fc99b60e11b8152600481018a9052606460248201526001600160a01b0390911690630cff9336906044016020604051808303816000875af1158015611cba573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cde91906121ef565b90505b60508111611d7757600380546001600160a01b03169063192d5bfc908790611d09908b61228f565b6040516001600160e01b031960e085901b16815260ff90921660048301526024820152604401602060405180830381865afa158015611d4c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d7091906121ef565b9150611ff1565b60608111611e3157600380546001600160a01b03169063192d5bfc908790611d9f908b61228f565b6040516001600160e01b031960e085901b16815260ff90921660048301526024820152604401602060405180830381865afa158015611de2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e0691906121ef565b611e11906001612317565b6003549093506001600160a01b031663192d5bfc86611d0960028b61228f565b60638111611ee8576003546001600160a01b031663192d5bfc86611e5660028b61228f565b6040516001600160e01b031960e085901b16815260ff90921660048301526024820152604401602060405180830381865afa158015611e99573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ebd91906121ef565b611ec8906001612317565b6003549093506001600160a01b031663192d5bfc86611d0960018b61228f565b6003546001600160a01b031663192d5bfc86611f0560018b61228f565b6040516001600160e01b031960e085901b16815260ff90921660048301526024820152604401602060405180830381865afa158015611f48573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f6c91906121ef565b611f77906001612317565b60035460405163064b56ff60e21b815260ff88166004820152602481018a90529194506001600160a01b03169063192d5bfc90604401602060405180830381865afa158015611fca573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fee91906121ef565b91505b611a8188848460008061200560018561228f565b61200f908461228f565b905060006006612020836001612317565b8361202c81600261232f565b612037906001612317565b612041919061232f565b61204b919061232f565b612055919061234e565b60025460405163067fc99b60e11b815260048101899052602481018390529192506000916001600160a01b0390911690630cff9336906044016020604051808303816000875af11580156120ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120d191906121ef565b9050855b8581116121a25773900d069f9934861b83656992b530c616b327b0b4632e4c697f61210160018461228f565b61210b908961228f565b6040516001600160e01b031960e084901b168152600481019190915260026024820152604401602060405180830381865af415801561214e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061217291906121ef565b61217c908461228f565b92508183116121905793506103c592505050565b8061219a81612274565b9150506120d5565b505050509392505050565b6000602082840312156121bf57600080fd5b81356001600160a01b03811681146103c557600080fd5b6000602082840312156121e857600080fd5b5035919050565b60006020828403121561220157600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b600063ffffffff8381169083168181101561223b5761223b612208565b039392505050565b600061ffff8381169083168181101561223b5761223b612208565b634e487b7160e01b600052603260045260246000fd5b600060001982141561228857612288612208565b5060010190565b6000828210156122a1576122a1612208565b500390565b6020808252825182820181905260009190848201906040850190845b818110156122e157835160ff16835292840192918401916001016122c2565b50909695505050505050565b634e487b7160e01b600052601260045260246000fd5b600082612312576123126122ed565b500690565b6000821982111561232a5761232a612208565b500190565b600081600019048311821515161561234957612349612208565b500290565b60008261235d5761235d6122ed565b50049056fe4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a264697066735822122052d41658e34c2076ef9cbc58d2a00ec1d94d63a3b371651fe8051a9575ae4c3b64736f6c634300080a00330000000000000000000000004889f13b4a5417861becab38bbb47a0e8a619972000000000000000000000000fd22355c7c579aecd95a19c7b44facae6726d990

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

0000000000000000000000004889f13b4a5417861becab38bbb47a0e8a619972000000000000000000000000fd22355c7c579aecd95a19c7b44facae6726d990

-----Decoded View---------------
Arg [0] : _buddyRandomnessAddr (address): 0x4889f13b4a5417861becab38bbb47a0e8a619972
Arg [1] : _mutationsAddr (address): 0xfd22355c7c579aecd95a19c7b44facae6726d990

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000004889f13b4a5417861becab38bbb47a0e8a619972
Arg [1] : 000000000000000000000000fd22355c7c579aecd95a19c7b44facae6726d990


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.