Skip to content

Latest commit

 

History

History
31 lines (27 loc) · 920 Bytes

File metadata and controls

31 lines (27 loc) · 920 Bytes
cover coverY
../.gitbook/assets/UNITY3DxWAX-1920x360_Devs_03.png
0

Vote

  1. The following example shows how a Vote Action can be created and passed to the Sign-Method of the previously initialized CloudWalletPlugin-Object.
// vote using a session
async Task Vote(List<string> producers)
{
      //Create an action object
      var action = new EosSharp.Core.Api.v1.Action()
      {
        account = "eosio",
        name = "voteproducer",
        authorization = new List<PermissionLevel>() { _session.Auth },
        data = new Dictionary<string, object>
        {
            { "voter", "............1" },
            { "proxy", "coredevproxy" },
            { "producers", producers.ToArray() }
        }
      };
		
      // Sign with the created action
      _cloudWalletPlugin.Sign(new[] { action });
}