According to the documentation on the Solidity ABI:

address: equivalent to uint160, except for the assumed interpretation and language typing

The Solidity documentation carries on to say:

address: Holds a 20 byte value (size of an Ethereum address). Address types also have members and serve as a base for all contracts.

You should note firstly that the address type serves as a base for all contracts, in fact contracts inherit some members and functions from the address type. As such, when one initializes an address variable, it is possible to query the account at said address in the following ways, as stated in the documentation (here & here).

<address>.balance (uint256): balance of the Address in Wei
<address>.transfer(uint256 amount): send given amount of Wei to Address, throws on failure
<address>.send(uint256 amount) returns (bool): send given amount of Wei to Address, returns false on failure
<address>.call(...) returns (bool): issue low-level CALL, returns false on failure
<address>.callcode(...) returns (bool): issue low-level CALLCODE, returns false on failure
<address>.delegatecall(...) returns (bool): issue low-level DELEGATECALL, returns false on failure

The advantage of using an address variable instead of a uint160 is therefore the advantage it gives when querying or interacting with accounts (externally owned or contract accounts).

Using the address type also serves to improve readability, in that it tells the reader of the contract that the value stored relates to a contract address.

NOTE: As of version 5.0.0 of Solidity, members of the address type will no longer be available to contract types - you will need to explicitly cast to the address type first in order to use them.

Answer from Harry Wright on Stack Exchange
🌐
Medium
medium.com › @nareshmmr › understanding-the-address-data-type-in-solidity-fd4cad81abaf
Understanding the “address” Data Type in Solidity | by Naresh Mohanraj | Medium
June 6, 2024 - Think of it as a 20-character long identifier that uniquely points to an account. ... Non-Payable Address: Used for identifying accounts or contracts, but can’t directly receive money. Payable Address: Can receive and send Ether (money).
Top answer
1 of 3
2

According to the documentation on the Solidity ABI:

address: equivalent to uint160, except for the assumed interpretation and language typing

The Solidity documentation carries on to say:

address: Holds a 20 byte value (size of an Ethereum address). Address types also have members and serve as a base for all contracts.

You should note firstly that the address type serves as a base for all contracts, in fact contracts inherit some members and functions from the address type. As such, when one initializes an address variable, it is possible to query the account at said address in the following ways, as stated in the documentation (here & here).

<address>.balance (uint256): balance of the Address in Wei
<address>.transfer(uint256 amount): send given amount of Wei to Address, throws on failure
<address>.send(uint256 amount) returns (bool): send given amount of Wei to Address, returns false on failure
<address>.call(...) returns (bool): issue low-level CALL, returns false on failure
<address>.callcode(...) returns (bool): issue low-level CALLCODE, returns false on failure
<address>.delegatecall(...) returns (bool): issue low-level DELEGATECALL, returns false on failure

The advantage of using an address variable instead of a uint160 is therefore the advantage it gives when querying or interacting with accounts (externally owned or contract accounts).

Using the address type also serves to improve readability, in that it tells the reader of the contract that the value stored relates to a contract address.

NOTE: As of version 5.0.0 of Solidity, members of the address type will no longer be available to contract types - you will need to explicitly cast to the address type first in order to use them.

2 of 3
1

I would suggest to have a look at the documentation of Solidity:

  • Meaning of type address

  • Address related methods which you can call

According to provided links, you can see that using address datatype provides you most important functionality of the address that you should have.

Discussions

solidity - What is address[]? - Ethereum Stack Exchange
In Solidity, address[] is an array of type address. An address in Solidity is a data type that represents a 20-byte Ethereum address. Arrays in Solidity are a type of data structure that allows you to store and manage a collection of data. More on ethereum.stackexchange.com
🌐 ethereum.stackexchange.com
December 1, 2022
What is the maximum size of user data a smart contract can hold?
Theoretical limit of storage is, as you say, 2**256 slots, with 32 bytes per slot. The only way (hypothetically) to fill this would be with a dynamic array over time. The deploy cost for having and writing to that many slots would exceed the gas limit (you can try it by setting a fixed length array as the only storage variable with type(uint).max length.) If you created a dynamic array then in theory you can keep adding to it in increments of max blockspace. In practice this would be impossible from a time, cost, storage point of view. You'd run out of funds before you get close to crashing the network from filling up all harddrives. You can see an interesting quirk of this in older versions of solidity though - look that the OpenZeppelin's `AlienCodex` challenge and see if you can spot what I mean. More on reddit.com
🌐 r/solidity
17
2
July 6, 2023
Passing encrypted messages via smart contracts.

The answer is "yes" in a technical sense. Although you wouldn't want to put the encryption part on chain because your plaintext would be visible publicly. You could implement ECIES decryption on chain but it might be difficult (impossible?) to implement inside of the gas limit. Even then, you'd have to pull out the private key and pass it to the contract. You're much better off just storing encrypted data on chain and decrypt it with a client utility like parity_decryptMessage.

More on reddit.com
🌐 r/ethdev
17
6
February 28, 2018
Is it possible to clear a mapping?
Deleting from complex storage types (arrays, mappings, structs etc) where size and or memory location cannot be be determined requires explicit deleting of each element. delete frees up state storage and rewards with a gas discount, but you have to know what it is doing. Even used on an array can cause an OOG error as I believe it compiles to delete each element in a loop. Lookup the origional King of the Ether Throne bug for a classic example of unbounded deleteing. Putting complex types in structs makes no difference as delete will only delete simple type members of the struct. Storing your mapping keys and indices in iterable linked lists is an effective way of managing and removing such storage, though at a cost or extra storage. I have a Circular Linked List index library for exactly this kind of thing. You can step through and mutate/delete associated mapping values at will. It does however cost 4 SSTORE for each new key. More on reddit.com
🌐 r/ethereum
14
11
November 30, 2016
🌐
LogRocket
blog.logrocket.com › home › the ultimate guide to data types in solidity
The ultimate guide to data types in Solidity - LogRocket Blog
June 4, 2024 - Here’s an example showing how ... parameters within smart contracts. ... An address value type is specifically designed to hold up to 20B, or 160 bits, which is the size of an Ethereum address....
🌐
MLQ.ai
blog.mlq.ai › solidity-programming-strings-bytes-address-types
Solidity Programming: Strings, Bytes, and Address Types
December 15, 2022 - If we deploy this contract we see that someAdress is 0x0...initially, and if we hit updateSomeAddress it will automatically change to the last address that interacted with the contract: In this article, we discussed key data types in Solidty: strings, bytes, and address types.
🌐
GeeksforGeeks
geeksforgeeks.org › solidity-types
Solidity – Types | GeeksforGeeks
April 21, 2025 - They can be declared as fixed and unfixed for signed and unsigned fixed-point numbers of varying sizes respectively. Address: Address hold a 20-byte value which represents the size ...
🌐
Ethereum-blockchain-developer
ethereum-blockchain-developer.com › 010-solidity-basics › 04-address-types
Address Types
In general, a variable of the type address holds 20 bytes. That’s all that happens internally. Let’s see what we can do with Solidity and addresses.
🌐
Norton
nstec.com › technology › the-address-data-type-in-solidity-is-used-to-store-what-type-of-information
the address data type in solidity is used to store what type of information?
Solidity stores data in Memory, which is much like RAM, whereas Storage stores data between calls to the functions. Storage is always used by default for state variables, local variables of structs and arrays. ... China Telecom Launches A Documentation-oriented LLM-driven Application, New Paradigm ...
🌐
BitDegree
bitdegree.org › learn › solidity-types
Solidity Types Guide: Learn About Mapping Solidity
July 1, 2019 - In cases when _ValueType is a value type or a struct, the getter returns _ValueType. When it is an array or mapping, the getter has one parameter for every _KeyType, recursively. ... pragma solidity >=0.4.0 <0.7.0; contract MappingExample { mapping(address => uint) public balances; function update(uint newBalance) public { balances[msg.sender] = newBalance; } } contract MappingUser { function f() public returns (uint) { MappingExample m = new MappingExample(); m.update(100); return m.balances(address(this)); } }
Find elsewhere
🌐
Solidity
docs.soliditylang.org › en › v0.8.11 › types.html
Types — Solidity 0.8.11 documentation
April 14, 2022 - Previous versions of Solidity allowed these functions to receive arbitrary arguments and would also handle a first argument of type bytes4 differently. These edge cases were removed in version 0.5.0. It is possible to adjust the supplied gas with the gas modifier: ... Lastly, these modifiers can be combined. Their order does not matter: ... address(nameReg).call{gas: 1000000, value: 1 ether}(abi.encodeWithSignature("register(string)", "MyName"));
🌐
Solidity
docs.soliditylang.org › en › v0.8.17 › types.html
Types — Solidity 0.8.17 documentation
August 29, 2023 - Previous versions of Solidity allowed these functions to receive arbitrary arguments and would also handle a first argument of type bytes4 differently. These edge cases were removed in version 0.5.0. It is possible to adjust the supplied gas with the gas modifier: ... Lastly, these modifiers can be combined. Their order does not matter: ... address(nameReg).call{gas: 1000000, value: 1 ether}(abi.encodeWithSignature("register(string)", "MyName"));
🌐
101 Blockchains
101blockchains.com › home › solidity data types – an ultimate guide
Solidity Data Types - An Ultimate Guide - 101 Blockchains
March 17, 2025 - The final addition among value types in the data types in Solidity programming language refers to Addresses. The Address value type has been specifically tailored for storage capacity ranging up to 20 bits or 160 bits.
🌐
Solidity
docs.soliditylang.org › en › latest › types.html
Types — Solidity 0.8.36-develop documentation
Previous versions of Solidity allowed these functions to receive arbitrary arguments and would also handle a first argument of type bytes4 differently. These edge cases were removed in version 0.5.0. It is possible to adjust the supplied gas with the gas modifier: ... Lastly, these modifiers can be combined. Their order does not matter: ... address(nameReg).call{gas: 1000000, value: 1 ether}(abi.encodeWithSignature("register(string)", "MyName"));
🌐
Packtpub
subscription.packtpub.com › book › application-development › 9781788831383 › 3 › ch03lvl1sec46 › address
Packtpub
Access over 7,500 Programming & Development eBooks and videos to advance your IT skills. Enjoy unlimited access to over 100 new titles every month on the latest technologies and trends
🌐
Shardeum
shardeum.org › home › blog › blockchain basics › solidity data types
Solidity Data Types - A Complete Guide | Shardeum
January 16, 2025 - Solidity defines data using variables, specifying types like uint for integers or address for Ethereum addresses. Read more to learn about solidity data types
🌐
WhiteboardCrypto
whiteboardcrypto.com › home › solidity address
Solidity Address - WhiteboardCrypto
December 22, 2022 - //SPDX-License-Identifier: MIT ... view returns(address){ return msg.sender; } } All addresses are hashes generated using the keccak-256 algorithm....
🌐
Solidity
docs.soliditylang.org › en › v0.8.7 › types.html
Types — Solidity 0.8.7 documentation
You can mark state variables of mapping type as public and Solidity creates a getter for you. The _KeyType becomes a parameter for the getter. If _ValueType is a value type or a struct, the getter returns _ValueType. If _ValueType is an array or a mapping, the getter has one parameter for each _KeyType, recursively. In the example below, the MappingExample contract defines a public balances mapping, with the key type an address, and a value type a uint, mapping an Ethereum address to an unsigned integer value.
🌐
Finxter
blog.finxter.com › home › learn python blog › solidity fixed point numbers and address types (howto)
Solidity Fixed Point Numbers and Address Types (Howto) - Be on the Right Side of Change
October 11, 2022 - As was mentioned a few articles ago, every contract can be converted to the address type, so getting the contract’s balance is possible via address(this).balance. With this article, we made three more very important steps in the direction of getting to know Solidity data types, namely fixed-point ...
Top answer
1 of 3
2

address[] is a type, an array of addresses. You can think of it as a list of addresses.

The square brackets, [], are use to specify that this type is an array.

You can create an array of many things, like an array of uint256 numbers:

uint256[] numbers;

And many more with a similar syntax.

Many languages use the [] to create or declare an array. Like Javascript: const numbers = [];. We can usually initiate an array with values, like in js: const numbers = [1,2,3,4,5];. In Solidity it would look like this for an array of uint256 numbers in storage: uint256[] numbers = [1,2,3,4];

In your case, an array of addresses can be declared as a state variable as follows:

address[] admins;

And then, in another function you can add addresses to that array:

function addAdmin(address adminAddress) public onlyOwner {
   admins.push(adminAddress);
}

Of if you know the address before hand you can hard code them while you declare the array of addresses, like this:

address[] admins = [0x66B0b1d2930059407DcC30F1A2305435fc37315E, 0x6827b8f6cc60497d9bf5210d602C0EcaFDF7C405];

Arrays are really useful to hold a collection of things, objects, numbers, addresses, strings, etc.

We access arrays by index, starting at index 0 for the first element in most programming languages. If I want to access the first element of the array, then I do:

admins[0];

For the second:

admins[1];

And so on. Or in a loop:

for(uint256 i = 0; i < admins.length; i++) {
  address adminAddress = admins[i];
  // ...
  // do something with adminAddress
}

And so on.

Solidity has many rules for arrays. State and local arrays are usually declared differently and used a bit differently in some cases. To learn more about them you can check the documentation: https://docs.soliditylang.org/en/latest/types.html#arrays

I hope it has helped.

2 of 3
2

In Solidity, address[] is an array consisting of addresses.

See: How can I instantiate an array of addresses?

🌐
Medium
medium.com › @dameeolawuyi › address-in-solidity-what-are-they-3e9fda4754bd
Addresses in Solidity…What are they? | by OLUWADAMILOLA | Medium
August 22, 2022 - Addresses in Solidity are equally a data type. Specifically, it’s a variable type and not a reference type. Contract Address has a storage size of 20 byte consisting of 40 character. It’s the address…
🌐
GeeksforGeeks
geeksforgeeks.org › address-in-solidity
Address in Solidity | GeeksforGeeks
April 28, 2025 - This article aims to provide a comprehensive guide to addresses in Solidity, accompanied by relevant examples and covering various subtopics. The address type in Solidity is a 20-byte value that represents an Ethereum address. It can hold the ...