Exemplo n.º 1
0
 public AccountSignerTransactionManager(IClient rpcClient, Account account, BigInteger?chainId = null)
 {
     ChainId            = chainId;
     Account            = account ?? throw new ArgumentNullException(nameof(account));
     Client             = rpcClient;
     _transactionSigner = new AccountOfflineTransactionSigner();
 }
Exemplo n.º 2
0
 public AccountSignerTransactionManager(IClient rpcClient, string privateKey, BigInteger?chainId = null)
 {
     ChainId = chainId;
     if (privateKey == null)
     {
         throw new ArgumentNullException(nameof(privateKey));
     }
     Client  = rpcClient;
     Account = new Account(privateKey);
     Account.NonceService = new InMemoryNonceService(Account.Address, rpcClient);
     _transactionSigner   = new AccountOfflineTransactionSigner();
 }