@medialane/sdk 0.67.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.
package/dist/index.js CHANGED
@@ -39,19 +39,18 @@ 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,
49
- ipSponsorship: "0x044d9b9c3bb29b94685b0a3fe27a5e2dfa30a3637ab55979c718ebcd3268bc2f",
50
- ipSponsorshipStartBlock: 11405085,
51
- // Dedicated ip-erc721/MIP instance for sponsorship receipts (class hash
52
- // 0x01bd7e39c5135b32b664e34cbbb4eafbd707a0fbc3ec2ef28657f52577d277d7) —
53
- // never the genesis-mint instance.
54
- ipSponsorshipLicense: "0x06bcfc4e97758a2abf95af4bd49596efdbfd88ccd740caddc56ad0a4bd095839"
42
+ ipClubFactory: "0x06a0b0be16d70c78f2e18119dbf90e5911cbfd5d8d484bc555dc61d96f56a2b9",
43
+ ipClubFactoryClassHash: "0x05d9d431bd3532b1fa4d5bab572f49c5ad8034ee3cc83951aa41ae82c9cad266",
44
+ ipClubCollectionClassHash: "0x05b8477c72e6bf0cf64967d71155021fd4d77d9a57e8805c6b40709121c002c5",
45
+ ipClubFactoryStartBlock: 11928775,
46
+ // v3 redesign (deployed 2026-07-15): single contract is both the
47
+ // offer/bid/proposal registry and the license collection (embeds
48
+ // ERC721Component directly) — no separate receipt contract, no
49
+ // set_minter bootstrap. Supersedes the 2026-07-02 v2 address, which had
50
+ // zero offers/licenses ever issued (clean cutover, no reclassification).
51
+ ipSponsorship: "0x03729ebe0fedf29ec97fca34db09174772af7f870af26a26e024a61040143e5c",
52
+ ipSponsorshipClassHash: "0x0626daac2ed7e2bf630ef5b10104b3202db1559216c0c1a504c0e99be2fbfec3",
53
+ ipSponsorshipStartBlock: 11896456
55
54
  }
56
55
  };
57
56
  function getCoordinates(chain) {
@@ -892,12 +891,10 @@ var STARKNET_DROP_COLLECTION_CLASS_HASH = SN.dropCollectionClassHash;
892
891
  var STARKNET_NFTCOMMENTS_CONTRACT = SN.nftComments;
893
892
  var STARKNET_IP_TICKETS_FACTORY_CONTRACT = SN.ipTicketsFactory;
894
893
  var STARKNET_IP_TICKET_COLLECTION_CLASS_HASH = SN.ipTicketCollectionClassHash;
895
- var STARKNET_IP_CLUB_REGISTRY_CONTRACT = SN.ipClubRegistry;
896
- var STARKNET_IP_CLUB_NFT_CLASS_HASH = SN.ipClubNftClassHash;
897
894
  var STARKNET_IP_CLUB_FACTORY_CONTRACT = SN.ipClubFactory;
898
895
  var STARKNET_IP_CLUB_COLLECTION_CLASS_HASH = SN.ipClubCollectionClassHash;
899
896
  var STARKNET_IP_SPONSORSHIP_CONTRACT = SN.ipSponsorship;
900
- var STARKNET_IP_SPONSORSHIP_LICENSE_CONTRACT = SN.ipSponsorshipLicense;
897
+ var STARKNET_IP_SPONSORSHIP_CLASS_HASH = SN.ipSponsorshipClassHash;
901
898
  var STARKNET_CREATOR_COIN_FACTORY_CONTRACT = SN.creatorCoinFactory;
902
899
  var STARKNET_CREATOR_COIN_EKUBO_LAUNCHER = SN.creatorCoinEkuboLauncher;
903
900
  var STARKNET_CREATOR_COIN_CLASS_HASH = SN.creatorCoinClassHash;
@@ -1060,13 +1057,20 @@ var SERVICES = {
1060
1057
  "ip-club": {
1061
1058
  id: "ip-club",
1062
1059
  displayName: "IP Club",
1063
- description: "Membership clubs with an on-chain NFT membership card.",
1064
- standard: "ERC721",
1060
+ description: "Membership clubs \u2014 create tiers, mint membership cards, trade like any collection.",
1061
+ standard: "ERC1155",
1065
1062
  provenance: "MEDIALANE",
1063
+ onchain: {
1064
+ STARKNET: {
1065
+ factoryAddress: SN2.ipClubFactory,
1066
+ classHash: SN2.ipClubCollectionClassHash
1067
+ }
1068
+ },
1066
1069
  uiVariant: "club",
1067
- capabilities: ["subscribe"],
1070
+ capabilities: ["mint", "list", "buy", "make_offer", "cancel", "transfer"],
1068
1071
  events: [
1069
- { name: "NewClubCreated", emittedBy: "factory" }
1072
+ { name: "ClubDeployed", emittedBy: "factory" },
1073
+ { name: "MembershipCreated", emittedBy: "instance" }
1070
1074
  ],
1071
1075
  metadataSchema: { licenseDefault: "CC BY-SA" }
1072
1076
  },
@@ -1076,18 +1080,28 @@ var SERVICES = {
1076
1080
  description: "Sponsorship offers and licenses anchored to an existing Medialane asset.",
1077
1081
  standard: "ERC721",
1078
1082
  provenance: "MEDIALANE",
1083
+ onchain: {
1084
+ STARKNET: {
1085
+ factoryAddress: SN2.ipSponsorship,
1086
+ classHash: SN2.ipSponsorshipClassHash,
1087
+ startBlock: SN2.ipSponsorshipStartBlock
1088
+ }
1089
+ },
1079
1090
  uiVariant: "standard",
1080
- capabilities: ["sponsor"],
1081
- metadataSchema: { licenseDefault: "CC BY-SA" }
1082
- },
1083
- "ip-sponsorship-license": {
1084
- id: "ip-sponsorship-license",
1085
- displayName: "Sponsorship License Receipt",
1086
- description: "Non-authoritative receipt NFT minted to a sponsor when a sponsorship bid is accepted.",
1087
- standard: "ERC721",
1088
- provenance: "MEDIALANE",
1089
- uiVariant: "standard",
1090
- capabilities: ["transfer"],
1091
+ // v3: one contract is both the offer/bid/proposal registry and the
1092
+ // issued license collection (a real, standard ERC-721 minted internally
1093
+ // — no separate receipt contract). `transfer` reflects that a license is
1094
+ // freely transferable at the protocol layer; transferable/expiry intent
1095
+ // is declarative (carried in metadata + LicenseMinted), never
1096
+ // contract-enforced. Supersedes the 2026-07-02 v2 `ip-sponsorship`
1097
+ // (registry-only) + `ip-sponsorship-license` (non-authoritative receipt
1098
+ // via a dedicated ip-erc721 instance) pair — retired as of this redesign.
1099
+ capabilities: ["sponsor", "transfer"],
1100
+ events: [
1101
+ { name: "OfferCreated", emittedBy: "factory" },
1102
+ { name: "ProposalCreated", emittedBy: "factory" },
1103
+ { name: "LicenseMinted", emittedBy: "factory" }
1104
+ ],
1091
1105
  metadataSchema: { licenseDefault: "CC BY-SA" }
1092
1106
  },
1093
1107
  "creator-coin": {
@@ -6909,12 +6923,12 @@ var IPTicketCollectionFactoryABI = [
6909
6923
  }
6910
6924
  ];
6911
6925
 
6912
- // src/starknet/abis/ipClub.ts
6913
- var IPClubABI = [
6926
+ // src/starknet/abis/ipClubFactory.ts
6927
+ var IPClubFactoryABI = [
6914
6928
  {
6915
6929
  "type": "impl",
6916
- "name": "IPClubImpl",
6917
- "interface_name": "ip_club::interfaces::IIPClub::IIPClub"
6930
+ "name": "IPClubCollectionFactoryImpl",
6931
+ "interface_name": "ip_club::interface::IIPClubCollectionFactory"
6918
6932
  },
6919
6933
  {
6920
6934
  "type": "struct",
@@ -6934,240 +6948,55 @@ var IPClubABI = [
6934
6948
  }
6935
6949
  ]
6936
6950
  },
6937
- {
6938
- "type": "enum",
6939
- "name": "core::option::Option::<core::integer::u32>",
6940
- "variants": [
6941
- {
6942
- "name": "Some",
6943
- "type": "core::integer::u32"
6944
- },
6945
- {
6946
- "name": "None",
6947
- "type": "()"
6948
- }
6949
- ]
6950
- },
6951
- {
6952
- "type": "struct",
6953
- "name": "core::integer::u256",
6954
- "members": [
6955
- {
6956
- "name": "low",
6957
- "type": "core::integer::u128"
6958
- },
6959
- {
6960
- "name": "high",
6961
- "type": "core::integer::u128"
6962
- }
6963
- ]
6964
- },
6965
- {
6966
- "type": "enum",
6967
- "name": "core::option::Option::<core::integer::u256>",
6968
- "variants": [
6969
- {
6970
- "name": "Some",
6971
- "type": "core::integer::u256"
6972
- },
6973
- {
6974
- "name": "None",
6975
- "type": "()"
6976
- }
6977
- ]
6978
- },
6979
- {
6980
- "type": "enum",
6981
- "name": "core::option::Option::<core::starknet::contract_address::ContractAddress>",
6982
- "variants": [
6983
- {
6984
- "name": "Some",
6985
- "type": "core::starknet::contract_address::ContractAddress"
6986
- },
6987
- {
6988
- "name": "None",
6989
- "type": "()"
6990
- }
6991
- ]
6992
- },
6993
- {
6994
- "type": "enum",
6995
- "name": "core::bool",
6996
- "variants": [
6997
- {
6998
- "name": "False",
6999
- "type": "()"
7000
- },
7001
- {
7002
- "name": "True",
7003
- "type": "()"
7004
- }
7005
- ]
7006
- },
7007
- {
7008
- "type": "struct",
7009
- "name": "ip_club::types::ClubRecord",
7010
- "members": [
7011
- {
7012
- "name": "creator",
7013
- "type": "core::starknet::contract_address::ContractAddress"
7014
- },
7015
- {
7016
- "name": "club_nft",
7017
- "type": "core::starknet::contract_address::ContractAddress"
7018
- },
7019
- {
7020
- "name": "open",
7021
- "type": "core::bool"
7022
- },
7023
- {
7024
- "name": "num_members",
7025
- "type": "core::integer::u32"
7026
- },
7027
- {
7028
- "name": "max_members",
7029
- "type": "core::option::Option::<core::integer::u32>"
7030
- },
7031
- {
7032
- "name": "entry_fee",
7033
- "type": "core::option::Option::<core::integer::u256>"
7034
- },
7035
- {
7036
- "name": "payment_token",
7037
- "type": "core::option::Option::<core::starknet::contract_address::ContractAddress>"
7038
- }
7039
- ]
7040
- },
7041
6951
  {
7042
6952
  "type": "interface",
7043
- "name": "ip_club::interfaces::IIPClub::IIPClub",
6953
+ "name": "ip_club::interface::IIPClubCollectionFactory",
7044
6954
  "items": [
7045
6955
  {
7046
6956
  "type": "function",
7047
- "name": "create_club",
7048
- "inputs": [
7049
- {
7050
- "name": "name",
7051
- "type": "core::byte_array::ByteArray"
7052
- },
7053
- {
7054
- "name": "symbol",
7055
- "type": "core::byte_array::ByteArray"
7056
- },
7057
- {
7058
- "name": "metadata_uri",
7059
- "type": "core::byte_array::ByteArray"
7060
- },
7061
- {
7062
- "name": "max_members",
7063
- "type": "core::option::Option::<core::integer::u32>"
7064
- },
7065
- {
7066
- "name": "entry_fee",
7067
- "type": "core::option::Option::<core::integer::u256>"
7068
- },
7069
- {
7070
- "name": "payment_token",
7071
- "type": "core::option::Option::<core::starknet::contract_address::ContractAddress>"
7072
- }
7073
- ],
6957
+ "name": "collection_class_hash",
6958
+ "inputs": [],
7074
6959
  "outputs": [
7075
6960
  {
7076
- "type": "core::integer::u256"
7077
- }
7078
- ],
7079
- "state_mutability": "external"
7080
- },
7081
- {
7082
- "type": "function",
7083
- "name": "set_club_open",
7084
- "inputs": [
7085
- {
7086
- "name": "club_id",
7087
- "type": "core::integer::u256"
7088
- },
7089
- {
7090
- "name": "open",
7091
- "type": "core::bool"
7092
- }
7093
- ],
7094
- "outputs": [],
7095
- "state_mutability": "external"
7096
- },
7097
- {
7098
- "type": "function",
7099
- "name": "join_club",
7100
- "inputs": [
7101
- {
7102
- "name": "club_id",
7103
- "type": "core::integer::u256"
7104
- }
7105
- ],
7106
- "outputs": [],
7107
- "state_mutability": "external"
7108
- },
7109
- {
7110
- "type": "function",
7111
- "name": "leave_club",
7112
- "inputs": [
7113
- {
7114
- "name": "club_id",
7115
- "type": "core::integer::u256"
7116
- },
7117
- {
7118
- "name": "token_id",
7119
- "type": "core::integer::u256"
6961
+ "type": "core::starknet::class_hash::ClassHash"
7120
6962
  }
7121
6963
  ],
7122
- "outputs": [],
7123
- "state_mutability": "external"
6964
+ "state_mutability": "view"
7124
6965
  },
7125
6966
  {
7126
6967
  "type": "function",
7127
- "name": "get_club_record",
7128
- "inputs": [
7129
- {
7130
- "name": "club_id",
7131
- "type": "core::integer::u256"
7132
- }
7133
- ],
6968
+ "name": "version",
6969
+ "inputs": [],
7134
6970
  "outputs": [
7135
6971
  {
7136
- "type": "ip_club::types::ClubRecord"
6972
+ "type": "core::byte_array::ByteArray"
7137
6973
  }
7138
6974
  ],
7139
6975
  "state_mutability": "view"
7140
6976
  },
7141
6977
  {
7142
6978
  "type": "function",
7143
- "name": "is_member",
6979
+ "name": "deploy_collection",
7144
6980
  "inputs": [
7145
6981
  {
7146
- "name": "club_id",
7147
- "type": "core::integer::u256"
6982
+ "name": "name",
6983
+ "type": "core::byte_array::ByteArray"
7148
6984
  },
7149
6985
  {
7150
- "name": "user",
7151
- "type": "core::starknet::contract_address::ContractAddress"
7152
- }
7153
- ],
7154
- "outputs": [
6986
+ "name": "symbol",
6987
+ "type": "core::byte_array::ByteArray"
6988
+ },
7155
6989
  {
7156
- "type": "core::bool"
6990
+ "name": "base_uri",
6991
+ "type": "core::byte_array::ByteArray"
7157
6992
  }
7158
6993
  ],
7159
- "state_mutability": "view"
7160
- },
7161
- {
7162
- "type": "function",
7163
- "name": "get_last_club_id",
7164
- "inputs": [],
7165
6994
  "outputs": [
7166
6995
  {
7167
- "type": "core::integer::u256"
6996
+ "type": "core::starknet::contract_address::ContractAddress"
7168
6997
  }
7169
6998
  ],
7170
- "state_mutability": "view"
6999
+ "state_mutability": "external"
7171
7000
  }
7172
7001
  ]
7173
7002
  },
@@ -7176,6 +7005,20 @@ var IPClubABI = [
7176
7005
  "name": "SRC5Impl",
7177
7006
  "interface_name": "openzeppelin_introspection::interface::ISRC5"
7178
7007
  },
7008
+ {
7009
+ "type": "enum",
7010
+ "name": "core::bool",
7011
+ "variants": [
7012
+ {
7013
+ "name": "False",
7014
+ "type": "()"
7015
+ },
7016
+ {
7017
+ "name": "True",
7018
+ "type": "()"
7019
+ }
7020
+ ]
7021
+ },
7179
7022
  {
7180
7023
  "type": "interface",
7181
7024
  "name": "openzeppelin_introspection::interface::ISRC5",
@@ -7203,7 +7046,7 @@ var IPClubABI = [
7203
7046
  "name": "constructor",
7204
7047
  "inputs": [
7205
7048
  {
7206
- "name": "ip_club_nft_class_hash",
7049
+ "name": "collection_class_hash",
7207
7050
  "type": "core::starknet::class_hash::ClassHash"
7208
7051
  }
7209
7052
  ]
@@ -7216,154 +7059,127 @@ var IPClubABI = [
7216
7059
  },
7217
7060
  {
7218
7061
  "type": "event",
7219
- "name": "ip_club::events::NewClubCreated",
7062
+ "name": "ip_club::IPClubCollectionFactory::IPClubCollectionFactory::ClubDeployed",
7220
7063
  "kind": "struct",
7221
7064
  "members": [
7222
7065
  {
7223
- "name": "club_id",
7224
- "type": "core::integer::u256",
7225
- "kind": "key"
7226
- },
7227
- {
7228
- "name": "creator",
7066
+ "name": "collection_address",
7229
7067
  "type": "core::starknet::contract_address::ContractAddress",
7230
7068
  "kind": "key"
7231
7069
  },
7232
7070
  {
7233
- "name": "club_nft",
7071
+ "name": "owner",
7234
7072
  "type": "core::starknet::contract_address::ContractAddress",
7235
- "kind": "data"
7073
+ "kind": "key"
7236
7074
  },
7237
7075
  {
7238
- "name": "metadata_uri",
7076
+ "name": "name",
7239
7077
  "type": "core::byte_array::ByteArray",
7240
7078
  "kind": "data"
7241
7079
  },
7242
7080
  {
7243
- "name": "timestamp",
7244
- "type": "core::integer::u64",
7081
+ "name": "symbol",
7082
+ "type": "core::byte_array::ByteArray",
7245
7083
  "kind": "data"
7246
7084
  }
7247
7085
  ]
7248
7086
  },
7249
7087
  {
7250
7088
  "type": "event",
7251
- "name": "ip_club::events::ClubStatusUpdated",
7252
- "kind": "struct",
7253
- "members": [
7254
- {
7255
- "name": "club_id",
7256
- "type": "core::integer::u256",
7257
- "kind": "key"
7258
- },
7089
+ "name": "ip_club::IPClubCollectionFactory::IPClubCollectionFactory::Event",
7090
+ "kind": "enum",
7091
+ "variants": [
7259
7092
  {
7260
- "name": "open",
7261
- "type": "core::bool",
7262
- "kind": "data"
7093
+ "name": "SRC5Event",
7094
+ "type": "openzeppelin_introspection::src5::SRC5Component::Event",
7095
+ "kind": "flat"
7263
7096
  },
7264
7097
  {
7265
- "name": "timestamp",
7266
- "type": "core::integer::u64",
7267
- "kind": "data"
7098
+ "name": "ClubDeployed",
7099
+ "type": "ip_club::IPClubCollectionFactory::IPClubCollectionFactory::ClubDeployed",
7100
+ "kind": "nested"
7268
7101
  }
7269
7102
  ]
7103
+ }
7104
+ ];
7105
+
7106
+ // src/starknet/abis/ipClubCollection.ts
7107
+ var IPClubCollectionABI = [
7108
+ {
7109
+ "type": "impl",
7110
+ "name": "ERC1155MetadataURIImpl",
7111
+ "interface_name": "openzeppelin_token::erc1155::interface::IERC1155MetadataURI"
7270
7112
  },
7271
7113
  {
7272
- "type": "event",
7273
- "name": "ip_club::events::NewMember",
7274
- "kind": "struct",
7114
+ "type": "struct",
7115
+ "name": "core::integer::u256",
7275
7116
  "members": [
7276
7117
  {
7277
- "name": "club_id",
7278
- "type": "core::integer::u256",
7279
- "kind": "key"
7280
- },
7281
- {
7282
- "name": "member",
7283
- "type": "core::starknet::contract_address::ContractAddress",
7284
- "kind": "key"
7118
+ "name": "low",
7119
+ "type": "core::integer::u128"
7285
7120
  },
7286
7121
  {
7287
- "name": "timestamp",
7288
- "type": "core::integer::u64",
7289
- "kind": "data"
7122
+ "name": "high",
7123
+ "type": "core::integer::u128"
7290
7124
  }
7291
7125
  ]
7292
7126
  },
7293
7127
  {
7294
- "type": "event",
7295
- "name": "ip_club::events::MemberLeft",
7296
- "kind": "struct",
7128
+ "type": "struct",
7129
+ "name": "core::byte_array::ByteArray",
7297
7130
  "members": [
7298
7131
  {
7299
- "name": "club_id",
7300
- "type": "core::integer::u256",
7301
- "kind": "key"
7132
+ "name": "data",
7133
+ "type": "core::array::Array::<core::bytes_31::bytes31>"
7302
7134
  },
7303
7135
  {
7304
- "name": "member",
7305
- "type": "core::starknet::contract_address::ContractAddress",
7306
- "kind": "key"
7136
+ "name": "pending_word",
7137
+ "type": "core::felt252"
7307
7138
  },
7308
7139
  {
7309
- "name": "timestamp",
7310
- "type": "core::integer::u64",
7311
- "kind": "data"
7140
+ "name": "pending_word_len",
7141
+ "type": "core::internal::bounded_int::BoundedInt::<0, 30>"
7312
7142
  }
7313
7143
  ]
7314
7144
  },
7315
7145
  {
7316
- "type": "event",
7317
- "name": "ip_club::IPClub::IPClub::Event",
7318
- "kind": "enum",
7319
- "variants": [
7320
- {
7321
- "name": "SRC5Event",
7322
- "type": "openzeppelin_introspection::src5::SRC5Component::Event",
7323
- "kind": "flat"
7324
- },
7325
- {
7326
- "name": "NewClubCreated",
7327
- "type": "ip_club::events::NewClubCreated",
7328
- "kind": "nested"
7329
- },
7330
- {
7331
- "name": "ClubStatusUpdated",
7332
- "type": "ip_club::events::ClubStatusUpdated",
7333
- "kind": "nested"
7334
- },
7335
- {
7336
- "name": "NewMember",
7337
- "type": "ip_club::events::NewMember",
7338
- "kind": "nested"
7339
- },
7146
+ "type": "interface",
7147
+ "name": "openzeppelin_token::erc1155::interface::IERC1155MetadataURI",
7148
+ "items": [
7340
7149
  {
7341
- "name": "MemberLeft",
7342
- "type": "ip_club::events::MemberLeft",
7343
- "kind": "nested"
7150
+ "type": "function",
7151
+ "name": "uri",
7152
+ "inputs": [
7153
+ {
7154
+ "name": "token_id",
7155
+ "type": "core::integer::u256"
7156
+ }
7157
+ ],
7158
+ "outputs": [
7159
+ {
7160
+ "type": "core::byte_array::ByteArray"
7161
+ }
7162
+ ],
7163
+ "state_mutability": "view"
7344
7164
  }
7345
7165
  ]
7346
- }
7347
- ];
7348
-
7349
- // src/starknet/abis/ipClubNft.ts
7350
- var IPClubNFTABI = [
7166
+ },
7351
7167
  {
7352
7168
  "type": "impl",
7353
- "name": "IIPClubNFTImpl",
7354
- "interface_name": "ip_club::interfaces::IIPClubNFT::IIPClubNFT"
7169
+ "name": "IPClubCollectionImpl",
7170
+ "interface_name": "ip_club::interface::IIPClubCollection"
7355
7171
  },
7356
7172
  {
7357
- "type": "struct",
7358
- "name": "core::integer::u256",
7359
- "members": [
7173
+ "type": "enum",
7174
+ "name": "core::option::Option::<core::integer::u64>",
7175
+ "variants": [
7360
7176
  {
7361
- "name": "low",
7362
- "type": "core::integer::u128"
7177
+ "name": "Some",
7178
+ "type": "core::integer::u64"
7363
7179
  },
7364
7180
  {
7365
- "name": "high",
7366
- "type": "core::integer::u128"
7181
+ "name": "None",
7182
+ "type": "()"
7367
7183
  }
7368
7184
  ]
7369
7185
  },
@@ -7381,33 +7197,87 @@ var IPClubNFTABI = [
7381
7197
  }
7382
7198
  ]
7383
7199
  },
7200
+ {
7201
+ "type": "struct",
7202
+ "name": "ip_club::types::Membership",
7203
+ "members": [
7204
+ {
7205
+ "name": "max_supply",
7206
+ "type": "core::integer::u256"
7207
+ },
7208
+ {
7209
+ "name": "minted",
7210
+ "type": "core::integer::u256"
7211
+ },
7212
+ {
7213
+ "name": "start_time",
7214
+ "type": "core::option::Option::<core::integer::u64>"
7215
+ },
7216
+ {
7217
+ "name": "end_time",
7218
+ "type": "core::option::Option::<core::integer::u64>"
7219
+ },
7220
+ {
7221
+ "name": "royalty_bps",
7222
+ "type": "core::integer::u16"
7223
+ },
7224
+ {
7225
+ "name": "metadata_uri",
7226
+ "type": "core::byte_array::ByteArray"
7227
+ }
7228
+ ]
7229
+ },
7384
7230
  {
7385
7231
  "type": "interface",
7386
- "name": "ip_club::interfaces::IIPClubNFT::IIPClubNFT",
7232
+ "name": "ip_club::interface::IIPClubCollection",
7387
7233
  "items": [
7388
7234
  {
7389
7235
  "type": "function",
7390
- "name": "mint",
7236
+ "name": "create_membership",
7391
7237
  "inputs": [
7392
7238
  {
7393
- "name": "recipient",
7394
- "type": "core::starknet::contract_address::ContractAddress"
7239
+ "name": "max_supply",
7240
+ "type": "core::integer::u256"
7241
+ },
7242
+ {
7243
+ "name": "start_time",
7244
+ "type": "core::option::Option::<core::integer::u64>"
7245
+ },
7246
+ {
7247
+ "name": "end_time",
7248
+ "type": "core::option::Option::<core::integer::u64>"
7249
+ },
7250
+ {
7251
+ "name": "royalty_bps",
7252
+ "type": "core::integer::u16"
7253
+ },
7254
+ {
7255
+ "name": "metadata_uri",
7256
+ "type": "core::byte_array::ByteArray"
7257
+ }
7258
+ ],
7259
+ "outputs": [
7260
+ {
7261
+ "type": "core::integer::u256"
7395
7262
  }
7396
7263
  ],
7397
- "outputs": [],
7398
7264
  "state_mutability": "external"
7399
7265
  },
7400
7266
  {
7401
7267
  "type": "function",
7402
- "name": "burn",
7268
+ "name": "mint",
7403
7269
  "inputs": [
7404
7270
  {
7405
- "name": "member",
7271
+ "name": "to",
7406
7272
  "type": "core::starknet::contract_address::ContractAddress"
7407
7273
  },
7408
7274
  {
7409
7275
  "name": "token_id",
7410
7276
  "type": "core::integer::u256"
7277
+ },
7278
+ {
7279
+ "name": "amount",
7280
+ "type": "core::integer::u256"
7411
7281
  }
7412
7282
  ],
7413
7283
  "outputs": [],
@@ -7415,10 +7285,10 @@ var IPClubNFTABI = [
7415
7285
  },
7416
7286
  {
7417
7287
  "type": "function",
7418
- "name": "has_nft",
7288
+ "name": "is_member",
7419
7289
  "inputs": [
7420
7290
  {
7421
- "name": "user",
7291
+ "name": "holder",
7422
7292
  "type": "core::starknet::contract_address::ContractAddress"
7423
7293
  }
7424
7294
  ],
@@ -7431,169 +7301,171 @@ var IPClubNFTABI = [
7431
7301
  },
7432
7302
  {
7433
7303
  "type": "function",
7434
- "name": "get_nft_creator",
7435
- "inputs": [],
7436
- "outputs": [
7304
+ "name": "is_member_of",
7305
+ "inputs": [
7306
+ {
7307
+ "name": "token_id",
7308
+ "type": "core::integer::u256"
7309
+ },
7437
7310
  {
7311
+ "name": "holder",
7438
7312
  "type": "core::starknet::contract_address::ContractAddress"
7439
7313
  }
7440
7314
  ],
7315
+ "outputs": [
7316
+ {
7317
+ "type": "core::bool"
7318
+ }
7319
+ ],
7441
7320
  "state_mutability": "view"
7442
7321
  },
7443
7322
  {
7444
7323
  "type": "function",
7445
- "name": "get_ip_club_manager",
7446
- "inputs": [],
7324
+ "name": "get_membership",
7325
+ "inputs": [
7326
+ {
7327
+ "name": "token_id",
7328
+ "type": "core::integer::u256"
7329
+ }
7330
+ ],
7447
7331
  "outputs": [
7448
7332
  {
7449
- "type": "core::starknet::contract_address::ContractAddress"
7333
+ "type": "ip_club::types::Membership"
7450
7334
  }
7451
7335
  ],
7452
7336
  "state_mutability": "view"
7453
7337
  },
7454
7338
  {
7455
7339
  "type": "function",
7456
- "name": "get_associated_club_id",
7340
+ "name": "name",
7457
7341
  "inputs": [],
7458
7342
  "outputs": [
7459
7343
  {
7460
- "type": "core::integer::u256"
7344
+ "type": "core::byte_array::ByteArray"
7461
7345
  }
7462
7346
  ],
7463
7347
  "state_mutability": "view"
7464
7348
  },
7465
7349
  {
7466
7350
  "type": "function",
7467
- "name": "get_last_minted_id",
7351
+ "name": "symbol",
7468
7352
  "inputs": [],
7469
7353
  "outputs": [
7470
7354
  {
7471
- "type": "core::integer::u256"
7355
+ "type": "core::byte_array::ByteArray"
7472
7356
  }
7473
7357
  ],
7474
7358
  "state_mutability": "view"
7475
- }
7476
- ]
7477
- },
7478
- {
7479
- "type": "impl",
7480
- "name": "ERC721MixinImpl",
7481
- "interface_name": "openzeppelin_token::erc721::interface::ERC721ABI"
7482
- },
7483
- {
7484
- "type": "struct",
7485
- "name": "core::array::Span::<core::felt252>",
7486
- "members": [
7487
- {
7488
- "name": "snapshot",
7489
- "type": "@core::array::Array::<core::felt252>"
7490
- }
7491
- ]
7492
- },
7493
- {
7494
- "type": "struct",
7495
- "name": "core::byte_array::ByteArray",
7496
- "members": [
7497
- {
7498
- "name": "data",
7499
- "type": "core::array::Array::<core::bytes_31::bytes31>"
7500
- },
7501
- {
7502
- "name": "pending_word",
7503
- "type": "core::felt252"
7504
7359
  },
7505
- {
7506
- "name": "pending_word_len",
7507
- "type": "core::internal::bounded_int::BoundedInt::<0, 30>"
7508
- }
7509
- ]
7510
- },
7511
- {
7512
- "type": "interface",
7513
- "name": "openzeppelin_token::erc721::interface::ERC721ABI",
7514
- "items": [
7515
7360
  {
7516
7361
  "type": "function",
7517
- "name": "balance_of",
7518
- "inputs": [
7519
- {
7520
- "name": "account",
7521
- "type": "core::starknet::contract_address::ContractAddress"
7522
- }
7523
- ],
7362
+ "name": "base_uri",
7363
+ "inputs": [],
7524
7364
  "outputs": [
7525
7365
  {
7526
- "type": "core::integer::u256"
7366
+ "type": "core::byte_array::ByteArray"
7527
7367
  }
7528
7368
  ],
7529
7369
  "state_mutability": "view"
7530
7370
  },
7531
7371
  {
7532
7372
  "type": "function",
7533
- "name": "owner_of",
7373
+ "name": "royalty_info",
7534
7374
  "inputs": [
7535
7375
  {
7536
7376
  "name": "token_id",
7537
7377
  "type": "core::integer::u256"
7378
+ },
7379
+ {
7380
+ "name": "sale_price",
7381
+ "type": "core::integer::u256"
7538
7382
  }
7539
7383
  ],
7540
7384
  "outputs": [
7541
7385
  {
7542
- "type": "core::starknet::contract_address::ContractAddress"
7386
+ "type": "(core::starknet::contract_address::ContractAddress, core::integer::u256)"
7543
7387
  }
7544
7388
  ],
7545
7389
  "state_mutability": "view"
7546
7390
  },
7547
7391
  {
7548
7392
  "type": "function",
7549
- "name": "safe_transfer_from",
7393
+ "name": "royaltyInfo",
7550
7394
  "inputs": [
7551
- {
7552
- "name": "from",
7553
- "type": "core::starknet::contract_address::ContractAddress"
7554
- },
7555
- {
7556
- "name": "to",
7557
- "type": "core::starknet::contract_address::ContractAddress"
7558
- },
7559
7395
  {
7560
7396
  "name": "token_id",
7561
7397
  "type": "core::integer::u256"
7562
7398
  },
7563
7399
  {
7564
- "name": "data",
7565
- "type": "core::array::Span::<core::felt252>"
7400
+ "name": "sale_price",
7401
+ "type": "core::integer::u256"
7566
7402
  }
7567
7403
  ],
7568
- "outputs": [],
7569
- "state_mutability": "external"
7404
+ "outputs": [
7405
+ {
7406
+ "type": "(core::starknet::contract_address::ContractAddress, core::integer::u256)"
7407
+ }
7408
+ ],
7409
+ "state_mutability": "view"
7570
7410
  },
7571
7411
  {
7572
7412
  "type": "function",
7573
- "name": "transfer_from",
7574
- "inputs": [
7575
- {
7576
- "name": "from",
7577
- "type": "core::starknet::contract_address::ContractAddress"
7578
- },
7579
- {
7580
- "name": "to",
7581
- "type": "core::starknet::contract_address::ContractAddress"
7582
- },
7413
+ "name": "version",
7414
+ "inputs": [],
7415
+ "outputs": [
7583
7416
  {
7584
- "name": "token_id",
7585
- "type": "core::integer::u256"
7417
+ "type": "core::byte_array::ByteArray"
7586
7418
  }
7587
7419
  ],
7588
- "outputs": [],
7589
- "state_mutability": "external"
7590
- },
7420
+ "state_mutability": "view"
7421
+ }
7422
+ ]
7423
+ },
7424
+ {
7425
+ "type": "impl",
7426
+ "name": "ERC1155Impl",
7427
+ "interface_name": "openzeppelin_token::erc1155::interface::IERC1155"
7428
+ },
7429
+ {
7430
+ "type": "struct",
7431
+ "name": "core::array::Span::<core::starknet::contract_address::ContractAddress>",
7432
+ "members": [
7433
+ {
7434
+ "name": "snapshot",
7435
+ "type": "@core::array::Array::<core::starknet::contract_address::ContractAddress>"
7436
+ }
7437
+ ]
7438
+ },
7439
+ {
7440
+ "type": "struct",
7441
+ "name": "core::array::Span::<core::integer::u256>",
7442
+ "members": [
7443
+ {
7444
+ "name": "snapshot",
7445
+ "type": "@core::array::Array::<core::integer::u256>"
7446
+ }
7447
+ ]
7448
+ },
7449
+ {
7450
+ "type": "struct",
7451
+ "name": "core::array::Span::<core::felt252>",
7452
+ "members": [
7453
+ {
7454
+ "name": "snapshot",
7455
+ "type": "@core::array::Array::<core::felt252>"
7456
+ }
7457
+ ]
7458
+ },
7459
+ {
7460
+ "type": "interface",
7461
+ "name": "openzeppelin_token::erc1155::interface::IERC1155",
7462
+ "items": [
7591
7463
  {
7592
7464
  "type": "function",
7593
- "name": "approve",
7465
+ "name": "balance_of",
7594
7466
  "inputs": [
7595
7467
  {
7596
- "name": "to",
7468
+ "name": "account",
7597
7469
  "type": "core::starknet::contract_address::ContractAddress"
7598
7470
  },
7599
7471
  {
@@ -7601,115 +7473,136 @@ var IPClubNFTABI = [
7601
7473
  "type": "core::integer::u256"
7602
7474
  }
7603
7475
  ],
7604
- "outputs": [],
7605
- "state_mutability": "external"
7606
- },
7607
- {
7608
- "type": "function",
7609
- "name": "set_approval_for_all",
7610
- "inputs": [
7611
- {
7612
- "name": "operator",
7613
- "type": "core::starknet::contract_address::ContractAddress"
7614
- },
7476
+ "outputs": [
7615
7477
  {
7616
- "name": "approved",
7617
- "type": "core::bool"
7478
+ "type": "core::integer::u256"
7618
7479
  }
7619
7480
  ],
7620
- "outputs": [],
7621
- "state_mutability": "external"
7481
+ "state_mutability": "view"
7622
7482
  },
7623
7483
  {
7624
7484
  "type": "function",
7625
- "name": "get_approved",
7485
+ "name": "balance_of_batch",
7626
7486
  "inputs": [
7627
7487
  {
7628
- "name": "token_id",
7629
- "type": "core::integer::u256"
7488
+ "name": "accounts",
7489
+ "type": "core::array::Span::<core::starknet::contract_address::ContractAddress>"
7490
+ },
7491
+ {
7492
+ "name": "token_ids",
7493
+ "type": "core::array::Span::<core::integer::u256>"
7630
7494
  }
7631
7495
  ],
7632
7496
  "outputs": [
7633
7497
  {
7634
- "type": "core::starknet::contract_address::ContractAddress"
7498
+ "type": "core::array::Span::<core::integer::u256>"
7635
7499
  }
7636
7500
  ],
7637
7501
  "state_mutability": "view"
7638
7502
  },
7639
7503
  {
7640
7504
  "type": "function",
7641
- "name": "is_approved_for_all",
7505
+ "name": "safe_transfer_from",
7642
7506
  "inputs": [
7643
7507
  {
7644
- "name": "owner",
7508
+ "name": "from",
7645
7509
  "type": "core::starknet::contract_address::ContractAddress"
7646
7510
  },
7647
7511
  {
7648
- "name": "operator",
7512
+ "name": "to",
7649
7513
  "type": "core::starknet::contract_address::ContractAddress"
7650
- }
7651
- ],
7652
- "outputs": [
7514
+ },
7653
7515
  {
7654
- "type": "core::bool"
7516
+ "name": "token_id",
7517
+ "type": "core::integer::u256"
7518
+ },
7519
+ {
7520
+ "name": "value",
7521
+ "type": "core::integer::u256"
7522
+ },
7523
+ {
7524
+ "name": "data",
7525
+ "type": "core::array::Span::<core::felt252>"
7655
7526
  }
7656
7527
  ],
7657
- "state_mutability": "view"
7528
+ "outputs": [],
7529
+ "state_mutability": "external"
7658
7530
  },
7659
7531
  {
7660
7532
  "type": "function",
7661
- "name": "supports_interface",
7533
+ "name": "safe_batch_transfer_from",
7662
7534
  "inputs": [
7663
7535
  {
7664
- "name": "interface_id",
7665
- "type": "core::felt252"
7666
- }
7667
- ],
7668
- "outputs": [
7536
+ "name": "from",
7537
+ "type": "core::starknet::contract_address::ContractAddress"
7538
+ },
7669
7539
  {
7670
- "type": "core::bool"
7540
+ "name": "to",
7541
+ "type": "core::starknet::contract_address::ContractAddress"
7542
+ },
7543
+ {
7544
+ "name": "token_ids",
7545
+ "type": "core::array::Span::<core::integer::u256>"
7546
+ },
7547
+ {
7548
+ "name": "values",
7549
+ "type": "core::array::Span::<core::integer::u256>"
7550
+ },
7551
+ {
7552
+ "name": "data",
7553
+ "type": "core::array::Span::<core::felt252>"
7671
7554
  }
7672
7555
  ],
7673
- "state_mutability": "view"
7556
+ "outputs": [],
7557
+ "state_mutability": "external"
7674
7558
  },
7675
7559
  {
7676
7560
  "type": "function",
7677
- "name": "name",
7678
- "inputs": [],
7679
- "outputs": [
7561
+ "name": "is_approved_for_all",
7562
+ "inputs": [
7680
7563
  {
7681
- "type": "core::byte_array::ByteArray"
7564
+ "name": "owner",
7565
+ "type": "core::starknet::contract_address::ContractAddress"
7566
+ },
7567
+ {
7568
+ "name": "operator",
7569
+ "type": "core::starknet::contract_address::ContractAddress"
7682
7570
  }
7683
7571
  ],
7684
- "state_mutability": "view"
7685
- },
7686
- {
7687
- "type": "function",
7688
- "name": "symbol",
7689
- "inputs": [],
7690
7572
  "outputs": [
7691
7573
  {
7692
- "type": "core::byte_array::ByteArray"
7574
+ "type": "core::bool"
7693
7575
  }
7694
7576
  ],
7695
7577
  "state_mutability": "view"
7696
7578
  },
7697
7579
  {
7698
7580
  "type": "function",
7699
- "name": "token_uri",
7581
+ "name": "set_approval_for_all",
7700
7582
  "inputs": [
7701
7583
  {
7702
- "name": "token_id",
7703
- "type": "core::integer::u256"
7704
- }
7705
- ],
7706
- "outputs": [
7584
+ "name": "operator",
7585
+ "type": "core::starknet::contract_address::ContractAddress"
7586
+ },
7707
7587
  {
7708
- "type": "core::byte_array::ByteArray"
7588
+ "name": "approved",
7589
+ "type": "core::bool"
7709
7590
  }
7710
7591
  ],
7711
- "state_mutability": "view"
7712
- },
7592
+ "outputs": [],
7593
+ "state_mutability": "external"
7594
+ }
7595
+ ]
7596
+ },
7597
+ {
7598
+ "type": "impl",
7599
+ "name": "ERC1155CamelImpl",
7600
+ "interface_name": "openzeppelin_token::erc1155::interface::IERC1155Camel"
7601
+ },
7602
+ {
7603
+ "type": "interface",
7604
+ "name": "openzeppelin_token::erc1155::interface::IERC1155Camel",
7605
+ "items": [
7713
7606
  {
7714
7607
  "type": "function",
7715
7608
  "name": "balanceOf",
@@ -7717,6 +7610,10 @@ var IPClubNFTABI = [
7717
7610
  {
7718
7611
  "name": "account",
7719
7612
  "type": "core::starknet::contract_address::ContractAddress"
7613
+ },
7614
+ {
7615
+ "name": "tokenId",
7616
+ "type": "core::integer::u256"
7720
7617
  }
7721
7618
  ],
7722
7619
  "outputs": [
@@ -7728,16 +7625,20 @@ var IPClubNFTABI = [
7728
7625
  },
7729
7626
  {
7730
7627
  "type": "function",
7731
- "name": "ownerOf",
7628
+ "name": "balanceOfBatch",
7732
7629
  "inputs": [
7733
7630
  {
7734
- "name": "tokenId",
7735
- "type": "core::integer::u256"
7631
+ "name": "accounts",
7632
+ "type": "core::array::Span::<core::starknet::contract_address::ContractAddress>"
7633
+ },
7634
+ {
7635
+ "name": "tokenIds",
7636
+ "type": "core::array::Span::<core::integer::u256>"
7736
7637
  }
7737
7638
  ],
7738
7639
  "outputs": [
7739
7640
  {
7740
- "type": "core::starknet::contract_address::ContractAddress"
7641
+ "type": "core::array::Span::<core::integer::u256>"
7741
7642
  }
7742
7643
  ],
7743
7644
  "state_mutability": "view"
@@ -7758,6 +7659,10 @@ var IPClubNFTABI = [
7758
7659
  "name": "tokenId",
7759
7660
  "type": "core::integer::u256"
7760
7661
  },
7662
+ {
7663
+ "name": "value",
7664
+ "type": "core::integer::u256"
7665
+ },
7761
7666
  {
7762
7667
  "name": "data",
7763
7668
  "type": "core::array::Span::<core::felt252>"
@@ -7768,7 +7673,7 @@ var IPClubNFTABI = [
7768
7673
  },
7769
7674
  {
7770
7675
  "type": "function",
7771
- "name": "transferFrom",
7676
+ "name": "safeBatchTransferFrom",
7772
7677
  "inputs": [
7773
7678
  {
7774
7679
  "name": "from",
@@ -7779,8 +7684,16 @@ var IPClubNFTABI = [
7779
7684
  "type": "core::starknet::contract_address::ContractAddress"
7780
7685
  },
7781
7686
  {
7782
- "name": "tokenId",
7783
- "type": "core::integer::u256"
7687
+ "name": "tokenIds",
7688
+ "type": "core::array::Span::<core::integer::u256>"
7689
+ },
7690
+ {
7691
+ "name": "values",
7692
+ "type": "core::array::Span::<core::integer::u256>"
7693
+ },
7694
+ {
7695
+ "name": "data",
7696
+ "type": "core::array::Span::<core::felt252>"
7784
7697
  }
7785
7698
  ],
7786
7699
  "outputs": [],
@@ -7788,47 +7701,58 @@ var IPClubNFTABI = [
7788
7701
  },
7789
7702
  {
7790
7703
  "type": "function",
7791
- "name": "setApprovalForAll",
7704
+ "name": "isApprovedForAll",
7792
7705
  "inputs": [
7793
7706
  {
7794
- "name": "operator",
7707
+ "name": "owner",
7795
7708
  "type": "core::starknet::contract_address::ContractAddress"
7796
7709
  },
7797
7710
  {
7798
- "name": "approved",
7799
- "type": "core::bool"
7800
- }
7801
- ],
7802
- "outputs": [],
7803
- "state_mutability": "external"
7804
- },
7805
- {
7806
- "type": "function",
7807
- "name": "getApproved",
7808
- "inputs": [
7809
- {
7810
- "name": "tokenId",
7811
- "type": "core::integer::u256"
7711
+ "name": "operator",
7712
+ "type": "core::starknet::contract_address::ContractAddress"
7812
7713
  }
7813
7714
  ],
7814
7715
  "outputs": [
7815
7716
  {
7816
- "type": "core::starknet::contract_address::ContractAddress"
7717
+ "type": "core::bool"
7817
7718
  }
7818
7719
  ],
7819
7720
  "state_mutability": "view"
7820
7721
  },
7821
7722
  {
7822
7723
  "type": "function",
7823
- "name": "isApprovedForAll",
7724
+ "name": "setApprovalForAll",
7824
7725
  "inputs": [
7825
7726
  {
7826
- "name": "owner",
7727
+ "name": "operator",
7827
7728
  "type": "core::starknet::contract_address::ContractAddress"
7828
7729
  },
7829
7730
  {
7830
- "name": "operator",
7831
- "type": "core::starknet::contract_address::ContractAddress"
7731
+ "name": "approved",
7732
+ "type": "core::bool"
7733
+ }
7734
+ ],
7735
+ "outputs": [],
7736
+ "state_mutability": "external"
7737
+ }
7738
+ ]
7739
+ },
7740
+ {
7741
+ "type": "impl",
7742
+ "name": "SRC5Impl",
7743
+ "interface_name": "openzeppelin_introspection::interface::ISRC5"
7744
+ },
7745
+ {
7746
+ "type": "interface",
7747
+ "name": "openzeppelin_introspection::interface::ISRC5",
7748
+ "items": [
7749
+ {
7750
+ "type": "function",
7751
+ "name": "supports_interface",
7752
+ "inputs": [
7753
+ {
7754
+ "name": "interface_id",
7755
+ "type": "core::felt252"
7832
7756
  }
7833
7757
  ],
7834
7758
  "outputs": [
@@ -7837,22 +7761,66 @@ var IPClubNFTABI = [
7837
7761
  }
7838
7762
  ],
7839
7763
  "state_mutability": "view"
7764
+ }
7765
+ ]
7766
+ },
7767
+ {
7768
+ "type": "impl",
7769
+ "name": "OwnableMixinImpl",
7770
+ "interface_name": "openzeppelin_access::ownable::interface::OwnableABI"
7771
+ },
7772
+ {
7773
+ "type": "interface",
7774
+ "name": "openzeppelin_access::ownable::interface::OwnableABI",
7775
+ "items": [
7776
+ {
7777
+ "type": "function",
7778
+ "name": "owner",
7779
+ "inputs": [],
7780
+ "outputs": [
7781
+ {
7782
+ "type": "core::starknet::contract_address::ContractAddress"
7783
+ }
7784
+ ],
7785
+ "state_mutability": "view"
7840
7786
  },
7841
7787
  {
7842
7788
  "type": "function",
7843
- "name": "tokenURI",
7789
+ "name": "transfer_ownership",
7844
7790
  "inputs": [
7845
7791
  {
7846
- "name": "tokenId",
7847
- "type": "core::integer::u256"
7792
+ "name": "new_owner",
7793
+ "type": "core::starknet::contract_address::ContractAddress"
7848
7794
  }
7849
7795
  ],
7850
- "outputs": [
7796
+ "outputs": [],
7797
+ "state_mutability": "external"
7798
+ },
7799
+ {
7800
+ "type": "function",
7801
+ "name": "renounce_ownership",
7802
+ "inputs": [],
7803
+ "outputs": [],
7804
+ "state_mutability": "external"
7805
+ },
7806
+ {
7807
+ "type": "function",
7808
+ "name": "transferOwnership",
7809
+ "inputs": [
7851
7810
  {
7852
- "type": "core::byte_array::ByteArray"
7811
+ "name": "newOwner",
7812
+ "type": "core::starknet::contract_address::ContractAddress"
7853
7813
  }
7854
7814
  ],
7855
- "state_mutability": "view"
7815
+ "outputs": [],
7816
+ "state_mutability": "external"
7817
+ },
7818
+ {
7819
+ "type": "function",
7820
+ "name": "renounceOwnership",
7821
+ "inputs": [],
7822
+ "outputs": [],
7823
+ "state_mutability": "external"
7856
7824
  }
7857
7825
  ]
7858
7826
  },
@@ -7869,28 +7837,25 @@ var IPClubNFTABI = [
7869
7837
  "type": "core::byte_array::ByteArray"
7870
7838
  },
7871
7839
  {
7872
- "name": "club_id",
7873
- "type": "core::integer::u256"
7874
- },
7875
- {
7876
- "name": "creator",
7877
- "type": "core::starknet::contract_address::ContractAddress"
7840
+ "name": "base_uri",
7841
+ "type": "core::byte_array::ByteArray"
7878
7842
  },
7879
7843
  {
7880
- "name": "ip_club_manager",
7844
+ "name": "owner",
7881
7845
  "type": "core::starknet::contract_address::ContractAddress"
7882
- },
7883
- {
7884
- "name": "metadata_uri",
7885
- "type": "core::byte_array::ByteArray"
7886
7846
  }
7887
7847
  ]
7888
7848
  },
7889
7849
  {
7890
7850
  "type": "event",
7891
- "name": "openzeppelin_token::erc721::erc721::ERC721Component::Transfer",
7851
+ "name": "openzeppelin_token::erc1155::erc1155::ERC1155Component::TransferSingle",
7892
7852
  "kind": "struct",
7893
7853
  "members": [
7854
+ {
7855
+ "name": "operator",
7856
+ "type": "core::starknet::contract_address::ContractAddress",
7857
+ "kind": "key"
7858
+ },
7894
7859
  {
7895
7860
  "name": "from",
7896
7861
  "type": "core::starknet::contract_address::ContractAddress",
@@ -7902,37 +7867,52 @@ var IPClubNFTABI = [
7902
7867
  "kind": "key"
7903
7868
  },
7904
7869
  {
7905
- "name": "token_id",
7870
+ "name": "id",
7906
7871
  "type": "core::integer::u256",
7907
- "kind": "key"
7872
+ "kind": "data"
7873
+ },
7874
+ {
7875
+ "name": "value",
7876
+ "type": "core::integer::u256",
7877
+ "kind": "data"
7908
7878
  }
7909
7879
  ]
7910
7880
  },
7911
7881
  {
7912
7882
  "type": "event",
7913
- "name": "openzeppelin_token::erc721::erc721::ERC721Component::Approval",
7883
+ "name": "openzeppelin_token::erc1155::erc1155::ERC1155Component::TransferBatch",
7914
7884
  "kind": "struct",
7915
7885
  "members": [
7916
7886
  {
7917
- "name": "owner",
7887
+ "name": "operator",
7918
7888
  "type": "core::starknet::contract_address::ContractAddress",
7919
7889
  "kind": "key"
7920
7890
  },
7921
7891
  {
7922
- "name": "approved",
7892
+ "name": "from",
7923
7893
  "type": "core::starknet::contract_address::ContractAddress",
7924
7894
  "kind": "key"
7925
7895
  },
7926
7896
  {
7927
- "name": "token_id",
7928
- "type": "core::integer::u256",
7897
+ "name": "to",
7898
+ "type": "core::starknet::contract_address::ContractAddress",
7929
7899
  "kind": "key"
7900
+ },
7901
+ {
7902
+ "name": "ids",
7903
+ "type": "core::array::Span::<core::integer::u256>",
7904
+ "kind": "data"
7905
+ },
7906
+ {
7907
+ "name": "values",
7908
+ "type": "core::array::Span::<core::integer::u256>",
7909
+ "kind": "data"
7930
7910
  }
7931
7911
  ]
7932
7912
  },
7933
7913
  {
7934
7914
  "type": "event",
7935
- "name": "openzeppelin_token::erc721::erc721::ERC721Component::ApprovalForAll",
7915
+ "name": "openzeppelin_token::erc1155::erc1155::ERC1155Component::ApprovalForAll",
7936
7916
  "kind": "struct",
7937
7917
  "members": [
7938
7918
  {
@@ -7954,22 +7934,44 @@ var IPClubNFTABI = [
7954
7934
  },
7955
7935
  {
7956
7936
  "type": "event",
7957
- "name": "openzeppelin_token::erc721::erc721::ERC721Component::Event",
7937
+ "name": "openzeppelin_token::erc1155::erc1155::ERC1155Component::URI",
7938
+ "kind": "struct",
7939
+ "members": [
7940
+ {
7941
+ "name": "value",
7942
+ "type": "core::byte_array::ByteArray",
7943
+ "kind": "data"
7944
+ },
7945
+ {
7946
+ "name": "id",
7947
+ "type": "core::integer::u256",
7948
+ "kind": "key"
7949
+ }
7950
+ ]
7951
+ },
7952
+ {
7953
+ "type": "event",
7954
+ "name": "openzeppelin_token::erc1155::erc1155::ERC1155Component::Event",
7958
7955
  "kind": "enum",
7959
7956
  "variants": [
7960
7957
  {
7961
- "name": "Transfer",
7962
- "type": "openzeppelin_token::erc721::erc721::ERC721Component::Transfer",
7958
+ "name": "TransferSingle",
7959
+ "type": "openzeppelin_token::erc1155::erc1155::ERC1155Component::TransferSingle",
7963
7960
  "kind": "nested"
7964
7961
  },
7965
7962
  {
7966
- "name": "Approval",
7967
- "type": "openzeppelin_token::erc721::erc721::ERC721Component::Approval",
7963
+ "name": "TransferBatch",
7964
+ "type": "openzeppelin_token::erc1155::erc1155::ERC1155Component::TransferBatch",
7968
7965
  "kind": "nested"
7969
7966
  },
7970
7967
  {
7971
7968
  "name": "ApprovalForAll",
7972
- "type": "openzeppelin_token::erc721::erc721::ERC721Component::ApprovalForAll",
7969
+ "type": "openzeppelin_token::erc1155::erc1155::ERC1155Component::ApprovalForAll",
7970
+ "kind": "nested"
7971
+ },
7972
+ {
7973
+ "name": "URI",
7974
+ "type": "openzeppelin_token::erc1155::erc1155::ERC1155Component::URI",
7973
7975
  "kind": "nested"
7974
7976
  }
7975
7977
  ]
@@ -7982,153 +7984,123 @@ var IPClubNFTABI = [
7982
7984
  },
7983
7985
  {
7984
7986
  "type": "event",
7985
- "name": "ip_club::IPClubNFT::IPClubNFT::Event",
7986
- "kind": "enum",
7987
- "variants": [
7987
+ "name": "openzeppelin_access::ownable::ownable::OwnableComponent::OwnershipTransferred",
7988
+ "kind": "struct",
7989
+ "members": [
7988
7990
  {
7989
- "name": "ERC721Event",
7990
- "type": "openzeppelin_token::erc721::erc721::ERC721Component::Event",
7991
- "kind": "flat"
7991
+ "name": "previous_owner",
7992
+ "type": "core::starknet::contract_address::ContractAddress",
7993
+ "kind": "key"
7992
7994
  },
7993
7995
  {
7994
- "name": "SRC5Event",
7995
- "type": "openzeppelin_introspection::src5::SRC5Component::Event",
7996
- "kind": "flat"
7996
+ "name": "new_owner",
7997
+ "type": "core::starknet::contract_address::ContractAddress",
7998
+ "kind": "key"
7997
7999
  }
7998
8000
  ]
7999
- }
8000
- ];
8001
-
8002
- // src/starknet/abis/ipClubFactory.ts
8003
- var IPClubFactoryABI = [
8004
- {
8005
- "type": "impl",
8006
- "name": "IPClubFactoryImpl",
8007
- "interface_name": "ip_club::interface::IIPClubFactory"
8008
- },
8009
- {
8010
- "type": "struct",
8011
- "name": "core::byte_array::ByteArray",
8012
- "members": [
8013
- { "name": "data", "type": "core::array::Array::<core::bytes_31::bytes31>" },
8014
- { "name": "pending_word", "type": "core::felt252" },
8015
- { "name": "pending_word_len", "type": "core::internal::bounded_int::BoundedInt::<0, 30>" }
8016
- ]
8017
8001
  },
8018
8002
  {
8019
- "type": "struct",
8020
- "name": "core::integer::u256",
8003
+ "type": "event",
8004
+ "name": "openzeppelin_access::ownable::ownable::OwnableComponent::OwnershipTransferStarted",
8005
+ "kind": "struct",
8021
8006
  "members": [
8022
- { "name": "low", "type": "core::integer::u128" },
8023
- { "name": "high", "type": "core::integer::u128" }
8007
+ {
8008
+ "name": "previous_owner",
8009
+ "type": "core::starknet::contract_address::ContractAddress",
8010
+ "kind": "key"
8011
+ },
8012
+ {
8013
+ "name": "new_owner",
8014
+ "type": "core::starknet::contract_address::ContractAddress",
8015
+ "kind": "key"
8016
+ }
8024
8017
  ]
8025
8018
  },
8026
8019
  {
8027
- "type": "enum",
8028
- "name": "core::option::Option::<core::starknet::contract_address::ContractAddress>",
8020
+ "type": "event",
8021
+ "name": "openzeppelin_access::ownable::ownable::OwnableComponent::Event",
8022
+ "kind": "enum",
8029
8023
  "variants": [
8030
- { "name": "Some", "type": "core::starknet::contract_address::ContractAddress" },
8031
- { "name": "None", "type": "()" }
8024
+ {
8025
+ "name": "OwnershipTransferred",
8026
+ "type": "openzeppelin_access::ownable::ownable::OwnableComponent::OwnershipTransferred",
8027
+ "kind": "nested"
8028
+ },
8029
+ {
8030
+ "name": "OwnershipTransferStarted",
8031
+ "type": "openzeppelin_access::ownable::ownable::OwnableComponent::OwnershipTransferStarted",
8032
+ "kind": "nested"
8033
+ }
8032
8034
  ]
8033
8035
  },
8034
8036
  {
8035
- "type": "interface",
8036
- "name": "ip_club::interface::IIPClubFactory",
8037
- "items": [
8037
+ "type": "event",
8038
+ "name": "ip_club::IPClubCollection::IPClubCollection::MembershipCreated",
8039
+ "kind": "struct",
8040
+ "members": [
8038
8041
  {
8039
- "type": "function",
8040
- "name": "collection_class_hash",
8041
- "inputs": [],
8042
- "outputs": [{ "type": "core::starknet::class_hash::ClassHash" }],
8043
- "state_mutability": "view"
8044
- },
8042
+ "name": "token_id",
8043
+ "type": "core::integer::u256",
8044
+ "kind": "key"
8045
+ },
8045
8046
  {
8046
- "type": "function",
8047
- "name": "version",
8048
- "inputs": [],
8049
- "outputs": [{ "type": "core::byte_array::ByteArray" }],
8050
- "state_mutability": "view"
8047
+ "name": "max_supply",
8048
+ "type": "core::integer::u256",
8049
+ "kind": "data"
8051
8050
  },
8052
8051
  {
8053
- "type": "function",
8054
- "name": "deploy_club",
8055
- "inputs": [
8056
- { "name": "name", "type": "core::byte_array::ByteArray" },
8057
- { "name": "symbol", "type": "core::byte_array::ByteArray" },
8058
- { "name": "base_uri", "type": "core::byte_array::ByteArray" },
8059
- { "name": "max_supply", "type": "core::integer::u256" },
8060
- { "name": "entry_fee", "type": "core::integer::u256" },
8061
- { "name": "payment_token", "type": "core::option::Option::<core::starknet::contract_address::ContractAddress>" },
8062
- { "name": "royalty_bps", "type": "core::integer::u256" }
8063
- ],
8064
- "outputs": [{ "type": "core::starknet::contract_address::ContractAddress" }],
8065
- "state_mutability": "external"
8066
- }
8067
- ]
8068
- },
8069
- {
8070
- "type": "impl",
8071
- "name": "SRC5Impl",
8072
- "interface_name": "openzeppelin_introspection::interface::ISRC5"
8073
- },
8074
- {
8075
- "type": "enum",
8076
- "name": "core::bool",
8077
- "variants": [
8078
- { "name": "False", "type": "()" },
8079
- { "name": "True", "type": "()" }
8080
- ]
8081
- },
8082
- {
8083
- "type": "interface",
8084
- "name": "openzeppelin_introspection::interface::ISRC5",
8085
- "items": [
8052
+ "name": "start_time",
8053
+ "type": "core::option::Option::<core::integer::u64>",
8054
+ "kind": "data"
8055
+ },
8086
8056
  {
8087
- "type": "function",
8088
- "name": "supports_interface",
8089
- "inputs": [{ "name": "interface_id", "type": "core::felt252" }],
8090
- "outputs": [{ "type": "core::bool" }],
8091
- "state_mutability": "view"
8057
+ "name": "end_time",
8058
+ "type": "core::option::Option::<core::integer::u64>",
8059
+ "kind": "data"
8060
+ },
8061
+ {
8062
+ "name": "metadata_uri",
8063
+ "type": "core::byte_array::ByteArray",
8064
+ "kind": "data"
8065
+ },
8066
+ {
8067
+ "name": "created_at",
8068
+ "type": "core::integer::u64",
8069
+ "kind": "data"
8092
8070
  }
8093
8071
  ]
8094
8072
  },
8095
- {
8096
- "type": "constructor",
8097
- "name": "constructor",
8098
- "inputs": [
8099
- { "name": "collection_class_hash", "type": "core::starknet::class_hash::ClassHash" }
8100
- ]
8101
- },
8102
- {
8103
- "type": "event",
8104
- "name": "openzeppelin_introspection::src5::SRC5Component::Event",
8105
- "kind": "enum",
8106
- "variants": []
8107
- },
8108
- {
8109
- "type": "event",
8110
- "name": "ip_club::IPClubFactory::IPClubFactory::ClubDeployed",
8111
- "kind": "struct",
8112
- "members": [
8113
- { "name": "collection_address", "type": "core::starknet::contract_address::ContractAddress", "kind": "key" },
8114
- { "name": "owner", "type": "core::starknet::contract_address::ContractAddress", "kind": "key" },
8115
- { "name": "name", "type": "core::byte_array::ByteArray", "kind": "data" },
8116
- { "name": "symbol", "type": "core::byte_array::ByteArray", "kind": "data" }
8117
- ]
8118
- },
8119
8073
  {
8120
8074
  "type": "event",
8121
- "name": "ip_club::IPClubFactory::IPClubFactory::Event",
8075
+ "name": "ip_club::IPClubCollection::IPClubCollection::Event",
8122
8076
  "kind": "enum",
8123
8077
  "variants": [
8124
- { "name": "SRC5Event", "type": "openzeppelin_introspection::src5::SRC5Component::Event", "kind": "flat" },
8125
- { "name": "ClubDeployed", "type": "ip_club::IPClubFactory::IPClubFactory::ClubDeployed", "kind": "nested" }
8078
+ {
8079
+ "name": "ERC1155Event",
8080
+ "type": "openzeppelin_token::erc1155::erc1155::ERC1155Component::Event",
8081
+ "kind": "flat"
8082
+ },
8083
+ {
8084
+ "name": "SRC5Event",
8085
+ "type": "openzeppelin_introspection::src5::SRC5Component::Event",
8086
+ "kind": "flat"
8087
+ },
8088
+ {
8089
+ "name": "OwnableEvent",
8090
+ "type": "openzeppelin_access::ownable::ownable::OwnableComponent::Event",
8091
+ "kind": "flat"
8092
+ },
8093
+ {
8094
+ "name": "MembershipCreated",
8095
+ "type": "ip_club::IPClubCollection::IPClubCollection::MembershipCreated",
8096
+ "kind": "nested"
8097
+ }
8126
8098
  ]
8127
8099
  }
8128
8100
  ];
8129
8101
 
8130
- // src/starknet/abis/ipClubCollection.ts
8131
- var IPClubCollectionABI = [
8102
+ // src/starknet/abis/ipSponsorship.ts
8103
+ var IPSponsorshipABI = [
8132
8104
  {
8133
8105
  "type": "impl",
8134
8106
  "name": "ERC721MetadataImpl",
@@ -8239,8 +8211,8 @@ var IPClubCollectionABI = [
8239
8211
  },
8240
8212
  {
8241
8213
  "type": "impl",
8242
- "name": "IPClubCollectionImpl",
8243
- "interface_name": "ip_club::interface::IIPClubCollection"
8214
+ "name": "IPSponsorshipImpl",
8215
+ "interface_name": "ip_sponsorship::interface::IIPSponsorship"
8244
8216
  },
8245
8217
  {
8246
8218
  "type": "enum",
@@ -8270,17 +8242,149 @@ var IPClubCollectionABI = [
8270
8242
  }
8271
8243
  ]
8272
8244
  },
8245
+ {
8246
+ "type": "struct",
8247
+ "name": "ip_sponsorship::types::SponsorshipOffer",
8248
+ "members": [
8249
+ {
8250
+ "name": "author",
8251
+ "type": "core::starknet::contract_address::ContractAddress"
8252
+ },
8253
+ {
8254
+ "name": "nft_contract",
8255
+ "type": "core::starknet::contract_address::ContractAddress"
8256
+ },
8257
+ {
8258
+ "name": "token_id",
8259
+ "type": "core::integer::u256"
8260
+ },
8261
+ {
8262
+ "name": "min_amount",
8263
+ "type": "core::integer::u256"
8264
+ },
8265
+ {
8266
+ "name": "duration",
8267
+ "type": "core::integer::u64"
8268
+ },
8269
+ {
8270
+ "name": "payment_token",
8271
+ "type": "core::starknet::contract_address::ContractAddress"
8272
+ },
8273
+ {
8274
+ "name": "license_terms_uri",
8275
+ "type": "core::byte_array::ByteArray"
8276
+ },
8277
+ {
8278
+ "name": "transferable",
8279
+ "type": "core::bool"
8280
+ },
8281
+ {
8282
+ "name": "specific_sponsor",
8283
+ "type": "core::option::Option::<core::starknet::contract_address::ContractAddress>"
8284
+ },
8285
+ {
8286
+ "name": "open",
8287
+ "type": "core::bool"
8288
+ },
8289
+ {
8290
+ "name": "royalty_bps",
8291
+ "type": "core::integer::u256"
8292
+ }
8293
+ ]
8294
+ },
8295
+ {
8296
+ "type": "struct",
8297
+ "name": "ip_sponsorship::types::SponsorshipProposal",
8298
+ "members": [
8299
+ {
8300
+ "name": "proposer",
8301
+ "type": "core::starknet::contract_address::ContractAddress"
8302
+ },
8303
+ {
8304
+ "name": "nft_contract",
8305
+ "type": "core::starknet::contract_address::ContractAddress"
8306
+ },
8307
+ {
8308
+ "name": "token_id",
8309
+ "type": "core::integer::u256"
8310
+ },
8311
+ {
8312
+ "name": "amount",
8313
+ "type": "core::integer::u256"
8314
+ },
8315
+ {
8316
+ "name": "duration",
8317
+ "type": "core::integer::u64"
8318
+ },
8319
+ {
8320
+ "name": "valid_until",
8321
+ "type": "core::integer::u64"
8322
+ },
8323
+ {
8324
+ "name": "payment_token",
8325
+ "type": "core::starknet::contract_address::ContractAddress"
8326
+ },
8327
+ {
8328
+ "name": "license_terms_uri",
8329
+ "type": "core::byte_array::ByteArray"
8330
+ },
8331
+ {
8332
+ "name": "transferable",
8333
+ "type": "core::bool"
8334
+ },
8335
+ {
8336
+ "name": "open",
8337
+ "type": "core::bool"
8338
+ },
8339
+ {
8340
+ "name": "royalty_bps",
8341
+ "type": "core::integer::u256"
8342
+ }
8343
+ ]
8344
+ },
8273
8345
  {
8274
8346
  "type": "interface",
8275
- "name": "ip_club::interface::IIPClubCollection",
8347
+ "name": "ip_sponsorship::interface::IIPSponsorship",
8276
8348
  "items": [
8277
8349
  {
8278
8350
  "type": "function",
8279
- "name": "mint",
8351
+ "name": "create_offer",
8280
8352
  "inputs": [
8281
8353
  {
8282
- "name": "to",
8354
+ "name": "nft_contract",
8355
+ "type": "core::starknet::contract_address::ContractAddress"
8356
+ },
8357
+ {
8358
+ "name": "token_id",
8359
+ "type": "core::integer::u256"
8360
+ },
8361
+ {
8362
+ "name": "min_amount",
8363
+ "type": "core::integer::u256"
8364
+ },
8365
+ {
8366
+ "name": "duration",
8367
+ "type": "core::integer::u64"
8368
+ },
8369
+ {
8370
+ "name": "payment_token",
8283
8371
  "type": "core::starknet::contract_address::ContractAddress"
8372
+ },
8373
+ {
8374
+ "name": "license_terms_uri",
8375
+ "type": "core::byte_array::ByteArray"
8376
+ },
8377
+ {
8378
+ "name": "transferable",
8379
+ "type": "core::bool"
8380
+ },
8381
+ {
8382
+ "name": "royalty_bps",
8383
+ "type": "core::integer::u256"
8384
+ },
8385
+ {
8386
+ "name": "specific_sponsor",
8387
+ "type": "core::option::Option::<core::starknet::contract_address::ContractAddress>"
8284
8388
  }
8285
8389
  ],
8286
8390
  "outputs": [
@@ -8292,8 +8396,12 @@ var IPClubCollectionABI = [
8292
8396
  },
8293
8397
  {
8294
8398
  "type": "function",
8295
- "name": "set_open",
8399
+ "name": "set_offer_open",
8296
8400
  "inputs": [
8401
+ {
8402
+ "name": "offer_id",
8403
+ "type": "core::integer::u256"
8404
+ },
8297
8405
  {
8298
8406
  "name": "open",
8299
8407
  "type": "core::bool"
@@ -8304,40 +8412,91 @@ var IPClubCollectionABI = [
8304
8412
  },
8305
8413
  {
8306
8414
  "type": "function",
8307
- "name": "base_uri",
8308
- "inputs": [],
8309
- "outputs": [
8415
+ "name": "place_bid",
8416
+ "inputs": [
8310
8417
  {
8311
- "type": "core::byte_array::ByteArray"
8418
+ "name": "offer_id",
8419
+ "type": "core::integer::u256"
8420
+ },
8421
+ {
8422
+ "name": "amount",
8423
+ "type": "core::integer::u256"
8312
8424
  }
8313
8425
  ],
8314
- "state_mutability": "view"
8426
+ "outputs": [],
8427
+ "state_mutability": "external"
8315
8428
  },
8316
8429
  {
8317
8430
  "type": "function",
8318
- "name": "entry_fee",
8319
- "inputs": [],
8320
- "outputs": [
8321
- {
8431
+ "name": "retract_bid",
8432
+ "inputs": [
8433
+ {
8434
+ "name": "offer_id",
8435
+ "type": "core::integer::u256"
8436
+ }
8437
+ ],
8438
+ "outputs": [],
8439
+ "state_mutability": "external"
8440
+ },
8441
+ {
8442
+ "type": "function",
8443
+ "name": "accept_bid",
8444
+ "inputs": [
8445
+ {
8446
+ "name": "offer_id",
8447
+ "type": "core::integer::u256"
8448
+ },
8449
+ {
8450
+ "name": "sponsor",
8451
+ "type": "core::starknet::contract_address::ContractAddress"
8452
+ }
8453
+ ],
8454
+ "outputs": [
8455
+ {
8456
+ "type": "core::integer::u256"
8457
+ }
8458
+ ],
8459
+ "state_mutability": "external"
8460
+ },
8461
+ {
8462
+ "type": "function",
8463
+ "name": "get_offer",
8464
+ "inputs": [
8465
+ {
8466
+ "name": "offer_id",
8322
8467
  "type": "core::integer::u256"
8323
8468
  }
8324
8469
  ],
8470
+ "outputs": [
8471
+ {
8472
+ "type": "ip_sponsorship::types::SponsorshipOffer"
8473
+ }
8474
+ ],
8325
8475
  "state_mutability": "view"
8326
8476
  },
8327
8477
  {
8328
8478
  "type": "function",
8329
- "name": "payment_token",
8330
- "inputs": [],
8479
+ "name": "get_bid",
8480
+ "inputs": [
8481
+ {
8482
+ "name": "offer_id",
8483
+ "type": "core::integer::u256"
8484
+ },
8485
+ {
8486
+ "name": "sponsor",
8487
+ "type": "core::starknet::contract_address::ContractAddress"
8488
+ }
8489
+ ],
8331
8490
  "outputs": [
8332
8491
  {
8333
- "type": "core::option::Option::<core::starknet::contract_address::ContractAddress>"
8492
+ "type": "core::integer::u256"
8334
8493
  }
8335
8494
  ],
8336
8495
  "state_mutability": "view"
8337
8496
  },
8338
8497
  {
8339
8498
  "type": "function",
8340
- "name": "max_supply",
8499
+ "name": "get_last_offer_id",
8341
8500
  "inputs": [],
8342
8501
  "outputs": [
8343
8502
  {
@@ -8348,7 +8507,7 @@ var IPClubCollectionABI = [
8348
8507
  },
8349
8508
  {
8350
8509
  "type": "function",
8351
- "name": "total_minted",
8510
+ "name": "get_last_license_id",
8352
8511
  "inputs": [],
8353
8512
  "outputs": [
8354
8513
  {
@@ -8359,11 +8518,115 @@ var IPClubCollectionABI = [
8359
8518
  },
8360
8519
  {
8361
8520
  "type": "function",
8362
- "name": "is_open",
8521
+ "name": "propose_sponsorship",
8522
+ "inputs": [
8523
+ {
8524
+ "name": "nft_contract",
8525
+ "type": "core::starknet::contract_address::ContractAddress"
8526
+ },
8527
+ {
8528
+ "name": "token_id",
8529
+ "type": "core::integer::u256"
8530
+ },
8531
+ {
8532
+ "name": "amount",
8533
+ "type": "core::integer::u256"
8534
+ },
8535
+ {
8536
+ "name": "duration",
8537
+ "type": "core::integer::u64"
8538
+ },
8539
+ {
8540
+ "name": "valid_until",
8541
+ "type": "core::integer::u64"
8542
+ },
8543
+ {
8544
+ "name": "payment_token",
8545
+ "type": "core::starknet::contract_address::ContractAddress"
8546
+ },
8547
+ {
8548
+ "name": "license_terms_uri",
8549
+ "type": "core::byte_array::ByteArray"
8550
+ },
8551
+ {
8552
+ "name": "transferable",
8553
+ "type": "core::bool"
8554
+ },
8555
+ {
8556
+ "name": "royalty_bps",
8557
+ "type": "core::integer::u256"
8558
+ }
8559
+ ],
8560
+ "outputs": [
8561
+ {
8562
+ "type": "core::integer::u256"
8563
+ }
8564
+ ],
8565
+ "state_mutability": "external"
8566
+ },
8567
+ {
8568
+ "type": "function",
8569
+ "name": "withdraw_proposal",
8570
+ "inputs": [
8571
+ {
8572
+ "name": "proposal_id",
8573
+ "type": "core::integer::u256"
8574
+ }
8575
+ ],
8576
+ "outputs": [],
8577
+ "state_mutability": "external"
8578
+ },
8579
+ {
8580
+ "type": "function",
8581
+ "name": "accept_proposal",
8582
+ "inputs": [
8583
+ {
8584
+ "name": "proposal_id",
8585
+ "type": "core::integer::u256"
8586
+ }
8587
+ ],
8588
+ "outputs": [
8589
+ {
8590
+ "type": "core::integer::u256"
8591
+ }
8592
+ ],
8593
+ "state_mutability": "external"
8594
+ },
8595
+ {
8596
+ "type": "function",
8597
+ "name": "reject_proposal",
8598
+ "inputs": [
8599
+ {
8600
+ "name": "proposal_id",
8601
+ "type": "core::integer::u256"
8602
+ }
8603
+ ],
8604
+ "outputs": [],
8605
+ "state_mutability": "external"
8606
+ },
8607
+ {
8608
+ "type": "function",
8609
+ "name": "get_proposal",
8610
+ "inputs": [
8611
+ {
8612
+ "name": "proposal_id",
8613
+ "type": "core::integer::u256"
8614
+ }
8615
+ ],
8616
+ "outputs": [
8617
+ {
8618
+ "type": "ip_sponsorship::types::SponsorshipProposal"
8619
+ }
8620
+ ],
8621
+ "state_mutability": "view"
8622
+ },
8623
+ {
8624
+ "type": "function",
8625
+ "name": "get_last_proposal_id",
8363
8626
  "inputs": [],
8364
8627
  "outputs": [
8365
8628
  {
8366
- "type": "core::bool"
8629
+ "type": "core::integer::u256"
8367
8630
  }
8368
8631
  ],
8369
8632
  "state_mutability": "view"
@@ -8752,66 +9015,6 @@ var IPClubCollectionABI = [
8752
9015
  }
8753
9016
  ]
8754
9017
  },
8755
- {
8756
- "type": "impl",
8757
- "name": "OwnableMixinImpl",
8758
- "interface_name": "openzeppelin_access::ownable::interface::OwnableABI"
8759
- },
8760
- {
8761
- "type": "interface",
8762
- "name": "openzeppelin_access::ownable::interface::OwnableABI",
8763
- "items": [
8764
- {
8765
- "type": "function",
8766
- "name": "owner",
8767
- "inputs": [],
8768
- "outputs": [
8769
- {
8770
- "type": "core::starknet::contract_address::ContractAddress"
8771
- }
8772
- ],
8773
- "state_mutability": "view"
8774
- },
8775
- {
8776
- "type": "function",
8777
- "name": "transfer_ownership",
8778
- "inputs": [
8779
- {
8780
- "name": "new_owner",
8781
- "type": "core::starknet::contract_address::ContractAddress"
8782
- }
8783
- ],
8784
- "outputs": [],
8785
- "state_mutability": "external"
8786
- },
8787
- {
8788
- "type": "function",
8789
- "name": "renounce_ownership",
8790
- "inputs": [],
8791
- "outputs": [],
8792
- "state_mutability": "external"
8793
- },
8794
- {
8795
- "type": "function",
8796
- "name": "transferOwnership",
8797
- "inputs": [
8798
- {
8799
- "name": "newOwner",
8800
- "type": "core::starknet::contract_address::ContractAddress"
8801
- }
8802
- ],
8803
- "outputs": [],
8804
- "state_mutability": "external"
8805
- },
8806
- {
8807
- "type": "function",
8808
- "name": "renounceOwnership",
8809
- "inputs": [],
8810
- "outputs": [],
8811
- "state_mutability": "external"
8812
- }
8813
- ]
8814
- },
8815
9018
  {
8816
9019
  "type": "constructor",
8817
9020
  "name": "constructor",
@@ -8823,30 +9026,6 @@ var IPClubCollectionABI = [
8823
9026
  {
8824
9027
  "name": "symbol",
8825
9028
  "type": "core::byte_array::ByteArray"
8826
- },
8827
- {
8828
- "name": "base_uri",
8829
- "type": "core::byte_array::ByteArray"
8830
- },
8831
- {
8832
- "name": "max_supply",
8833
- "type": "core::integer::u256"
8834
- },
8835
- {
8836
- "name": "entry_fee",
8837
- "type": "core::integer::u256"
8838
- },
8839
- {
8840
- "name": "payment_token",
8841
- "type": "core::option::Option::<core::starknet::contract_address::ContractAddress>"
8842
- },
8843
- {
8844
- "name": "royalty_bps",
8845
- "type": "core::integer::u256"
8846
- },
8847
- {
8848
- "name": "owner",
8849
- "type": "core::starknet::contract_address::ContractAddress"
8850
9029
  }
8851
9030
  ]
8852
9031
  },
@@ -8946,1521 +9125,308 @@ var IPClubCollectionABI = [
8946
9125
  },
8947
9126
  {
8948
9127
  "type": "event",
8949
- "name": "openzeppelin_access::ownable::ownable::OwnableComponent::OwnershipTransferred",
9128
+ "name": "ip_sponsorship::IPSponsorship::IPSponsorship::OfferCreated",
8950
9129
  "kind": "struct",
8951
9130
  "members": [
8952
9131
  {
8953
- "name": "previous_owner",
8954
- "type": "core::starknet::contract_address::ContractAddress",
9132
+ "name": "offer_id",
9133
+ "type": "core::integer::u256",
8955
9134
  "kind": "key"
8956
9135
  },
8957
9136
  {
8958
- "name": "new_owner",
9137
+ "name": "author",
8959
9138
  "type": "core::starknet::contract_address::ContractAddress",
8960
9139
  "kind": "key"
8961
- }
8962
- ]
8963
- },
8964
- {
8965
- "type": "event",
8966
- "name": "openzeppelin_access::ownable::ownable::OwnableComponent::OwnershipTransferStarted",
8967
- "kind": "struct",
8968
- "members": [
9140
+ },
8969
9141
  {
8970
- "name": "previous_owner",
8971
- "type": "core::starknet::contract_address::ContractAddress",
8972
- "kind": "key"
8973
- },
8974
- {
8975
- "name": "new_owner",
9142
+ "name": "nft_contract",
8976
9143
  "type": "core::starknet::contract_address::ContractAddress",
8977
9144
  "kind": "key"
8978
- }
8979
- ]
8980
- },
8981
- {
8982
- "type": "event",
8983
- "name": "openzeppelin_access::ownable::ownable::OwnableComponent::Event",
8984
- "kind": "enum",
8985
- "variants": [
8986
- {
8987
- "name": "OwnershipTransferred",
8988
- "type": "openzeppelin_access::ownable::ownable::OwnableComponent::OwnershipTransferred",
8989
- "kind": "nested"
8990
9145
  },
8991
- {
8992
- "name": "OwnershipTransferStarted",
8993
- "type": "openzeppelin_access::ownable::ownable::OwnableComponent::OwnershipTransferStarted",
8994
- "kind": "nested"
8995
- }
8996
- ]
8997
- },
8998
- {
8999
- "type": "event",
9000
- "name": "ip_club::IPClubCollection::IPClubCollection::MemberMinted",
9001
- "kind": "struct",
9002
- "members": [
9003
9146
  {
9004
9147
  "name": "token_id",
9005
9148
  "type": "core::integer::u256",
9006
- "kind": "key"
9149
+ "kind": "data"
9007
9150
  },
9008
9151
  {
9009
- "name": "to",
9010
- "type": "core::starknet::contract_address::ContractAddress",
9011
- "kind": "key"
9152
+ "name": "min_amount",
9153
+ "type": "core::integer::u256",
9154
+ "kind": "data"
9012
9155
  },
9013
9156
  {
9014
- "name": "payer",
9015
- "type": "core::starknet::contract_address::ContractAddress",
9157
+ "name": "duration",
9158
+ "type": "core::integer::u64",
9016
9159
  "kind": "data"
9017
- }
9018
- ]
9019
- },
9020
- {
9021
- "type": "event",
9022
- "name": "ip_club::IPClubCollection::IPClubCollection::OpenStatusChanged",
9023
- "kind": "struct",
9024
- "members": [
9160
+ },
9025
9161
  {
9026
- "name": "open",
9027
- "type": "core::bool",
9162
+ "name": "payment_token",
9163
+ "type": "core::starknet::contract_address::ContractAddress",
9028
9164
  "kind": "data"
9029
- }
9030
- ]
9031
- },
9032
- {
9033
- "type": "event",
9034
- "name": "ip_club::IPClubCollection::IPClubCollection::Event",
9035
- "kind": "enum",
9036
- "variants": [
9037
- {
9038
- "name": "ERC721Event",
9039
- "type": "openzeppelin_token::erc721::erc721::ERC721Component::Event",
9040
- "kind": "flat"
9041
9165
  },
9042
9166
  {
9043
- "name": "SRC5Event",
9044
- "type": "openzeppelin_introspection::src5::SRC5Component::Event",
9045
- "kind": "flat"
9167
+ "name": "license_terms_uri",
9168
+ "type": "core::byte_array::ByteArray",
9169
+ "kind": "data"
9046
9170
  },
9047
9171
  {
9048
- "name": "OwnableEvent",
9049
- "type": "openzeppelin_access::ownable::ownable::OwnableComponent::Event",
9050
- "kind": "flat"
9172
+ "name": "transferable",
9173
+ "type": "core::bool",
9174
+ "kind": "data"
9051
9175
  },
9052
9176
  {
9053
- "name": "MemberMinted",
9054
- "type": "ip_club::IPClubCollection::IPClubCollection::MemberMinted",
9055
- "kind": "nested"
9177
+ "name": "royalty_bps",
9178
+ "type": "core::integer::u256",
9179
+ "kind": "data"
9056
9180
  },
9057
9181
  {
9058
- "name": "OpenStatusChanged",
9059
- "type": "ip_club::IPClubCollection::IPClubCollection::OpenStatusChanged",
9060
- "kind": "nested"
9061
- }
9062
- ]
9063
- }
9064
- ];
9065
-
9066
- // src/starknet/abis/ipSponsorship.ts
9067
- var IPSponsorshipABI = [
9068
- {
9069
- "type": "impl",
9070
- "name": "IPSponsorshipImpl",
9071
- "interface_name": "ip_sponsorship::interface::IIPSponsorship"
9072
- },
9073
- {
9074
- "type": "struct",
9075
- "name": "core::integer::u256",
9076
- "members": [
9077
- {
9078
- "name": "low",
9079
- "type": "core::integer::u128"
9182
+ "name": "specific_sponsor",
9183
+ "type": "core::option::Option::<core::starknet::contract_address::ContractAddress>",
9184
+ "kind": "data"
9080
9185
  },
9081
9186
  {
9082
- "name": "high",
9083
- "type": "core::integer::u128"
9187
+ "name": "created_at",
9188
+ "type": "core::integer::u64",
9189
+ "kind": "data"
9084
9190
  }
9085
9191
  ]
9086
9192
  },
9087
9193
  {
9088
- "type": "struct",
9089
- "name": "core::byte_array::ByteArray",
9194
+ "type": "event",
9195
+ "name": "ip_sponsorship::IPSponsorship::IPSponsorship::OfferStatusUpdated",
9196
+ "kind": "struct",
9090
9197
  "members": [
9091
9198
  {
9092
- "name": "data",
9093
- "type": "core::array::Array::<core::bytes_31::bytes31>"
9199
+ "name": "offer_id",
9200
+ "type": "core::integer::u256",
9201
+ "kind": "key"
9094
9202
  },
9095
9203
  {
9096
- "name": "pending_word",
9097
- "type": "core::felt252"
9204
+ "name": "open",
9205
+ "type": "core::bool",
9206
+ "kind": "data"
9098
9207
  },
9099
9208
  {
9100
- "name": "pending_word_len",
9101
- "type": "core::internal::bounded_int::BoundedInt::<0, 30>"
9209
+ "name": "updated_at",
9210
+ "type": "core::integer::u64",
9211
+ "kind": "data"
9102
9212
  }
9103
9213
  ]
9104
9214
  },
9105
9215
  {
9106
- "type": "enum",
9107
- "name": "core::bool",
9108
- "variants": [
9216
+ "type": "event",
9217
+ "name": "ip_sponsorship::IPSponsorship::IPSponsorship::BidPlaced",
9218
+ "kind": "struct",
9219
+ "members": [
9109
9220
  {
9110
- "name": "False",
9111
- "type": "()"
9221
+ "name": "offer_id",
9222
+ "type": "core::integer::u256",
9223
+ "kind": "key"
9112
9224
  },
9113
9225
  {
9114
- "name": "True",
9115
- "type": "()"
9116
- }
9117
- ]
9118
- },
9119
- {
9120
- "type": "enum",
9121
- "name": "core::option::Option::<core::starknet::contract_address::ContractAddress>",
9122
- "variants": [
9226
+ "name": "sponsor",
9227
+ "type": "core::starknet::contract_address::ContractAddress",
9228
+ "kind": "key"
9229
+ },
9123
9230
  {
9124
- "name": "Some",
9125
- "type": "core::starknet::contract_address::ContractAddress"
9231
+ "name": "amount",
9232
+ "type": "core::integer::u256",
9233
+ "kind": "data"
9126
9234
  },
9127
9235
  {
9128
- "name": "None",
9129
- "type": "()"
9236
+ "name": "bid_at",
9237
+ "type": "core::integer::u64",
9238
+ "kind": "data"
9130
9239
  }
9131
9240
  ]
9132
9241
  },
9133
9242
  {
9134
- "type": "struct",
9135
- "name": "ip_sponsorship::types::SponsorshipOffer",
9243
+ "type": "event",
9244
+ "name": "ip_sponsorship::IPSponsorship::IPSponsorship::BidRetracted",
9245
+ "kind": "struct",
9136
9246
  "members": [
9137
9247
  {
9138
- "name": "author",
9139
- "type": "core::starknet::contract_address::ContractAddress"
9140
- },
9141
- {
9142
- "name": "nft_contract",
9143
- "type": "core::starknet::contract_address::ContractAddress"
9144
- },
9145
- {
9146
- "name": "token_id",
9147
- "type": "core::integer::u256"
9148
- },
9149
- {
9150
- "name": "min_amount",
9151
- "type": "core::integer::u256"
9152
- },
9153
- {
9154
- "name": "duration",
9155
- "type": "core::integer::u64"
9156
- },
9157
- {
9158
- "name": "payment_token",
9159
- "type": "core::starknet::contract_address::ContractAddress"
9160
- },
9161
- {
9162
- "name": "license_terms_uri",
9163
- "type": "core::byte_array::ByteArray"
9164
- },
9165
- {
9166
- "name": "transferable",
9167
- "type": "core::bool"
9248
+ "name": "offer_id",
9249
+ "type": "core::integer::u256",
9250
+ "kind": "key"
9168
9251
  },
9169
9252
  {
9170
- "name": "specific_sponsor",
9171
- "type": "core::option::Option::<core::starknet::contract_address::ContractAddress>"
9253
+ "name": "sponsor",
9254
+ "type": "core::starknet::contract_address::ContractAddress",
9255
+ "kind": "key"
9172
9256
  },
9173
9257
  {
9174
- "name": "open",
9175
- "type": "core::bool"
9258
+ "name": "retracted_at",
9259
+ "type": "core::integer::u64",
9260
+ "kind": "data"
9176
9261
  }
9177
9262
  ]
9178
9263
  },
9179
9264
  {
9180
- "type": "struct",
9181
- "name": "ip_sponsorship::types::License",
9265
+ "type": "event",
9266
+ "name": "ip_sponsorship::IPSponsorship::IPSponsorship::SponsorshipAccepted",
9267
+ "kind": "struct",
9182
9268
  "members": [
9183
9269
  {
9184
- "name": "author",
9185
- "type": "core::starknet::contract_address::ContractAddress"
9186
- },
9187
- {
9188
- "name": "sponsor",
9189
- "type": "core::starknet::contract_address::ContractAddress"
9190
- },
9191
- {
9192
- "name": "nft_contract",
9193
- "type": "core::starknet::contract_address::ContractAddress"
9270
+ "name": "offer_id",
9271
+ "type": "core::integer::u256",
9272
+ "kind": "key"
9194
9273
  },
9195
9274
  {
9196
- "name": "token_id",
9197
- "type": "core::integer::u256"
9275
+ "name": "license_id",
9276
+ "type": "core::integer::u256",
9277
+ "kind": "key"
9198
9278
  },
9199
9279
  {
9200
- "name": "amount_paid",
9201
- "type": "core::integer::u256"
9280
+ "name": "sponsor",
9281
+ "type": "core::starknet::contract_address::ContractAddress",
9282
+ "kind": "key"
9202
9283
  },
9203
9284
  {
9204
- "name": "expires_at",
9205
- "type": "core::integer::u64"
9285
+ "name": "author",
9286
+ "type": "core::starknet::contract_address::ContractAddress",
9287
+ "kind": "data"
9206
9288
  },
9207
9289
  {
9208
- "name": "transferable",
9209
- "type": "core::bool"
9290
+ "name": "amount",
9291
+ "type": "core::integer::u256",
9292
+ "kind": "data"
9210
9293
  },
9211
- {
9212
- "name": "license_terms_uri",
9213
- "type": "core::byte_array::ByteArray"
9214
- }
9215
- ]
9216
- },
9217
- {
9218
- "type": "interface",
9219
- "name": "ip_sponsorship::interface::IIPSponsorship",
9220
- "items": [
9221
- {
9222
- "type": "function",
9223
- "name": "create_offer",
9224
- "inputs": [
9225
- {
9226
- "name": "nft_contract",
9227
- "type": "core::starknet::contract_address::ContractAddress"
9228
- },
9229
- {
9230
- "name": "token_id",
9231
- "type": "core::integer::u256"
9232
- },
9233
- {
9234
- "name": "min_amount",
9235
- "type": "core::integer::u256"
9236
- },
9237
- {
9238
- "name": "duration",
9239
- "type": "core::integer::u64"
9240
- },
9241
- {
9242
- "name": "payment_token",
9243
- "type": "core::starknet::contract_address::ContractAddress"
9244
- },
9245
- {
9246
- "name": "license_terms_uri",
9247
- "type": "core::byte_array::ByteArray"
9248
- },
9249
- {
9250
- "name": "transferable",
9251
- "type": "core::bool"
9252
- },
9253
- {
9254
- "name": "specific_sponsor",
9255
- "type": "core::option::Option::<core::starknet::contract_address::ContractAddress>"
9256
- }
9257
- ],
9258
- "outputs": [
9259
- {
9260
- "type": "core::integer::u256"
9261
- }
9262
- ],
9263
- "state_mutability": "external"
9264
- },
9265
- {
9266
- "type": "function",
9267
- "name": "set_offer_open",
9268
- "inputs": [
9269
- {
9270
- "name": "offer_id",
9271
- "type": "core::integer::u256"
9272
- },
9273
- {
9274
- "name": "open",
9275
- "type": "core::bool"
9276
- }
9277
- ],
9278
- "outputs": [],
9279
- "state_mutability": "external"
9280
- },
9281
- {
9282
- "type": "function",
9283
- "name": "place_bid",
9284
- "inputs": [
9285
- {
9286
- "name": "offer_id",
9287
- "type": "core::integer::u256"
9288
- },
9289
- {
9290
- "name": "amount",
9291
- "type": "core::integer::u256"
9292
- }
9293
- ],
9294
- "outputs": [],
9295
- "state_mutability": "external"
9296
- },
9297
- {
9298
- "type": "function",
9299
- "name": "retract_bid",
9300
- "inputs": [
9301
- {
9302
- "name": "offer_id",
9303
- "type": "core::integer::u256"
9304
- }
9305
- ],
9306
- "outputs": [],
9307
- "state_mutability": "external"
9308
- },
9309
- {
9310
- "type": "function",
9311
- "name": "accept_bid",
9312
- "inputs": [
9313
- {
9314
- "name": "offer_id",
9315
- "type": "core::integer::u256"
9316
- },
9317
- {
9318
- "name": "sponsor",
9319
- "type": "core::starknet::contract_address::ContractAddress"
9320
- }
9321
- ],
9322
- "outputs": [
9323
- {
9324
- "type": "core::integer::u256"
9325
- }
9326
- ],
9327
- "state_mutability": "external"
9328
- },
9329
- {
9330
- "type": "function",
9331
- "name": "transfer_license",
9332
- "inputs": [
9333
- {
9334
- "name": "license_id",
9335
- "type": "core::integer::u256"
9336
- },
9337
- {
9338
- "name": "to",
9339
- "type": "core::starknet::contract_address::ContractAddress"
9340
- }
9341
- ],
9342
- "outputs": [],
9343
- "state_mutability": "external"
9344
- },
9345
- {
9346
- "type": "function",
9347
- "name": "get_offer",
9348
- "inputs": [
9349
- {
9350
- "name": "offer_id",
9351
- "type": "core::integer::u256"
9352
- }
9353
- ],
9354
- "outputs": [
9355
- {
9356
- "type": "ip_sponsorship::types::SponsorshipOffer"
9357
- }
9358
- ],
9359
- "state_mutability": "view"
9360
- },
9361
- {
9362
- "type": "function",
9363
- "name": "get_bid",
9364
- "inputs": [
9365
- {
9366
- "name": "offer_id",
9367
- "type": "core::integer::u256"
9368
- },
9369
- {
9370
- "name": "sponsor",
9371
- "type": "core::starknet::contract_address::ContractAddress"
9372
- }
9373
- ],
9374
- "outputs": [
9375
- {
9376
- "type": "core::integer::u256"
9377
- }
9378
- ],
9379
- "state_mutability": "view"
9380
- },
9381
- {
9382
- "type": "function",
9383
- "name": "get_license",
9384
- "inputs": [
9385
- {
9386
- "name": "license_id",
9387
- "type": "core::integer::u256"
9388
- }
9389
- ],
9390
- "outputs": [
9391
- {
9392
- "type": "ip_sponsorship::types::License"
9393
- }
9394
- ],
9395
- "state_mutability": "view"
9396
- },
9397
- {
9398
- "type": "function",
9399
- "name": "is_license_valid",
9400
- "inputs": [
9401
- {
9402
- "name": "license_id",
9403
- "type": "core::integer::u256"
9404
- }
9405
- ],
9406
- "outputs": [
9407
- {
9408
- "type": "core::bool"
9409
- }
9410
- ],
9411
- "state_mutability": "view"
9412
- },
9413
- {
9414
- "type": "function",
9415
- "name": "get_last_offer_id",
9416
- "inputs": [],
9417
- "outputs": [
9418
- {
9419
- "type": "core::integer::u256"
9420
- }
9421
- ],
9422
- "state_mutability": "view"
9423
- },
9424
- {
9425
- "type": "function",
9426
- "name": "get_last_license_id",
9427
- "inputs": [],
9428
- "outputs": [
9429
- {
9430
- "type": "core::integer::u256"
9431
- }
9432
- ],
9433
- "state_mutability": "view"
9434
- }
9435
- ]
9436
- },
9437
- {
9438
- "type": "impl",
9439
- "name": "SRC5Impl",
9440
- "interface_name": "openzeppelin_introspection::interface::ISRC5"
9441
- },
9442
- {
9443
- "type": "interface",
9444
- "name": "openzeppelin_introspection::interface::ISRC5",
9445
- "items": [
9446
- {
9447
- "type": "function",
9448
- "name": "supports_interface",
9449
- "inputs": [
9450
- {
9451
- "name": "interface_id",
9452
- "type": "core::felt252"
9453
- }
9454
- ],
9455
- "outputs": [
9456
- {
9457
- "type": "core::bool"
9458
- }
9459
- ],
9460
- "state_mutability": "view"
9461
- }
9462
- ]
9463
- },
9464
- {
9465
- "type": "constructor",
9466
- "name": "constructor",
9467
- "inputs": []
9468
- },
9469
- {
9470
- "type": "event",
9471
- "name": "openzeppelin_introspection::src5::SRC5Component::Event",
9472
- "kind": "enum",
9473
- "variants": []
9474
- },
9475
- {
9476
- "type": "event",
9477
- "name": "ip_sponsorship::IPSponsorship::IPSponsorship::OfferCreated",
9478
- "kind": "struct",
9479
- "members": [
9480
- {
9481
- "name": "offer_id",
9482
- "type": "core::integer::u256",
9483
- "kind": "key"
9484
- },
9485
- {
9486
- "name": "author",
9487
- "type": "core::starknet::contract_address::ContractAddress",
9488
- "kind": "key"
9489
- },
9490
- {
9491
- "name": "nft_contract",
9492
- "type": "core::starknet::contract_address::ContractAddress",
9493
- "kind": "key"
9494
- },
9495
- {
9496
- "name": "token_id",
9497
- "type": "core::integer::u256",
9498
- "kind": "data"
9499
- },
9500
- {
9501
- "name": "min_amount",
9502
- "type": "core::integer::u256",
9503
- "kind": "data"
9504
- },
9505
- {
9506
- "name": "duration",
9507
- "type": "core::integer::u64",
9508
- "kind": "data"
9509
- },
9510
- {
9511
- "name": "payment_token",
9512
- "type": "core::starknet::contract_address::ContractAddress",
9513
- "kind": "data"
9514
- },
9515
- {
9516
- "name": "license_terms_uri",
9517
- "type": "core::byte_array::ByteArray",
9518
- "kind": "data"
9519
- },
9520
- {
9521
- "name": "transferable",
9522
- "type": "core::bool",
9523
- "kind": "data"
9524
- },
9525
- {
9526
- "name": "specific_sponsor",
9527
- "type": "core::option::Option::<core::starknet::contract_address::ContractAddress>",
9528
- "kind": "data"
9529
- },
9530
- {
9531
- "name": "created_at",
9532
- "type": "core::integer::u64",
9533
- "kind": "data"
9534
- }
9535
- ]
9536
- },
9537
- {
9538
- "type": "event",
9539
- "name": "ip_sponsorship::IPSponsorship::IPSponsorship::OfferStatusUpdated",
9540
- "kind": "struct",
9541
- "members": [
9542
- {
9543
- "name": "offer_id",
9544
- "type": "core::integer::u256",
9545
- "kind": "key"
9546
- },
9547
- {
9548
- "name": "open",
9549
- "type": "core::bool",
9550
- "kind": "data"
9551
- },
9552
- {
9553
- "name": "updated_at",
9554
- "type": "core::integer::u64",
9555
- "kind": "data"
9556
- }
9557
- ]
9558
- },
9559
- {
9560
- "type": "event",
9561
- "name": "ip_sponsorship::IPSponsorship::IPSponsorship::BidPlaced",
9562
- "kind": "struct",
9563
- "members": [
9564
- {
9565
- "name": "offer_id",
9566
- "type": "core::integer::u256",
9567
- "kind": "key"
9568
- },
9569
- {
9570
- "name": "sponsor",
9571
- "type": "core::starknet::contract_address::ContractAddress",
9572
- "kind": "key"
9573
- },
9574
- {
9575
- "name": "amount",
9576
- "type": "core::integer::u256",
9577
- "kind": "data"
9578
- },
9579
- {
9580
- "name": "bid_at",
9581
- "type": "core::integer::u64",
9582
- "kind": "data"
9583
- }
9584
- ]
9585
- },
9586
- {
9587
- "type": "event",
9588
- "name": "ip_sponsorship::IPSponsorship::IPSponsorship::BidRetracted",
9589
- "kind": "struct",
9590
- "members": [
9591
- {
9592
- "name": "offer_id",
9593
- "type": "core::integer::u256",
9594
- "kind": "key"
9595
- },
9596
- {
9597
- "name": "sponsor",
9598
- "type": "core::starknet::contract_address::ContractAddress",
9599
- "kind": "key"
9600
- },
9601
- {
9602
- "name": "retracted_at",
9603
- "type": "core::integer::u64",
9604
- "kind": "data"
9605
- }
9606
- ]
9607
- },
9608
- {
9609
- "type": "event",
9610
- "name": "ip_sponsorship::IPSponsorship::IPSponsorship::SponsorshipAccepted",
9611
- "kind": "struct",
9612
- "members": [
9613
- {
9614
- "name": "offer_id",
9615
- "type": "core::integer::u256",
9616
- "kind": "key"
9617
- },
9618
- {
9619
- "name": "license_id",
9620
- "type": "core::integer::u256",
9621
- "kind": "key"
9622
- },
9623
- {
9624
- "name": "sponsor",
9625
- "type": "core::starknet::contract_address::ContractAddress",
9626
- "kind": "key"
9627
- },
9628
- {
9629
- "name": "author",
9630
- "type": "core::starknet::contract_address::ContractAddress",
9631
- "kind": "data"
9632
- },
9633
- {
9634
- "name": "amount",
9635
- "type": "core::integer::u256",
9636
- "kind": "data"
9637
- },
9638
- {
9639
- "name": "expires_at",
9640
- "type": "core::integer::u64",
9641
- "kind": "data"
9642
- }
9643
- ]
9644
- },
9645
- {
9646
- "type": "event",
9647
- "name": "ip_sponsorship::IPSponsorship::IPSponsorship::LicenseTransferred",
9648
- "kind": "struct",
9649
- "members": [
9650
- {
9651
- "name": "license_id",
9652
- "type": "core::integer::u256",
9653
- "kind": "key"
9654
- },
9655
- {
9656
- "name": "from",
9657
- "type": "core::starknet::contract_address::ContractAddress",
9658
- "kind": "key"
9659
- },
9660
- {
9661
- "name": "to",
9662
- "type": "core::starknet::contract_address::ContractAddress",
9663
- "kind": "key"
9664
- },
9665
- {
9666
- "name": "transferred_at",
9667
- "type": "core::integer::u64",
9668
- "kind": "data"
9669
- }
9670
- ]
9671
- },
9672
- {
9673
- "type": "event",
9674
- "name": "ip_sponsorship::IPSponsorship::IPSponsorship::Event",
9675
- "kind": "enum",
9676
- "variants": [
9677
- {
9678
- "name": "SRC5Event",
9679
- "type": "openzeppelin_introspection::src5::SRC5Component::Event",
9680
- "kind": "flat"
9681
- },
9682
- {
9683
- "name": "OfferCreated",
9684
- "type": "ip_sponsorship::IPSponsorship::IPSponsorship::OfferCreated",
9685
- "kind": "nested"
9686
- },
9687
- {
9688
- "name": "OfferStatusUpdated",
9689
- "type": "ip_sponsorship::IPSponsorship::IPSponsorship::OfferStatusUpdated",
9690
- "kind": "nested"
9691
- },
9692
- {
9693
- "name": "BidPlaced",
9694
- "type": "ip_sponsorship::IPSponsorship::IPSponsorship::BidPlaced",
9695
- "kind": "nested"
9696
- },
9697
- {
9698
- "name": "BidRetracted",
9699
- "type": "ip_sponsorship::IPSponsorship::IPSponsorship::BidRetracted",
9700
- "kind": "nested"
9701
- },
9702
- {
9703
- "name": "SponsorshipAccepted",
9704
- "type": "ip_sponsorship::IPSponsorship::IPSponsorship::SponsorshipAccepted",
9705
- "kind": "nested"
9706
- },
9707
- {
9708
- "name": "LicenseTransferred",
9709
- "type": "ip_sponsorship::IPSponsorship::IPSponsorship::LicenseTransferred",
9710
- "kind": "nested"
9711
- }
9712
- ]
9713
- }
9714
- ];
9715
-
9716
- // src/starknet/abis/ipSponsorshipLicense.ts
9717
- var IPSponsorshipLicenseABI = [
9718
- {
9719
- "type": "impl",
9720
- "name": "ERC721MetadataImpl",
9721
- "interface_name": "openzeppelin_token::erc721::interface::IERC721Metadata"
9722
- },
9723
- {
9724
- "type": "struct",
9725
- "name": "core::byte_array::ByteArray",
9726
- "members": [
9727
- {
9728
- "name": "data",
9729
- "type": "core::array::Array::<core::bytes_31::bytes31>"
9730
- },
9731
- {
9732
- "name": "pending_word",
9733
- "type": "core::felt252"
9734
- },
9735
- {
9736
- "name": "pending_word_len",
9737
- "type": "core::internal::bounded_int::BoundedInt::<0, 30>"
9738
- }
9739
- ]
9740
- },
9741
- {
9742
- "type": "struct",
9743
- "name": "core::integer::u256",
9744
- "members": [
9745
- {
9746
- "name": "low",
9747
- "type": "core::integer::u128"
9748
- },
9749
- {
9750
- "name": "high",
9751
- "type": "core::integer::u128"
9752
- }
9753
- ]
9754
- },
9755
- {
9756
- "type": "interface",
9757
- "name": "openzeppelin_token::erc721::interface::IERC721Metadata",
9758
- "items": [
9759
- {
9760
- "type": "function",
9761
- "name": "name",
9762
- "inputs": [],
9763
- "outputs": [
9764
- {
9765
- "type": "core::byte_array::ByteArray"
9766
- }
9767
- ],
9768
- "state_mutability": "view"
9769
- },
9770
- {
9771
- "type": "function",
9772
- "name": "symbol",
9773
- "inputs": [],
9774
- "outputs": [
9775
- {
9776
- "type": "core::byte_array::ByteArray"
9777
- }
9778
- ],
9779
- "state_mutability": "view"
9780
- },
9781
- {
9782
- "type": "function",
9783
- "name": "token_uri",
9784
- "inputs": [
9785
- {
9786
- "name": "token_id",
9787
- "type": "core::integer::u256"
9788
- }
9789
- ],
9790
- "outputs": [
9791
- {
9792
- "type": "core::byte_array::ByteArray"
9793
- }
9794
- ],
9795
- "state_mutability": "view"
9796
- }
9797
- ]
9798
- },
9799
- {
9800
- "type": "impl",
9801
- "name": "ERC721MetadataCamelOnlyImpl",
9802
- "interface_name": "openzeppelin_token::erc721::interface::IERC721MetadataCamelOnly"
9803
- },
9804
- {
9805
- "type": "interface",
9806
- "name": "openzeppelin_token::erc721::interface::IERC721MetadataCamelOnly",
9807
- "items": [
9808
- {
9809
- "type": "function",
9810
- "name": "tokenURI",
9811
- "inputs": [
9812
- {
9813
- "name": "tokenId",
9814
- "type": "core::integer::u256"
9815
- }
9816
- ],
9817
- "outputs": [
9818
- {
9819
- "type": "core::byte_array::ByteArray"
9820
- }
9821
- ],
9822
- "state_mutability": "view"
9823
- }
9824
- ]
9825
- },
9826
- {
9827
- "type": "impl",
9828
- "name": "IPSponsorshipLicenseImpl",
9829
- "interface_name": "ip_sponsorship::interface::IIPSponsorshipLicense"
9830
- },
9831
- {
9832
- "type": "enum",
9833
- "name": "core::bool",
9834
- "variants": [
9835
- {
9836
- "name": "False",
9837
- "type": "()"
9838
- },
9839
- {
9840
- "name": "True",
9841
- "type": "()"
9842
- }
9843
- ]
9844
- },
9845
- {
9846
- "type": "struct",
9847
- "name": "ip_sponsorship::types::LicenseData",
9848
- "members": [
9849
- {
9850
- "name": "author",
9851
- "type": "core::starknet::contract_address::ContractAddress"
9852
- },
9853
- {
9854
- "name": "asset_contract",
9855
- "type": "core::starknet::contract_address::ContractAddress"
9856
- },
9857
- {
9858
- "name": "asset_token_id",
9859
- "type": "core::integer::u256"
9860
- },
9861
- {
9862
- "name": "expires_at",
9863
- "type": "core::integer::u64"
9864
- },
9865
- {
9866
- "name": "transferable",
9867
- "type": "core::bool"
9868
- },
9869
- {
9870
- "name": "royalty_bps",
9871
- "type": "core::integer::u256"
9872
- },
9873
- {
9874
- "name": "license_terms_uri",
9875
- "type": "core::byte_array::ByteArray"
9876
- }
9877
- ]
9878
- },
9879
- {
9880
- "type": "interface",
9881
- "name": "ip_sponsorship::interface::IIPSponsorshipLicense",
9882
- "items": [
9883
- {
9884
- "type": "function",
9885
- "name": "set_minter",
9886
- "inputs": [
9887
- {
9888
- "name": "minter",
9889
- "type": "core::starknet::contract_address::ContractAddress"
9890
- }
9891
- ],
9892
- "outputs": [],
9893
- "state_mutability": "external"
9894
- },
9895
- {
9896
- "type": "function",
9897
- "name": "get_minter",
9898
- "inputs": [],
9899
- "outputs": [
9900
- {
9901
- "type": "core::starknet::contract_address::ContractAddress"
9902
- }
9903
- ],
9904
- "state_mutability": "view"
9905
- },
9906
- {
9907
- "type": "function",
9908
- "name": "mint",
9909
- "inputs": [
9910
- {
9911
- "name": "recipient",
9912
- "type": "core::starknet::contract_address::ContractAddress"
9913
- },
9914
- {
9915
- "name": "data",
9916
- "type": "ip_sponsorship::types::LicenseData"
9917
- }
9918
- ],
9919
- "outputs": [
9920
- {
9921
- "type": "core::integer::u256"
9922
- }
9923
- ],
9924
- "state_mutability": "external"
9925
- },
9926
- {
9927
- "type": "function",
9928
- "name": "get_license_data",
9929
- "inputs": [
9930
- {
9931
- "name": "token_id",
9932
- "type": "core::integer::u256"
9933
- }
9934
- ],
9935
- "outputs": [
9936
- {
9937
- "type": "ip_sponsorship::types::LicenseData"
9938
- }
9939
- ],
9940
- "state_mutability": "view"
9941
- },
9942
- {
9943
- "type": "function",
9944
- "name": "is_license_valid",
9945
- "inputs": [
9946
- {
9947
- "name": "token_id",
9948
- "type": "core::integer::u256"
9949
- }
9950
- ],
9951
- "outputs": [
9952
- {
9953
- "type": "core::bool"
9954
- }
9955
- ],
9956
- "state_mutability": "view"
9957
- },
9958
- {
9959
- "type": "function",
9960
- "name": "last_license_id",
9961
- "inputs": [],
9962
- "outputs": [
9963
- {
9964
- "type": "core::integer::u256"
9965
- }
9966
- ],
9967
- "state_mutability": "view"
9968
- },
9969
- {
9970
- "type": "function",
9971
- "name": "royalty_info",
9972
- "inputs": [
9973
- {
9974
- "name": "token_id",
9975
- "type": "core::integer::u256"
9976
- },
9977
- {
9978
- "name": "sale_price",
9979
- "type": "core::integer::u256"
9980
- }
9981
- ],
9982
- "outputs": [
9983
- {
9984
- "type": "(core::starknet::contract_address::ContractAddress, core::integer::u256)"
9985
- }
9986
- ],
9987
- "state_mutability": "view"
9988
- },
9989
- {
9990
- "type": "function",
9991
- "name": "royaltyInfo",
9992
- "inputs": [
9993
- {
9994
- "name": "token_id",
9995
- "type": "core::integer::u256"
9996
- },
9997
- {
9998
- "name": "sale_price",
9999
- "type": "core::integer::u256"
10000
- }
10001
- ],
10002
- "outputs": [
10003
- {
10004
- "type": "(core::starknet::contract_address::ContractAddress, core::integer::u256)"
10005
- }
10006
- ],
10007
- "state_mutability": "view"
10008
- },
10009
- {
10010
- "type": "function",
10011
- "name": "version",
10012
- "inputs": [],
10013
- "outputs": [
10014
- {
10015
- "type": "core::byte_array::ByteArray"
10016
- }
10017
- ],
10018
- "state_mutability": "view"
10019
- }
10020
- ]
10021
- },
10022
- {
10023
- "type": "impl",
10024
- "name": "ERC721Impl",
10025
- "interface_name": "openzeppelin_token::erc721::interface::IERC721"
10026
- },
10027
- {
10028
- "type": "struct",
10029
- "name": "core::array::Span::<core::felt252>",
10030
- "members": [
10031
- {
10032
- "name": "snapshot",
10033
- "type": "@core::array::Array::<core::felt252>"
10034
- }
10035
- ]
10036
- },
10037
- {
10038
- "type": "interface",
10039
- "name": "openzeppelin_token::erc721::interface::IERC721",
10040
- "items": [
10041
- {
10042
- "type": "function",
10043
- "name": "balance_of",
10044
- "inputs": [
10045
- {
10046
- "name": "account",
10047
- "type": "core::starknet::contract_address::ContractAddress"
10048
- }
10049
- ],
10050
- "outputs": [
10051
- {
10052
- "type": "core::integer::u256"
10053
- }
10054
- ],
10055
- "state_mutability": "view"
10056
- },
10057
- {
10058
- "type": "function",
10059
- "name": "owner_of",
10060
- "inputs": [
10061
- {
10062
- "name": "token_id",
10063
- "type": "core::integer::u256"
10064
- }
10065
- ],
10066
- "outputs": [
10067
- {
10068
- "type": "core::starknet::contract_address::ContractAddress"
10069
- }
10070
- ],
10071
- "state_mutability": "view"
10072
- },
10073
- {
10074
- "type": "function",
10075
- "name": "safe_transfer_from",
10076
- "inputs": [
10077
- {
10078
- "name": "from",
10079
- "type": "core::starknet::contract_address::ContractAddress"
10080
- },
10081
- {
10082
- "name": "to",
10083
- "type": "core::starknet::contract_address::ContractAddress"
10084
- },
10085
- {
10086
- "name": "token_id",
10087
- "type": "core::integer::u256"
10088
- },
10089
- {
10090
- "name": "data",
10091
- "type": "core::array::Span::<core::felt252>"
10092
- }
10093
- ],
10094
- "outputs": [],
10095
- "state_mutability": "external"
10096
- },
10097
- {
10098
- "type": "function",
10099
- "name": "transfer_from",
10100
- "inputs": [
10101
- {
10102
- "name": "from",
10103
- "type": "core::starknet::contract_address::ContractAddress"
10104
- },
10105
- {
10106
- "name": "to",
10107
- "type": "core::starknet::contract_address::ContractAddress"
10108
- },
10109
- {
10110
- "name": "token_id",
10111
- "type": "core::integer::u256"
10112
- }
10113
- ],
10114
- "outputs": [],
10115
- "state_mutability": "external"
10116
- },
10117
- {
10118
- "type": "function",
10119
- "name": "approve",
10120
- "inputs": [
10121
- {
10122
- "name": "to",
10123
- "type": "core::starknet::contract_address::ContractAddress"
10124
- },
10125
- {
10126
- "name": "token_id",
10127
- "type": "core::integer::u256"
10128
- }
10129
- ],
10130
- "outputs": [],
10131
- "state_mutability": "external"
10132
- },
10133
- {
10134
- "type": "function",
10135
- "name": "set_approval_for_all",
10136
- "inputs": [
10137
- {
10138
- "name": "operator",
10139
- "type": "core::starknet::contract_address::ContractAddress"
10140
- },
10141
- {
10142
- "name": "approved",
10143
- "type": "core::bool"
10144
- }
10145
- ],
10146
- "outputs": [],
10147
- "state_mutability": "external"
10148
- },
10149
- {
10150
- "type": "function",
10151
- "name": "get_approved",
10152
- "inputs": [
10153
- {
10154
- "name": "token_id",
10155
- "type": "core::integer::u256"
10156
- }
10157
- ],
10158
- "outputs": [
10159
- {
10160
- "type": "core::starknet::contract_address::ContractAddress"
10161
- }
10162
- ],
10163
- "state_mutability": "view"
10164
- },
10165
- {
10166
- "type": "function",
10167
- "name": "is_approved_for_all",
10168
- "inputs": [
10169
- {
10170
- "name": "owner",
10171
- "type": "core::starknet::contract_address::ContractAddress"
10172
- },
10173
- {
10174
- "name": "operator",
10175
- "type": "core::starknet::contract_address::ContractAddress"
10176
- }
10177
- ],
10178
- "outputs": [
10179
- {
10180
- "type": "core::bool"
10181
- }
10182
- ],
10183
- "state_mutability": "view"
10184
- }
10185
- ]
10186
- },
10187
- {
10188
- "type": "impl",
10189
- "name": "ERC721CamelOnly",
10190
- "interface_name": "openzeppelin_token::erc721::interface::IERC721CamelOnly"
10191
- },
10192
- {
10193
- "type": "interface",
10194
- "name": "openzeppelin_token::erc721::interface::IERC721CamelOnly",
10195
- "items": [
10196
- {
10197
- "type": "function",
10198
- "name": "balanceOf",
10199
- "inputs": [
10200
- {
10201
- "name": "account",
10202
- "type": "core::starknet::contract_address::ContractAddress"
10203
- }
10204
- ],
10205
- "outputs": [
10206
- {
10207
- "type": "core::integer::u256"
10208
- }
10209
- ],
10210
- "state_mutability": "view"
10211
- },
10212
- {
10213
- "type": "function",
10214
- "name": "ownerOf",
10215
- "inputs": [
10216
- {
10217
- "name": "tokenId",
10218
- "type": "core::integer::u256"
10219
- }
10220
- ],
10221
- "outputs": [
10222
- {
10223
- "type": "core::starknet::contract_address::ContractAddress"
10224
- }
10225
- ],
10226
- "state_mutability": "view"
10227
- },
10228
- {
10229
- "type": "function",
10230
- "name": "safeTransferFrom",
10231
- "inputs": [
10232
- {
10233
- "name": "from",
10234
- "type": "core::starknet::contract_address::ContractAddress"
10235
- },
10236
- {
10237
- "name": "to",
10238
- "type": "core::starknet::contract_address::ContractAddress"
10239
- },
10240
- {
10241
- "name": "tokenId",
10242
- "type": "core::integer::u256"
10243
- },
10244
- {
10245
- "name": "data",
10246
- "type": "core::array::Span::<core::felt252>"
10247
- }
10248
- ],
10249
- "outputs": [],
10250
- "state_mutability": "external"
10251
- },
10252
- {
10253
- "type": "function",
10254
- "name": "transferFrom",
10255
- "inputs": [
10256
- {
10257
- "name": "from",
10258
- "type": "core::starknet::contract_address::ContractAddress"
10259
- },
10260
- {
10261
- "name": "to",
10262
- "type": "core::starknet::contract_address::ContractAddress"
10263
- },
10264
- {
10265
- "name": "tokenId",
10266
- "type": "core::integer::u256"
10267
- }
10268
- ],
10269
- "outputs": [],
10270
- "state_mutability": "external"
10271
- },
10272
- {
10273
- "type": "function",
10274
- "name": "setApprovalForAll",
10275
- "inputs": [
10276
- {
10277
- "name": "operator",
10278
- "type": "core::starknet::contract_address::ContractAddress"
10279
- },
10280
- {
10281
- "name": "approved",
10282
- "type": "core::bool"
10283
- }
10284
- ],
10285
- "outputs": [],
10286
- "state_mutability": "external"
10287
- },
10288
- {
10289
- "type": "function",
10290
- "name": "getApproved",
10291
- "inputs": [
10292
- {
10293
- "name": "tokenId",
10294
- "type": "core::integer::u256"
10295
- }
10296
- ],
10297
- "outputs": [
10298
- {
10299
- "type": "core::starknet::contract_address::ContractAddress"
10300
- }
10301
- ],
10302
- "state_mutability": "view"
10303
- },
10304
- {
10305
- "type": "function",
10306
- "name": "isApprovedForAll",
10307
- "inputs": [
10308
- {
10309
- "name": "owner",
10310
- "type": "core::starknet::contract_address::ContractAddress"
10311
- },
10312
- {
10313
- "name": "operator",
10314
- "type": "core::starknet::contract_address::ContractAddress"
10315
- }
10316
- ],
10317
- "outputs": [
10318
- {
10319
- "type": "core::bool"
10320
- }
10321
- ],
10322
- "state_mutability": "view"
10323
- }
10324
- ]
10325
- },
10326
- {
10327
- "type": "impl",
10328
- "name": "SRC5Impl",
10329
- "interface_name": "openzeppelin_introspection::interface::ISRC5"
10330
- },
10331
- {
10332
- "type": "interface",
10333
- "name": "openzeppelin_introspection::interface::ISRC5",
10334
- "items": [
10335
- {
10336
- "type": "function",
10337
- "name": "supports_interface",
10338
- "inputs": [
10339
- {
10340
- "name": "interface_id",
10341
- "type": "core::felt252"
10342
- }
10343
- ],
10344
- "outputs": [
10345
- {
10346
- "type": "core::bool"
10347
- }
10348
- ],
10349
- "state_mutability": "view"
10350
- }
10351
- ]
10352
- },
10353
- {
10354
- "type": "constructor",
10355
- "name": "constructor",
10356
- "inputs": [
10357
- {
10358
- "name": "name",
10359
- "type": "core::byte_array::ByteArray"
10360
- },
10361
- {
10362
- "name": "symbol",
10363
- "type": "core::byte_array::ByteArray"
9294
+ {
9295
+ "name": "expires_at",
9296
+ "type": "core::integer::u64",
9297
+ "kind": "data"
10364
9298
  }
10365
9299
  ]
10366
9300
  },
10367
9301
  {
10368
9302
  "type": "event",
10369
- "name": "openzeppelin_token::erc721::erc721::ERC721Component::Transfer",
9303
+ "name": "ip_sponsorship::IPSponsorship::IPSponsorship::ProposalCreated",
10370
9304
  "kind": "struct",
10371
9305
  "members": [
10372
9306
  {
10373
- "name": "from",
9307
+ "name": "proposal_id",
9308
+ "type": "core::integer::u256",
9309
+ "kind": "key"
9310
+ },
9311
+ {
9312
+ "name": "proposer",
10374
9313
  "type": "core::starknet::contract_address::ContractAddress",
10375
9314
  "kind": "key"
10376
9315
  },
10377
9316
  {
10378
- "name": "to",
9317
+ "name": "nft_contract",
10379
9318
  "type": "core::starknet::contract_address::ContractAddress",
10380
9319
  "kind": "key"
10381
9320
  },
10382
9321
  {
10383
9322
  "name": "token_id",
10384
9323
  "type": "core::integer::u256",
10385
- "kind": "key"
9324
+ "kind": "data"
9325
+ },
9326
+ {
9327
+ "name": "amount",
9328
+ "type": "core::integer::u256",
9329
+ "kind": "data"
9330
+ },
9331
+ {
9332
+ "name": "duration",
9333
+ "type": "core::integer::u64",
9334
+ "kind": "data"
9335
+ },
9336
+ {
9337
+ "name": "valid_until",
9338
+ "type": "core::integer::u64",
9339
+ "kind": "data"
9340
+ },
9341
+ {
9342
+ "name": "payment_token",
9343
+ "type": "core::starknet::contract_address::ContractAddress",
9344
+ "kind": "data"
9345
+ },
9346
+ {
9347
+ "name": "license_terms_uri",
9348
+ "type": "core::byte_array::ByteArray",
9349
+ "kind": "data"
9350
+ },
9351
+ {
9352
+ "name": "transferable",
9353
+ "type": "core::bool",
9354
+ "kind": "data"
9355
+ },
9356
+ {
9357
+ "name": "royalty_bps",
9358
+ "type": "core::integer::u256",
9359
+ "kind": "data"
9360
+ },
9361
+ {
9362
+ "name": "created_at",
9363
+ "type": "core::integer::u64",
9364
+ "kind": "data"
10386
9365
  }
10387
9366
  ]
10388
9367
  },
10389
9368
  {
10390
9369
  "type": "event",
10391
- "name": "openzeppelin_token::erc721::erc721::ERC721Component::Approval",
9370
+ "name": "ip_sponsorship::IPSponsorship::IPSponsorship::ProposalClosed",
10392
9371
  "kind": "struct",
10393
9372
  "members": [
10394
9373
  {
10395
- "name": "owner",
10396
- "type": "core::starknet::contract_address::ContractAddress",
9374
+ "name": "proposal_id",
9375
+ "type": "core::integer::u256",
10397
9376
  "kind": "key"
10398
9377
  },
10399
9378
  {
10400
- "name": "approved",
10401
- "type": "core::starknet::contract_address::ContractAddress",
10402
- "kind": "key"
9379
+ "name": "accepted",
9380
+ "type": "core::bool",
9381
+ "kind": "data"
10403
9382
  },
10404
9383
  {
10405
- "name": "token_id",
10406
- "type": "core::integer::u256",
10407
- "kind": "key"
9384
+ "name": "closed_at",
9385
+ "type": "core::integer::u64",
9386
+ "kind": "data"
10408
9387
  }
10409
9388
  ]
10410
9389
  },
10411
9390
  {
10412
9391
  "type": "event",
10413
- "name": "openzeppelin_token::erc721::erc721::ERC721Component::ApprovalForAll",
9392
+ "name": "ip_sponsorship::IPSponsorship::IPSponsorship::ProposalAccepted",
10414
9393
  "kind": "struct",
10415
9394
  "members": [
10416
9395
  {
10417
- "name": "owner",
10418
- "type": "core::starknet::contract_address::ContractAddress",
9396
+ "name": "proposal_id",
9397
+ "type": "core::integer::u256",
10419
9398
  "kind": "key"
10420
9399
  },
10421
9400
  {
10422
- "name": "operator",
9401
+ "name": "license_id",
9402
+ "type": "core::integer::u256",
9403
+ "kind": "key"
9404
+ },
9405
+ {
9406
+ "name": "sponsor",
10423
9407
  "type": "core::starknet::contract_address::ContractAddress",
10424
9408
  "kind": "key"
10425
9409
  },
10426
9410
  {
10427
- "name": "approved",
10428
- "type": "core::bool",
9411
+ "name": "author",
9412
+ "type": "core::starknet::contract_address::ContractAddress",
10429
9413
  "kind": "data"
10430
- }
10431
- ]
10432
- },
10433
- {
10434
- "type": "event",
10435
- "name": "openzeppelin_token::erc721::erc721::ERC721Component::Event",
10436
- "kind": "enum",
10437
- "variants": [
10438
- {
10439
- "name": "Transfer",
10440
- "type": "openzeppelin_token::erc721::erc721::ERC721Component::Transfer",
10441
- "kind": "nested"
10442
9414
  },
10443
9415
  {
10444
- "name": "Approval",
10445
- "type": "openzeppelin_token::erc721::erc721::ERC721Component::Approval",
10446
- "kind": "nested"
9416
+ "name": "amount",
9417
+ "type": "core::integer::u256",
9418
+ "kind": "data"
10447
9419
  },
10448
9420
  {
10449
- "name": "ApprovalForAll",
10450
- "type": "openzeppelin_token::erc721::erc721::ERC721Component::ApprovalForAll",
10451
- "kind": "nested"
9421
+ "name": "expires_at",
9422
+ "type": "core::integer::u64",
9423
+ "kind": "data"
10452
9424
  }
10453
9425
  ]
10454
9426
  },
10455
9427
  {
10456
9428
  "type": "event",
10457
- "name": "openzeppelin_introspection::src5::SRC5Component::Event",
10458
- "kind": "enum",
10459
- "variants": []
10460
- },
10461
- {
10462
- "type": "event",
10463
- "name": "ip_sponsorship::IPSponsorshipLicense::IPSponsorshipLicense::LicenseMinted",
9429
+ "name": "ip_sponsorship::IPSponsorship::IPSponsorship::LicenseMinted",
10464
9430
  "kind": "struct",
10465
9431
  "members": [
10466
9432
  {
@@ -10517,7 +9483,7 @@ var IPSponsorshipLicenseABI = [
10517
9483
  },
10518
9484
  {
10519
9485
  "type": "event",
10520
- "name": "ip_sponsorship::IPSponsorshipLicense::IPSponsorshipLicense::Event",
9486
+ "name": "ip_sponsorship::IPSponsorship::IPSponsorship::Event",
10521
9487
  "kind": "enum",
10522
9488
  "variants": [
10523
9489
  {
@@ -10530,9 +9496,49 @@ var IPSponsorshipLicenseABI = [
10530
9496
  "type": "openzeppelin_introspection::src5::SRC5Component::Event",
10531
9497
  "kind": "flat"
10532
9498
  },
9499
+ {
9500
+ "name": "OfferCreated",
9501
+ "type": "ip_sponsorship::IPSponsorship::IPSponsorship::OfferCreated",
9502
+ "kind": "nested"
9503
+ },
9504
+ {
9505
+ "name": "OfferStatusUpdated",
9506
+ "type": "ip_sponsorship::IPSponsorship::IPSponsorship::OfferStatusUpdated",
9507
+ "kind": "nested"
9508
+ },
9509
+ {
9510
+ "name": "BidPlaced",
9511
+ "type": "ip_sponsorship::IPSponsorship::IPSponsorship::BidPlaced",
9512
+ "kind": "nested"
9513
+ },
9514
+ {
9515
+ "name": "BidRetracted",
9516
+ "type": "ip_sponsorship::IPSponsorship::IPSponsorship::BidRetracted",
9517
+ "kind": "nested"
9518
+ },
9519
+ {
9520
+ "name": "SponsorshipAccepted",
9521
+ "type": "ip_sponsorship::IPSponsorship::IPSponsorship::SponsorshipAccepted",
9522
+ "kind": "nested"
9523
+ },
9524
+ {
9525
+ "name": "ProposalCreated",
9526
+ "type": "ip_sponsorship::IPSponsorship::IPSponsorship::ProposalCreated",
9527
+ "kind": "nested"
9528
+ },
9529
+ {
9530
+ "name": "ProposalClosed",
9531
+ "type": "ip_sponsorship::IPSponsorship::IPSponsorship::ProposalClosed",
9532
+ "kind": "nested"
9533
+ },
9534
+ {
9535
+ "name": "ProposalAccepted",
9536
+ "type": "ip_sponsorship::IPSponsorship::IPSponsorship::ProposalAccepted",
9537
+ "kind": "nested"
9538
+ },
10533
9539
  {
10534
9540
  "name": "LicenseMinted",
10535
- "type": "ip_sponsorship::IPSponsorshipLicense::IPSponsorshipLicense::LicenseMinted",
9541
+ "type": "ip_sponsorship::IPSponsorship::IPSponsorship::LicenseMinted",
10536
9542
  "kind": "nested"
10537
9543
  }
10538
9544
  ]
@@ -11880,139 +10886,117 @@ var TicketService = class {
11880
10886
  };
11881
10887
  var ClubService = class {
11882
10888
  constructor(config) {
11883
- const coords = getStarknetCoordinates(config.chain);
11884
- this.registryAddress = coords.ipClubRegistry;
11885
- this.factoryAddress = coords.ipClubFactory;
11886
- }
11887
- _registry(account, registryAddress) {
11888
- const address = registryAddress ?? this.registryAddress;
11889
- if (!address) throw new Error("IP-Club registry address not configured for this chain");
11890
- return newContract(IPClubABI, normalizeAddress("STARKNET", address), account);
10889
+ this.config = config;
10890
+ this.factoryAddress = getStarknetCoordinates(config.chain).ipClubFactory;
11891
10891
  }
11892
10892
  _factory(account, factoryAddress) {
11893
10893
  const address = factoryAddress ?? this.factoryAddress;
11894
10894
  if (!address) throw new Error("IP-Club factory address not configured for this chain");
11895
10895
  return newContract(IPClubFactoryABI, normalizeAddress("STARKNET", address), account);
11896
10896
  }
11897
- _collection(account, collectionAddress) {
11898
- return newContract(IPClubCollectionABI, normalizeAddress("STARKNET", collectionAddress), account);
10897
+ _collection(address, account) {
10898
+ return newContract(IPClubCollectionABI, normalizeAddress("STARKNET", address), account);
10899
+ }
10900
+ _collectionRead(address) {
10901
+ const provider = new RpcProvider({ nodeUrl: this.config.rpcUrl });
10902
+ return newContract(IPClubCollectionABI, normalizeAddress("STARKNET", address), provider);
11899
10903
  }
11900
- /** Deploy a new per-creator membership ERC-721 collection via the factory. */
11901
- async deployClub(account, params) {
11902
- const maxSupply = cairo.uint256(params.maxSupply ?? 0xffffffffffffffffn);
11903
- const entryFee = cairo.uint256(params.entryFee ?? 0n);
11904
- const paymentToken = params.paymentToken ? new CairoOption(CairoOptionVariant.Some, params.paymentToken) : new CairoOption(CairoOptionVariant.None);
11905
- const royaltyBps = cairo.uint256(params.royaltyBps ?? 0n);
11906
- const call = this._factory(account, params.factoryAddress).populate("deploy_club", [
10904
+ /**
10905
+ * Deploys a new IPClubCollection via the factory. Caller becomes owner.
10906
+ * `baseUri` is the collection-level metadata URI, embedded on-chain in the
10907
+ * deploy transaction.
10908
+ */
10909
+ async deployCollection(account, params) {
10910
+ const call = this._factory(account, params.factoryAddress).populate("deploy_collection", [
11907
10911
  params.name,
11908
10912
  params.symbol,
11909
- params.baseUri,
11910
- maxSupply,
11911
- entryFee,
11912
- paymentToken,
11913
- royaltyBps
10913
+ params.baseUri
11914
10914
  ]);
11915
10915
  const res = await account.execute([call]);
11916
10916
  return { txHash: res.transaction_hash };
11917
10917
  }
11918
- /** Owner-only pause or resume new mints on a club collection. */
11919
- async setOpen(account, params) {
11920
- const call = this._collection(account, params.collectionAddress).populate("set_open", [params.open]);
10918
+ /** Owner-only. Creates a new membership tier inside the caller's deployed collection. */
10919
+ async createMembership(account, params) {
10920
+ const startTime = params.startTime != null ? new CairoOption(CairoOptionVariant.Some, params.startTime) : new CairoOption(CairoOptionVariant.None);
10921
+ const endTime = params.endTime != null ? new CairoOption(CairoOptionVariant.Some, params.endTime) : new CairoOption(CairoOptionVariant.None);
10922
+ const call = this._collection(params.collection, account).populate("create_membership", [
10923
+ cairo.uint256(params.maxSupply),
10924
+ startTime,
10925
+ endTime,
10926
+ params.royaltyBps,
10927
+ params.metadataUri
10928
+ ]);
11921
10929
  const res = await account.execute([call]);
11922
10930
  return { txHash: res.transaction_hash };
11923
10931
  }
11924
- /** Public mint — caller pays entry fee (if any) and receives the membership NFT. */
11925
- async mintMembership(account, params) {
11926
- const calls = [];
11927
- if (params.entryFee && params.paymentToken && BigInt(params.entryFee) > 0n) {
11928
- const amount = cairo.uint256(params.entryFee);
11929
- calls.push({
11930
- contractAddress: params.paymentToken,
11931
- entrypoint: "approve",
11932
- calldata: [
11933
- normalizeAddress("STARKNET", params.collectionAddress),
11934
- amount.low.toString(),
11935
- amount.high.toString()
11936
- ]
11937
- });
11938
- }
11939
- calls.push(
11940
- this._collection(account, params.collectionAddress).populate("mint", [
11941
- params.to ?? account.address
11942
- ])
11943
- );
11944
- const res = await account.execute(calls);
11945
- return { txHash: res.transaction_hash };
11946
- }
11947
- // ── Legacy registry methods (retained for backward compatibility) ──────────────
11948
- /** @deprecated Use deployClub — the factory pattern replaced the registry. */
11949
- async createClub(account, params) {
11950
- const maxMembers = params.maxMembers != null ? new CairoOption(CairoOptionVariant.Some, params.maxMembers) : new CairoOption(CairoOptionVariant.None);
11951
- const entryFee = params.entryFee != null ? new CairoOption(CairoOptionVariant.Some, cairo.uint256(params.entryFee)) : new CairoOption(CairoOptionVariant.None);
11952
- const paymentToken = params.paymentToken ? new CairoOption(CairoOptionVariant.Some, params.paymentToken) : new CairoOption(CairoOptionVariant.None);
11953
- const call = this._registry(account, params.registryAddress).populate("create_club", [
11954
- params.name,
11955
- params.symbol,
11956
- params.metadataUri,
11957
- maxMembers,
11958
- entryFee,
11959
- paymentToken
10932
+ /**
10933
+ * Owner-only. Mints `amount` of `tokenId` to `to`. The validity window
10934
+ * gates membership, never minting — future-window tiers mint fine.
10935
+ */
10936
+ async mint(account, params) {
10937
+ const call = this._collection(params.collection, account).populate("mint", [
10938
+ params.to,
10939
+ cairo.uint256(params.tokenId),
10940
+ cairo.uint256(params.amount)
11960
10941
  ]);
11961
10942
  const res = await account.execute([call]);
11962
10943
  return { txHash: res.transaction_hash };
11963
10944
  }
11964
- /** @deprecated Legacy registry use factory-deployed collection methods. */
11965
- async setClubOpen(account, params) {
11966
- const call = this._registry(account, params.registryAddress).populate("set_club_open", [
11967
- cairo.uint256(params.clubId),
11968
- params.open
10945
+ /** Read true if holder holds any tier currently inside its validity window. */
10946
+ async isMember(params) {
10947
+ const result = await this._collectionRead(params.collection).call("is_member", [
10948
+ params.holder
11969
10949
  ]);
11970
- const res = await account.execute([call]);
11971
- return { txHash: res.transaction_hash };
10950
+ return Boolean(result);
11972
10951
  }
11973
- /** @deprecated Legacy registry use mintMembership with factory-deployed collections. */
11974
- async joinClub(account, params) {
11975
- const registryAddress = params.registryAddress ?? this.registryAddress;
11976
- if (!registryAddress) throw new Error("IP-Club registry address not configured for this chain");
11977
- const calls = [];
11978
- if (params.paymentToken && params.entryFee && BigInt(params.entryFee) > 0n) {
11979
- const amount = cairo.uint256(params.entryFee);
11980
- calls.push({
11981
- contractAddress: params.paymentToken,
11982
- entrypoint: "approve",
11983
- calldata: [normalizeAddress("STARKNET", registryAddress), amount.low.toString(), amount.high.toString()]
11984
- });
11985
- }
11986
- calls.push(this._registry(account, registryAddress).populate("join_club", [cairo.uint256(params.clubId)]));
11987
- const res = await account.execute(calls);
11988
- return { txHash: res.transaction_hash };
10952
+ /** Read true if holder holds `tokenId` and the current time is inside its window. */
10953
+ async isMemberOf(params) {
10954
+ const result = await this._collectionRead(params.collection).call("is_member_of", [
10955
+ cairo.uint256(params.tokenId),
10956
+ params.holder
10957
+ ]);
10958
+ return Boolean(result);
11989
10959
  }
11990
- /** @deprecated Legacy registry use factory-deployed collection burn. */
11991
- async leaveClub(account, params) {
11992
- const call = this._registry(account, params.registryAddress).populate("leave_club", [
11993
- cairo.uint256(params.clubId),
10960
+ /** Read returns the Membership record for a token ID. */
10961
+ async getMembership(params) {
10962
+ const m = await this._collectionRead(params.collection).call("get_membership", [
11994
10963
  cairo.uint256(params.tokenId)
11995
10964
  ]);
11996
- const res = await account.execute([call]);
11997
- return { txHash: res.transaction_hash };
10965
+ return {
10966
+ maxSupply: BigInt(m.max_supply),
10967
+ minted: BigInt(m.minted),
10968
+ startTime: m.start_time?.variant === "Some" ? Number(m.start_time.values[0] ?? m.start_time.value) : null,
10969
+ endTime: m.end_time?.variant === "Some" ? Number(m.end_time.values[0] ?? m.end_time.value) : null,
10970
+ royaltyBps: Number(m.royalty_bps),
10971
+ metadataUri: m.metadata_uri
10972
+ };
11998
10973
  }
11999
10974
  };
12000
10975
  var SponsorshipService = class {
12001
10976
  constructor(config) {
10977
+ this.config = config;
12002
10978
  this.sponsorshipAddress = getStarknetCoordinates(config.chain).ipSponsorship;
12003
- this.licenseReceiptAddress = getStarknetCoordinates(config.chain).ipSponsorshipLicense;
12004
10979
  }
12005
- _sponsorship(account, address) {
10980
+ _contract(account, address) {
12006
10981
  const resolved = address ?? this.sponsorshipAddress;
12007
10982
  if (!resolved) {
12008
10983
  throw new Error("IP-Sponsorship address not configured for this chain");
12009
10984
  }
12010
10985
  return newContract(IPSponsorshipABI, normalizeAddress("STARKNET", resolved), account);
12011
10986
  }
10987
+ _contractRead(address) {
10988
+ const resolved = address ?? this.sponsorshipAddress;
10989
+ if (!resolved) {
10990
+ throw new Error("IP-Sponsorship address not configured for this chain");
10991
+ }
10992
+ const provider = new RpcProvider({ nodeUrl: this.config.rpcUrl });
10993
+ return newContract(IPSponsorshipABI, normalizeAddress("STARKNET", resolved), provider);
10994
+ }
10995
+ // ── Offers (owner-initiated) ───────────────────────────────────────────────
12012
10996
  /** The offer author must currently own (nftContract, tokenId) — enforced on-chain at create and accept. */
12013
10997
  async createOffer(account, params) {
12014
10998
  const specificSponsor = params.specificSponsor ? new CairoOption(CairoOptionVariant.Some, params.specificSponsor) : new CairoOption(CairoOptionVariant.None);
12015
- const call = this._sponsorship(account, params.sponsorshipAddress).populate("create_offer", [
10999
+ const call = this._contract(account, params.sponsorshipAddress).populate("create_offer", [
12016
11000
  params.nftContract,
12017
11001
  cairo.uint256(params.tokenId),
12018
11002
  cairo.uint256(params.minAmount),
@@ -12020,6 +11004,7 @@ var SponsorshipService = class {
12020
11004
  params.paymentToken,
12021
11005
  params.licenseTermsUri,
12022
11006
  params.transferable,
11007
+ cairo.uint256(params.royaltyBps),
12023
11008
  specificSponsor
12024
11009
  ]);
12025
11010
  const res = await account.execute([call]);
@@ -12027,7 +11012,7 @@ var SponsorshipService = class {
12027
11012
  }
12028
11013
  /** Reversible — gates new bids/acceptance only. */
12029
11014
  async setOfferOpen(account, params) {
12030
- const call = this._sponsorship(account, params.sponsorshipAddress).populate("set_offer_open", [
11015
+ const call = this._contract(account, params.sponsorshipAddress).populate("set_offer_open", [
12031
11016
  cairo.uint256(params.offerId),
12032
11017
  params.open
12033
11018
  ]);
@@ -12046,7 +11031,7 @@ var SponsorshipService = class {
12046
11031
  entrypoint: "approve",
12047
11032
  calldata: [normalizeAddress("STARKNET", sponsorshipAddress), amount.low.toString(), amount.high.toString()]
12048
11033
  };
12049
- const bidCall = this._sponsorship(account, sponsorshipAddress).populate("place_bid", [
11034
+ const bidCall = this._contract(account, sponsorshipAddress).populate("place_bid", [
12050
11035
  cairo.uint256(params.offerId),
12051
11036
  amount
12052
11037
  ]);
@@ -12054,54 +11039,139 @@ var SponsorshipService = class {
12054
11039
  return { txHash: res.transaction_hash };
12055
11040
  }
12056
11041
  async retractBid(account, params) {
12057
- const call = this._sponsorship(account, params.sponsorshipAddress).populate("retract_bid", [
11042
+ const call = this._contract(account, params.sponsorshipAddress).populate("retract_bid", [
12058
11043
  cairo.uint256(params.offerId)
12059
11044
  ]);
12060
11045
  const res = await account.execute([call]);
12061
11046
  return { txHash: res.transaction_hash };
12062
11047
  }
12063
11048
  /**
12064
- * Author-only. Settles the sponsor's payment (allowance pull, no escrow) and
12065
- * mints a non-authoritative receipt NFT to the sponsor via the dedicated
12066
- * sponsorship-license IPGenesis instancenever the genesis-mint instance.
12067
- * `is_license_valid()` on IPSponsorship remains the sole authority for
12068
- * gating/perks; the receipt is a wallet-visible courtesy only.
11049
+ * Author-only. Re-verifies IP ownership, settles the sponsor's payment
11050
+ * (allowance pull, no escrow), and mints the license a real ERC-721 on
11051
+ * this same contractto the sponsor, all atomically in one call.
12069
11052
  */
12070
11053
  async acceptBid(account, params) {
12071
- const receiptAddress = params.licenseReceiptAddress ?? this.licenseReceiptAddress;
12072
- if (!receiptAddress) {
12073
- throw new Error("IP-Sponsorship-License receipt address not configured for this chain");
12074
- }
12075
- const acceptCall = this._sponsorship(account, params.sponsorshipAddress).populate("accept_bid", [
11054
+ const call = this._contract(account, params.sponsorshipAddress).populate("accept_bid", [
12076
11055
  cairo.uint256(params.offerId),
12077
11056
  params.sponsor
12078
11057
  ]);
12079
- const receipt = newContract(IPGenesisABI, normalizeAddress("STARKNET", receiptAddress), account);
12080
- const mintCall = receipt.populate("mint_item", [params.sponsor, params.licenseTermsUri]);
12081
- const res = await account.execute([acceptCall, mintCall]);
11058
+ const res = await account.execute([call]);
11059
+ return { txHash: res.transaction_hash };
11060
+ }
11061
+ // ── Proposals (sponsor-initiated) ──────────────────────────────────────────
11062
+ // The symmetric counterpart to offers/bids: a sponsor proposes fixed terms
11063
+ // on an asset with no open offer yet; only the asset's current owner may
11064
+ // accept or reject. Unlike an offer, the SPONSOR chooses `paymentToken` here
11065
+ // — an accepting owner's UI should surface only recognized tokens, since a
11066
+ // bad-faith ERC-20 could return `true` on `transfer_from` without moving funds.
11067
+ async proposeSponsorship(account, params) {
11068
+ const call = this._contract(account, params.sponsorshipAddress).populate("propose_sponsorship", [
11069
+ params.nftContract,
11070
+ cairo.uint256(params.tokenId),
11071
+ cairo.uint256(params.amount),
11072
+ params.duration,
11073
+ params.validUntil ?? 0,
11074
+ params.paymentToken,
11075
+ params.licenseTermsUri,
11076
+ params.transferable,
11077
+ cairo.uint256(params.royaltyBps)
11078
+ ]);
11079
+ const res = await account.execute([call]);
11080
+ return { txHash: res.transaction_hash };
11081
+ }
11082
+ /** Proposer-only. Advisory against an acceptance in flight in the same block. */
11083
+ async withdrawProposal(account, params) {
11084
+ const call = this._contract(account, params.sponsorshipAddress).populate("withdraw_proposal", [
11085
+ cairo.uint256(params.proposalId)
11086
+ ]);
11087
+ const res = await account.execute([call]);
12082
11088
  return { txHash: res.transaction_hash };
12083
11089
  }
12084
11090
  /**
12085
- * Best-effortbundles a receipt-NFT transfer alongside `transfer_license`
12086
- * when both `licenseReceiptAddress` and `receiptTokenId` are supplied.
12087
- * IPSponsorship's own license ownership stays authoritative regardless of
12088
- * whether the receipt NFT is kept in sync.
11091
+ * Asset-owner-only (re-verified on-chain — a proposal binds to the asset,
11092
+ * not a person: whoever owns it at acceptance time is paid and issues the
11093
+ * license). Settles payment and mints the license atomically, same as
11094
+ * `acceptBid`.
12089
11095
  */
12090
- async transferLicense(account, params) {
12091
- const calls = [
12092
- this._sponsorship(account, params.sponsorshipAddress).populate("transfer_license", [
12093
- cairo.uint256(params.licenseId),
12094
- params.to
12095
- ])
12096
- ];
12097
- const receiptAddress = params.licenseReceiptAddress ?? this.licenseReceiptAddress;
12098
- if (receiptAddress && params.receiptTokenId != null) {
12099
- const receipt = newContract(IPGenesisABI, normalizeAddress("STARKNET", receiptAddress), account);
12100
- calls.push(receipt.populate("transfer_from", [account.address, params.to, cairo.uint256(params.receiptTokenId)]));
12101
- }
12102
- const res = await account.execute(calls);
11096
+ async acceptProposal(account, params) {
11097
+ const call = this._contract(account, params.sponsorshipAddress).populate("accept_proposal", [
11098
+ cairo.uint256(params.proposalId)
11099
+ ]);
11100
+ const res = await account.execute([call]);
11101
+ return { txHash: res.transaction_hash };
11102
+ }
11103
+ /** Asset-owner-only. */
11104
+ async rejectProposal(account, params) {
11105
+ const call = this._contract(account, params.sponsorshipAddress).populate("reject_proposal", [
11106
+ cairo.uint256(params.proposalId)
11107
+ ]);
11108
+ const res = await account.execute([call]);
12103
11109
  return { txHash: res.transaction_hash };
12104
11110
  }
11111
+ // ── Reads ───────────────────────────────────────────────────────────────────
11112
+ async getOffer(params) {
11113
+ const o = await this._contractRead(params.sponsorshipAddress).call("get_offer", [
11114
+ cairo.uint256(params.offerId)
11115
+ ]);
11116
+ return {
11117
+ author: o.author,
11118
+ nftContract: o.nft_contract,
11119
+ tokenId: BigInt(o.token_id),
11120
+ minAmount: BigInt(o.min_amount),
11121
+ duration: Number(o.duration),
11122
+ paymentToken: o.payment_token,
11123
+ licenseTermsUri: o.license_terms_uri,
11124
+ transferable: Boolean(o.transferable),
11125
+ specificSponsor: o.specific_sponsor?.variant === "Some" ? o.specific_sponsor.values?.[0] ?? o.specific_sponsor.value : null,
11126
+ open: Boolean(o.open),
11127
+ royaltyBps: BigInt(o.royalty_bps)
11128
+ };
11129
+ }
11130
+ async getBid(params) {
11131
+ const result = await this._contractRead(params.sponsorshipAddress).call("get_bid", [
11132
+ cairo.uint256(params.offerId),
11133
+ params.sponsor
11134
+ ]);
11135
+ return BigInt(result);
11136
+ }
11137
+ async getProposal(params) {
11138
+ const p = await this._contractRead(params.sponsorshipAddress).call("get_proposal", [
11139
+ cairo.uint256(params.proposalId)
11140
+ ]);
11141
+ return {
11142
+ proposer: p.proposer,
11143
+ nftContract: p.nft_contract,
11144
+ tokenId: BigInt(p.token_id),
11145
+ amount: BigInt(p.amount),
11146
+ duration: Number(p.duration),
11147
+ validUntil: Number(p.valid_until),
11148
+ paymentToken: p.payment_token,
11149
+ licenseTermsUri: p.license_terms_uri,
11150
+ transferable: Boolean(p.transferable),
11151
+ open: Boolean(p.open),
11152
+ royaltyBps: BigInt(p.royalty_bps)
11153
+ };
11154
+ }
11155
+ async getLastOfferId(params) {
11156
+ const result = await this._contractRead(params?.sponsorshipAddress).call("get_last_offer_id", []);
11157
+ return BigInt(result);
11158
+ }
11159
+ async getLastProposalId(params) {
11160
+ const result = await this._contractRead(params?.sponsorshipAddress).call("get_last_proposal_id", []);
11161
+ return BigInt(result);
11162
+ }
11163
+ async getLastLicenseId(params) {
11164
+ const result = await this._contractRead(params?.sponsorshipAddress).call("get_last_license_id", []);
11165
+ return BigInt(result);
11166
+ }
11167
+ /** EIP-2981 — royalty recipient (the license's issuing author) and amount owed on a resale at `salePrice`. */
11168
+ async royaltyInfo(params) {
11169
+ const [recipient, amount] = await this._contractRead(params.sponsorshipAddress).call("royalty_info", [
11170
+ cairo.uint256(params.licenseId),
11171
+ cairo.uint256(params.salePrice)
11172
+ ]);
11173
+ return { recipient, amount: BigInt(amount) };
11174
+ }
12105
11175
  };
12106
11176
 
12107
11177
  // src/starknet/client.ts
@@ -12911,6 +11981,6 @@ function encodeByteArray(str) {
12911
11981
  ];
12912
11982
  }
12913
11983
 
12914
- export { ADMIN_HEADERS, ADMIN_SCOPE, ApiClient, CHAINS, MAX_SUPPLY as COIN_MAX_SUPPLY, MIN_SUPPLY as COIN_MIN_SUPPLY, ClubService, CreatorCoinFactoryABI, CreatorCoinService, DEFAULT_CHAIN, DEFAULT_CURRENCY, DropCollectionABI, DropFactoryABI, DropService, ERC1155CollectionService, FeeConfigSchema, IPClubABI, IPClubCollectionABI, IPClubFactoryABI, IPClubNFTABI, IPCollection1155ABI, IPCollection1155FactoryABI, IPCollectionABI, IPGenesisABI, IPMarketplaceABI, IPNftABI, IPSponsorshipABI, IPSponsorshipLicenseABI, IPTicketCollectionABI, IPTicketCollectionFactoryABI, LAUNCH_PRICE_QUOTE_PER_COIN, Medialane1155ABI, MedialaneApiError, MedialaneClient, MedialaneError, OPEN_LICENSES, POPCollectionABI, POPFactoryABI, PUBLIC_RPC_FALLBACKS, PopService, STARKNET_COLLECTION_1155_CLASS_HASH, STARKNET_COLLECTION_1155_CONTRACT, STARKNET_COLLECTION_1155_FACTORY_CLASS_HASH, STARKNET_COLLECTION_1155_START_BLOCK, STARKNET_COLLECTION_721_CONTRACT, STARKNET_COLLECTION_721_START_BLOCK, STARKNET_CREATOR_COIN_CLASS_HASH, STARKNET_CREATOR_COIN_EKUBO_LAUNCHER, STARKNET_CREATOR_COIN_FACTORY_CLASS_HASH, STARKNET_CREATOR_COIN_FACTORY_CONTRACT, STARKNET_CREATOR_COIN_START_BLOCK, STARKNET_DROP_COLLECTION_CLASS_HASH, STARKNET_DROP_FACTORY_CONTRACT, STARKNET_EKUBO_CORE, STARKNET_IPCOLLECTION_CLASS_HASH, STARKNET_IPNFT_CLASS_HASH, STARKNET_IP_CLUB_COLLECTION_CLASS_HASH, STARKNET_IP_CLUB_FACTORY_CONTRACT, STARKNET_IP_CLUB_NFT_CLASS_HASH, STARKNET_IP_CLUB_REGISTRY_CONTRACT, STARKNET_IP_SPONSORSHIP_CONTRACT, STARKNET_IP_SPONSORSHIP_LICENSE_CONTRACT, STARKNET_IP_TICKETS_FACTORY_CONTRACT, STARKNET_IP_TICKET_COLLECTION_CLASS_HASH, STARKNET_MARKETPLACE_1155_CLASS_HASH, STARKNET_MARKETPLACE_1155_CONTRACT, STARKNET_MARKETPLACE_1155_START_BLOCK, STARKNET_MARKETPLACE_721_CLASS_HASH, STARKNET_MARKETPLACE_721_CONTRACT, STARKNET_MARKETPLACE_721_START_BLOCK, STARKNET_NFTCOMMENTS_CONTRACT, STARKNET_POP_COLLECTION_CLASS_HASH, STARKNET_POP_FACTORY_CONTRACT, SUPPORTED_TOKENS, SponsorshipService, StarknetVenue, TicketService, VALIDATED_EKUBO_PARAMS, adminRequestDigest, build1155CancellationTypedData, build1155OrderTypedData, buildAdminSessionTypedData, buildCancellationTypedData, buildCreateCreatorCoinCall, buildFeeCall, buildLaunchOnEkuboCalls, buildOrderTypedData, buybackQuoteRaw, toRaw as coinToRaw, createAdminSessionGrant, createFailoverFetch, encodeAdminHeaders, encodeByteArray, fdvHuman, formatAmount, getCoordinates, getCounter, getCounter1155, getCreatorCoinPrice, getListableTokens, getOrderDetails, getOrderDetails1155, getService, getServicesByCapability, getSiwsStorageKey, getStarknetCoordinates, getStoredSiwsToken, getTokenByAddress, getTokenBySymbol, hasCapability, isServiceId, isSiwsTokenValid, isTransientRpcError, listServices, normalizeAddress, normalizeHash, normalizeSiwsSignature, parseAdminHeaders, parseAmount, parseCreatorCoinCreated, randomNonce, requestSiwsToken, resolveConfig, resolveFeeConfig, sessionKeyHashOf, shortenAddress, signAdminRequest, storeSiwsToken, stringifyBigInts, teamCoinsRaw, u256ToBigInt, validateName as validateCoinName, validateSupply as validateCoinSupply, validateSymbol as validateCoinSymbol, verifyAdminRequestSig };
11984
+ export { ADMIN_HEADERS, ADMIN_SCOPE, ApiClient, CHAINS, MAX_SUPPLY as COIN_MAX_SUPPLY, MIN_SUPPLY as COIN_MIN_SUPPLY, ClubService, CreatorCoinFactoryABI, CreatorCoinService, DEFAULT_CHAIN, DEFAULT_CURRENCY, DropCollectionABI, DropFactoryABI, DropService, ERC1155CollectionService, FeeConfigSchema, IPClubCollectionABI, IPClubFactoryABI, IPCollection1155ABI, IPCollection1155FactoryABI, IPCollectionABI, IPGenesisABI, IPMarketplaceABI, IPNftABI, IPSponsorshipABI, IPTicketCollectionABI, IPTicketCollectionFactoryABI, LAUNCH_PRICE_QUOTE_PER_COIN, Medialane1155ABI, MedialaneApiError, MedialaneClient, MedialaneError, OPEN_LICENSES, POPCollectionABI, POPFactoryABI, PUBLIC_RPC_FALLBACKS, PopService, STARKNET_COLLECTION_1155_CLASS_HASH, STARKNET_COLLECTION_1155_CONTRACT, STARKNET_COLLECTION_1155_FACTORY_CLASS_HASH, STARKNET_COLLECTION_1155_START_BLOCK, STARKNET_COLLECTION_721_CONTRACT, STARKNET_COLLECTION_721_START_BLOCK, STARKNET_CREATOR_COIN_CLASS_HASH, STARKNET_CREATOR_COIN_EKUBO_LAUNCHER, STARKNET_CREATOR_COIN_FACTORY_CLASS_HASH, STARKNET_CREATOR_COIN_FACTORY_CONTRACT, STARKNET_CREATOR_COIN_START_BLOCK, STARKNET_DROP_COLLECTION_CLASS_HASH, STARKNET_DROP_FACTORY_CONTRACT, STARKNET_EKUBO_CORE, STARKNET_IPCOLLECTION_CLASS_HASH, STARKNET_IPNFT_CLASS_HASH, STARKNET_IP_CLUB_COLLECTION_CLASS_HASH, STARKNET_IP_CLUB_FACTORY_CONTRACT, STARKNET_IP_SPONSORSHIP_CLASS_HASH, STARKNET_IP_SPONSORSHIP_CONTRACT, STARKNET_IP_TICKETS_FACTORY_CONTRACT, STARKNET_IP_TICKET_COLLECTION_CLASS_HASH, STARKNET_MARKETPLACE_1155_CLASS_HASH, STARKNET_MARKETPLACE_1155_CONTRACT, STARKNET_MARKETPLACE_1155_START_BLOCK, STARKNET_MARKETPLACE_721_CLASS_HASH, STARKNET_MARKETPLACE_721_CONTRACT, STARKNET_MARKETPLACE_721_START_BLOCK, STARKNET_NFTCOMMENTS_CONTRACT, STARKNET_POP_COLLECTION_CLASS_HASH, STARKNET_POP_FACTORY_CONTRACT, SUPPORTED_TOKENS, SponsorshipService, StarknetVenue, TicketService, VALIDATED_EKUBO_PARAMS, adminRequestDigest, build1155CancellationTypedData, build1155OrderTypedData, buildAdminSessionTypedData, buildCancellationTypedData, buildCreateCreatorCoinCall, buildFeeCall, buildLaunchOnEkuboCalls, buildOrderTypedData, buybackQuoteRaw, toRaw as coinToRaw, createAdminSessionGrant, createFailoverFetch, encodeAdminHeaders, encodeByteArray, fdvHuman, formatAmount, getCoordinates, getCounter, getCounter1155, getCreatorCoinPrice, getListableTokens, getOrderDetails, getOrderDetails1155, getService, getServicesByCapability, getSiwsStorageKey, getStarknetCoordinates, getStoredSiwsToken, getTokenByAddress, getTokenBySymbol, hasCapability, isServiceId, isSiwsTokenValid, isTransientRpcError, listServices, normalizeAddress, normalizeHash, normalizeSiwsSignature, parseAdminHeaders, parseAmount, parseCreatorCoinCreated, randomNonce, requestSiwsToken, resolveConfig, resolveFeeConfig, sessionKeyHashOf, shortenAddress, signAdminRequest, storeSiwsToken, stringifyBigInts, teamCoinsRaw, u256ToBigInt, validateName as validateCoinName, validateSupply as validateCoinSupply, validateSymbol as validateCoinSymbol, verifyAdminRequestSig };
12915
11985
  //# sourceMappingURL=index.js.map
12916
11986
  //# sourceMappingURL=index.js.map