/// Wraps the given proposal_payload into a proposal; sends it to the governance
/// canister; returns the `ManageNeuronResponse`
Wraps the given proposal_payload into a proposal; sends it to the governance
canister; returns the `ManageNeuronResponse`
Wraps the given proposal_payload into a proposal ; sends it to the governance canister ; returns the ` ManageNeuronResponse `
pub async fn submit_external_update_proposal_binary_with_response(
    governance_canister: &Canister<'_>,
    proposer: Sender,
    proposer_neuron_id: NeuronId,
    update_type: NnsFunction,
    proposal_payload: Vec<u8>,
    title: String,
    summary: String,
) -> ManageNeuronResponse {
    let proposal = Proposal {
        title: Some(title),
        summary,
        url: "".to_string(),
        action: Some(proposal::Action::ExecuteNnsFunction(ExecuteNnsFunction {
            nns_function: update_type as i32,
            payload: proposal_payload,
        })),
    };
    governance_canister
        .update_from_sender(
            "manage_neuron",
            dfn_candid::candid_one,
            ManageNeuron {
                id: None,
                command: Some(Command::MakeProposal(Box::new(proposal))),
                neuron_id_or_subaccount: Some(NeuronIdOrSubaccount::NeuronId(
                    proposer_neuron_id.into(),
                )),
            },
            &proposer,
        )
        .await
        .expect("Error calling the manage_neuron api.")
}
pub async fn submit_external_update_proposal_binary_with_response ( governance_canister : & Canister < ' _ > , proposer : Sender , proposer_neuron_id : NeuronId , update_type : NnsFunction , proposal_payload : Vec < u8 > , title : String , summary : String , ) -> ManageNeuronResponse { let proposal = Proposal { title : Some ( title ) , summary , url : " " . to_string ( ) , action : Some ( proposal :: Action :: ExecuteNnsFunction ( ExecuteNnsFunction { nns_function : update_type as i32 , payload : proposal_payload , } ) ) , } ; governance_canister . update_from_sender ( " " , dfn_candid :: candid_one , ManageNeuron { id : None , command : Some ( Command :: MakeProposal ( Box :: new ( proposal ) ) ) , neuron_id_or_subaccount : Some ( NeuronIdOrSubaccount :: NeuronId ( proposer_neuron_id . into ( ) , ) ) , } , & proposer , ) . await . expect ( " " ) }
Wraps the given proposal_payload into a proposal; sends it to the governance
canister; returns the `ManageNeuronResponse`
Wraps the given proposal_payload into a proposal ; sends it to the governance canister ; returns the ` ManageNeuronResponse `
governance_canister
&Canister<'_>
proposer
Sender
proposer_neuron_id
NeuronId
update_type
NnsFunction
proposal_payload
Vec<u8>
title
String
summary
String