Rate Limiting Withdrawals
Introduction
The Rate Limiting Withdrawals ADO acts as a bank account that limits the frequency and size of an account holder's withdrawals. Only one type of coin can be used.
Ado_type: rate-limiting-withdrawals
Version: 2.0.2-beta.1
InstantiateMsg
Name | Type | Description |
---|---|---|
| Set the allowed coin denom and the maximum amount allowed to withdraw. | |
| The time required between withdrawals. Specified in milliseconds. Cannot be 0. | |
| String | Contract address of the kernel contract to be used for AMP messaging. Kernel contract address can be found in our deployed contracts. |
| Option<String> | Optional address to specify as the owner of the ADO being created. Defaults to the sender if not specified. |
CoinAndLimit
Name | Type | Description |
---|---|---|
| String | Sets the accepted coin denom. |
| Uint128 | Sets the withdrawal limit in terms of amount. |
MinimumFrequency
Time: A time in milliseconds. For example 3600 would specify that each the user needs to wait 3600 milliseconds between withdrawals.
ExecuteMsg
Deposits
Deposit funds for the specified recipient.
Only the allowed coin in instantiation can be deposited.
Name | Type | Description |
---|---|---|
| Option<String> | The owner of the deposited funds. If not set, defaults to the sender. |
WithdrawFunds
Withdraw funds from the available balance.
Enough time should pass since the last withdrawal.
Name | Type | Description |
---|---|---|
| Uint128 | The amount of coins to withdraw. |
Base Executes
The rest of the execute messages can be found in the ADO Base section.
QueryMsg
CoinAllowanceDetails
Provides the allowed coin and limits for withdrawal size and frequency.
CoinAllowance
Returns a CoinAllowance struct.
Name | Type | Description |
---|---|---|
| string | The coin denom. |
| Uint128 | The amount allowed to withdraw per withdrawal. |
| The time required between withdrawals. Specified in milliseconds. |
AccountDetails
Shows the balance and latest withdrawal time.
Name | Type | Description |
---|---|---|
| String | The address to check the account for. |
AccountDetails
Returns an AccountDetails struct.
Name | Type | Description |
---|---|---|
| Uint128 | The balance of the specified address. |
| Option<Timestamp> | The time of the last withdrawal of the specified address. |
Base Queries
The rest of the query messages can be found in the ADO Base section.