pub struct Config {
pub croncat_factory_addr: Addr,
pub croncat_manager_key: (String, [u8; 2]),
pub croncat_tasks_key: (String, [u8; 2]),
pub owner_addr: Addr,
pub pause_admin: Addr,
pub min_tasks_per_agent: u64,
pub agent_nomination_block_duration: u16,
pub min_coins_for_agent_registration: u64,
pub agents_eject_threshold: u64,
pub min_active_agent_count: u16,
pub public_registration: bool,
}Expand description
Contract configuration state
Fields§
§croncat_factory_addr: AddrAddress of the factory contract
croncat_manager_key: (String, [u8; 2])Name of the key for raw querying Manager address from the factory
croncat_tasks_key: (String, [u8; 2])Name of the key for raw querying Tasks address from the factory
owner_addr: AddrContract owner address
pause_admin: AddrA multisig admin whose sole responsibility is to pause the contract in event of emergency. Must be a different contract address than DAO, cannot be a regular keypair Does not have the ability to unpause, must rely on the DAO to assess the situation and act accordingly
min_tasks_per_agent: u64Agent management The minimum number of tasks per agent Example: 10 Explanation: For every 1 agent, 10 tasks per slot are available. NOTE: Caveat, when there are odd number of tasks or agents, the overflow will be available to first-come, first-serve. This doesn’t negate the possibility of a failed txn from race case choosing winner inside a block. NOTE: The overflow will be adjusted to be handled by sweeper in next implementation.
agent_nomination_block_duration: u16The duration a prospective agent has to nominate themselves. When a task is created such that a new agent can join, The agent at the zeroth index of the pending agent queue has this time to nominate The agent at the first index has twice this time to nominate (which would remove the former agent from the pending queue) Value is in seconds
min_coins_for_agent_registration: u64Min coins that should be attached to register an agent
agents_eject_threshold: u64How many slots an agent can miss before being removed from the active queue
min_active_agent_count: u16Minimum agent count in active queue to be untouched by bad agent verifier
public_registration: boolWhether agent registration is public or restricted to an internal whitelist (allowed_agents) Determines whether agent registration is open to the public If false, the APPROVED_AGENTS map will determine if an agent is allowed to register If true, any address can register and enter the pending queue, provided they have the assets required. Note that once this becomes true, it’s intentionally meant to be true forever, since this is an aspect of progressive decentralization
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for Config
impl JsonSchema for Config
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read more