pub async fn update_gravity_delegate_addresses(
    contact: &Contact,
    delegate_eth_address: EthAddress,
    delegate_cosmos_address: Address,
    private_key: PrivateKey,
    fee: Coin,
) -> Result<TxResponse, CosmosGrpcError> {
    trace!("Updating Gravity Delegate addresses");
    let our_valoper_address = private_key
        .to_public_key()
        .expect("Invalid private key!")
        .to_address()
        .to_bech32("cosmosvaloper")
        .unwrap();
    let our_address = private_key
        .to_public_key()
        .expect("Invalid private key!")
        .to_address();

    let msg_set_orch_address = MsgSetOrchestratorAddress {
        validator: our_valoper_address.to_string(),
        orchestrator: delegate_cosmos_address.to_string(),
        eth_address: delegate_eth_address.to_string(),
    };

    let fee = Fee {
        amount: vec![fee],
        gas_limit: 500_000u64,
        granter: None,
        payer: None,
    };

    let msg = Msg::new(
        "/gravity.v1.MsgSetOrchestratorAddress",
        msg_set_orch_address,
    );

    let args = contact.get_message_args(our_address, fee).await?;
    trace!("got optional tx info");

    let msg_bytes = private_key.sign_std_msg(&[msg], args, MEMO)?;

    let mut txrpc = TxServiceClient::connect(contact.get_url()).await?;
    let response = txrpc
        .broadcast_tx(BroadcastTxRequest {
            tx_bytes: msg_bytes,
            mode: BroadcastMode::Sync.into(),
        })
        .await?;
    let response = response.into_inner();

    contact
        .wait_for_tx(response.tx_response.unwrap(), TIMEOUT)
        .await
}
/// Send a transaction updating the eth address for the sending
/// Cosmos address. The sending Cosmos address should be a validator
Send a transaction updating the eth address for the sending
Cosmos address. The sending Cosmos address should be a validator
Send a transaction updating the eth address for the sending Cosmos address . The sending Cosmos address should be a validator
pub async fn update_gravity_delegate_addresses(
    contact: &Contact,
    delegate_eth_address: EthAddress,
    delegate_cosmos_address: Address,
    private_key: PrivateKey,
    fee: Coin,
) -> Result<TxResponse, CosmosGrpcError> {
    trace!("Updating Gravity Delegate addresses");
    let our_valoper_address = private_key
        .to_public_key()
        .expect("Invalid private key!")
        .to_address()
        .to_bech32("cosmosvaloper")
        .unwrap();
    let our_address = private_key
        .to_public_key()
        .expect("Invalid private key!")
        .to_address();
    let msg_set_orch_address = MsgSetOrchestratorAddress {
        validator: our_valoper_address.to_string(),
        orchestrator: delegate_cosmos_address.to_string(),
        eth_address: delegate_eth_address.to_string(),
    };
    let fee = Fee {
        amount: vec![fee],
        gas_limit: 500_000u64,
        granter: None,
        payer: None,
    };
    let msg = Msg::new(
        "/gravity.v1.MsgSetOrchestratorAddress",
        msg_set_orch_address,
    );
    let args = contact.get_message_args(our_address, fee).await?;
    trace!("got optional tx info");
    let msg_bytes = private_key.sign_std_msg(&[msg], args, MEMO)?;
    let mut txrpc = TxServiceClient::connect(contact.get_url()).await?;
    let response = txrpc
        .broadcast_tx(BroadcastTxRequest {
            tx_bytes: msg_bytes,
            mode: BroadcastMode::Sync.into(),
        })
        .await?;
    let response = response.into_inner();
    contact
        .wait_for_tx(response.tx_response.unwrap(), TIMEOUT)
        .await
}
pub async fn update_gravity_delegate_addresses ( contact : & Contact , delegate_eth_address : EthAddress , delegate_cosmos_address : Address , private_key : PrivateKey , fee : Coin , ) -> Result < TxResponse , CosmosGrpcError > { trace ! ( " " ) ; let our_valoper_address = private_key . to_public_key ( ) . expect ( " " ) . to_address ( ) . to_bech32 ( " " ) . unwrap ( ) ; let our_address = private_key . to_public_key ( ) . expect ( " " ) . to_address ( ) ; let msg_set_orch_address = MsgSetOrchestratorAddress { validator : our_valoper_address . to_string ( ) , orchestrator : delegate_cosmos_address . to_string ( ) , eth_address : delegate_eth_address . to_string ( ) , } ; let fee = Fee { amount : vec ! [ fee ] , gas_limit : 500_000u64 , granter : None , payer : None , } ; let msg = Msg :: new ( " " , msg_set_orch_address , ) ; let args = contact . get_message_args ( our_address , fee ) . await ? ; trace ! ( " " ) ; let msg_bytes = private_key . sign_std_msg ( & [ msg ] , args , MEMO ) ? ; let mut txrpc = TxServiceClient :: connect ( contact . get_url ( ) ) . await ? ; let response = txrpc . broadcast_tx ( BroadcastTxRequest { tx_bytes : msg_bytes , mode : BroadcastMode :: Sync . into ( ) , } ) . await ? ; let response = response . into_inner ( ) ; contact . wait_for_tx ( response . tx_response . unwrap ( ) , TIMEOUT ) . await }
Send a transaction updating the eth address for the sending
Cosmos address.
Send a transaction updating the eth address for the sending Cosmos address .
contact
&Contact
delegate_eth_address
EthAddress
delegate_cosmos_address
Address
private_key
PrivateKey
fee
Coin