Page cover image

Buy Ram

  1. The following example shows how a buy Ram Action can be created and passed to the Sign-Method.

      async Task BuyRam(string amountToBuy, string receiverAccount  )
      {
          //Create an action object
          var action = new EosSharp.Core.Api.v1.Action()
          {
              account = "eosio",
              name = "buyram",
              authorization = new List<PermissionLevel>() { _session.Auth },
              data = new Dictionary<string, object>
              {
                      { "payer", "............1" },
                      { "quant", amountToBuy},
                      { "receiver", receiverAccount }
              }
          };
		
	  // Sign with the action created
	  var transactResult = await LinkSession.Transact(new TransactArgs() { Action = action });
	}

Last updated