@medialane/sdk 0.61.0 → 0.63.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -37,9 +37,9 @@ var COORDINATES = {
37
37
  creatorCoinFactoryClassHash: "0x51765926b1344c9a20b8cd4b5abe7b7d47375ae97cf6804db3ea5d4b05a9b55",
38
38
  creatorCoinStartBlock: 10474544,
39
39
  ekuboCore: "0x00000005dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b",
40
- ipTicketsFactory: "0x0664c2d6a4da9ee3ff053ceeba7579c01f2fedfd9d2b57b4c07af3734bd4acab",
41
- ipTicketCollectionClassHash: "0x086f59c416e365e2bee4ceff9f1dcb96198f2342d50ba4621f60b831863adb6",
42
- ipTicketsStartBlock: 11404656,
40
+ ipTicketsFactory: "0x03ffef4162fe2c44e17d6be2aad3553cab0ac2274cd0b1bb3fafb12fd66695c1",
41
+ ipTicketCollectionClassHash: "0x036393fb4241ed55bd12d8b328ed877d08100fadf9150a650e2b84cbab95e1d4",
42
+ ipTicketsStartBlock: 11689800,
43
43
  ipClubRegistry: "0x00e189c619b6bb07d78973a149641c59c37eb0716f8584d7520bce12d303eede",
44
44
  ipClubNftClassHash: "0x02bc9b20cca21b04245e9215bf7121f4d7295b195890e449b472b573017fb889",
45
45
  ipClubStartBlock: 11404776,
@@ -4651,26 +4651,8 @@ var CreatorCoinFactoryABI = [{ "type": "impl", "name": "FactoryImpl", "interface
4651
4651
  var IPTicketCollectionABI = [
4652
4652
  {
4653
4653
  "type": "impl",
4654
- "name": "ERC721MetadataImpl",
4655
- "interface_name": "openzeppelin_token::erc721::interface::IERC721Metadata"
4656
- },
4657
- {
4658
- "type": "struct",
4659
- "name": "core::byte_array::ByteArray",
4660
- "members": [
4661
- {
4662
- "name": "data",
4663
- "type": "core::array::Array::<core::bytes_31::bytes31>"
4664
- },
4665
- {
4666
- "name": "pending_word",
4667
- "type": "core::felt252"
4668
- },
4669
- {
4670
- "name": "pending_word_len",
4671
- "type": "core::internal::bounded_int::BoundedInt::<0, 30>"
4672
- }
4673
- ]
4654
+ "name": "ERC1155MetadataURIImpl",
4655
+ "interface_name": "openzeppelin_token::erc1155::interface::IERC1155MetadataURI"
4674
4656
  },
4675
4657
  {
4676
4658
  "type": "struct",
@@ -4687,64 +4669,33 @@ var IPTicketCollectionABI = [
4687
4669
  ]
4688
4670
  },
4689
4671
  {
4690
- "type": "interface",
4691
- "name": "openzeppelin_token::erc721::interface::IERC721Metadata",
4692
- "items": [
4672
+ "type": "struct",
4673
+ "name": "core::byte_array::ByteArray",
4674
+ "members": [
4693
4675
  {
4694
- "type": "function",
4695
- "name": "name",
4696
- "inputs": [],
4697
- "outputs": [
4698
- {
4699
- "type": "core::byte_array::ByteArray"
4700
- }
4701
- ],
4702
- "state_mutability": "view"
4676
+ "name": "data",
4677
+ "type": "core::array::Array::<core::bytes_31::bytes31>"
4703
4678
  },
4704
4679
  {
4705
- "type": "function",
4706
- "name": "symbol",
4707
- "inputs": [],
4708
- "outputs": [
4709
- {
4710
- "type": "core::byte_array::ByteArray"
4711
- }
4712
- ],
4713
- "state_mutability": "view"
4680
+ "name": "pending_word",
4681
+ "type": "core::felt252"
4714
4682
  },
4715
4683
  {
4716
- "type": "function",
4717
- "name": "token_uri",
4718
- "inputs": [
4719
- {
4720
- "name": "token_id",
4721
- "type": "core::integer::u256"
4722
- }
4723
- ],
4724
- "outputs": [
4725
- {
4726
- "type": "core::byte_array::ByteArray"
4727
- }
4728
- ],
4729
- "state_mutability": "view"
4684
+ "name": "pending_word_len",
4685
+ "type": "core::internal::bounded_int::BoundedInt::<0, 30>"
4730
4686
  }
4731
4687
  ]
4732
4688
  },
4733
- {
4734
- "type": "impl",
4735
- "name": "ERC721MetadataCamelOnlyImpl",
4736
- "interface_name": "openzeppelin_token::erc721::interface::IERC721MetadataCamelOnly"
4737
- },
4738
4689
  {
4739
4690
  "type": "interface",
4740
- "name": "openzeppelin_token::erc721::interface::IERC721MetadataCamelOnly",
4691
+ "name": "openzeppelin_token::erc1155::interface::IERC1155MetadataURI",
4741
4692
  "items": [
4742
4693
  {
4743
4694
  "type": "function",
4744
- "name": "tokenURI",
4695
+ "name": "uri",
4745
4696
  "inputs": [
4746
4697
  {
4747
- "name": "tokenId",
4698
+ "name": "token_id",
4748
4699
  "type": "core::integer::u256"
4749
4700
  }
4750
4701
  ],
@@ -4759,16 +4710,16 @@ var IPTicketCollectionABI = [
4759
4710
  },
4760
4711
  {
4761
4712
  "type": "impl",
4762
- "name": "IPTicketImpl",
4713
+ "name": "IPTicketCollectionImpl",
4763
4714
  "interface_name": "ip_ticket::interface::IIPTicketCollection"
4764
4715
  },
4765
4716
  {
4766
4717
  "type": "enum",
4767
- "name": "core::option::Option::<core::starknet::contract_address::ContractAddress>",
4718
+ "name": "core::option::Option::<core::integer::u64>",
4768
4719
  "variants": [
4769
4720
  {
4770
4721
  "name": "Some",
4771
- "type": "core::starknet::contract_address::ContractAddress"
4722
+ "type": "core::integer::u64"
4772
4723
  },
4773
4724
  {
4774
4725
  "name": "None",
@@ -4792,16 +4743,12 @@ var IPTicketCollectionABI = [
4792
4743
  },
4793
4744
  {
4794
4745
  "type": "struct",
4795
- "name": "ip_ticket::types::TicketCollection",
4746
+ "name": "ip_ticket::types::EventRecord",
4796
4747
  "members": [
4797
4748
  {
4798
4749
  "name": "creator",
4799
4750
  "type": "core::starknet::contract_address::ContractAddress"
4800
4751
  },
4801
- {
4802
- "name": "price",
4803
- "type": "core::integer::u256"
4804
- },
4805
4752
  {
4806
4753
  "name": "max_supply",
4807
4754
  "type": "core::integer::u256"
@@ -4811,16 +4758,16 @@ var IPTicketCollectionABI = [
4811
4758
  "type": "core::integer::u256"
4812
4759
  },
4813
4760
  {
4814
- "name": "expiration",
4815
- "type": "core::integer::u64"
4761
+ "name": "start_time",
4762
+ "type": "core::option::Option::<core::integer::u64>"
4816
4763
  },
4817
4764
  {
4818
- "name": "royalty_bps",
4819
- "type": "core::integer::u256"
4765
+ "name": "end_time",
4766
+ "type": "core::option::Option::<core::integer::u64>"
4820
4767
  },
4821
4768
  {
4822
- "name": "payment_token",
4823
- "type": "core::option::Option::<core::starknet::contract_address::ContractAddress>"
4769
+ "name": "royalty_bps",
4770
+ "type": "core::integer::u16"
4824
4771
  },
4825
4772
  {
4826
4773
  "name": "metadata_uri",
@@ -4832,71 +4779,29 @@ var IPTicketCollectionABI = [
4832
4779
  }
4833
4780
  ]
4834
4781
  },
4835
- {
4836
- "type": "struct",
4837
- "name": "ip_ticket::types::TicketData",
4838
- "members": [
4839
- {
4840
- "name": "token_id",
4841
- "type": "core::integer::u256"
4842
- },
4843
- {
4844
- "name": "owner",
4845
- "type": "core::starknet::contract_address::ContractAddress"
4846
- },
4847
- {
4848
- "name": "collection_id",
4849
- "type": "core::integer::u256"
4850
- },
4851
- {
4852
- "name": "creator",
4853
- "type": "core::starknet::contract_address::ContractAddress"
4854
- },
4855
- {
4856
- "name": "metadata_uri",
4857
- "type": "core::byte_array::ByteArray"
4858
- },
4859
- {
4860
- "name": "expiration",
4861
- "type": "core::integer::u64"
4862
- },
4863
- {
4864
- "name": "redeemed",
4865
- "type": "core::bool"
4866
- },
4867
- {
4868
- "name": "valid",
4869
- "type": "core::bool"
4870
- }
4871
- ]
4872
- },
4873
4782
  {
4874
4783
  "type": "interface",
4875
4784
  "name": "ip_ticket::interface::IIPTicketCollection",
4876
4785
  "items": [
4877
4786
  {
4878
4787
  "type": "function",
4879
- "name": "create_ticket_collection",
4788
+ "name": "create_event",
4880
4789
  "inputs": [
4881
- {
4882
- "name": "price",
4883
- "type": "core::integer::u256"
4884
- },
4885
4790
  {
4886
4791
  "name": "max_supply",
4887
4792
  "type": "core::integer::u256"
4888
4793
  },
4889
4794
  {
4890
- "name": "expiration",
4891
- "type": "core::integer::u64"
4795
+ "name": "start_time",
4796
+ "type": "core::option::Option::<core::integer::u64>"
4892
4797
  },
4893
4798
  {
4894
- "name": "royalty_bps",
4895
- "type": "core::integer::u256"
4799
+ "name": "end_time",
4800
+ "type": "core::option::Option::<core::integer::u64>"
4896
4801
  },
4897
4802
  {
4898
- "name": "payment_token",
4899
- "type": "core::option::Option::<core::starknet::contract_address::ContractAddress>"
4803
+ "name": "royalty_bps",
4804
+ "type": "core::integer::u16"
4900
4805
  },
4901
4806
  {
4902
4807
  "name": "metadata_uri",
@@ -4912,43 +4817,35 @@ var IPTicketCollectionABI = [
4912
4817
  },
4913
4818
  {
4914
4819
  "type": "function",
4915
- "name": "set_collection_active",
4820
+ "name": "mint",
4916
4821
  "inputs": [
4917
4822
  {
4918
- "name": "collection_id",
4919
- "type": "core::integer::u256"
4823
+ "name": "to",
4824
+ "type": "core::starknet::contract_address::ContractAddress"
4920
4825
  },
4921
4826
  {
4922
- "name": "active",
4923
- "type": "core::bool"
4924
- }
4925
- ],
4926
- "outputs": [],
4927
- "state_mutability": "external"
4928
- },
4929
- {
4930
- "type": "function",
4931
- "name": "mint_ticket",
4932
- "inputs": [
4933
- {
4934
- "name": "collection_id",
4827
+ "name": "token_id",
4935
4828
  "type": "core::integer::u256"
4936
- }
4937
- ],
4938
- "outputs": [
4829
+ },
4939
4830
  {
4831
+ "name": "amount",
4940
4832
  "type": "core::integer::u256"
4941
4833
  }
4942
4834
  ],
4835
+ "outputs": [],
4943
4836
  "state_mutability": "external"
4944
4837
  },
4945
4838
  {
4946
4839
  "type": "function",
4947
- "name": "redeem_ticket",
4840
+ "name": "pause_event",
4948
4841
  "inputs": [
4949
4842
  {
4950
4843
  "name": "token_id",
4951
4844
  "type": "core::integer::u256"
4845
+ },
4846
+ {
4847
+ "name": "active",
4848
+ "type": "core::bool"
4952
4849
  }
4953
4850
  ],
4954
4851
  "outputs": [],
@@ -4956,15 +4853,15 @@ var IPTicketCollectionABI = [
4956
4853
  },
4957
4854
  {
4958
4855
  "type": "function",
4959
- "name": "has_valid_ticket",
4856
+ "name": "is_valid",
4960
4857
  "inputs": [
4961
4858
  {
4962
- "name": "user",
4963
- "type": "core::starknet::contract_address::ContractAddress"
4859
+ "name": "token_id",
4860
+ "type": "core::integer::u256"
4964
4861
  },
4965
4862
  {
4966
- "name": "collection_id",
4967
- "type": "core::integer::u256"
4863
+ "name": "holder",
4864
+ "type": "core::starknet::contract_address::ContractAddress"
4968
4865
  }
4969
4866
  ],
4970
4867
  "outputs": [
@@ -4976,23 +4873,7 @@ var IPTicketCollectionABI = [
4976
4873
  },
4977
4874
  {
4978
4875
  "type": "function",
4979
- "name": "get_ticket_collection",
4980
- "inputs": [
4981
- {
4982
- "name": "collection_id",
4983
- "type": "core::integer::u256"
4984
- }
4985
- ],
4986
- "outputs": [
4987
- {
4988
- "type": "ip_ticket::types::TicketCollection"
4989
- }
4990
- ],
4991
- "state_mutability": "view"
4992
- },
4993
- {
4994
- "type": "function",
4995
- "name": "get_ticket_data",
4876
+ "name": "get_event",
4996
4877
  "inputs": [
4997
4878
  {
4998
4879
  "name": "token_id",
@@ -5001,72 +4882,34 @@ var IPTicketCollectionABI = [
5001
4882
  ],
5002
4883
  "outputs": [
5003
4884
  {
5004
- "type": "ip_ticket::types::TicketData"
4885
+ "type": "ip_ticket::types::EventRecord"
5005
4886
  }
5006
4887
  ],
5007
4888
  "state_mutability": "view"
5008
4889
  },
5009
4890
  {
5010
4891
  "type": "function",
5011
- "name": "get_ticket_collection_id",
4892
+ "name": "royalty_info",
5012
4893
  "inputs": [
5013
4894
  {
5014
4895
  "name": "token_id",
5015
4896
  "type": "core::integer::u256"
5016
- }
5017
- ],
5018
- "outputs": [
5019
- {
5020
- "type": "core::integer::u256"
5021
- }
5022
- ],
5023
- "state_mutability": "view"
5024
- },
5025
- {
5026
- "type": "function",
5027
- "name": "get_active_ticket_balance",
5028
- "inputs": [
5029
- {
5030
- "name": "user",
5031
- "type": "core::starknet::contract_address::ContractAddress"
5032
4897
  },
5033
4898
  {
5034
- "name": "collection_id",
5035
- "type": "core::integer::u256"
5036
- }
5037
- ],
5038
- "outputs": [
5039
- {
5040
- "type": "core::integer::u256"
5041
- }
5042
- ],
5043
- "state_mutability": "view"
5044
- },
5045
- {
5046
- "type": "function",
5047
- "name": "get_last_collection_id",
5048
- "inputs": [],
5049
- "outputs": [
5050
- {
4899
+ "name": "sale_price",
5051
4900
  "type": "core::integer::u256"
5052
4901
  }
5053
4902
  ],
5054
- "state_mutability": "view"
5055
- },
5056
- {
5057
- "type": "function",
5058
- "name": "total_supply",
5059
- "inputs": [],
5060
4903
  "outputs": [
5061
4904
  {
5062
- "type": "core::integer::u256"
4905
+ "type": "(core::starknet::contract_address::ContractAddress, core::integer::u256)"
5063
4906
  }
5064
4907
  ],
5065
4908
  "state_mutability": "view"
5066
4909
  },
5067
4910
  {
5068
4911
  "type": "function",
5069
- "name": "royalty_info",
4912
+ "name": "royaltyInfo",
5070
4913
  "inputs": [
5071
4914
  {
5072
4915
  "name": "token_id",
@@ -5086,20 +4929,11 @@ var IPTicketCollectionABI = [
5086
4929
  },
5087
4930
  {
5088
4931
  "type": "function",
5089
- "name": "royaltyInfo",
5090
- "inputs": [
5091
- {
5092
- "name": "token_id",
5093
- "type": "core::integer::u256"
5094
- },
5095
- {
5096
- "name": "sale_price",
5097
- "type": "core::integer::u256"
5098
- }
5099
- ],
4932
+ "name": "version",
4933
+ "inputs": [],
5100
4934
  "outputs": [
5101
4935
  {
5102
- "type": "(core::starknet::contract_address::ContractAddress, core::integer::u256)"
4936
+ "type": "core::byte_array::ByteArray"
5103
4937
  }
5104
4938
  ],
5105
4939
  "state_mutability": "view"
@@ -5108,8 +4942,28 @@ var IPTicketCollectionABI = [
5108
4942
  },
5109
4943
  {
5110
4944
  "type": "impl",
5111
- "name": "ERC721Impl",
5112
- "interface_name": "openzeppelin_token::erc721::interface::IERC721"
4945
+ "name": "ERC1155Impl",
4946
+ "interface_name": "openzeppelin_token::erc1155::interface::IERC1155"
4947
+ },
4948
+ {
4949
+ "type": "struct",
4950
+ "name": "core::array::Span::<core::starknet::contract_address::ContractAddress>",
4951
+ "members": [
4952
+ {
4953
+ "name": "snapshot",
4954
+ "type": "@core::array::Array::<core::starknet::contract_address::ContractAddress>"
4955
+ }
4956
+ ]
4957
+ },
4958
+ {
4959
+ "type": "struct",
4960
+ "name": "core::array::Span::<core::integer::u256>",
4961
+ "members": [
4962
+ {
4963
+ "name": "snapshot",
4964
+ "type": "@core::array::Array::<core::integer::u256>"
4965
+ }
4966
+ ]
5113
4967
  },
5114
4968
  {
5115
4969
  "type": "struct",
@@ -5123,7 +4977,7 @@ var IPTicketCollectionABI = [
5123
4977
  },
5124
4978
  {
5125
4979
  "type": "interface",
5126
- "name": "openzeppelin_token::erc721::interface::IERC721",
4980
+ "name": "openzeppelin_token::erc1155::interface::IERC1155",
5127
4981
  "items": [
5128
4982
  {
5129
4983
  "type": "function",
@@ -5132,6 +4986,10 @@ var IPTicketCollectionABI = [
5132
4986
  {
5133
4987
  "name": "account",
5134
4988
  "type": "core::starknet::contract_address::ContractAddress"
4989
+ },
4990
+ {
4991
+ "name": "token_id",
4992
+ "type": "core::integer::u256"
5135
4993
  }
5136
4994
  ],
5137
4995
  "outputs": [
@@ -5143,16 +5001,20 @@ var IPTicketCollectionABI = [
5143
5001
  },
5144
5002
  {
5145
5003
  "type": "function",
5146
- "name": "owner_of",
5004
+ "name": "balance_of_batch",
5147
5005
  "inputs": [
5148
5006
  {
5149
- "name": "token_id",
5150
- "type": "core::integer::u256"
5007
+ "name": "accounts",
5008
+ "type": "core::array::Span::<core::starknet::contract_address::ContractAddress>"
5009
+ },
5010
+ {
5011
+ "name": "token_ids",
5012
+ "type": "core::array::Span::<core::integer::u256>"
5151
5013
  }
5152
5014
  ],
5153
5015
  "outputs": [
5154
5016
  {
5155
- "type": "core::starknet::contract_address::ContractAddress"
5017
+ "type": "core::array::Span::<core::integer::u256>"
5156
5018
  }
5157
5019
  ],
5158
5020
  "state_mutability": "view"
@@ -5173,6 +5035,10 @@ var IPTicketCollectionABI = [
5173
5035
  "name": "token_id",
5174
5036
  "type": "core::integer::u256"
5175
5037
  },
5038
+ {
5039
+ "name": "value",
5040
+ "type": "core::integer::u256"
5041
+ },
5176
5042
  {
5177
5043
  "name": "data",
5178
5044
  "type": "core::array::Span::<core::felt252>"
@@ -5183,7 +5049,7 @@ var IPTicketCollectionABI = [
5183
5049
  },
5184
5050
  {
5185
5051
  "type": "function",
5186
- "name": "transfer_from",
5052
+ "name": "safe_batch_transfer_from",
5187
5053
  "inputs": [
5188
5054
  {
5189
5055
  "name": "from",
@@ -5194,24 +5060,16 @@ var IPTicketCollectionABI = [
5194
5060
  "type": "core::starknet::contract_address::ContractAddress"
5195
5061
  },
5196
5062
  {
5197
- "name": "token_id",
5198
- "type": "core::integer::u256"
5199
- }
5200
- ],
5201
- "outputs": [],
5202
- "state_mutability": "external"
5203
- },
5204
- {
5205
- "type": "function",
5206
- "name": "approve",
5207
- "inputs": [
5063
+ "name": "token_ids",
5064
+ "type": "core::array::Span::<core::integer::u256>"
5065
+ },
5208
5066
  {
5209
- "name": "to",
5210
- "type": "core::starknet::contract_address::ContractAddress"
5067
+ "name": "values",
5068
+ "type": "core::array::Span::<core::integer::u256>"
5211
5069
  },
5212
5070
  {
5213
- "name": "token_id",
5214
- "type": "core::integer::u256"
5071
+ "name": "data",
5072
+ "type": "core::array::Span::<core::felt252>"
5215
5073
  }
5216
5074
  ],
5217
5075
  "outputs": [],
@@ -5219,66 +5077,50 @@ var IPTicketCollectionABI = [
5219
5077
  },
5220
5078
  {
5221
5079
  "type": "function",
5222
- "name": "set_approval_for_all",
5080
+ "name": "is_approved_for_all",
5223
5081
  "inputs": [
5224
5082
  {
5225
- "name": "operator",
5083
+ "name": "owner",
5226
5084
  "type": "core::starknet::contract_address::ContractAddress"
5227
5085
  },
5228
5086
  {
5229
- "name": "approved",
5230
- "type": "core::bool"
5231
- }
5232
- ],
5233
- "outputs": [],
5234
- "state_mutability": "external"
5235
- },
5236
- {
5237
- "type": "function",
5238
- "name": "get_approved",
5239
- "inputs": [
5240
- {
5241
- "name": "token_id",
5242
- "type": "core::integer::u256"
5087
+ "name": "operator",
5088
+ "type": "core::starknet::contract_address::ContractAddress"
5243
5089
  }
5244
5090
  ],
5245
5091
  "outputs": [
5246
5092
  {
5247
- "type": "core::starknet::contract_address::ContractAddress"
5093
+ "type": "core::bool"
5248
5094
  }
5249
5095
  ],
5250
5096
  "state_mutability": "view"
5251
5097
  },
5252
5098
  {
5253
5099
  "type": "function",
5254
- "name": "is_approved_for_all",
5100
+ "name": "set_approval_for_all",
5255
5101
  "inputs": [
5256
- {
5257
- "name": "owner",
5258
- "type": "core::starknet::contract_address::ContractAddress"
5259
- },
5260
5102
  {
5261
5103
  "name": "operator",
5262
5104
  "type": "core::starknet::contract_address::ContractAddress"
5263
- }
5264
- ],
5265
- "outputs": [
5105
+ },
5266
5106
  {
5107
+ "name": "approved",
5267
5108
  "type": "core::bool"
5268
5109
  }
5269
5110
  ],
5270
- "state_mutability": "view"
5111
+ "outputs": [],
5112
+ "state_mutability": "external"
5271
5113
  }
5272
5114
  ]
5273
5115
  },
5274
5116
  {
5275
5117
  "type": "impl",
5276
- "name": "ERC721CamelOnly",
5277
- "interface_name": "openzeppelin_token::erc721::interface::IERC721CamelOnly"
5118
+ "name": "ERC1155CamelImpl",
5119
+ "interface_name": "openzeppelin_token::erc1155::interface::IERC1155Camel"
5278
5120
  },
5279
5121
  {
5280
5122
  "type": "interface",
5281
- "name": "openzeppelin_token::erc721::interface::IERC721CamelOnly",
5123
+ "name": "openzeppelin_token::erc1155::interface::IERC1155Camel",
5282
5124
  "items": [
5283
5125
  {
5284
5126
  "type": "function",
@@ -5287,6 +5129,10 @@ var IPTicketCollectionABI = [
5287
5129
  {
5288
5130
  "name": "account",
5289
5131
  "type": "core::starknet::contract_address::ContractAddress"
5132
+ },
5133
+ {
5134
+ "name": "tokenId",
5135
+ "type": "core::integer::u256"
5290
5136
  }
5291
5137
  ],
5292
5138
  "outputs": [
@@ -5298,16 +5144,20 @@ var IPTicketCollectionABI = [
5298
5144
  },
5299
5145
  {
5300
5146
  "type": "function",
5301
- "name": "ownerOf",
5147
+ "name": "balanceOfBatch",
5302
5148
  "inputs": [
5303
5149
  {
5304
- "name": "tokenId",
5305
- "type": "core::integer::u256"
5150
+ "name": "accounts",
5151
+ "type": "core::array::Span::<core::starknet::contract_address::ContractAddress>"
5152
+ },
5153
+ {
5154
+ "name": "tokenIds",
5155
+ "type": "core::array::Span::<core::integer::u256>"
5306
5156
  }
5307
5157
  ],
5308
5158
  "outputs": [
5309
5159
  {
5310
- "type": "core::starknet::contract_address::ContractAddress"
5160
+ "type": "core::array::Span::<core::integer::u256>"
5311
5161
  }
5312
5162
  ],
5313
5163
  "state_mutability": "view"
@@ -5328,6 +5178,10 @@ var IPTicketCollectionABI = [
5328
5178
  "name": "tokenId",
5329
5179
  "type": "core::integer::u256"
5330
5180
  },
5181
+ {
5182
+ "name": "value",
5183
+ "type": "core::integer::u256"
5184
+ },
5331
5185
  {
5332
5186
  "name": "data",
5333
5187
  "type": "core::array::Span::<core::felt252>"
@@ -5338,7 +5192,7 @@ var IPTicketCollectionABI = [
5338
5192
  },
5339
5193
  {
5340
5194
  "type": "function",
5341
- "name": "transferFrom",
5195
+ "name": "safeBatchTransferFrom",
5342
5196
  "inputs": [
5343
5197
  {
5344
5198
  "name": "from",
@@ -5349,24 +5203,16 @@ var IPTicketCollectionABI = [
5349
5203
  "type": "core::starknet::contract_address::ContractAddress"
5350
5204
  },
5351
5205
  {
5352
- "name": "tokenId",
5353
- "type": "core::integer::u256"
5354
- }
5355
- ],
5356
- "outputs": [],
5357
- "state_mutability": "external"
5358
- },
5359
- {
5360
- "type": "function",
5361
- "name": "setApprovalForAll",
5362
- "inputs": [
5206
+ "name": "tokenIds",
5207
+ "type": "core::array::Span::<core::integer::u256>"
5208
+ },
5363
5209
  {
5364
- "name": "operator",
5365
- "type": "core::starknet::contract_address::ContractAddress"
5210
+ "name": "values",
5211
+ "type": "core::array::Span::<core::integer::u256>"
5366
5212
  },
5367
5213
  {
5368
- "name": "approved",
5369
- "type": "core::bool"
5214
+ "name": "data",
5215
+ "type": "core::array::Span::<core::felt252>"
5370
5216
  }
5371
5217
  ],
5372
5218
  "outputs": [],
@@ -5374,39 +5220,39 @@ var IPTicketCollectionABI = [
5374
5220
  },
5375
5221
  {
5376
5222
  "type": "function",
5377
- "name": "getApproved",
5223
+ "name": "isApprovedForAll",
5378
5224
  "inputs": [
5379
5225
  {
5380
- "name": "tokenId",
5381
- "type": "core::integer::u256"
5226
+ "name": "owner",
5227
+ "type": "core::starknet::contract_address::ContractAddress"
5228
+ },
5229
+ {
5230
+ "name": "operator",
5231
+ "type": "core::starknet::contract_address::ContractAddress"
5382
5232
  }
5383
5233
  ],
5384
5234
  "outputs": [
5385
5235
  {
5386
- "type": "core::starknet::contract_address::ContractAddress"
5236
+ "type": "core::bool"
5387
5237
  }
5388
5238
  ],
5389
5239
  "state_mutability": "view"
5390
5240
  },
5391
5241
  {
5392
5242
  "type": "function",
5393
- "name": "isApprovedForAll",
5243
+ "name": "setApprovalForAll",
5394
5244
  "inputs": [
5395
- {
5396
- "name": "owner",
5397
- "type": "core::starknet::contract_address::ContractAddress"
5398
- },
5399
5245
  {
5400
5246
  "name": "operator",
5401
5247
  "type": "core::starknet::contract_address::ContractAddress"
5402
- }
5403
- ],
5404
- "outputs": [
5248
+ },
5405
5249
  {
5250
+ "name": "approved",
5406
5251
  "type": "core::bool"
5407
5252
  }
5408
5253
  ],
5409
- "state_mutability": "view"
5254
+ "outputs": [],
5255
+ "state_mutability": "external"
5410
5256
  }
5411
5257
  ]
5412
5258
  },
@@ -5517,9 +5363,14 @@ var IPTicketCollectionABI = [
5517
5363
  },
5518
5364
  {
5519
5365
  "type": "event",
5520
- "name": "openzeppelin_token::erc721::erc721::ERC721Component::Transfer",
5366
+ "name": "openzeppelin_token::erc1155::erc1155::ERC1155Component::TransferSingle",
5521
5367
  "kind": "struct",
5522
5368
  "members": [
5369
+ {
5370
+ "name": "operator",
5371
+ "type": "core::starknet::contract_address::ContractAddress",
5372
+ "kind": "key"
5373
+ },
5523
5374
  {
5524
5375
  "name": "from",
5525
5376
  "type": "core::starknet::contract_address::ContractAddress",
@@ -5531,37 +5382,52 @@ var IPTicketCollectionABI = [
5531
5382
  "kind": "key"
5532
5383
  },
5533
5384
  {
5534
- "name": "token_id",
5385
+ "name": "id",
5535
5386
  "type": "core::integer::u256",
5536
- "kind": "key"
5387
+ "kind": "data"
5388
+ },
5389
+ {
5390
+ "name": "value",
5391
+ "type": "core::integer::u256",
5392
+ "kind": "data"
5537
5393
  }
5538
5394
  ]
5539
5395
  },
5540
5396
  {
5541
5397
  "type": "event",
5542
- "name": "openzeppelin_token::erc721::erc721::ERC721Component::Approval",
5398
+ "name": "openzeppelin_token::erc1155::erc1155::ERC1155Component::TransferBatch",
5543
5399
  "kind": "struct",
5544
5400
  "members": [
5545
5401
  {
5546
- "name": "owner",
5402
+ "name": "operator",
5547
5403
  "type": "core::starknet::contract_address::ContractAddress",
5548
5404
  "kind": "key"
5549
5405
  },
5550
5406
  {
5551
- "name": "approved",
5407
+ "name": "from",
5552
5408
  "type": "core::starknet::contract_address::ContractAddress",
5553
5409
  "kind": "key"
5554
5410
  },
5555
5411
  {
5556
- "name": "token_id",
5557
- "type": "core::integer::u256",
5412
+ "name": "to",
5413
+ "type": "core::starknet::contract_address::ContractAddress",
5558
5414
  "kind": "key"
5415
+ },
5416
+ {
5417
+ "name": "ids",
5418
+ "type": "core::array::Span::<core::integer::u256>",
5419
+ "kind": "data"
5420
+ },
5421
+ {
5422
+ "name": "values",
5423
+ "type": "core::array::Span::<core::integer::u256>",
5424
+ "kind": "data"
5559
5425
  }
5560
5426
  ]
5561
5427
  },
5562
5428
  {
5563
5429
  "type": "event",
5564
- "name": "openzeppelin_token::erc721::erc721::ERC721Component::ApprovalForAll",
5430
+ "name": "openzeppelin_token::erc1155::erc1155::ERC1155Component::ApprovalForAll",
5565
5431
  "kind": "struct",
5566
5432
  "members": [
5567
5433
  {
@@ -5583,22 +5449,44 @@ var IPTicketCollectionABI = [
5583
5449
  },
5584
5450
  {
5585
5451
  "type": "event",
5586
- "name": "openzeppelin_token::erc721::erc721::ERC721Component::Event",
5452
+ "name": "openzeppelin_token::erc1155::erc1155::ERC1155Component::URI",
5453
+ "kind": "struct",
5454
+ "members": [
5455
+ {
5456
+ "name": "value",
5457
+ "type": "core::byte_array::ByteArray",
5458
+ "kind": "data"
5459
+ },
5460
+ {
5461
+ "name": "id",
5462
+ "type": "core::integer::u256",
5463
+ "kind": "key"
5464
+ }
5465
+ ]
5466
+ },
5467
+ {
5468
+ "type": "event",
5469
+ "name": "openzeppelin_token::erc1155::erc1155::ERC1155Component::Event",
5587
5470
  "kind": "enum",
5588
5471
  "variants": [
5589
5472
  {
5590
- "name": "Transfer",
5591
- "type": "openzeppelin_token::erc721::erc721::ERC721Component::Transfer",
5473
+ "name": "TransferSingle",
5474
+ "type": "openzeppelin_token::erc1155::erc1155::ERC1155Component::TransferSingle",
5592
5475
  "kind": "nested"
5593
5476
  },
5594
5477
  {
5595
- "name": "Approval",
5596
- "type": "openzeppelin_token::erc721::erc721::ERC721Component::Approval",
5478
+ "name": "TransferBatch",
5479
+ "type": "openzeppelin_token::erc1155::erc1155::ERC1155Component::TransferBatch",
5597
5480
  "kind": "nested"
5598
5481
  },
5599
5482
  {
5600
5483
  "name": "ApprovalForAll",
5601
- "type": "openzeppelin_token::erc721::erc721::ERC721Component::ApprovalForAll",
5484
+ "type": "openzeppelin_token::erc1155::erc1155::ERC1155Component::ApprovalForAll",
5485
+ "kind": "nested"
5486
+ },
5487
+ {
5488
+ "name": "URI",
5489
+ "type": "openzeppelin_token::erc1155::erc1155::ERC1155Component::URI",
5602
5490
  "kind": "nested"
5603
5491
  }
5604
5492
  ]
@@ -5662,42 +5550,27 @@ var IPTicketCollectionABI = [
5662
5550
  },
5663
5551
  {
5664
5552
  "type": "event",
5665
- "name": "ip_ticket::IPTicketCollection::IPTicketCollection::TicketCollectionCreated",
5553
+ "name": "ip_ticket::IPTicketCollection::IPTicketCollection::EventCreated",
5666
5554
  "kind": "struct",
5667
5555
  "members": [
5668
5556
  {
5669
- "name": "collection_id",
5557
+ "name": "token_id",
5670
5558
  "type": "core::integer::u256",
5671
5559
  "kind": "key"
5672
5560
  },
5673
- {
5674
- "name": "creator",
5675
- "type": "core::starknet::contract_address::ContractAddress",
5676
- "kind": "key"
5677
- },
5678
- {
5679
- "name": "price",
5680
- "type": "core::integer::u256",
5681
- "kind": "data"
5682
- },
5683
5561
  {
5684
5562
  "name": "max_supply",
5685
5563
  "type": "core::integer::u256",
5686
5564
  "kind": "data"
5687
5565
  },
5688
5566
  {
5689
- "name": "expiration",
5690
- "type": "core::integer::u64",
5691
- "kind": "data"
5692
- },
5693
- {
5694
- "name": "royalty_bps",
5695
- "type": "core::integer::u256",
5567
+ "name": "start_time",
5568
+ "type": "core::option::Option::<core::integer::u64>",
5696
5569
  "kind": "data"
5697
5570
  },
5698
5571
  {
5699
- "name": "payment_token",
5700
- "type": "core::option::Option::<core::starknet::contract_address::ContractAddress>",
5572
+ "name": "end_time",
5573
+ "type": "core::option::Option::<core::integer::u64>",
5701
5574
  "kind": "data"
5702
5575
  },
5703
5576
  {
@@ -5714,11 +5587,11 @@ var IPTicketCollectionABI = [
5714
5587
  },
5715
5588
  {
5716
5589
  "type": "event",
5717
- "name": "ip_ticket::IPTicketCollection::IPTicketCollection::CollectionStatusUpdated",
5590
+ "name": "ip_ticket::IPTicketCollection::IPTicketCollection::EventPaused",
5718
5591
  "kind": "struct",
5719
5592
  "members": [
5720
5593
  {
5721
- "name": "collection_id",
5594
+ "name": "token_id",
5722
5595
  "type": "core::integer::u256",
5723
5596
  "kind": "key"
5724
5597
  },
@@ -5726,65 +5599,6 @@ var IPTicketCollectionABI = [
5726
5599
  "name": "active",
5727
5600
  "type": "core::bool",
5728
5601
  "kind": "data"
5729
- },
5730
- {
5731
- "name": "updated_at",
5732
- "type": "core::integer::u64",
5733
- "kind": "data"
5734
- }
5735
- ]
5736
- },
5737
- {
5738
- "type": "event",
5739
- "name": "ip_ticket::IPTicketCollection::IPTicketCollection::TicketMinted",
5740
- "kind": "struct",
5741
- "members": [
5742
- {
5743
- "name": "token_id",
5744
- "type": "core::integer::u256",
5745
- "kind": "key"
5746
- },
5747
- {
5748
- "name": "collection_id",
5749
- "type": "core::integer::u256",
5750
- "kind": "key"
5751
- },
5752
- {
5753
- "name": "owner",
5754
- "type": "core::starknet::contract_address::ContractAddress",
5755
- "kind": "key"
5756
- },
5757
- {
5758
- "name": "minted_at",
5759
- "type": "core::integer::u64",
5760
- "kind": "data"
5761
- }
5762
- ]
5763
- },
5764
- {
5765
- "type": "event",
5766
- "name": "ip_ticket::IPTicketCollection::IPTicketCollection::TicketRedeemed",
5767
- "kind": "struct",
5768
- "members": [
5769
- {
5770
- "name": "token_id",
5771
- "type": "core::integer::u256",
5772
- "kind": "key"
5773
- },
5774
- {
5775
- "name": "collection_id",
5776
- "type": "core::integer::u256",
5777
- "kind": "key"
5778
- },
5779
- {
5780
- "name": "owner",
5781
- "type": "core::starknet::contract_address::ContractAddress",
5782
- "kind": "key"
5783
- },
5784
- {
5785
- "name": "redeemed_at",
5786
- "type": "core::integer::u64",
5787
- "kind": "data"
5788
5602
  }
5789
5603
  ]
5790
5604
  },
@@ -5794,8 +5608,8 @@ var IPTicketCollectionABI = [
5794
5608
  "kind": "enum",
5795
5609
  "variants": [
5796
5610
  {
5797
- "name": "ERC721Event",
5798
- "type": "openzeppelin_token::erc721::erc721::ERC721Component::Event",
5611
+ "name": "ERC1155Event",
5612
+ "type": "openzeppelin_token::erc1155::erc1155::ERC1155Component::Event",
5799
5613
  "kind": "flat"
5800
5614
  },
5801
5615
  {
@@ -5809,23 +5623,13 @@ var IPTicketCollectionABI = [
5809
5623
  "kind": "flat"
5810
5624
  },
5811
5625
  {
5812
- "name": "TicketCollectionCreated",
5813
- "type": "ip_ticket::IPTicketCollection::IPTicketCollection::TicketCollectionCreated",
5814
- "kind": "nested"
5815
- },
5816
- {
5817
- "name": "CollectionStatusUpdated",
5818
- "type": "ip_ticket::IPTicketCollection::IPTicketCollection::CollectionStatusUpdated",
5819
- "kind": "nested"
5820
- },
5821
- {
5822
- "name": "TicketMinted",
5823
- "type": "ip_ticket::IPTicketCollection::IPTicketCollection::TicketMinted",
5626
+ "name": "EventCreated",
5627
+ "type": "ip_ticket::IPTicketCollection::IPTicketCollection::EventCreated",
5824
5628
  "kind": "nested"
5825
5629
  },
5826
5630
  {
5827
- "name": "TicketRedeemed",
5828
- "type": "ip_ticket::IPTicketCollection::IPTicketCollection::TicketRedeemed",
5631
+ "name": "EventPaused",
5632
+ "type": "ip_ticket::IPTicketCollection::IPTicketCollection::EventPaused",
5829
5633
  "kind": "nested"
5830
5634
  }
5831
5635
  ]
@@ -5885,7 +5689,7 @@ var IPTicketCollectionFactoryABI = [
5885
5689
  },
5886
5690
  {
5887
5691
  "type": "function",
5888
- "name": "deploy_ticket_collection",
5692
+ "name": "deploy_collection",
5889
5693
  "inputs": [
5890
5694
  {
5891
5695
  "name": "name",
@@ -5905,6 +5709,47 @@ var IPTicketCollectionFactoryABI = [
5905
5709
  }
5906
5710
  ]
5907
5711
  },
5712
+ {
5713
+ "type": "impl",
5714
+ "name": "SRC5Impl",
5715
+ "interface_name": "openzeppelin_introspection::interface::ISRC5"
5716
+ },
5717
+ {
5718
+ "type": "enum",
5719
+ "name": "core::bool",
5720
+ "variants": [
5721
+ {
5722
+ "name": "False",
5723
+ "type": "()"
5724
+ },
5725
+ {
5726
+ "name": "True",
5727
+ "type": "()"
5728
+ }
5729
+ ]
5730
+ },
5731
+ {
5732
+ "type": "interface",
5733
+ "name": "openzeppelin_introspection::interface::ISRC5",
5734
+ "items": [
5735
+ {
5736
+ "type": "function",
5737
+ "name": "supports_interface",
5738
+ "inputs": [
5739
+ {
5740
+ "name": "interface_id",
5741
+ "type": "core::felt252"
5742
+ }
5743
+ ],
5744
+ "outputs": [
5745
+ {
5746
+ "type": "core::bool"
5747
+ }
5748
+ ],
5749
+ "state_mutability": "view"
5750
+ }
5751
+ ]
5752
+ },
5908
5753
  {
5909
5754
  "type": "constructor",
5910
5755
  "name": "constructor",
@@ -5915,6 +5760,12 @@ var IPTicketCollectionFactoryABI = [
5915
5760
  }
5916
5761
  ]
5917
5762
  },
5763
+ {
5764
+ "type": "event",
5765
+ "name": "openzeppelin_introspection::src5::SRC5Component::Event",
5766
+ "kind": "enum",
5767
+ "variants": []
5768
+ },
5918
5769
  {
5919
5770
  "type": "event",
5920
5771
  "name": "ip_ticket::IPTicketCollectionFactory::IPTicketCollectionFactory::CollectionDeployed",
@@ -5947,6 +5798,11 @@ var IPTicketCollectionFactoryABI = [
5947
5798
  "name": "ip_ticket::IPTicketCollectionFactory::IPTicketCollectionFactory::Event",
5948
5799
  "kind": "enum",
5949
5800
  "variants": [
5801
+ {
5802
+ "name": "SRC5Event",
5803
+ "type": "openzeppelin_introspection::src5::SRC5Component::Event",
5804
+ "kind": "flat"
5805
+ },
5950
5806
  {
5951
5807
  "name": "CollectionDeployed",
5952
5808
  "type": "ip_ticket::IPTicketCollectionFactory::IPTicketCollectionFactory::CollectionDeployed",
@@ -12526,66 +12382,84 @@ var CreatorCoinService = class {
12526
12382
  };
12527
12383
  var TicketService = class {
12528
12384
  constructor(config) {
12385
+ this.config = config;
12529
12386
  this.factoryAddress = getStarknetCoordinates(config.chain).ipTicketsFactory;
12530
12387
  }
12388
+ _factory(account, factoryAddress) {
12389
+ const address = factoryAddress ?? this.factoryAddress;
12390
+ if (!address) throw new Error("IP-Tickets factory address not configured for this chain");
12391
+ return new starknet.Contract(IPTicketCollectionFactoryABI, normalizeAddress("STARKNET", address), account);
12392
+ }
12531
12393
  _collection(address, account) {
12532
12394
  return new starknet.Contract(IPTicketCollectionABI, normalizeAddress("STARKNET", address), account);
12533
12395
  }
12534
- /** Deploys a new IPTicketCollection via the factory. Caller becomes its owner. */
12535
- async deployTicketCollection(account, params) {
12536
- const factoryAddress = params.factoryAddress ?? this.factoryAddress;
12537
- if (!factoryAddress) {
12538
- throw new Error("IP-Tickets factory address not configured for this chain");
12539
- }
12540
- const factory = new starknet.Contract(IPTicketCollectionFactoryABI, factoryAddress, account);
12541
- const call = factory.populate("deploy_ticket_collection", [params.name, params.symbol]);
12396
+ _collectionRead(address) {
12397
+ const provider = new starknet.RpcProvider({ nodeUrl: this.config.rpcUrl });
12398
+ return new starknet.Contract(IPTicketCollectionABI, normalizeAddress("STARKNET", address), provider);
12399
+ }
12400
+ /** Deploys a new IPTicketCollection via the factory. Caller becomes owner. */
12401
+ async deployCollection(account, params) {
12402
+ const call = this._factory(account, params.factoryAddress).populate("deploy_collection", [params.name, params.symbol]);
12542
12403
  const res = await account.execute([call]);
12543
12404
  return { txHash: res.transaction_hash };
12544
12405
  }
12545
- /** Owner-only. Creates a new ticket collection (event/tier) inside the caller's deployed IPTicketCollection. */
12546
- async createTicketCollection(account, params) {
12547
- const paymentToken = params.paymentToken ? new starknet.CairoOption(starknet.CairoOptionVariant.Some, params.paymentToken) : new starknet.CairoOption(starknet.CairoOptionVariant.None);
12548
- const call = this._collection(params.collection, account).populate("create_ticket_collection", [
12549
- starknet.cairo.uint256(params.price),
12406
+ /** Owner-only. Creates a new event inside the caller's deployed collection. */
12407
+ async createEvent(account, params) {
12408
+ const startTime = params.startTime != null ? new starknet.CairoOption(starknet.CairoOptionVariant.Some, params.startTime) : new starknet.CairoOption(starknet.CairoOptionVariant.None);
12409
+ const endTime = params.endTime != null ? new starknet.CairoOption(starknet.CairoOptionVariant.Some, params.endTime) : new starknet.CairoOption(starknet.CairoOptionVariant.None);
12410
+ const call = this._collection(params.collection, account).populate("create_event", [
12550
12411
  starknet.cairo.uint256(params.maxSupply),
12551
- params.expiration,
12412
+ startTime,
12413
+ endTime,
12552
12414
  params.royaltyBps,
12553
- paymentToken,
12554
12415
  params.metadataUri
12555
12416
  ]);
12556
12417
  const res = await account.execute([call]);
12557
12418
  return { txHash: res.transaction_hash };
12558
12419
  }
12559
- /** Owner-only. Gates minting only existing tickets keep access/transfer/redeem. */
12560
- async setCollectionActive(account, params) {
12561
- const call = this._collection(params.collection, account).populate("set_collection_active", [
12562
- starknet.cairo.uint256(params.collectionId),
12563
- params.active
12420
+ /** Owner-only. Mints `amount` of `tokenId` to `to`. */
12421
+ async mint(account, params) {
12422
+ const call = this._collection(params.collection, account).populate("mint", [
12423
+ params.to,
12424
+ starknet.cairo.uint256(params.tokenId),
12425
+ starknet.cairo.uint256(params.amount)
12564
12426
  ]);
12565
12427
  const res = await account.execute([call]);
12566
12428
  return { txHash: res.transaction_hash };
12567
12429
  }
12568
- /** Mints a ticket. Prepends an ERC-20 approve when the collection is paid. */
12569
- async mintTicket(account, params) {
12570
- const calls = [];
12571
- if (params.paymentToken && params.price && BigInt(params.price) > 0n) {
12572
- const amount = starknet.cairo.uint256(params.price);
12573
- calls.push({
12574
- contractAddress: params.paymentToken,
12575
- entrypoint: "approve",
12576
- calldata: [normalizeAddress("STARKNET", params.collection), amount.low.toString(), amount.high.toString()]
12577
- });
12578
- }
12579
- calls.push(this._collection(params.collection, account).populate("mint_ticket", [starknet.cairo.uint256(params.collectionId)]));
12580
- const res = await account.execute(calls);
12581
- return { txHash: res.transaction_hash };
12582
- }
12583
- /** Only the current token owner may redeem. */
12584
- async redeemTicket(account, params) {
12585
- const call = this._collection(params.collection, account).populate("redeem_ticket", [starknet.cairo.uint256(params.tokenId)]);
12430
+ /** Owner-only. Pauses or resumes minting for one event. */
12431
+ async pauseEvent(account, params) {
12432
+ const call = this._collection(params.collection, account).populate("pause_event", [
12433
+ starknet.cairo.uint256(params.tokenId),
12434
+ params.active
12435
+ ]);
12586
12436
  const res = await account.execute([call]);
12587
12437
  return { txHash: res.transaction_hash };
12588
12438
  }
12439
+ /** Read — true if holder has balance > 0 and current time is within the event window. */
12440
+ async isValid(params) {
12441
+ const result = await this._collectionRead(params.collection).call("is_valid", [
12442
+ starknet.cairo.uint256(params.tokenId),
12443
+ params.holder
12444
+ ]);
12445
+ return Boolean(result);
12446
+ }
12447
+ /** Read — returns the EventRecord for a token ID. */
12448
+ async getEvent(params) {
12449
+ const ev = await this._collectionRead(params.collection).call("get_event", [
12450
+ starknet.cairo.uint256(params.tokenId)
12451
+ ]);
12452
+ return {
12453
+ creator: ev.creator,
12454
+ maxSupply: BigInt(ev.max_supply),
12455
+ minted: BigInt(ev.minted),
12456
+ startTime: ev.start_time?.variant === "Some" ? Number(ev.start_time.values[0] ?? ev.start_time.value) : null,
12457
+ endTime: ev.end_time?.variant === "Some" ? Number(ev.end_time.values[0] ?? ev.end_time.value) : null,
12458
+ royaltyBps: Number(ev.royalty_bps),
12459
+ metadataUri: ev.metadata_uri,
12460
+ active: Boolean(ev.active)
12461
+ };
12462
+ }
12589
12463
  };
12590
12464
  var ClubService = class {
12591
12465
  constructor(config) {