WAX Unity Web3 Suite
Cloud Wallet
Cloud Wallet
  • Getting Started
  • Installation
    • WebGL Installation
    • Mobile Installation
    • Desktop Installation
  • Examples
    • Quick Start
    • Login
    • Transact
    • Token Transfer
    • Vote
    • Manage CPU/NET
    • Sell Ram
    • Buy Ram
    • Bid Name
  • API Docs
    • CloudWalletPlugin
    • CloudWalletErrorEvent
    • CloudWalletLoginEvent
    • CloudWalletSignEvent
    • CloudWalletLogoutEvent
    • CloudWalletInitEvent
    • CloudWalletCreateInfoEvent
    • CloudWalletCreateInfoResult
Powered by GitBook
On this page
Edit on GitHub
  1. Examples

Manage CPU/NET

PreviousVoteNextSell Ram

Last updated 2 years ago

  1. The following example shows how to stake CPU/NET Action and pass the created action to the Sign-Method of initialized CloudWalletPlugin-Object.

// Stake CPU/NET using a session
async Task Stake(string amountToStakeCPU, string amountToStakeNET  )
{
    //Create an action object
    var action = new EosSharp.Core.Api.v1.Action()
    {
      account = "eosio",
      name = "delegatebw",
      authorization = new List<PermissionLevel>() { UiToolkitExample.LinkSession.Auth  },
      data = new Dictionary<string, object>
      {
              { "from", "............1" },
              { "receiver", "............1" },
    		      { "stake_cpu_quantity", amountToStakeCPU },
    		      { "stake_net_quantity", amountToStakeNET },
      }
    };
		
    // Sign with the action created
    _cloudWalletPlugin.Sign(new[] { action });
}
the previously
Page cover image