This model has 1 substep, where the result of action decoding will signal several state updates
The blocks are generated from the action json, because we need to calculate the length of the simlation (steps_number
)
def generate_partial_state_update_blocks(path_to_action_json: str) -> dict:
steps_number = ActionDecoder.load_actions(path_to_action_json)
return {
'partial_state_update_blocks': [
{
# system_policies.py
'policies': {
'user_action': ActionDecoder.p_action_decoder,
},
'variables': {
'pool': s_update_pool,
'change_datetime': s_update_change_datetime,
'token_prices': s_update_external_price_feeds,
'action_type': s_update_action_type,
'spot_prices': s_update_spot_prices,
}
},
],
'steps_number': steps_number,
}