Andromeda
Search…
⌃K

Address List

Introduction

The Address List ADO is a smart contract that can be used to store a list of addresses.
These addresses can be set as one of the following:
  • Whitelist: The addresses are given whitelist privilege, allowing them to interact with it. If a whitelist of addresses is set, then any other address is considered as a blacklist.
  • Blacklist: The addresses are give blacklist restriction, preventing them to interact with the contract. If a blacklist of addresses is set, then any other address is considered as a whitelist.
This ADO is usually implemented as a module to interact with other ADOs, setting a whitelist/blacklist for the ADO.
Ado_type: address-list

InstantiateMsg

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.

ExecuteMsg

AddAddress

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.

RemoveAddress

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.

AndrReceive

The rest of the executes can be found in the AndrReceive section.

QueryMsg

IncludesAddress

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.

IncludesAddressResponse

Rust
JSON
pub struct IncludesAddressResponse {
pub included: bool,
}
{
"included": false
}
Name
Type
Description
included
Bool
Whether the address is included.

AndrQuery

A set of base queries common to all Andromeda ADOs. Check AndrQuery.