Dynamic Store Challenges
Require transfer initiators to pass boolean checks against dynamic stores. Typically, these are used with smart contracts.
How It Works
Dynamic store challenges check if the transfer initiator has a true
value in specified dynamic stores. The system:
Checks Initiator: Looks up the initiator's address in the specified dynamic store
Evaluates Boolean: Returns
true
orfalse
for the initiatorRequires All True: All challenges must return
true
for approvalFails if Any False: If any challenge returns
false
, transfer is denied
Interface
interface DynamicStoreChallenge<T extends NumberType> {
storeId: string; // Dynamic store ID to check
}
Usage in Approval Criteria
{
"dynamicStoreChallenges": [
{ "storeId": "1" }, // Member status store
{ "storeId": "2" } // Subscription status store
]
}
Managing Dynamic Stores
Creating Stores
Use MsgCreateDynamicStore to create new dynamic stores with default boolean values.
Setting Values
Use MsgSetDynamicStoreValue to set boolean values for specific addresses.
Querying Values
Use GetDynamicStoreValue to check current values for addresses.
Alternative
For fully off-chain solutions, consider Merkle Challenges to save gas costs.
Last updated