Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
0x60806040 | 12170137 | 1206 days ago | IN | Create: Planets | 0 ETH | 0.0499056 |
Loading...
Loading
Contract Name:
Planets
Compiler Version
v0.7.6+commit.7338295f
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.7.6; contract Planets { /** * @dev Returns the orbital elements for the specified planet * @param _planet Id of the planet */ function getElements(uint _planet) public pure returns (uint16[6] memory elements) { require(_planet >= 1 && _planet <= 5); if (_planet == 1) { elements = [ 258, 178, 639, 27693, 4955, 9342 ]; } else if (_planet == 2) { elements = [ 781, 29, 182, 31965, 7588, 24762 ]; } else if (_planet == 3) { elements = [ 3912, 13, 28, 33765, 6312, 26301 ]; } else if (_planet == 4) { elements = [ 7249, 42, 48, 35649, 32961, 17878 ]; } else if (_planet == 5) { elements = [ 9206, 37, 71, 9248, 25823, 22124 ]; } return elements; } /** * @dev Returns whether the planet is rocky or a gas giant * @param _planet The Id of the planet */ function getType(uint _planet) public pure returns (uint8) { require(_planet >= 1 && _planet <= 5); uint8[5] memory planetTypes = [ 1, 1, 2, 2, 2 ]; return planetTypes[_planet - 1]; } /** * @dev Gets the radius of the planet * @param _planet The Id of the planet */ function getRadius(uint _planet) public pure returns (uint32) { require(_planet >= 1 && _planet <= 5); uint32[5] memory radii = [ 1937420, 2910672, 69120870, 41059721, 19559342 ]; return radii[_planet - 1]; } /** * @dev Returns the elements for the planet that has trojan asteroids */ function getPlanetWithTrojanAsteroids() public pure returns (uint16[6] memory) { return getElements(3); } }
{ "remappings": [], "optimizer": { "enabled": false, "runs": 200 }, "evmVersion": "istanbul", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"uint256","name":"_planet","type":"uint256"}],"name":"getElements","outputs":[{"internalType":"uint16[6]","name":"elements","type":"uint16[6]"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getPlanetWithTrojanAsteroids","outputs":[{"internalType":"uint16[6]","name":"","type":"uint16[6]"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"_planet","type":"uint256"}],"name":"getRadius","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"_planet","type":"uint256"}],"name":"getType","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b5061050d806100206000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80633a0306dc146100515780634036ab78146100975780636b082eed146100dc578063944c8fdf14610124575b600080fd5b61005961018e565b6040518082600660200280838360005b83811015610084578082015181840152602081019050610069565b5050505090500191505060405180910390f35b6100c3600480360360208110156100ad57600080fd5b81019080803590602001909291905050506101a5565b604051808260ff16815260200191505060405180910390f35b610108600480360360208110156100f257600080fd5b810190808035906020019092919050505061021d565b604051808263ffffffff16815260200191505060405180910390f35b6101506004803603602081101561013a57600080fd5b81019080803590602001909291905050506102b1565b6040518082600660200280838360005b8381101561017b578082015181840152602081019050610160565b5050505090500191505060405180910390f35b6101966104b5565b6101a060036102b1565b905090565b6000600182101580156101b9575060058211155b6101c257600080fd5b60006040518060a00160405280600160ff168152602001600160ff168152602001600260ff168152602001600260ff168152602001600260ff16815250905080600184036005811061021057fe5b6020020151915050919050565b600060018210158015610231575060058211155b61023a57600080fd5b60006040518060a00160405280621d900c63ffffffff168152602001622c69d063ffffffff16815260200163041eb36663ffffffff168152602001630272858963ffffffff16815260200163012a73ae63ffffffff1681525090508060018403600581106102a457fe5b6020020151915050919050565b6102b96104b5565b600182101580156102cb575060058211155b6102d457600080fd5b6001821415610334576040518060c0016040528061010261ffff16815260200160b261ffff16815260200161027f61ffff168152602001616c2d61ffff16815260200161135b61ffff16815260200161247e61ffff1681525090506104b0565b6002821415610393576040518060c0016040528061030d61ffff168152602001601d61ffff16815260200160b661ffff168152602001617cdd61ffff168152602001611da461ffff1681526020016160ba61ffff1681525090506104af565b60038214156103f2576040518060c00160405280610f4861ffff168152602001600d61ffff168152602001601c61ffff1681526020016183e561ffff1681526020016118a861ffff1681526020016166bd61ffff1681525090506104ae565b6004821415610451576040518060c00160405280611c5161ffff168152602001602a61ffff168152602001603061ffff168152602001618b4161ffff1681526020016180c161ffff1681526020016145d661ffff1681525090506104ad565b60058214156104ac576040518060c001604052806123f661ffff168152602001602561ffff168152602001604761ffff16815260200161242061ffff1681526020016164df61ffff16815260200161566c61ffff1681525090505b5b5b5b5b919050565b6040518060c0016040528060069060208202803683378082019150509050509056fea26469706673582212202a9a1ed3e1b5da86518d7271abaab81c1b3c28e85309b8d3a1511514df661e5564736f6c63430007060033
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061004c5760003560e01c80633a0306dc146100515780634036ab78146100975780636b082eed146100dc578063944c8fdf14610124575b600080fd5b61005961018e565b6040518082600660200280838360005b83811015610084578082015181840152602081019050610069565b5050505090500191505060405180910390f35b6100c3600480360360208110156100ad57600080fd5b81019080803590602001909291905050506101a5565b604051808260ff16815260200191505060405180910390f35b610108600480360360208110156100f257600080fd5b810190808035906020019092919050505061021d565b604051808263ffffffff16815260200191505060405180910390f35b6101506004803603602081101561013a57600080fd5b81019080803590602001909291905050506102b1565b6040518082600660200280838360005b8381101561017b578082015181840152602081019050610160565b5050505090500191505060405180910390f35b6101966104b5565b6101a060036102b1565b905090565b6000600182101580156101b9575060058211155b6101c257600080fd5b60006040518060a00160405280600160ff168152602001600160ff168152602001600260ff168152602001600260ff168152602001600260ff16815250905080600184036005811061021057fe5b6020020151915050919050565b600060018210158015610231575060058211155b61023a57600080fd5b60006040518060a00160405280621d900c63ffffffff168152602001622c69d063ffffffff16815260200163041eb36663ffffffff168152602001630272858963ffffffff16815260200163012a73ae63ffffffff1681525090508060018403600581106102a457fe5b6020020151915050919050565b6102b96104b5565b600182101580156102cb575060058211155b6102d457600080fd5b6001821415610334576040518060c0016040528061010261ffff16815260200160b261ffff16815260200161027f61ffff168152602001616c2d61ffff16815260200161135b61ffff16815260200161247e61ffff1681525090506104b0565b6002821415610393576040518060c0016040528061030d61ffff168152602001601d61ffff16815260200160b661ffff168152602001617cdd61ffff168152602001611da461ffff1681526020016160ba61ffff1681525090506104af565b60038214156103f2576040518060c00160405280610f4861ffff168152602001600d61ffff168152602001601c61ffff1681526020016183e561ffff1681526020016118a861ffff1681526020016166bd61ffff1681525090506104ae565b6004821415610451576040518060c00160405280611c5161ffff168152602001602a61ffff168152602001603061ffff168152602001618b4161ffff1681526020016180c161ffff1681526020016145d661ffff1681525090506104ad565b60058214156104ac576040518060c001604052806123f661ffff168152602001602561ffff168152602001604761ffff16815260200161242061ffff1681526020016164df61ffff16815260200161566c61ffff1681525090505b5b5b5b5b919050565b6040518060c0016040528060069060208202803683378082019150509050509056fea26469706673582212202a9a1ed3e1b5da86518d7271abaab81c1b3c28e85309b8d3a1511514df661e5564736f6c63430007060033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.