Andromeda
Search…
Address List
An ADO contract to store a queryable list of addresses.

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 contract is usually implemented as a module to interact with other contracts setting the whitelist/blacklist for the contract.
Ado_type: address-list

InstantiateMsg

Rust
JSON
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
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
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub enum ExecuteMsg {
AddAddress { address: String },
}
{
"add_address": {
"address": "juno1..."
}
}
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
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub enum ExecuteMsg {
RemoveAddress { address: String },
}
{
"remove_address": {
"address": "juno1..."
}
}
Name
Type
Description
address
String
The address to remove from the list.

AndrReceive

QueryMsg

IncludesAddress

Query if an address is included in the address list.
Rust
JSON
pub enum QueryMsg {
IncludesAddress{
address: String
},
}
{
"includes_address": {
"address": "juno1..."
}
}
Name
Type
Description
address
String
The address for which to query inclusion.

IncludesAddressResponse

Rust
JSON
#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema)]
pub struct IncludesAddressResponse {
pub included: bool,
}
{
"included": false
}
Name
Type
Description
included
Bool
Whether the address is included.

AndrQuery

Copy link
Outline
Introduction
InstantiateMsg
ExecuteMsg
AddAddress
RemoveAddress
AndrReceive
QueryMsg
IncludesAddress
AndrQuery