Example #1
0
        private async Task MakeTransaction(List <PolymorphicAction <ActionBase> > actions)
        {
            long nonce = await GetNonceAsync();

            Transaction <PolymorphicAction <ActionBase> > tx =
                Transaction <PolymorphicAction <ActionBase> > .Create(
                    nonce,
                    PrivateKey,
                    _genesis?.Hash,
                    actions
                    );

            await _service.PutTransaction(tx.Serialize(true));

            foreach (var action in actions)
            {
                var ga = (GameAction)action.InnerAction;
                _transactions.TryAdd(ga.Id, tx.Id);
            }
        }