Dynamic Store Challenges
Require transfer initiators to pass checks against dynamic stores. Typically, these are used in combination with smart contracts or other custom extensions.
Dynamic stores are standalone (address -> boolean) stores controlled by whoever creates them. They are stored and maintained by the creator. These are powerful for creating dynamic approval criteria with smart contracts and other custom use cases.
How It Works
Dynamic store challenges check if the transfer initiator has a value of true in specified dynamic stores. The system:
Checks Initiator: Looks up the initiator's address in the specified dynamic store
Evaluates Boolean: Returns the boolean value for the initiator
Requires All True: All challenges must return
truefor approvalFails if Any False: If any challenge returns
false, transfer is denied
Interface
interface DynamicStoreChallenge {
storeId: string; // Dynamic store ID to check
}Usage in Approval Criteria
{
"dynamicStoreChallenges": [
{ "storeId": "1" }, // Member store (must be true)
{ "storeId": "2" } // Subscription store (must be true)
]
}Managing Dynamic Stores
Creating Stores
Use MsgCreateDynamicStore to create new dynamic stores with a default boolean value.
Setting Values
Use MsgSetDynamicStoreValue to set boolean values for specific addresses.
Querying Values
Use GetDynamicStoreValue to check current values for addresses.
Alternatives
For fully off-chain solutions, consider:
Merkle Challenges to save gas costs
ETH Signature Challenges for direct authorization
Last updated