Source Code
Overview
ETH Balance
0 ETH
More Info
ContractCreator
Multichain Info
N/A
Loading...
Loading
Loading...
Loading
Contract Name:
Primitives
Compiler Version
v0.8.26+commit.8a97fa7a
Contract Source Code (Solidity)
/**
*Submitted for verification at Etherscan.io on 2025-01-26
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.26;
contract Primitives {
bool public boo = true;
/*
uint stands for unsigned integer, meaning non negative integers
different sizes are available
uint8 ranges from 0 to 2 ** 8 - 1
uint16 ranges from 0 to 2 ** 16 - 1
...
uint256 ranges from 0 to 2 ** 256 - 1
*/
uint8 public u8 = 1;
uint256 public u256 = 456;
uint256 public u = 123; // uint is an alias for uint256
/*
Negative numbers are allowed for int types.
Like uint, different ranges are available from int8 to int256
int256 ranges from -2 ** 255 to 2 ** 255 - 1
int128 ranges from -2 ** 127 to 2 ** 127 - 1
*/
int8 public i8 = -1;
int256 public i256 = 456;
int256 public i = -123; // int is same as int256
// minimum and maximum of int
int256 public minInt = type(int256).min;
int256 public maxInt = type(int256).max;
address public addr = 0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c;
/*
In Solidity, the data type byte represent a sequence of bytes.
Solidity presents two type of bytes types :
- fixed-sized byte arrays
- dynamically-sized byte arrays.
The term bytes in Solidity represents a dynamic array of bytes.
It’s a shorthand for byte[] .
*/
bytes1 a = 0xb5; // [10110101]
bytes1 b = 0x56; // [01010110]
// Default values
// Unassigned variables have a default value
bool public defaultBoo; // false
uint256 public defaultUint; // 0
int256 public defaultInt; // 0
address public defaultAddr; // 0x0000000000000000000000000000000000000000
}Contract ABI
API[{"inputs":[],"name":"addr","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"boo","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"defaultAddr","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"defaultBoo","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"defaultInt","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"defaultUint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"i","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"i256","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"i8","outputs":[{"internalType":"int8","name":"","type":"int8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxInt","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minInt","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"u","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"u256","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"u8","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"}]Contract Creation Code
608060405260015f806101000a81548160ff02191690831515021790555060015f60016101000a81548160ff021916908360ff1602179055506101c8600155607b6002557fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60035f6101000a81548160ff02191690835f0b60ff1602179055506101c86004557fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff856005557f80000000000000000000000000000000000000000000000000000000000000006006557f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60075573ca35b7d915458ef540ade6068dfe2f44e8fa733c60085f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060b560f81b600860146101000a81548160ff021916908360f81c0217905550605660f81b600860156101000a81548160ff021916908360f81c021790555034801561018e575f80fd5b506104da8061019c5f395ff3fe608060405234801561000f575f80fd5b50600436106100e8575f3560e01c80637a4c25711161008a578063ab3a58a311610064578063ab3a58a314610218578063c6a898c514610236578063e5aa3d5814610254578063f2427d3714610272576100e8565b80637a4c2571146101be5780637e4e14cc146101dc578063921cda74146101fa576100e8565b80634b3df200116100c65780634b3df200146101465780634c27fd62146101645780635abe622b14610182578063767800de146101a0576100e8565b8063074eef3f146100ec5780631570c2cb1461010a578063459b1acf14610128575b5f80fd5b6100f4610290565b604051610101919061036a565b60405180910390f35b6101126102a3565b60405161011f919061039b565b60405180910390f35b6101306102a9565b60405161013d919061039b565b60405180910390f35b61014e6102af565b60405161015b919061036a565b60405180910390f35b61016c6102bf565b60405161017991906103cc565b60405180910390f35b61018a6102c5565b60405161019791906103cc565b60405180910390f35b6101a86102cb565b6040516101b59190610424565b60405180910390f35b6101c66102f0565b6040516101d391906103cc565b60405180910390f35b6101e46102f6565b6040516101f191906103cc565b60405180910390f35b6102026102fc565b60405161020f9190610457565b60405180910390f35b61022061030d565b60405161022d919061048b565b60405180910390f35b61023e61031f565b60405161024b919061039b565b60405180910390f35b61025c610325565b60405161026991906103cc565b60405180910390f35b61027a61032b565b6040516102879190610424565b60405180910390f35b600860169054906101000a900460ff1681565b60095481565b60015481565b5f8054906101000a900460ff1681565b60045481565b600a5481565b60085f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60075481565b60065481565b60035f9054906101000a90045f0b81565b5f60019054906101000a900460ff1681565b60025481565b60055481565b600b5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f8115159050919050565b61036481610350565b82525050565b5f60208201905061037d5f83018461035b565b92915050565b5f819050919050565b61039581610383565b82525050565b5f6020820190506103ae5f83018461038c565b92915050565b5f819050919050565b6103c6816103b4565b82525050565b5f6020820190506103df5f8301846103bd565b92915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61040e826103e5565b9050919050565b61041e81610404565b82525050565b5f6020820190506104375f830184610415565b92915050565b5f815f0b9050919050565b6104518161043d565b82525050565b5f60208201905061046a5f830184610448565b92915050565b5f60ff82169050919050565b61048581610470565b82525050565b5f60208201905061049e5f83018461047c565b9291505056fea2646970667358221220cc1c80344ee49ce3638d38e60082bf4e4698750b7af45ac30141cf01d5e60b0564736f6c634300081a0033
Deployed Bytecode
0x608060405234801561000f575f80fd5b50600436106100e8575f3560e01c80637a4c25711161008a578063ab3a58a311610064578063ab3a58a314610218578063c6a898c514610236578063e5aa3d5814610254578063f2427d3714610272576100e8565b80637a4c2571146101be5780637e4e14cc146101dc578063921cda74146101fa576100e8565b80634b3df200116100c65780634b3df200146101465780634c27fd62146101645780635abe622b14610182578063767800de146101a0576100e8565b8063074eef3f146100ec5780631570c2cb1461010a578063459b1acf14610128575b5f80fd5b6100f4610290565b604051610101919061036a565b60405180910390f35b6101126102a3565b60405161011f919061039b565b60405180910390f35b6101306102a9565b60405161013d919061039b565b60405180910390f35b61014e6102af565b60405161015b919061036a565b60405180910390f35b61016c6102bf565b60405161017991906103cc565b60405180910390f35b61018a6102c5565b60405161019791906103cc565b60405180910390f35b6101a86102cb565b6040516101b59190610424565b60405180910390f35b6101c66102f0565b6040516101d391906103cc565b60405180910390f35b6101e46102f6565b6040516101f191906103cc565b60405180910390f35b6102026102fc565b60405161020f9190610457565b60405180910390f35b61022061030d565b60405161022d919061048b565b60405180910390f35b61023e61031f565b60405161024b919061039b565b60405180910390f35b61025c610325565b60405161026991906103cc565b60405180910390f35b61027a61032b565b6040516102879190610424565b60405180910390f35b600860169054906101000a900460ff1681565b60095481565b60015481565b5f8054906101000a900460ff1681565b60045481565b600a5481565b60085f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60075481565b60065481565b60035f9054906101000a90045f0b81565b5f60019054906101000a900460ff1681565b60025481565b60055481565b600b5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f8115159050919050565b61036481610350565b82525050565b5f60208201905061037d5f83018461035b565b92915050565b5f819050919050565b61039581610383565b82525050565b5f6020820190506103ae5f83018461038c565b92915050565b5f819050919050565b6103c6816103b4565b82525050565b5f6020820190506103df5f8301846103bd565b92915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61040e826103e5565b9050919050565b61041e81610404565b82525050565b5f6020820190506104375f830184610415565b92915050565b5f815f0b9050919050565b6104518161043d565b82525050565b5f60208201905061046a5f830184610448565b92915050565b5f60ff82169050919050565b61048581610470565b82525050565b5f60208201905061049e5f83018461047c565b9291505056fea2646970667358221220cc1c80344ee49ce3638d38e60082bf4e4698750b7af45ac30141cf01d5e60b0564736f6c634300081a0033
Deployed Bytecode Sourcemap
61:1663:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1536:22;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;1574:26;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;416:25;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;88:22;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;775:24;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;1612;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;991:64;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;943:39;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;897;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;749:19;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;390;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;448:22;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;806;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;1648:26;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;1536:22;;;;;;;;;;;;;:::o;1574:26::-;;;;:::o;416:25::-;;;;:::o;88:22::-;;;;;;;;;;;;:::o;775:24::-;;;;:::o;1612:::-;;;;:::o;991:64::-;;;;;;;;;;;;;:::o;943:39::-;;;;:::o;897:::-;;;;:::o;749:19::-;;;;;;;;;;;;;:::o;390:::-;;;;;;;;;;;;;:::o;448:22::-;;;;:::o;806:::-;;;;:::o;1648:26::-;;;;;;;;;;;;;:::o;7:90:1:-;41:7;84:5;77:13;70:21;59:32;;7:90;;;:::o;103:109::-;184:21;199:5;184:21;:::i;:::-;179:3;172:34;103:109;;:::o;218:210::-;305:4;343:2;332:9;328:18;320:26;;356:65;418:1;407:9;403:17;394:6;356:65;:::i;:::-;218:210;;;;:::o;434:77::-;471:7;500:5;489:16;;434:77;;;:::o;517:118::-;604:24;622:5;604:24;:::i;:::-;599:3;592:37;517:118;;:::o;641:222::-;734:4;772:2;761:9;757:18;749:26;;785:71;853:1;842:9;838:17;829:6;785:71;:::i;:::-;641:222;;;;:::o;869:76::-;905:7;934:5;923:16;;869:76;;;:::o;951:115::-;1036:23;1053:5;1036:23;:::i;:::-;1031:3;1024:36;951:115;;:::o;1072:218::-;1163:4;1201:2;1190:9;1186:18;1178:26;;1214:69;1280:1;1269:9;1265:17;1256:6;1214:69;:::i;:::-;1072:218;;;;:::o;1296:126::-;1333:7;1373:42;1366:5;1362:54;1351:65;;1296:126;;;:::o;1428:96::-;1465:7;1494:24;1512:5;1494:24;:::i;:::-;1483:35;;1428:96;;;:::o;1530:118::-;1617:24;1635:5;1617:24;:::i;:::-;1612:3;1605:37;1530:118;;:::o;1654:222::-;1747:4;1785:2;1774:9;1770:18;1762:26;;1798:71;1866:1;1855:9;1851:17;1842:6;1798:71;:::i;:::-;1654:222;;;;:::o;1882:89::-;1916:7;1959:5;1956:1;1945:20;1934:31;;1882:89;;;:::o;1977:109::-;2058:21;2073:5;2058:21;:::i;:::-;2053:3;2046:34;1977:109;;:::o;2092:210::-;2179:4;2217:2;2206:9;2202:18;2194:26;;2230:65;2292:1;2281:9;2277:17;2268:6;2230:65;:::i;:::-;2092:210;;;;:::o;2308:86::-;2343:7;2383:4;2376:5;2372:16;2361:27;;2308:86;;;:::o;2400:112::-;2483:22;2499:5;2483:22;:::i;:::-;2478:3;2471:35;2400:112;;:::o;2518:214::-;2607:4;2645:2;2634:9;2630:18;2622:26;;2658:67;2722:1;2711:9;2707:17;2698:6;2658:67;:::i;:::-;2518:214;;;;:::o
Swarm Source
ipfs://cc1c80344ee49ce3638d38e60082bf4e4698750b7af45ac30141cf01d5e60b05
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.