@medialane/sdk 0.68.0 → 0.69.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.
@@ -39,13 +39,10 @@ var COORDINATES = {
39
39
  ipTicketCollectionClassHash: "0x047bd108881457c4f4db6c64671c1dd402f4d8c79fd9182f03a2dd841335a34b",
40
40
  ipTicketsFactoryClassHash: "0x04a739ac3a673ebd0db96bb24475600797c3ed34827e79517f9b2b1640276e6a",
41
41
  ipTicketsStartBlock: 11836622,
42
- ipClubRegistry: "0x00e189c619b6bb07d78973a149641c59c37eb0716f8584d7520bce12d303eede",
43
- ipClubNftClassHash: "0x02bc9b20cca21b04245e9215bf7121f4d7295b195890e449b472b573017fb889",
44
- ipClubStartBlock: 11404776,
45
- ipClubFactory: "0x05519705345ce225db666253a21cf89d1c675658f16cc6ae4320cefd1a1219a3",
46
- ipClubFactoryClassHash: "0x07197062578375d962b2d42d3e91560770b11b1c97a9defb74c706a2c5299473",
47
- ipClubCollectionClassHash: "0x35b8836a2269523ae9176077ec525451cce1053b2acd9fae3b05354aa4eded3",
48
- ipClubFactoryStartBlock: 11884796,
42
+ ipClubFactory: "0x06a0b0be16d70c78f2e18119dbf90e5911cbfd5d8d484bc555dc61d96f56a2b9",
43
+ ipClubFactoryClassHash: "0x05d9d431bd3532b1fa4d5bab572f49c5ad8034ee3cc83951aa41ae82c9cad266",
44
+ ipClubCollectionClassHash: "0x05b8477c72e6bf0cf64967d71155021fd4d77d9a57e8805c6b40709121c002c5",
45
+ ipClubFactoryStartBlock: 11928775,
49
46
  // v3 redesign (deployed 2026-07-15): single contract is both the
50
47
  // offer/bid/proposal registry and the license collection (embeds
51
48
  // ERC721Component directly) — no separate receipt contract, no
@@ -879,8 +876,6 @@ SN.dropCollectionClassHash;
879
876
  SN.nftComments;
880
877
  SN.ipTicketsFactory;
881
878
  SN.ipTicketCollectionClassHash;
882
- SN.ipClubRegistry;
883
- SN.ipClubNftClassHash;
884
879
  SN.ipClubFactory;
885
880
  SN.ipClubCollectionClassHash;
886
881
  SN.ipSponsorship;
@@ -6584,12 +6579,12 @@ var IPTicketCollectionFactoryABI = [
6584
6579
  }
6585
6580
  ];
6586
6581
 
6587
- // src/starknet/abis/ipClub.ts
6588
- var IPClubABI = [
6582
+ // src/starknet/abis/ipClubFactory.ts
6583
+ var IPClubFactoryABI = [
6589
6584
  {
6590
6585
  "type": "impl",
6591
- "name": "IPClubImpl",
6592
- "interface_name": "ip_club::interfaces::IIPClub::IIPClub"
6586
+ "name": "IPClubCollectionFactoryImpl",
6587
+ "interface_name": "ip_club::interface::IIPClubCollectionFactory"
6593
6588
  },
6594
6589
  {
6595
6590
  "type": "struct",
@@ -6609,240 +6604,55 @@ var IPClubABI = [
6609
6604
  }
6610
6605
  ]
6611
6606
  },
6612
- {
6613
- "type": "enum",
6614
- "name": "core::option::Option::<core::integer::u32>",
6615
- "variants": [
6616
- {
6617
- "name": "Some",
6618
- "type": "core::integer::u32"
6619
- },
6620
- {
6621
- "name": "None",
6622
- "type": "()"
6623
- }
6624
- ]
6625
- },
6626
- {
6627
- "type": "struct",
6628
- "name": "core::integer::u256",
6629
- "members": [
6630
- {
6631
- "name": "low",
6632
- "type": "core::integer::u128"
6633
- },
6634
- {
6635
- "name": "high",
6636
- "type": "core::integer::u128"
6637
- }
6638
- ]
6639
- },
6640
- {
6641
- "type": "enum",
6642
- "name": "core::option::Option::<core::integer::u256>",
6643
- "variants": [
6644
- {
6645
- "name": "Some",
6646
- "type": "core::integer::u256"
6647
- },
6648
- {
6649
- "name": "None",
6650
- "type": "()"
6651
- }
6652
- ]
6653
- },
6654
- {
6655
- "type": "enum",
6656
- "name": "core::option::Option::<core::starknet::contract_address::ContractAddress>",
6657
- "variants": [
6658
- {
6659
- "name": "Some",
6660
- "type": "core::starknet::contract_address::ContractAddress"
6661
- },
6662
- {
6663
- "name": "None",
6664
- "type": "()"
6665
- }
6666
- ]
6667
- },
6668
- {
6669
- "type": "enum",
6670
- "name": "core::bool",
6671
- "variants": [
6672
- {
6673
- "name": "False",
6674
- "type": "()"
6675
- },
6676
- {
6677
- "name": "True",
6678
- "type": "()"
6679
- }
6680
- ]
6681
- },
6682
- {
6683
- "type": "struct",
6684
- "name": "ip_club::types::ClubRecord",
6685
- "members": [
6686
- {
6687
- "name": "creator",
6688
- "type": "core::starknet::contract_address::ContractAddress"
6689
- },
6690
- {
6691
- "name": "club_nft",
6692
- "type": "core::starknet::contract_address::ContractAddress"
6693
- },
6694
- {
6695
- "name": "open",
6696
- "type": "core::bool"
6697
- },
6698
- {
6699
- "name": "num_members",
6700
- "type": "core::integer::u32"
6701
- },
6702
- {
6703
- "name": "max_members",
6704
- "type": "core::option::Option::<core::integer::u32>"
6705
- },
6706
- {
6707
- "name": "entry_fee",
6708
- "type": "core::option::Option::<core::integer::u256>"
6709
- },
6710
- {
6711
- "name": "payment_token",
6712
- "type": "core::option::Option::<core::starknet::contract_address::ContractAddress>"
6713
- }
6714
- ]
6715
- },
6716
6607
  {
6717
6608
  "type": "interface",
6718
- "name": "ip_club::interfaces::IIPClub::IIPClub",
6609
+ "name": "ip_club::interface::IIPClubCollectionFactory",
6719
6610
  "items": [
6720
6611
  {
6721
6612
  "type": "function",
6722
- "name": "create_club",
6723
- "inputs": [
6724
- {
6725
- "name": "name",
6726
- "type": "core::byte_array::ByteArray"
6727
- },
6728
- {
6729
- "name": "symbol",
6730
- "type": "core::byte_array::ByteArray"
6731
- },
6732
- {
6733
- "name": "metadata_uri",
6734
- "type": "core::byte_array::ByteArray"
6735
- },
6736
- {
6737
- "name": "max_members",
6738
- "type": "core::option::Option::<core::integer::u32>"
6739
- },
6740
- {
6741
- "name": "entry_fee",
6742
- "type": "core::option::Option::<core::integer::u256>"
6743
- },
6744
- {
6745
- "name": "payment_token",
6746
- "type": "core::option::Option::<core::starknet::contract_address::ContractAddress>"
6747
- }
6748
- ],
6613
+ "name": "collection_class_hash",
6614
+ "inputs": [],
6749
6615
  "outputs": [
6750
6616
  {
6751
- "type": "core::integer::u256"
6752
- }
6753
- ],
6754
- "state_mutability": "external"
6755
- },
6756
- {
6757
- "type": "function",
6758
- "name": "set_club_open",
6759
- "inputs": [
6760
- {
6761
- "name": "club_id",
6762
- "type": "core::integer::u256"
6763
- },
6764
- {
6765
- "name": "open",
6766
- "type": "core::bool"
6767
- }
6768
- ],
6769
- "outputs": [],
6770
- "state_mutability": "external"
6771
- },
6772
- {
6773
- "type": "function",
6774
- "name": "join_club",
6775
- "inputs": [
6776
- {
6777
- "name": "club_id",
6778
- "type": "core::integer::u256"
6779
- }
6780
- ],
6781
- "outputs": [],
6782
- "state_mutability": "external"
6783
- },
6784
- {
6785
- "type": "function",
6786
- "name": "leave_club",
6787
- "inputs": [
6788
- {
6789
- "name": "club_id",
6790
- "type": "core::integer::u256"
6791
- },
6792
- {
6793
- "name": "token_id",
6794
- "type": "core::integer::u256"
6617
+ "type": "core::starknet::class_hash::ClassHash"
6795
6618
  }
6796
6619
  ],
6797
- "outputs": [],
6798
- "state_mutability": "external"
6620
+ "state_mutability": "view"
6799
6621
  },
6800
6622
  {
6801
6623
  "type": "function",
6802
- "name": "get_club_record",
6803
- "inputs": [
6804
- {
6805
- "name": "club_id",
6806
- "type": "core::integer::u256"
6807
- }
6808
- ],
6624
+ "name": "version",
6625
+ "inputs": [],
6809
6626
  "outputs": [
6810
6627
  {
6811
- "type": "ip_club::types::ClubRecord"
6628
+ "type": "core::byte_array::ByteArray"
6812
6629
  }
6813
6630
  ],
6814
6631
  "state_mutability": "view"
6815
6632
  },
6816
6633
  {
6817
6634
  "type": "function",
6818
- "name": "is_member",
6635
+ "name": "deploy_collection",
6819
6636
  "inputs": [
6820
6637
  {
6821
- "name": "club_id",
6822
- "type": "core::integer::u256"
6638
+ "name": "name",
6639
+ "type": "core::byte_array::ByteArray"
6823
6640
  },
6824
6641
  {
6825
- "name": "user",
6826
- "type": "core::starknet::contract_address::ContractAddress"
6827
- }
6828
- ],
6829
- "outputs": [
6642
+ "name": "symbol",
6643
+ "type": "core::byte_array::ByteArray"
6644
+ },
6830
6645
  {
6831
- "type": "core::bool"
6646
+ "name": "base_uri",
6647
+ "type": "core::byte_array::ByteArray"
6832
6648
  }
6833
6649
  ],
6834
- "state_mutability": "view"
6835
- },
6836
- {
6837
- "type": "function",
6838
- "name": "get_last_club_id",
6839
- "inputs": [],
6840
6650
  "outputs": [
6841
6651
  {
6842
- "type": "core::integer::u256"
6652
+ "type": "core::starknet::contract_address::ContractAddress"
6843
6653
  }
6844
6654
  ],
6845
- "state_mutability": "view"
6655
+ "state_mutability": "external"
6846
6656
  }
6847
6657
  ]
6848
6658
  },
@@ -6851,6 +6661,20 @@ var IPClubABI = [
6851
6661
  "name": "SRC5Impl",
6852
6662
  "interface_name": "openzeppelin_introspection::interface::ISRC5"
6853
6663
  },
6664
+ {
6665
+ "type": "enum",
6666
+ "name": "core::bool",
6667
+ "variants": [
6668
+ {
6669
+ "name": "False",
6670
+ "type": "()"
6671
+ },
6672
+ {
6673
+ "name": "True",
6674
+ "type": "()"
6675
+ }
6676
+ ]
6677
+ },
6854
6678
  {
6855
6679
  "type": "interface",
6856
6680
  "name": "openzeppelin_introspection::interface::ISRC5",
@@ -6878,7 +6702,7 @@ var IPClubABI = [
6878
6702
  "name": "constructor",
6879
6703
  "inputs": [
6880
6704
  {
6881
- "name": "ip_club_nft_class_hash",
6705
+ "name": "collection_class_hash",
6882
6706
  "type": "core::starknet::class_hash::ClassHash"
6883
6707
  }
6884
6708
  ]
@@ -6891,945 +6715,60 @@ var IPClubABI = [
6891
6715
  },
6892
6716
  {
6893
6717
  "type": "event",
6894
- "name": "ip_club::events::NewClubCreated",
6718
+ "name": "ip_club::IPClubCollectionFactory::IPClubCollectionFactory::ClubDeployed",
6895
6719
  "kind": "struct",
6896
6720
  "members": [
6897
6721
  {
6898
- "name": "club_id",
6899
- "type": "core::integer::u256",
6900
- "kind": "key"
6901
- },
6902
- {
6903
- "name": "creator",
6722
+ "name": "collection_address",
6904
6723
  "type": "core::starknet::contract_address::ContractAddress",
6905
6724
  "kind": "key"
6906
6725
  },
6907
6726
  {
6908
- "name": "club_nft",
6727
+ "name": "owner",
6909
6728
  "type": "core::starknet::contract_address::ContractAddress",
6910
- "kind": "data"
6729
+ "kind": "key"
6911
6730
  },
6912
6731
  {
6913
- "name": "metadata_uri",
6732
+ "name": "name",
6914
6733
  "type": "core::byte_array::ByteArray",
6915
6734
  "kind": "data"
6916
6735
  },
6917
6736
  {
6918
- "name": "timestamp",
6919
- "type": "core::integer::u64",
6737
+ "name": "symbol",
6738
+ "type": "core::byte_array::ByteArray",
6920
6739
  "kind": "data"
6921
6740
  }
6922
6741
  ]
6923
6742
  },
6924
6743
  {
6925
6744
  "type": "event",
6926
- "name": "ip_club::events::ClubStatusUpdated",
6927
- "kind": "struct",
6928
- "members": [
6929
- {
6930
- "name": "club_id",
6931
- "type": "core::integer::u256",
6932
- "kind": "key"
6933
- },
6745
+ "name": "ip_club::IPClubCollectionFactory::IPClubCollectionFactory::Event",
6746
+ "kind": "enum",
6747
+ "variants": [
6934
6748
  {
6935
- "name": "open",
6936
- "type": "core::bool",
6937
- "kind": "data"
6749
+ "name": "SRC5Event",
6750
+ "type": "openzeppelin_introspection::src5::SRC5Component::Event",
6751
+ "kind": "flat"
6938
6752
  },
6939
6753
  {
6940
- "name": "timestamp",
6941
- "type": "core::integer::u64",
6942
- "kind": "data"
6754
+ "name": "ClubDeployed",
6755
+ "type": "ip_club::IPClubCollectionFactory::IPClubCollectionFactory::ClubDeployed",
6756
+ "kind": "nested"
6943
6757
  }
6944
6758
  ]
6759
+ }
6760
+ ];
6761
+
6762
+ // src/starknet/abis/ipClubCollection.ts
6763
+ var IPClubCollectionABI = [
6764
+ {
6765
+ "type": "impl",
6766
+ "name": "ERC1155MetadataURIImpl",
6767
+ "interface_name": "openzeppelin_token::erc1155::interface::IERC1155MetadataURI"
6945
6768
  },
6946
6769
  {
6947
- "type": "event",
6948
- "name": "ip_club::events::NewMember",
6949
- "kind": "struct",
6950
- "members": [
6951
- {
6952
- "name": "club_id",
6953
- "type": "core::integer::u256",
6954
- "kind": "key"
6955
- },
6956
- {
6957
- "name": "member",
6958
- "type": "core::starknet::contract_address::ContractAddress",
6959
- "kind": "key"
6960
- },
6961
- {
6962
- "name": "timestamp",
6963
- "type": "core::integer::u64",
6964
- "kind": "data"
6965
- }
6966
- ]
6967
- },
6968
- {
6969
- "type": "event",
6970
- "name": "ip_club::events::MemberLeft",
6971
- "kind": "struct",
6972
- "members": [
6973
- {
6974
- "name": "club_id",
6975
- "type": "core::integer::u256",
6976
- "kind": "key"
6977
- },
6978
- {
6979
- "name": "member",
6980
- "type": "core::starknet::contract_address::ContractAddress",
6981
- "kind": "key"
6982
- },
6983
- {
6984
- "name": "timestamp",
6985
- "type": "core::integer::u64",
6986
- "kind": "data"
6987
- }
6988
- ]
6989
- },
6990
- {
6991
- "type": "event",
6992
- "name": "ip_club::IPClub::IPClub::Event",
6993
- "kind": "enum",
6994
- "variants": [
6995
- {
6996
- "name": "SRC5Event",
6997
- "type": "openzeppelin_introspection::src5::SRC5Component::Event",
6998
- "kind": "flat"
6999
- },
7000
- {
7001
- "name": "NewClubCreated",
7002
- "type": "ip_club::events::NewClubCreated",
7003
- "kind": "nested"
7004
- },
7005
- {
7006
- "name": "ClubStatusUpdated",
7007
- "type": "ip_club::events::ClubStatusUpdated",
7008
- "kind": "nested"
7009
- },
7010
- {
7011
- "name": "NewMember",
7012
- "type": "ip_club::events::NewMember",
7013
- "kind": "nested"
7014
- },
7015
- {
7016
- "name": "MemberLeft",
7017
- "type": "ip_club::events::MemberLeft",
7018
- "kind": "nested"
7019
- }
7020
- ]
7021
- }
7022
- ];
7023
-
7024
- // src/starknet/abis/ipClubNft.ts
7025
- var IPClubNFTABI = [
7026
- {
7027
- "type": "impl",
7028
- "name": "IIPClubNFTImpl",
7029
- "interface_name": "ip_club::interfaces::IIPClubNFT::IIPClubNFT"
7030
- },
7031
- {
7032
- "type": "struct",
7033
- "name": "core::integer::u256",
7034
- "members": [
7035
- {
7036
- "name": "low",
7037
- "type": "core::integer::u128"
7038
- },
7039
- {
7040
- "name": "high",
7041
- "type": "core::integer::u128"
7042
- }
7043
- ]
7044
- },
7045
- {
7046
- "type": "enum",
7047
- "name": "core::bool",
7048
- "variants": [
7049
- {
7050
- "name": "False",
7051
- "type": "()"
7052
- },
7053
- {
7054
- "name": "True",
7055
- "type": "()"
7056
- }
7057
- ]
7058
- },
7059
- {
7060
- "type": "interface",
7061
- "name": "ip_club::interfaces::IIPClubNFT::IIPClubNFT",
7062
- "items": [
7063
- {
7064
- "type": "function",
7065
- "name": "mint",
7066
- "inputs": [
7067
- {
7068
- "name": "recipient",
7069
- "type": "core::starknet::contract_address::ContractAddress"
7070
- }
7071
- ],
7072
- "outputs": [],
7073
- "state_mutability": "external"
7074
- },
7075
- {
7076
- "type": "function",
7077
- "name": "burn",
7078
- "inputs": [
7079
- {
7080
- "name": "member",
7081
- "type": "core::starknet::contract_address::ContractAddress"
7082
- },
7083
- {
7084
- "name": "token_id",
7085
- "type": "core::integer::u256"
7086
- }
7087
- ],
7088
- "outputs": [],
7089
- "state_mutability": "external"
7090
- },
7091
- {
7092
- "type": "function",
7093
- "name": "has_nft",
7094
- "inputs": [
7095
- {
7096
- "name": "user",
7097
- "type": "core::starknet::contract_address::ContractAddress"
7098
- }
7099
- ],
7100
- "outputs": [
7101
- {
7102
- "type": "core::bool"
7103
- }
7104
- ],
7105
- "state_mutability": "view"
7106
- },
7107
- {
7108
- "type": "function",
7109
- "name": "get_nft_creator",
7110
- "inputs": [],
7111
- "outputs": [
7112
- {
7113
- "type": "core::starknet::contract_address::ContractAddress"
7114
- }
7115
- ],
7116
- "state_mutability": "view"
7117
- },
7118
- {
7119
- "type": "function",
7120
- "name": "get_ip_club_manager",
7121
- "inputs": [],
7122
- "outputs": [
7123
- {
7124
- "type": "core::starknet::contract_address::ContractAddress"
7125
- }
7126
- ],
7127
- "state_mutability": "view"
7128
- },
7129
- {
7130
- "type": "function",
7131
- "name": "get_associated_club_id",
7132
- "inputs": [],
7133
- "outputs": [
7134
- {
7135
- "type": "core::integer::u256"
7136
- }
7137
- ],
7138
- "state_mutability": "view"
7139
- },
7140
- {
7141
- "type": "function",
7142
- "name": "get_last_minted_id",
7143
- "inputs": [],
7144
- "outputs": [
7145
- {
7146
- "type": "core::integer::u256"
7147
- }
7148
- ],
7149
- "state_mutability": "view"
7150
- }
7151
- ]
7152
- },
7153
- {
7154
- "type": "impl",
7155
- "name": "ERC721MixinImpl",
7156
- "interface_name": "openzeppelin_token::erc721::interface::ERC721ABI"
7157
- },
7158
- {
7159
- "type": "struct",
7160
- "name": "core::array::Span::<core::felt252>",
7161
- "members": [
7162
- {
7163
- "name": "snapshot",
7164
- "type": "@core::array::Array::<core::felt252>"
7165
- }
7166
- ]
7167
- },
7168
- {
7169
- "type": "struct",
7170
- "name": "core::byte_array::ByteArray",
7171
- "members": [
7172
- {
7173
- "name": "data",
7174
- "type": "core::array::Array::<core::bytes_31::bytes31>"
7175
- },
7176
- {
7177
- "name": "pending_word",
7178
- "type": "core::felt252"
7179
- },
7180
- {
7181
- "name": "pending_word_len",
7182
- "type": "core::internal::bounded_int::BoundedInt::<0, 30>"
7183
- }
7184
- ]
7185
- },
7186
- {
7187
- "type": "interface",
7188
- "name": "openzeppelin_token::erc721::interface::ERC721ABI",
7189
- "items": [
7190
- {
7191
- "type": "function",
7192
- "name": "balance_of",
7193
- "inputs": [
7194
- {
7195
- "name": "account",
7196
- "type": "core::starknet::contract_address::ContractAddress"
7197
- }
7198
- ],
7199
- "outputs": [
7200
- {
7201
- "type": "core::integer::u256"
7202
- }
7203
- ],
7204
- "state_mutability": "view"
7205
- },
7206
- {
7207
- "type": "function",
7208
- "name": "owner_of",
7209
- "inputs": [
7210
- {
7211
- "name": "token_id",
7212
- "type": "core::integer::u256"
7213
- }
7214
- ],
7215
- "outputs": [
7216
- {
7217
- "type": "core::starknet::contract_address::ContractAddress"
7218
- }
7219
- ],
7220
- "state_mutability": "view"
7221
- },
7222
- {
7223
- "type": "function",
7224
- "name": "safe_transfer_from",
7225
- "inputs": [
7226
- {
7227
- "name": "from",
7228
- "type": "core::starknet::contract_address::ContractAddress"
7229
- },
7230
- {
7231
- "name": "to",
7232
- "type": "core::starknet::contract_address::ContractAddress"
7233
- },
7234
- {
7235
- "name": "token_id",
7236
- "type": "core::integer::u256"
7237
- },
7238
- {
7239
- "name": "data",
7240
- "type": "core::array::Span::<core::felt252>"
7241
- }
7242
- ],
7243
- "outputs": [],
7244
- "state_mutability": "external"
7245
- },
7246
- {
7247
- "type": "function",
7248
- "name": "transfer_from",
7249
- "inputs": [
7250
- {
7251
- "name": "from",
7252
- "type": "core::starknet::contract_address::ContractAddress"
7253
- },
7254
- {
7255
- "name": "to",
7256
- "type": "core::starknet::contract_address::ContractAddress"
7257
- },
7258
- {
7259
- "name": "token_id",
7260
- "type": "core::integer::u256"
7261
- }
7262
- ],
7263
- "outputs": [],
7264
- "state_mutability": "external"
7265
- },
7266
- {
7267
- "type": "function",
7268
- "name": "approve",
7269
- "inputs": [
7270
- {
7271
- "name": "to",
7272
- "type": "core::starknet::contract_address::ContractAddress"
7273
- },
7274
- {
7275
- "name": "token_id",
7276
- "type": "core::integer::u256"
7277
- }
7278
- ],
7279
- "outputs": [],
7280
- "state_mutability": "external"
7281
- },
7282
- {
7283
- "type": "function",
7284
- "name": "set_approval_for_all",
7285
- "inputs": [
7286
- {
7287
- "name": "operator",
7288
- "type": "core::starknet::contract_address::ContractAddress"
7289
- },
7290
- {
7291
- "name": "approved",
7292
- "type": "core::bool"
7293
- }
7294
- ],
7295
- "outputs": [],
7296
- "state_mutability": "external"
7297
- },
7298
- {
7299
- "type": "function",
7300
- "name": "get_approved",
7301
- "inputs": [
7302
- {
7303
- "name": "token_id",
7304
- "type": "core::integer::u256"
7305
- }
7306
- ],
7307
- "outputs": [
7308
- {
7309
- "type": "core::starknet::contract_address::ContractAddress"
7310
- }
7311
- ],
7312
- "state_mutability": "view"
7313
- },
7314
- {
7315
- "type": "function",
7316
- "name": "is_approved_for_all",
7317
- "inputs": [
7318
- {
7319
- "name": "owner",
7320
- "type": "core::starknet::contract_address::ContractAddress"
7321
- },
7322
- {
7323
- "name": "operator",
7324
- "type": "core::starknet::contract_address::ContractAddress"
7325
- }
7326
- ],
7327
- "outputs": [
7328
- {
7329
- "type": "core::bool"
7330
- }
7331
- ],
7332
- "state_mutability": "view"
7333
- },
7334
- {
7335
- "type": "function",
7336
- "name": "supports_interface",
7337
- "inputs": [
7338
- {
7339
- "name": "interface_id",
7340
- "type": "core::felt252"
7341
- }
7342
- ],
7343
- "outputs": [
7344
- {
7345
- "type": "core::bool"
7346
- }
7347
- ],
7348
- "state_mutability": "view"
7349
- },
7350
- {
7351
- "type": "function",
7352
- "name": "name",
7353
- "inputs": [],
7354
- "outputs": [
7355
- {
7356
- "type": "core::byte_array::ByteArray"
7357
- }
7358
- ],
7359
- "state_mutability": "view"
7360
- },
7361
- {
7362
- "type": "function",
7363
- "name": "symbol",
7364
- "inputs": [],
7365
- "outputs": [
7366
- {
7367
- "type": "core::byte_array::ByteArray"
7368
- }
7369
- ],
7370
- "state_mutability": "view"
7371
- },
7372
- {
7373
- "type": "function",
7374
- "name": "token_uri",
7375
- "inputs": [
7376
- {
7377
- "name": "token_id",
7378
- "type": "core::integer::u256"
7379
- }
7380
- ],
7381
- "outputs": [
7382
- {
7383
- "type": "core::byte_array::ByteArray"
7384
- }
7385
- ],
7386
- "state_mutability": "view"
7387
- },
7388
- {
7389
- "type": "function",
7390
- "name": "balanceOf",
7391
- "inputs": [
7392
- {
7393
- "name": "account",
7394
- "type": "core::starknet::contract_address::ContractAddress"
7395
- }
7396
- ],
7397
- "outputs": [
7398
- {
7399
- "type": "core::integer::u256"
7400
- }
7401
- ],
7402
- "state_mutability": "view"
7403
- },
7404
- {
7405
- "type": "function",
7406
- "name": "ownerOf",
7407
- "inputs": [
7408
- {
7409
- "name": "tokenId",
7410
- "type": "core::integer::u256"
7411
- }
7412
- ],
7413
- "outputs": [
7414
- {
7415
- "type": "core::starknet::contract_address::ContractAddress"
7416
- }
7417
- ],
7418
- "state_mutability": "view"
7419
- },
7420
- {
7421
- "type": "function",
7422
- "name": "safeTransferFrom",
7423
- "inputs": [
7424
- {
7425
- "name": "from",
7426
- "type": "core::starknet::contract_address::ContractAddress"
7427
- },
7428
- {
7429
- "name": "to",
7430
- "type": "core::starknet::contract_address::ContractAddress"
7431
- },
7432
- {
7433
- "name": "tokenId",
7434
- "type": "core::integer::u256"
7435
- },
7436
- {
7437
- "name": "data",
7438
- "type": "core::array::Span::<core::felt252>"
7439
- }
7440
- ],
7441
- "outputs": [],
7442
- "state_mutability": "external"
7443
- },
7444
- {
7445
- "type": "function",
7446
- "name": "transferFrom",
7447
- "inputs": [
7448
- {
7449
- "name": "from",
7450
- "type": "core::starknet::contract_address::ContractAddress"
7451
- },
7452
- {
7453
- "name": "to",
7454
- "type": "core::starknet::contract_address::ContractAddress"
7455
- },
7456
- {
7457
- "name": "tokenId",
7458
- "type": "core::integer::u256"
7459
- }
7460
- ],
7461
- "outputs": [],
7462
- "state_mutability": "external"
7463
- },
7464
- {
7465
- "type": "function",
7466
- "name": "setApprovalForAll",
7467
- "inputs": [
7468
- {
7469
- "name": "operator",
7470
- "type": "core::starknet::contract_address::ContractAddress"
7471
- },
7472
- {
7473
- "name": "approved",
7474
- "type": "core::bool"
7475
- }
7476
- ],
7477
- "outputs": [],
7478
- "state_mutability": "external"
7479
- },
7480
- {
7481
- "type": "function",
7482
- "name": "getApproved",
7483
- "inputs": [
7484
- {
7485
- "name": "tokenId",
7486
- "type": "core::integer::u256"
7487
- }
7488
- ],
7489
- "outputs": [
7490
- {
7491
- "type": "core::starknet::contract_address::ContractAddress"
7492
- }
7493
- ],
7494
- "state_mutability": "view"
7495
- },
7496
- {
7497
- "type": "function",
7498
- "name": "isApprovedForAll",
7499
- "inputs": [
7500
- {
7501
- "name": "owner",
7502
- "type": "core::starknet::contract_address::ContractAddress"
7503
- },
7504
- {
7505
- "name": "operator",
7506
- "type": "core::starknet::contract_address::ContractAddress"
7507
- }
7508
- ],
7509
- "outputs": [
7510
- {
7511
- "type": "core::bool"
7512
- }
7513
- ],
7514
- "state_mutability": "view"
7515
- },
7516
- {
7517
- "type": "function",
7518
- "name": "tokenURI",
7519
- "inputs": [
7520
- {
7521
- "name": "tokenId",
7522
- "type": "core::integer::u256"
7523
- }
7524
- ],
7525
- "outputs": [
7526
- {
7527
- "type": "core::byte_array::ByteArray"
7528
- }
7529
- ],
7530
- "state_mutability": "view"
7531
- }
7532
- ]
7533
- },
7534
- {
7535
- "type": "constructor",
7536
- "name": "constructor",
7537
- "inputs": [
7538
- {
7539
- "name": "name",
7540
- "type": "core::byte_array::ByteArray"
7541
- },
7542
- {
7543
- "name": "symbol",
7544
- "type": "core::byte_array::ByteArray"
7545
- },
7546
- {
7547
- "name": "club_id",
7548
- "type": "core::integer::u256"
7549
- },
7550
- {
7551
- "name": "creator",
7552
- "type": "core::starknet::contract_address::ContractAddress"
7553
- },
7554
- {
7555
- "name": "ip_club_manager",
7556
- "type": "core::starknet::contract_address::ContractAddress"
7557
- },
7558
- {
7559
- "name": "metadata_uri",
7560
- "type": "core::byte_array::ByteArray"
7561
- }
7562
- ]
7563
- },
7564
- {
7565
- "type": "event",
7566
- "name": "openzeppelin_token::erc721::erc721::ERC721Component::Transfer",
7567
- "kind": "struct",
7568
- "members": [
7569
- {
7570
- "name": "from",
7571
- "type": "core::starknet::contract_address::ContractAddress",
7572
- "kind": "key"
7573
- },
7574
- {
7575
- "name": "to",
7576
- "type": "core::starknet::contract_address::ContractAddress",
7577
- "kind": "key"
7578
- },
7579
- {
7580
- "name": "token_id",
7581
- "type": "core::integer::u256",
7582
- "kind": "key"
7583
- }
7584
- ]
7585
- },
7586
- {
7587
- "type": "event",
7588
- "name": "openzeppelin_token::erc721::erc721::ERC721Component::Approval",
7589
- "kind": "struct",
7590
- "members": [
7591
- {
7592
- "name": "owner",
7593
- "type": "core::starknet::contract_address::ContractAddress",
7594
- "kind": "key"
7595
- },
7596
- {
7597
- "name": "approved",
7598
- "type": "core::starknet::contract_address::ContractAddress",
7599
- "kind": "key"
7600
- },
7601
- {
7602
- "name": "token_id",
7603
- "type": "core::integer::u256",
7604
- "kind": "key"
7605
- }
7606
- ]
7607
- },
7608
- {
7609
- "type": "event",
7610
- "name": "openzeppelin_token::erc721::erc721::ERC721Component::ApprovalForAll",
7611
- "kind": "struct",
7612
- "members": [
7613
- {
7614
- "name": "owner",
7615
- "type": "core::starknet::contract_address::ContractAddress",
7616
- "kind": "key"
7617
- },
7618
- {
7619
- "name": "operator",
7620
- "type": "core::starknet::contract_address::ContractAddress",
7621
- "kind": "key"
7622
- },
7623
- {
7624
- "name": "approved",
7625
- "type": "core::bool",
7626
- "kind": "data"
7627
- }
7628
- ]
7629
- },
7630
- {
7631
- "type": "event",
7632
- "name": "openzeppelin_token::erc721::erc721::ERC721Component::Event",
7633
- "kind": "enum",
7634
- "variants": [
7635
- {
7636
- "name": "Transfer",
7637
- "type": "openzeppelin_token::erc721::erc721::ERC721Component::Transfer",
7638
- "kind": "nested"
7639
- },
7640
- {
7641
- "name": "Approval",
7642
- "type": "openzeppelin_token::erc721::erc721::ERC721Component::Approval",
7643
- "kind": "nested"
7644
- },
7645
- {
7646
- "name": "ApprovalForAll",
7647
- "type": "openzeppelin_token::erc721::erc721::ERC721Component::ApprovalForAll",
7648
- "kind": "nested"
7649
- }
7650
- ]
7651
- },
7652
- {
7653
- "type": "event",
7654
- "name": "openzeppelin_introspection::src5::SRC5Component::Event",
7655
- "kind": "enum",
7656
- "variants": []
7657
- },
7658
- {
7659
- "type": "event",
7660
- "name": "ip_club::IPClubNFT::IPClubNFT::Event",
7661
- "kind": "enum",
7662
- "variants": [
7663
- {
7664
- "name": "ERC721Event",
7665
- "type": "openzeppelin_token::erc721::erc721::ERC721Component::Event",
7666
- "kind": "flat"
7667
- },
7668
- {
7669
- "name": "SRC5Event",
7670
- "type": "openzeppelin_introspection::src5::SRC5Component::Event",
7671
- "kind": "flat"
7672
- }
7673
- ]
7674
- }
7675
- ];
7676
-
7677
- // src/starknet/abis/ipClubFactory.ts
7678
- var IPClubFactoryABI = [
7679
- {
7680
- "type": "impl",
7681
- "name": "IPClubFactoryImpl",
7682
- "interface_name": "ip_club::interface::IIPClubFactory"
7683
- },
7684
- {
7685
- "type": "struct",
7686
- "name": "core::byte_array::ByteArray",
7687
- "members": [
7688
- { "name": "data", "type": "core::array::Array::<core::bytes_31::bytes31>" },
7689
- { "name": "pending_word", "type": "core::felt252" },
7690
- { "name": "pending_word_len", "type": "core::internal::bounded_int::BoundedInt::<0, 30>" }
7691
- ]
7692
- },
7693
- {
7694
- "type": "struct",
7695
- "name": "core::integer::u256",
7696
- "members": [
7697
- { "name": "low", "type": "core::integer::u128" },
7698
- { "name": "high", "type": "core::integer::u128" }
7699
- ]
7700
- },
7701
- {
7702
- "type": "enum",
7703
- "name": "core::option::Option::<core::starknet::contract_address::ContractAddress>",
7704
- "variants": [
7705
- { "name": "Some", "type": "core::starknet::contract_address::ContractAddress" },
7706
- { "name": "None", "type": "()" }
7707
- ]
7708
- },
7709
- {
7710
- "type": "interface",
7711
- "name": "ip_club::interface::IIPClubFactory",
7712
- "items": [
7713
- {
7714
- "type": "function",
7715
- "name": "collection_class_hash",
7716
- "inputs": [],
7717
- "outputs": [{ "type": "core::starknet::class_hash::ClassHash" }],
7718
- "state_mutability": "view"
7719
- },
7720
- {
7721
- "type": "function",
7722
- "name": "version",
7723
- "inputs": [],
7724
- "outputs": [{ "type": "core::byte_array::ByteArray" }],
7725
- "state_mutability": "view"
7726
- },
7727
- {
7728
- "type": "function",
7729
- "name": "deploy_club",
7730
- "inputs": [
7731
- { "name": "name", "type": "core::byte_array::ByteArray" },
7732
- { "name": "symbol", "type": "core::byte_array::ByteArray" },
7733
- { "name": "base_uri", "type": "core::byte_array::ByteArray" },
7734
- { "name": "max_supply", "type": "core::integer::u256" },
7735
- { "name": "entry_fee", "type": "core::integer::u256" },
7736
- { "name": "payment_token", "type": "core::option::Option::<core::starknet::contract_address::ContractAddress>" },
7737
- { "name": "royalty_bps", "type": "core::integer::u256" }
7738
- ],
7739
- "outputs": [{ "type": "core::starknet::contract_address::ContractAddress" }],
7740
- "state_mutability": "external"
7741
- }
7742
- ]
7743
- },
7744
- {
7745
- "type": "impl",
7746
- "name": "SRC5Impl",
7747
- "interface_name": "openzeppelin_introspection::interface::ISRC5"
7748
- },
7749
- {
7750
- "type": "enum",
7751
- "name": "core::bool",
7752
- "variants": [
7753
- { "name": "False", "type": "()" },
7754
- { "name": "True", "type": "()" }
7755
- ]
7756
- },
7757
- {
7758
- "type": "interface",
7759
- "name": "openzeppelin_introspection::interface::ISRC5",
7760
- "items": [
7761
- {
7762
- "type": "function",
7763
- "name": "supports_interface",
7764
- "inputs": [{ "name": "interface_id", "type": "core::felt252" }],
7765
- "outputs": [{ "type": "core::bool" }],
7766
- "state_mutability": "view"
7767
- }
7768
- ]
7769
- },
7770
- {
7771
- "type": "constructor",
7772
- "name": "constructor",
7773
- "inputs": [
7774
- { "name": "collection_class_hash", "type": "core::starknet::class_hash::ClassHash" }
7775
- ]
7776
- },
7777
- {
7778
- "type": "event",
7779
- "name": "openzeppelin_introspection::src5::SRC5Component::Event",
7780
- "kind": "enum",
7781
- "variants": []
7782
- },
7783
- {
7784
- "type": "event",
7785
- "name": "ip_club::IPClubFactory::IPClubFactory::ClubDeployed",
7786
- "kind": "struct",
7787
- "members": [
7788
- { "name": "collection_address", "type": "core::starknet::contract_address::ContractAddress", "kind": "key" },
7789
- { "name": "owner", "type": "core::starknet::contract_address::ContractAddress", "kind": "key" },
7790
- { "name": "name", "type": "core::byte_array::ByteArray", "kind": "data" },
7791
- { "name": "symbol", "type": "core::byte_array::ByteArray", "kind": "data" }
7792
- ]
7793
- },
7794
- {
7795
- "type": "event",
7796
- "name": "ip_club::IPClubFactory::IPClubFactory::Event",
7797
- "kind": "enum",
7798
- "variants": [
7799
- { "name": "SRC5Event", "type": "openzeppelin_introspection::src5::SRC5Component::Event", "kind": "flat" },
7800
- { "name": "ClubDeployed", "type": "ip_club::IPClubFactory::IPClubFactory::ClubDeployed", "kind": "nested" }
7801
- ]
7802
- }
7803
- ];
7804
-
7805
- // src/starknet/abis/ipClubCollection.ts
7806
- var IPClubCollectionABI = [
7807
- {
7808
- "type": "impl",
7809
- "name": "ERC721MetadataImpl",
7810
- "interface_name": "openzeppelin_token::erc721::interface::IERC721Metadata"
7811
- },
7812
- {
7813
- "type": "struct",
7814
- "name": "core::byte_array::ByteArray",
7815
- "members": [
7816
- {
7817
- "name": "data",
7818
- "type": "core::array::Array::<core::bytes_31::bytes31>"
7819
- },
7820
- {
7821
- "name": "pending_word",
7822
- "type": "core::felt252"
7823
- },
7824
- {
7825
- "name": "pending_word_len",
7826
- "type": "core::internal::bounded_int::BoundedInt::<0, 30>"
7827
- }
7828
- ]
7829
- },
7830
- {
7831
- "type": "struct",
7832
- "name": "core::integer::u256",
6770
+ "type": "struct",
6771
+ "name": "core::integer::u256",
7833
6772
  "members": [
7834
6773
  {
7835
6774
  "name": "low",
@@ -7842,64 +6781,33 @@ var IPClubCollectionABI = [
7842
6781
  ]
7843
6782
  },
7844
6783
  {
7845
- "type": "interface",
7846
- "name": "openzeppelin_token::erc721::interface::IERC721Metadata",
7847
- "items": [
7848
- {
7849
- "type": "function",
7850
- "name": "name",
7851
- "inputs": [],
7852
- "outputs": [
7853
- {
7854
- "type": "core::byte_array::ByteArray"
7855
- }
7856
- ],
7857
- "state_mutability": "view"
7858
- },
7859
- {
7860
- "type": "function",
7861
- "name": "symbol",
7862
- "inputs": [],
7863
- "outputs": [
7864
- {
7865
- "type": "core::byte_array::ByteArray"
7866
- }
7867
- ],
7868
- "state_mutability": "view"
7869
- },
7870
- {
7871
- "type": "function",
7872
- "name": "token_uri",
7873
- "inputs": [
7874
- {
7875
- "name": "token_id",
7876
- "type": "core::integer::u256"
7877
- }
7878
- ],
7879
- "outputs": [
7880
- {
7881
- "type": "core::byte_array::ByteArray"
7882
- }
7883
- ],
7884
- "state_mutability": "view"
7885
- }
7886
- ]
7887
- },
7888
- {
7889
- "type": "impl",
7890
- "name": "ERC721MetadataCamelOnlyImpl",
7891
- "interface_name": "openzeppelin_token::erc721::interface::IERC721MetadataCamelOnly"
6784
+ "type": "struct",
6785
+ "name": "core::byte_array::ByteArray",
6786
+ "members": [
6787
+ {
6788
+ "name": "data",
6789
+ "type": "core::array::Array::<core::bytes_31::bytes31>"
6790
+ },
6791
+ {
6792
+ "name": "pending_word",
6793
+ "type": "core::felt252"
6794
+ },
6795
+ {
6796
+ "name": "pending_word_len",
6797
+ "type": "core::internal::bounded_int::BoundedInt::<0, 30>"
6798
+ }
6799
+ ]
7892
6800
  },
7893
6801
  {
7894
6802
  "type": "interface",
7895
- "name": "openzeppelin_token::erc721::interface::IERC721MetadataCamelOnly",
6803
+ "name": "openzeppelin_token::erc1155::interface::IERC1155MetadataURI",
7896
6804
  "items": [
7897
6805
  {
7898
6806
  "type": "function",
7899
- "name": "tokenURI",
6807
+ "name": "uri",
7900
6808
  "inputs": [
7901
6809
  {
7902
- "name": "tokenId",
6810
+ "name": "token_id",
7903
6811
  "type": "core::integer::u256"
7904
6812
  }
7905
6813
  ],
@@ -7917,6 +6825,20 @@ var IPClubCollectionABI = [
7917
6825
  "name": "IPClubCollectionImpl",
7918
6826
  "interface_name": "ip_club::interface::IIPClubCollection"
7919
6827
  },
6828
+ {
6829
+ "type": "enum",
6830
+ "name": "core::option::Option::<core::integer::u64>",
6831
+ "variants": [
6832
+ {
6833
+ "name": "Some",
6834
+ "type": "core::integer::u64"
6835
+ },
6836
+ {
6837
+ "name": "None",
6838
+ "type": "()"
6839
+ }
6840
+ ]
6841
+ },
7920
6842
  {
7921
6843
  "type": "enum",
7922
6844
  "name": "core::bool",
@@ -7932,16 +6854,32 @@ var IPClubCollectionABI = [
7932
6854
  ]
7933
6855
  },
7934
6856
  {
7935
- "type": "enum",
7936
- "name": "core::option::Option::<core::starknet::contract_address::ContractAddress>",
7937
- "variants": [
6857
+ "type": "struct",
6858
+ "name": "ip_club::types::Membership",
6859
+ "members": [
7938
6860
  {
7939
- "name": "Some",
7940
- "type": "core::starknet::contract_address::ContractAddress"
6861
+ "name": "max_supply",
6862
+ "type": "core::integer::u256"
7941
6863
  },
7942
6864
  {
7943
- "name": "None",
7944
- "type": "()"
6865
+ "name": "minted",
6866
+ "type": "core::integer::u256"
6867
+ },
6868
+ {
6869
+ "name": "start_time",
6870
+ "type": "core::option::Option::<core::integer::u64>"
6871
+ },
6872
+ {
6873
+ "name": "end_time",
6874
+ "type": "core::option::Option::<core::integer::u64>"
6875
+ },
6876
+ {
6877
+ "name": "royalty_bps",
6878
+ "type": "core::integer::u16"
6879
+ },
6880
+ {
6881
+ "name": "metadata_uri",
6882
+ "type": "core::byte_array::ByteArray"
7945
6883
  }
7946
6884
  ]
7947
6885
  },
@@ -7951,11 +6889,27 @@ var IPClubCollectionABI = [
7951
6889
  "items": [
7952
6890
  {
7953
6891
  "type": "function",
7954
- "name": "mint",
6892
+ "name": "create_membership",
7955
6893
  "inputs": [
7956
6894
  {
7957
- "name": "to",
7958
- "type": "core::starknet::contract_address::ContractAddress"
6895
+ "name": "max_supply",
6896
+ "type": "core::integer::u256"
6897
+ },
6898
+ {
6899
+ "name": "start_time",
6900
+ "type": "core::option::Option::<core::integer::u64>"
6901
+ },
6902
+ {
6903
+ "name": "end_time",
6904
+ "type": "core::option::Option::<core::integer::u64>"
6905
+ },
6906
+ {
6907
+ "name": "royalty_bps",
6908
+ "type": "core::integer::u16"
6909
+ },
6910
+ {
6911
+ "name": "metadata_uri",
6912
+ "type": "core::byte_array::ByteArray"
7959
6913
  }
7960
6914
  ],
7961
6915
  "outputs": [
@@ -7967,11 +6921,19 @@ var IPClubCollectionABI = [
7967
6921
  },
7968
6922
  {
7969
6923
  "type": "function",
7970
- "name": "set_open",
6924
+ "name": "mint",
7971
6925
  "inputs": [
7972
6926
  {
7973
- "name": "open",
7974
- "type": "core::bool"
6927
+ "name": "to",
6928
+ "type": "core::starknet::contract_address::ContractAddress"
6929
+ },
6930
+ {
6931
+ "name": "token_id",
6932
+ "type": "core::integer::u256"
6933
+ },
6934
+ {
6935
+ "name": "amount",
6936
+ "type": "core::integer::u256"
7975
6937
  }
7976
6938
  ],
7977
6939
  "outputs": [],
@@ -7979,66 +6941,85 @@ var IPClubCollectionABI = [
7979
6941
  },
7980
6942
  {
7981
6943
  "type": "function",
7982
- "name": "base_uri",
7983
- "inputs": [],
6944
+ "name": "is_member",
6945
+ "inputs": [
6946
+ {
6947
+ "name": "holder",
6948
+ "type": "core::starknet::contract_address::ContractAddress"
6949
+ }
6950
+ ],
7984
6951
  "outputs": [
7985
6952
  {
7986
- "type": "core::byte_array::ByteArray"
6953
+ "type": "core::bool"
7987
6954
  }
7988
6955
  ],
7989
6956
  "state_mutability": "view"
7990
6957
  },
7991
6958
  {
7992
6959
  "type": "function",
7993
- "name": "entry_fee",
7994
- "inputs": [],
7995
- "outputs": [
6960
+ "name": "is_member_of",
6961
+ "inputs": [
7996
6962
  {
6963
+ "name": "token_id",
7997
6964
  "type": "core::integer::u256"
6965
+ },
6966
+ {
6967
+ "name": "holder",
6968
+ "type": "core::starknet::contract_address::ContractAddress"
6969
+ }
6970
+ ],
6971
+ "outputs": [
6972
+ {
6973
+ "type": "core::bool"
7998
6974
  }
7999
6975
  ],
8000
6976
  "state_mutability": "view"
8001
6977
  },
8002
6978
  {
8003
6979
  "type": "function",
8004
- "name": "payment_token",
8005
- "inputs": [],
6980
+ "name": "get_membership",
6981
+ "inputs": [
6982
+ {
6983
+ "name": "token_id",
6984
+ "type": "core::integer::u256"
6985
+ }
6986
+ ],
8006
6987
  "outputs": [
8007
6988
  {
8008
- "type": "core::option::Option::<core::starknet::contract_address::ContractAddress>"
6989
+ "type": "ip_club::types::Membership"
8009
6990
  }
8010
6991
  ],
8011
6992
  "state_mutability": "view"
8012
6993
  },
8013
6994
  {
8014
6995
  "type": "function",
8015
- "name": "max_supply",
6996
+ "name": "name",
8016
6997
  "inputs": [],
8017
6998
  "outputs": [
8018
6999
  {
8019
- "type": "core::integer::u256"
7000
+ "type": "core::byte_array::ByteArray"
8020
7001
  }
8021
7002
  ],
8022
7003
  "state_mutability": "view"
8023
7004
  },
8024
7005
  {
8025
7006
  "type": "function",
8026
- "name": "total_minted",
7007
+ "name": "symbol",
8027
7008
  "inputs": [],
8028
7009
  "outputs": [
8029
7010
  {
8030
- "type": "core::integer::u256"
7011
+ "type": "core::byte_array::ByteArray"
8031
7012
  }
8032
7013
  ],
8033
7014
  "state_mutability": "view"
8034
7015
  },
8035
7016
  {
8036
7017
  "type": "function",
8037
- "name": "is_open",
7018
+ "name": "base_uri",
8038
7019
  "inputs": [],
8039
7020
  "outputs": [
8040
7021
  {
8041
- "type": "core::bool"
7022
+ "type": "core::byte_array::ByteArray"
8042
7023
  }
8043
7024
  ],
8044
7025
  "state_mutability": "view"
@@ -8098,8 +7079,28 @@ var IPClubCollectionABI = [
8098
7079
  },
8099
7080
  {
8100
7081
  "type": "impl",
8101
- "name": "ERC721Impl",
8102
- "interface_name": "openzeppelin_token::erc721::interface::IERC721"
7082
+ "name": "ERC1155Impl",
7083
+ "interface_name": "openzeppelin_token::erc1155::interface::IERC1155"
7084
+ },
7085
+ {
7086
+ "type": "struct",
7087
+ "name": "core::array::Span::<core::starknet::contract_address::ContractAddress>",
7088
+ "members": [
7089
+ {
7090
+ "name": "snapshot",
7091
+ "type": "@core::array::Array::<core::starknet::contract_address::ContractAddress>"
7092
+ }
7093
+ ]
7094
+ },
7095
+ {
7096
+ "type": "struct",
7097
+ "name": "core::array::Span::<core::integer::u256>",
7098
+ "members": [
7099
+ {
7100
+ "name": "snapshot",
7101
+ "type": "@core::array::Array::<core::integer::u256>"
7102
+ }
7103
+ ]
8103
7104
  },
8104
7105
  {
8105
7106
  "type": "struct",
@@ -8113,7 +7114,7 @@ var IPClubCollectionABI = [
8113
7114
  },
8114
7115
  {
8115
7116
  "type": "interface",
8116
- "name": "openzeppelin_token::erc721::interface::IERC721",
7117
+ "name": "openzeppelin_token::erc1155::interface::IERC1155",
8117
7118
  "items": [
8118
7119
  {
8119
7120
  "type": "function",
@@ -8122,6 +7123,10 @@ var IPClubCollectionABI = [
8122
7123
  {
8123
7124
  "name": "account",
8124
7125
  "type": "core::starknet::contract_address::ContractAddress"
7126
+ },
7127
+ {
7128
+ "name": "token_id",
7129
+ "type": "core::integer::u256"
8125
7130
  }
8126
7131
  ],
8127
7132
  "outputs": [
@@ -8133,16 +7138,20 @@ var IPClubCollectionABI = [
8133
7138
  },
8134
7139
  {
8135
7140
  "type": "function",
8136
- "name": "owner_of",
7141
+ "name": "balance_of_batch",
8137
7142
  "inputs": [
8138
7143
  {
8139
- "name": "token_id",
8140
- "type": "core::integer::u256"
7144
+ "name": "accounts",
7145
+ "type": "core::array::Span::<core::starknet::contract_address::ContractAddress>"
7146
+ },
7147
+ {
7148
+ "name": "token_ids",
7149
+ "type": "core::array::Span::<core::integer::u256>"
8141
7150
  }
8142
7151
  ],
8143
7152
  "outputs": [
8144
7153
  {
8145
- "type": "core::starknet::contract_address::ContractAddress"
7154
+ "type": "core::array::Span::<core::integer::u256>"
8146
7155
  }
8147
7156
  ],
8148
7157
  "state_mutability": "view"
@@ -8163,6 +7172,10 @@ var IPClubCollectionABI = [
8163
7172
  "name": "token_id",
8164
7173
  "type": "core::integer::u256"
8165
7174
  },
7175
+ {
7176
+ "name": "value",
7177
+ "type": "core::integer::u256"
7178
+ },
8166
7179
  {
8167
7180
  "name": "data",
8168
7181
  "type": "core::array::Span::<core::felt252>"
@@ -8173,7 +7186,7 @@ var IPClubCollectionABI = [
8173
7186
  },
8174
7187
  {
8175
7188
  "type": "function",
8176
- "name": "transfer_from",
7189
+ "name": "safe_batch_transfer_from",
8177
7190
  "inputs": [
8178
7191
  {
8179
7192
  "name": "from",
@@ -8184,24 +7197,16 @@ var IPClubCollectionABI = [
8184
7197
  "type": "core::starknet::contract_address::ContractAddress"
8185
7198
  },
8186
7199
  {
8187
- "name": "token_id",
8188
- "type": "core::integer::u256"
8189
- }
8190
- ],
8191
- "outputs": [],
8192
- "state_mutability": "external"
8193
- },
8194
- {
8195
- "type": "function",
8196
- "name": "approve",
8197
- "inputs": [
7200
+ "name": "token_ids",
7201
+ "type": "core::array::Span::<core::integer::u256>"
7202
+ },
8198
7203
  {
8199
- "name": "to",
8200
- "type": "core::starknet::contract_address::ContractAddress"
7204
+ "name": "values",
7205
+ "type": "core::array::Span::<core::integer::u256>"
8201
7206
  },
8202
7207
  {
8203
- "name": "token_id",
8204
- "type": "core::integer::u256"
7208
+ "name": "data",
7209
+ "type": "core::array::Span::<core::felt252>"
8205
7210
  }
8206
7211
  ],
8207
7212
  "outputs": [],
@@ -8209,66 +7214,50 @@ var IPClubCollectionABI = [
8209
7214
  },
8210
7215
  {
8211
7216
  "type": "function",
8212
- "name": "set_approval_for_all",
7217
+ "name": "is_approved_for_all",
8213
7218
  "inputs": [
8214
7219
  {
8215
- "name": "operator",
7220
+ "name": "owner",
8216
7221
  "type": "core::starknet::contract_address::ContractAddress"
8217
7222
  },
8218
7223
  {
8219
- "name": "approved",
8220
- "type": "core::bool"
8221
- }
8222
- ],
8223
- "outputs": [],
8224
- "state_mutability": "external"
8225
- },
8226
- {
8227
- "type": "function",
8228
- "name": "get_approved",
8229
- "inputs": [
8230
- {
8231
- "name": "token_id",
8232
- "type": "core::integer::u256"
7224
+ "name": "operator",
7225
+ "type": "core::starknet::contract_address::ContractAddress"
8233
7226
  }
8234
7227
  ],
8235
7228
  "outputs": [
8236
7229
  {
8237
- "type": "core::starknet::contract_address::ContractAddress"
7230
+ "type": "core::bool"
8238
7231
  }
8239
7232
  ],
8240
7233
  "state_mutability": "view"
8241
7234
  },
8242
7235
  {
8243
7236
  "type": "function",
8244
- "name": "is_approved_for_all",
7237
+ "name": "set_approval_for_all",
8245
7238
  "inputs": [
8246
- {
8247
- "name": "owner",
8248
- "type": "core::starknet::contract_address::ContractAddress"
8249
- },
8250
7239
  {
8251
7240
  "name": "operator",
8252
7241
  "type": "core::starknet::contract_address::ContractAddress"
8253
- }
8254
- ],
8255
- "outputs": [
7242
+ },
8256
7243
  {
7244
+ "name": "approved",
8257
7245
  "type": "core::bool"
8258
7246
  }
8259
7247
  ],
8260
- "state_mutability": "view"
7248
+ "outputs": [],
7249
+ "state_mutability": "external"
8261
7250
  }
8262
7251
  ]
8263
7252
  },
8264
7253
  {
8265
7254
  "type": "impl",
8266
- "name": "ERC721CamelOnly",
8267
- "interface_name": "openzeppelin_token::erc721::interface::IERC721CamelOnly"
7255
+ "name": "ERC1155CamelImpl",
7256
+ "interface_name": "openzeppelin_token::erc1155::interface::IERC1155Camel"
8268
7257
  },
8269
7258
  {
8270
7259
  "type": "interface",
8271
- "name": "openzeppelin_token::erc721::interface::IERC721CamelOnly",
7260
+ "name": "openzeppelin_token::erc1155::interface::IERC1155Camel",
8272
7261
  "items": [
8273
7262
  {
8274
7263
  "type": "function",
@@ -8277,6 +7266,10 @@ var IPClubCollectionABI = [
8277
7266
  {
8278
7267
  "name": "account",
8279
7268
  "type": "core::starknet::contract_address::ContractAddress"
7269
+ },
7270
+ {
7271
+ "name": "tokenId",
7272
+ "type": "core::integer::u256"
8280
7273
  }
8281
7274
  ],
8282
7275
  "outputs": [
@@ -8288,16 +7281,20 @@ var IPClubCollectionABI = [
8288
7281
  },
8289
7282
  {
8290
7283
  "type": "function",
8291
- "name": "ownerOf",
7284
+ "name": "balanceOfBatch",
8292
7285
  "inputs": [
8293
7286
  {
8294
- "name": "tokenId",
8295
- "type": "core::integer::u256"
7287
+ "name": "accounts",
7288
+ "type": "core::array::Span::<core::starknet::contract_address::ContractAddress>"
7289
+ },
7290
+ {
7291
+ "name": "tokenIds",
7292
+ "type": "core::array::Span::<core::integer::u256>"
8296
7293
  }
8297
7294
  ],
8298
7295
  "outputs": [
8299
7296
  {
8300
- "type": "core::starknet::contract_address::ContractAddress"
7297
+ "type": "core::array::Span::<core::integer::u256>"
8301
7298
  }
8302
7299
  ],
8303
7300
  "state_mutability": "view"
@@ -8318,6 +7315,10 @@ var IPClubCollectionABI = [
8318
7315
  "name": "tokenId",
8319
7316
  "type": "core::integer::u256"
8320
7317
  },
7318
+ {
7319
+ "name": "value",
7320
+ "type": "core::integer::u256"
7321
+ },
8321
7322
  {
8322
7323
  "name": "data",
8323
7324
  "type": "core::array::Span::<core::felt252>"
@@ -8328,7 +7329,7 @@ var IPClubCollectionABI = [
8328
7329
  },
8329
7330
  {
8330
7331
  "type": "function",
8331
- "name": "transferFrom",
7332
+ "name": "safeBatchTransferFrom",
8332
7333
  "inputs": [
8333
7334
  {
8334
7335
  "name": "from",
@@ -8339,24 +7340,16 @@ var IPClubCollectionABI = [
8339
7340
  "type": "core::starknet::contract_address::ContractAddress"
8340
7341
  },
8341
7342
  {
8342
- "name": "tokenId",
8343
- "type": "core::integer::u256"
8344
- }
8345
- ],
8346
- "outputs": [],
8347
- "state_mutability": "external"
8348
- },
8349
- {
8350
- "type": "function",
8351
- "name": "setApprovalForAll",
8352
- "inputs": [
7343
+ "name": "tokenIds",
7344
+ "type": "core::array::Span::<core::integer::u256>"
7345
+ },
8353
7346
  {
8354
- "name": "operator",
8355
- "type": "core::starknet::contract_address::ContractAddress"
7347
+ "name": "values",
7348
+ "type": "core::array::Span::<core::integer::u256>"
8356
7349
  },
8357
7350
  {
8358
- "name": "approved",
8359
- "type": "core::bool"
7351
+ "name": "data",
7352
+ "type": "core::array::Span::<core::felt252>"
8360
7353
  }
8361
7354
  ],
8362
7355
  "outputs": [],
@@ -8364,39 +7357,39 @@ var IPClubCollectionABI = [
8364
7357
  },
8365
7358
  {
8366
7359
  "type": "function",
8367
- "name": "getApproved",
7360
+ "name": "isApprovedForAll",
8368
7361
  "inputs": [
8369
7362
  {
8370
- "name": "tokenId",
8371
- "type": "core::integer::u256"
7363
+ "name": "owner",
7364
+ "type": "core::starknet::contract_address::ContractAddress"
7365
+ },
7366
+ {
7367
+ "name": "operator",
7368
+ "type": "core::starknet::contract_address::ContractAddress"
8372
7369
  }
8373
7370
  ],
8374
7371
  "outputs": [
8375
7372
  {
8376
- "type": "core::starknet::contract_address::ContractAddress"
7373
+ "type": "core::bool"
8377
7374
  }
8378
7375
  ],
8379
7376
  "state_mutability": "view"
8380
7377
  },
8381
7378
  {
8382
7379
  "type": "function",
8383
- "name": "isApprovedForAll",
7380
+ "name": "setApprovalForAll",
8384
7381
  "inputs": [
8385
- {
8386
- "name": "owner",
8387
- "type": "core::starknet::contract_address::ContractAddress"
8388
- },
8389
7382
  {
8390
7383
  "name": "operator",
8391
7384
  "type": "core::starknet::contract_address::ContractAddress"
8392
- }
8393
- ],
8394
- "outputs": [
7385
+ },
8395
7386
  {
7387
+ "name": "approved",
8396
7388
  "type": "core::bool"
8397
7389
  }
8398
7390
  ],
8399
- "state_mutability": "view"
7391
+ "outputs": [],
7392
+ "state_mutability": "external"
8400
7393
  }
8401
7394
  ]
8402
7395
  },
@@ -8503,22 +7496,6 @@ var IPClubCollectionABI = [
8503
7496
  "name": "base_uri",
8504
7497
  "type": "core::byte_array::ByteArray"
8505
7498
  },
8506
- {
8507
- "name": "max_supply",
8508
- "type": "core::integer::u256"
8509
- },
8510
- {
8511
- "name": "entry_fee",
8512
- "type": "core::integer::u256"
8513
- },
8514
- {
8515
- "name": "payment_token",
8516
- "type": "core::option::Option::<core::starknet::contract_address::ContractAddress>"
8517
- },
8518
- {
8519
- "name": "royalty_bps",
8520
- "type": "core::integer::u256"
8521
- },
8522
7499
  {
8523
7500
  "name": "owner",
8524
7501
  "type": "core::starknet::contract_address::ContractAddress"
@@ -8527,9 +7504,14 @@ var IPClubCollectionABI = [
8527
7504
  },
8528
7505
  {
8529
7506
  "type": "event",
8530
- "name": "openzeppelin_token::erc721::erc721::ERC721Component::Transfer",
7507
+ "name": "openzeppelin_token::erc1155::erc1155::ERC1155Component::TransferSingle",
8531
7508
  "kind": "struct",
8532
7509
  "members": [
7510
+ {
7511
+ "name": "operator",
7512
+ "type": "core::starknet::contract_address::ContractAddress",
7513
+ "kind": "key"
7514
+ },
8533
7515
  {
8534
7516
  "name": "from",
8535
7517
  "type": "core::starknet::contract_address::ContractAddress",
@@ -8541,37 +7523,52 @@ var IPClubCollectionABI = [
8541
7523
  "kind": "key"
8542
7524
  },
8543
7525
  {
8544
- "name": "token_id",
7526
+ "name": "id",
8545
7527
  "type": "core::integer::u256",
8546
- "kind": "key"
7528
+ "kind": "data"
7529
+ },
7530
+ {
7531
+ "name": "value",
7532
+ "type": "core::integer::u256",
7533
+ "kind": "data"
8547
7534
  }
8548
7535
  ]
8549
7536
  },
8550
7537
  {
8551
7538
  "type": "event",
8552
- "name": "openzeppelin_token::erc721::erc721::ERC721Component::Approval",
7539
+ "name": "openzeppelin_token::erc1155::erc1155::ERC1155Component::TransferBatch",
8553
7540
  "kind": "struct",
8554
7541
  "members": [
8555
7542
  {
8556
- "name": "owner",
7543
+ "name": "operator",
8557
7544
  "type": "core::starknet::contract_address::ContractAddress",
8558
7545
  "kind": "key"
8559
7546
  },
8560
7547
  {
8561
- "name": "approved",
7548
+ "name": "from",
8562
7549
  "type": "core::starknet::contract_address::ContractAddress",
8563
7550
  "kind": "key"
8564
7551
  },
8565
7552
  {
8566
- "name": "token_id",
8567
- "type": "core::integer::u256",
7553
+ "name": "to",
7554
+ "type": "core::starknet::contract_address::ContractAddress",
8568
7555
  "kind": "key"
7556
+ },
7557
+ {
7558
+ "name": "ids",
7559
+ "type": "core::array::Span::<core::integer::u256>",
7560
+ "kind": "data"
7561
+ },
7562
+ {
7563
+ "name": "values",
7564
+ "type": "core::array::Span::<core::integer::u256>",
7565
+ "kind": "data"
8569
7566
  }
8570
7567
  ]
8571
7568
  },
8572
7569
  {
8573
7570
  "type": "event",
8574
- "name": "openzeppelin_token::erc721::erc721::ERC721Component::ApprovalForAll",
7571
+ "name": "openzeppelin_token::erc1155::erc1155::ERC1155Component::ApprovalForAll",
8575
7572
  "kind": "struct",
8576
7573
  "members": [
8577
7574
  {
@@ -8593,22 +7590,44 @@ var IPClubCollectionABI = [
8593
7590
  },
8594
7591
  {
8595
7592
  "type": "event",
8596
- "name": "openzeppelin_token::erc721::erc721::ERC721Component::Event",
7593
+ "name": "openzeppelin_token::erc1155::erc1155::ERC1155Component::URI",
7594
+ "kind": "struct",
7595
+ "members": [
7596
+ {
7597
+ "name": "value",
7598
+ "type": "core::byte_array::ByteArray",
7599
+ "kind": "data"
7600
+ },
7601
+ {
7602
+ "name": "id",
7603
+ "type": "core::integer::u256",
7604
+ "kind": "key"
7605
+ }
7606
+ ]
7607
+ },
7608
+ {
7609
+ "type": "event",
7610
+ "name": "openzeppelin_token::erc1155::erc1155::ERC1155Component::Event",
8597
7611
  "kind": "enum",
8598
7612
  "variants": [
8599
7613
  {
8600
- "name": "Transfer",
8601
- "type": "openzeppelin_token::erc721::erc721::ERC721Component::Transfer",
7614
+ "name": "TransferSingle",
7615
+ "type": "openzeppelin_token::erc1155::erc1155::ERC1155Component::TransferSingle",
8602
7616
  "kind": "nested"
8603
7617
  },
8604
7618
  {
8605
- "name": "Approval",
8606
- "type": "openzeppelin_token::erc721::erc721::ERC721Component::Approval",
7619
+ "name": "TransferBatch",
7620
+ "type": "openzeppelin_token::erc1155::erc1155::ERC1155Component::TransferBatch",
8607
7621
  "kind": "nested"
8608
7622
  },
8609
7623
  {
8610
7624
  "name": "ApprovalForAll",
8611
- "type": "openzeppelin_token::erc721::erc721::ERC721Component::ApprovalForAll",
7625
+ "type": "openzeppelin_token::erc1155::erc1155::ERC1155Component::ApprovalForAll",
7626
+ "kind": "nested"
7627
+ },
7628
+ {
7629
+ "name": "URI",
7630
+ "type": "openzeppelin_token::erc1155::erc1155::ERC1155Component::URI",
8612
7631
  "kind": "nested"
8613
7632
  }
8614
7633
  ]
@@ -8672,7 +7691,7 @@ var IPClubCollectionABI = [
8672
7691
  },
8673
7692
  {
8674
7693
  "type": "event",
8675
- "name": "ip_club::IPClubCollection::IPClubCollection::MemberMinted",
7694
+ "name": "ip_club::IPClubCollection::IPClubCollection::MembershipCreated",
8676
7695
  "kind": "struct",
8677
7696
  "members": [
8678
7697
  {
@@ -8681,25 +7700,28 @@ var IPClubCollectionABI = [
8681
7700
  "kind": "key"
8682
7701
  },
8683
7702
  {
8684
- "name": "to",
8685
- "type": "core::starknet::contract_address::ContractAddress",
8686
- "kind": "key"
7703
+ "name": "max_supply",
7704
+ "type": "core::integer::u256",
7705
+ "kind": "data"
8687
7706
  },
8688
7707
  {
8689
- "name": "payer",
8690
- "type": "core::starknet::contract_address::ContractAddress",
7708
+ "name": "start_time",
7709
+ "type": "core::option::Option::<core::integer::u64>",
8691
7710
  "kind": "data"
8692
- }
8693
- ]
8694
- },
8695
- {
8696
- "type": "event",
8697
- "name": "ip_club::IPClubCollection::IPClubCollection::OpenStatusChanged",
8698
- "kind": "struct",
8699
- "members": [
7711
+ },
8700
7712
  {
8701
- "name": "open",
8702
- "type": "core::bool",
7713
+ "name": "end_time",
7714
+ "type": "core::option::Option::<core::integer::u64>",
7715
+ "kind": "data"
7716
+ },
7717
+ {
7718
+ "name": "metadata_uri",
7719
+ "type": "core::byte_array::ByteArray",
7720
+ "kind": "data"
7721
+ },
7722
+ {
7723
+ "name": "created_at",
7724
+ "type": "core::integer::u64",
8703
7725
  "kind": "data"
8704
7726
  }
8705
7727
  ]
@@ -8710,8 +7732,8 @@ var IPClubCollectionABI = [
8710
7732
  "kind": "enum",
8711
7733
  "variants": [
8712
7734
  {
8713
- "name": "ERC721Event",
8714
- "type": "openzeppelin_token::erc721::erc721::ERC721Component::Event",
7735
+ "name": "ERC1155Event",
7736
+ "type": "openzeppelin_token::erc1155::erc1155::ERC1155Component::Event",
8715
7737
  "kind": "flat"
8716
7738
  },
8717
7739
  {
@@ -8725,13 +7747,8 @@ var IPClubCollectionABI = [
8725
7747
  "kind": "flat"
8726
7748
  },
8727
7749
  {
8728
- "name": "MemberMinted",
8729
- "type": "ip_club::IPClubCollection::IPClubCollection::MemberMinted",
8730
- "kind": "nested"
8731
- },
8732
- {
8733
- "name": "OpenStatusChanged",
8734
- "type": "ip_club::IPClubCollection::IPClubCollection::OpenStatusChanged",
7750
+ "name": "MembershipCreated",
7751
+ "type": "ip_club::IPClubCollection::IPClubCollection::MembershipCreated",
8735
7752
  "kind": "nested"
8736
7753
  }
8737
7754
  ]
@@ -11533,121 +10550,90 @@ var TicketService = class {
11533
10550
  };
11534
10551
  var ClubService = class {
11535
10552
  constructor(config) {
11536
- const coords = getStarknetCoordinates(config.chain);
11537
- this.registryAddress = coords.ipClubRegistry;
11538
- this.factoryAddress = coords.ipClubFactory;
11539
- }
11540
- _registry(account, registryAddress) {
11541
- const address = registryAddress ?? this.registryAddress;
11542
- if (!address) throw new Error("IP-Club registry address not configured for this chain");
11543
- return newContract(IPClubABI, normalizeAddress("STARKNET", address), account);
10553
+ this.config = config;
10554
+ this.factoryAddress = getStarknetCoordinates(config.chain).ipClubFactory;
11544
10555
  }
11545
10556
  _factory(account, factoryAddress) {
11546
10557
  const address = factoryAddress ?? this.factoryAddress;
11547
10558
  if (!address) throw new Error("IP-Club factory address not configured for this chain");
11548
10559
  return newContract(IPClubFactoryABI, normalizeAddress("STARKNET", address), account);
11549
10560
  }
11550
- _collection(account, collectionAddress) {
11551
- return newContract(IPClubCollectionABI, normalizeAddress("STARKNET", collectionAddress), account);
10561
+ _collection(address, account) {
10562
+ return newContract(IPClubCollectionABI, normalizeAddress("STARKNET", address), account);
10563
+ }
10564
+ _collectionRead(address) {
10565
+ const provider = new RpcProvider({ nodeUrl: this.config.rpcUrl });
10566
+ return newContract(IPClubCollectionABI, normalizeAddress("STARKNET", address), provider);
11552
10567
  }
11553
- /** Deploy a new per-creator membership ERC-721 collection via the factory. */
11554
- async deployClub(account, params) {
11555
- const maxSupply = cairo.uint256(params.maxSupply ?? 0xffffffffffffffffn);
11556
- const entryFee = cairo.uint256(params.entryFee ?? 0n);
11557
- const paymentToken = params.paymentToken ? new CairoOption(CairoOptionVariant.Some, params.paymentToken) : new CairoOption(CairoOptionVariant.None);
11558
- const royaltyBps = cairo.uint256(params.royaltyBps ?? 0n);
11559
- const call = this._factory(account, params.factoryAddress).populate("deploy_club", [
10568
+ /**
10569
+ * Deploys a new IPClubCollection via the factory. Caller becomes owner.
10570
+ * `baseUri` is the collection-level metadata URI, embedded on-chain in the
10571
+ * deploy transaction.
10572
+ */
10573
+ async deployCollection(account, params) {
10574
+ const call = this._factory(account, params.factoryAddress).populate("deploy_collection", [
11560
10575
  params.name,
11561
10576
  params.symbol,
11562
- params.baseUri,
11563
- maxSupply,
11564
- entryFee,
11565
- paymentToken,
11566
- royaltyBps
10577
+ params.baseUri
11567
10578
  ]);
11568
10579
  const res = await account.execute([call]);
11569
10580
  return { txHash: res.transaction_hash };
11570
10581
  }
11571
- /** Owner-only pause or resume new mints on a club collection. */
11572
- async setOpen(account, params) {
11573
- const call = this._collection(account, params.collectionAddress).populate("set_open", [params.open]);
10582
+ /** Owner-only. Creates a new membership tier inside the caller's deployed collection. */
10583
+ async createMembership(account, params) {
10584
+ const startTime = params.startTime != null ? new CairoOption(CairoOptionVariant.Some, params.startTime) : new CairoOption(CairoOptionVariant.None);
10585
+ const endTime = params.endTime != null ? new CairoOption(CairoOptionVariant.Some, params.endTime) : new CairoOption(CairoOptionVariant.None);
10586
+ const call = this._collection(params.collection, account).populate("create_membership", [
10587
+ cairo.uint256(params.maxSupply),
10588
+ startTime,
10589
+ endTime,
10590
+ params.royaltyBps,
10591
+ params.metadataUri
10592
+ ]);
11574
10593
  const res = await account.execute([call]);
11575
10594
  return { txHash: res.transaction_hash };
11576
10595
  }
11577
- /** Public mint — caller pays entry fee (if any) and receives the membership NFT. */
11578
- async mintMembership(account, params) {
11579
- const calls = [];
11580
- if (params.entryFee && params.paymentToken && BigInt(params.entryFee) > 0n) {
11581
- const amount = cairo.uint256(params.entryFee);
11582
- calls.push({
11583
- contractAddress: params.paymentToken,
11584
- entrypoint: "approve",
11585
- calldata: [
11586
- normalizeAddress("STARKNET", params.collectionAddress),
11587
- amount.low.toString(),
11588
- amount.high.toString()
11589
- ]
11590
- });
11591
- }
11592
- calls.push(
11593
- this._collection(account, params.collectionAddress).populate("mint", [
11594
- params.to ?? account.address
11595
- ])
11596
- );
11597
- const res = await account.execute(calls);
11598
- return { txHash: res.transaction_hash };
11599
- }
11600
- // ── Legacy registry methods (retained for backward compatibility) ──────────────
11601
- /** @deprecated Use deployClub — the factory pattern replaced the registry. */
11602
- async createClub(account, params) {
11603
- const maxMembers = params.maxMembers != null ? new CairoOption(CairoOptionVariant.Some, params.maxMembers) : new CairoOption(CairoOptionVariant.None);
11604
- const entryFee = params.entryFee != null ? new CairoOption(CairoOptionVariant.Some, cairo.uint256(params.entryFee)) : new CairoOption(CairoOptionVariant.None);
11605
- const paymentToken = params.paymentToken ? new CairoOption(CairoOptionVariant.Some, params.paymentToken) : new CairoOption(CairoOptionVariant.None);
11606
- const call = this._registry(account, params.registryAddress).populate("create_club", [
11607
- params.name,
11608
- params.symbol,
11609
- params.metadataUri,
11610
- maxMembers,
11611
- entryFee,
11612
- paymentToken
10596
+ /**
10597
+ * Owner-only. Mints `amount` of `tokenId` to `to`. The validity window
10598
+ * gates membership, never minting — future-window tiers mint fine.
10599
+ */
10600
+ async mint(account, params) {
10601
+ const call = this._collection(params.collection, account).populate("mint", [
10602
+ params.to,
10603
+ cairo.uint256(params.tokenId),
10604
+ cairo.uint256(params.amount)
11613
10605
  ]);
11614
10606
  const res = await account.execute([call]);
11615
10607
  return { txHash: res.transaction_hash };
11616
10608
  }
11617
- /** @deprecated Legacy registry use factory-deployed collection methods. */
11618
- async setClubOpen(account, params) {
11619
- const call = this._registry(account, params.registryAddress).populate("set_club_open", [
11620
- cairo.uint256(params.clubId),
11621
- params.open
10609
+ /** Read true if holder holds any tier currently inside its validity window. */
10610
+ async isMember(params) {
10611
+ const result = await this._collectionRead(params.collection).call("is_member", [
10612
+ params.holder
11622
10613
  ]);
11623
- const res = await account.execute([call]);
11624
- return { txHash: res.transaction_hash };
10614
+ return Boolean(result);
11625
10615
  }
11626
- /** @deprecated Legacy registry use mintMembership with factory-deployed collections. */
11627
- async joinClub(account, params) {
11628
- const registryAddress = params.registryAddress ?? this.registryAddress;
11629
- if (!registryAddress) throw new Error("IP-Club registry address not configured for this chain");
11630
- const calls = [];
11631
- if (params.paymentToken && params.entryFee && BigInt(params.entryFee) > 0n) {
11632
- const amount = cairo.uint256(params.entryFee);
11633
- calls.push({
11634
- contractAddress: params.paymentToken,
11635
- entrypoint: "approve",
11636
- calldata: [normalizeAddress("STARKNET", registryAddress), amount.low.toString(), amount.high.toString()]
11637
- });
11638
- }
11639
- calls.push(this._registry(account, registryAddress).populate("join_club", [cairo.uint256(params.clubId)]));
11640
- const res = await account.execute(calls);
11641
- return { txHash: res.transaction_hash };
10616
+ /** Read true if holder holds `tokenId` and the current time is inside its window. */
10617
+ async isMemberOf(params) {
10618
+ const result = await this._collectionRead(params.collection).call("is_member_of", [
10619
+ cairo.uint256(params.tokenId),
10620
+ params.holder
10621
+ ]);
10622
+ return Boolean(result);
11642
10623
  }
11643
- /** @deprecated Legacy registry use factory-deployed collection burn. */
11644
- async leaveClub(account, params) {
11645
- const call = this._registry(account, params.registryAddress).populate("leave_club", [
11646
- cairo.uint256(params.clubId),
10624
+ /** Read returns the Membership record for a token ID. */
10625
+ async getMembership(params) {
10626
+ const m = await this._collectionRead(params.collection).call("get_membership", [
11647
10627
  cairo.uint256(params.tokenId)
11648
10628
  ]);
11649
- const res = await account.execute([call]);
11650
- return { txHash: res.transaction_hash };
10629
+ return {
10630
+ maxSupply: BigInt(m.max_supply),
10631
+ minted: BigInt(m.minted),
10632
+ startTime: m.start_time?.variant === "Some" ? Number(m.start_time.values[0] ?? m.start_time.value) : null,
10633
+ endTime: m.end_time?.variant === "Some" ? Number(m.end_time.values[0] ?? m.end_time.value) : null,
10634
+ royaltyBps: Number(m.royalty_bps),
10635
+ metadataUri: m.metadata_uri
10636
+ };
11651
10637
  }
11652
10638
  };
11653
10639
  var SponsorshipService = class {
@@ -12678,6 +11664,6 @@ function encodeByteArray(str) {
12678
11664
  ];
12679
11665
  }
12680
11666
 
12681
- export { ADMIN_HEADERS, ADMIN_SCOPE, MAX_SUPPLY as COIN_MAX_SUPPLY, MIN_SUPPLY as COIN_MIN_SUPPLY, ClubService, CreatorCoinFactoryABI, CreatorCoinService, DropCollectionABI, DropFactoryABI, DropService, ERC1155CollectionService, IPClubABI, IPClubCollectionABI, IPClubFactoryABI, IPClubNFTABI, IPCollection1155ABI, IPCollection1155FactoryABI, IPCollectionABI, IPGenesisABI, IPMarketplaceABI, IPNftABI, IPSponsorshipABI, IPTicketCollectionABI, IPTicketCollectionFactoryABI, LAUNCH_PRICE_QUOTE_PER_COIN, Medialane1155ABI, MedialaneClient, MedialaneError, POPCollectionABI, POPFactoryABI, PopService, SponsorshipService, StarknetVenue, TicketService, VALIDATED_EKUBO_PARAMS, adminRequestDigest, build1155CancellationTypedData, build1155OrderTypedData, buildAdminSessionTypedData, buildCancellationTypedData, buildCreateCreatorCoinCall, buildFeeCall, buildLaunchOnEkuboCalls, buildOrderTypedData, buybackQuoteRaw, toRaw as coinToRaw, createAdminSessionGrant, encodeAdminHeaders, encodeByteArray, fdvHuman, getCounter, getCounter1155, getCreatorCoinPrice, getOrderDetails, getOrderDetails1155, getSiwsStorageKey, getStoredSiwsToken, isSiwsTokenValid, normalizeSiwsSignature, parseAdminHeaders, parseCreatorCoinCreated, randomNonce, requestSiwsToken, sessionKeyHashOf, signAdminRequest, storeSiwsToken, teamCoinsRaw, validateName as validateCoinName, validateSupply as validateCoinSupply, validateSymbol as validateCoinSymbol, verifyAdminRequestSig };
11667
+ export { ADMIN_HEADERS, ADMIN_SCOPE, MAX_SUPPLY as COIN_MAX_SUPPLY, MIN_SUPPLY as COIN_MIN_SUPPLY, ClubService, CreatorCoinFactoryABI, CreatorCoinService, DropCollectionABI, DropFactoryABI, DropService, ERC1155CollectionService, IPClubCollectionABI, IPClubFactoryABI, IPCollection1155ABI, IPCollection1155FactoryABI, IPCollectionABI, IPGenesisABI, IPMarketplaceABI, IPNftABI, IPSponsorshipABI, IPTicketCollectionABI, IPTicketCollectionFactoryABI, LAUNCH_PRICE_QUOTE_PER_COIN, Medialane1155ABI, MedialaneClient, MedialaneError, POPCollectionABI, POPFactoryABI, PopService, SponsorshipService, StarknetVenue, TicketService, VALIDATED_EKUBO_PARAMS, adminRequestDigest, build1155CancellationTypedData, build1155OrderTypedData, buildAdminSessionTypedData, buildCancellationTypedData, buildCreateCreatorCoinCall, buildFeeCall, buildLaunchOnEkuboCalls, buildOrderTypedData, buybackQuoteRaw, toRaw as coinToRaw, createAdminSessionGrant, encodeAdminHeaders, encodeByteArray, fdvHuman, getCounter, getCounter1155, getCreatorCoinPrice, getOrderDetails, getOrderDetails1155, getSiwsStorageKey, getStoredSiwsToken, isSiwsTokenValid, normalizeSiwsSignature, parseAdminHeaders, parseCreatorCoinCreated, randomNonce, requestSiwsToken, sessionKeyHashOf, signAdminRequest, storeSiwsToken, teamCoinsRaw, validateName as validateCoinName, validateSupply as validateCoinSupply, validateSymbol as validateCoinSymbol, verifyAdminRequestSig };
12682
11668
  //# sourceMappingURL=index.js.map
12683
11669
  //# sourceMappingURL=index.js.map