subscan
Runtime Modules / DCA
Spec Version:
Call Functions
Name
Lookup
Parameters
schedule42002
terminate42012
Events
Name
Lookup
Attributes
ExecutionStarted4200["ScheduleId","BlockNumberFor"]
Scheduled4201["ScheduleId","AccountId","BlockNumberFor","Balance","Order<AssetId>"]
ExecutionPlanned4202["ScheduleId","AccountId","BlockNumberFor"]
TradeExecuted4203["ScheduleId","AccountId","Balance","Balance"]
TradeFailed4204["ScheduleId","AccountId","DispatchError"]
Terminated4205["ScheduleId","AccountId","DispatchError"]
Completed4206["ScheduleId","AccountId"]
RandomnessGenerationFailed4207["BlockNumberFor","DispatchError"]
Storage Functions
Name
Type
ScheduleIdSequencer{"origin":"PlainType","plain_type":"U32","PlainTypeValue":4}
Schedules{"origin":"Map","n_map_type":{"hashers":["Blake2_128Concat"],"key_vec":["U32"],"value":"pallet_dca:types:Schedule","keys_id":4,"value_id":374}}
ScheduleOwnership{"origin":"Map","n_map_type":{"hashers":["Blake2_128Concat","Twox64Concat"],"key_vec":["AccountId","U32"],"value":"NULL","keys_id":540,"value_id":36}}
RemainingAmounts{"origin":"Map","n_map_type":{"hashers":["Blake2_128Concat"],"key_vec":["U32"],"value":"U128","keys_id":4,"value_id":6}}
RetriesOnError{"origin":"Map","n_map_type":{"hashers":["Blake2_128Concat"],"key_vec":["U32"],"value":"U8","keys_id":4,"value_id":2}}
ScheduleIdsPerBlock{"origin":"Map","n_map_type":{"hashers":["Blake2_128Concat"],"key_vec":["U32"],"value":"Vec<U32>","keys_id":4,"value_id":622}}
Constants
Name
Type
Value
MaxPriceDifferenceBetweenBlocksU32983a0000
MaxSchedulePerBlockU3214000000
MaxNumberOfRetriesOnErrorU803
MinimumTradingLimitU128e8030000000000000000000000000000
NativeAssetIdU3200000000
MinBudgetInNativeCurrencyU1280080c6a47e8d03000000000000000000
FeeReceiverAccountId6d6f646c70792f74727372790000000000000000000000000000000000000000
NamedReserveId[U8; 8]6463616f72646572
Error Types
Name
Docs
ScheduleNotFoundSchedule not exist
MinTradeAmountNotReachedThe min trade amount is not reached
ForbiddenForbidden as the user is not the owner of the schedule
BlockNumberIsNotInFutureThe next execution block number is not in the future
PriceUnstablePrice is unstable as price change from oracle data is bigger than max allowed
CalculatingPriceErrorError occurred when calculating price
TotalAmountIsSmallerThanMinBudgetThe total amount to be reserved is smaller than min budget
BudgetTooLowThe budget is too low for executing one DCA
NoFreeBlockFoundThere is no free block found to plan DCA execution
ManuallyTerminatedThe DCA schedule has been manually terminated
MaxRetryReachedMax number of retries reached for schedule
TradeLimitReachedAbsolutely trade limit reached reached, leading to retry
SlippageLimitReachedSlippage limit calculated from oracle is reached, leading to retry
NoParentHashFoundNo parent hash has been found from relay chain
InvalidStateError that should not really happen only in case of invalid state of the schedule storage entries