message: [types] support generic script
diff: // Copyright (c) The Libra Core Contributors
  // SPDX-License-Identifier: Apache-2.0
  -use crate::transaction::transaction_argument::TransactionArgument;
  +use crate::{language_storage::TypeTag, transaction::transaction_argument::TransactionArgument};
  use serde::{Deserialize, Serialize};
  use std::fmt;
  @@ -11,18 +11,27 @@ pub const SCRIPT_HASH_LENGTH: usize = 32;
  #[derive(Default, Clone, Hash, Eq, PartialEq, Serialize, Deserialize)]
  pub struct Script {
  code: Vec<u8>,
  + ty_args: Vec<TypeTag>,
  args: Vec<TransactionArgument>,
  }
  impl Script {
  - pub fn new(code: Vec<u8>, args: Vec<TransactionArgument>) -> Self {
  - Script { code, args }
  + pub fn new(code: Vec<u8>, ty_args: Vec<TypeTag>, args: Vec<TransactionArgument>) -> Self {
  + Script {
  + code,
  + ty_args,
  + args,
  + }
  }
  pub fn code(&self) -> &[u8] {
  &self.code
  }
  + pub fn ty_args(&self) -> &[TypeTag] {
  + &self.ty_args
  + }
  +
  pub fn args(&self) -> &[TransactionArgument] {
  &self.args
  }
  @@ -46,6 +55,6 @@ impl fmt::Debug for Script {
  impl Into<libra_types::transaction::Script> for Script {
  fn into(self) -> libra_types::transaction::Script {
  let args = self.args().iter().map(|arg| arg.clone().into()).collect();
  - libra_types::transaction::Script::new(self.code().to_vec(), args)
  + libra_types::transaction::Script::new(self.code().to_vec(), self.ty_args, args)
  }
  }
  