Overview
APE Balance
0 APE
APE Value
$0.00More Info
Private Name Tags
ContractCreator
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
Protocol
Compiler Version
v0.8.27+commit.40a35a09
Optimization Enabled:
Yes with 10000 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.27; library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } function percentageOf(uint a, uint b) internal pure returns (uint256) { require(b > 0); return a * b / 100; } function percentageOf10000(uint a, uint b) internal pure returns (uint256) { require(b > 0); return a * b / 10000; } } contract Protocol { using SafeMath for uint; address constant founder = 0x616b59F3AE717453025B8b3E3c70894C679C2497; address constant dev = 0xBF90AF3Ef59dD627f22bE64F2a08b2DB09bec8a3; address constant staking = 0x6253707e7905d752aB816EF9d91A50E89Bca9204; uint STAKING_POOL_FEE = 300; uint DEV_FEE = 100; uint FUNDER_FEE = 100; uint PROTOCOL_FEE = 500; uint NATIVE_DEV_FEE = 2500; uint NATIVE_FOUDER_FEE = 7500; constructor() { } function calculate(address erc20, uint256 revenue, bool native) external view returns(uint, address[] memory, uint[] memory) { (erc20); uint feeAmount = revenue.percentageOf10000(PROTOCOL_FEE); uint balance = revenue.sub(feeAmount); uint size = native ? 2 : 3; address[] memory to = new address[](size); uint[] memory amounts = new uint[](size); if(native) { to[0] = dev; amounts[0] = feeAmount.percentageOf10000(NATIVE_DEV_FEE); to[1] = founder; amounts[1] = feeAmount.percentageOf10000(NATIVE_FOUDER_FEE); } else { to[0] = staking; amounts[0] = revenue.percentageOf10000(STAKING_POOL_FEE); to[1] = dev; amounts[1] = revenue.percentageOf10000(DEV_FEE); to[2] = founder; amounts[2] = revenue.percentageOf10000(FUNDER_FEE); } return (balance, to, amounts); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.27; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If EIP-1153 (transient storage) is available on the chain you're deploying at, * consider using {ReentrancyGuardTransient} instead. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant NOT_ENTERED = 1; uint256 private constant ENTERED = 2; uint256 private _status; /** * @dev Unauthorized reentrant call. */ error ReentrancyGuardReentrantCall(); constructor() { _status = NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be NOT_ENTERED if (_status == ENTERED) { revert ReentrancyGuardReentrantCall(); } // Any calls to nonReentrant after this point will fail _status = ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = NOT_ENTERED; } /** * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a * `nonReentrant` function in the call stack. */ function _reentrancyGuardEntered() internal view returns (bool) { return _status == ENTERED; } } /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } } /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _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); } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } function percentageOf(uint a, uint b) internal pure returns (uint256) { require(b > 0); return a * b / 100; } function percentageOf10000(uint a, uint b) internal pure returns (uint256) { require(b > 0); return a * b / 10000; } } interface IToken { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint); function mint(address to, uint256 amount) external; function burn(uint256 amount) external; event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } interface INft { event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); event ApprovalForAll(address indexed owner, address indexed operator, bool approved); function balanceOf(address owner) external view returns (uint256 balance); function ownerOf(uint256 tokenId) external view returns (address owner); function transferFrom( address from, address to, uint256 tokenId ) external; function approve(address to, uint256 tokenId) external; function setApprovalForAll(address operator, bool _approved) external; function getApproved(uint256 tokenId) external view returns (address operator); function isApprovedForAll(address owner, address operator) external view returns (bool); } library TransferHelper { function safeApprove( address token, address to, uint256 value ) internal { // bytes4(keccak256(bytes('approve(address,uint256)'))); (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x095ea7b3, to, value)); require( success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper::safeApprove: approve failed' ); } function safeTransfer( address token, address to, uint256 value ) internal { // bytes4(keccak256(bytes('transfer(address,uint256)'))); (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0xa9059cbb, to, value)); require( success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper::safeTransfer: transfer failed' ); } function safeTransferFrom( address token, address from, address to, uint256 value ) internal { // bytes4(keccak256(bytes('transferFrom(address,address,uint256)'))); (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, value)); require( success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper::transferFrom: transferFrom failed' ); } function safeTransferETH(address to, uint256 value) internal { (bool success, ) = to.call{value: value}(new bytes(0)); require(success, 'TransferHelper::safeTransferETH: ETH transfer failed'); } function deposit(address _weth, uint256 _value) internal { (bool success, ) = _weth.call{value: _value}(new bytes(0)); require(success, 'TransferHelper::safeTransferETH: ETH transfer failed'); } function withdraw(address _weth, uint256 _value) internal { (bool success, bytes memory data) = _weth.call(abi.encodeWithSelector(0x2e1a7d4d, _value)); require( success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper::withdraw: withdraw failed' ); } } interface IProtocol { function calculate(address erc20, uint256 revenue, bool native) external view returns(uint, address[] memory, uint[] memory); } contract BaseProtocol is Ownable, ReentrancyGuard { address public feeProtocol; bool public paused; mapping(address => bool) caller; modifier whenNotPaused() { require(!paused, "paused"); _; } modifier onlyCaller() { require(owner() == msg.sender || caller[msg.sender], "not auth"); _; } function pause(bool enable) onlyOwner external { paused = enable; } function addCaller(address[] memory executor) onlyOwner public { for (uint256 i = 0; i < executor.length; i++) { caller[executor[i]] = true; } } function removeCaller(address[] memory executor) onlyOwner public { for (uint256 i = 0; i < executor.length; i++) { caller[executor[i]] = true; } } function changeProtocol(address newProtocol) onlyOwner public { require(address(0) != feeProtocol, "not zero address"); feeProtocol = newProtocol; } } contract Gambler is BaseProtocol { using SafeMath for uint; bytes32 ROOM_1 = 0x0000000000000000000000000000000000000000000000000000000000000001; bytes32 ROOM_2 = 0x0000000000000000000000000000000000000000000000000000000000000002; bytes32 ROOM_3 = 0x0000000000000000000000000000000000000000000000000000000000000003; bytes32 ROOM_4 = 0x0000000000000000000000000000000000000000000000000000000000000004; bytes32 ROOM_5 = 0x0000000000000000000000000000000000000000000000000000000000000005; bytes32 ROOM_6 = 0x0000000000000000000000000000000000000000000000000000000000000006; uint ROOM_SIZE = 6; struct Pool { bytes32 uid; uint256 price; uint256 size; bool native; } struct Entry { uint256 currentSize; uint256 randomness; } mapping(bytes32 => Pool) rooms; mapping(bytes32 => mapping(uint256 => address)) participant; mapping(bytes32 => Entry) participantEntry; bool public initiated; address public baseToken; address public baseNFT; uint256 public baseBalance; event LogWinner(address executor, bytes32 room, address winner, uint amount, bool native, uint date); event LogCancel(address executor, bytes32 room, uint date); constructor() { } function init(address[] memory executor, address protocol, address erc20, address erc721, uint256 balance) onlyOwner external { require(!initiated, "already initiated"); feeProtocol = protocol; baseToken = erc20; baseNFT = erc721; baseBalance = balance; addCaller(executor); uint decimals = 10 ** IToken(baseToken).decimals(); rooms[ROOM_1] = Pool(ROOM_1, 100 * decimals, 10, false); rooms[ROOM_2] = Pool(ROOM_2, 2500 * decimals, 10, false); rooms[ROOM_3] = Pool(ROOM_3, 10000 * decimals, 10, false); rooms[ROOM_4] = Pool(ROOM_4, 1 ether, 10, true); rooms[ROOM_5] = Pool(ROOM_5, 25 ether, 10, true); rooms[ROOM_6] = Pool(ROOM_6, 100 ether, 10, true); initiated = true; } function setBaseBalance(uint newBalance) onlyOwner external { baseBalance = newBalance; } function setRoom(bytes32[] memory ids, uint[] memory price, uint[] memory size) onlyOwner external { for (uint256 i = 0; i < ids.length; i++) { require(ids[i] == rooms[ids[i]].uid, "room not found"); require(participantEntry[ids[i]].currentSize == 0, "already entered"); rooms[ids[i]] = Pool(ids[i], price[i], size[i], rooms[ids[i]].native); } } function participants(bytes32 roomId) external view returns(Pool memory data, address erc20, uint256 total, uint256 prize, uint256 currentSize, address[] memory users) { data = rooms[roomId]; erc20 = data.native ? address(0) : baseToken; total = data.size * data.price; (prize,, ) = IProtocol(feeProtocol).calculate(erc20, total, data.native); currentSize = participantEntry[roomId].currentSize; users = new address[](currentSize); for (uint256 i = 0; i < currentSize; i++) { users[i] = participant[roomId][i]; } } function getRooms() external view returns(Pool[] memory data) { data = new Pool[](ROOM_SIZE); for (uint256 i = 0; i < ROOM_SIZE; i++) { data[i] = rooms[bytes32(i+1)]; } return data; } function enroll(bytes32 roomId) nonReentrant whenNotPaused external payable { Pool memory pool = rooms[roomId]; if(pool.native) { require(pool.price == msg.value, "insufficient balance"); } else { IToken(baseToken).transferFrom(msg.sender, address(this), pool.price); } require(INft(baseNFT).balanceOf(msg.sender) >= baseBalance, "not enough nft"); uint index = participantEntry[roomId].currentSize; require(roomId == pool.uid, "room not found"); require(index < pool.size, "reached"); require(participant[roomId][index] == address(0), "already entered"); participant[roomId][index] = msg.sender; participantEntry[roomId].currentSize += 1; participantEntry[roomId].randomness = _random(participantEntry[roomId].randomness, block.prevrandao); } function pickWinner(bytes32 roomId, uint seed) onlyCaller nonReentrant external { require(roomId == rooms[roomId].uid, "room not found"); require(participantEntry[roomId].currentSize == rooms[roomId].size, "not yet"); address winner = _randomWinner(roomId, seed); uint totalAmount = rooms[roomId].size * rooms[roomId].price; uint prize = _split(totalAmount, rooms[roomId].native); if(rooms[roomId].native) { TransferHelper.safeTransferETH(winner, prize); } else { TransferHelper.safeTransfer(baseToken, winner, prize); } for (uint256 i = 0; i < rooms[roomId].size; i++) { delete participant[roomId][i]; } delete participantEntry[roomId]; emit LogWinner(msg.sender, roomId, winner, prize, rooms[roomId].native, block.timestamp); } function cancel(bytes32 roomId) onlyCaller nonReentrant external { require(roomId == rooms[roomId].uid, "room not found"); uint currentSize = participantEntry[roomId].currentSize; bool native = rooms[roomId].native; require(currentSize > 0, "room must empty"); uint amount = rooms[roomId].price; for (uint256 i = 0; i < currentSize; i++) { address to = participant[roomId][i]; if(native) { TransferHelper.safeTransferETH(to, amount); } else { TransferHelper.safeTransfer(baseToken, to, amount); } delete participant[roomId][i]; } delete participantEntry[roomId]; emit LogCancel(msg.sender, roomId, block.timestamp); } function _split(uint256 revenue, bool native) private returns(uint) { address erc20 = native ? address(0) : baseToken; (uint balance, address[] memory to, uint[] memory amount) = IProtocol(feeProtocol).calculate(erc20, revenue, native); for (uint256 i = 0; i < to.length; i++) { if(to[i] == address(0) || amount[i] <= 0) { continue; } if(native) { TransferHelper.safeTransferETH(to[i], amount[i]); } else { TransferHelper.safeTransfer(erc20, to[i], amount[i]); } } return balance; } function _randomWinner(bytes32 roomId, uint seed) private view returns(address) { uint min = 0; uint max = rooms[roomId].size - 1; uint winnerIndex = _random(seed, participantEntry[roomId].randomness) % (max - min + 1) + min; address winner = participant[roomId][winnerIndex]; return winner; } function _random(uint seed, uint seed1) private view returns(uint256) { return uint(keccak256(abi.encodePacked(seed, seed1, msg.sender, blockhash(block.number - 1), block.timestamp))); } fallback() external payable { revert("not accepted"); } receive() external payable { revert("not accepted"); } }
{ "optimizer": { "enabled": true, "runs": 10000 }, "evmVersion": "paris", "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"erc20","type":"address"},{"internalType":"uint256","name":"revenue","type":"uint256"},{"internalType":"bool","name":"native","type":"bool"}],"name":"calculate","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address[]","name":"","type":"address[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405261012c600055606460015560646002556101f46003556109c4600455611d4c600555348015603157600080fd5b50610708806100416000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063a17134b714610030575b600080fd5b61004361003e366004610473565b61005b565b604051610052939291906104d3565b60405180910390f35b60006060806000610077600354876103ab90919063ffffffff16565b9050600061008587836103d9565b9050600086610095576003610098565b60025b60ff16905060008167ffffffffffffffff8111156100b8576100b8610574565b6040519080825280602002602001820160405280156100e1578160200160208202803683370190505b50905060008267ffffffffffffffff8111156100ff576100ff610574565b604051908082528060200260200182016040528015610128578160200160208202803683370190505b509050881561022a5773bf90af3ef59dd627f22be64f2a08b2db09bec8a382600081518110610159576101596105a3565b73ffffffffffffffffffffffffffffffffffffffff9092166020928302919091019091015260045461018c9086906103ab565b8160008151811061019f5761019f6105a3565b60200260200101818152505073616b59f3ae717453025b8b3e3c70894c679c2497826001815181106101d3576101d36105a3565b73ffffffffffffffffffffffffffffffffffffffff909216602092830291909101909101526005546102069086906103ab565b81600181518110610219576102196105a3565b602002602001018181525050610399565b736253707e7905d752ab816ef9d91a50e89bca920482600081518110610252576102526105a3565b73ffffffffffffffffffffffffffffffffffffffff90921660209283029190910190910152600054610285908b906103ab565b81600081518110610298576102986105a3565b60200260200101818152505073bf90af3ef59dd627f22be64f2a08b2db09bec8a3826001815181106102cc576102cc6105a3565b73ffffffffffffffffffffffffffffffffffffffff909216602092830291909101909101526001546102ff908b906103ab565b81600181518110610312576103126105a3565b60200260200101818152505073616b59f3ae717453025b8b3e3c70894c679c249782600281518110610346576103466105a3565b73ffffffffffffffffffffffffffffffffffffffff90921660209283029190910190910152600254610379908b906103ab565b8160028151811061038c5761038c6105a3565b6020026020010181815250505b929a9099509197509095505050505050565b60008082116103b957600080fd5b6127106103c68385610601565b6103d09190610618565b90505b92915050565b60006103d083836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506000818484111561045d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104549190610653565b60405180910390fd5b50600061046a84866106bf565b95945050505050565b60008060006060848603121561048857600080fd5b833573ffffffffffffffffffffffffffffffffffffffff811681146104ac57600080fd5b925060208401359150604084013580151581146104c857600080fd5b809150509250925092565b6000606082018583526060602084015280855180835260808501915060208701925060005b8181101561052c57835173ffffffffffffffffffffffffffffffffffffffff168352602093840193909201916001016104f8565b505083810360408501528451808252602091820192509085019060005b81811015610567578251845260209384019390920191600101610549565b5091979650505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b80820281158282048414176103d3576103d36105d2565b60008261064e577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b602081526000825180602084015260005b818110156106815760208186018101516040868401015201610664565b5060006040828501015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011684010191505092915050565b818103818111156103d3576103d36105d256fea26469706673582212203b8230dbce0a6023f2669dfd0ad66a4e7be9f4cc8f7276603a0966c64157f8dd64736f6c634300081b0033
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061002b5760003560e01c8063a17134b714610030575b600080fd5b61004361003e366004610473565b61005b565b604051610052939291906104d3565b60405180910390f35b60006060806000610077600354876103ab90919063ffffffff16565b9050600061008587836103d9565b9050600086610095576003610098565b60025b60ff16905060008167ffffffffffffffff8111156100b8576100b8610574565b6040519080825280602002602001820160405280156100e1578160200160208202803683370190505b50905060008267ffffffffffffffff8111156100ff576100ff610574565b604051908082528060200260200182016040528015610128578160200160208202803683370190505b509050881561022a5773bf90af3ef59dd627f22be64f2a08b2db09bec8a382600081518110610159576101596105a3565b73ffffffffffffffffffffffffffffffffffffffff9092166020928302919091019091015260045461018c9086906103ab565b8160008151811061019f5761019f6105a3565b60200260200101818152505073616b59f3ae717453025b8b3e3c70894c679c2497826001815181106101d3576101d36105a3565b73ffffffffffffffffffffffffffffffffffffffff909216602092830291909101909101526005546102069086906103ab565b81600181518110610219576102196105a3565b602002602001018181525050610399565b736253707e7905d752ab816ef9d91a50e89bca920482600081518110610252576102526105a3565b73ffffffffffffffffffffffffffffffffffffffff90921660209283029190910190910152600054610285908b906103ab565b81600081518110610298576102986105a3565b60200260200101818152505073bf90af3ef59dd627f22be64f2a08b2db09bec8a3826001815181106102cc576102cc6105a3565b73ffffffffffffffffffffffffffffffffffffffff909216602092830291909101909101526001546102ff908b906103ab565b81600181518110610312576103126105a3565b60200260200101818152505073616b59f3ae717453025b8b3e3c70894c679c249782600281518110610346576103466105a3565b73ffffffffffffffffffffffffffffffffffffffff90921660209283029190910190910152600254610379908b906103ab565b8160028151811061038c5761038c6105a3565b6020026020010181815250505b929a9099509197509095505050505050565b60008082116103b957600080fd5b6127106103c68385610601565b6103d09190610618565b90505b92915050565b60006103d083836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506000818484111561045d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104549190610653565b60405180910390fd5b50600061046a84866106bf565b95945050505050565b60008060006060848603121561048857600080fd5b833573ffffffffffffffffffffffffffffffffffffffff811681146104ac57600080fd5b925060208401359150604084013580151581146104c857600080fd5b809150509250925092565b6000606082018583526060602084015280855180835260808501915060208701925060005b8181101561052c57835173ffffffffffffffffffffffffffffffffffffffff168352602093840193909201916001016104f8565b505083810360408501528451808252602091820192509085019060005b81811015610567578251845260209384019390920191600101610549565b5091979650505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b80820281158282048414176103d3576103d36105d2565b60008261064e577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b602081526000825180602084015260005b818110156106815760208186018101516040868401015201610664565b5060006040828501015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011684010191505092915050565b818103818111156103d3576103d36105d256fea26469706673582212203b8230dbce0a6023f2669dfd0ad66a4e7be9f4cc8f7276603a0966c64157f8dd64736f6c634300081b0033
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.