Address List
The Address List ADO is a smart contract that can be used to store a list of addresses. It is one of the Andromeda modules that can be attached to ADOs that accept modules.
These addresses can be set as one of the following:
- Whitelist: The addresses are given whitelist privilege, allowing them to interact/execute with the ADO that has the module attached . If a whitelist of addresses is set, then any other address is considered as a blacklist.
- Blacklist: The addresses are given blacklist restriction, preventing them to interact/execute with the ADO that has the module attached. If a blacklist of addresses is set, then any other address is considered as a whitelist.
Blacklisted addresses are restricted from performing any execute message, but they can still query from the ADO.
Ado_type: address-list
Rust
JSON
pub struct InstantiateMsg {
pub is_inclusive: bool,
}
{
"is_inclusive": false
}
Name | Type | Description |
---|---|---|
is_inclusive | bool | Whether or not the address list is inclusive. If true the address list is a whitelist. If false the address list is a blacklist. |
Adds an address to the address list.
Only Owner/Operators can execute AddAddress.
Rust
JSON
pub enum ExecuteMsg {
AddAddress { address: String },
}
{
"add_address": {
"address": "andr1..."
}
}
Name | Type | Description |
---|---|---|
address | String | The address to add to the list. |
Removes an address from the address list.
Only Owner/Operators can execute RemoveAddress.
Rust
JSON
pub enum ExecuteMsg {
RemoveAddress { address: String },
}
{
"remove_address": {
"address": "andr1..."
}
}
Name | Type | Description |
---|---|---|
address | String | The address to remove from the list. |
Query if an address is included in the address list.
Rust
JSON
pub enum QueryMsg {
#[returns(IncludesAddressResponse)]
IncludesAddress{
address: String
},
}
{
"includes_address": {
"address": "andr1..."
}
}
Name | Type | Description |
---|---|---|
address | String | The address for which to query inclusion. |
Rust
JSON
pub struct IncludesAddressResponse {
pub included: bool,
}
{
"included": false
}
Name | Type | Description |
---|---|---|
included | Bool | Whether the address is included. |