(* Generated by coq-of-rust *)
Require Import CoqOfRust.CoqOfRust.

(* StructRecord
  {
    name := "Mapping";
    const_params := [];
    ty_params := [ "K"; "V" ];
    fields :=
      [
        ("_key", Ty.apply (Ty.path "core::marker::PhantomData") [] [ K ]);
        ("_value", Ty.apply (Ty.path "core::marker::PhantomData") [] [ V ])
      ];
  } *)

Module Impl_core_default_Default_where_core_default_Default_K_where_core_default_Default_V_for_erc721_Mapping_K_V.
  Definition Self (K V : Ty.t) : Ty.t := Ty.apply (Ty.path "erc721::Mapping") [] [ K; V ].
  
  Parameter default : forall (K V : Ty.t), (list Value.t) -> (list Ty.t) -> (list Value.t) -> M.
  
  Axiom Implements :
    forall (K V : Ty.t),
    M.IsTraitInstance
      "core::default::Default"
      (Self K V)
      (* Trait polymorphic types *) []
      (* Instance *) [ ("default", InstanceField.Method (default K V)) ].
End Impl_core_default_Default_where_core_default_Default_K_where_core_default_Default_V_for_erc721_Mapping_K_V.

Module Impl_erc721_Mapping_K_V.
  Definition Self (K V : Ty.t) : Ty.t := Ty.apply (Ty.path "erc721::Mapping") [] [ K; V ].
  
  Parameter contains : forall (K V : Ty.t), (list Value.t) -> (list Ty.t) -> (list Value.t) -> M.
  
  Axiom AssociatedFunction_contains :
    forall (K V : Ty.t),
    M.IsAssociatedFunction (Self K V) "contains" (contains K V).
  
  Parameter get : forall (K V : Ty.t), (list Value.t) -> (list Ty.t) -> (list Value.t) -> M.
  
  Axiom AssociatedFunction_get :
    forall (K V : Ty.t),
    M.IsAssociatedFunction (Self K V) "get" (get K V).
  
  Parameter insert : forall (K V : Ty.t), (list Value.t) -> (list Ty.t) -> (list Value.t) -> M.
  
  Axiom AssociatedFunction_insert :
    forall (K V : Ty.t),
    M.IsAssociatedFunction (Self K V) "insert" (insert K V).
  
  Parameter remove : forall (K V : Ty.t), (list Value.t) -> (list Ty.t) -> (list Value.t) -> M.
  
  Axiom AssociatedFunction_remove :
    forall (K V : Ty.t),
    M.IsAssociatedFunction (Self K V) "remove" (remove K V).
  
  Parameter size : forall (K V : Ty.t), (list Value.t) -> (list Ty.t) -> (list Value.t) -> M.
  
  Axiom AssociatedFunction_size :
    forall (K V : Ty.t),
    M.IsAssociatedFunction (Self K V) "size" (size K V).
  
  Parameter take : forall (K V : Ty.t), (list Value.t) -> (list Ty.t) -> (list Value.t) -> M.
  
  Axiom AssociatedFunction_take :
    forall (K V : Ty.t),
    M.IsAssociatedFunction (Self K V) "take" (take K V).
End Impl_erc721_Mapping_K_V.

(* StructTuple
  {
    name := "AccountId";
    const_params := [];
    ty_params := [];
    fields := [ Ty.path "u128" ];
  } *)

Module Impl_core_default_Default_for_erc721_AccountId.
  Definition Self : Ty.t := Ty.path "erc721::AccountId".
  
  Parameter default : (list Value.t) -> (list Ty.t) -> (list Value.t) -> M.
  
  Axiom Implements :
    M.IsTraitInstance
      "core::default::Default"
      Self
      (* Trait polymorphic types *) []
      (* Instance *) [ ("default", InstanceField.Method default) ].
End Impl_core_default_Default_for_erc721_AccountId.

Module Impl_core_clone_Clone_for_erc721_AccountId.
  Definition Self : Ty.t := Ty.path "erc721::AccountId".
  
  Parameter clone : (list Value.t) -> (list Ty.t) -> (list Value.t) -> M.
  
  Axiom Implements :
    M.IsTraitInstance
      "core::clone::Clone"
      Self
      (* Trait polymorphic types *) []
      (* Instance *) [ ("clone", InstanceField.Method clone) ].
End Impl_core_clone_Clone_for_erc721_AccountId.

Module Impl_core_marker_Copy_for_erc721_AccountId.
  Definition Self : Ty.t := Ty.path "erc721::AccountId".
  
  Axiom Implements :
    M.IsTraitInstance "core::marker::Copy" Self (* Trait polymorphic types *) [] (* Instance *) [].
End Impl_core_marker_Copy_for_erc721_AccountId.

Module Impl_core_marker_StructuralPartialEq_for_erc721_AccountId.
  Definition Self : Ty.t := Ty.path "erc721::AccountId".
  
  Axiom Implements :
    M.IsTraitInstance
      "core::marker::StructuralPartialEq"
      Self
      (* Trait polymorphic types *) []
      (* Instance *) [].
End Impl_core_marker_StructuralPartialEq_for_erc721_AccountId.

Module Impl_core_cmp_PartialEq_for_erc721_AccountId.
  Definition Self : Ty.t := Ty.path "erc721::AccountId".
  
  Parameter eq : (list Value.t) -> (list Ty.t) -> (list Value.t) -> M.
  
  Axiom Implements :
    M.IsTraitInstance
      "core::cmp::PartialEq"
      Self
      (* Trait polymorphic types *) []
      (* Instance *) [ ("eq", InstanceField.Method eq) ].
End Impl_core_cmp_PartialEq_for_erc721_AccountId.

Module Impl_core_convert_From_array_Usize_32_u8_for_erc721_AccountId.
  Definition Self : Ty.t := Ty.path "erc721::AccountId".
  
  Parameter from : (list Value.t) -> (list Ty.t) -> (list Value.t) -> M.
  
  Axiom Implements :
    M.IsTraitInstance
      "core::convert::From"
      Self
      (* Trait polymorphic types *)
      [ (* T *) Ty.apply (Ty.path "array") [ Value.Integer IntegerKind.Usize 32 ] [ Ty.path "u8" ] ]
      (* Instance *) [ ("from", InstanceField.Method from) ].
End Impl_core_convert_From_array_Usize_32_u8_for_erc721_AccountId.

Axiom Balance : (Ty.path "erc721::Balance") = (Ty.path "u128").

(* StructRecord
  {
    name := "Env";
    const_params := [];
    ty_params := [];
    fields := [ ("caller", Ty.path "erc721::AccountId") ];
  } *)

Axiom TokenId : (Ty.path "erc721::TokenId") = (Ty.path "u32").

(* StructRecord
  {
    name := "Erc721";
    const_params := [];
    ty_params := [];
    fields :=
      [
        ("token_owner",
          Ty.apply (Ty.path "erc721::Mapping") [] [ Ty.path "u32"; Ty.path "erc721::AccountId" ]);
        ("token_approvals",
          Ty.apply (Ty.path "erc721::Mapping") [] [ Ty.path "u32"; Ty.path "erc721::AccountId" ]);
        ("owned_tokens_count",
          Ty.apply (Ty.path "erc721::Mapping") [] [ Ty.path "erc721::AccountId"; Ty.path "u32" ]);
        ("operator_approvals",
          Ty.apply
            (Ty.path "erc721::Mapping")
            []
            [ Ty.tuple [ Ty.path "erc721::AccountId"; Ty.path "erc721::AccountId" ]; Ty.tuple [] ])
      ];
  } *)

Module Impl_core_default_Default_for_erc721_Erc721.
  Definition Self : Ty.t := Ty.path "erc721::Erc721".
  
  Parameter default : (list Value.t) -> (list Ty.t) -> (list Value.t) -> M.
  
  Axiom Implements :
    M.IsTraitInstance
      "core::default::Default"
      Self
      (* Trait polymorphic types *) []
      (* Instance *) [ ("default", InstanceField.Method default) ].
End Impl_core_default_Default_for_erc721_Erc721.

(*
Enum Error
{
  const_params := [];
  ty_params := [];
  variants :=
    [
      {
        name := "NotOwner";
        item := StructTuple [];
        discriminant := None;
      };
      {
        name := "NotApproved";
        item := StructTuple [];
        discriminant := None;
      };
      {
        name := "TokenExists";
        item := StructTuple [];
        discriminant := None;
      };
      {
        name := "TokenNotFound";
        item := StructTuple [];
        discriminant := None;
      };
      {
        name := "CannotInsert";
        item := StructTuple [];
        discriminant := None;
      };
      {
        name := "CannotFetchValue";
        item := StructTuple [];
        discriminant := None;
      };
      {
        name := "NotAllowed";
        item := StructTuple [];
        discriminant := None;
      }
    ];
}
*)

Module Impl_core_marker_StructuralPartialEq_for_erc721_Error.
  Definition Self : Ty.t := Ty.path "erc721::Error".
  
  Axiom Implements :
    M.IsTraitInstance
      "core::marker::StructuralPartialEq"
      Self
      (* Trait polymorphic types *) []
      (* Instance *) [].
End Impl_core_marker_StructuralPartialEq_for_erc721_Error.

Module Impl_core_cmp_PartialEq_for_erc721_Error.
  Definition Self : Ty.t := Ty.path "erc721::Error".
  
  Parameter eq : (list Value.t) -> (list Ty.t) -> (list Value.t) -> M.
  
  Axiom Implements :
    M.IsTraitInstance
      "core::cmp::PartialEq"
      Self
      (* Trait polymorphic types *) []
      (* Instance *) [ ("eq", InstanceField.Method eq) ].
End Impl_core_cmp_PartialEq_for_erc721_Error.

Module Impl_core_cmp_Eq_for_erc721_Error.
  Definition Self : Ty.t := Ty.path "erc721::Error".
  
  Parameter assert_receiver_is_total_eq : (list Value.t) -> (list Ty.t) -> (list Value.t) -> M.
  
  Axiom Implements :
    M.IsTraitInstance
      "core::cmp::Eq"
      Self
      (* Trait polymorphic types *) []
      (* Instance *)
      [ ("assert_receiver_is_total_eq", InstanceField.Method assert_receiver_is_total_eq) ].
End Impl_core_cmp_Eq_for_erc721_Error.

Module Impl_core_clone_Clone_for_erc721_Error.
  Definition Self : Ty.t := Ty.path "erc721::Error".
  
  Parameter clone : (list Value.t) -> (list Ty.t) -> (list Value.t) -> M.
  
  Axiom Implements :
    M.IsTraitInstance
      "core::clone::Clone"
      Self
      (* Trait polymorphic types *) []
      (* Instance *) [ ("clone", InstanceField.Method clone) ].
End Impl_core_clone_Clone_for_erc721_Error.

Module Impl_core_marker_Copy_for_erc721_Error.
  Definition Self : Ty.t := Ty.path "erc721::Error".
  
  Axiom Implements :
    M.IsTraitInstance "core::marker::Copy" Self (* Trait polymorphic types *) [] (* Instance *) [].
End Impl_core_marker_Copy_for_erc721_Error.

(* StructRecord
  {
    name := "Transfer";
    const_params := [];
    ty_params := [];
    fields :=
      [
        ("from", Ty.apply (Ty.path "core::option::Option") [] [ Ty.path "erc721::AccountId" ]);
        ("to", Ty.apply (Ty.path "core::option::Option") [] [ Ty.path "erc721::AccountId" ]);
        ("id", Ty.path "u32")
      ];
  } *)

(* StructRecord
  {
    name := "Approval";
    const_params := [];
    ty_params := [];
    fields :=
      [
        ("from", Ty.path "erc721::AccountId");
        ("to", Ty.path "erc721::AccountId");
        ("id", Ty.path "u32")
      ];
  } *)

(* StructRecord
  {
    name := "ApprovalForAll";
    const_params := [];
    ty_params := [];
    fields :=
      [
        ("owner", Ty.path "erc721::AccountId");
        ("operator", Ty.path "erc721::AccountId");
        ("approved", Ty.path "bool")
      ];
  } *)

(*
Enum Event
{
  const_params := [];
  ty_params := [];
  variants :=
    [
      {
        name := "Transfer";
        item := StructTuple [ Ty.path "erc721::Transfer" ];
        discriminant := None;
      };
      {
        name := "Approval";
        item := StructTuple [ Ty.path "erc721::Approval" ];
        discriminant := None;
      };
      {
        name := "ApprovalForAll";
        item := StructTuple [ Ty.path "erc721::ApprovalForAll" ];
        discriminant := None;
      }
    ];
}
*)

Module Impl_erc721_Env.
  Definition Self : Ty.t := Ty.path "erc721::Env".
  
  Parameter caller : (list Value.t) -> (list Ty.t) -> (list Value.t) -> M.
  
  Axiom AssociatedFunction_caller : M.IsAssociatedFunction Self "caller" caller.
  
  Parameter emit_event : (list Value.t) -> (list Ty.t) -> (list Value.t) -> M.
  
  Axiom AssociatedFunction_emit_event : M.IsAssociatedFunction Self "emit_event" emit_event.
End Impl_erc721_Env.

Module Impl_erc721_Erc721.
  Definition Self : Ty.t := Ty.path "erc721::Erc721".
  
  Parameter init_env : (list Value.t) -> (list Ty.t) -> (list Value.t) -> M.
  
  Axiom AssociatedFunction_init_env : M.IsAssociatedFunction Self "init_env" init_env.
  
  Parameter env : (list Value.t) -> (list Ty.t) -> (list Value.t) -> M.
  
  Axiom AssociatedFunction_env : M.IsAssociatedFunction Self "env" env.
  
  Parameter new : (list Value.t) -> (list Ty.t) -> (list Value.t) -> M.
  
  Axiom AssociatedFunction_new : M.IsAssociatedFunction Self "new" new.
  
  Parameter balance_of_or_zero : (list Value.t) -> (list Ty.t) -> (list Value.t) -> M.
  
  Axiom AssociatedFunction_balance_of_or_zero :
    M.IsAssociatedFunction Self "balance_of_or_zero" balance_of_or_zero.
  
  Parameter clear_approval : (list Value.t) -> (list Ty.t) -> (list Value.t) -> M.
  
  Axiom AssociatedFunction_clear_approval :
    M.IsAssociatedFunction Self "clear_approval" clear_approval.
  
  Parameter approved_for_all : (list Value.t) -> (list Ty.t) -> (list Value.t) -> M.
  
  Axiom AssociatedFunction_approved_for_all :
    M.IsAssociatedFunction Self "approved_for_all" approved_for_all.
  
  Parameter owner_of : (list Value.t) -> (list Ty.t) -> (list Value.t) -> M.
  
  Axiom AssociatedFunction_owner_of : M.IsAssociatedFunction Self "owner_of" owner_of.
  
  Parameter approved_or_owner : (list Value.t) -> (list Ty.t) -> (list Value.t) -> M.
  
  Axiom AssociatedFunction_approved_or_owner :
    M.IsAssociatedFunction Self "approved_or_owner" approved_or_owner.
  
  Parameter exists_ : (list Value.t) -> (list Ty.t) -> (list Value.t) -> M.
  
  Axiom AssociatedFunction_exists_ : M.IsAssociatedFunction Self "exists_" exists_.
  
  Parameter balance_of : (list Value.t) -> (list Ty.t) -> (list Value.t) -> M.
  
  Axiom AssociatedFunction_balance_of : M.IsAssociatedFunction Self "balance_of" balance_of.
  
  Parameter get_approved : (list Value.t) -> (list Ty.t) -> (list Value.t) -> M.
  
  Axiom AssociatedFunction_get_approved : M.IsAssociatedFunction Self "get_approved" get_approved.
  
  Parameter is_approved_for_all : (list Value.t) -> (list Ty.t) -> (list Value.t) -> M.
  
  Axiom AssociatedFunction_is_approved_for_all :
    M.IsAssociatedFunction Self "is_approved_for_all" is_approved_for_all.
  
  Parameter approve_for_all : (list Value.t) -> (list Ty.t) -> (list Value.t) -> M.
  
  Axiom AssociatedFunction_approve_for_all :
    M.IsAssociatedFunction Self "approve_for_all" approve_for_all.
  
  Parameter set_approval_for_all : (list Value.t) -> (list Ty.t) -> (list Value.t) -> M.
  
  Axiom AssociatedFunction_set_approval_for_all :
    M.IsAssociatedFunction Self "set_approval_for_all" set_approval_for_all.
  
  Parameter approve_for : (list Value.t) -> (list Ty.t) -> (list Value.t) -> M.
  
  Axiom AssociatedFunction_approve_for : M.IsAssociatedFunction Self "approve_for" approve_for.
  
  Parameter approve : (list Value.t) -> (list Ty.t) -> (list Value.t) -> M.
  
  Axiom AssociatedFunction_approve : M.IsAssociatedFunction Self "approve" approve.
  
  Parameter remove_token_from : (list Value.t) -> (list Ty.t) -> (list Value.t) -> M.
  
  Axiom AssociatedFunction_remove_token_from :
    M.IsAssociatedFunction Self "remove_token_from" remove_token_from.
  
  Parameter add_token_to : (list Value.t) -> (list Ty.t) -> (list Value.t) -> M.
  
  Axiom AssociatedFunction_add_token_to : M.IsAssociatedFunction Self "add_token_to" add_token_to.
  
  Parameter transfer_token_from : (list Value.t) -> (list Ty.t) -> (list Value.t) -> M.
  
  Axiom AssociatedFunction_transfer_token_from :
    M.IsAssociatedFunction Self "transfer_token_from" transfer_token_from.
  
  Parameter transfer : (list Value.t) -> (list Ty.t) -> (list Value.t) -> M.
  
  Axiom AssociatedFunction_transfer : M.IsAssociatedFunction Self "transfer" transfer.
  
  Parameter transfer_from : (list Value.t) -> (list Ty.t) -> (list Value.t) -> M.
  
  Axiom AssociatedFunction_transfer_from :
    M.IsAssociatedFunction Self "transfer_from" transfer_from.
  
  Parameter mint : (list Value.t) -> (list Ty.t) -> (list Value.t) -> M.
  
  Axiom AssociatedFunction_mint : M.IsAssociatedFunction Self "mint" mint.
  
  Parameter burn : (list Value.t) -> (list Ty.t) -> (list Value.t) -> M.
  
  Axiom AssociatedFunction_burn : M.IsAssociatedFunction Self "burn" burn.
End Impl_erc721_Erc721.
