Exemple #1
0
        private Func <Task <string> > GetElectorEncodedAccount()
        {
            return(async() =>
            {
                var paramsOfEncodeAccount = new ParamsOfEncodeAccount
                {
                    StateInit = new StateInitSource.StateInit
                    {
                        Code = Elector.Instance.Code,
                        Data = Elector.Instance.Data
                    }
                };

                ResultOfEncodeAccount resultOfEncodeAccount = await _tonClient.Abi.EncodeAccount(paramsOfEncodeAccount);

                return resultOfEncodeAccount.Account;
            });
        }
Exemple #2
0
 /// <summary>
 /// <para>Creates account state BOC</para>
 /// <para>Creates account state provided with one of these sets of data :</para>
 /// <para>1. BOC of code, BOC of data, BOC of library</para>
 /// <para>2. TVC (string in `base64`), keys, init params</para>
 /// </summary>
 public async Task <ResultOfEncodeAccount> EncodeAccount(ParamsOfEncodeAccount @params, CancellationToken cancellationToken = default)
 {
     return(await _tonClientAdapter.Request <ParamsOfEncodeAccount, ResultOfEncodeAccount>("abi.encode_account", @params, cancellationToken));
 }