BscScan - Sponsored slots available. Book your slot here!
Source Code
Overview
BNB Balance
BNB Value
$0.00Cross-Chain Transactions
Loading...
Loading
Contract Name:
MafiaBasicCrime
Compiler Version
v0.8.24+commit.e11b9ed9
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.24;
import { OwnableUpgradeable } from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import { IMafiaGameBank } from "../interfaces/IMafiaGameBank.sol";
import { IMafiaRankXp } from "../interfaces/IMafiaRankXp.sol";
import { IMafiaJail } from "../interfaces/IMafiaJail.sol";
import { IMafiaPlayerStatusChecker } from "../interfaces/AuthorizationCenter/IMafiaPlayerStatusChecker.sol";
import { IMafiaHelperBot } from "../interfaces/IMafiaHelperBot.sol";
import { IMafiaPerkCalculator } from "../interfaces/IMafiaPerkCalculator.sol";
import { RandLibrary } from "../../library/Rand.sol";
import { MafiaMessageLibrary } from "../interfaces/MessageCenter/MafiaMessage.sol";
import { IMafiaMessageCenter } from "../interfaces/MessageCenter/IMafiaMessageCenter.sol";
contract MafiaBasicCrime is OwnableUpgradeable {
IMafiaGameBank public gameBank;
IMafiaRankXp public rankXp;
IMafiaJail public jail;
mapping(address => uint256) public nextCrimeTime;
IMafiaHelperBot public helperBot;
// Perk categories
uint256 public constant CRIME_SUCCESS_PERK_CATEGORY = 18;
uint256 public constant CRIME_COOLDOWN_PERK_CATEGORY = 24;
uint256 public constant CRIME_CASH_REWARD_PERK_CATEGORY = 40;
uint256 public constant CRIME_NO_JAIL_PERK_CATEGORY = 42;
IMafiaPerkCalculator public perkCalculator;
IMafiaMessageCenter public messageCenter;
IMafiaPlayerStatusChecker public playerStatusChecker;
event NewCrime(address criminal, uint8 crimeType, bool isSuccess, bool isJailed, uint256 cashAmount, uint256 xpPoint, uint256 nextCrimeTime, uint256 timestamp);
function initialize(address gameBankAddress, address jailAddress, address rankXpAddress) external initializer {
gameBank = IMafiaGameBank(gameBankAddress);
jail = IMafiaJail(jailAddress);
rankXp = IMafiaRankXp(rankXpAddress);
__Ownable_init();
}
modifier excludeContract() {
require(msg.sender == tx.origin, "contract not allowed");
_;
}
modifier onlyActiveUser() {
require(playerStatusChecker.isUserInActive(msg.sender) == false, "jailed user");
_;
}
function makeCrime(uint8 crimeType) external excludeContract onlyActiveUser {
require(nextCrimeTime[msg.sender] <= block.timestamp, "crime cooldown");
require(crimeType < 4, "invalid crime type");
uint8 rankLevel = rankXp.getRankLevel(msg.sender);
uint256 successRate = getSuccessRate(rankLevel, crimeType);
successRate = perkCalculator.applySuccessRatePerk(msg.sender, CRIME_SUCCESS_PERK_CATEGORY, successRate);
uint256 maxCash;
uint256 minCash;
uint256 xpPoint = 100; // should be changed to 100
uint256 crimeCooldown = perkCalculator.applyCooldownPerk(msg.sender, CRIME_COOLDOWN_PERK_CATEGORY, 15 minutes);
uint256 jailCooldown = perkCalculator.applyNoJailPerk(msg.sender, CRIME_NO_JAIL_PERK_CATEGORY, crimeCooldown * 150 / 100);
if (helperBot.isCrimeBotRunning(msg.sender)) {
xpPoint = xpPoint * 20 / 100;
}
if (crimeType == 0) {
// minCash = 100; maxCash = 250;
minCash = 250; maxCash = 500;
} else if (crimeType == 1) {
// minCash = 250; maxCash = 750;
minCash = 750; maxCash = 1750;
} else if (crimeType == 2) {
// minCash = 750; maxCash = 1500;
minCash = 3000; maxCash = 6000;
} else if (crimeType == 3) {
// minCash = 1500; maxCash = 3000;
minCash = 5000; maxCash = 12000;
}
uint256 nonce = RandLibrary.fulFillRandomness();
uint256 cashRange = maxCash - minCash + 1;
uint256 cashNonce = nonce % cashRange;
nonce /= 10000;
uint256 successNonce = nonce % 10000;
nonce /= 10000;
uint256 jailNonce = nonce % 2;
bool isSuccess = successNonce < successRate;
uint256 cashAmount = isSuccess ? (minCash + cashNonce) * 10 ** 18 : 0;
cashAmount = perkCalculator.applyCashRewardPerk(msg.sender, CRIME_CASH_REWARD_PERK_CATEGORY, cashAmount);
bool isJailed = isSuccess ? false : (jailCooldown > 0 ? (jailNonce == 1) : false);
if (isSuccess) { // crime success
rankXp.addXp(msg.sender, xpPoint);
gameBank.mint(msg.sender, cashAmount);
// Send general "Crime" message for story mode
MafiaMessageLibrary.Message memory crimeMessage;
crimeMessage.messageType = "BasicCrime";
crimeMessage.messageSubType = "Crime";
crimeMessage.isSuccess = true;
crimeMessage.timestamp = block.timestamp;
crimeMessage.user = msg.sender;
messageCenter.sendMessage(crimeMessage);
// Send specific subtype message
MafiaMessageLibrary.Message memory message;
message.messageType = "BasicCrime";
if (crimeType == 0) message.messageSubType = "Hotdog";
if (crimeType == 1) message.messageSubType = "Train";
if (crimeType == 2) message.messageSubType = "Bank";
if (crimeType == 3) message.messageSubType = "PoliceStation";
message.isSuccess = true;
message.timestamp = block.timestamp;
message.user = msg.sender;
messageCenter.sendMessage(message);
} else if (isJailed) {
jail.jailUser(msg.sender, block.timestamp + jailCooldown, crimeType);
}
nextCrimeTime[msg.sender] = block.timestamp + crimeCooldown;
emit NewCrime(msg.sender, crimeType, isSuccess, isJailed, cashAmount, isSuccess ? xpPoint : 0, nextCrimeTime[msg.sender], block.timestamp);
}
function getSuccessRate(uint8 rankLevel, uint8 crimeType) public pure returns (uint256) {
uint256 successRate;
uint256 maxSuccessRate;
uint256 x;
if (crimeType == 0) {
successRate = 3000; // 30%
maxSuccessRate = 8438; // 84.38%
x = 109; // 1.09x
} else if (crimeType == 1) {
successRate = 1500;
maxSuccessRate = 8302;
x = 113; // 1.13x
} else if (crimeType == 2) {
successRate = 700;
maxSuccessRate = 8663;
x = 115; // 1.15x
} else if (crimeType == 3) {
successRate = 300;
maxSuccessRate = 8110;
x = 117; // 1.17x
}
for (uint8 i = 1; i < rankLevel; i ++) {
successRate = successRate * x / 100;
}
if (successRate > maxSuccessRate) {
successRate = maxSuccessRate;
}
return successRate;
}
function setHelperBotAddress(address addr) external onlyOwner {
helperBot = IMafiaHelperBot(addr);
}
function setPerkCalculatorAddress(address addr) external onlyOwner {
perkCalculator = IMafiaPerkCalculator(addr);
}
function setMessageCenterAddress(address addr) external onlyOwner {
messageCenter = IMafiaMessageCenter(addr);
}
function setPlayerStatusCheckerAddress(address addr) external onlyOwner {
playerStatusChecker = IMafiaPlayerStatusChecker(addr);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../utils/ContextUpgradeable.sol";
import {Initializable} from "../proxy/utils/Initializable.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
function __Ownable_init() internal onlyInitializing {
__Ownable_init_unchained();
}
function __Ownable_init_unchained() internal onlyInitializing {
_transferOwnership(_msgSender());
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[49] private __gap;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)
pragma solidity ^0.8.2;
import "../../utils/AddressUpgradeable.sol";
/**
* @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
* behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
* external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
* function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
*
* The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
* reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
* case an upgrade adds a module that needs to be initialized.
*
* For example:
*
* [.hljs-theme-light.nopadding]
* ```solidity
* contract MyToken is ERC20Upgradeable {
* function initialize() initializer public {
* __ERC20_init("MyToken", "MTK");
* }
* }
*
* contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
* function initializeV2() reinitializer(2) public {
* __ERC20Permit_init("MyToken");
* }
* }
* ```
*
* TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
* possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
*
* CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
* that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
*
* [CAUTION]
* ====
* Avoid leaving a contract uninitialized.
*
* An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
* contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke
* the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
*
* [.hljs-theme-light.nopadding]
* ```
* /// @custom:oz-upgrades-unsafe-allow constructor
* constructor() {
* _disableInitializers();
* }
* ```
* ====
*/
abstract contract Initializable {
/**
* @dev Indicates that the contract has been initialized.
* @custom:oz-retyped-from bool
*/
uint8 private _initialized;
/**
* @dev Indicates that the contract is in the process of being initialized.
*/
bool private _initializing;
/**
* @dev Triggered when the contract has been initialized or reinitialized.
*/
event Initialized(uint8 version);
/**
* @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
* `onlyInitializing` functions can be used to initialize parent contracts.
*
* Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a
* constructor.
*
* Emits an {Initialized} event.
*/
modifier initializer() {
bool isTopLevelCall = !_initializing;
require(
(isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),
"Initializable: contract is already initialized"
);
_initialized = 1;
if (isTopLevelCall) {
_initializing = true;
}
_;
if (isTopLevelCall) {
_initializing = false;
emit Initialized(1);
}
}
/**
* @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
* contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
* used to initialize parent contracts.
*
* A reinitializer may be used after the original initialization step. This is essential to configure modules that
* are added through upgrades and that require initialization.
*
* When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`
* cannot be nested. If one is invoked in the context of another, execution will revert.
*
* Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
* a contract, executing them in the right order is up to the developer or operator.
*
* WARNING: setting the version to 255 will prevent any future reinitialization.
*
* Emits an {Initialized} event.
*/
modifier reinitializer(uint8 version) {
require(!_initializing && _initialized < version, "Initializable: contract is already initialized");
_initialized = version;
_initializing = true;
_;
_initializing = false;
emit Initialized(version);
}
/**
* @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
* {initializer} and {reinitializer} modifiers, directly or indirectly.
*/
modifier onlyInitializing() {
require(_initializing, "Initializable: contract is not initializing");
_;
}
/**
* @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
* Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
* to any version. It is recommended to use this to lock implementation contracts that are designed to be called
* through proxies.
*
* Emits an {Initialized} event the first time it is successfully executed.
*/
function _disableInitializers() internal virtual {
require(!_initializing, "Initializable: contract is initializing");
if (_initialized != type(uint8).max) {
_initialized = type(uint8).max;
emit Initialized(type(uint8).max);
}
}
/**
* @dev Returns the highest version that has been initialized. See {reinitializer}.
*/
function _getInitializedVersion() internal view returns (uint8) {
return _initialized;
}
/**
* @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.
*/
function _isInitializing() internal view returns (bool) {
return _initializing;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
* @dev Collection of functions related to the address type
*/
library AddressUpgradeable {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
*
* Furthermore, `isContract` will also return true if the target contract within
* the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
* which only has an effect at the end of a transaction.
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
* the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
*
* _Available since v4.8._
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata,
string memory errorMessage
) internal view returns (bytes memory) {
if (success) {
if (returndata.length == 0) {
// only check isContract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
require(isContract(target), "Address: call to non-contract");
}
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
/**
* @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason or using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
function _revert(bytes memory returndata, string memory errorMessage) private pure {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)
pragma solidity ^0.8.0;
import {Initializable} from "../proxy/utils/Initializable.sol";
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract ContextUpgradeable is Initializable {
function __Context_init() internal onlyInitializing {
}
function __Context_init_unchained() internal onlyInitializing {
}
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
function _contextSuffixLength() internal view virtual returns (uint256) {
return 0;
}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[50] private __gap;
}// SPDX-License-Identifier: MIT
pragma solidity >=0.8.24;
interface IMafiaPlayerStatusChecker {
function isUserInActive(address player) external view returns (bool);
function setBlockedUntil(address player, uint256 timestamp) external;
}// SPDX-License-Identifier: MIT
pragma solidity >=0.8.24;
interface IMafiaGameBank {
function balanceOf(address user) external view returns (uint256);
function mint(address user, uint256 amount) external;
function burn(address user, uint256 amount) external;
function decimals() external view returns (uint8);
function transferFrom(address sender, address to, uint256 amount) external;
function approve(address to, uint256 amount) external;
}// SPDX-License-Identifier: MIT
pragma solidity >=0.8.7;
interface IMafiaHelperBot {
function isCrimeBotRunning(address user) external view returns (bool);
function isCarBotRunning(address user) external view returns (bool);
function isKSBotRunning(address user) external view returns (bool);
function isNarcsBotRunning(address user) external view returns (bool);
function isBoozeBotRunning(address user) external view returns (bool);
}// SPDX-License-Identifier: MIT
pragma solidity >=0.8.24;
interface IMafiaJail {
function isUserInJail(address user) external view returns (bool);
function jailUser(address user, uint256 timestamp, uint8 crimeType) external;
}// SPDX-License-Identifier: MIT
pragma solidity >=0.8.24;
interface IMafiaPerkCalculator {
/**
* @dev Apply success rate perk - replace base success rate if perk rate is higher
* @param user The user address
* @param categoryId The perk category ID
* @param successRate The base success rate (100x scale)
* @return The final success rate with perk applied
*/
function applySuccessRatePerk(address user, uint256 categoryId, uint256 successRate) external view returns (uint256);
/**
* @dev Apply cooldown reduction perk - reduce cooldown by effect strength percentage
* @param user The user address
* @param categoryId The perk category ID
* @param cooldown The base cooldown time in seconds
* @return The reduced cooldown time
*/
function applyCooldownPerk(address user, uint256 categoryId, uint256 cooldown) external view returns (uint256);
/**
* @dev Apply cash reward increase perk - increase cash reward by effect strength percentage
* @param user The user address
* @param categoryId The perk category ID
* @param cashAmount The base cash amount
* @return The final cash amount with perk applied
*/
function applyCashRewardPerk(address user, uint256 categoryId, uint256 cashAmount) external view returns (uint256);
/**
* @dev Apply XP gain increase perk - increase XP gain by effect strength percentage
* @param user The user address
* @param categoryId The perk category ID
* @param xpAmount The base XP amount
* @return The final XP amount with perk applied
*/
/**
* @dev Apply XP value perk (temporary) with cap - increase displayed/used XP value by effect strength percentage, capped by limit
* @param user The user address
* @param categoryId The perk category ID
* @param xpValue The base XP value (not stored)
* @param limit The maximum allowed XP value after perk
* @return The effective XP value with perk applied and capped
*/
function applyXpValuePerk(address user, uint256 categoryId, uint256 xpValue, uint256 limit) external view returns (uint256);
/**
* @dev Apply no jail perk - set jail cooldown to 0
* @param user The user address
* @param categoryId The perk category ID
* @param jailCooldown The base jail cooldown time
* @return The final jail cooldown (0 if perk active, otherwise base cooldown)
*/
function applyNoJailPerk(address user, uint256 categoryId, uint256 jailCooldown) external view returns (uint256);
/**
* @dev Check if user has an active perk for a specific category
* @param user The user address
* @param categoryId The perk category ID
* @return True if user has an active perk for the category
*/
function hasActivePerk(address user, uint256 categoryId) external view returns (bool);
/**
* @dev Apply credit price reduction perk - decrease credit price by effect strength percentage
* @param user The user address
* @param categoryId The perk category ID
* @param basePrice The base credit price
* @return The reduced credit price
*/
function applyCreditPriceReductionPerk(address user, uint256 categoryId, uint256 basePrice) external view returns (uint256);
}// SPDX-License-Identifier: MIT
pragma solidity >=0.8.24;
interface IMafiaRankXp {
function getRankXp(address user, string memory message, bytes memory signature) external view returns (uint256);
function getRankLevel(address user) external view returns (uint8);
function addXp(address user, uint256 amount) external;
}// SPDX-License-Identifier: MIT
pragma solidity >=0.8.24;
import { MafiaMessageLibrary } from "./MafiaMessage.sol";
interface IMafiaMessageCenter {
function sendMessage(MafiaMessageLibrary.Message memory message) external;
}// SPDX-License-Identifier: MIT
pragma solidity >=0.8.24;
library MafiaMessageLibrary {
struct Message {
string messageType;
string messageSubType;
address user;
uint8 cityId;
bool isSuccess;
uint256 timestamp;
bytes data;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
library RandLibrary {
function fulFillRandomness() internal view returns (uint256) {
return uint256(uint128(bytes16(keccak256(abi.encodePacked(block.prevrandao, block.timestamp)))));
}
function fulFillRandomnessWithSeed(bytes32 seed) internal view returns(uint256) {
return uint256(uint128(bytes16(keccak256(abi.encodePacked(block.prevrandao, block.timestamp, seed)))));
}
function fulFill256RandomnessWithSeed(bytes32 seed) internal view returns(uint256) {
return uint256(bytes32(keccak256(abi.encodePacked(block.prevrandao, block.timestamp, seed))));
}
}{
"viaIR": true,
"optimizer": {
"enabled": true,
"runs": 200
},
"evmVersion": "paris",
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"criminal","type":"address"},{"indexed":false,"internalType":"uint8","name":"crimeType","type":"uint8"},{"indexed":false,"internalType":"bool","name":"isSuccess","type":"bool"},{"indexed":false,"internalType":"bool","name":"isJailed","type":"bool"},{"indexed":false,"internalType":"uint256","name":"cashAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"xpPoint","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"nextCrimeTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"NewCrime","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"CRIME_CASH_REWARD_PERK_CATEGORY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CRIME_COOLDOWN_PERK_CATEGORY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CRIME_NO_JAIL_PERK_CATEGORY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CRIME_SUCCESS_PERK_CATEGORY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gameBank","outputs":[{"internalType":"contract IMafiaGameBank","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"rankLevel","type":"uint8"},{"internalType":"uint8","name":"crimeType","type":"uint8"}],"name":"getSuccessRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"helperBot","outputs":[{"internalType":"contract IMafiaHelperBot","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"gameBankAddress","type":"address"},{"internalType":"address","name":"jailAddress","type":"address"},{"internalType":"address","name":"rankXpAddress","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"jail","outputs":[{"internalType":"contract IMafiaJail","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"crimeType","type":"uint8"}],"name":"makeCrime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"messageCenter","outputs":[{"internalType":"contract IMafiaMessageCenter","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nextCrimeTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"perkCalculator","outputs":[{"internalType":"contract IMafiaPerkCalculator","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"playerStatusChecker","outputs":[{"internalType":"contract IMafiaPlayerStatusChecker","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rankXp","outputs":[{"internalType":"contract IMafiaRankXp","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"setHelperBotAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"setMessageCenterAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"setPerkCalculatorAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"setPlayerStatusCheckerAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
608080604052346100165761153c908161001c8239f35b600080fdfe608080604052600436101561001357600080fd5b600090813560e01c9081630c83bc491461111e575080632adcf0e7146111025780633fc51750146110d95780634370213d146110b05780634aaf7df91461107057806355f3dd77146110475780635dc40be31461101e5780636bbb2fbc14610fe2578063715018a614610f855780638da5cb5b14610f5c5780638e45c46f14610f40578063ad9e159c14610f00578063b107f9db14610ee4578063b35a135b14610ec8578063bae90b5614610e88578063c0c53b8b14610cfb578063c625abb414610261578063c85e349914610238578063de5f24c01461020f578063e300188d146101cf578063f2fde38b1461013e5763f8b753a61461011357600080fd5b3461013b578060031936011261013b576066546040516001600160a01b039091168152602090f35b80fd5b503461013b57602036600319011261013b57610158611154565b610160611405565b6001600160a01b0381161561017b576101789061145d565b80f35b60405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608490fd5b503461013b57602036600319011261013b576101e9611154565b6101f1611405565b60018060a01b03166001600160601b0360a01b606a541617606a5580f35b503461013b578060031936011261013b57606c546040516001600160a01b039091168152602090f35b503461013b578060031936011261013b576065546040516001600160a01b039091168152602090f35b503461013b57602036600319011261013b5761027b61116f565b323303610cbf57606c546040516315f38ffd60e31b815233600482015290602090829060249082906001600160a01b03165afa908115610bf2578391610ca0575b50610c6d57338252606860205260408220544210610c3757600460ff82161015610bfd5760665460405163e854a71d60e01b815233600482015290602090829060249082906001600160a01b03165afa8015610bf25782908490610bb2575b610325925061117f565b606a5460405162ec762b60e61b81523360048201526012602482015260448101929092529091906001600160a01b0316602083606481845afa9283156108a7578493610b7e575b506040516360359a7d60e01b815233600482015260186024820152610384604482015260649185806020848681865afa938415610a1b578894610b4a575b50609684029184830460961485151715610b36576064604051936331854ac360e21b8552336004860152602a6024860152046044840152602083606481875afa9283156109bd578993610afe575b5060695460405163124b506d60e11b815233600482015290602090829060249082906001600160a01b03165afa908115610af3578a91610ac4575b50610abb575b60ff8716610a6c57505060fa926101f45b6040516020810190448252426040820152604081526060810181811067ffffffffffffffff821117610a585760405251902060801c94808203918211610a2657600182018211610a26576001820115610a4457886127108088040610600014610a3a5760016104bc92018606906112e5565b670de0b6b3a7640000908082810204821481151715610a2657602091025b606460405180968193634c767d8160e11b83523360048401526028602484015260448301525afa928315610a1b5788936109e7575b508661271080860406106000146109c85787915b8761271080870406106000146108de575060665488906001600160a01b0316803b156108c65760405163c3a0ef8960e01b8152336004820152602481018890529082908290604490829084905af180156107d8576108ca575b506065546001600160a01b0316803b156108c6576040516340c10f1960e01b8152336004820152602481018690529082908290604490829084905af180156107d8576108b2575b506105cc6112f2565b604051906105d98261128f565b600a82526942617369634372696d6560b01b9182602082015281526040516106008161128f565b60058152644372696d6560d81b602080830191909152820152600160808201524260a0820152336040820152606b546001600160a01b0316803b156107e357836040518092818381610660636996ffe560e01b988983526004830161137d565b03925af19081156108a757849161088f575b505061067c6112f2565b916040519061068a8261128f565b600a82526020820152825260ff891615610866575b600160ff8a161461083e575b600260ff8a1614610817575b600360ff8a16146107e7575b600160808301524260a0830152336040830152606b546001600160a01b031691823b156107e3576107059284928360405180968195829483526004830161137d565b03925af180156107d8576107b4575b5050907fe36ceebd3770780c5617d53efc7d77328074f1248146245ed3b854cbf651fb379661074b61010097969594935b426112e5565b94338a5260686020528560408b20558161271080870406106000146107a8576127108091955b60ff60405199338b521660208a0152040610604086015215156060850152608084015260a083015260c08201524260e0820152a180f35b50612710808a95610771565b6107c49097969594939297611265565b6107d45790919293948738610714565b8780fd5b6040513d84823e3d90fd5b8380fd5b6040516107f38161128f565b600d81526c2837b634b1b2a9ba30ba34b7b760991b602082015260208301526106c3565b6040516108238161128f565b600481526342616e6b60e01b602082015260208301526106b7565b60405161084a8161128f565b60058152642a3930b4b760d91b602082015260208301526106ab565b6040516108728161128f565b6006815265486f74646f6760d01b6020820152602083015261069f565b61089890611265565b6108a3578238610672565b8280fd5b6040513d86823e3d90fd5b6108bb90611265565b6107d45787386105c3565b5080fd5b6108d390611265565b6107d457873861057c565b8293949596979261091e575b509161010095939161074b7fe36ceebd3770780c5617d53efc7d77328074f1248146245ed3b854cbf651fb37989694610745565b6067546001600160a01b031690899061093790426112e5565b823b156108c65760648a918360ff95604051968795869463199cbe8b60e11b865233600487015260248601521660448401525af180156109bd57156108ea579161074b7fe36ceebd3770780c5617d53efc7d77328074f1248146245ed3b854cbf651fb3798969492996109ae610100999795611265565b999294969850509193956108ea565b6040513d8b823e3d90fd5b81156109e1576001806127108087040416145b91610523565b876109db565b9092506020813d602011610a13575b81610a03602093836112ab565b810103126107d45751913861050f565b3d91506109f6565b6040513d8a823e3d90fd5b634e487b7160e01b8a52601160045260248afd5b50506020886104da565b634e487b7160e01b8a52601260045260248afd5b634e487b7160e01b8c52604160045260248cfd5b60ff8716600103610a865750506102ee926106d65b61044a565b60ff8716600203610a9f575050610bb89261177061044a565b600360ff889693961603610a8157506113889350612ee061044a565b60149550610439565b610ae6915060203d602011610aec575b610ade81836112ab565b8101906112cd565b38610433565b503d610ad4565b6040513d8c823e3d90fd5b9092506020813d602011610b2e575b81610b1a602093836112ab565b81010312610b2a575191386103f8565b8880fd5b3d9150610b0d565b634e487b7160e01b89526011600452602489fd5b9093506020813d602011610b76575b81610b66602093836112ab565b810103126107d4575192386103aa565b3d9150610b59565b9092506020813d602011610baa575b81610b9a602093836112ab565b810103126107e35751913861036c565b3d9150610b8d565b50506020813d602011610bea575b81610bcd602093836112ab565b810103126108a3575160ff811681036108a357816103259161031b565b3d9150610bc0565b6040513d85823e3d90fd5b60405162461bcd60e51b8152602060048201526012602482015271696e76616c6964206372696d65207479706560701b6044820152606490fd5b60405162461bcd60e51b815260206004820152600e60248201526d31b934b6b29031b7b7b63237bbb760911b6044820152606490fd5b60405162461bcd60e51b815260206004820152600b60248201526a3530b4b632b2103ab9b2b960a91b6044820152606490fd5b610cb9915060203d602011610aec57610ade81836112ab565b386102bc565b60405162461bcd60e51b815260206004820152601460248201527318dbdb9d1c9858dd081b9bdd08185b1b1bddd95960621b6044820152606490fd5b503461013b57606036600319011261013b57610d15611154565b6001600160a01b039060243582811691908290036107e35760443591838316809303610e845784549360ff8560081c161594858096610e77575b8015610e60575b15610e045760ff198116600117875585610df3575b506001600160601b0360a01b92168260655416176065558160675416176067556066541617606655610dac60ff835460081c16610da7816114a6565b6114a6565b610db53361145d565b610dbc5780f35b61ff001981541681557f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498602060405160018152a180f35b61ffff191661010117865538610d6b565b60405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608490fd5b50303b158015610d565750600160ff821614610d56565b50600160ff821610610d4f565b8480fd5b503461013b57602036600319011261013b57610ea2611154565b610eaa611405565b60018060a01b03166001600160601b0360a01b606954161760695580f35b503461013b578060031936011261013b57602060405160188152f35b503461013b578060031936011261013b576020604051602a8152f35b503461013b57602036600319011261013b57610f1a611154565b610f22611405565b60018060a01b03166001600160601b0360a01b606b541617606b5580f35b503461013b578060031936011261013b57602060405160128152f35b503461013b578060031936011261013b576033546040516001600160a01b039091168152602090f35b503461013b578060031936011261013b57610f9e611405565b603380546001600160a01b0319811690915581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b503461013b57604036600319011261013b57610ffc61116f565b6024359160ff8316830361013b576020611016848461117f565b604051908152f35b503461013b578060031936011261013b576069546040516001600160a01b039091168152602090f35b503461013b578060031936011261013b576067546040516001600160a01b039091168152602090f35b503461013b57602036600319011261013b5761108a611154565b611092611405565b60018060a01b03166001600160601b0360a01b606c541617606c5580f35b503461013b578060031936011261013b57606b546040516001600160a01b039091168152602090f35b503461013b578060031936011261013b57606a546040516001600160a01b039091168152602090f35b503461013b578060031936011261013b57602060405160288152f35b9050346108c65760203660031901126108c6576020916040906001600160a01b03611147611154565b1681526068845220548152f35b600435906001600160a01b038216820361116a57565b600080fd5b6004359060ff8216820361116a57565b6000808160ff80951680156000146112075750505050610bb8916120f691606d91905b6001906001935b838216848616106111c95750505050508082116111c4575090565b905090565b9091929395818102908082048314901517156111f157606490049583018416939291906111a9565b634e487b7160e01b600052601160045260246000fd5b6001810361122757505050506105dc9161206e916071905b9190916111a2565b6002810361124357505050506102bc916121d79160739061121f565b600390959395949192940361121f5761012c9450611fae93506075915061121f565b67ffffffffffffffff811161127957604052565b634e487b7160e01b600052604160045260246000fd5b6040810190811067ffffffffffffffff82111761127957604052565b90601f8019910116810190811067ffffffffffffffff82111761127957604052565b9081602091031261116a5751801515810361116a5790565b919082018092116111f157565b6040519060e0820182811067ffffffffffffffff82111761127957604052606060c0838281528260208201526000604082015260008382015260006080820152600060a08201520152565b919082519283825260005b848110611369575050826000602080949584010152601f8019910116010190565b602081830181015184830182015201611348565b90611402916020815261139d825160e0602084015261010083019061133d565b9060e060c06113be602086015194601f19958686830301604087015261133d565b9460018060a01b03604082015116606085015260ff60608201511660808501526080810151151560a085015260a0810151828501520151928285030191015261133d565b90565b6033546001600160a01b0316330361141957565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b603380546001600160a01b039283166001600160a01b0319821681179092559091167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3565b156114ad57565b60405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608490fdfea26469706673582212207be046fcf792a12fbfe7c4994a22fa9a1d16576d9dda74a73d04637a3411abca64736f6c63430008180033
Deployed Bytecode
0x608080604052600436101561001357600080fd5b600090813560e01c9081630c83bc491461111e575080632adcf0e7146111025780633fc51750146110d95780634370213d146110b05780634aaf7df91461107057806355f3dd77146110475780635dc40be31461101e5780636bbb2fbc14610fe2578063715018a614610f855780638da5cb5b14610f5c5780638e45c46f14610f40578063ad9e159c14610f00578063b107f9db14610ee4578063b35a135b14610ec8578063bae90b5614610e88578063c0c53b8b14610cfb578063c625abb414610261578063c85e349914610238578063de5f24c01461020f578063e300188d146101cf578063f2fde38b1461013e5763f8b753a61461011357600080fd5b3461013b578060031936011261013b576066546040516001600160a01b039091168152602090f35b80fd5b503461013b57602036600319011261013b57610158611154565b610160611405565b6001600160a01b0381161561017b576101789061145d565b80f35b60405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608490fd5b503461013b57602036600319011261013b576101e9611154565b6101f1611405565b60018060a01b03166001600160601b0360a01b606a541617606a5580f35b503461013b578060031936011261013b57606c546040516001600160a01b039091168152602090f35b503461013b578060031936011261013b576065546040516001600160a01b039091168152602090f35b503461013b57602036600319011261013b5761027b61116f565b323303610cbf57606c546040516315f38ffd60e31b815233600482015290602090829060249082906001600160a01b03165afa908115610bf2578391610ca0575b50610c6d57338252606860205260408220544210610c3757600460ff82161015610bfd5760665460405163e854a71d60e01b815233600482015290602090829060249082906001600160a01b03165afa8015610bf25782908490610bb2575b610325925061117f565b606a5460405162ec762b60e61b81523360048201526012602482015260448101929092529091906001600160a01b0316602083606481845afa9283156108a7578493610b7e575b506040516360359a7d60e01b815233600482015260186024820152610384604482015260649185806020848681865afa938415610a1b578894610b4a575b50609684029184830460961485151715610b36576064604051936331854ac360e21b8552336004860152602a6024860152046044840152602083606481875afa9283156109bd578993610afe575b5060695460405163124b506d60e11b815233600482015290602090829060249082906001600160a01b03165afa908115610af3578a91610ac4575b50610abb575b60ff8716610a6c57505060fa926101f45b6040516020810190448252426040820152604081526060810181811067ffffffffffffffff821117610a585760405251902060801c94808203918211610a2657600182018211610a26576001820115610a4457886127108088040610600014610a3a5760016104bc92018606906112e5565b670de0b6b3a7640000908082810204821481151715610a2657602091025b606460405180968193634c767d8160e11b83523360048401526028602484015260448301525afa928315610a1b5788936109e7575b508661271080860406106000146109c85787915b8761271080870406106000146108de575060665488906001600160a01b0316803b156108c65760405163c3a0ef8960e01b8152336004820152602481018890529082908290604490829084905af180156107d8576108ca575b506065546001600160a01b0316803b156108c6576040516340c10f1960e01b8152336004820152602481018690529082908290604490829084905af180156107d8576108b2575b506105cc6112f2565b604051906105d98261128f565b600a82526942617369634372696d6560b01b9182602082015281526040516106008161128f565b60058152644372696d6560d81b602080830191909152820152600160808201524260a0820152336040820152606b546001600160a01b0316803b156107e357836040518092818381610660636996ffe560e01b988983526004830161137d565b03925af19081156108a757849161088f575b505061067c6112f2565b916040519061068a8261128f565b600a82526020820152825260ff891615610866575b600160ff8a161461083e575b600260ff8a1614610817575b600360ff8a16146107e7575b600160808301524260a0830152336040830152606b546001600160a01b031691823b156107e3576107059284928360405180968195829483526004830161137d565b03925af180156107d8576107b4575b5050907fe36ceebd3770780c5617d53efc7d77328074f1248146245ed3b854cbf651fb379661074b61010097969594935b426112e5565b94338a5260686020528560408b20558161271080870406106000146107a8576127108091955b60ff60405199338b521660208a0152040610604086015215156060850152608084015260a083015260c08201524260e0820152a180f35b50612710808a95610771565b6107c49097969594939297611265565b6107d45790919293948738610714565b8780fd5b6040513d84823e3d90fd5b8380fd5b6040516107f38161128f565b600d81526c2837b634b1b2a9ba30ba34b7b760991b602082015260208301526106c3565b6040516108238161128f565b600481526342616e6b60e01b602082015260208301526106b7565b60405161084a8161128f565b60058152642a3930b4b760d91b602082015260208301526106ab565b6040516108728161128f565b6006815265486f74646f6760d01b6020820152602083015261069f565b61089890611265565b6108a3578238610672565b8280fd5b6040513d86823e3d90fd5b6108bb90611265565b6107d45787386105c3565b5080fd5b6108d390611265565b6107d457873861057c565b8293949596979261091e575b509161010095939161074b7fe36ceebd3770780c5617d53efc7d77328074f1248146245ed3b854cbf651fb37989694610745565b6067546001600160a01b031690899061093790426112e5565b823b156108c65760648a918360ff95604051968795869463199cbe8b60e11b865233600487015260248601521660448401525af180156109bd57156108ea579161074b7fe36ceebd3770780c5617d53efc7d77328074f1248146245ed3b854cbf651fb3798969492996109ae610100999795611265565b999294969850509193956108ea565b6040513d8b823e3d90fd5b81156109e1576001806127108087040416145b91610523565b876109db565b9092506020813d602011610a13575b81610a03602093836112ab565b810103126107d45751913861050f565b3d91506109f6565b6040513d8a823e3d90fd5b634e487b7160e01b8a52601160045260248afd5b50506020886104da565b634e487b7160e01b8a52601260045260248afd5b634e487b7160e01b8c52604160045260248cfd5b60ff8716600103610a865750506102ee926106d65b61044a565b60ff8716600203610a9f575050610bb89261177061044a565b600360ff889693961603610a8157506113889350612ee061044a565b60149550610439565b610ae6915060203d602011610aec575b610ade81836112ab565b8101906112cd565b38610433565b503d610ad4565b6040513d8c823e3d90fd5b9092506020813d602011610b2e575b81610b1a602093836112ab565b81010312610b2a575191386103f8565b8880fd5b3d9150610b0d565b634e487b7160e01b89526011600452602489fd5b9093506020813d602011610b76575b81610b66602093836112ab565b810103126107d4575192386103aa565b3d9150610b59565b9092506020813d602011610baa575b81610b9a602093836112ab565b810103126107e35751913861036c565b3d9150610b8d565b50506020813d602011610bea575b81610bcd602093836112ab565b810103126108a3575160ff811681036108a357816103259161031b565b3d9150610bc0565b6040513d85823e3d90fd5b60405162461bcd60e51b8152602060048201526012602482015271696e76616c6964206372696d65207479706560701b6044820152606490fd5b60405162461bcd60e51b815260206004820152600e60248201526d31b934b6b29031b7b7b63237bbb760911b6044820152606490fd5b60405162461bcd60e51b815260206004820152600b60248201526a3530b4b632b2103ab9b2b960a91b6044820152606490fd5b610cb9915060203d602011610aec57610ade81836112ab565b386102bc565b60405162461bcd60e51b815260206004820152601460248201527318dbdb9d1c9858dd081b9bdd08185b1b1bddd95960621b6044820152606490fd5b503461013b57606036600319011261013b57610d15611154565b6001600160a01b039060243582811691908290036107e35760443591838316809303610e845784549360ff8560081c161594858096610e77575b8015610e60575b15610e045760ff198116600117875585610df3575b506001600160601b0360a01b92168260655416176065558160675416176067556066541617606655610dac60ff835460081c16610da7816114a6565b6114a6565b610db53361145d565b610dbc5780f35b61ff001981541681557f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498602060405160018152a180f35b61ffff191661010117865538610d6b565b60405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608490fd5b50303b158015610d565750600160ff821614610d56565b50600160ff821610610d4f565b8480fd5b503461013b57602036600319011261013b57610ea2611154565b610eaa611405565b60018060a01b03166001600160601b0360a01b606954161760695580f35b503461013b578060031936011261013b57602060405160188152f35b503461013b578060031936011261013b576020604051602a8152f35b503461013b57602036600319011261013b57610f1a611154565b610f22611405565b60018060a01b03166001600160601b0360a01b606b541617606b5580f35b503461013b578060031936011261013b57602060405160128152f35b503461013b578060031936011261013b576033546040516001600160a01b039091168152602090f35b503461013b578060031936011261013b57610f9e611405565b603380546001600160a01b0319811690915581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b503461013b57604036600319011261013b57610ffc61116f565b6024359160ff8316830361013b576020611016848461117f565b604051908152f35b503461013b578060031936011261013b576069546040516001600160a01b039091168152602090f35b503461013b578060031936011261013b576067546040516001600160a01b039091168152602090f35b503461013b57602036600319011261013b5761108a611154565b611092611405565b60018060a01b03166001600160601b0360a01b606c541617606c5580f35b503461013b578060031936011261013b57606b546040516001600160a01b039091168152602090f35b503461013b578060031936011261013b57606a546040516001600160a01b039091168152602090f35b503461013b578060031936011261013b57602060405160288152f35b9050346108c65760203660031901126108c6576020916040906001600160a01b03611147611154565b1681526068845220548152f35b600435906001600160a01b038216820361116a57565b600080fd5b6004359060ff8216820361116a57565b6000808160ff80951680156000146112075750505050610bb8916120f691606d91905b6001906001935b838216848616106111c95750505050508082116111c4575090565b905090565b9091929395818102908082048314901517156111f157606490049583018416939291906111a9565b634e487b7160e01b600052601160045260246000fd5b6001810361122757505050506105dc9161206e916071905b9190916111a2565b6002810361124357505050506102bc916121d79160739061121f565b600390959395949192940361121f5761012c9450611fae93506075915061121f565b67ffffffffffffffff811161127957604052565b634e487b7160e01b600052604160045260246000fd5b6040810190811067ffffffffffffffff82111761127957604052565b90601f8019910116810190811067ffffffffffffffff82111761127957604052565b9081602091031261116a5751801515810361116a5790565b919082018092116111f157565b6040519060e0820182811067ffffffffffffffff82111761127957604052606060c0838281528260208201526000604082015260008382015260006080820152600060a08201520152565b919082519283825260005b848110611369575050826000602080949584010152601f8019910116010190565b602081830181015184830182015201611348565b90611402916020815261139d825160e0602084015261010083019061133d565b9060e060c06113be602086015194601f19958686830301604087015261133d565b9460018060a01b03604082015116606085015260ff60608201511660808501526080810151151560a085015260a0810151828501520151928285030191015261133d565b90565b6033546001600160a01b0316330361141957565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b603380546001600160a01b039283166001600160a01b0319821681179092559091167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3565b156114ad57565b60405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608490fdfea26469706673582212207be046fcf792a12fbfe7c4994a22fa9a1d16576d9dda74a73d04637a3411abca64736f6c63430008180033
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in BNB
Multichain Portfolio | 32 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
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.