Intents
public struct Intents has store {
// map of intents: key -> Intent<Outcome>
inner: Bag,
// ids of the objects that are being requested in intents, to avoid state changes
locked: VecSet<ID>,
}public struct Intent<Outcome> has store {
// type of the intent, checked against the witness to ensure correct execution
type_: TypeName,
// name of the intent, serves as a key, should be unique
key: String,
// what this intent aims to do, for informational purpose
description: String,
// address of the account that created the intent
account: address,
// address of the user that created the intent
creator: address,
// timestamp of the intent creation
creation_time: u64,
// proposer can add a timestamp_ms before which the intent can't be executed
// can be used to schedule actions via a backend
// recurring intents can be executed at these times
execution_times: vector<u64>,
// the intent can be deleted from this timestamp
expiration_time: u64,
// role for the intent
role: String,
// heterogenous array of actions to be executed in order
actions: Bag,
// Generic struct storing vote related data, depends on the config
outcome: Outcome
}Intent type
Role
Params
Recurring intents
Deletion
Actions
ActionsOutcome
Last updated