code: func NewKeyedTransactor(key *ecdsa.PrivateKey) *TransactOpts {
  	keyAddr := crypto.PubkeyToAddress(key.PublicKey)
  	return &TransactOpts{
  		From: keyAddr,
  		Signer: func(signer types.Signer, address common.Address, tx *types.Transaction) (*types.Transaction, error) {
  			if address != keyAddr {
  				return nil, errors.New("not authorized to sign this account")
  			}
  			signature, err := crypto.Sign(signer.Hash(tx).Bytes(), key)
  			if err != nil {
  				return nil, err
  			}
  			return tx.WithSignature(signer, signature)
  		},
  	}
  }
docs: // NewKeyedTransactor is a utility method to easily create a transaction signer
  // from a single private key.