(* 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_erc1155_Mapping_K_V.
  Definition Self (K V : Ty.t) : Ty.t := Ty.apply (Ty.path "erc1155::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_erc1155_Mapping_K_V.

Module Impl_erc1155_Mapping_K_V.
  Definition Self (K V : Ty.t) : Ty.t := Ty.apply (Ty.path "erc1155::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_erc1155_Mapping_K_V.

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

Module Impl_core_default_Default_for_erc1155_AccountId.
  Definition Self : Ty.t := Ty.path "erc1155::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_erc1155_AccountId.

Module Impl_core_clone_Clone_for_erc1155_AccountId.
  Definition Self : Ty.t := Ty.path "erc1155::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_erc1155_AccountId.

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

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

Module Impl_core_cmp_PartialEq_for_erc1155_AccountId.
  Definition Self : Ty.t := Ty.path "erc1155::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_erc1155_AccountId.

Module Impl_core_convert_From_array_Usize_32_u8_for_erc1155_AccountId.
  Definition Self : Ty.t := Ty.path "erc1155::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_erc1155_AccountId.

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

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

Parameter zero_address : (list Value.t) -> (list Ty.t) -> (list Value.t) -> M.

Axiom Function_zero_address : M.IsFunction "erc1155::zero_address" zero_address.

Parameter value_ON_ERC_1155_RECEIVED_SELECTOR : Value.t.

Parameter _ON_ERC_1155_BATCH_RECEIVED_SELECTOR : Value.t.

Axiom TokenId : (Ty.path "erc1155::TokenId") = (Ty.path "u128").

(*
Enum Error
{
  const_params := [];
  ty_params := [];
  variants :=
    [
      {
        name := "UnexistentToken";
        item := StructTuple [];
        discriminant := None;
      };
      {
        name := "ZeroAddressTransfer";
        item := StructTuple [];
        discriminant := None;
      };
      {
        name := "NotApproved";
        item := StructTuple [];
        discriminant := None;
      };
      {
        name := "InsufficientBalance";
        item := StructTuple [];
        discriminant := None;
      };
      {
        name := "SelfApproval";
        item := StructTuple [];
        discriminant := None;
      };
      {
        name := "BatchTransferMismatch";
        item := StructTuple [];
        discriminant := None;
      }
    ];
}
*)

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

Module Impl_core_cmp_PartialEq_for_erc1155_Error.
  Definition Self : Ty.t := Ty.path "erc1155::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_erc1155_Error.

Module Impl_core_cmp_Eq_for_erc1155_Error.
  Definition Self : Ty.t := Ty.path "erc1155::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_erc1155_Error.

Axiom Result :
  forall (T : Ty.t),
  (Ty.apply (Ty.path "erc1155::Result") [] [ T ]) =
    (Ty.apply (Ty.path "core::result::Result") [] [ T; Ty.path "erc1155::Error" ]).

(* Trait *)
(* Empty module 'Erc1155' *)

(* Trait *)
(* Empty module 'Erc1155TokenReceiver' *)

Axiom Owner : (Ty.path "erc1155::Owner") = (Ty.path "erc1155::AccountId").

Axiom Operator : (Ty.path "erc1155::Operator") = (Ty.path "erc1155::AccountId").

(* StructRecord
  {
    name := "TransferSingle";
    const_params := [];
    ty_params := [];
    fields :=
      [
        ("operator", Ty.apply (Ty.path "core::option::Option") [] [ Ty.path "erc1155::AccountId" ]);
        ("from", Ty.apply (Ty.path "core::option::Option") [] [ Ty.path "erc1155::AccountId" ]);
        ("to", Ty.apply (Ty.path "core::option::Option") [] [ Ty.path "erc1155::AccountId" ]);
        ("token_id", Ty.path "u128");
        ("value", Ty.path "u128")
      ];
  } *)

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

(* StructRecord
  {
    name := "Uri";
    const_params := [];
    ty_params := [];
    fields := [ ("value", Ty.path "alloc::string::String"); ("token_id", Ty.path "u128") ];
  } *)

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

Module Impl_erc1155_Env.
  Definition Self : Ty.t := Ty.path "erc1155::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_erc1155_Env.

(* StructRecord
  {
    name := "Contract";
    const_params := [];
    ty_params := [];
    fields :=
      [
        ("balances",
          Ty.apply
            (Ty.path "erc1155::Mapping")
            []
            [ Ty.tuple [ Ty.path "erc1155::AccountId"; Ty.path "u128" ]; Ty.path "u128" ]);
        ("approvals",
          Ty.apply
            (Ty.path "erc1155::Mapping")
            []
            [ Ty.tuple [ Ty.path "erc1155::AccountId"; Ty.path "erc1155::AccountId" ]; Ty.tuple []
            ]);
        ("token_id_nonce", Ty.path "u128")
      ];
  } *)

Module Impl_core_default_Default_for_erc1155_Contract.
  Definition Self : Ty.t := Ty.path "erc1155::Contract".
  
  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_erc1155_Contract.

Module Impl_erc1155_Contract.
  Definition Self : Ty.t := Ty.path "erc1155::Contract".
  
  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 create : (list Value.t) -> (list Ty.t) -> (list Value.t) -> M.
  
  Axiom AssociatedFunction_create : M.IsAssociatedFunction Self "create" create.
  
  Parameter mint : (list Value.t) -> (list Ty.t) -> (list Value.t) -> M.
  
  Axiom AssociatedFunction_mint : M.IsAssociatedFunction Self "mint" mint.
  
  Parameter perform_transfer : (list Value.t) -> (list Ty.t) -> (list Value.t) -> M.
  
  Axiom AssociatedFunction_perform_transfer :
    M.IsAssociatedFunction Self "perform_transfer" perform_transfer.
  
  Parameter transfer_acceptance_check : (list Value.t) -> (list Ty.t) -> (list Value.t) -> M.
  
  Axiom AssociatedFunction_transfer_acceptance_check :
    M.IsAssociatedFunction Self "transfer_acceptance_check" transfer_acceptance_check.
End Impl_erc1155_Contract.

Module Impl_erc1155_Erc1155_for_erc1155_Contract.
  Definition Self : Ty.t := Ty.path "erc1155::Contract".
  
  Parameter is_approved_for_all : (list Value.t) -> (list Ty.t) -> (list Value.t) -> M.
  
  Parameter balance_of : (list Value.t) -> (list Ty.t) -> (list Value.t) -> M.
  
  Parameter safe_transfer_from : (list Value.t) -> (list Ty.t) -> (list Value.t) -> M.
  
  Parameter safe_batch_transfer_from : (list Value.t) -> (list Ty.t) -> (list Value.t) -> M.
  
  Parameter balance_of_batch : (list Value.t) -> (list Ty.t) -> (list Value.t) -> M.
  
  Parameter set_approval_for_all : (list Value.t) -> (list Ty.t) -> (list Value.t) -> M.
  
  Axiom Implements :
    M.IsTraitInstance
      "erc1155::Erc1155"
      Self
      (* Trait polymorphic types *) []
      (* Instance *)
      [
        ("is_approved_for_all", InstanceField.Method is_approved_for_all);
        ("balance_of", InstanceField.Method balance_of);
        ("safe_transfer_from", InstanceField.Method safe_transfer_from);
        ("safe_batch_transfer_from", InstanceField.Method safe_batch_transfer_from);
        ("balance_of_batch", InstanceField.Method balance_of_batch);
        ("set_approval_for_all", InstanceField.Method set_approval_for_all)
      ].
End Impl_erc1155_Erc1155_for_erc1155_Contract.

Module Impl_erc1155_Erc1155TokenReceiver_for_erc1155_Contract.
  Definition Self : Ty.t := Ty.path "erc1155::Contract".
  
  Parameter on_received : (list Value.t) -> (list Ty.t) -> (list Value.t) -> M.
  
  Parameter on_batch_received : (list Value.t) -> (list Ty.t) -> (list Value.t) -> M.
  
  Axiom Implements :
    M.IsTraitInstance
      "erc1155::Erc1155TokenReceiver"
      Self
      (* Trait polymorphic types *) []
      (* Instance *)
      [
        ("on_received", InstanceField.Method on_received);
        ("on_batch_received", InstanceField.Method on_batch_received)
      ].
End Impl_erc1155_Erc1155TokenReceiver_for_erc1155_Contract.
