Finalize a SNS Swap locally

Once a local SNS proposal has been executed and the maximum of the SNS Swap is committed, what function should run to finalize the swap?

What I mean is that the SNS proposal was executed, the Swap started, and appeared in the NNS dapp launchpad. Then I created a few users, got some ICP, and committed the maximum for the Swap, which consequently concluded the Swap and it no longer appears in the Launchpad. However, now I would like to see the tokens and neurons that were created within the NNS dapp, but they are not there. I am guessing that some endpoints should be triggered.

Once the finalization criteria are met, the swap should finalize automatically. Feel free to call the get_auto_finalization_status function of Swap to see if this worked out as expected.

I would like to see the tokens and neurons that were created within the NNS dapp, but they are not there

The SNS neurons won’t be shown in the NNS dapp because they belong to the swap participants, not to the identity you’re most likely using to log into II / NNS dapp.

PS. Note that no actual SNS tokens are granted, although one of the neurons in the SNS neuron basket could be dissoved immediately.

2 Likes

It seems to have worked out.

(
  record {
    auto_finalize_swap_response = opt record {
      set_dapp_controllers_call_result = opt record {
        possibility = opt variant { Ok = record { failed_updates = vec {} } };
      };
      create_sns_neuron_recipes_result = null;
      settle_community_fund_participation_result = null;
      error_message = null;
      settle_neurons_fund_participation_result = opt record {
        possibility = opt variant {
          Ok = record {
            neurons_fund_participation_icp_e8s = opt (0 : nat64);
            neurons_fund_neurons_count = opt (0 : nat64);
          }
        };
      };
      set_mode_call_result = null;
      sweep_icp_result = opt record {
        failure = 0 : nat32;
        skipped = 0 : nat32;
        invalid = 0 : nat32;
        success = 2 : nat32;
        global_failures = 0 : nat32;
      };
      claim_neuron_result = null;
      sweep_sns_result = null;
    };
    has_auto_finalize_been_attempted = opt true;
    is_auto_finalize_enabled = opt true;
  },
)

When I check the SNS aggregator JSON I also find a lifecycle 4

lifecycle	
decentralization_sale_open_timestamp_seconds	1720807629
lifecycle	4
decentralization_swap_termination_timestamp_seconds	1720808493

However nothing is displayed in the local NNS dapp


Not sure I follow you. I participed with Swap participatns within NNS dapp, therefore I except that the principals derived from II in NNS dapp for those participants are those accounts use to get the neurons, similar to a Swap flow on mainnet.

Ahhh lifecycle 4 means “aborted”. What can be the reason?

Let’s start a clean thread, my original question here is answered above.