Overview
S Balance
0 S
S Value
-More Info
Private Name Tags
ContractCreator
Loading...
Loading
Contract Name:
MowseDungeonTrinketFacet
Compiler Version
v0.8.19+commit.7dd6d404
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.12; import "hardhat/console.sol"; /************************************************************************* ___ ___ | \/ | ___ | . . | _____ _____ ___ _ _ .-' '-. | |\/| |/ _ \ \ /\ / / __|/ _ \ (.)(.)/ \ | | | | (_) \ V V /\__ \ __/ /@@ ; \_| |_/\___/ \_/\_/ |___/\___| o_\\-mm-......-mm`~~~~~~~~~~~~~~~~` /*************************************************************************/ import "@openzeppelin/contracts/utils/Strings.sol"; import { GameStorage, MowseDungeonBattleSimulation, MowseDungeonPlayer, MowseDungeonSimpleTrinkets, MowseDungeonTrinketEnum } from "../../libraries/LibStorage.sol"; import {LibDiamond} from "../../libraries/LibDiamond.sol"; import "../../libraries/Base64.sol"; import "../../libraries/LibDungeon.sol"; import {AccessControlFacet} from "../AccessControlFacet.sol"; contract MowseDungeonTrinketFacet { using Strings for uint256; GameStorage internal gs; error MissingAdminRole(string); modifier onlyAdmin() { if (!AccessControlFacet(gs.diamondAddress).hasMowseAdminRole(msg.sender)) revert MissingAdminRole("Must have Admin Role"); _; } function stealTrinket( MowseDungeonBattleSimulation memory _battleSimulation, uint256 _trinketId ) external pure returns (MowseDungeonBattleSimulation memory) { if (_trinketId == 0) { _battleSimulation.player.trinkets.dagger++; } else if (_trinketId == 1) { _battleSimulation.player.trinkets.slingshot++; } else if (_trinketId == 2) { _battleSimulation.player.trinkets.pendantOfLife++; } else if (_trinketId == 3) { _battleSimulation.player.trinkets.leech++; } else if (_trinketId == 4) { _battleSimulation.player.trinkets.poisonDab++; } else if (_trinketId == 5) { _battleSimulation.player.trinkets.kindle++; } else if (_trinketId == 6) { _battleSimulation.player.trinkets.bloodLetter++; } else if (_trinketId == 7) { _battleSimulation.player.trinkets.cursedRing++; } else if (_trinketId == 8) { _battleSimulation.player.trinkets.stunRod++; } else if (_trinketId == 9) { _battleSimulation.player.trinkets.silenceBell++; } else if (_trinketId == 10) { _battleSimulation.player.trinkets.strengthBelt++; } else if (_trinketId == 11) { _battleSimulation.player.trinkets.weakenedChain++; } else if (_trinketId == 12) { _battleSimulation.player.trinkets.emblemOfInitiative++; } else if (_trinketId == 13) { _battleSimulation.player.trinkets.goldRing++; } return _battleSimulation; } function toSimplePlayerTrinkets(uint256 tokenId) external view returns (MowseDungeonSimpleTrinkets memory) { MowseDungeonPlayer storage _player = gs.mowseDungeonPlayer[tokenId]; return MowseDungeonSimpleTrinkets({ dagger: _player.trinkets[MowseDungeonTrinketEnum.DAGGER].level, slingshot: _player.trinkets[MowseDungeonTrinketEnum.SLINGSHOT].level, pendantOfLife: _player.trinkets[MowseDungeonTrinketEnum.PENDANT_OF_LIFE].level, leech: _player.trinkets[MowseDungeonTrinketEnum.LEECH].level, poisonDab: _player.trinkets[MowseDungeonTrinketEnum.POISON_DAB].level, kindle: _player.trinkets[MowseDungeonTrinketEnum.KINDLE].level, bloodLetter: _player.trinkets[MowseDungeonTrinketEnum.BLOOD_LETTER].level, cursedRing: _player.trinkets[MowseDungeonTrinketEnum.CURSED_RING].level, stunRod: _player.trinkets[MowseDungeonTrinketEnum.STUN_ROD].level, silenceBell: _player.trinkets[MowseDungeonTrinketEnum.SILENCE_BELL].level, strengthBelt: _player.trinkets[MowseDungeonTrinketEnum.STRENGTH_BELT].level, weakenedChain: _player.trinkets[MowseDungeonTrinketEnum.WEAKENED_CHAIN].level, emblemOfInitiative: _player.trinkets[MowseDungeonTrinketEnum.EMBLEM_OF_INITIATIVE].level, goldRing: _player.trinkets[MowseDungeonTrinketEnum.GOLD_RING].level }); } function updateTrinketStats(MowseDungeonTrinketEnum trinketId, uint256 health, uint256 shield, uint256 attack) external onlyAdmin { gs.mowseDungeonTrinketDefaults[trinketId].health = health; gs.mowseDungeonTrinketDefaults[trinketId].shield = shield; gs.mowseDungeonTrinketDefaults[trinketId].attack = attack; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { // Solidity will revert if denominator == 0, unlike the div opcode on its own. // The surrounding unchecked block does not change this fact. // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1, "Math: mulDiv overflow"); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10 ** 64) { value /= 10 ** 64; result += 64; } if (value >= 10 ** 32) { value /= 10 ** 32; result += 32; } if (value >= 10 ** 16) { value /= 10 ** 16; result += 16; } if (value >= 10 ** 8) { value /= 10 ** 8; result += 8; } if (value >= 10 ** 4) { value /= 10 ** 4; result += 4; } if (value >= 10 ** 2) { value /= 10 ** 2; result += 2; } if (value >= 10 ** 1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 256, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol) pragma solidity ^0.8.0; /** * @dev Standard signed math utilities missing in the Solidity language. */ library SignedMath { /** * @dev Returns the largest of two signed numbers. */ function max(int256 a, int256 b) internal pure returns (int256) { return a > b ? a : b; } /** * @dev Returns the smallest of two signed numbers. */ function min(int256 a, int256 b) internal pure returns (int256) { return a < b ? a : b; } /** * @dev Returns the average of two signed numbers without overflow. * The result is rounded towards zero. */ function average(int256 a, int256 b) internal pure returns (int256) { // Formula from the book "Hacker's Delight" int256 x = (a & b) + ((a ^ b) >> 1); return x + (int256(uint256(x) >> 255) & (a ^ b)); } /** * @dev Returns the absolute unsigned value of a signed value. */ function abs(int256 n) internal pure returns (uint256) { unchecked { // must be unchecked in order to support `n = type(int256).min` return uint256(n >= 0 ? n : -n); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; import "./math/SignedMath.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `int256` to its ASCII `string` decimal representation. */ function toString(int256 value) internal pure returns (string memory) { return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMath.abs(value)))); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } /** * @dev Returns true if the two strings are equal. */ function equal(string memory a, string memory b) internal pure returns (bool) { return keccak256(bytes(a)) == keccak256(bytes(b)); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import { IAccessControl } from './IAccessControl.sol'; import { AccessControlInternal } from './AccessControlInternal.sol'; /** * @title Role-based access control system * @dev derived from https://github.com/OpenZeppelin/openzeppelin-contracts (MIT license) */ abstract contract AccessControl is IAccessControl, AccessControlInternal { /** * @inheritdoc IAccessControl */ function grantRole( bytes32 role, address account ) external onlyRole(_getRoleAdmin(role)) { _grantRole(role, account); } /** * @inheritdoc IAccessControl */ function hasRole( bytes32 role, address account ) external view returns (bool) { return _hasRole(role, account); } /** * @inheritdoc IAccessControl */ function getRoleAdmin(bytes32 role) external view returns (bytes32) { return _getRoleAdmin(role); } /** * @inheritdoc IAccessControl */ function revokeRole( bytes32 role, address account ) external onlyRole(_getRoleAdmin(role)) { _revokeRole(role, account); } /** * @inheritdoc IAccessControl */ function renounceRole(bytes32 role) external { _renounceRole(role); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import { EnumerableSet } from '../../data/EnumerableSet.sol'; import { AddressUtils } from '../../utils/AddressUtils.sol'; import { UintUtils } from '../../utils/UintUtils.sol'; import { IAccessControlInternal } from './IAccessControlInternal.sol'; import { AccessControlStorage } from './AccessControlStorage.sol'; /** * @title Role-based access control system * @dev derived from https://github.com/OpenZeppelin/openzeppelin-contracts (MIT license) */ abstract contract AccessControlInternal is IAccessControlInternal { using AddressUtils for address; using EnumerableSet for EnumerableSet.AddressSet; using UintUtils for uint256; modifier onlyRole(bytes32 role) { _checkRole(role); _; } /* * @notice query whether role is assigned to account * @param role role to query * @param account account to query * @return whether role is assigned to account */ function _hasRole( bytes32 role, address account ) internal view virtual returns (bool) { return AccessControlStorage.layout().roles[role].members.contains(account); } /** * @notice revert if sender does not have given role * @param role role to query */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, msg.sender); } /** * @notice revert if given account does not have given role * @param role role to query * @param account to query */ function _checkRole(bytes32 role, address account) internal view virtual { if (!_hasRole(role, account)) { revert( string( abi.encodePacked( 'AccessControl: account ', account.toString(), ' is missing role ', uint256(role).toHexString(32) ) ) ); } } /* * @notice query admin role for given role * @param role role to query * @return admin role */ function _getRoleAdmin( bytes32 role ) internal view virtual returns (bytes32) { return AccessControlStorage.layout().roles[role].adminRole; } /** * @notice set role as admin role * @param role role to set * @param adminRole admin role to set */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = _getRoleAdmin(role); AccessControlStorage.layout().roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /* * @notice assign role to given account * @param role role to assign * @param account recipient of role assignment */ function _grantRole(bytes32 role, address account) internal virtual { AccessControlStorage.layout().roles[role].members.add(account); emit RoleGranted(role, account, msg.sender); } /* * @notice unassign role from given account * @param role role to unassign * @parm account */ function _revokeRole(bytes32 role, address account) internal virtual { AccessControlStorage.layout().roles[role].members.remove(account); emit RoleRevoked(role, account, msg.sender); } /** * @notice relinquish role * @param role role to relinquish */ function _renounceRole(bytes32 role) internal virtual { _revokeRole(role, msg.sender); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import { EnumerableSet } from '../../data/EnumerableSet.sol'; library AccessControlStorage { struct RoleData { EnumerableSet.AddressSet members; bytes32 adminRole; } struct Layout { mapping(bytes32 => RoleData) roles; } bytes32 internal constant DEFAULT_ADMIN_ROLE = 0x00; bytes32 internal constant STORAGE_SLOT = keccak256('solidstate.contracts.storage.AccessControl'); function layout() internal pure returns (Layout storage l) { bytes32 slot = STORAGE_SLOT; assembly { l.slot := slot } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import { IAccessControlInternal } from './IAccessControlInternal.sol'; /** * @title AccessControl interface */ interface IAccessControl is IAccessControlInternal { /* * @notice query whether role is assigned to account * @param role role to query * @param account account to query * @return whether role is assigned to account */ function hasRole( bytes32 role, address account ) external view returns (bool); /* * @notice query admin role for given role * @param role role to query * @return admin role */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /* * @notice assign role to given account * @param role role to assign * @param account recipient of role assignment */ function grantRole(bytes32 role, address account) external; /* * @notice unassign role from given account * @param role role to unassign * @parm account */ function revokeRole(bytes32 role, address account) external; /** * @notice relinquish role * @param role role to relinquish */ function renounceRole(bytes32 role) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @title Partial AccessControl interface needed by internal functions */ interface IAccessControlInternal { event RoleAdminChanged( bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole ); event RoleGranted( bytes32 indexed role, address indexed account, address indexed sender ); event RoleRevoked( bytes32 indexed role, address indexed account, address indexed sender ); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.8; /** * @title Set implementation with enumeration functions * @dev derived from https://github.com/OpenZeppelin/openzeppelin-contracts (MIT license) */ library EnumerableSet { error EnumerableSet__IndexOutOfBounds(); struct Set { bytes32[] _values; // 1-indexed to allow 0 to signify nonexistence mapping(bytes32 => uint256) _indexes; } struct Bytes32Set { Set _inner; } struct AddressSet { Set _inner; } struct UintSet { Set _inner; } function at( Bytes32Set storage set, uint256 index ) internal view returns (bytes32) { return _at(set._inner, index); } function at( AddressSet storage set, uint256 index ) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } function at( UintSet storage set, uint256 index ) internal view returns (uint256) { return uint256(_at(set._inner, index)); } function contains( Bytes32Set storage set, bytes32 value ) internal view returns (bool) { return _contains(set._inner, value); } function contains( AddressSet storage set, address value ) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } function contains( UintSet storage set, uint256 value ) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } function indexOf( Bytes32Set storage set, bytes32 value ) internal view returns (uint256) { return _indexOf(set._inner, value); } function indexOf( AddressSet storage set, address value ) internal view returns (uint256) { return _indexOf(set._inner, bytes32(uint256(uint160(value)))); } function indexOf( UintSet storage set, uint256 value ) internal view returns (uint256) { return _indexOf(set._inner, bytes32(value)); } function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } function add( Bytes32Set storage set, bytes32 value ) internal returns (bool) { return _add(set._inner, value); } function add( AddressSet storage set, address value ) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } function remove( Bytes32Set storage set, bytes32 value ) internal returns (bool) { return _remove(set._inner, value); } function remove( AddressSet storage set, address value ) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } function remove( UintSet storage set, uint256 value ) internal returns (bool) { return _remove(set._inner, bytes32(value)); } function toArray( Bytes32Set storage set ) internal view returns (bytes32[] memory) { return set._inner._values; } function toArray( AddressSet storage set ) internal view returns (address[] memory) { bytes32[] storage values = set._inner._values; address[] storage array; assembly { array.slot := values.slot } return array; } function toArray( UintSet storage set ) internal view returns (uint256[] memory) { bytes32[] storage values = set._inner._values; uint256[] storage array; assembly { array.slot := values.slot } return array; } function _at( Set storage set, uint256 index ) private view returns (bytes32) { if (index >= set._values.length) revert EnumerableSet__IndexOutOfBounds(); return set._values[index]; } function _contains( Set storage set, bytes32 value ) private view returns (bool) { return set._indexes[value] != 0; } function _indexOf( Set storage set, bytes32 value ) private view returns (uint256) { unchecked { return set._indexes[value] - 1; } } function _length(Set storage set) private view returns (uint256) { return set._values.length; } function _add( Set storage set, bytes32 value ) private returns (bool status) { if (!_contains(set, value)) { set._values.push(value); set._indexes[value] = set._values.length; status = true; } } function _remove( Set storage set, bytes32 value ) private returns (bool status) { uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { unchecked { bytes32 last = set._values[set._values.length - 1]; // move last value to now-vacant index set._values[valueIndex - 1] = last; set._indexes[last] = valueIndex; } // clear last index set._values.pop(); delete set._indexes[value]; status = true; } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.8; import { UintUtils } from './UintUtils.sol'; library AddressUtils { using UintUtils for uint256; error AddressUtils__InsufficientBalance(); error AddressUtils__NotContract(); error AddressUtils__SendValueFailed(); function toString(address account) internal pure returns (string memory) { return uint256(uint160(account)).toHexString(20); } function isContract(address account) internal view returns (bool) { uint256 size; assembly { size := extcodesize(account) } return size > 0; } function sendValue(address payable account, uint256 amount) internal { (bool success, ) = account.call{ value: amount }(''); if (!success) revert AddressUtils__SendValueFailed(); } function functionCall( address target, bytes memory data ) internal returns (bytes memory) { return functionCall(target, data, 'AddressUtils: failed low-level call'); } function functionCall( address target, bytes memory data, string memory error ) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, error); } function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue( target, data, value, 'AddressUtils: failed low-level call with value' ); } function functionCallWithValue( address target, bytes memory data, uint256 value, string memory error ) internal returns (bytes memory) { if (value > address(this).balance) revert AddressUtils__InsufficientBalance(); return _functionCallWithValue(target, data, value, error); } /** * @notice execute arbitrary external call with limited gas usage and amount of copied return data * @dev derived from https://github.com/nomad-xyz/ExcessivelySafeCall (MIT License) * @param target recipient of call * @param gasAmount gas allowance for call * @param value native token value to include in call * @param maxCopy maximum number of bytes to copy from return data * @param data encoded call data * @return success whether call is successful * @return returnData copied return data */ function excessivelySafeCall( address target, uint256 gasAmount, uint256 value, uint16 maxCopy, bytes memory data ) internal returns (bool success, bytes memory returnData) { returnData = new bytes(maxCopy); assembly { // execute external call via assembly to avoid automatic copying of return data success := call( gasAmount, target, value, add(data, 0x20), mload(data), 0, 0 ) // determine whether to limit amount of data to copy let toCopy := returndatasize() if gt(toCopy, maxCopy) { toCopy := maxCopy } // store the length of the copied bytes mstore(returnData, toCopy) // copy the bytes from returndata[0:toCopy] returndatacopy(add(returnData, 0x20), 0, toCopy) } } function _functionCallWithValue( address target, bytes memory data, uint256 value, string memory error ) private returns (bytes memory) { if (!isContract(target)) revert AddressUtils__NotContract(); (bool success, bytes memory returnData) = target.call{ value: value }( data ); if (success) { return returnData; } else if (returnData.length > 0) { assembly { let returnData_size := mload(returnData) revert(add(32, returnData), returnData_size) } } else { revert(error); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.8; /** * @title utility functions for uint256 operations * @dev derived from https://github.com/OpenZeppelin/openzeppelin-contracts/ (MIT license) */ library UintUtils { error UintUtils__InsufficientHexLength(); bytes16 private constant HEX_SYMBOLS = '0123456789abcdef'; function add(uint256 a, int256 b) internal pure returns (uint256) { return b < 0 ? sub(a, -b) : a + uint256(b); } function sub(uint256 a, int256 b) internal pure returns (uint256) { return b < 0 ? add(a, -b) : a - uint256(b); } function toString(uint256 value) internal pure returns (string memory) { if (value == 0) { return '0'; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return '0x00'; } uint256 length = 0; for (uint256 temp = value; temp != 0; temp >>= 8) { unchecked { length++; } } return toHexString(value, length); } function toHexString( uint256 value, uint256 length ) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = '0'; buffer[1] = 'x'; unchecked { for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = HEX_SYMBOLS[value & 0xf]; value >>= 4; } } if (value != 0) revert UintUtils__InsufficientHexLength(); return string(buffer); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.8; /************************************************************************* ___ ___ | \/ | ___ | . . | _____ _____ ___ _ _ .-' '-. | |\/| |/ _ \ \ /\ / / __|/ _ \ (.)(.)/ \ | | | | (_) \ V V /\__ \ __/ /@@ ; \_| |_/\___/ \_/\_/ |___/\___| o_\\-mm-......-mm`~~~~~~~~~~~~~~~~` /*************************************************************************/ import "@solidstate/contracts/access/access_control/AccessControl.sol"; import {AccessControlStorage} from "@solidstate/contracts/access/access_control/AccessControlStorage.sol"; import {LibDiamond} from "../libraries/LibDiamond.sol"; import {MOWSE_MINTER_ROLE, MOWSEWEAR_MINTER_ROLE, MOWSE_ADMIN_ROLE, MOWSEWEAR_ADMIN_ROLE, MOWSEGAME_ADMIN_ROLE, MOWSELOOTBOX_MINTER_ROLE, MOWSEJOB_ADMIN_ROLE} from "../libraries/LibStorage.sol"; import "./../libraries/LibStorage.sol"; contract AccessControlFacet is AccessControl { GameStorage internal gs; error MissingAdminRole(string); modifier onlyAdminOrCore() { require( msg.sender == gs.diamondAddress || msg.sender == LibDiamond.contractOwner(), "Only the Core or Admin addresses can perform this action" ); _; } modifier onlyAccessControlAdmin() { if (!_hasRole(AccessControlStorage.DEFAULT_ADMIN_ROLE, msg.sender)) revert MissingAdminRole("Missing Admin role"); _; } function hasAdminRole(address account) external view returns (bool) { return _hasRole(AccessControlStorage.DEFAULT_ADMIN_ROLE, account); } // MowseAdminRole is responsible for facet-to-facet communication function hasMowseAdminRole(address account) external view returns (bool) { return _hasRole(MOWSE_ADMIN_ROLE, account); } function hasMowseMinterRole(address account) external view returns (bool) { return _hasRole(MOWSE_MINTER_ROLE, account); } function hasMowseWearMinterRole(address account) external view returns (bool) { return _hasRole(MOWSEWEAR_MINTER_ROLE, account); } function hasMowseWearAdminRole(address account) external view returns (bool) { return _hasRole(MOWSEWEAR_ADMIN_ROLE, account); } function hasMowseGameAdminRole(address account) external view returns (bool) { return _hasRole(MOWSEGAME_ADMIN_ROLE, account); } function hasMowseLootboxMinterRole(address account) external view returns (bool) { return _hasRole(MOWSELOOTBOX_MINTER_ROLE, account); } function hasMowseJobAdminRole(address account) external view returns (bool) { return _hasRole(MOWSEJOB_ADMIN_ROLE, account); } // Grant function addAccountToAdminRole(address account) external onlyAdminOrCore { _grantRole(AccessControlStorage.DEFAULT_ADMIN_ROLE, account); } function addAccountToMowseAdminRole(address account) external onlyAccessControlAdmin { _grantRole(MOWSE_ADMIN_ROLE, account); } function addAccountToMowseMinterRole(address account) external onlyAccessControlAdmin { _grantRole(MOWSE_MINTER_ROLE, account); } function addAccountToMowseWearMinterRole(address account) external onlyAccessControlAdmin { _grantRole(MOWSEWEAR_MINTER_ROLE, account); } function addAccountToMowseWearAdminRole(address account) external onlyAccessControlAdmin { _grantRole(MOWSEWEAR_ADMIN_ROLE, account); } function addAccountToMowseGameAdminRole(address account) external onlyAccessControlAdmin { _grantRole(MOWSEGAME_ADMIN_ROLE, account); } function addAccountToMowseLootboxMinterRole(address account) external onlyAccessControlAdmin { _grantRole(MOWSELOOTBOX_MINTER_ROLE, account); } function addAccountToMowseJobAdminRole(address account) external onlyAccessControlAdmin { _grantRole(MOWSEJOB_ADMIN_ROLE, account); } // Revoke function revokeAccountToMowseAdminRole(address account) external onlyAccessControlAdmin { _revokeRole(MOWSE_ADMIN_ROLE, account); } function revokeAccountToMowseMinterRole(address account) external onlyAccessControlAdmin { _revokeRole(MOWSE_MINTER_ROLE, account); } function revokeAccountToMowseWearMinterRole(address account) external onlyAccessControlAdmin { _revokeRole(MOWSEWEAR_MINTER_ROLE, account); } function revokeAccountToMowseWearAdminRole(address account) external onlyAccessControlAdmin { _revokeRole(MOWSEWEAR_ADMIN_ROLE, account); } function revokeAccountToMowseGameAdminRole(address account) external onlyAccessControlAdmin { _revokeRole(MOWSEGAME_ADMIN_ROLE, account); } function revokeAccountToMowseLootboxMinterRole(address account) external onlyAccessControlAdmin { _revokeRole(MOWSELOOTBOX_MINTER_ROLE, account); } function revokeAccountToMowseJobAdminRole(address account) external onlyAccessControlAdmin { _revokeRole(MOWSEJOB_ADMIN_ROLE, account); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /******************************************************************************\ * Author: Nick Mudge <[email protected]> (https://twitter.com/mudgen) * EIP-2535 Diamonds: https://eips.ethereum.org/EIPS/eip-2535 /******************************************************************************/ interface IDiamondCut { enum FacetCutAction {Add, Replace, Remove} // Add=0, Replace=1, Remove=2 struct FacetCut { address facetAddress; FacetCutAction action; bytes4[] functionSelectors; } /// @notice Add/replace/remove any number of functions and optionally execute /// a function with delegatecall /// @param _diamondCut Contains the facet addresses and function selectors /// @param _init The address of the contract or facet to execute _calldata /// @param _calldata A function call, including function selector and arguments /// _calldata is executed with delegatecall on _init function diamondCut( FacetCut[] calldata _diamondCut, address _init, bytes calldata _calldata ) external; event DiamondCut(FacetCut[] _diamondCut, address _init, bytes _calldata); }
// SPDX-License-Identifier: MIT // Credit https://github.com/derekchiang/loot-name/blob/main/contracts/LootName.sol pragma solidity ^0.8.12; /// [MIT License] /// @title Base64 /// @notice Provides a function for encoding some bytes in base64 /// @author Brecht Devos <[email protected]> library Base64 { bytes internal constant TABLE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; /// @notice Encodes some bytes to the base64 representation function encode(bytes memory data) internal pure returns (string memory) { uint256 len = data.length; if (len == 0) return ''; // multiply by 4/3 rounded up uint256 encodedLen = 4 * ((len + 2) / 3); // Add some extra buffer at the end bytes memory result = new bytes(encodedLen + 32); bytes memory table = TABLE; assembly { let tablePtr := add(table, 1) let resultPtr := add(result, 32) for { let i := 0 } lt(i, len) { } { i := add(i, 3) let input := and(mload(add(data, i)), 0xffffff) let out := mload(add(tablePtr, and(shr(18, input), 0x3F))) out := shl(8, out) out := add(out, and(mload(add(tablePtr, and(shr(12, input), 0x3F))), 0xFF)) out := shl(8, out) out := add(out, and(mload(add(tablePtr, and(shr(6, input), 0x3F))), 0xFF)) out := shl(8, out) out := add(out, and(mload(add(tablePtr, and(input, 0x3F))), 0xFF)) out := shl(224, out) mstore(resultPtr, out) resultPtr := add(resultPtr, 4) } switch mod(len, 3) case 1 { mstore(sub(resultPtr, 2), shl(240, 0x3d3d)) } case 2 { mstore(sub(resultPtr, 1), shl(248, 0x3d)) } mstore(result, encodedLen) } return string(result); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /******************************************************************************\ * Author: Nick Mudge <[email protected]> (https://twitter.com/mudgen) * EIP-2535 Diamonds: https://eips.ethereum.org/EIPS/eip-2535 /******************************************************************************/ import { IDiamondCut } from "../interfaces/IDiamondCut.sol"; // Remember to add the loupe functions from DiamondLoupeFacet to the diamond. // The loupe functions are required by the EIP2535 Diamonds standard error InitializationFunctionReverted(address _initializationContractAddress, bytes _calldata); library LibDiamond { bytes32 constant DIAMOND_STORAGE_POSITION = keccak256("diamond.standard.diamond.storage"); struct FacetAddressAndPosition { address facetAddress; uint96 functionSelectorPosition; // position in facetFunctionSelectors.functionSelectors array } struct FacetFunctionSelectors { bytes4[] functionSelectors; uint256 facetAddressPosition; // position of facetAddress in facetAddresses array } struct DiamondStorage { // maps function selector to the facet address and // the position of the selector in the facetFunctionSelectors.selectors array mapping(bytes4 => FacetAddressAndPosition) selectorToFacetAndPosition; // maps facet addresses to function selectors mapping(address => FacetFunctionSelectors) facetFunctionSelectors; // facet addresses address[] facetAddresses; // Used to query if a contract implements an interface. // Used to implement ERC-165. mapping(bytes4 => bool) supportedInterfaces; // owner of the contract address contractOwner; } function diamondStorage() internal pure returns (DiamondStorage storage ds) { bytes32 position = DIAMOND_STORAGE_POSITION; assembly { ds.slot := position } } event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); function setContractOwner(address _newOwner) internal { DiamondStorage storage ds = diamondStorage(); address previousOwner = ds.contractOwner; ds.contractOwner = _newOwner; emit OwnershipTransferred(previousOwner, _newOwner); } function contractOwner() internal view returns (address contractOwner_) { contractOwner_ = diamondStorage().contractOwner; } function enforceIsContractOwner() internal view { require(msg.sender == diamondStorage().contractOwner, "LibDiamond: Must be contract owner"); } event DiamondCut(IDiamondCut.FacetCut[] _diamondCut, address _init, bytes _calldata); // Internal function version of diamondCut function diamondCut( IDiamondCut.FacetCut[] memory _diamondCut, address _init, bytes memory _calldata ) internal { for (uint256 facetIndex; facetIndex < _diamondCut.length; facetIndex++) { IDiamondCut.FacetCutAction action = _diamondCut[facetIndex].action; if (action == IDiamondCut.FacetCutAction.Add) { addFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors); } else if (action == IDiamondCut.FacetCutAction.Replace) { replaceFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors); } else if (action == IDiamondCut.FacetCutAction.Remove) { removeFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors); } else { revert("LibDiamondCut: Incorrect FacetCutAction"); } } emit DiamondCut(_diamondCut, _init, _calldata); initializeDiamondCut(_init, _calldata); } function addFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal { require(_functionSelectors.length > 0, "LibDiamondCut: No selectors in facet to cut"); DiamondStorage storage ds = diamondStorage(); require(_facetAddress != address(0), "LibDiamondCut: Add facet can't be address(0)"); uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length); // add new facet address if it does not exist if (selectorPosition == 0) { addFacet(ds, _facetAddress); } for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) { bytes4 selector = _functionSelectors[selectorIndex]; address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress; require(oldFacetAddress == address(0), "LibDiamondCut: Can't add function that already exists"); addFunction(ds, selector, selectorPosition, _facetAddress); selectorPosition++; } } function replaceFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal { require(_functionSelectors.length > 0, "LibDiamondCut: No selectors in facet to cut"); DiamondStorage storage ds = diamondStorage(); require(_facetAddress != address(0), "LibDiamondCut: Add facet can't be address(0)"); uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length); // add new facet address if it does not exist if (selectorPosition == 0) { addFacet(ds, _facetAddress); } for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) { bytes4 selector = _functionSelectors[selectorIndex]; address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress; require(oldFacetAddress != _facetAddress, "LibDiamondCut: Can't replace function with same function"); removeFunction(ds, oldFacetAddress, selector); addFunction(ds, selector, selectorPosition, _facetAddress); selectorPosition++; } } function removeFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal { require(_functionSelectors.length > 0, "LibDiamondCut: No selectors in facet to cut"); DiamondStorage storage ds = diamondStorage(); // if function does not exist then do nothing and return require(_facetAddress == address(0), "LibDiamondCut: Remove facet address must be address(0)"); for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) { bytes4 selector = _functionSelectors[selectorIndex]; address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress; removeFunction(ds, oldFacetAddress, selector); } } function addFacet(DiamondStorage storage ds, address _facetAddress) internal { enforceHasContractCode(_facetAddress, "LibDiamondCut: New facet has no code"); ds.facetFunctionSelectors[_facetAddress].facetAddressPosition = ds.facetAddresses.length; ds.facetAddresses.push(_facetAddress); } function addFunction(DiamondStorage storage ds, bytes4 _selector, uint96 _selectorPosition, address _facetAddress) internal { ds.selectorToFacetAndPosition[_selector].functionSelectorPosition = _selectorPosition; ds.facetFunctionSelectors[_facetAddress].functionSelectors.push(_selector); ds.selectorToFacetAndPosition[_selector].facetAddress = _facetAddress; } function removeFunction(DiamondStorage storage ds, address _facetAddress, bytes4 _selector) internal { require(_facetAddress != address(0), "LibDiamondCut: Can't remove function that doesn't exist"); // an immutable function is a function defined directly in a diamond require(_facetAddress != address(this), "LibDiamondCut: Can't remove immutable function"); // replace selector with last selector, then delete last selector uint256 selectorPosition = ds.selectorToFacetAndPosition[_selector].functionSelectorPosition; uint256 lastSelectorPosition = ds.facetFunctionSelectors[_facetAddress].functionSelectors.length - 1; // if not the same then replace _selector with lastSelector if (selectorPosition != lastSelectorPosition) { bytes4 lastSelector = ds.facetFunctionSelectors[_facetAddress].functionSelectors[lastSelectorPosition]; ds.facetFunctionSelectors[_facetAddress].functionSelectors[selectorPosition] = lastSelector; ds.selectorToFacetAndPosition[lastSelector].functionSelectorPosition = uint96(selectorPosition); } // delete the last selector ds.facetFunctionSelectors[_facetAddress].functionSelectors.pop(); delete ds.selectorToFacetAndPosition[_selector]; // if no more selectors for facet address then delete the facet address if (lastSelectorPosition == 0) { // replace facet address with last facet address and delete last facet address uint256 lastFacetAddressPosition = ds.facetAddresses.length - 1; uint256 facetAddressPosition = ds.facetFunctionSelectors[_facetAddress].facetAddressPosition; if (facetAddressPosition != lastFacetAddressPosition) { address lastFacetAddress = ds.facetAddresses[lastFacetAddressPosition]; ds.facetAddresses[facetAddressPosition] = lastFacetAddress; ds.facetFunctionSelectors[lastFacetAddress].facetAddressPosition = facetAddressPosition; } ds.facetAddresses.pop(); delete ds.facetFunctionSelectors[_facetAddress].facetAddressPosition; } } function initializeDiamondCut(address _init, bytes memory _calldata) internal { if (_init == address(0)) { return; } enforceHasContractCode(_init, "LibDiamondCut: _init address has no code"); (bool success, bytes memory error) = _init.delegatecall(_calldata); if (!success) { if (error.length > 0) { // bubble up error /// @solidity memory-safe-assembly assembly { let returndata_size := mload(error) revert(add(32, error), returndata_size) } } else { revert InitializationFunctionReverted(_init, _calldata); } } } function enforceHasContractCode(address _contract, string memory _errorMessage) internal view { uint256 contractSize; assembly { contractSize := extcodesize(_contract) } require(contractSize > 0, _errorMessage); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.12; import "hardhat/console.sol"; import { MowseDungeonSimplePlayer, MowseDungeonSimpleMonster, MowseDungeonBattleSimulation, MowseDungeonBattleLog, MowseDungeonBattleLogTypeEnum, MowseDungeonBattleLogSourceEnum } from "../libraries/LibStorage.sol"; library LibDungeon { function _int32ToUint256(int32 _stat) internal pure returns (uint256) { return uint256(int256(_stat)); } function getNewSeed(uint256 seed, uint256 newSeed) internal pure returns (uint256) { return uint256(keccak256(abi.encodePacked(seed, newSeed))); } function updateNewSeed(uint256 seed, uint256 newSeed) internal pure returns (uint256) { if (newSeed >> 2 == 0) { newSeed = getNewSeed(seed, newSeed); } else { newSeed >>= 2; } return newSeed; } function _damageShieldAndHealth(uint256 _damage, uint256 _enemyHealth, uint256 _enemyShield) internal pure returns (uint256, uint256) { if (_damage > _enemyShield) { if (_damage - _enemyShield > _enemyHealth) { _enemyHealth = 0; } else { _enemyHealth = _enemyHealth - (_damage - _enemyShield); } _enemyShield = 0; } else { _enemyShield = _enemyShield - _damage; } return (_enemyHealth, _enemyShield); } // For true damage/pierce attacks function _damageHealth(uint256 _damage, uint256 _enemyHealth) internal pure returns (uint256) { if (_damage > _enemyHealth) { return 0; } else { return _enemyHealth - _damage; } } function _checkPlayerRevive(MowseDungeonSimplePlayer memory _player) internal pure returns (MowseDungeonSimplePlayer memory) { // Check if player has died if (_player.currentHealth == 0) { // Revive if (_player.statusEffects.revive > 0) { _player.currentHealth = _player.maxHealth; _player.statusEffects.revive = 0; } // LAST_HOPE if (_player.statusEffects.lastHope > 0) { _player.currentHealth = 1; _player.statusEffects.lastHope = 0; } } return _player; } function _checkMonsterRevive(MowseDungeonSimpleMonster memory _monster) internal pure returns (MowseDungeonSimpleMonster memory) { // Check if monster has died if (_monster.currentHealth == 0) { // Revive if (_monster.statusEffects.revive > 0) { _monster.currentHealth = _monster.maxHealth; _monster.statusEffects.revive = 0; } // LAST_HOPE if (_monster.statusEffects.lastHope > 0) { _monster.currentHealth = 1; _monster.statusEffects.lastHope = 0; } } return _monster; } function _applyStatusEffectsFromTrinketsToMonster( MowseDungeonBattleSimulation memory _battleSimulation, MowseDungeonSimpleMonster memory _monster, uint256 _monsterIndex ) internal pure returns (MowseDungeonBattleSimulation memory, MowseDungeonSimpleMonster memory) { if (_battleSimulation.player.trinkets.poisonDab > 0) { if (_monster.statusEffects.poisonResist == 0) { _monster.statusEffects.poison += _battleSimulation.player.trinkets.poisonDab * (_battleSimulation.player.statusEffects.doubleUp + 1); _battleSimulation = _addToBattleLogForMonsterIndex(_battleSimulation, _monsterIndex, MowseDungeonBattleLogTypeEnum.APPLY_STATUS_EFFECT, MowseDungeonBattleLogSourceEnum.STATUS_EFFECT_POISON, _battleSimulation.player.trinkets.poisonDab * (_battleSimulation.player.statusEffects.doubleUp + 1)); } } if (_battleSimulation.player.trinkets.kindle > 0) { if (_monster.statusEffects.fireResist == 0) { _monster.statusEffects.burn += _battleSimulation.player.trinkets.kindle * (_battleSimulation.player.statusEffects.doubleUp + 1); _battleSimulation = _addToBattleLogForMonsterIndex(_battleSimulation, _monsterIndex, MowseDungeonBattleLogTypeEnum.APPLY_STATUS_EFFECT, MowseDungeonBattleLogSourceEnum.STATUS_EFFECT_BURN, _battleSimulation.player.trinkets.kindle * (_battleSimulation.player.statusEffects.doubleUp + 1)); } } if (_battleSimulation.player.trinkets.bloodLetter > 0) { _monster.statusEffects.bleed += _battleSimulation.player.trinkets.bloodLetter * (_battleSimulation.player.statusEffects.doubleUp + 1); _battleSimulation = _addToBattleLogForMonsterIndex(_battleSimulation, _monsterIndex, MowseDungeonBattleLogTypeEnum.APPLY_STATUS_EFFECT, MowseDungeonBattleLogSourceEnum.STATUS_EFFECT_BLEED, _battleSimulation.player.trinkets.bloodLetter * (_battleSimulation.player.statusEffects.doubleUp + 1)); } if (_battleSimulation.player.trinkets.cursedRing > 0) { _monster.statusEffects.curse += _battleSimulation.player.trinkets.cursedRing * (_battleSimulation.player.statusEffects.doubleUp + 1); _battleSimulation = _addToBattleLogForMonsterIndex(_battleSimulation, _monsterIndex, MowseDungeonBattleLogTypeEnum.APPLY_STATUS_EFFECT, MowseDungeonBattleLogSourceEnum.STATUS_EFFECT_CURSE, _battleSimulation.player.trinkets.cursedRing * (_battleSimulation.player.statusEffects.doubleUp + 1)); } if (_battleSimulation.player.trinkets.stunRod > 0) { if (_monster.statusEffects.stunResist == 0 && _monster.statusEffects.unstoppable == 0 && _monster.isBoss == false) { _battleSimulation.seed = updateNewSeed(_battleSimulation.dungeonId, _battleSimulation.seed); if (_battleSimulation.seed % 100 < 20 + _battleSimulation.player.trinkets.stunRod * 20) { _monster.statusEffects.stun++; _battleSimulation = _addToBattleLogForMonsterIndex(_battleSimulation, _monsterIndex, MowseDungeonBattleLogTypeEnum.APPLY_STATUS_EFFECT, MowseDungeonBattleLogSourceEnum.STATUS_EFFECT_STUN, 1); } } } if (_battleSimulation.player.trinkets.silenceBell > 0) { if (_monster.statusEffects.unstoppable == 0 && _monster.isBoss == false) { _battleSimulation.seed = updateNewSeed(_battleSimulation.dungeonId, _battleSimulation.seed); if (_battleSimulation.seed % 100 < 20 + _battleSimulation.player.trinkets.silenceBell * 20) { _monster.statusEffects.silence++; _battleSimulation = _addToBattleLogForMonsterIndex(_battleSimulation, _monsterIndex, MowseDungeonBattleLogTypeEnum.APPLY_STATUS_EFFECT, MowseDungeonBattleLogSourceEnum.STATUS_EFFECT_SILENCE, 1); } } } if (_battleSimulation.player.trinkets.strengthBelt > 0) { _battleSimulation.player.statusEffects.strengthen += _battleSimulation.player.trinkets.strengthBelt * (_battleSimulation.player.statusEffects.doubleUp + 1); _battleSimulation = _addToBattleLogForMonsterIndex(_battleSimulation, _monsterIndex, MowseDungeonBattleLogTypeEnum.APPLY_STATUS_EFFECT, MowseDungeonBattleLogSourceEnum.STATUS_EFFECT_STRENGTHEN, _battleSimulation.player.trinkets.strengthBelt * (_battleSimulation.player.statusEffects.doubleUp + 1)); } if (_battleSimulation.player.trinkets.weakenedChain > 0) { _monster.statusEffects.weaken += _battleSimulation.player.trinkets.weakenedChain * (_battleSimulation.player.statusEffects.doubleUp + 1); _battleSimulation = _addToBattleLogForMonsterIndex(_battleSimulation, _monsterIndex, MowseDungeonBattleLogTypeEnum.APPLY_STATUS_EFFECT, MowseDungeonBattleLogSourceEnum.STATUS_EFFECT_WEAKEN, _battleSimulation.player.trinkets.weakenedChain * (_battleSimulation.player.statusEffects.doubleUp + 1)); } if (_battleSimulation.player.trinkets.leech > 0) { _battleSimulation.player.currentHealth += ((_battleSimulation.player.tempAttack * (10 * _battleSimulation.player.trinkets.leech)) / 100) * (_battleSimulation.player.statusEffects.doubleUp + 1); _battleSimulation = _addToBattleLog(_battleSimulation, MowseDungeonBattleLogTypeEnum.HEAL, MowseDungeonBattleLogSourceEnum.TRINKET_LEECH, MowseDungeonBattleLogSourceEnum.PLAYER, ((_battleSimulation.player.tempAttack * (10 * _battleSimulation.player.trinkets.leech)) / 100) * (_battleSimulation.player.statusEffects.doubleUp + 1)); // Make sure health doesn't exceed maxHealth if (_battleSimulation.player.currentHealth > _battleSimulation.player.maxHealth) { _battleSimulation.player.currentHealth = _battleSimulation.player.maxHealth; } _battleSimulation.achievementProgress.healthHealed += ((_battleSimulation.player.tempAttack * (10 * _battleSimulation.player.trinkets.leech)) / 100) * (_battleSimulation.player.statusEffects.doubleUp + 1); } return (_battleSimulation, _monster); } function _monsterRetaliate( MowseDungeonBattleSimulation memory _battleSimulation, MowseDungeonSimpleMonster memory _monster, uint256 _monsterIndex ) internal pure returns (MowseDungeonBattleSimulation memory) { if (_monster.statusEffects.counter > 0) { (_battleSimulation.player.currentHealth, _battleSimulation.player.shield) = _damageShieldAndHealth( _monster.attack, _battleSimulation.player.currentHealth, _battleSimulation.player.shield ); _battleSimulation.achievementProgress.damageTaken += _monster.attack; _battleSimulation = _addToBattleLogForPlayerFromMonsterIndex(_battleSimulation, _monsterIndex, MowseDungeonBattleLogTypeEnum.DAMAGE, _monster.attack); _battleSimulation.player = _checkPlayerRevive(_battleSimulation.player); } if (_monster.statusEffects.thorns > 0) { (_battleSimulation.player.currentHealth, _battleSimulation.player.shield) = _damageShieldAndHealth( 5 * _monster.statusEffects.thorns, _battleSimulation.player.currentHealth, _battleSimulation.player.shield ); _battleSimulation.achievementProgress.damageTaken += 5 * _monster.statusEffects.thorns; _battleSimulation = _addToBattleLog(_battleSimulation, MowseDungeonBattleLogTypeEnum.DAMAGE, MowseDungeonBattleLogSourceEnum.STATUS_EFFECT_THORNS, MowseDungeonBattleLogSourceEnum.PLAYER, 5 * _monster.statusEffects.thorns); _battleSimulation.player = _checkPlayerRevive(_battleSimulation.player); } if (_monster.statusEffects.wrathfulReprisal > 0) { (_battleSimulation.player.currentHealth, _battleSimulation.player.shield) = _damageShieldAndHealth( _battleSimulation.player.attack, _battleSimulation.player.currentHealth, _battleSimulation.player.shield ); _battleSimulation = _addToBattleLog(_battleSimulation, MowseDungeonBattleLogTypeEnum.DAMAGE, MowseDungeonBattleLogSourceEnum.STATUS_EFFECT_WRATHFUL_REPRISAL, MowseDungeonBattleLogSourceEnum.PLAYER, _battleSimulation.player.attack); _battleSimulation.achievementProgress.damageTaken += _battleSimulation.player.attack; _battleSimulation.player = _checkPlayerRevive(_battleSimulation.player); } return _battleSimulation; } function _dealPlayerDamageToMonster(MowseDungeonBattleSimulation memory _battleSimulation, MowseDungeonSimpleMonster memory _monster, uint256 _monsterIndex) internal pure returns (MowseDungeonBattleSimulation memory, MowseDungeonSimpleMonster memory) { if (_monster.statusEffects.invincible == 0) { if (_battleSimulation.player.statusEffects.pierce > 0) { _monster.currentHealth = _damageHealth(_battleSimulation.player.tempAttack, _monster.currentHealth); } else { (_monster.currentHealth, _monster.shield) = _damageShieldAndHealth( _battleSimulation.player.tempAttack, _monster.currentHealth, _monster.shield ); } _battleSimulation = _addToBattleLogForMonsterIndex(_battleSimulation, _monsterIndex, MowseDungeonBattleLogTypeEnum.DAMAGE, MowseDungeonBattleLogSourceEnum.PLAYER, _battleSimulation.player.tempAttack); _battleSimulation.achievementProgress.damageDealt += _battleSimulation.player.tempAttack; _monster = _checkMonsterRevive(_monster); } (_battleSimulation, _monster) = _applyStatusEffectsFromTrinketsToMonster(_battleSimulation, _monster, _monsterIndex); if (_monster.currentHealth > 0) { _battleSimulation = _monsterRetaliate(_battleSimulation, _monster, _monsterIndex); } return (_battleSimulation, _monster); } function _addToBattleLogForMonsterIndex(MowseDungeonBattleSimulation memory _battleSimulation, uint256 _monsterIndex, MowseDungeonBattleLogTypeEnum _logType, MowseDungeonBattleLogSourceEnum _source, uint256 _amount) internal pure returns (MowseDungeonBattleSimulation memory) { if (_monsterIndex == 0) { _battleSimulation = _addToBattleLog(_battleSimulation, _logType, _source, MowseDungeonBattleLogSourceEnum.MONSTER_1, _amount); } else if (_monsterIndex == 1) { _battleSimulation = _addToBattleLog(_battleSimulation, _logType, _source, MowseDungeonBattleLogSourceEnum.MONSTER_2, _amount); } else { _battleSimulation = _addToBattleLog(_battleSimulation, _logType, _source, MowseDungeonBattleLogSourceEnum.MONSTER_3, _amount); } return _battleSimulation; } function _addToBattleLogForPlayerFromMonsterIndex(MowseDungeonBattleSimulation memory _battleSimulation, uint256 _monsterIndex, MowseDungeonBattleLogTypeEnum _logType, uint256 _amount) internal pure returns (MowseDungeonBattleSimulation memory) { if (_monsterIndex == 0) { _battleSimulation = _addToBattleLog(_battleSimulation, _logType, MowseDungeonBattleLogSourceEnum.MONSTER_1, MowseDungeonBattleLogSourceEnum.PLAYER, _amount); } else if (_monsterIndex == 1) { _battleSimulation = _addToBattleLog(_battleSimulation, _logType, MowseDungeonBattleLogSourceEnum.MONSTER_2, MowseDungeonBattleLogSourceEnum.PLAYER, _amount); } else { _battleSimulation = _addToBattleLog(_battleSimulation, _logType, MowseDungeonBattleLogSourceEnum.MONSTER_3, MowseDungeonBattleLogSourceEnum.PLAYER, _amount); } return _battleSimulation; } function _addStatusEffectToBattleLogForPlayer(MowseDungeonBattleSimulation memory _battleSimulation, MowseDungeonBattleLogSourceEnum _source, uint256 _amount) internal pure returns (MowseDungeonBattleSimulation memory) { _battleSimulation = _addToBattleLog(_battleSimulation, MowseDungeonBattleLogTypeEnum.APPLY_STATUS_EFFECT, _source, MowseDungeonBattleLogSourceEnum.PLAYER, _amount); return _battleSimulation; } function _addToBattleLog(MowseDungeonBattleSimulation memory _battleSimulation, MowseDungeonBattleLogTypeEnum _logType, MowseDungeonBattleLogSourceEnum _source, MowseDungeonBattleLogSourceEnum _target, uint256 _amount) internal pure returns (MowseDungeonBattleSimulation memory) { if (_battleSimulation.battleLogCount >= 100) return _battleSimulation; _battleSimulation.battleLog[_battleSimulation.battleLogCount++] = (MowseDungeonBattleLog({logType: _logType, source: _source, target: _target, amount: _amount})); return _battleSimulation; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import { LibDiamond } from "./LibDiamond.sol"; uint256 constant SKILL_TYPE_NUM = 7; uint256 constant STAT_CHARISMA = 0; uint256 constant STAT_CONSTITUTION = 1; uint256 constant STAT_DEXTERITY = 2; uint256 constant STAT_INTELLIGENCE = 3; uint256 constant STAT_LUCK = 4; uint256 constant STAT_STRENGTH = 5; uint256 constant STAT_WISDOM = 6; uint256 constant EQUIPPED_WEARABLE_SLOTS = 12; bytes32 constant MOWSE_ADMIN_ROLE = keccak256('MOWSE_ADMIN_ROLE'); bytes32 constant MOWSEWEAR_MINTER_ROLE = keccak256('MOWSEWEAR_MINTER_ROLE'); bytes32 constant MOWSE_MINTER_ROLE = keccak256('MOWSE_MINTER_ROLE'); bytes32 constant MOWSEWEAR_ADMIN_ROLE = keccak256('MOWSEWEAR_ADMIN_ROLE'); bytes32 constant MOWSEGAME_ADMIN_ROLE = keccak256('MOWSEGAME_ADMIN_ROLE'); bytes32 constant MOWSEBANK_CREATE2_SALT = keccak256('MOWSEBANK_CREATE2_SALT'); bytes32 constant MOWSELOOTBOX_MINTER_ROLE = keccak256('MOWSELOOTBOX_MINTER_ROLE'); bytes32 constant MOWSEJOB_ADMIN_ROLE = keccak256('MOWSEJOB_ADMIN_ROLE'); struct GameStorage { address diamondAddress; address mowseAvatarContractAddress; address mowseGoldContractAddress; address mowseBankContractAddress; address mowseLootboxContractAddress; bool paused; // Mowse = id > 10,000 uint256 mowseMintPrice; uint256 mowseTokenIdCounter; // Current tokenId of Mowse for minting purposes uint256 mowseWearTotalCount; // Total Count of MowseWear minted uint256 mowseWearTokenIdCounter; // Current tokenId of MowseWear for minting purposes mapping(address => bool) isMowse; // maps Mowse address to bool if it is a mowse address or not mapping(address => uint256) mainMowse; // map address to mowseTokenId mapping(uint256 => Mowse) mowses; // map mowseAvatar tokenId to Mowse struct mapping(uint256 => MowseWear) mowsewears; // map mowsewear tokenId to MowseWear struct // mapping(uint256 => MowseLineage) mowselineages; mapping(uint8 => mapping(uint16 => MowseWearMetadata)) mowseWearDictionary; // map equippable wearable slot index to dictionary index to get unique mowsewear mapping(uint256 => MowseWearMetadata) mowseWearDictionaryByDictionaryIndex; // map dictionary index to mowsewear (for lootbox) uint256 mowseWearDictionaryCount; // Counts how many items are in the mowseWearDictionary (for lootbox) uint16[EQUIPPED_WEARABLE_SLOTS] mowseWearDictionaryTraitCount; // count of each trait (11 shirts, 10 eyeWear, etc), used for incrementing next traitIndex mapping(uint8 => mapping(uint16 => uint256)) mowseWearCountByTraitIndex; // Counts how many mowsewear are minted per traitIndex (3 Blue Headbands) mapping(uint8 => uint256) mowseWearCountByTraitType; // Counts how many shirts were minted mapping(uint16 => string) possibleTraitTypes; // mapping of all possible traitTypes to strings string[] initTraitNames; // used in DiamondInit // MowseWear uint256 mowseWearHemPrice; // Initial merkel MGOLD aidrop // mapping(address => uint256) initialMowseGoldClaimList; // Used for merkel airdrop // MowseLootbox // lootbox index is the loot pool index; [0-11] are trait type specific, [12] is general pool, 13+ are any other specific pools (weekly chests or seasonal chests) mapping(uint64 => MowseLootboxPool) mowselootboxes; // map lootbox index (traitType + a few more) to MowseLootbox // count of current lootbox index uint64 mowseLootboxIndexCount; // Current tokenId of MowseLootbox for minting purposes uint256 mowseLootboxTokenIdCounter; // map tokenId to LootboxIndex to get the lootbox data mapping(uint256 => uint64) mowseLootboxIndexByTokenId; // large prime used for VDF uint256 mowseLootboxPrime; // iterations for VDF uint256 mowseLootboxIterations; // nonce for VDF uint256 mowseLootboxNonce; // mapping to get seed from tokenId if minted through mowseLootbox mapping(uint256 => uint256) mowseLootboxTokenIdToSeed; // random seed for pseudo-rng uint256 mowsePrngSeed; uint256 mowseJobPrngSeed; uint256 mowseWearPrngSeed; uint256 prngNonce; // DonationTree uint256 totalWishCount; uint256 donationTreePrime; uint256 donationTreeIterations; uint256 donationTreeNonce; mapping(uint256 => uint256) donationTreeWishCountToSeed; mapping(uint256 => uint256) mowseNextWish; mapping(address => uint256) nextWish; mapping(address => uint256) wishCount; // MowseGame mapping(uint256 => MowseGames) mowsegames; uint256 mowseGamesCount; uint256 activeMowseGamesCount; // Needed mapping(string => uint256) getMowseGameByName; uint8 maxFreeGameSubmits; // Normal base token payout uint256 baseGamePayout; // Pay for users' gas but it ain't free yo. After x number of submits, purchase MowseGold to continue forever mapping(address => uint256) freeMowseGameSubmits; mapping(address => bool) hasPurchasedMowseGold; // For suspicious gaming activity, temporary ban mapping(address => bool) mowseGameUserBanned; // MowseBank and MowseWallet address mowseBankWalletImplementation; mapping(address => uint256) mowseBankBalances; mapping(address => uint256) mowseBankTokenIdForWallet; // Withdrawal address payable devRoyaltyAddress; address payable teamAddress; address payable backendAddress; address payable treasuryAddress; uint256 devRoyaltyTaxBasisPoints; uint256 teamTaxBasisPoints; uint256 backendTaxBasisPoints; uint256 developerTaxBasisPoints; // For testnet purposes and rewarding testers uint256 testPatchCount; mapping(uint256 => TestPatch) testPatches; // Maps patchVersion to testPatch // GatherAndGarnishFacet uint256 gatherGarnishPrngSeed; uint256 gatherGarnishSeasonStart; uint256 gatherGarnishSeasonEnd; uint256 gatherGarnishSeasonCount; // Maps season count -> season reward (mowse wear dictionary index) mapping(uint256 => uint256) gatherGarnishSeasonReward; // MowseWearDictionaryIndex // Maps player address -> season count -> stats mapping(address => mapping(uint256 => GatherAndGarnishPlayerStats)) gatherGarnishPlayerStats; // What day index did the first winner win uint256 gatherGarnishDayOfFirstWinner; // Maps season count -> first winners count index -> player address for season first winners mapping(uint256 => mapping(uint256 => address)) gatherGarnishSeasonFirstWinners; uint256 gatherGarnishSeasonFirstWinnersCount; // Maps season count -> winners count index -> player address for season winners mapping(uint256 => mapping(uint256 => address)) gatherGarnishSeasonWinners; uint256 gatherGarnishSeasonWinnersCount; // Maps season count -> winners address -> bool if they have won and claimed their rewards mapping(uint256 => mapping(address => bool)) gatherGarnishClaimedRewards; // Maps season count -> mainMowseId -> bool if the mowseId has received rewards for this season (to prevent transferring main mowse and claiming multiple exp rewards) mapping(uint256 => mapping(uint256 => bool)) gatherGarnishMainMowseClaimedRewards; // Maps season count -> winners address -> bool if they have won mapping(uint256 => mapping(address => bool)) gatherGarnishHasPlayerWon; // Maps season count -> day index -> scavenge hunt count mapping(uint256 => mapping(uint256 => GatherAndGarnishScavenge)) gatherGarnishScavenge; // Maps season count -> day index -> resource type [1-4, wood/rock/gem/food] mapping(uint256 => mapping(uint256 => uint256)) gatherGarnishDailyResource; // Maps season count -> day index -> investment resource type [1-4] mapping(uint256 => mapping(uint256 => uint256)) gatherGarnishInvestmentResource; // Maps season count -> pointsStructureCost mapping(uint256 => uint256[4]) gatherGarnishFirstPointsStructureCost; mapping(uint256 => uint256[4]) gatherGarnishSecondPointsStructureCost; mapping(uint256 => uint256[4]) gatherGarnishThirdPointsStructureCost; // MowseDungeonFacet uint256 statusEffectCount; // VDF for initial dungeon hash uint256 mowseDungeonPrime; uint256 mowseDungeonIterations; uint256 mowseDungeonNonce; // pRNG for smaller pseudo random actions uint256 mowseDungeonPrngSeed; // Maps mowseTokenId -> dungeonRunCount -> MowseDungeon mapping(uint256 => mapping(uint256 => MowseDungeon)) mowsedungeons; // Maps monsterIdCount -> mapping of statusEffects mapping(uint256 => mapping(MowseDungeonStatusEffectEnum => uint256)) mowseDungeonMonsterStatusEffects; // Count of Monster Ids // uint256 mowseDungeonMonsterIdCount; // Maps roomId -> MowseDungeonRoom // mapping(uint256 => MowseDungeonRoom) mowseDungeonRoom; // Count of rooms // uint256 mowseDungeonRoomCount; // Maps mowseTokenId -> Current Player stats mapping(uint256 => MowseDungeonPlayer) mowseDungeonPlayer; // Maps mowseTokenId -> AchievementEnum -> threshold mapping(uint256 => mapping(MowseDungeonAchievementsEnum => uint256)) mowseDungeonAchievementProgress; // Maps mowseTokenId -> Companion Enum -> Companion mapping(uint256 => mapping(MowseDungeonCompanionEnum => MowseDungeonCompanion)) mowseDungeonPlayerCompanion; // Maps mowseTokenId -> dungeonRunCount -> DungeonRewards mapping(uint256 => mapping(uint256 => MowseDungeonDungeonRewards)) mowseDungeonDungeonRewards; // Maps Monster Enum -> Monster for default values mapping(MowseDungeonMonsterEnum => MowseDungeonMonsterAttributes) mowseDungeonMonsterDefaults; uint256 mowseDungeonMonsterDefaultsCount; // Maps Room Enum -> Room for default values mapping(MowseDungeonRoomEnum => MowseDungeonRoom) mowseDungeonRoomDefaults; uint256 mowseDungeonRoomDefaultsCount; mapping(MowseDungeonTrinketEnum => MowseDungeonTrinket) mowseDungeonTrinketDefaults; // Keeps track of number of different trinkets exist uint256 mowseDungeonTrinketDefaultsCount; // Maps mowseTokenId to dungeon run count to vdf seed mapping(uint256 => mapping(uint256 => uint256)) mowseDungeonRunCountToSeed; // Maps mowseTokenId to dungeon run count mapping(uint256 => uint256) mowseDungeonRunCount; // RandomFortuneFacet mapping(address => uint256) randomFortuneCount; // large prime used for VDF uint256 randomFortunePrime; // iterations for VDF uint256 randomFortuneIterations; // nonce for VDF uint256 randomFortuneNonce; // mapping to get seed from timestamp mapping(address => mapping(uint256 => uint256)) randomFortuneTimestampToSeed; // MowseSpin // uint256 mowseSpinPrime; // uint256 mowseSpinIterations; // uint256 mowseSpinNonce; // // Maps mowseTokenId to current mowse spin game // mapping(uint256 => MowseSpinStorage) mowseSpinStorage; // // Maps mowseTokenId to player stats // mapping(uint256 => MowseSpinPlayer) mowseSpinPlayer; } // MowseSpin // struct MowseSpinStorage { // uint256 mowseId; // uint256 stageCount; // uint256 spinCount; // uint256 mowseSpinId; // uint256 seed; // uint256 recountTokens; // uint256 trashTokens; // uint256 coins; // MowseSpinSimplePlayer player; // MowseSpinPlayerAchievementsProgress achievementProgress; // MowseSpinLog[] spinLog; // uint256 spinLogCount; // uint256 grid; // } // struct MowseSpinPlayer { // uint256 mowseId; // // Number of times a player has created a game // uint256 spinRunCount; // // MowseDungeonSimplePlayerAchievementsUnlocked achievements; // // // Used for quickly checking if an achievement is unlocked // // mapping(MowseDungeonAchievementsEnum => bool) achievementsUnlocked; // // mapping(MowseDungeonAchievementsEnum => bool) achievementsClaimed; // // MowseDungeonSimplePlayerAchievementsProgress achievementsProgress; // } enum MowseDungeonStatusEffectEnum { NONE, BLIND, // 1/2 chance of missing attack EAGLE_EYE, // double chance of hitting atttack POISON, // Damage per turn, pre attack BURN, // Damage per turn, post attack BLEED, // Damage per turn, post attack CURSE, // % Damage per turn, pre attack STUN, // Skip damage step SILENCE, // Disable special ability FREEZE, // Skip damage step, +50% damage taken from fire damage STRENGTHEN, // Damage Up WEAKEN, // Damage Down BULK, // Defense Up FRAIL, // Defense Down THORNS, // Return damage on hit REGEN, // Heal, pre attack SLEEP, // Skip damage step, +150% damage taken, wakes up after damage taken DEATH, // Kill player after x turns INVINCIBLE, // Player does not receive damage LAST_HOPE, // If player would die, set health to 1 DODGE, // Increase dodge chance HEAL_BLOCK, // Disable healing CHARM, // Skip damage step COUNTER, // Basic attack after getting hit by a basic/special attack PIERCE, // Attack through shield CLEAVE, // Every attack hits all monsters REVIVE, // After dying, revive with full health UNSTOPPABLE,// Debuffs cannot be applied (existing ones still damage) PETRIFY, // Skip damage step, can't receive damage from enemy attack FIRE_RESIST, // Resist application of burn POISON_RESIST, FREEZE_RESIST, STUN_RESIST, SLEEP_RESIST, CHARGED, // Used for boss abilities that take wind up time DOUBLE_UP, // Apply double status effects RAMPAGE, // Increase monster damage per turn LONE_SURVIVOR,// If all other monsters are dead, increase damage ROYAL_DECREE,// Cannot be directly targeted until all other monsters are dead WRATHFUL_REPRISAL// Counter attack based off player attack } enum MowseDungeonSpecialAbilityEnum { DEFEND, // Apply thorns/counter/shield+5 to self POISON_GAS, // Apply poison to enemy BOULDER_TOSS, // Charge up and deal 3x damage + stun RAGE, // Apply STRENGTHEN to self SUMMON_CLUCKO, // Summon a Clucko in an empty monster slot THIN_STICK, // 80% dodge chance BADMOUTH, // Apply SILENCE, WEAKEN, FRAIL to enemy SUMMON_PUNK, // Summon up to 2 WRAT_PUNK in empty monster slots CURSED_SLIME, // Apply CURSE to enemy BLEEDING_SLIME, // Apply BLEED to enemy IRON_GRASP, // Charge up and double shield. Next turn add shield to damage IRON_PRAYER, // Grant shield to monsters other than self JESTER_DANCE, // Apply CURSE/BLEED/BURN/POISON/STUN/SLEEP/CHARM/freeze to enemy KNIGHTS_HONOR, // Apply STRENGTHEN to self and shield to self QUEENS_GRACE, // Apply REGEN,STRENGTHEN,BULK to all monsters KINGS_AUTHORITY, // Apply stun and charge up 2 turns, at end, deal damage equal to players coins ROYAL_DECREE, // Summon up to 2 copper squire, then charge for 2 turns HOARDERS_STASH, // Steal 25% of player's coins, add amount to current & max health WRATHFUL_REPRISAL,// Apply WRATHFUL_REPRISAL to self DESTRUCTIVE_ENVY,// Charge up 1 turn, copy player's attack SEDUCTIVE_GAZE, // Apply CHARM +2 to player INSATIABLE_FEAST,// Charge 1 turn, Consume all debuffs from self and all buffs from player, heal for 10% per debuff ANTI_SONIC_SPEED,// Apply SLEEP to all players for 2 turns NONE } enum MowseDungeonCompanionEnum { NONE, DIAMOND_BACK, DEVILISH, // Get Copper Squire Achievement WONDER_CHILD, // Get Novice Achievement INVALID_COMPANION } enum MowseDungeonTrinketEnum { DAGGER, // +10% attack SLINGSHOT, // increase damage when enemy at max health PENDANT_OF_LIFE, // +5 health pre attack LEECH, // +10% lifesteal per stack POISON_DAB, // +1 apply poison stack after attack KINDLE, // +1 burn stack BLOOD_LETTER, // +1 bleed stack CURSED_RING, // +1 curse stack STUN_ROD, // chance to apply +1 stun stack SILENCE_BELL, // chance to apply +1 silence stack STRENGTH_BELT, // +1 strengthen stack (2x damage) WEAKENED_CHAIN, // +1 weaken stack (1/2 damage) EMBLEM_OF_INITIATIVE, // +1 action GOLD_RING, // increase coin drop 10% + 10% per stack NONE } enum MowseDungeonRoomEnum { MERCHANT, // Merchant COIN_LOOT_ROOM, TRINKET_LOOT_ROOM, FOREST_SLIME_1, // 1 Green Slime FOREST_SLIME_2, // 2 Green Slime FOREST_SLIME_3, // 3 Green Slime FOREST_MUSHY, // 2 Red Mushy FOREST_PEBBLE, // 1 Pebble Golem 1 DUCKY FOREST_TOAD, // 3 Spiny Toad FOREST_ROOSTA, // 1 Roosta 2 Clucko FOREST_STICK, // 3 Stick Bug FOREST_WRAT_PUNK, // 2 WRAT_PUNK FOREST_WRAT_GANG_LEADER, // 1 Wrat Gang Leader RAIN_OF_FROGS, // 3 Spiny Toad STICKY_SITUATION, // 2 Green Slime 1 Stick Bug MEDIEVAL_SLIME_INTRO, // 1 Helmet Slime MEDIEVAL_SQUIRE_INTRO, // 1 Copper Squire MEDIEVAL_PRIEST_INTRO, // 2 Iron Priest MEDIEVAL_SLIME, // 3 Helmet Slime MEDIEVAL_SQUIRE, // 2 Copper Squire MEDIEVAL_JESTER, // 2 Pyrite Jester MEDIEVAL_KNIGHT, // 2 Steel Knight MEDIEVAL_KNIGHT_PRIEST, // 1 Steel Knight 1 Iron Priest MEDIEVAL_KNIGHT_SQUIRE, // 1 Steel Knight 1 CopperSquire MEDIEVAL_MAIDEN, // 1 Iron Maiden 2 Iron Priest MEDIEVAL_QUEEN, // 1 Silver Queen 1 SteelKnight MEDIEVAL_KING, // 1 Gold King 1 SteelKnight MEDIEVAL_ROYAL, // 1 Silver Queen 1 Gold King BOSS_LIONS_PRIDE, BOSS_GOBLINS_GREED, BOSS_LICHS_WRATH, BOSS_WRATS_ENVY, BOSS_LUSTFUL_HEIRESS, BOSS_GLUTTONOUS_PIG, BOSS_SLOTHFUL_HEDGEHOG } enum MowseDungeonMonsterEnum { // Forest SPINY_TOAD, GREEN_SLIME, RED_MUSHY, PEBBLE_GOLEM, CLUCKO, ROOSTA, STICK_BUG, DUCKY, WRAT_PUNK, WRAT_GANG_LEADER, BLUE_SLIME, RED_SLIME, // Metal Medieval theme HELMET_SLIME, COPPER_SQUIRE, IRON_MAIDEN, IRON_PRIEST, PYRITE_JESTER, STEEL_KNIGHT, SILVER_QUEEN, GOLD_KING, // Bosses // 7 Deadly Sins LIONS_PRIDE, GOBLINS_GREED, LICHS_WRATH, WRATS_ENVY, LUSTFUL_HEIRESS, GLUTTONOUS_PIG, SLOTHFUL_HEDGEHOG, NONE } enum MowseDungeonClassEnum { // Base Classes WARRIOR, // Basic 100% damage Special ability whirlwind (apply cleave to self) MAGE, // Basic 60% Special ability fireball (2x base attack, apply burn to enemy) ARCHER, // Basic 80% damage, Special ability Hawkshot (apply eagle eye, deal damage x # of times) ROGUE, // Basic 50% x 2 apply poison Special ability backstab (apply dodge 2x) // Advanced Classes PALADIN, // Basic 70% damage, Special ability Judgement Of Light (heal 30% max health + 1% per 10 int + 1% per 10 str) GUARDIAN, // Basic 50% damage, gain shield Special ability shieldbash (gain extra shield, damage equal to shield) BERSERKER,// Basic 120% Special ability rage (deal basic attack damage, apply strengthen, lastHope, silence to self) CLERIC, // Basic 40% Special ability heal (apply regen to self) NECROMANCER,// Basic 55% Special ability life tap (deal basic attack damage, if monster dies, permanently gain 10% attack) BARD, // Basic 60% Special ability charm (apply charm to enemy) // T2 Classes INVALID_CLASS } enum MowseDungeonRoomTypeEnum { MONSTER, COIN_LOOT, TRINKET_LOOT, BOSS, MERCHANT, INVALID_ROOM } // Complete Achievements to unlock Companions enum MowseDungeonAchievementsEnum { NOVICE, // Complete the forest-0 dungeon FOREST_MASTER, // Complete the forest-10 dungeon COPPER_SQUIRE, // Complete the medieval-0 dungeon IRON_MAIDEN, // Complete the medieval-3 dungeon STEEL_KNIGHT, // Complete the medieval-6 dungeon GOLD_KING, // Complete the medieval-9 dungeon MASTER_OF_DEADLY_SINS,// Complete the medieval-10 dungeon UNTOUCHABLE, // Defeat a boss without taking damage POISON_MASTER, // Apply 99 stacks of poison in one dungeon LOOT_GOBLIN, // Steal successfully more than 5 times in a single run COIN_GOBLIN, // Have at least 500 coins in inventory ONE_MAN_ARMY, // Deal 1000 damage in a single run LEARN_THE_ROPES, // Complete any dungeon with all 4 base classes WARRIOR, // Complete any dungeon with Warrior MAGE, // Complete any dungeon with Mage ARCHER, // Complete any dungeon with Archer ROGUE, // Complete any dungeon with Rogue PALADIN, // Complete any dungeon with Paladin GUARDIAN, // Complete any dungeon with Guardian BERSERKER, // Complete any dungeon with Berserker CLERIC, // Complete any dungeon with Cleric NECROMANCER, // Complete any dungeon with Necromancer BARD, // Complete any dungeon with Bard INVALID_ACHIEVEMENT } enum MowseDungeonActionTypeEnum { BASIC_ATTACK, SPECIAL_ABILITY, STEAL, DEFEND, INVALID_ACTION } enum MowseDungeonBattleStatusEnum { VICTORY, DEFEAT, ONGOING } enum MowseDungeonDungeonTypeEnum { FOREST, MEDIEVAL } enum MowseDungeonBattleLogTypeEnum { INVALID_LOG_TYPE, DAMAGE, APPLY_STATUS_EFFECT, HEAL, SUMMON, STEAL_SUCCESS, STEAL_FAILURE } enum MowseDungeonBattleLogSourceEnum { PLAYER, MONSTER_1, MONSTER_2, MONSTER_3, TARGET_INDEX_MONSTER, // Target a Monster according to targetIndex COMPANION, TRINKET_PENDANT_OF_LIFE, TRINKET_LEECH, STATUS_EFFECT_BLIND, STATUS_EFFECT_EAGLE_EYE, STATUS_EFFECT_POISON, STATUS_EFFECT_BURN, STATUS_EFFECT_BLEED, STATUS_EFFECT_CURSE, STATUS_EFFECT_STUN, STATUS_EFFECT_SILENCE, STATUS_EFFECT_FREEZE, STATUS_EFFECT_STRENGTHEN, STATUS_EFFECT_WEAKEN, STATUS_EFFECT_BULK, STATUS_EFFECT_FRAIL, STATUS_EFFECT_THORNS, STATUS_EFFECT_REGEN, STATUS_EFFECT_SLEEP, STATUS_EFFECT_DEATH, STATUS_EFFECT_INVINCIBLE, STATUS_EFFECT_LAST_HOPE, STATUS_EFFECT_DODGE, STATUS_EFFECT_HEAL_BLOCK, STATUS_EFFECT_CHARM, STATUS_EFFECT_COUNTER, STATUS_EFFECT_PIERCE, STATUS_EFFECT_CLEAVE, STATUS_EFFECT_REVIVE, STATUS_EFFECT_UNSTOPPABLE, STATUS_EFFECT_PETRIFY, STATUS_EFFECT_FIRE_RESIST, STATUS_EFFECT_POISON_RESIST, STATUS_EFFECT_FREEZE_RESIST, STATUS_EFFECT_STUN_RESIST, STATUS_EFFECT_SLEEP_RESIST, STATUS_EFFECT_CHARGED, STATUS_EFFECT_DOUBLE_UP, STATUS_EFFECT_RAMPAGE, STATUS_EFFECT_LONE_SURVIVOR, STATUS_EFFECT_ROYAL_DECREE, STATUS_EFFECT_WRATHFUL_REPRISAL } struct MowseDungeonSimpleTrinkets { uint256 dagger; uint256 slingshot; uint256 pendantOfLife; uint256 leech; uint256 poisonDab; uint256 kindle; uint256 bloodLetter; uint256 cursedRing; uint256 stunRod; uint256 silenceBell; uint256 strengthBelt; uint256 weakenedChain; uint256 emblemOfInitiative; uint256 goldRing; } struct MowseDungeonSimpleStatusEffect { uint256 blind; uint256 eagleEye; uint256 poison; uint256 burn; uint256 bleed; uint256 curse; uint256 stun; uint256 silence; uint256 freeze; uint256 strengthen; uint256 weaken; uint256 bulk; uint256 frail; uint256 thorns; uint256 regen; uint256 sleep; uint256 death; uint256 invincible; uint256 lastHope; uint256 dodge; uint256 healBlock; uint256 charm; uint256 counter; uint256 pierce; uint256 cleave; uint256 revive; uint256 unstoppable; uint256 petrify; uint256 fireResist; uint256 poisonResist; uint256 freezeResist; uint256 stunResist; uint256 sleepResist; uint256 charged; uint256 doubleUp; uint256 rampage; uint256 loneSurvivor; uint256 royalDecree; uint256 wrathfulReprisal; } struct MowseDungeonSimplePlayerAchievementsUnlocked { bool novice; bool forestMaster; bool copperSquire; bool ironMaiden; bool steelKnight; bool goldKing; bool masterOfDeadlySins; bool untouchable; bool poisonMaster; bool lootGoblin; bool coinGoblin; bool oneManArmy; bool learnTheRopes; bool warrior; bool mage; bool archer; bool rogue; bool paladin; bool guardian; bool berserker; bool cleric; bool necromancer; bool bard; } struct MowseDungeonSimplePlayerAchievementsProgress { uint256 damageDealt; uint256 damageTaken; uint256 healthHealed; uint256 burnDamageDealt; uint256 poisonDamageDealt; uint256 bleedDamageDealt; uint256 curseDamageDealt; uint256 trinketsStolen; } struct MowseDungeonBattleLog { MowseDungeonBattleLogTypeEnum logType; MowseDungeonBattleLogSourceEnum source; MowseDungeonBattleLogSourceEnum target; uint256 amount; } struct MowseDungeonBattleSimulation { MowseDungeonSimplePlayer player; MowseDungeonSimpleMonster monster1; MowseDungeonSimpleMonster monster2; MowseDungeonSimpleMonster monster3; uint256 dungeonId; uint256 seed; MowseDungeonActionTypeEnum actionType; uint8 targetIndex; uint256 actionsRun; MowseDungeonTrinketEnum[] stolenTrinkets; uint256 stolenTrinketCount; bool isStealSuccessful; MowseDungeonBattleStatusEnum status; MowseDungeonSimplePlayerAchievementsProgress achievementProgress; uint256 descentLevel; MowseDungeonBattleLog[] battleLog; uint256 battleLogCount; } struct MowseDungeonBattleResults { MowseDungeonBattleSimulation simulation; MowseDungeonPostBattleResults postBattleResults; bytes32 actionsRunHash; bytes32 postBattleResultsHash; } struct MowseDungeonPostBattleResults { uint256 mowseId; uint256 coins; MowseDungeonMonsterEnum monster1; MowseDungeonMonsterEnum monster2; MowseDungeonMonsterEnum monster3; MowseDungeonTrinketEnum[] stolenTrinkets; uint256 stolenTrinketCount; MowseDungeonBattleStatusEnum status; MowseDungeonSimplePlayerAchievementsProgress achievementProgress; uint256 descentLevel; } struct MowseDungeonDungeonRewards { bool hasRewards; uint256 mgoldMintAmount; uint256 xpGainedAmount; uint256 companionXpGained; uint256 completionPercentage; uint256 additionalFactor; } // Used for _performAction to calculate damage struct MowseDungeonSimplePlayer { uint256 mowseId; int32[SKILL_TYPE_NUM] stats; uint256 maxHealth; uint256 currentHealth; uint256 shield; uint256 attack; bool canHit; uint256 accuracy; uint256 tempAttack; uint256 damageMultiplier; uint256 action; uint256 numberOfHits; MowseDungeonClassEnum class; MowseDungeonSimpleStatusEffect statusEffects; MowseDungeonSimpleTrinkets trinkets; MowseDungeonCompanion companion; MowseDungeonDescentLevel descentLevel; // MowseDungeonSimplePlayerAchievementsUnlocked achievements; uint256 coins; uint256 currentDungeonRunCount; uint256 currentRoomIndex; } struct MowseDungeonPlayer { uint256 mowseId; int32[SKILL_TYPE_NUM] stats; uint256 maxHealth; uint256 currentHealth; uint256 shield; uint256 attack; // uint256 maxAction; // Special Ability points uint256 action; // Maps StatusEffect to statusEffect value (ex: 1 (poison) => 2 is equal to 2 stacks of poison) mapping(MowseDungeonStatusEffectEnum => uint256) statusEffects; // Maps trinketIndex to MowseDungeonTrinketEnum mapping(MowseDungeonTrinketEnum => MowseDungeonTrinket) trinkets; // uint256 trinketCount; mapping(MowseDungeonCompanionEnum => MowseDungeonCompanion) companions; MowseDungeonCompanion currentCompanion; uint256 coins; MowseDungeonClassEnum class; // Number of times a player has run a dungeon uint256 dungeonRunCount; MowseDungeonSimplePlayerAchievementsUnlocked achievements; // Used for quickly checking if an achievement is unlocked mapping(MowseDungeonAchievementsEnum => bool) achievementsUnlocked; mapping(MowseDungeonAchievementsEnum => bool) achievementsClaimed; MowseDungeonSimplePlayerAchievementsProgress achievementsProgress; MowseDungeonDescentLevel descentLevel; } struct MowseDungeonPerformAction { MowseDungeonActionTypeEnum actionType; uint256 targetIndex; } // Used for _performAction to calculate damage struct MowseDungeonSimpleMonster { MowseDungeonMonsterEnum monsterType; uint256 monsterId; uint256 maxHealth; uint256 currentHealth; uint256 shield; uint256 attack; bool canHit; uint256 accuracy; uint256 tempAttack; uint256 damageMultiplier; MowseDungeonSpecialAbilityEnum specialAbility; bool isBoss; bool hasBeenStolen; bool usedSpecialAbility; MowseDungeonSimpleStatusEffect statusEffects; string image; } // Used for setting default monster values struct MowseDungeonMonsterAttributes { bool isActive; MowseDungeonMonsterEnum monsterType; uint256 monsterId; uint256 maxHealth; uint256 shield; uint256 attack; MowseDungeonSpecialAbilityEnum specialAbility; MowseDungeonSimpleStatusEffect statusEffects; bool isBoss; uint256 coins; string name; string image; } struct MowseDungeonMonster { MowseDungeonMonsterEnum monsterType; uint256 monsterId; uint256 maxHealth; uint256 currentHealth; uint256 shield; uint256 attack; MowseDungeonSpecialAbilityEnum specialAbility; mapping(MowseDungeonStatusEffectEnum => uint256) statusEffects; // Bosses cannot be stunned, slept, etc. bool isBoss; // Maps monsterDropIndex to MowseDungeonTrinket mapping(uint256 => MowseDungeonTrinket) monsterDrops; uint256 monsterDropCount; uint256 coins; // Players can only use steal once per monster bool hasBeenStolen; string name; } // Trinkets are passive boosts to the player they can select after battle // Trinkets do not carry over between dungeon run, however, you can enhance trinkets so they are stronger the next run // Use MowseDungeonTrinketEnum id to conditionally apply statusEffects struct MowseDungeonTrinket { MowseDungeonTrinketEnum trinketId; uint256 level; // mapping(MowseDungeonStatusEffectEnum => uint256) statusEffects; uint256 health; uint256 shield; uint256 attack; } // Should always have 5 items struct MowseDungeonMerchantRoom { MowseDungeonMerchantItem[] items; } struct MowseDungeonMerchantItem { MowseDungeonTrinketEnum trinketId; MowseDungeonTrinket trinket; uint256 cost; bool hasPurchased; } // Unlike Trinkets, Companions carry over between dungeon runs // Companions can level up before a dungeon run struct MowseDungeonCompanion { MowseDungeonCompanionEnum companionId; bool isUnlocked; uint256 level; uint256 experience; } struct MowseDungeonRoom { MowseDungeonRoomEnum id; MowseDungeonRoomTypeEnum roomType; MowseDungeonMonsterEnum[] monsters; } struct MowseDungeon { uint256 id; // Should be the VDF hash MowseDungeonRoom[] rooms; uint256 currentRoomIndex; bool active; MowseDungeonDungeonTypeEnum dungeonType; MowseDungeonMerchantRoom merchantRoom; uint256 descentLevel; } // 0 - normal // 1 - +25% hp/shield // 2 - +25% attack // 3 - +25% attack, -25% coin // 4 - +25% attack/hp/shield // 5 - +25% attack/hp/shield, items cost 10% more // 6 - +25% attack, +50% hp/shield // 7 - +25% attack, +50% hp/shield, -25% coins // 8 - +25% attack, +50% hp/shield, -25% coins, items cost 10% more // 9 - +100% hp/shield, rampage // 10 - +100% hp/shield, rampage, -25% coins, items cost 10% more struct MowseDungeonDescentLevel { uint256 forestDungeon; uint256 medievalDungeon; } // Gather and Garnish struct GatherAndGarnishScavenge { uint256 woodCount; uint256 rockCount; uint256 gemCount; uint256 foodCount; } struct GatherAndGarnishPlayerStats { // Maps season day index -> action index taken [1 - gather, 2 - predict, 3 - build, 4 - invest] mapping(uint256 => uint256) dailyAction; uint256 woodStorage; uint256 woodStorageLevel; uint256 rockStorage; uint256 rockStorageLevel; uint256 gemStorage; uint256 gemStorageLevel; uint256 foodStorage; uint256 foodStorageLevel; uint256 investmentCount; // Maps whether the player has built the first/second/third points structure mapping(uint256 => bool) hasBuiltPointsStructure; // Maps season day index -> resource type prediction [1-4, wood/rock/gem/food] mapping(uint256 => uint256) prediction; uint256 latestPredictionDay; uint256 seasonFirstWinnerIndex; } struct TestPatch { uint256 testPatchVersion; uint256 uniqueInteractionCount; // Unique address interactions address[] interactedAddresses; // Addresses that interacted mapping(address => uint256) numberOfInteractions; // maps addresses -> number of times interacted } struct Mowse { uint256 tokenId; // Mowse asset tokenId counter, also used to check if exists address ownerAddress; // Owner Address // BaseTraits required on all Mowse uint16 generation; MowseWearMetadata baseBackgroundColor; // Index 0 MowseWearMetadata baseSkinColor; // Index 2 MowseWearMetadata baseEarType; // Index 3 MowseWearMetadata baseBodyType; // Index 5 MowseWearMetadata baseMouth; // Index 6 MowseWearMetadata baseEyeType; // Index 8 // MowseJob int32[SKILL_TYPE_NUM] skillLevelBoosts; // Additional Skill LEVEL modifiers int32[SKILL_TYPE_NUM] skillLevel; // Base Skill LEVEL, increases as ExperiencePoints caps [charisma, constitution, dexterity, intelligence, luck, strength, wisdom] // uint32[SKILL_TYPE_NUM] skillExperiencePoints; // Skill EXPERIENCE points // uint16[SKILL_TYPE_NUM] skillExperiencePointsBoosts; // Additional Skill EXPERIENCE points boosts uint8 primarySkillType; // Primary skill preference from birth (should be 0-6), cannot change uint8 secondarySkillType; // Secondary skill preference from birth (should be 0-6, can be the same as primary skill), cannot change uint8 profession; // Career (should be 0-7), can change. // 0 = no profession // 1 = Agriculture and Food // 2 = Finance and Marketing // 3 = Art and Manufacturing // 4 = Science and Medicine // 5 = Military // 6 = Politics (Law and Government) // 7 = Nursing and Childcare (Family-focused) // MowseLife uint16 lifeLevel; // LIFE Experience level uint256 lifeExperiencePoints; // Life Experience points (as life level goes up, skill level can be increased) uint256 prngNonce; // Used in Mowse PRNG (level up to randomly distribute stat points and onMint) // MowseWear uint256[EQUIPPED_WEARABLE_SLOTS] equippedMowseWearByTokenIds; // Currently equipped mowsewear tokenIds // [backgroundColor, backgroundFeature, skinColor, earType, shirt, bodyType, mouth, eyeBrow, eyeType, eyeWear, headWear, jewelry] } // 1 Background Color // 2 Background Feature // 3 Skin Color // 4 Ear Type // 5 Shirt // 6 Body Type // 7 Mouth // 8 Eye Brow Type // 9 Eye Type // 10 Eye Wear // 11 Head Wear // 12 Jewelry struct MowseWear { uint256 tokenId; // MowseWear asset tokenId counter, also used to check if exists bool isEquipped; // Quick way to know if a MowseWear is equipped uint256 equippedBy; // track which Mowse tokenId is equipped by uint256 durability; // Durability time after stitching uint256 alterCount; // Number of times a MowseWear has been altered (stitched or hemmed) uint256 maxAlterCount; // Max number of times a MowseWear can be altered (stitched or hemmed) MowseWearMetadata metadata; MowseWearDimensions dimensions; MowseWearBonuses bonuses; } struct MowseWearMetadata { uint8 traitType; // Type of MowseWear (backgroundColor, shirt, eyeWear, etc) (should be 0-11) string traitName; // MowseWear item name ("Blue Headband") uint16 traitIndex; // MowseWear trait index (12th headband) uint256 dictionaryIndex; // MowseWear dictionary index (12th item in dictionary) bool nonTransferrable; // MowseWear can be traded or not (soulbound) string svgFilter; // Any overrides on the svgFilter MowseWearDimensions baseDimensions; // Base SVG Dimensions } struct MowseWearBonuses { uint256 randomness; // Random seed for MowseWear uint256 itemRarityIV; // Item Rarity inherent value (pseudorandom number between 0-4294967294) uint8 itemRarity; // Item Rarity (common, uncommon, rare, epic, legendary, unique) (should be 0-5) int32[SKILL_TYPE_NUM] baseSkillLevelBoosts; // Base Skill LEVEL modifiers from IV int32[SKILL_TYPE_NUM] additionalSkillLevelBoosts; // Additional Skill LEVEL modifiers from other factors (set bonuses?) } struct MowseSkillTypes { int32 charisma; int32 constitution; int32 dexterity; int32 intelligence; int32 luck; int32 strength; int32 wisdom; } struct MowseWearDimensions { uint16 width; uint16 height; string transform; string style; string image; uint16 weight; } struct MowseLootboxPool { bool active; // Is lootbox active and can be minted from? uint256 price; // Price per MowseGold (generic loot pool cheapest -> specific trait type more expensive -> event specific) string name; uint16 width; // Goes with image to create on-chain SVG uint16 height; // Goes with image to create on-chain SVG string image; mapping(uint16 => uint256) lootPool; // TraitTypes & TraitIndexes in the lootPool for minting uint16 itemCount; // Number of items in lootpool uint256 dateAdded; // When the lootbox was added; Ex: Earlier lootboxes might have rarer items uint256 index; // Index of the lootbox } // This struct is used by MowseLootboxFacet.getMowseLootboxData to return the lootPool mapping as well struct MowseLootboxPoolData { bool active; uint256 price; string name; string image; SimpleMowseLootboxPoolItem[] lootPool; uint16 itemCount; uint256 dateAdded; uint64 index; } struct SimpleMowseLootboxPoolItem { uint16 traitType; uint16 traitIndex; string traitName; string image; } struct MowseLineage { uint16 generation; uint256 parent1; uint256 parent2; uint256[] children; } struct MowseBankStruct { address _walletImplementation; mapping(address => uint256) balances; mapping(address => uint256) getTokenIdForWallet; } struct MowseGames { string name; bool active; // Game is active or disabled (disable if game updates or something. idk. Bad developer) bytes32 gameHash; uint256 totalNumberOfSubmits; mapping(address => uint256) uniqueSubmitsByAddress; address[] uniqueAddressesList; uint256 uniqueAddressesCount; mapping(address => uint256[3]) dailySubmits; // Minimum score to pass to get the max payout MGOLD uint256 minScoreForMaxPayout; // For granting additional bonuses for special event days bool rewardBonus; // For paying game developers address payable developerAddress; } library LibStorage { function gameStorage() internal pure returns (GameStorage storage gs) { assembly { gs.slot := 0 } } function skillTypeToString(uint16 x) internal pure returns (string memory skillTypeString) { require(x < SKILL_TYPE_NUM, "LibStorage: Invalid Skill Type"); if (x == 0) return "charisma"; if (x == 1) return "constitution"; if (x == 2) return "dexterity"; if (x == 3) return "intelligence"; if (x == 4) return "luck"; if (x == 5) return "strength"; if (x == 6) return "wisdom"; } function equippableWearableSlotToString(uint8 traitType) internal pure returns (string memory wearableSlotString) { require(traitType < EQUIPPED_WEARABLE_SLOTS, "LibStorage: Invalid Trait Type"); if (traitType == 0) return "backgroundColor"; if (traitType == 1) return "backgroundFeature"; if (traitType == 2) return "skinColor"; if (traitType == 3) return "earType"; if (traitType == 4) return "shirt"; if (traitType == 5) return "bodyType"; if (traitType == 6) return "mouth"; if (traitType == 7) return "eyeBrow"; if (traitType == 8) return "eyeType"; if (traitType == 9) return "eyeWear"; if (traitType == 10) return "headWear"; if (traitType == 11) return "jewelry"; } function itemRarityToString(uint8 itemRarity) internal pure returns (string memory itemRarityString) { if (itemRarity == 0) return "common"; if (itemRarity == 1) return "uncommon"; if (itemRarity == 2) return "rare"; if (itemRarity == 3) return "epic"; if (itemRarity == 4) return "legendary"; if (itemRarity == 5) return "unique"; } } contract WithStorage { function skillTypeToString(uint16 skillType) internal pure returns (string memory) { return LibStorage.skillTypeToString(skillType); } function equippedWearableSlotToString(uint8 traitType) internal pure returns (string memory) { return LibStorage.equippableWearableSlotToString(traitType); } function itemRarityToString(uint8 itemRarity) internal pure returns (string memory) { return LibStorage.itemRarityToString(itemRarity); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.4.22 <0.9.0; library console { address constant CONSOLE_ADDRESS = 0x000000000000000000636F6e736F6c652e6c6f67; function _sendLogPayloadImplementation(bytes memory payload) internal view { address consoleAddress = CONSOLE_ADDRESS; /// @solidity memory-safe-assembly assembly { pop( staticcall( gas(), consoleAddress, add(payload, 32), mload(payload), 0, 0 ) ) } } function _castToPure( function(bytes memory) internal view fnIn ) internal pure returns (function(bytes memory) pure fnOut) { assembly { fnOut := fnIn } } function _sendLogPayload(bytes memory payload) internal pure { _castToPure(_sendLogPayloadImplementation)(payload); } function log() internal pure { _sendLogPayload(abi.encodeWithSignature("log()")); } function logInt(int256 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(int256)", p0)); } function logUint(uint256 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256)", p0)); } function logString(string memory p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string)", p0)); } function logBool(bool p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool)", p0)); } function logAddress(address p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address)", p0)); } function logBytes(bytes memory p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes)", p0)); } function logBytes1(bytes1 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes1)", p0)); } function logBytes2(bytes2 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes2)", p0)); } function logBytes3(bytes3 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes3)", p0)); } function logBytes4(bytes4 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes4)", p0)); } function logBytes5(bytes5 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes5)", p0)); } function logBytes6(bytes6 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes6)", p0)); } function logBytes7(bytes7 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes7)", p0)); } function logBytes8(bytes8 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes8)", p0)); } function logBytes9(bytes9 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes9)", p0)); } function logBytes10(bytes10 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes10)", p0)); } function logBytes11(bytes11 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes11)", p0)); } function logBytes12(bytes12 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes12)", p0)); } function logBytes13(bytes13 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes13)", p0)); } function logBytes14(bytes14 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes14)", p0)); } function logBytes15(bytes15 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes15)", p0)); } function logBytes16(bytes16 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes16)", p0)); } function logBytes17(bytes17 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes17)", p0)); } function logBytes18(bytes18 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes18)", p0)); } function logBytes19(bytes19 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes19)", p0)); } function logBytes20(bytes20 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes20)", p0)); } function logBytes21(bytes21 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes21)", p0)); } function logBytes22(bytes22 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes22)", p0)); } function logBytes23(bytes23 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes23)", p0)); } function logBytes24(bytes24 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes24)", p0)); } function logBytes25(bytes25 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes25)", p0)); } function logBytes26(bytes26 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes26)", p0)); } function logBytes27(bytes27 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes27)", p0)); } function logBytes28(bytes28 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes28)", p0)); } function logBytes29(bytes29 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes29)", p0)); } function logBytes30(bytes30 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes30)", p0)); } function logBytes31(bytes31 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes31)", p0)); } function logBytes32(bytes32 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes32)", p0)); } function log(uint256 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256)", p0)); } function log(string memory p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string)", p0)); } function log(bool p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool)", p0)); } function log(address p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address)", p0)); } function log(uint256 p0, uint256 p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256)", p0, p1)); } function log(uint256 p0, string memory p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string)", p0, p1)); } function log(uint256 p0, bool p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool)", p0, p1)); } function log(uint256 p0, address p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address)", p0, p1)); } function log(string memory p0, uint256 p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256)", p0, p1)); } function log(string memory p0, string memory p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string)", p0, p1)); } function log(string memory p0, bool p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool)", p0, p1)); } function log(string memory p0, address p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address)", p0, p1)); } function log(bool p0, uint256 p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256)", p0, p1)); } function log(bool p0, string memory p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string)", p0, p1)); } function log(bool p0, bool p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool)", p0, p1)); } function log(bool p0, address p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address)", p0, p1)); } function log(address p0, uint256 p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256)", p0, p1)); } function log(address p0, string memory p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string)", p0, p1)); } function log(address p0, bool p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool)", p0, p1)); } function log(address p0, address p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address)", p0, p1)); } function log(uint256 p0, uint256 p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256)", p0, p1, p2)); } function log(uint256 p0, uint256 p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string)", p0, p1, p2)); } function log(uint256 p0, uint256 p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool)", p0, p1, p2)); } function log(uint256 p0, uint256 p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address)", p0, p1, p2)); } function log(uint256 p0, string memory p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256)", p0, p1, p2)); } function log(uint256 p0, string memory p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,string)", p0, p1, p2)); } function log(uint256 p0, string memory p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool)", p0, p1, p2)); } function log(uint256 p0, string memory p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,address)", p0, p1, p2)); } function log(uint256 p0, bool p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256)", p0, p1, p2)); } function log(uint256 p0, bool p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string)", p0, p1, p2)); } function log(uint256 p0, bool p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool)", p0, p1, p2)); } function log(uint256 p0, bool p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address)", p0, p1, p2)); } function log(uint256 p0, address p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256)", p0, p1, p2)); } function log(uint256 p0, address p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,string)", p0, p1, p2)); } function log(uint256 p0, address p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool)", p0, p1, p2)); } function log(uint256 p0, address p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,address)", p0, p1, p2)); } function log(string memory p0, uint256 p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256)", p0, p1, p2)); } function log(string memory p0, uint256 p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,string)", p0, p1, p2)); } function log(string memory p0, uint256 p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool)", p0, p1, p2)); } function log(string memory p0, uint256 p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,address)", p0, p1, p2)); } function log(string memory p0, string memory p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,uint256)", p0, p1, p2)); } function log(string memory p0, string memory p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,string)", p0, p1, p2)); } function log(string memory p0, string memory p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,bool)", p0, p1, p2)); } function log(string memory p0, string memory p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,address)", p0, p1, p2)); } function log(string memory p0, bool p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256)", p0, p1, p2)); } function log(string memory p0, bool p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,string)", p0, p1, p2)); } function log(string memory p0, bool p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool)", p0, p1, p2)); } function log(string memory p0, bool p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,address)", p0, p1, p2)); } function log(string memory p0, address p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,uint256)", p0, p1, p2)); } function log(string memory p0, address p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,string)", p0, p1, p2)); } function log(string memory p0, address p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,bool)", p0, p1, p2)); } function log(string memory p0, address p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,address)", p0, p1, p2)); } function log(bool p0, uint256 p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256)", p0, p1, p2)); } function log(bool p0, uint256 p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string)", p0, p1, p2)); } function log(bool p0, uint256 p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool)", p0, p1, p2)); } function log(bool p0, uint256 p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address)", p0, p1, p2)); } function log(bool p0, string memory p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256)", p0, p1, p2)); } function log(bool p0, string memory p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,string)", p0, p1, p2)); } function log(bool p0, string memory p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool)", p0, p1, p2)); } function log(bool p0, string memory p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,address)", p0, p1, p2)); } function log(bool p0, bool p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256)", p0, p1, p2)); } function log(bool p0, bool p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string)", p0, p1, p2)); } function log(bool p0, bool p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool)", p0, p1, p2)); } function log(bool p0, bool p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address)", p0, p1, p2)); } function log(bool p0, address p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256)", p0, p1, p2)); } function log(bool p0, address p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,string)", p0, p1, p2)); } function log(bool p0, address p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool)", p0, p1, p2)); } function log(bool p0, address p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,address)", p0, p1, p2)); } function log(address p0, uint256 p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256)", p0, p1, p2)); } function log(address p0, uint256 p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,string)", p0, p1, p2)); } function log(address p0, uint256 p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool)", p0, p1, p2)); } function log(address p0, uint256 p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,address)", p0, p1, p2)); } function log(address p0, string memory p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,uint256)", p0, p1, p2)); } function log(address p0, string memory p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,string)", p0, p1, p2)); } function log(address p0, string memory p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,bool)", p0, p1, p2)); } function log(address p0, string memory p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,address)", p0, p1, p2)); } function log(address p0, bool p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256)", p0, p1, p2)); } function log(address p0, bool p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,string)", p0, p1, p2)); } function log(address p0, bool p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool)", p0, p1, p2)); } function log(address p0, bool p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,address)", p0, p1, p2)); } function log(address p0, address p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,uint256)", p0, p1, p2)); } function log(address p0, address p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,string)", p0, p1, p2)); } function log(address p0, address p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,bool)", p0, p1, p2)); } function log(address p0, address p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,address)", p0, p1, p2)); } function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,string)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,bool)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,address)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string,string)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string,bool)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string,address)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,string)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,bool)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,address)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,string)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,bool)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,address)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256,string)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256,bool)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256,address)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,string,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,string,string)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,string,bool)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,string,address)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool,string)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool,bool)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool,address)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,address,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,address,string)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,address,bool)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,address,address)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,string)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,bool)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,address)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string,string)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string,bool)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string,address)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,string)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,bool)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,address)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,string)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,bool)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,address)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,string)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,bool)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,address)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,string,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,string,string)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,string,bool)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,string,address)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,string)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,bool)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,address)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,string)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,bool)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,address)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256,uint256)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256,string)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256,bool)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256,address)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,string,uint256)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,string,string)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,string,bool)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,string,address)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool,uint256)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool,string)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool,bool)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool,address)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,address,uint256)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,address,string)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,address,bool)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,address,address)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,uint256,uint256)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,uint256,string)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,uint256,bool)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,uint256,address)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,string,uint256)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,string,string)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,string,bool)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,string,address)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,uint256)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,string)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,bool)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,address)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,address,uint256)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,address,string)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,address,bool)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,address,address)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256,uint256)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256,string)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256,bool)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256,address)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,uint256)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,string)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,bool)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,address)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,uint256)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,string)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,bool)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,address)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,uint256)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,string)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,bool)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,address)", p0, p1, p2, p3)); } function log(string memory p0, address p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,uint256,uint256)", p0, p1, p2, p3)); } function log(string memory p0, address p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,uint256,string)", p0, p1, p2, p3)); } function log(string memory p0, address p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,uint256,bool)", p0, p1, p2, p3)); } function log(string memory p0, address p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,uint256,address)", p0, p1, p2, p3)); } function log(string memory p0, address p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,string,uint256)", p0, p1, p2, p3)); } function log(string memory p0, address p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,string,string)", p0, p1, p2, p3)); } function log(string memory p0, address p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,string,bool)", p0, p1, p2, p3)); } function log(string memory p0, address p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,string,address)", p0, p1, p2, p3)); } function log(string memory p0, address p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,uint256)", p0, p1, p2, p3)); } function log(string memory p0, address p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,string)", p0, p1, p2, p3)); } function log(string memory p0, address p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,bool)", p0, p1, p2, p3)); } function log(string memory p0, address p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,address)", p0, p1, p2, p3)); } function log(string memory p0, address p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,address,uint256)", p0, p1, p2, p3)); } function log(string memory p0, address p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,address,string)", p0, p1, p2, p3)); } function log(string memory p0, address p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,address,bool)", p0, p1, p2, p3)); } function log(string memory p0, address p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,address,address)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,uint256)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,string)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,bool)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,address)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string,uint256)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string,string)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string,bool)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string,address)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,uint256)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,string)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,bool)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,address)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,uint256)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,string)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,bool)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,address)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256,uint256)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256,string)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256,bool)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256,address)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,uint256)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,string)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,bool)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,address)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,uint256)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,string)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,bool)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,address)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,uint256)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,string)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,bool)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,address)", p0, p1, p2, p3)); } function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,uint256)", p0, p1, p2, p3)); } function log(bool p0, bool p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,string)", p0, p1, p2, p3)); } function log(bool p0, bool p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,bool)", p0, p1, p2, p3)); } function log(bool p0, bool p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,address)", p0, p1, p2, p3)); } function log(bool p0, bool p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,uint256)", p0, p1, p2, p3)); } function log(bool p0, bool p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,string)", p0, p1, p2, p3)); } function log(bool p0, bool p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,bool)", p0, p1, p2, p3)); } function log(bool p0, bool p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,address)", p0, p1, p2, p3)); } function log(bool p0, bool p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,uint256)", p0, p1, p2, p3)); } function log(bool p0, bool p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,string)", p0, p1, p2, p3)); } function log(bool p0, bool p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,bool)", p0, p1, p2, p3)); } function log(bool p0, bool p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,address)", p0, p1, p2, p3)); } function log(bool p0, bool p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,uint256)", p0, p1, p2, p3)); } function log(bool p0, bool p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,string)", p0, p1, p2, p3)); } function log(bool p0, bool p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,bool)", p0, p1, p2, p3)); } function log(bool p0, bool p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,address)", p0, p1, p2, p3)); } function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,uint256)", p0, p1, p2, p3)); } function log(bool p0, address p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,string)", p0, p1, p2, p3)); } function log(bool p0, address p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,bool)", p0, p1, p2, p3)); } function log(bool p0, address p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,address)", p0, p1, p2, p3)); } function log(bool p0, address p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,uint256)", p0, p1, p2, p3)); } function log(bool p0, address p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,string)", p0, p1, p2, p3)); } function log(bool p0, address p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,bool)", p0, p1, p2, p3)); } function log(bool p0, address p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,address)", p0, p1, p2, p3)); } function log(bool p0, address p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,uint256)", p0, p1, p2, p3)); } function log(bool p0, address p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,string)", p0, p1, p2, p3)); } function log(bool p0, address p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,bool)", p0, p1, p2, p3)); } function log(bool p0, address p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,address)", p0, p1, p2, p3)); } function log(bool p0, address p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,uint256)", p0, p1, p2, p3)); } function log(bool p0, address p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,string)", p0, p1, p2, p3)); } function log(bool p0, address p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,bool)", p0, p1, p2, p3)); } function log(bool p0, address p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,address)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,uint256)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,string)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,bool)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,address)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,string,uint256)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,string,string)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,string,bool)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,string,address)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,uint256)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,string)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,bool)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,address)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,uint256)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,string)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,bool)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,address)", p0, p1, p2, p3)); } function log(address p0, string memory p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,uint256,uint256)", p0, p1, p2, p3)); } function log(address p0, string memory p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,uint256,string)", p0, p1, p2, p3)); } function log(address p0, string memory p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,uint256,bool)", p0, p1, p2, p3)); } function log(address p0, string memory p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,uint256,address)", p0, p1, p2, p3)); } function log(address p0, string memory p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,string,uint256)", p0, p1, p2, p3)); } function log(address p0, string memory p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,string,string)", p0, p1, p2, p3)); } function log(address p0, string memory p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,string,bool)", p0, p1, p2, p3)); } function log(address p0, string memory p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,string,address)", p0, p1, p2, p3)); } function log(address p0, string memory p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,uint256)", p0, p1, p2, p3)); } function log(address p0, string memory p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,string)", p0, p1, p2, p3)); } function log(address p0, string memory p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,bool)", p0, p1, p2, p3)); } function log(address p0, string memory p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,address)", p0, p1, p2, p3)); } function log(address p0, string memory p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,address,uint256)", p0, p1, p2, p3)); } function log(address p0, string memory p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,address,string)", p0, p1, p2, p3)); } function log(address p0, string memory p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,address,bool)", p0, p1, p2, p3)); } function log(address p0, string memory p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,address,address)", p0, p1, p2, p3)); } function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,uint256)", p0, p1, p2, p3)); } function log(address p0, bool p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,string)", p0, p1, p2, p3)); } function log(address p0, bool p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,bool)", p0, p1, p2, p3)); } function log(address p0, bool p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,address)", p0, p1, p2, p3)); } function log(address p0, bool p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,uint256)", p0, p1, p2, p3)); } function log(address p0, bool p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,string)", p0, p1, p2, p3)); } function log(address p0, bool p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,bool)", p0, p1, p2, p3)); } function log(address p0, bool p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,address)", p0, p1, p2, p3)); } function log(address p0, bool p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,uint256)", p0, p1, p2, p3)); } function log(address p0, bool p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,string)", p0, p1, p2, p3)); } function log(address p0, bool p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,bool)", p0, p1, p2, p3)); } function log(address p0, bool p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,address)", p0, p1, p2, p3)); } function log(address p0, bool p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,uint256)", p0, p1, p2, p3)); } function log(address p0, bool p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,string)", p0, p1, p2, p3)); } function log(address p0, bool p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,bool)", p0, p1, p2, p3)); } function log(address p0, bool p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,address)", p0, p1, p2, p3)); } function log(address p0, address p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,uint256)", p0, p1, p2, p3)); } function log(address p0, address p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,string)", p0, p1, p2, p3)); } function log(address p0, address p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,bool)", p0, p1, p2, p3)); } function log(address p0, address p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,address)", p0, p1, p2, p3)); } function log(address p0, address p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,string,uint256)", p0, p1, p2, p3)); } function log(address p0, address p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,string,string)", p0, p1, p2, p3)); } function log(address p0, address p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,string,bool)", p0, p1, p2, p3)); } function log(address p0, address p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,string,address)", p0, p1, p2, p3)); } function log(address p0, address p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,uint256)", p0, p1, p2, p3)); } function log(address p0, address p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,string)", p0, p1, p2, p3)); } function log(address p0, address p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,bool)", p0, p1, p2, p3)); } function log(address p0, address p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,address)", p0, p1, p2, p3)); } function log(address p0, address p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,address,uint256)", p0, p1, p2, p3)); } function log(address p0, address p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,address,string)", p0, p1, p2, p3)); } function log(address p0, address p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,address,bool)", p0, p1, p2, p3)); } function log(address p0, address p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,address,address)", p0, p1, p2, p3)); } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"","type":"string"}],"name":"MissingAdminRole","type":"error"},{"inputs":[{"components":[{"components":[{"internalType":"uint256","name":"mowseId","type":"uint256"},{"internalType":"int32[7]","name":"stats","type":"int32[7]"},{"internalType":"uint256","name":"maxHealth","type":"uint256"},{"internalType":"uint256","name":"currentHealth","type":"uint256"},{"internalType":"uint256","name":"shield","type":"uint256"},{"internalType":"uint256","name":"attack","type":"uint256"},{"internalType":"bool","name":"canHit","type":"bool"},{"internalType":"uint256","name":"accuracy","type":"uint256"},{"internalType":"uint256","name":"tempAttack","type":"uint256"},{"internalType":"uint256","name":"damageMultiplier","type":"uint256"},{"internalType":"uint256","name":"action","type":"uint256"},{"internalType":"uint256","name":"numberOfHits","type":"uint256"},{"internalType":"enum MowseDungeonClassEnum","name":"class","type":"uint8"},{"components":[{"internalType":"uint256","name":"blind","type":"uint256"},{"internalType":"uint256","name":"eagleEye","type":"uint256"},{"internalType":"uint256","name":"poison","type":"uint256"},{"internalType":"uint256","name":"burn","type":"uint256"},{"internalType":"uint256","name":"bleed","type":"uint256"},{"internalType":"uint256","name":"curse","type":"uint256"},{"internalType":"uint256","name":"stun","type":"uint256"},{"internalType":"uint256","name":"silence","type":"uint256"},{"internalType":"uint256","name":"freeze","type":"uint256"},{"internalType":"uint256","name":"strengthen","type":"uint256"},{"internalType":"uint256","name":"weaken","type":"uint256"},{"internalType":"uint256","name":"bulk","type":"uint256"},{"internalType":"uint256","name":"frail","type":"uint256"},{"internalType":"uint256","name":"thorns","type":"uint256"},{"internalType":"uint256","name":"regen","type":"uint256"},{"internalType":"uint256","name":"sleep","type":"uint256"},{"internalType":"uint256","name":"death","type":"uint256"},{"internalType":"uint256","name":"invincible","type":"uint256"},{"internalType":"uint256","name":"lastHope","type":"uint256"},{"internalType":"uint256","name":"dodge","type":"uint256"},{"internalType":"uint256","name":"healBlock","type":"uint256"},{"internalType":"uint256","name":"charm","type":"uint256"},{"internalType":"uint256","name":"counter","type":"uint256"},{"internalType":"uint256","name":"pierce","type":"uint256"},{"internalType":"uint256","name":"cleave","type":"uint256"},{"internalType":"uint256","name":"revive","type":"uint256"},{"internalType":"uint256","name":"unstoppable","type":"uint256"},{"internalType":"uint256","name":"petrify","type":"uint256"},{"internalType":"uint256","name":"fireResist","type":"uint256"},{"internalType":"uint256","name":"poisonResist","type":"uint256"},{"internalType":"uint256","name":"freezeResist","type":"uint256"},{"internalType":"uint256","name":"stunResist","type":"uint256"},{"internalType":"uint256","name":"sleepResist","type":"uint256"},{"internalType":"uint256","name":"charged","type":"uint256"},{"internalType":"uint256","name":"doubleUp","type":"uint256"},{"internalType":"uint256","name":"rampage","type":"uint256"},{"internalType":"uint256","name":"loneSurvivor","type":"uint256"},{"internalType":"uint256","name":"royalDecree","type":"uint256"},{"internalType":"uint256","name":"wrathfulReprisal","type":"uint256"}],"internalType":"struct MowseDungeonSimpleStatusEffect","name":"statusEffects","type":"tuple"},{"components":[{"internalType":"uint256","name":"dagger","type":"uint256"},{"internalType":"uint256","name":"slingshot","type":"uint256"},{"internalType":"uint256","name":"pendantOfLife","type":"uint256"},{"internalType":"uint256","name":"leech","type":"uint256"},{"internalType":"uint256","name":"poisonDab","type":"uint256"},{"internalType":"uint256","name":"kindle","type":"uint256"},{"internalType":"uint256","name":"bloodLetter","type":"uint256"},{"internalType":"uint256","name":"cursedRing","type":"uint256"},{"internalType":"uint256","name":"stunRod","type":"uint256"},{"internalType":"uint256","name":"silenceBell","type":"uint256"},{"internalType":"uint256","name":"strengthBelt","type":"uint256"},{"internalType":"uint256","name":"weakenedChain","type":"uint256"},{"internalType":"uint256","name":"emblemOfInitiative","type":"uint256"},{"internalType":"uint256","name":"goldRing","type":"uint256"}],"internalType":"struct MowseDungeonSimpleTrinkets","name":"trinkets","type":"tuple"},{"components":[{"internalType":"enum MowseDungeonCompanionEnum","name":"companionId","type":"uint8"},{"internalType":"bool","name":"isUnlocked","type":"bool"},{"internalType":"uint256","name":"level","type":"uint256"},{"internalType":"uint256","name":"experience","type":"uint256"}],"internalType":"struct MowseDungeonCompanion","name":"companion","type":"tuple"},{"components":[{"internalType":"uint256","name":"forestDungeon","type":"uint256"},{"internalType":"uint256","name":"medievalDungeon","type":"uint256"}],"internalType":"struct MowseDungeonDescentLevel","name":"descentLevel","type":"tuple"},{"internalType":"uint256","name":"coins","type":"uint256"},{"internalType":"uint256","name":"currentDungeonRunCount","type":"uint256"},{"internalType":"uint256","name":"currentRoomIndex","type":"uint256"}],"internalType":"struct MowseDungeonSimplePlayer","name":"player","type":"tuple"},{"components":[{"internalType":"enum MowseDungeonMonsterEnum","name":"monsterType","type":"uint8"},{"internalType":"uint256","name":"monsterId","type":"uint256"},{"internalType":"uint256","name":"maxHealth","type":"uint256"},{"internalType":"uint256","name":"currentHealth","type":"uint256"},{"internalType":"uint256","name":"shield","type":"uint256"},{"internalType":"uint256","name":"attack","type":"uint256"},{"internalType":"bool","name":"canHit","type":"bool"},{"internalType":"uint256","name":"accuracy","type":"uint256"},{"internalType":"uint256","name":"tempAttack","type":"uint256"},{"internalType":"uint256","name":"damageMultiplier","type":"uint256"},{"internalType":"enum MowseDungeonSpecialAbilityEnum","name":"specialAbility","type":"uint8"},{"internalType":"bool","name":"isBoss","type":"bool"},{"internalType":"bool","name":"hasBeenStolen","type":"bool"},{"internalType":"bool","name":"usedSpecialAbility","type":"bool"},{"components":[{"internalType":"uint256","name":"blind","type":"uint256"},{"internalType":"uint256","name":"eagleEye","type":"uint256"},{"internalType":"uint256","name":"poison","type":"uint256"},{"internalType":"uint256","name":"burn","type":"uint256"},{"internalType":"uint256","name":"bleed","type":"uint256"},{"internalType":"uint256","name":"curse","type":"uint256"},{"internalType":"uint256","name":"stun","type":"uint256"},{"internalType":"uint256","name":"silence","type":"uint256"},{"internalType":"uint256","name":"freeze","type":"uint256"},{"internalType":"uint256","name":"strengthen","type":"uint256"},{"internalType":"uint256","name":"weaken","type":"uint256"},{"internalType":"uint256","name":"bulk","type":"uint256"},{"internalType":"uint256","name":"frail","type":"uint256"},{"internalType":"uint256","name":"thorns","type":"uint256"},{"internalType":"uint256","name":"regen","type":"uint256"},{"internalType":"uint256","name":"sleep","type":"uint256"},{"internalType":"uint256","name":"death","type":"uint256"},{"internalType":"uint256","name":"invincible","type":"uint256"},{"internalType":"uint256","name":"lastHope","type":"uint256"},{"internalType":"uint256","name":"dodge","type":"uint256"},{"internalType":"uint256","name":"healBlock","type":"uint256"},{"internalType":"uint256","name":"charm","type":"uint256"},{"internalType":"uint256","name":"counter","type":"uint256"},{"internalType":"uint256","name":"pierce","type":"uint256"},{"internalType":"uint256","name":"cleave","type":"uint256"},{"internalType":"uint256","name":"revive","type":"uint256"},{"internalType":"uint256","name":"unstoppable","type":"uint256"},{"internalType":"uint256","name":"petrify","type":"uint256"},{"internalType":"uint256","name":"fireResist","type":"uint256"},{"internalType":"uint256","name":"poisonResist","type":"uint256"},{"internalType":"uint256","name":"freezeResist","type":"uint256"},{"internalType":"uint256","name":"stunResist","type":"uint256"},{"internalType":"uint256","name":"sleepResist","type":"uint256"},{"internalType":"uint256","name":"charged","type":"uint256"},{"internalType":"uint256","name":"doubleUp","type":"uint256"},{"internalType":"uint256","name":"rampage","type":"uint256"},{"internalType":"uint256","name":"loneSurvivor","type":"uint256"},{"internalType":"uint256","name":"royalDecree","type":"uint256"},{"internalType":"uint256","name":"wrathfulReprisal","type":"uint256"}],"internalType":"struct MowseDungeonSimpleStatusEffect","name":"statusEffects","type":"tuple"},{"internalType":"string","name":"image","type":"string"}],"internalType":"struct MowseDungeonSimpleMonster","name":"monster1","type":"tuple"},{"components":[{"internalType":"enum MowseDungeonMonsterEnum","name":"monsterType","type":"uint8"},{"internalType":"uint256","name":"monsterId","type":"uint256"},{"internalType":"uint256","name":"maxHealth","type":"uint256"},{"internalType":"uint256","name":"currentHealth","type":"uint256"},{"internalType":"uint256","name":"shield","type":"uint256"},{"internalType":"uint256","name":"attack","type":"uint256"},{"internalType":"bool","name":"canHit","type":"bool"},{"internalType":"uint256","name":"accuracy","type":"uint256"},{"internalType":"uint256","name":"tempAttack","type":"uint256"},{"internalType":"uint256","name":"damageMultiplier","type":"uint256"},{"internalType":"enum MowseDungeonSpecialAbilityEnum","name":"specialAbility","type":"uint8"},{"internalType":"bool","name":"isBoss","type":"bool"},{"internalType":"bool","name":"hasBeenStolen","type":"bool"},{"internalType":"bool","name":"usedSpecialAbility","type":"bool"},{"components":[{"internalType":"uint256","name":"blind","type":"uint256"},{"internalType":"uint256","name":"eagleEye","type":"uint256"},{"internalType":"uint256","name":"poison","type":"uint256"},{"internalType":"uint256","name":"burn","type":"uint256"},{"internalType":"uint256","name":"bleed","type":"uint256"},{"internalType":"uint256","name":"curse","type":"uint256"},{"internalType":"uint256","name":"stun","type":"uint256"},{"internalType":"uint256","name":"silence","type":"uint256"},{"internalType":"uint256","name":"freeze","type":"uint256"},{"internalType":"uint256","name":"strengthen","type":"uint256"},{"internalType":"uint256","name":"weaken","type":"uint256"},{"internalType":"uint256","name":"bulk","type":"uint256"},{"internalType":"uint256","name":"frail","type":"uint256"},{"internalType":"uint256","name":"thorns","type":"uint256"},{"internalType":"uint256","name":"regen","type":"uint256"},{"internalType":"uint256","name":"sleep","type":"uint256"},{"internalType":"uint256","name":"death","type":"uint256"},{"internalType":"uint256","name":"invincible","type":"uint256"},{"internalType":"uint256","name":"lastHope","type":"uint256"},{"internalType":"uint256","name":"dodge","type":"uint256"},{"internalType":"uint256","name":"healBlock","type":"uint256"},{"internalType":"uint256","name":"charm","type":"uint256"},{"internalType":"uint256","name":"counter","type":"uint256"},{"internalType":"uint256","name":"pierce","type":"uint256"},{"internalType":"uint256","name":"cleave","type":"uint256"},{"internalType":"uint256","name":"revive","type":"uint256"},{"internalType":"uint256","name":"unstoppable","type":"uint256"},{"internalType":"uint256","name":"petrify","type":"uint256"},{"internalType":"uint256","name":"fireResist","type":"uint256"},{"internalType":"uint256","name":"poisonResist","type":"uint256"},{"internalType":"uint256","name":"freezeResist","type":"uint256"},{"internalType":"uint256","name":"stunResist","type":"uint256"},{"internalType":"uint256","name":"sleepResist","type":"uint256"},{"internalType":"uint256","name":"charged","type":"uint256"},{"internalType":"uint256","name":"doubleUp","type":"uint256"},{"internalType":"uint256","name":"rampage","type":"uint256"},{"internalType":"uint256","name":"loneSurvivor","type":"uint256"},{"internalType":"uint256","name":"royalDecree","type":"uint256"},{"internalType":"uint256","name":"wrathfulReprisal","type":"uint256"}],"internalType":"struct MowseDungeonSimpleStatusEffect","name":"statusEffects","type":"tuple"},{"internalType":"string","name":"image","type":"string"}],"internalType":"struct MowseDungeonSimpleMonster","name":"monster2","type":"tuple"},{"components":[{"internalType":"enum MowseDungeonMonsterEnum","name":"monsterType","type":"uint8"},{"internalType":"uint256","name":"monsterId","type":"uint256"},{"internalType":"uint256","name":"maxHealth","type":"uint256"},{"internalType":"uint256","name":"currentHealth","type":"uint256"},{"internalType":"uint256","name":"shield","type":"uint256"},{"internalType":"uint256","name":"attack","type":"uint256"},{"internalType":"bool","name":"canHit","type":"bool"},{"internalType":"uint256","name":"accuracy","type":"uint256"},{"internalType":"uint256","name":"tempAttack","type":"uint256"},{"internalType":"uint256","name":"damageMultiplier","type":"uint256"},{"internalType":"enum MowseDungeonSpecialAbilityEnum","name":"specialAbility","type":"uint8"},{"internalType":"bool","name":"isBoss","type":"bool"},{"internalType":"bool","name":"hasBeenStolen","type":"bool"},{"internalType":"bool","name":"usedSpecialAbility","type":"bool"},{"components":[{"internalType":"uint256","name":"blind","type":"uint256"},{"internalType":"uint256","name":"eagleEye","type":"uint256"},{"internalType":"uint256","name":"poison","type":"uint256"},{"internalType":"uint256","name":"burn","type":"uint256"},{"internalType":"uint256","name":"bleed","type":"uint256"},{"internalType":"uint256","name":"curse","type":"uint256"},{"internalType":"uint256","name":"stun","type":"uint256"},{"internalType":"uint256","name":"silence","type":"uint256"},{"internalType":"uint256","name":"freeze","type":"uint256"},{"internalType":"uint256","name":"strengthen","type":"uint256"},{"internalType":"uint256","name":"weaken","type":"uint256"},{"internalType":"uint256","name":"bulk","type":"uint256"},{"internalType":"uint256","name":"frail","type":"uint256"},{"internalType":"uint256","name":"thorns","type":"uint256"},{"internalType":"uint256","name":"regen","type":"uint256"},{"internalType":"uint256","name":"sleep","type":"uint256"},{"internalType":"uint256","name":"death","type":"uint256"},{"internalType":"uint256","name":"invincible","type":"uint256"},{"internalType":"uint256","name":"lastHope","type":"uint256"},{"internalType":"uint256","name":"dodge","type":"uint256"},{"internalType":"uint256","name":"healBlock","type":"uint256"},{"internalType":"uint256","name":"charm","type":"uint256"},{"internalType":"uint256","name":"counter","type":"uint256"},{"internalType":"uint256","name":"pierce","type":"uint256"},{"internalType":"uint256","name":"cleave","type":"uint256"},{"internalType":"uint256","name":"revive","type":"uint256"},{"internalType":"uint256","name":"unstoppable","type":"uint256"},{"internalType":"uint256","name":"petrify","type":"uint256"},{"internalType":"uint256","name":"fireResist","type":"uint256"},{"internalType":"uint256","name":"poisonResist","type":"uint256"},{"internalType":"uint256","name":"freezeResist","type":"uint256"},{"internalType":"uint256","name":"stunResist","type":"uint256"},{"internalType":"uint256","name":"sleepResist","type":"uint256"},{"internalType":"uint256","name":"charged","type":"uint256"},{"internalType":"uint256","name":"doubleUp","type":"uint256"},{"internalType":"uint256","name":"rampage","type":"uint256"},{"internalType":"uint256","name":"loneSurvivor","type":"uint256"},{"internalType":"uint256","name":"royalDecree","type":"uint256"},{"internalType":"uint256","name":"wrathfulReprisal","type":"uint256"}],"internalType":"struct MowseDungeonSimpleStatusEffect","name":"statusEffects","type":"tuple"},{"internalType":"string","name":"image","type":"string"}],"internalType":"struct MowseDungeonSimpleMonster","name":"monster3","type":"tuple"},{"internalType":"uint256","name":"dungeonId","type":"uint256"},{"internalType":"uint256","name":"seed","type":"uint256"},{"internalType":"enum MowseDungeonActionTypeEnum","name":"actionType","type":"uint8"},{"internalType":"uint8","name":"targetIndex","type":"uint8"},{"internalType":"uint256","name":"actionsRun","type":"uint256"},{"internalType":"enum MowseDungeonTrinketEnum[]","name":"stolenTrinkets","type":"uint8[]"},{"internalType":"uint256","name":"stolenTrinketCount","type":"uint256"},{"internalType":"bool","name":"isStealSuccessful","type":"bool"},{"internalType":"enum MowseDungeonBattleStatusEnum","name":"status","type":"uint8"},{"components":[{"internalType":"uint256","name":"damageDealt","type":"uint256"},{"internalType":"uint256","name":"damageTaken","type":"uint256"},{"internalType":"uint256","name":"healthHealed","type":"uint256"},{"internalType":"uint256","name":"burnDamageDealt","type":"uint256"},{"internalType":"uint256","name":"poisonDamageDealt","type":"uint256"},{"internalType":"uint256","name":"bleedDamageDealt","type":"uint256"},{"internalType":"uint256","name":"curseDamageDealt","type":"uint256"},{"internalType":"uint256","name":"trinketsStolen","type":"uint256"}],"internalType":"struct MowseDungeonSimplePlayerAchievementsProgress","name":"achievementProgress","type":"tuple"},{"internalType":"uint256","name":"descentLevel","type":"uint256"},{"components":[{"internalType":"enum MowseDungeonBattleLogTypeEnum","name":"logType","type":"uint8"},{"internalType":"enum MowseDungeonBattleLogSourceEnum","name":"source","type":"uint8"},{"internalType":"enum MowseDungeonBattleLogSourceEnum","name":"target","type":"uint8"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct MowseDungeonBattleLog[]","name":"battleLog","type":"tuple[]"},{"internalType":"uint256","name":"battleLogCount","type":"uint256"}],"internalType":"struct MowseDungeonBattleSimulation","name":"_battleSimulation","type":"tuple"},{"internalType":"uint256","name":"_trinketId","type":"uint256"}],"name":"stealTrinket","outputs":[{"components":[{"components":[{"internalType":"uint256","name":"mowseId","type":"uint256"},{"internalType":"int32[7]","name":"stats","type":"int32[7]"},{"internalType":"uint256","name":"maxHealth","type":"uint256"},{"internalType":"uint256","name":"currentHealth","type":"uint256"},{"internalType":"uint256","name":"shield","type":"uint256"},{"internalType":"uint256","name":"attack","type":"uint256"},{"internalType":"bool","name":"canHit","type":"bool"},{"internalType":"uint256","name":"accuracy","type":"uint256"},{"internalType":"uint256","name":"tempAttack","type":"uint256"},{"internalType":"uint256","name":"damageMultiplier","type":"uint256"},{"internalType":"uint256","name":"action","type":"uint256"},{"internalType":"uint256","name":"numberOfHits","type":"uint256"},{"internalType":"enum MowseDungeonClassEnum","name":"class","type":"uint8"},{"components":[{"internalType":"uint256","name":"blind","type":"uint256"},{"internalType":"uint256","name":"eagleEye","type":"uint256"},{"internalType":"uint256","name":"poison","type":"uint256"},{"internalType":"uint256","name":"burn","type":"uint256"},{"internalType":"uint256","name":"bleed","type":"uint256"},{"internalType":"uint256","name":"curse","type":"uint256"},{"internalType":"uint256","name":"stun","type":"uint256"},{"internalType":"uint256","name":"silence","type":"uint256"},{"internalType":"uint256","name":"freeze","type":"uint256"},{"internalType":"uint256","name":"strengthen","type":"uint256"},{"internalType":"uint256","name":"weaken","type":"uint256"},{"internalType":"uint256","name":"bulk","type":"uint256"},{"internalType":"uint256","name":"frail","type":"uint256"},{"internalType":"uint256","name":"thorns","type":"uint256"},{"internalType":"uint256","name":"regen","type":"uint256"},{"internalType":"uint256","name":"sleep","type":"uint256"},{"internalType":"uint256","name":"death","type":"uint256"},{"internalType":"uint256","name":"invincible","type":"uint256"},{"internalType":"uint256","name":"lastHope","type":"uint256"},{"internalType":"uint256","name":"dodge","type":"uint256"},{"internalType":"uint256","name":"healBlock","type":"uint256"},{"internalType":"uint256","name":"charm","type":"uint256"},{"internalType":"uint256","name":"counter","type":"uint256"},{"internalType":"uint256","name":"pierce","type":"uint256"},{"internalType":"uint256","name":"cleave","type":"uint256"},{"internalType":"uint256","name":"revive","type":"uint256"},{"internalType":"uint256","name":"unstoppable","type":"uint256"},{"internalType":"uint256","name":"petrify","type":"uint256"},{"internalType":"uint256","name":"fireResist","type":"uint256"},{"internalType":"uint256","name":"poisonResist","type":"uint256"},{"internalType":"uint256","name":"freezeResist","type":"uint256"},{"internalType":"uint256","name":"stunResist","type":"uint256"},{"internalType":"uint256","name":"sleepResist","type":"uint256"},{"internalType":"uint256","name":"charged","type":"uint256"},{"internalType":"uint256","name":"doubleUp","type":"uint256"},{"internalType":"uint256","name":"rampage","type":"uint256"},{"internalType":"uint256","name":"loneSurvivor","type":"uint256"},{"internalType":"uint256","name":"royalDecree","type":"uint256"},{"internalType":"uint256","name":"wrathfulReprisal","type":"uint256"}],"internalType":"struct MowseDungeonSimpleStatusEffect","name":"statusEffects","type":"tuple"},{"components":[{"internalType":"uint256","name":"dagger","type":"uint256"},{"internalType":"uint256","name":"slingshot","type":"uint256"},{"internalType":"uint256","name":"pendantOfLife","type":"uint256"},{"internalType":"uint256","name":"leech","type":"uint256"},{"internalType":"uint256","name":"poisonDab","type":"uint256"},{"internalType":"uint256","name":"kindle","type":"uint256"},{"internalType":"uint256","name":"bloodLetter","type":"uint256"},{"internalType":"uint256","name":"cursedRing","type":"uint256"},{"internalType":"uint256","name":"stunRod","type":"uint256"},{"internalType":"uint256","name":"silenceBell","type":"uint256"},{"internalType":"uint256","name":"strengthBelt","type":"uint256"},{"internalType":"uint256","name":"weakenedChain","type":"uint256"},{"internalType":"uint256","name":"emblemOfInitiative","type":"uint256"},{"internalType":"uint256","name":"goldRing","type":"uint256"}],"internalType":"struct MowseDungeonSimpleTrinkets","name":"trinkets","type":"tuple"},{"components":[{"internalType":"enum MowseDungeonCompanionEnum","name":"companionId","type":"uint8"},{"internalType":"bool","name":"isUnlocked","type":"bool"},{"internalType":"uint256","name":"level","type":"uint256"},{"internalType":"uint256","name":"experience","type":"uint256"}],"internalType":"struct MowseDungeonCompanion","name":"companion","type":"tuple"},{"components":[{"internalType":"uint256","name":"forestDungeon","type":"uint256"},{"internalType":"uint256","name":"medievalDungeon","type":"uint256"}],"internalType":"struct MowseDungeonDescentLevel","name":"descentLevel","type":"tuple"},{"internalType":"uint256","name":"coins","type":"uint256"},{"internalType":"uint256","name":"currentDungeonRunCount","type":"uint256"},{"internalType":"uint256","name":"currentRoomIndex","type":"uint256"}],"internalType":"struct MowseDungeonSimplePlayer","name":"player","type":"tuple"},{"components":[{"internalType":"enum MowseDungeonMonsterEnum","name":"monsterType","type":"uint8"},{"internalType":"uint256","name":"monsterId","type":"uint256"},{"internalType":"uint256","name":"maxHealth","type":"uint256"},{"internalType":"uint256","name":"currentHealth","type":"uint256"},{"internalType":"uint256","name":"shield","type":"uint256"},{"internalType":"uint256","name":"attack","type":"uint256"},{"internalType":"bool","name":"canHit","type":"bool"},{"internalType":"uint256","name":"accuracy","type":"uint256"},{"internalType":"uint256","name":"tempAttack","type":"uint256"},{"internalType":"uint256","name":"damageMultiplier","type":"uint256"},{"internalType":"enum MowseDungeonSpecialAbilityEnum","name":"specialAbility","type":"uint8"},{"internalType":"bool","name":"isBoss","type":"bool"},{"internalType":"bool","name":"hasBeenStolen","type":"bool"},{"internalType":"bool","name":"usedSpecialAbility","type":"bool"},{"components":[{"internalType":"uint256","name":"blind","type":"uint256"},{"internalType":"uint256","name":"eagleEye","type":"uint256"},{"internalType":"uint256","name":"poison","type":"uint256"},{"internalType":"uint256","name":"burn","type":"uint256"},{"internalType":"uint256","name":"bleed","type":"uint256"},{"internalType":"uint256","name":"curse","type":"uint256"},{"internalType":"uint256","name":"stun","type":"uint256"},{"internalType":"uint256","name":"silence","type":"uint256"},{"internalType":"uint256","name":"freeze","type":"uint256"},{"internalType":"uint256","name":"strengthen","type":"uint256"},{"internalType":"uint256","name":"weaken","type":"uint256"},{"internalType":"uint256","name":"bulk","type":"uint256"},{"internalType":"uint256","name":"frail","type":"uint256"},{"internalType":"uint256","name":"thorns","type":"uint256"},{"internalType":"uint256","name":"regen","type":"uint256"},{"internalType":"uint256","name":"sleep","type":"uint256"},{"internalType":"uint256","name":"death","type":"uint256"},{"internalType":"uint256","name":"invincible","type":"uint256"},{"internalType":"uint256","name":"lastHope","type":"uint256"},{"internalType":"uint256","name":"dodge","type":"uint256"},{"internalType":"uint256","name":"healBlock","type":"uint256"},{"internalType":"uint256","name":"charm","type":"uint256"},{"internalType":"uint256","name":"counter","type":"uint256"},{"internalType":"uint256","name":"pierce","type":"uint256"},{"internalType":"uint256","name":"cleave","type":"uint256"},{"internalType":"uint256","name":"revive","type":"uint256"},{"internalType":"uint256","name":"unstoppable","type":"uint256"},{"internalType":"uint256","name":"petrify","type":"uint256"},{"internalType":"uint256","name":"fireResist","type":"uint256"},{"internalType":"uint256","name":"poisonResist","type":"uint256"},{"internalType":"uint256","name":"freezeResist","type":"uint256"},{"internalType":"uint256","name":"stunResist","type":"uint256"},{"internalType":"uint256","name":"sleepResist","type":"uint256"},{"internalType":"uint256","name":"charged","type":"uint256"},{"internalType":"uint256","name":"doubleUp","type":"uint256"},{"internalType":"uint256","name":"rampage","type":"uint256"},{"internalType":"uint256","name":"loneSurvivor","type":"uint256"},{"internalType":"uint256","name":"royalDecree","type":"uint256"},{"internalType":"uint256","name":"wrathfulReprisal","type":"uint256"}],"internalType":"struct MowseDungeonSimpleStatusEffect","name":"statusEffects","type":"tuple"},{"internalType":"string","name":"image","type":"string"}],"internalType":"struct MowseDungeonSimpleMonster","name":"monster1","type":"tuple"},{"components":[{"internalType":"enum MowseDungeonMonsterEnum","name":"monsterType","type":"uint8"},{"internalType":"uint256","name":"monsterId","type":"uint256"},{"internalType":"uint256","name":"maxHealth","type":"uint256"},{"internalType":"uint256","name":"currentHealth","type":"uint256"},{"internalType":"uint256","name":"shield","type":"uint256"},{"internalType":"uint256","name":"attack","type":"uint256"},{"internalType":"bool","name":"canHit","type":"bool"},{"internalType":"uint256","name":"accuracy","type":"uint256"},{"internalType":"uint256","name":"tempAttack","type":"uint256"},{"internalType":"uint256","name":"damageMultiplier","type":"uint256"},{"internalType":"enum MowseDungeonSpecialAbilityEnum","name":"specialAbility","type":"uint8"},{"internalType":"bool","name":"isBoss","type":"bool"},{"internalType":"bool","name":"hasBeenStolen","type":"bool"},{"internalType":"bool","name":"usedSpecialAbility","type":"bool"},{"components":[{"internalType":"uint256","name":"blind","type":"uint256"},{"internalType":"uint256","name":"eagleEye","type":"uint256"},{"internalType":"uint256","name":"poison","type":"uint256"},{"internalType":"uint256","name":"burn","type":"uint256"},{"internalType":"uint256","name":"bleed","type":"uint256"},{"internalType":"uint256","name":"curse","type":"uint256"},{"internalType":"uint256","name":"stun","type":"uint256"},{"internalType":"uint256","name":"silence","type":"uint256"},{"internalType":"uint256","name":"freeze","type":"uint256"},{"internalType":"uint256","name":"strengthen","type":"uint256"},{"internalType":"uint256","name":"weaken","type":"uint256"},{"internalType":"uint256","name":"bulk","type":"uint256"},{"internalType":"uint256","name":"frail","type":"uint256"},{"internalType":"uint256","name":"thorns","type":"uint256"},{"internalType":"uint256","name":"regen","type":"uint256"},{"internalType":"uint256","name":"sleep","type":"uint256"},{"internalType":"uint256","name":"death","type":"uint256"},{"internalType":"uint256","name":"invincible","type":"uint256"},{"internalType":"uint256","name":"lastHope","type":"uint256"},{"internalType":"uint256","name":"dodge","type":"uint256"},{"internalType":"uint256","name":"healBlock","type":"uint256"},{"internalType":"uint256","name":"charm","type":"uint256"},{"internalType":"uint256","name":"counter","type":"uint256"},{"internalType":"uint256","name":"pierce","type":"uint256"},{"internalType":"uint256","name":"cleave","type":"uint256"},{"internalType":"uint256","name":"revive","type":"uint256"},{"internalType":"uint256","name":"unstoppable","type":"uint256"},{"internalType":"uint256","name":"petrify","type":"uint256"},{"internalType":"uint256","name":"fireResist","type":"uint256"},{"internalType":"uint256","name":"poisonResist","type":"uint256"},{"internalType":"uint256","name":"freezeResist","type":"uint256"},{"internalType":"uint256","name":"stunResist","type":"uint256"},{"internalType":"uint256","name":"sleepResist","type":"uint256"},{"internalType":"uint256","name":"charged","type":"uint256"},{"internalType":"uint256","name":"doubleUp","type":"uint256"},{"internalType":"uint256","name":"rampage","type":"uint256"},{"internalType":"uint256","name":"loneSurvivor","type":"uint256"},{"internalType":"uint256","name":"royalDecree","type":"uint256"},{"internalType":"uint256","name":"wrathfulReprisal","type":"uint256"}],"internalType":"struct MowseDungeonSimpleStatusEffect","name":"statusEffects","type":"tuple"},{"internalType":"string","name":"image","type":"string"}],"internalType":"struct MowseDungeonSimpleMonster","name":"monster2","type":"tuple"},{"components":[{"internalType":"enum MowseDungeonMonsterEnum","name":"monsterType","type":"uint8"},{"internalType":"uint256","name":"monsterId","type":"uint256"},{"internalType":"uint256","name":"maxHealth","type":"uint256"},{"internalType":"uint256","name":"currentHealth","type":"uint256"},{"internalType":"uint256","name":"shield","type":"uint256"},{"internalType":"uint256","name":"attack","type":"uint256"},{"internalType":"bool","name":"canHit","type":"bool"},{"internalType":"uint256","name":"accuracy","type":"uint256"},{"internalType":"uint256","name":"tempAttack","type":"uint256"},{"internalType":"uint256","name":"damageMultiplier","type":"uint256"},{"internalType":"enum MowseDungeonSpecialAbilityEnum","name":"specialAbility","type":"uint8"},{"internalType":"bool","name":"isBoss","type":"bool"},{"internalType":"bool","name":"hasBeenStolen","type":"bool"},{"internalType":"bool","name":"usedSpecialAbility","type":"bool"},{"components":[{"internalType":"uint256","name":"blind","type":"uint256"},{"internalType":"uint256","name":"eagleEye","type":"uint256"},{"internalType":"uint256","name":"poison","type":"uint256"},{"internalType":"uint256","name":"burn","type":"uint256"},{"internalType":"uint256","name":"bleed","type":"uint256"},{"internalType":"uint256","name":"curse","type":"uint256"},{"internalType":"uint256","name":"stun","type":"uint256"},{"internalType":"uint256","name":"silence","type":"uint256"},{"internalType":"uint256","name":"freeze","type":"uint256"},{"internalType":"uint256","name":"strengthen","type":"uint256"},{"internalType":"uint256","name":"weaken","type":"uint256"},{"internalType":"uint256","name":"bulk","type":"uint256"},{"internalType":"uint256","name":"frail","type":"uint256"},{"internalType":"uint256","name":"thorns","type":"uint256"},{"internalType":"uint256","name":"regen","type":"uint256"},{"internalType":"uint256","name":"sleep","type":"uint256"},{"internalType":"uint256","name":"death","type":"uint256"},{"internalType":"uint256","name":"invincible","type":"uint256"},{"internalType":"uint256","name":"lastHope","type":"uint256"},{"internalType":"uint256","name":"dodge","type":"uint256"},{"internalType":"uint256","name":"healBlock","type":"uint256"},{"internalType":"uint256","name":"charm","type":"uint256"},{"internalType":"uint256","name":"counter","type":"uint256"},{"internalType":"uint256","name":"pierce","type":"uint256"},{"internalType":"uint256","name":"cleave","type":"uint256"},{"internalType":"uint256","name":"revive","type":"uint256"},{"internalType":"uint256","name":"unstoppable","type":"uint256"},{"internalType":"uint256","name":"petrify","type":"uint256"},{"internalType":"uint256","name":"fireResist","type":"uint256"},{"internalType":"uint256","name":"poisonResist","type":"uint256"},{"internalType":"uint256","name":"freezeResist","type":"uint256"},{"internalType":"uint256","name":"stunResist","type":"uint256"},{"internalType":"uint256","name":"sleepResist","type":"uint256"},{"internalType":"uint256","name":"charged","type":"uint256"},{"internalType":"uint256","name":"doubleUp","type":"uint256"},{"internalType":"uint256","name":"rampage","type":"uint256"},{"internalType":"uint256","name":"loneSurvivor","type":"uint256"},{"internalType":"uint256","name":"royalDecree","type":"uint256"},{"internalType":"uint256","name":"wrathfulReprisal","type":"uint256"}],"internalType":"struct MowseDungeonSimpleStatusEffect","name":"statusEffects","type":"tuple"},{"internalType":"string","name":"image","type":"string"}],"internalType":"struct MowseDungeonSimpleMonster","name":"monster3","type":"tuple"},{"internalType":"uint256","name":"dungeonId","type":"uint256"},{"internalType":"uint256","name":"seed","type":"uint256"},{"internalType":"enum MowseDungeonActionTypeEnum","name":"actionType","type":"uint8"},{"internalType":"uint8","name":"targetIndex","type":"uint8"},{"internalType":"uint256","name":"actionsRun","type":"uint256"},{"internalType":"enum MowseDungeonTrinketEnum[]","name":"stolenTrinkets","type":"uint8[]"},{"internalType":"uint256","name":"stolenTrinketCount","type":"uint256"},{"internalType":"bool","name":"isStealSuccessful","type":"bool"},{"internalType":"enum MowseDungeonBattleStatusEnum","name":"status","type":"uint8"},{"components":[{"internalType":"uint256","name":"damageDealt","type":"uint256"},{"internalType":"uint256","name":"damageTaken","type":"uint256"},{"internalType":"uint256","name":"healthHealed","type":"uint256"},{"internalType":"uint256","name":"burnDamageDealt","type":"uint256"},{"internalType":"uint256","name":"poisonDamageDealt","type":"uint256"},{"internalType":"uint256","name":"bleedDamageDealt","type":"uint256"},{"internalType":"uint256","name":"curseDamageDealt","type":"uint256"},{"internalType":"uint256","name":"trinketsStolen","type":"uint256"}],"internalType":"struct MowseDungeonSimplePlayerAchievementsProgress","name":"achievementProgress","type":"tuple"},{"internalType":"uint256","name":"descentLevel","type":"uint256"},{"components":[{"internalType":"enum MowseDungeonBattleLogTypeEnum","name":"logType","type":"uint8"},{"internalType":"enum MowseDungeonBattleLogSourceEnum","name":"source","type":"uint8"},{"internalType":"enum MowseDungeonBattleLogSourceEnum","name":"target","type":"uint8"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct MowseDungeonBattleLog[]","name":"battleLog","type":"tuple[]"},{"internalType":"uint256","name":"battleLogCount","type":"uint256"}],"internalType":"struct MowseDungeonBattleSimulation","name":"","type":"tuple"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"toSimplePlayerTrinkets","outputs":[{"components":[{"internalType":"uint256","name":"dagger","type":"uint256"},{"internalType":"uint256","name":"slingshot","type":"uint256"},{"internalType":"uint256","name":"pendantOfLife","type":"uint256"},{"internalType":"uint256","name":"leech","type":"uint256"},{"internalType":"uint256","name":"poisonDab","type":"uint256"},{"internalType":"uint256","name":"kindle","type":"uint256"},{"internalType":"uint256","name":"bloodLetter","type":"uint256"},{"internalType":"uint256","name":"cursedRing","type":"uint256"},{"internalType":"uint256","name":"stunRod","type":"uint256"},{"internalType":"uint256","name":"silenceBell","type":"uint256"},{"internalType":"uint256","name":"strengthBelt","type":"uint256"},{"internalType":"uint256","name":"weakenedChain","type":"uint256"},{"internalType":"uint256","name":"emblemOfInitiative","type":"uint256"},{"internalType":"uint256","name":"goldRing","type":"uint256"}],"internalType":"struct MowseDungeonSimpleTrinkets","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"enum MowseDungeonTrinketEnum","name":"trinketId","type":"uint8"},{"internalType":"uint256","name":"health","type":"uint256"},{"internalType":"uint256","name":"shield","type":"uint256"},{"internalType":"uint256","name":"attack","type":"uint256"}],"name":"updateTrinketStats","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50611dbe806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c806314f765e61461004657806369664b0f1461005b5780638c4b121014610084575b600080fd5b61005961005436600461094a565b6100a4565b005b61006e610069366004610983565b61021a565b60405161007b9190610a29565b60405180910390f35b610097610092366004611424565b610342565b60405161007b9190611b94565b600054604051632acd144760e21b81523360048201526001600160a01b039091169063ab34511c90602401602060405180830381865afa1580156100ec573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101109190611d3d565b6101585760405163718f3c1960e01b81526020600482015260146024820152734d75737420686176652041646d696e20526f6c6560601b604482015260640160405180910390fd5b826063600086600e81111561016f5761016f611613565b600e81111561018057610180611613565b815260200190815260200160002060020181905550816000606301600086600e8111156101af576101af611613565b600e8111156101c0576101c0611613565b815260200190815260200160002060030181905550806000606301600086600e8111156101ef576101ef611613565b600e81111561020057610200611613565b815260208101919091526040016000206004015550505050565b610222610506565b506000908152605b6020908152604080832081516101c081018352848052600891820180855283862060019081015483528087528186528487208101548387015260028752818652848720810154838601526003875281865284872081015460608401526004875281865284872081015460808401526005875281865284872081015460a08401526006875281865284872081015460c08401526007875281865284872081015460e084015292865280855283862083015461010083015260098652808552838620830154610120830152600a8652808552838620830154610140830152600b8652808552838620830154610160830152600c8652808552838620830154610180830152600d86529093529220909101546101a082015290565b61034a610575565b8160000361036d5782516101c0015180519061036582611d61565b9052506104fd565b8160010361038b5782516101c0015160200180519061036582611d61565b816002036103a95782516101c0015160400180519061036582611d61565b816003036103c75782516101c0015160600180519061036582611d61565b816004036103e55782516101c0015160800180519061036582611d61565b816005036104035782516101c0015160a00180519061036582611d61565b816006036104215782516101c0015160c00180519061036582611d61565b8160070361043f5782516101c0015160e00180519061036582611d61565b8160080361045e5782516101c001516101000180519061036582611d61565b8160090361047d5782516101c001516101200180519061036582611d61565b81600a0361049c5782516101c001516101400180519061036582611d61565b81600b036104bb5782516101c001516101600180519061036582611d61565b81600c036104da5782516101c001516101800180519061036582611d61565b81600d036104fd5782516101c001516101a0018051906104f982611d61565b9052505b50815b92915050565b604051806101c0016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b60405180610220016040528061058961066a565b8152602001610596610763565b81526020016105a3610763565b81526020016105b0610763565b81526020016000815260200160008152602001600060048111156105d6576105d6611613565b8152600060208201819052604082018190526060808301526080820181905260a0820181905260c090910190815260200161064f60405180610100016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b81526020016000815260200160608152602001600081525090565b604051806102800160405280600081526020016106856107fa565b81526020016000815260200160008152602001600081526020016000815260200160001515815260200160008152602001600081526020016000815260200160008152602001600081526020016000600a8111156106e5576106e5611613565b81526020016106f2610818565b81526020016106ff610506565b8152604080516080810182526000808252602082810182905292820181905260608201529101908152602001610748604051806040016040528060008152602001600081525090565b81526020016000815260200160008152602001600081525090565b60408051610200810190915280600081526020016000815260200160008152602001600081526020016000815260200160008152602001600015158152602001600081526020016000815260200160008152602001600060178111156107cb576107cb611613565b81526000602082018190526040820181905260608201526080016107ed610818565b8152602001606081525090565b6040518060e001604052806007906020820280368337509192915050565b604051806104e001604052806000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b8035600f811061094557600080fd5b919050565b6000806000806080858703121561096057600080fd5b61096985610936565b966020860135965060408601359560600135945092505050565b60006020828403121561099557600080fd5b5035919050565b805182526020808201519083015260408082015190830152606080820151908301526080808201519083015260a0808201519083015260c0808201519083015260e08082015190830152610100808201519083015261012080820151908301526101408082015190830152610160808201519083015261018080820151908301526101a090810151910152565b6101c08101610500828461099c565b634e487b7160e01b600052604160045260246000fd5b6040516104e081016001600160401b0381118282101715610a7157610a71610a38565b60405290565b6040516101c081016001600160401b0381118282101715610a7157610a71610a38565b604051608081016001600160401b0381118282101715610a7157610a71610a38565b60405161028081016001600160401b0381118282101715610a7157610a71610a38565b60405161020081016001600160401b0381118282101715610a7157610a71610a38565b60405161022081016001600160401b0381118282101715610a7157610a71610a38565b604051601f8201601f191681016001600160401b0381118282101715610b4d57610b4d610a38565b604052919050565b600082601f830112610b6657600080fd5b60405160e081018181106001600160401b0382111715610b8857610b88610a38565b6040528060e0840185811115610b9d57600080fd5b845b81811015610bc75780358060030b8114610bb95760008081fd5b835260209283019201610b9f565b509195945050505050565b8015158114610be057600080fd5b50565b803561094581610bd2565b8035600b811061094557600080fd5b60006104e08284031215610c1057600080fd5b610c18610a4e565b823581526020808401359082015260408084013590820152606080840135908201526080808401359082015260a0808401359082015260c0808401359082015260e08084013590820152610100808401359082015261012080840135908201526101408084013590820152610160808401359082015261018080840135908201526101a080840135908201526101c080840135908201526101e08084013590820152610200808401359082015261022080840135908201526102408084013590820152610260808401359082015261028080840135908201526102a080840135908201526102c080840135908201526102e08084013590820152610300808401359082015261032080840135908201526103408084013590820152610360808401359082015261038080840135908201526103a080840135908201526103c080840135908201526103e08084013590820152610400808401359082015261042080840135908201526104408084013590820152610460808401359082015261048080840135908201526104a080840135908201526104c0928301359281019290925250919050565b60006101c08284031215610dd357600080fd5b610ddb610a77565b9050813581526020820135602082015260408201356040820152606082013560608201526080820135608082015260a082013560a082015260c082013560c082015260e082013560e08201526101008083013581830152506101208083013581830152506101408083013581830152506101608083013581830152506101808083013581830152506101a080830135818301525092915050565b60058110610be057600080fd5b803561094581610e75565b600060808284031215610e9f57600080fd5b610ea7610a9a565b90508135610eb481610e75565b81526020820135610ec481610bd2565b80602083015250604082013560408201526060820135606082015292915050565b600060408284031215610ef757600080fd5b604051604081018181106001600160401b0382111715610f1957610f19610a38565b604052823581526020928301359281019290925250919050565b6000610a208284031215610f4657600080fd5b610f4e610abc565b905081358152610f618360208401610b55565b60208201526101008083013560408301526101208084013560608401526101408085013560808501526101608086013560a0860152610180610fa4818801610be3565b60c08701526101a08088013560e08801526101c080890135878901526101e09650868901358689015261020095508589013585890152610220945084890135848901526102409350610ff7848a01610bee565b83890152610260925061100c8a848b01610bfd565b8289015261101e8a6107408b01610dc0565b9088015250611031886109008901610e8d565b85870152611043886109808901610ee5565b848701526109c0870135838701526109e087013582870152610a0087013581870152505050505092915050565b8035601c811061094557600080fd5b80356018811061094557600080fd5b600082601f83011261109f57600080fd5b81356001600160401b038111156110b8576110b8610a38565b6110cb601f8201601f1916602001610b25565b8181528460208386010111156110e057600080fd5b816020850160208301376000918101602001919091529392505050565b60006106c0828403121561111057600080fd5b611118610adf565b905061112382611070565b81526020820135602082015260408201356040820152606082013560608201526080820135608082015260a082013560a082015261116360c08301610be3565b60c082015260e082810135908201526101008083013590820152610120808301359082015261014061119681840161107f565b908201526101606111a8838201610be3565b908201526101806111ba838201610be3565b908201526101a06111cc838201610be3565b908201526101c06111df84848301610bfd565b908201526106a08201356001600160401b038111156111fd57600080fd5b6112098482850161108e565b6101e08301525092915050565b803560ff8116811461094557600080fd5b60006001600160401b0382111561124057611240610a38565b5060051b60200190565b600082601f83011261125b57600080fd5b8135602061127061126b83611227565b610b25565b82815260059290921b8401810191818101908684111561128f57600080fd5b8286015b848110156112b1576112a481610936565b8352918301918301611293565b509695505050505050565b80356003811061094557600080fd5b60006101008083850312156112df57600080fd5b604051908101906001600160401b038211818310171561130157611301610a38565b81604052809250833581526020840135602082015260408401356040820152606084013560608201526080840135608082015260a084013560a082015260c084013560c082015260e084013560e0820152505092915050565b8035602f811061094557600080fd5b600082601f83011261137a57600080fd5b8135602061138a61126b83611227565b828152600792831b85018201928282019190878511156113a957600080fd5b8387015b85811015611417576080818a0312156113c65760008081fd5b6113ce610a9a565b81358381106113dd5760008081fd5b81526113ea82870161135a565b8682015260406113fb81840161135a565b90820152606082810135908201528452928401926080016113ad565b5090979650505050505050565b6000806040838503121561143757600080fd5b82356001600160401b038082111561144e57600080fd5b90840190610d00828703121561146357600080fd5b61146b610b02565b6114758784610f33565b8152610a208301358281111561148a57600080fd5b611496888286016110fd565b602083015250610a40830135828111156114af57600080fd5b6114bb888286016110fd565b604083015250610a60830135828111156114d457600080fd5b6114e0888286016110fd565b606083015250610a808301356080820152610aa083013560a0820152611509610ac08401610e82565b60c082015261151b610ae08401611216565b60e0820152610b00830135610100820152610b208301358281111561153f57600080fd5b61154b8882860161124a565b61012083015250610b4083013561014082015261156b610b608401610be3565b61016082015261157e610b8084016112bc565b61018082015261159287610ba085016112cb565b6101a0820152610ca08301356101c0820152610cc0830135828111156115b757600080fd5b6115c388828601611369565b6101e083015250610ce0929092013561020083015250946020939093013593505050565b8060005b600781101561160d57815160030b8452602093840193909101906001016115eb565b50505050565b634e487b7160e01b600052602160045260246000fd5b600b811061163957611639611613565b9052565b805182526020808201519083015260408082015190830152606080820151908301526080808201519083015260a0808201519083015260c0808201519083015260e08082015190830152610100808201519083015261012080820151908301526101408082015190830152610160808201519083015261018080820151908301526101a080820151908301526101c080820151908301526101e08082015190830152610200808201519083015261022080820151908301526102408082015190830152610260808201519083015261028080820151908301526102a080820151908301526102c080820151908301526102e08082015190830152610300808201519083015261032080820151908301526103408082015190830152610360808201519083015261038080820151908301526103a080820151908301526103c080820151908301526103e08082015190830152610400808201519083015261042080820151908301526104408082015190830152610460808201519083015261048080820151908301526104a080820151908301526104c090810151910152565b60058110610be057610be0611613565b80516117f8816117dd565b825260208181015115159083015260408082015190830152606090810151910152565b80518252602081015161183160208401826115e7565b506040810151610100818185015260608301519150610120828186015260808401519250610140838187015260a08501519350610160848188015260c086015194506101806118838189018715159052565b60e08701516101a089810191909152948701516101c0808a0191909152938701516101e0808a019190915292870151610200808a019190915291870151610220808a0191909152908701519550929391929091610240906118e6828a0188611629565b87015195506102606118fa8982018861163d565b85880151965061190e6107408a018861099c565b8488015196506119226109008a01886117ed565b9287015180516109808a0152602001516109a0890152908601516109c08801528501516109e087015290930151610a0090940193909352505050565b601c811061163957611639611613565b6018811061163957611639611613565b6000815180845260005b818110156119a457602081850181015186830182015201611988565b506000602082860101526020601f19601f83011685010191505092915050565b60006106c06119d484845161195e565b6020830151602085015260408301516040850152606083015160608501526080830151608085015260a083015160a085015260c0830151611a1960c086018215159052565b5060e083810151908501526101008084015190850152610120808401519085015261014080840151611a4d8287018261196e565b505061016083810151151590850152610180808401511515908501526101a0808401511515908501526101c080840151611a898287018261163d565b50506101e0830151816106a0860152611aa48286018261197e565b95945050505050565b611639816117dd565b600081518084526020808501945080840160005b83811015611af6578151600f8110611ae457611ae4611613565b87529582019590820190600101611aca565b509495945050505050565b6003811061163957611639611613565b602f811061163957611639611613565b600081518084526020808501945080840160005b83811015611af6578151805160078110611b5157611b51611613565b885280840151611b63858a0182611b11565b50604080820151611b76828b0182611b11565b50506060908101519088015260809096019590820190600101611b35565b60208152611ba660208201835161181b565b60006020830151610d0080610a40850152611bc5610d208501836119c4565b91506040850151601f198086850301610a60870152611be484836119c4565b9350606087015191508086850301610a80870152611c0284836119c4565b93506080870151610aa087015260a0870151610ac087015260c08701519150611c2f610ae0870183611aad565b60e087015160ff16610b00870152610100870151610b208701526101208701518685038201610b408801529150611c668483611ab6565b9350610140870151610b608701526101608701519150611c8b610b8087018315159052565b6101808701519150611ca1610ba0870183611b01565b6101a08701518051610bc08801526020810151610be08801526040810151610c008801526060810151610c208801526080810151610c4088015260a0810151610c6088015260c0810151610c8088015260e00151610ca08701526101c0870151610cc08701526101e0870151868503909101610ce08701529050611d258382611b21565b92505061020085015181850152508091505092915050565b600060208284031215611d4f57600080fd5b8151611d5a81610bd2565b9392505050565b600060018201611d8157634e487b7160e01b600052601160045260246000fd5b506001019056fea264697066735822122057f1b9b167c0c3cbc865b7042fce2c10ecb586d1f8f88b69fed935415adee11564736f6c63430008130033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100415760003560e01c806314f765e61461004657806369664b0f1461005b5780638c4b121014610084575b600080fd5b61005961005436600461094a565b6100a4565b005b61006e610069366004610983565b61021a565b60405161007b9190610a29565b60405180910390f35b610097610092366004611424565b610342565b60405161007b9190611b94565b600054604051632acd144760e21b81523360048201526001600160a01b039091169063ab34511c90602401602060405180830381865afa1580156100ec573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101109190611d3d565b6101585760405163718f3c1960e01b81526020600482015260146024820152734d75737420686176652041646d696e20526f6c6560601b604482015260640160405180910390fd5b826063600086600e81111561016f5761016f611613565b600e81111561018057610180611613565b815260200190815260200160002060020181905550816000606301600086600e8111156101af576101af611613565b600e8111156101c0576101c0611613565b815260200190815260200160002060030181905550806000606301600086600e8111156101ef576101ef611613565b600e81111561020057610200611613565b815260208101919091526040016000206004015550505050565b610222610506565b506000908152605b6020908152604080832081516101c081018352848052600891820180855283862060019081015483528087528186528487208101548387015260028752818652848720810154838601526003875281865284872081015460608401526004875281865284872081015460808401526005875281865284872081015460a08401526006875281865284872081015460c08401526007875281865284872081015460e084015292865280855283862083015461010083015260098652808552838620830154610120830152600a8652808552838620830154610140830152600b8652808552838620830154610160830152600c8652808552838620830154610180830152600d86529093529220909101546101a082015290565b61034a610575565b8160000361036d5782516101c0015180519061036582611d61565b9052506104fd565b8160010361038b5782516101c0015160200180519061036582611d61565b816002036103a95782516101c0015160400180519061036582611d61565b816003036103c75782516101c0015160600180519061036582611d61565b816004036103e55782516101c0015160800180519061036582611d61565b816005036104035782516101c0015160a00180519061036582611d61565b816006036104215782516101c0015160c00180519061036582611d61565b8160070361043f5782516101c0015160e00180519061036582611d61565b8160080361045e5782516101c001516101000180519061036582611d61565b8160090361047d5782516101c001516101200180519061036582611d61565b81600a0361049c5782516101c001516101400180519061036582611d61565b81600b036104bb5782516101c001516101600180519061036582611d61565b81600c036104da5782516101c001516101800180519061036582611d61565b81600d036104fd5782516101c001516101a0018051906104f982611d61565b9052505b50815b92915050565b604051806101c0016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b60405180610220016040528061058961066a565b8152602001610596610763565b81526020016105a3610763565b81526020016105b0610763565b81526020016000815260200160008152602001600060048111156105d6576105d6611613565b8152600060208201819052604082018190526060808301526080820181905260a0820181905260c090910190815260200161064f60405180610100016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b81526020016000815260200160608152602001600081525090565b604051806102800160405280600081526020016106856107fa565b81526020016000815260200160008152602001600081526020016000815260200160001515815260200160008152602001600081526020016000815260200160008152602001600081526020016000600a8111156106e5576106e5611613565b81526020016106f2610818565b81526020016106ff610506565b8152604080516080810182526000808252602082810182905292820181905260608201529101908152602001610748604051806040016040528060008152602001600081525090565b81526020016000815260200160008152602001600081525090565b60408051610200810190915280600081526020016000815260200160008152602001600081526020016000815260200160008152602001600015158152602001600081526020016000815260200160008152602001600060178111156107cb576107cb611613565b81526000602082018190526040820181905260608201526080016107ed610818565b8152602001606081525090565b6040518060e001604052806007906020820280368337509192915050565b604051806104e001604052806000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b8035600f811061094557600080fd5b919050565b6000806000806080858703121561096057600080fd5b61096985610936565b966020860135965060408601359560600135945092505050565b60006020828403121561099557600080fd5b5035919050565b805182526020808201519083015260408082015190830152606080820151908301526080808201519083015260a0808201519083015260c0808201519083015260e08082015190830152610100808201519083015261012080820151908301526101408082015190830152610160808201519083015261018080820151908301526101a090810151910152565b6101c08101610500828461099c565b634e487b7160e01b600052604160045260246000fd5b6040516104e081016001600160401b0381118282101715610a7157610a71610a38565b60405290565b6040516101c081016001600160401b0381118282101715610a7157610a71610a38565b604051608081016001600160401b0381118282101715610a7157610a71610a38565b60405161028081016001600160401b0381118282101715610a7157610a71610a38565b60405161020081016001600160401b0381118282101715610a7157610a71610a38565b60405161022081016001600160401b0381118282101715610a7157610a71610a38565b604051601f8201601f191681016001600160401b0381118282101715610b4d57610b4d610a38565b604052919050565b600082601f830112610b6657600080fd5b60405160e081018181106001600160401b0382111715610b8857610b88610a38565b6040528060e0840185811115610b9d57600080fd5b845b81811015610bc75780358060030b8114610bb95760008081fd5b835260209283019201610b9f565b509195945050505050565b8015158114610be057600080fd5b50565b803561094581610bd2565b8035600b811061094557600080fd5b60006104e08284031215610c1057600080fd5b610c18610a4e565b823581526020808401359082015260408084013590820152606080840135908201526080808401359082015260a0808401359082015260c0808401359082015260e08084013590820152610100808401359082015261012080840135908201526101408084013590820152610160808401359082015261018080840135908201526101a080840135908201526101c080840135908201526101e08084013590820152610200808401359082015261022080840135908201526102408084013590820152610260808401359082015261028080840135908201526102a080840135908201526102c080840135908201526102e08084013590820152610300808401359082015261032080840135908201526103408084013590820152610360808401359082015261038080840135908201526103a080840135908201526103c080840135908201526103e08084013590820152610400808401359082015261042080840135908201526104408084013590820152610460808401359082015261048080840135908201526104a080840135908201526104c0928301359281019290925250919050565b60006101c08284031215610dd357600080fd5b610ddb610a77565b9050813581526020820135602082015260408201356040820152606082013560608201526080820135608082015260a082013560a082015260c082013560c082015260e082013560e08201526101008083013581830152506101208083013581830152506101408083013581830152506101608083013581830152506101808083013581830152506101a080830135818301525092915050565b60058110610be057600080fd5b803561094581610e75565b600060808284031215610e9f57600080fd5b610ea7610a9a565b90508135610eb481610e75565b81526020820135610ec481610bd2565b80602083015250604082013560408201526060820135606082015292915050565b600060408284031215610ef757600080fd5b604051604081018181106001600160401b0382111715610f1957610f19610a38565b604052823581526020928301359281019290925250919050565b6000610a208284031215610f4657600080fd5b610f4e610abc565b905081358152610f618360208401610b55565b60208201526101008083013560408301526101208084013560608401526101408085013560808501526101608086013560a0860152610180610fa4818801610be3565b60c08701526101a08088013560e08801526101c080890135878901526101e09650868901358689015261020095508589013585890152610220945084890135848901526102409350610ff7848a01610bee565b83890152610260925061100c8a848b01610bfd565b8289015261101e8a6107408b01610dc0565b9088015250611031886109008901610e8d565b85870152611043886109808901610ee5565b848701526109c0870135838701526109e087013582870152610a0087013581870152505050505092915050565b8035601c811061094557600080fd5b80356018811061094557600080fd5b600082601f83011261109f57600080fd5b81356001600160401b038111156110b8576110b8610a38565b6110cb601f8201601f1916602001610b25565b8181528460208386010111156110e057600080fd5b816020850160208301376000918101602001919091529392505050565b60006106c0828403121561111057600080fd5b611118610adf565b905061112382611070565b81526020820135602082015260408201356040820152606082013560608201526080820135608082015260a082013560a082015261116360c08301610be3565b60c082015260e082810135908201526101008083013590820152610120808301359082015261014061119681840161107f565b908201526101606111a8838201610be3565b908201526101806111ba838201610be3565b908201526101a06111cc838201610be3565b908201526101c06111df84848301610bfd565b908201526106a08201356001600160401b038111156111fd57600080fd5b6112098482850161108e565b6101e08301525092915050565b803560ff8116811461094557600080fd5b60006001600160401b0382111561124057611240610a38565b5060051b60200190565b600082601f83011261125b57600080fd5b8135602061127061126b83611227565b610b25565b82815260059290921b8401810191818101908684111561128f57600080fd5b8286015b848110156112b1576112a481610936565b8352918301918301611293565b509695505050505050565b80356003811061094557600080fd5b60006101008083850312156112df57600080fd5b604051908101906001600160401b038211818310171561130157611301610a38565b81604052809250833581526020840135602082015260408401356040820152606084013560608201526080840135608082015260a084013560a082015260c084013560c082015260e084013560e0820152505092915050565b8035602f811061094557600080fd5b600082601f83011261137a57600080fd5b8135602061138a61126b83611227565b828152600792831b85018201928282019190878511156113a957600080fd5b8387015b85811015611417576080818a0312156113c65760008081fd5b6113ce610a9a565b81358381106113dd5760008081fd5b81526113ea82870161135a565b8682015260406113fb81840161135a565b90820152606082810135908201528452928401926080016113ad565b5090979650505050505050565b6000806040838503121561143757600080fd5b82356001600160401b038082111561144e57600080fd5b90840190610d00828703121561146357600080fd5b61146b610b02565b6114758784610f33565b8152610a208301358281111561148a57600080fd5b611496888286016110fd565b602083015250610a40830135828111156114af57600080fd5b6114bb888286016110fd565b604083015250610a60830135828111156114d457600080fd5b6114e0888286016110fd565b606083015250610a808301356080820152610aa083013560a0820152611509610ac08401610e82565b60c082015261151b610ae08401611216565b60e0820152610b00830135610100820152610b208301358281111561153f57600080fd5b61154b8882860161124a565b61012083015250610b4083013561014082015261156b610b608401610be3565b61016082015261157e610b8084016112bc565b61018082015261159287610ba085016112cb565b6101a0820152610ca08301356101c0820152610cc0830135828111156115b757600080fd5b6115c388828601611369565b6101e083015250610ce0929092013561020083015250946020939093013593505050565b8060005b600781101561160d57815160030b8452602093840193909101906001016115eb565b50505050565b634e487b7160e01b600052602160045260246000fd5b600b811061163957611639611613565b9052565b805182526020808201519083015260408082015190830152606080820151908301526080808201519083015260a0808201519083015260c0808201519083015260e08082015190830152610100808201519083015261012080820151908301526101408082015190830152610160808201519083015261018080820151908301526101a080820151908301526101c080820151908301526101e08082015190830152610200808201519083015261022080820151908301526102408082015190830152610260808201519083015261028080820151908301526102a080820151908301526102c080820151908301526102e08082015190830152610300808201519083015261032080820151908301526103408082015190830152610360808201519083015261038080820151908301526103a080820151908301526103c080820151908301526103e08082015190830152610400808201519083015261042080820151908301526104408082015190830152610460808201519083015261048080820151908301526104a080820151908301526104c090810151910152565b60058110610be057610be0611613565b80516117f8816117dd565b825260208181015115159083015260408082015190830152606090810151910152565b80518252602081015161183160208401826115e7565b506040810151610100818185015260608301519150610120828186015260808401519250610140838187015260a08501519350610160848188015260c086015194506101806118838189018715159052565b60e08701516101a089810191909152948701516101c0808a0191909152938701516101e0808a019190915292870151610200808a019190915291870151610220808a0191909152908701519550929391929091610240906118e6828a0188611629565b87015195506102606118fa8982018861163d565b85880151965061190e6107408a018861099c565b8488015196506119226109008a01886117ed565b9287015180516109808a0152602001516109a0890152908601516109c08801528501516109e087015290930151610a0090940193909352505050565b601c811061163957611639611613565b6018811061163957611639611613565b6000815180845260005b818110156119a457602081850181015186830182015201611988565b506000602082860101526020601f19601f83011685010191505092915050565b60006106c06119d484845161195e565b6020830151602085015260408301516040850152606083015160608501526080830151608085015260a083015160a085015260c0830151611a1960c086018215159052565b5060e083810151908501526101008084015190850152610120808401519085015261014080840151611a4d8287018261196e565b505061016083810151151590850152610180808401511515908501526101a0808401511515908501526101c080840151611a898287018261163d565b50506101e0830151816106a0860152611aa48286018261197e565b95945050505050565b611639816117dd565b600081518084526020808501945080840160005b83811015611af6578151600f8110611ae457611ae4611613565b87529582019590820190600101611aca565b509495945050505050565b6003811061163957611639611613565b602f811061163957611639611613565b600081518084526020808501945080840160005b83811015611af6578151805160078110611b5157611b51611613565b885280840151611b63858a0182611b11565b50604080820151611b76828b0182611b11565b50506060908101519088015260809096019590820190600101611b35565b60208152611ba660208201835161181b565b60006020830151610d0080610a40850152611bc5610d208501836119c4565b91506040850151601f198086850301610a60870152611be484836119c4565b9350606087015191508086850301610a80870152611c0284836119c4565b93506080870151610aa087015260a0870151610ac087015260c08701519150611c2f610ae0870183611aad565b60e087015160ff16610b00870152610100870151610b208701526101208701518685038201610b408801529150611c668483611ab6565b9350610140870151610b608701526101608701519150611c8b610b8087018315159052565b6101808701519150611ca1610ba0870183611b01565b6101a08701518051610bc08801526020810151610be08801526040810151610c008801526060810151610c208801526080810151610c4088015260a0810151610c6088015260c0810151610c8088015260e00151610ca08701526101c0870151610cc08701526101e0870151868503909101610ce08701529050611d258382611b21565b92505061020085015181850152508091505092915050565b600060208284031215611d4f57600080fd5b8151611d5a81610bd2565b9392505050565b600060018201611d8157634e487b7160e01b600052601160045260246000fd5b506001019056fea264697066735822122057f1b9b167c0c3cbc865b7042fce2c10ecb586d1f8f88b69fed935415adee11564736f6c63430008130033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.