@medialane/sdk 0.57.0 → 0.59.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/evm/index.cjs +4 -0
- package/dist/evm/index.cjs.map +1 -1
- package/dist/evm/index.d.cts +1 -1
- package/dist/evm/index.d.ts +1 -1
- package/dist/evm/index.js +4 -0
- package/dist/evm/index.js.map +1 -1
- package/dist/{index-Bv81mkG7.d.ts → index-D-sFKbtL.d.ts} +1759 -285
- package/dist/{index-q-f4hxV5.d.cts → index-DjraRZJ1.d.cts} +1759 -285
- package/dist/index.cjs +2571 -706
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -5
- package/dist/index.d.ts +7 -5
- package/dist/index.js +2568 -708
- package/dist/index.js.map +1 -1
- package/dist/solana/index.cjs +4 -0
- package/dist/solana/index.cjs.map +1 -1
- package/dist/solana/index.d.cts +1 -1
- package/dist/solana/index.d.ts +1 -1
- package/dist/solana/index.js +4 -0
- package/dist/solana/index.js.map +1 -1
- package/dist/starknet/index.cjs +2628 -757
- package/dist/starknet/index.cjs.map +1 -1
- package/dist/starknet/index.d.cts +3 -3
- package/dist/starknet/index.d.ts +3 -3
- package/dist/starknet/index.js +2627 -759
- package/dist/starknet/index.js.map +1 -1
- package/dist/stellar/index.cjs +4 -0
- package/dist/stellar/index.cjs.map +1 -1
- package/dist/stellar/index.d.cts +1 -1
- package/dist/stellar/index.d.ts +1 -1
- package/dist/stellar/index.js +4 -0
- package/dist/stellar/index.js.map +1 -1
- package/dist/{types-DNJNR50M.d.cts → types-V6imkXvR.d.cts} +7 -20
- package/dist/{types-DNJNR50M.d.ts → types-V6imkXvR.d.ts} +7 -20
- package/package.json +2 -2
package/dist/starknet/index.cjs
CHANGED
|
@@ -43,6 +43,10 @@ var COORDINATES = {
|
|
|
43
43
|
ipClubRegistry: "0x00e189c619b6bb07d78973a149641c59c37eb0716f8584d7520bce12d303eede",
|
|
44
44
|
ipClubNftClassHash: "0x02bc9b20cca21b04245e9215bf7121f4d7295b195890e449b472b573017fb889",
|
|
45
45
|
ipClubStartBlock: 11404776,
|
|
46
|
+
ipClubFactory: "0x010726346c264d1832a7303afaf5692dbd2b05446fecc6da30d958d0227c36d0",
|
|
47
|
+
ipClubFactoryClassHash: "0x07197062578375d962b2d42d3e91560770b11b1c97a9defb74c706a2c5299473",
|
|
48
|
+
ipClubCollectionClassHash: "0x049dc5e5ff00e67d5d457c6991ee70822f36a979b76cefd1b617aeccd7051d4b",
|
|
49
|
+
ipClubFactoryStartBlock: 11652766,
|
|
46
50
|
ipSponsorship: "0x044d9b9c3bb29b94685b0a3fe27a5e2dfa30a3637ab55979c718ebcd3268bc2f",
|
|
47
51
|
ipSponsorshipStartBlock: 11405085,
|
|
48
52
|
// Dedicated ip-erc721/MIP instance for sponsorship receipts (class hash
|
|
@@ -7042,12 +7046,1744 @@ var IPClubNFTABI = [
|
|
|
7042
7046
|
}
|
|
7043
7047
|
];
|
|
7044
7048
|
|
|
7049
|
+
// src/starknet/abis/ipClubFactory.ts
|
|
7050
|
+
var IPClubFactoryABI = [
|
|
7051
|
+
{
|
|
7052
|
+
"type": "impl",
|
|
7053
|
+
"name": "IPClubFactoryImpl",
|
|
7054
|
+
"interface_name": "ip_club::interface::IIPClubFactory"
|
|
7055
|
+
},
|
|
7056
|
+
{
|
|
7057
|
+
"type": "struct",
|
|
7058
|
+
"name": "core::byte_array::ByteArray",
|
|
7059
|
+
"members": [
|
|
7060
|
+
{ "name": "data", "type": "core::array::Array::<core::bytes_31::bytes31>" },
|
|
7061
|
+
{ "name": "pending_word", "type": "core::felt252" },
|
|
7062
|
+
{ "name": "pending_word_len", "type": "core::internal::bounded_int::BoundedInt::<0, 30>" }
|
|
7063
|
+
]
|
|
7064
|
+
},
|
|
7065
|
+
{
|
|
7066
|
+
"type": "struct",
|
|
7067
|
+
"name": "core::integer::u256",
|
|
7068
|
+
"members": [
|
|
7069
|
+
{ "name": "low", "type": "core::integer::u128" },
|
|
7070
|
+
{ "name": "high", "type": "core::integer::u128" }
|
|
7071
|
+
]
|
|
7072
|
+
},
|
|
7073
|
+
{
|
|
7074
|
+
"type": "enum",
|
|
7075
|
+
"name": "core::option::Option::<core::starknet::contract_address::ContractAddress>",
|
|
7076
|
+
"variants": [
|
|
7077
|
+
{ "name": "Some", "type": "core::starknet::contract_address::ContractAddress" },
|
|
7078
|
+
{ "name": "None", "type": "()" }
|
|
7079
|
+
]
|
|
7080
|
+
},
|
|
7081
|
+
{
|
|
7082
|
+
"type": "interface",
|
|
7083
|
+
"name": "ip_club::interface::IIPClubFactory",
|
|
7084
|
+
"items": [
|
|
7085
|
+
{
|
|
7086
|
+
"type": "function",
|
|
7087
|
+
"name": "collection_class_hash",
|
|
7088
|
+
"inputs": [],
|
|
7089
|
+
"outputs": [{ "type": "core::starknet::class_hash::ClassHash" }],
|
|
7090
|
+
"state_mutability": "view"
|
|
7091
|
+
},
|
|
7092
|
+
{
|
|
7093
|
+
"type": "function",
|
|
7094
|
+
"name": "version",
|
|
7095
|
+
"inputs": [],
|
|
7096
|
+
"outputs": [{ "type": "core::byte_array::ByteArray" }],
|
|
7097
|
+
"state_mutability": "view"
|
|
7098
|
+
},
|
|
7099
|
+
{
|
|
7100
|
+
"type": "function",
|
|
7101
|
+
"name": "deploy_club",
|
|
7102
|
+
"inputs": [
|
|
7103
|
+
{ "name": "name", "type": "core::byte_array::ByteArray" },
|
|
7104
|
+
{ "name": "symbol", "type": "core::byte_array::ByteArray" },
|
|
7105
|
+
{ "name": "base_uri", "type": "core::byte_array::ByteArray" },
|
|
7106
|
+
{ "name": "max_supply", "type": "core::integer::u256" },
|
|
7107
|
+
{ "name": "entry_fee", "type": "core::integer::u256" },
|
|
7108
|
+
{ "name": "payment_token", "type": "core::option::Option::<core::starknet::contract_address::ContractAddress>" },
|
|
7109
|
+
{ "name": "royalty_bps", "type": "core::integer::u256" }
|
|
7110
|
+
],
|
|
7111
|
+
"outputs": [{ "type": "core::starknet::contract_address::ContractAddress" }],
|
|
7112
|
+
"state_mutability": "external"
|
|
7113
|
+
}
|
|
7114
|
+
]
|
|
7115
|
+
},
|
|
7116
|
+
{
|
|
7117
|
+
"type": "impl",
|
|
7118
|
+
"name": "SRC5Impl",
|
|
7119
|
+
"interface_name": "openzeppelin_introspection::interface::ISRC5"
|
|
7120
|
+
},
|
|
7121
|
+
{
|
|
7122
|
+
"type": "enum",
|
|
7123
|
+
"name": "core::bool",
|
|
7124
|
+
"variants": [
|
|
7125
|
+
{ "name": "False", "type": "()" },
|
|
7126
|
+
{ "name": "True", "type": "()" }
|
|
7127
|
+
]
|
|
7128
|
+
},
|
|
7129
|
+
{
|
|
7130
|
+
"type": "interface",
|
|
7131
|
+
"name": "openzeppelin_introspection::interface::ISRC5",
|
|
7132
|
+
"items": [
|
|
7133
|
+
{
|
|
7134
|
+
"type": "function",
|
|
7135
|
+
"name": "supports_interface",
|
|
7136
|
+
"inputs": [{ "name": "interface_id", "type": "core::felt252" }],
|
|
7137
|
+
"outputs": [{ "type": "core::bool" }],
|
|
7138
|
+
"state_mutability": "view"
|
|
7139
|
+
}
|
|
7140
|
+
]
|
|
7141
|
+
},
|
|
7142
|
+
{
|
|
7143
|
+
"type": "constructor",
|
|
7144
|
+
"name": "constructor",
|
|
7145
|
+
"inputs": [
|
|
7146
|
+
{ "name": "collection_class_hash", "type": "core::starknet::class_hash::ClassHash" }
|
|
7147
|
+
]
|
|
7148
|
+
},
|
|
7149
|
+
{
|
|
7150
|
+
"type": "event",
|
|
7151
|
+
"name": "openzeppelin_introspection::src5::SRC5Component::Event",
|
|
7152
|
+
"kind": "enum",
|
|
7153
|
+
"variants": []
|
|
7154
|
+
},
|
|
7155
|
+
{
|
|
7156
|
+
"type": "event",
|
|
7157
|
+
"name": "ip_club::IPClubFactory::IPClubFactory::ClubDeployed",
|
|
7158
|
+
"kind": "struct",
|
|
7159
|
+
"members": [
|
|
7160
|
+
{ "name": "collection_address", "type": "core::starknet::contract_address::ContractAddress", "kind": "key" },
|
|
7161
|
+
{ "name": "owner", "type": "core::starknet::contract_address::ContractAddress", "kind": "key" },
|
|
7162
|
+
{ "name": "name", "type": "core::byte_array::ByteArray", "kind": "data" },
|
|
7163
|
+
{ "name": "symbol", "type": "core::byte_array::ByteArray", "kind": "data" }
|
|
7164
|
+
]
|
|
7165
|
+
},
|
|
7166
|
+
{
|
|
7167
|
+
"type": "event",
|
|
7168
|
+
"name": "ip_club::IPClubFactory::IPClubFactory::Event",
|
|
7169
|
+
"kind": "enum",
|
|
7170
|
+
"variants": [
|
|
7171
|
+
{ "name": "SRC5Event", "type": "openzeppelin_introspection::src5::SRC5Component::Event", "kind": "flat" },
|
|
7172
|
+
{ "name": "ClubDeployed", "type": "ip_club::IPClubFactory::IPClubFactory::ClubDeployed", "kind": "nested" }
|
|
7173
|
+
]
|
|
7174
|
+
}
|
|
7175
|
+
];
|
|
7176
|
+
|
|
7177
|
+
// src/starknet/abis/ipClubCollection.ts
|
|
7178
|
+
var IPClubCollectionABI = [
|
|
7179
|
+
{
|
|
7180
|
+
"type": "impl",
|
|
7181
|
+
"name": "ERC721MetadataImpl",
|
|
7182
|
+
"interface_name": "openzeppelin_token::erc721::interface::IERC721Metadata"
|
|
7183
|
+
},
|
|
7184
|
+
{
|
|
7185
|
+
"type": "struct",
|
|
7186
|
+
"name": "core::byte_array::ByteArray",
|
|
7187
|
+
"members": [
|
|
7188
|
+
{
|
|
7189
|
+
"name": "data",
|
|
7190
|
+
"type": "core::array::Array::<core::bytes_31::bytes31>"
|
|
7191
|
+
},
|
|
7192
|
+
{
|
|
7193
|
+
"name": "pending_word",
|
|
7194
|
+
"type": "core::felt252"
|
|
7195
|
+
},
|
|
7196
|
+
{
|
|
7197
|
+
"name": "pending_word_len",
|
|
7198
|
+
"type": "core::internal::bounded_int::BoundedInt::<0, 30>"
|
|
7199
|
+
}
|
|
7200
|
+
]
|
|
7201
|
+
},
|
|
7202
|
+
{
|
|
7203
|
+
"type": "struct",
|
|
7204
|
+
"name": "core::integer::u256",
|
|
7205
|
+
"members": [
|
|
7206
|
+
{
|
|
7207
|
+
"name": "low",
|
|
7208
|
+
"type": "core::integer::u128"
|
|
7209
|
+
},
|
|
7210
|
+
{
|
|
7211
|
+
"name": "high",
|
|
7212
|
+
"type": "core::integer::u128"
|
|
7213
|
+
}
|
|
7214
|
+
]
|
|
7215
|
+
},
|
|
7216
|
+
{
|
|
7217
|
+
"type": "interface",
|
|
7218
|
+
"name": "openzeppelin_token::erc721::interface::IERC721Metadata",
|
|
7219
|
+
"items": [
|
|
7220
|
+
{
|
|
7221
|
+
"type": "function",
|
|
7222
|
+
"name": "name",
|
|
7223
|
+
"inputs": [],
|
|
7224
|
+
"outputs": [
|
|
7225
|
+
{
|
|
7226
|
+
"type": "core::byte_array::ByteArray"
|
|
7227
|
+
}
|
|
7228
|
+
],
|
|
7229
|
+
"state_mutability": "view"
|
|
7230
|
+
},
|
|
7231
|
+
{
|
|
7232
|
+
"type": "function",
|
|
7233
|
+
"name": "symbol",
|
|
7234
|
+
"inputs": [],
|
|
7235
|
+
"outputs": [
|
|
7236
|
+
{
|
|
7237
|
+
"type": "core::byte_array::ByteArray"
|
|
7238
|
+
}
|
|
7239
|
+
],
|
|
7240
|
+
"state_mutability": "view"
|
|
7241
|
+
},
|
|
7242
|
+
{
|
|
7243
|
+
"type": "function",
|
|
7244
|
+
"name": "token_uri",
|
|
7245
|
+
"inputs": [
|
|
7246
|
+
{
|
|
7247
|
+
"name": "token_id",
|
|
7248
|
+
"type": "core::integer::u256"
|
|
7249
|
+
}
|
|
7250
|
+
],
|
|
7251
|
+
"outputs": [
|
|
7252
|
+
{
|
|
7253
|
+
"type": "core::byte_array::ByteArray"
|
|
7254
|
+
}
|
|
7255
|
+
],
|
|
7256
|
+
"state_mutability": "view"
|
|
7257
|
+
}
|
|
7258
|
+
]
|
|
7259
|
+
},
|
|
7260
|
+
{
|
|
7261
|
+
"type": "impl",
|
|
7262
|
+
"name": "ERC721MetadataCamelOnlyImpl",
|
|
7263
|
+
"interface_name": "openzeppelin_token::erc721::interface::IERC721MetadataCamelOnly"
|
|
7264
|
+
},
|
|
7265
|
+
{
|
|
7266
|
+
"type": "interface",
|
|
7267
|
+
"name": "openzeppelin_token::erc721::interface::IERC721MetadataCamelOnly",
|
|
7268
|
+
"items": [
|
|
7269
|
+
{
|
|
7270
|
+
"type": "function",
|
|
7271
|
+
"name": "tokenURI",
|
|
7272
|
+
"inputs": [
|
|
7273
|
+
{
|
|
7274
|
+
"name": "tokenId",
|
|
7275
|
+
"type": "core::integer::u256"
|
|
7276
|
+
}
|
|
7277
|
+
],
|
|
7278
|
+
"outputs": [
|
|
7279
|
+
{
|
|
7280
|
+
"type": "core::byte_array::ByteArray"
|
|
7281
|
+
}
|
|
7282
|
+
],
|
|
7283
|
+
"state_mutability": "view"
|
|
7284
|
+
}
|
|
7285
|
+
]
|
|
7286
|
+
},
|
|
7287
|
+
{
|
|
7288
|
+
"type": "impl",
|
|
7289
|
+
"name": "IPClubCollectionImpl",
|
|
7290
|
+
"interface_name": "ip_club::interface::IIPClubCollection"
|
|
7291
|
+
},
|
|
7292
|
+
{
|
|
7293
|
+
"type": "enum",
|
|
7294
|
+
"name": "core::bool",
|
|
7295
|
+
"variants": [
|
|
7296
|
+
{
|
|
7297
|
+
"name": "False",
|
|
7298
|
+
"type": "()"
|
|
7299
|
+
},
|
|
7300
|
+
{
|
|
7301
|
+
"name": "True",
|
|
7302
|
+
"type": "()"
|
|
7303
|
+
}
|
|
7304
|
+
]
|
|
7305
|
+
},
|
|
7306
|
+
{
|
|
7307
|
+
"type": "enum",
|
|
7308
|
+
"name": "core::option::Option::<core::starknet::contract_address::ContractAddress>",
|
|
7309
|
+
"variants": [
|
|
7310
|
+
{
|
|
7311
|
+
"name": "Some",
|
|
7312
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
7313
|
+
},
|
|
7314
|
+
{
|
|
7315
|
+
"name": "None",
|
|
7316
|
+
"type": "()"
|
|
7317
|
+
}
|
|
7318
|
+
]
|
|
7319
|
+
},
|
|
7320
|
+
{
|
|
7321
|
+
"type": "interface",
|
|
7322
|
+
"name": "ip_club::interface::IIPClubCollection",
|
|
7323
|
+
"items": [
|
|
7324
|
+
{
|
|
7325
|
+
"type": "function",
|
|
7326
|
+
"name": "mint",
|
|
7327
|
+
"inputs": [
|
|
7328
|
+
{
|
|
7329
|
+
"name": "to",
|
|
7330
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
7331
|
+
}
|
|
7332
|
+
],
|
|
7333
|
+
"outputs": [
|
|
7334
|
+
{
|
|
7335
|
+
"type": "core::integer::u256"
|
|
7336
|
+
}
|
|
7337
|
+
],
|
|
7338
|
+
"state_mutability": "external"
|
|
7339
|
+
},
|
|
7340
|
+
{
|
|
7341
|
+
"type": "function",
|
|
7342
|
+
"name": "set_open",
|
|
7343
|
+
"inputs": [
|
|
7344
|
+
{
|
|
7345
|
+
"name": "open",
|
|
7346
|
+
"type": "core::bool"
|
|
7347
|
+
}
|
|
7348
|
+
],
|
|
7349
|
+
"outputs": [],
|
|
7350
|
+
"state_mutability": "external"
|
|
7351
|
+
},
|
|
7352
|
+
{
|
|
7353
|
+
"type": "function",
|
|
7354
|
+
"name": "base_uri",
|
|
7355
|
+
"inputs": [],
|
|
7356
|
+
"outputs": [
|
|
7357
|
+
{
|
|
7358
|
+
"type": "core::byte_array::ByteArray"
|
|
7359
|
+
}
|
|
7360
|
+
],
|
|
7361
|
+
"state_mutability": "view"
|
|
7362
|
+
},
|
|
7363
|
+
{
|
|
7364
|
+
"type": "function",
|
|
7365
|
+
"name": "entry_fee",
|
|
7366
|
+
"inputs": [],
|
|
7367
|
+
"outputs": [
|
|
7368
|
+
{
|
|
7369
|
+
"type": "core::integer::u256"
|
|
7370
|
+
}
|
|
7371
|
+
],
|
|
7372
|
+
"state_mutability": "view"
|
|
7373
|
+
},
|
|
7374
|
+
{
|
|
7375
|
+
"type": "function",
|
|
7376
|
+
"name": "payment_token",
|
|
7377
|
+
"inputs": [],
|
|
7378
|
+
"outputs": [
|
|
7379
|
+
{
|
|
7380
|
+
"type": "core::option::Option::<core::starknet::contract_address::ContractAddress>"
|
|
7381
|
+
}
|
|
7382
|
+
],
|
|
7383
|
+
"state_mutability": "view"
|
|
7384
|
+
},
|
|
7385
|
+
{
|
|
7386
|
+
"type": "function",
|
|
7387
|
+
"name": "max_supply",
|
|
7388
|
+
"inputs": [],
|
|
7389
|
+
"outputs": [
|
|
7390
|
+
{
|
|
7391
|
+
"type": "core::integer::u256"
|
|
7392
|
+
}
|
|
7393
|
+
],
|
|
7394
|
+
"state_mutability": "view"
|
|
7395
|
+
},
|
|
7396
|
+
{
|
|
7397
|
+
"type": "function",
|
|
7398
|
+
"name": "total_minted",
|
|
7399
|
+
"inputs": [],
|
|
7400
|
+
"outputs": [
|
|
7401
|
+
{
|
|
7402
|
+
"type": "core::integer::u256"
|
|
7403
|
+
}
|
|
7404
|
+
],
|
|
7405
|
+
"state_mutability": "view"
|
|
7406
|
+
},
|
|
7407
|
+
{
|
|
7408
|
+
"type": "function",
|
|
7409
|
+
"name": "is_open",
|
|
7410
|
+
"inputs": [],
|
|
7411
|
+
"outputs": [
|
|
7412
|
+
{
|
|
7413
|
+
"type": "core::bool"
|
|
7414
|
+
}
|
|
7415
|
+
],
|
|
7416
|
+
"state_mutability": "view"
|
|
7417
|
+
},
|
|
7418
|
+
{
|
|
7419
|
+
"type": "function",
|
|
7420
|
+
"name": "royalty_info",
|
|
7421
|
+
"inputs": [
|
|
7422
|
+
{
|
|
7423
|
+
"name": "token_id",
|
|
7424
|
+
"type": "core::integer::u256"
|
|
7425
|
+
},
|
|
7426
|
+
{
|
|
7427
|
+
"name": "sale_price",
|
|
7428
|
+
"type": "core::integer::u256"
|
|
7429
|
+
}
|
|
7430
|
+
],
|
|
7431
|
+
"outputs": [
|
|
7432
|
+
{
|
|
7433
|
+
"type": "(core::starknet::contract_address::ContractAddress, core::integer::u256)"
|
|
7434
|
+
}
|
|
7435
|
+
],
|
|
7436
|
+
"state_mutability": "view"
|
|
7437
|
+
},
|
|
7438
|
+
{
|
|
7439
|
+
"type": "function",
|
|
7440
|
+
"name": "royaltyInfo",
|
|
7441
|
+
"inputs": [
|
|
7442
|
+
{
|
|
7443
|
+
"name": "token_id",
|
|
7444
|
+
"type": "core::integer::u256"
|
|
7445
|
+
},
|
|
7446
|
+
{
|
|
7447
|
+
"name": "sale_price",
|
|
7448
|
+
"type": "core::integer::u256"
|
|
7449
|
+
}
|
|
7450
|
+
],
|
|
7451
|
+
"outputs": [
|
|
7452
|
+
{
|
|
7453
|
+
"type": "(core::starknet::contract_address::ContractAddress, core::integer::u256)"
|
|
7454
|
+
}
|
|
7455
|
+
],
|
|
7456
|
+
"state_mutability": "view"
|
|
7457
|
+
},
|
|
7458
|
+
{
|
|
7459
|
+
"type": "function",
|
|
7460
|
+
"name": "version",
|
|
7461
|
+
"inputs": [],
|
|
7462
|
+
"outputs": [
|
|
7463
|
+
{
|
|
7464
|
+
"type": "core::byte_array::ByteArray"
|
|
7465
|
+
}
|
|
7466
|
+
],
|
|
7467
|
+
"state_mutability": "view"
|
|
7468
|
+
}
|
|
7469
|
+
]
|
|
7470
|
+
},
|
|
7471
|
+
{
|
|
7472
|
+
"type": "impl",
|
|
7473
|
+
"name": "ERC721Impl",
|
|
7474
|
+
"interface_name": "openzeppelin_token::erc721::interface::IERC721"
|
|
7475
|
+
},
|
|
7476
|
+
{
|
|
7477
|
+
"type": "struct",
|
|
7478
|
+
"name": "core::array::Span::<core::felt252>",
|
|
7479
|
+
"members": [
|
|
7480
|
+
{
|
|
7481
|
+
"name": "snapshot",
|
|
7482
|
+
"type": "@core::array::Array::<core::felt252>"
|
|
7483
|
+
}
|
|
7484
|
+
]
|
|
7485
|
+
},
|
|
7486
|
+
{
|
|
7487
|
+
"type": "interface",
|
|
7488
|
+
"name": "openzeppelin_token::erc721::interface::IERC721",
|
|
7489
|
+
"items": [
|
|
7490
|
+
{
|
|
7491
|
+
"type": "function",
|
|
7492
|
+
"name": "balance_of",
|
|
7493
|
+
"inputs": [
|
|
7494
|
+
{
|
|
7495
|
+
"name": "account",
|
|
7496
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
7497
|
+
}
|
|
7498
|
+
],
|
|
7499
|
+
"outputs": [
|
|
7500
|
+
{
|
|
7501
|
+
"type": "core::integer::u256"
|
|
7502
|
+
}
|
|
7503
|
+
],
|
|
7504
|
+
"state_mutability": "view"
|
|
7505
|
+
},
|
|
7506
|
+
{
|
|
7507
|
+
"type": "function",
|
|
7508
|
+
"name": "owner_of",
|
|
7509
|
+
"inputs": [
|
|
7510
|
+
{
|
|
7511
|
+
"name": "token_id",
|
|
7512
|
+
"type": "core::integer::u256"
|
|
7513
|
+
}
|
|
7514
|
+
],
|
|
7515
|
+
"outputs": [
|
|
7516
|
+
{
|
|
7517
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
7518
|
+
}
|
|
7519
|
+
],
|
|
7520
|
+
"state_mutability": "view"
|
|
7521
|
+
},
|
|
7522
|
+
{
|
|
7523
|
+
"type": "function",
|
|
7524
|
+
"name": "safe_transfer_from",
|
|
7525
|
+
"inputs": [
|
|
7526
|
+
{
|
|
7527
|
+
"name": "from",
|
|
7528
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
7529
|
+
},
|
|
7530
|
+
{
|
|
7531
|
+
"name": "to",
|
|
7532
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
7533
|
+
},
|
|
7534
|
+
{
|
|
7535
|
+
"name": "token_id",
|
|
7536
|
+
"type": "core::integer::u256"
|
|
7537
|
+
},
|
|
7538
|
+
{
|
|
7539
|
+
"name": "data",
|
|
7540
|
+
"type": "core::array::Span::<core::felt252>"
|
|
7541
|
+
}
|
|
7542
|
+
],
|
|
7543
|
+
"outputs": [],
|
|
7544
|
+
"state_mutability": "external"
|
|
7545
|
+
},
|
|
7546
|
+
{
|
|
7547
|
+
"type": "function",
|
|
7548
|
+
"name": "transfer_from",
|
|
7549
|
+
"inputs": [
|
|
7550
|
+
{
|
|
7551
|
+
"name": "from",
|
|
7552
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
7553
|
+
},
|
|
7554
|
+
{
|
|
7555
|
+
"name": "to",
|
|
7556
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
7557
|
+
},
|
|
7558
|
+
{
|
|
7559
|
+
"name": "token_id",
|
|
7560
|
+
"type": "core::integer::u256"
|
|
7561
|
+
}
|
|
7562
|
+
],
|
|
7563
|
+
"outputs": [],
|
|
7564
|
+
"state_mutability": "external"
|
|
7565
|
+
},
|
|
7566
|
+
{
|
|
7567
|
+
"type": "function",
|
|
7568
|
+
"name": "approve",
|
|
7569
|
+
"inputs": [
|
|
7570
|
+
{
|
|
7571
|
+
"name": "to",
|
|
7572
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
7573
|
+
},
|
|
7574
|
+
{
|
|
7575
|
+
"name": "token_id",
|
|
7576
|
+
"type": "core::integer::u256"
|
|
7577
|
+
}
|
|
7578
|
+
],
|
|
7579
|
+
"outputs": [],
|
|
7580
|
+
"state_mutability": "external"
|
|
7581
|
+
},
|
|
7582
|
+
{
|
|
7583
|
+
"type": "function",
|
|
7584
|
+
"name": "set_approval_for_all",
|
|
7585
|
+
"inputs": [
|
|
7586
|
+
{
|
|
7587
|
+
"name": "operator",
|
|
7588
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
7589
|
+
},
|
|
7590
|
+
{
|
|
7591
|
+
"name": "approved",
|
|
7592
|
+
"type": "core::bool"
|
|
7593
|
+
}
|
|
7594
|
+
],
|
|
7595
|
+
"outputs": [],
|
|
7596
|
+
"state_mutability": "external"
|
|
7597
|
+
},
|
|
7598
|
+
{
|
|
7599
|
+
"type": "function",
|
|
7600
|
+
"name": "get_approved",
|
|
7601
|
+
"inputs": [
|
|
7602
|
+
{
|
|
7603
|
+
"name": "token_id",
|
|
7604
|
+
"type": "core::integer::u256"
|
|
7605
|
+
}
|
|
7606
|
+
],
|
|
7607
|
+
"outputs": [
|
|
7608
|
+
{
|
|
7609
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
7610
|
+
}
|
|
7611
|
+
],
|
|
7612
|
+
"state_mutability": "view"
|
|
7613
|
+
},
|
|
7614
|
+
{
|
|
7615
|
+
"type": "function",
|
|
7616
|
+
"name": "is_approved_for_all",
|
|
7617
|
+
"inputs": [
|
|
7618
|
+
{
|
|
7619
|
+
"name": "owner",
|
|
7620
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
7621
|
+
},
|
|
7622
|
+
{
|
|
7623
|
+
"name": "operator",
|
|
7624
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
7625
|
+
}
|
|
7626
|
+
],
|
|
7627
|
+
"outputs": [
|
|
7628
|
+
{
|
|
7629
|
+
"type": "core::bool"
|
|
7630
|
+
}
|
|
7631
|
+
],
|
|
7632
|
+
"state_mutability": "view"
|
|
7633
|
+
}
|
|
7634
|
+
]
|
|
7635
|
+
},
|
|
7636
|
+
{
|
|
7637
|
+
"type": "impl",
|
|
7638
|
+
"name": "ERC721CamelOnly",
|
|
7639
|
+
"interface_name": "openzeppelin_token::erc721::interface::IERC721CamelOnly"
|
|
7640
|
+
},
|
|
7641
|
+
{
|
|
7642
|
+
"type": "interface",
|
|
7643
|
+
"name": "openzeppelin_token::erc721::interface::IERC721CamelOnly",
|
|
7644
|
+
"items": [
|
|
7645
|
+
{
|
|
7646
|
+
"type": "function",
|
|
7647
|
+
"name": "balanceOf",
|
|
7648
|
+
"inputs": [
|
|
7649
|
+
{
|
|
7650
|
+
"name": "account",
|
|
7651
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
7652
|
+
}
|
|
7653
|
+
],
|
|
7654
|
+
"outputs": [
|
|
7655
|
+
{
|
|
7656
|
+
"type": "core::integer::u256"
|
|
7657
|
+
}
|
|
7658
|
+
],
|
|
7659
|
+
"state_mutability": "view"
|
|
7660
|
+
},
|
|
7661
|
+
{
|
|
7662
|
+
"type": "function",
|
|
7663
|
+
"name": "ownerOf",
|
|
7664
|
+
"inputs": [
|
|
7665
|
+
{
|
|
7666
|
+
"name": "tokenId",
|
|
7667
|
+
"type": "core::integer::u256"
|
|
7668
|
+
}
|
|
7669
|
+
],
|
|
7670
|
+
"outputs": [
|
|
7671
|
+
{
|
|
7672
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
7673
|
+
}
|
|
7674
|
+
],
|
|
7675
|
+
"state_mutability": "view"
|
|
7676
|
+
},
|
|
7677
|
+
{
|
|
7678
|
+
"type": "function",
|
|
7679
|
+
"name": "safeTransferFrom",
|
|
7680
|
+
"inputs": [
|
|
7681
|
+
{
|
|
7682
|
+
"name": "from",
|
|
7683
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
7684
|
+
},
|
|
7685
|
+
{
|
|
7686
|
+
"name": "to",
|
|
7687
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
7688
|
+
},
|
|
7689
|
+
{
|
|
7690
|
+
"name": "tokenId",
|
|
7691
|
+
"type": "core::integer::u256"
|
|
7692
|
+
},
|
|
7693
|
+
{
|
|
7694
|
+
"name": "data",
|
|
7695
|
+
"type": "core::array::Span::<core::felt252>"
|
|
7696
|
+
}
|
|
7697
|
+
],
|
|
7698
|
+
"outputs": [],
|
|
7699
|
+
"state_mutability": "external"
|
|
7700
|
+
},
|
|
7701
|
+
{
|
|
7702
|
+
"type": "function",
|
|
7703
|
+
"name": "transferFrom",
|
|
7704
|
+
"inputs": [
|
|
7705
|
+
{
|
|
7706
|
+
"name": "from",
|
|
7707
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
7708
|
+
},
|
|
7709
|
+
{
|
|
7710
|
+
"name": "to",
|
|
7711
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
7712
|
+
},
|
|
7713
|
+
{
|
|
7714
|
+
"name": "tokenId",
|
|
7715
|
+
"type": "core::integer::u256"
|
|
7716
|
+
}
|
|
7717
|
+
],
|
|
7718
|
+
"outputs": [],
|
|
7719
|
+
"state_mutability": "external"
|
|
7720
|
+
},
|
|
7721
|
+
{
|
|
7722
|
+
"type": "function",
|
|
7723
|
+
"name": "setApprovalForAll",
|
|
7724
|
+
"inputs": [
|
|
7725
|
+
{
|
|
7726
|
+
"name": "operator",
|
|
7727
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
7728
|
+
},
|
|
7729
|
+
{
|
|
7730
|
+
"name": "approved",
|
|
7731
|
+
"type": "core::bool"
|
|
7732
|
+
}
|
|
7733
|
+
],
|
|
7734
|
+
"outputs": [],
|
|
7735
|
+
"state_mutability": "external"
|
|
7736
|
+
},
|
|
7737
|
+
{
|
|
7738
|
+
"type": "function",
|
|
7739
|
+
"name": "getApproved",
|
|
7740
|
+
"inputs": [
|
|
7741
|
+
{
|
|
7742
|
+
"name": "tokenId",
|
|
7743
|
+
"type": "core::integer::u256"
|
|
7744
|
+
}
|
|
7745
|
+
],
|
|
7746
|
+
"outputs": [
|
|
7747
|
+
{
|
|
7748
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
7749
|
+
}
|
|
7750
|
+
],
|
|
7751
|
+
"state_mutability": "view"
|
|
7752
|
+
},
|
|
7753
|
+
{
|
|
7754
|
+
"type": "function",
|
|
7755
|
+
"name": "isApprovedForAll",
|
|
7756
|
+
"inputs": [
|
|
7757
|
+
{
|
|
7758
|
+
"name": "owner",
|
|
7759
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
7760
|
+
},
|
|
7761
|
+
{
|
|
7762
|
+
"name": "operator",
|
|
7763
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
7764
|
+
}
|
|
7765
|
+
],
|
|
7766
|
+
"outputs": [
|
|
7767
|
+
{
|
|
7768
|
+
"type": "core::bool"
|
|
7769
|
+
}
|
|
7770
|
+
],
|
|
7771
|
+
"state_mutability": "view"
|
|
7772
|
+
}
|
|
7773
|
+
]
|
|
7774
|
+
},
|
|
7775
|
+
{
|
|
7776
|
+
"type": "impl",
|
|
7777
|
+
"name": "SRC5Impl",
|
|
7778
|
+
"interface_name": "openzeppelin_introspection::interface::ISRC5"
|
|
7779
|
+
},
|
|
7780
|
+
{
|
|
7781
|
+
"type": "interface",
|
|
7782
|
+
"name": "openzeppelin_introspection::interface::ISRC5",
|
|
7783
|
+
"items": [
|
|
7784
|
+
{
|
|
7785
|
+
"type": "function",
|
|
7786
|
+
"name": "supports_interface",
|
|
7787
|
+
"inputs": [
|
|
7788
|
+
{
|
|
7789
|
+
"name": "interface_id",
|
|
7790
|
+
"type": "core::felt252"
|
|
7791
|
+
}
|
|
7792
|
+
],
|
|
7793
|
+
"outputs": [
|
|
7794
|
+
{
|
|
7795
|
+
"type": "core::bool"
|
|
7796
|
+
}
|
|
7797
|
+
],
|
|
7798
|
+
"state_mutability": "view"
|
|
7799
|
+
}
|
|
7800
|
+
]
|
|
7801
|
+
},
|
|
7802
|
+
{
|
|
7803
|
+
"type": "impl",
|
|
7804
|
+
"name": "OwnableMixinImpl",
|
|
7805
|
+
"interface_name": "openzeppelin_access::ownable::interface::OwnableABI"
|
|
7806
|
+
},
|
|
7807
|
+
{
|
|
7808
|
+
"type": "interface",
|
|
7809
|
+
"name": "openzeppelin_access::ownable::interface::OwnableABI",
|
|
7810
|
+
"items": [
|
|
7811
|
+
{
|
|
7812
|
+
"type": "function",
|
|
7813
|
+
"name": "owner",
|
|
7814
|
+
"inputs": [],
|
|
7815
|
+
"outputs": [
|
|
7816
|
+
{
|
|
7817
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
7818
|
+
}
|
|
7819
|
+
],
|
|
7820
|
+
"state_mutability": "view"
|
|
7821
|
+
},
|
|
7822
|
+
{
|
|
7823
|
+
"type": "function",
|
|
7824
|
+
"name": "transfer_ownership",
|
|
7825
|
+
"inputs": [
|
|
7826
|
+
{
|
|
7827
|
+
"name": "new_owner",
|
|
7828
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
7829
|
+
}
|
|
7830
|
+
],
|
|
7831
|
+
"outputs": [],
|
|
7832
|
+
"state_mutability": "external"
|
|
7833
|
+
},
|
|
7834
|
+
{
|
|
7835
|
+
"type": "function",
|
|
7836
|
+
"name": "renounce_ownership",
|
|
7837
|
+
"inputs": [],
|
|
7838
|
+
"outputs": [],
|
|
7839
|
+
"state_mutability": "external"
|
|
7840
|
+
},
|
|
7841
|
+
{
|
|
7842
|
+
"type": "function",
|
|
7843
|
+
"name": "transferOwnership",
|
|
7844
|
+
"inputs": [
|
|
7845
|
+
{
|
|
7846
|
+
"name": "newOwner",
|
|
7847
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
7848
|
+
}
|
|
7849
|
+
],
|
|
7850
|
+
"outputs": [],
|
|
7851
|
+
"state_mutability": "external"
|
|
7852
|
+
},
|
|
7853
|
+
{
|
|
7854
|
+
"type": "function",
|
|
7855
|
+
"name": "renounceOwnership",
|
|
7856
|
+
"inputs": [],
|
|
7857
|
+
"outputs": [],
|
|
7858
|
+
"state_mutability": "external"
|
|
7859
|
+
}
|
|
7860
|
+
]
|
|
7861
|
+
},
|
|
7862
|
+
{
|
|
7863
|
+
"type": "constructor",
|
|
7864
|
+
"name": "constructor",
|
|
7865
|
+
"inputs": [
|
|
7866
|
+
{
|
|
7867
|
+
"name": "name",
|
|
7868
|
+
"type": "core::byte_array::ByteArray"
|
|
7869
|
+
},
|
|
7870
|
+
{
|
|
7871
|
+
"name": "symbol",
|
|
7872
|
+
"type": "core::byte_array::ByteArray"
|
|
7873
|
+
},
|
|
7874
|
+
{
|
|
7875
|
+
"name": "base_uri",
|
|
7876
|
+
"type": "core::byte_array::ByteArray"
|
|
7877
|
+
},
|
|
7878
|
+
{
|
|
7879
|
+
"name": "max_supply",
|
|
7880
|
+
"type": "core::integer::u256"
|
|
7881
|
+
},
|
|
7882
|
+
{
|
|
7883
|
+
"name": "entry_fee",
|
|
7884
|
+
"type": "core::integer::u256"
|
|
7885
|
+
},
|
|
7886
|
+
{
|
|
7887
|
+
"name": "payment_token",
|
|
7888
|
+
"type": "core::option::Option::<core::starknet::contract_address::ContractAddress>"
|
|
7889
|
+
},
|
|
7890
|
+
{
|
|
7891
|
+
"name": "royalty_bps",
|
|
7892
|
+
"type": "core::integer::u256"
|
|
7893
|
+
},
|
|
7894
|
+
{
|
|
7895
|
+
"name": "owner",
|
|
7896
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
7897
|
+
}
|
|
7898
|
+
]
|
|
7899
|
+
},
|
|
7900
|
+
{
|
|
7901
|
+
"type": "event",
|
|
7902
|
+
"name": "openzeppelin_token::erc721::erc721::ERC721Component::Transfer",
|
|
7903
|
+
"kind": "struct",
|
|
7904
|
+
"members": [
|
|
7905
|
+
{
|
|
7906
|
+
"name": "from",
|
|
7907
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
7908
|
+
"kind": "key"
|
|
7909
|
+
},
|
|
7910
|
+
{
|
|
7911
|
+
"name": "to",
|
|
7912
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
7913
|
+
"kind": "key"
|
|
7914
|
+
},
|
|
7915
|
+
{
|
|
7916
|
+
"name": "token_id",
|
|
7917
|
+
"type": "core::integer::u256",
|
|
7918
|
+
"kind": "key"
|
|
7919
|
+
}
|
|
7920
|
+
]
|
|
7921
|
+
},
|
|
7922
|
+
{
|
|
7923
|
+
"type": "event",
|
|
7924
|
+
"name": "openzeppelin_token::erc721::erc721::ERC721Component::Approval",
|
|
7925
|
+
"kind": "struct",
|
|
7926
|
+
"members": [
|
|
7927
|
+
{
|
|
7928
|
+
"name": "owner",
|
|
7929
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
7930
|
+
"kind": "key"
|
|
7931
|
+
},
|
|
7932
|
+
{
|
|
7933
|
+
"name": "approved",
|
|
7934
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
7935
|
+
"kind": "key"
|
|
7936
|
+
},
|
|
7937
|
+
{
|
|
7938
|
+
"name": "token_id",
|
|
7939
|
+
"type": "core::integer::u256",
|
|
7940
|
+
"kind": "key"
|
|
7941
|
+
}
|
|
7942
|
+
]
|
|
7943
|
+
},
|
|
7944
|
+
{
|
|
7945
|
+
"type": "event",
|
|
7946
|
+
"name": "openzeppelin_token::erc721::erc721::ERC721Component::ApprovalForAll",
|
|
7947
|
+
"kind": "struct",
|
|
7948
|
+
"members": [
|
|
7949
|
+
{
|
|
7950
|
+
"name": "owner",
|
|
7951
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
7952
|
+
"kind": "key"
|
|
7953
|
+
},
|
|
7954
|
+
{
|
|
7955
|
+
"name": "operator",
|
|
7956
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
7957
|
+
"kind": "key"
|
|
7958
|
+
},
|
|
7959
|
+
{
|
|
7960
|
+
"name": "approved",
|
|
7961
|
+
"type": "core::bool",
|
|
7962
|
+
"kind": "data"
|
|
7963
|
+
}
|
|
7964
|
+
]
|
|
7965
|
+
},
|
|
7966
|
+
{
|
|
7967
|
+
"type": "event",
|
|
7968
|
+
"name": "openzeppelin_token::erc721::erc721::ERC721Component::Event",
|
|
7969
|
+
"kind": "enum",
|
|
7970
|
+
"variants": [
|
|
7971
|
+
{
|
|
7972
|
+
"name": "Transfer",
|
|
7973
|
+
"type": "openzeppelin_token::erc721::erc721::ERC721Component::Transfer",
|
|
7974
|
+
"kind": "nested"
|
|
7975
|
+
},
|
|
7976
|
+
{
|
|
7977
|
+
"name": "Approval",
|
|
7978
|
+
"type": "openzeppelin_token::erc721::erc721::ERC721Component::Approval",
|
|
7979
|
+
"kind": "nested"
|
|
7980
|
+
},
|
|
7981
|
+
{
|
|
7982
|
+
"name": "ApprovalForAll",
|
|
7983
|
+
"type": "openzeppelin_token::erc721::erc721::ERC721Component::ApprovalForAll",
|
|
7984
|
+
"kind": "nested"
|
|
7985
|
+
}
|
|
7986
|
+
]
|
|
7987
|
+
},
|
|
7988
|
+
{
|
|
7989
|
+
"type": "event",
|
|
7990
|
+
"name": "openzeppelin_introspection::src5::SRC5Component::Event",
|
|
7991
|
+
"kind": "enum",
|
|
7992
|
+
"variants": []
|
|
7993
|
+
},
|
|
7994
|
+
{
|
|
7995
|
+
"type": "event",
|
|
7996
|
+
"name": "openzeppelin_access::ownable::ownable::OwnableComponent::OwnershipTransferred",
|
|
7997
|
+
"kind": "struct",
|
|
7998
|
+
"members": [
|
|
7999
|
+
{
|
|
8000
|
+
"name": "previous_owner",
|
|
8001
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
8002
|
+
"kind": "key"
|
|
8003
|
+
},
|
|
8004
|
+
{
|
|
8005
|
+
"name": "new_owner",
|
|
8006
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
8007
|
+
"kind": "key"
|
|
8008
|
+
}
|
|
8009
|
+
]
|
|
8010
|
+
},
|
|
8011
|
+
{
|
|
8012
|
+
"type": "event",
|
|
8013
|
+
"name": "openzeppelin_access::ownable::ownable::OwnableComponent::OwnershipTransferStarted",
|
|
8014
|
+
"kind": "struct",
|
|
8015
|
+
"members": [
|
|
8016
|
+
{
|
|
8017
|
+
"name": "previous_owner",
|
|
8018
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
8019
|
+
"kind": "key"
|
|
8020
|
+
},
|
|
8021
|
+
{
|
|
8022
|
+
"name": "new_owner",
|
|
8023
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
8024
|
+
"kind": "key"
|
|
8025
|
+
}
|
|
8026
|
+
]
|
|
8027
|
+
},
|
|
8028
|
+
{
|
|
8029
|
+
"type": "event",
|
|
8030
|
+
"name": "openzeppelin_access::ownable::ownable::OwnableComponent::Event",
|
|
8031
|
+
"kind": "enum",
|
|
8032
|
+
"variants": [
|
|
8033
|
+
{
|
|
8034
|
+
"name": "OwnershipTransferred",
|
|
8035
|
+
"type": "openzeppelin_access::ownable::ownable::OwnableComponent::OwnershipTransferred",
|
|
8036
|
+
"kind": "nested"
|
|
8037
|
+
},
|
|
8038
|
+
{
|
|
8039
|
+
"name": "OwnershipTransferStarted",
|
|
8040
|
+
"type": "openzeppelin_access::ownable::ownable::OwnableComponent::OwnershipTransferStarted",
|
|
8041
|
+
"kind": "nested"
|
|
8042
|
+
}
|
|
8043
|
+
]
|
|
8044
|
+
},
|
|
8045
|
+
{
|
|
8046
|
+
"type": "event",
|
|
8047
|
+
"name": "ip_club::IPClubCollection::IPClubCollection::MemberMinted",
|
|
8048
|
+
"kind": "struct",
|
|
8049
|
+
"members": [
|
|
8050
|
+
{
|
|
8051
|
+
"name": "token_id",
|
|
8052
|
+
"type": "core::integer::u256",
|
|
8053
|
+
"kind": "key"
|
|
8054
|
+
},
|
|
8055
|
+
{
|
|
8056
|
+
"name": "to",
|
|
8057
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
8058
|
+
"kind": "key"
|
|
8059
|
+
},
|
|
8060
|
+
{
|
|
8061
|
+
"name": "payer",
|
|
8062
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
8063
|
+
"kind": "data"
|
|
8064
|
+
}
|
|
8065
|
+
]
|
|
8066
|
+
},
|
|
8067
|
+
{
|
|
8068
|
+
"type": "event",
|
|
8069
|
+
"name": "ip_club::IPClubCollection::IPClubCollection::OpenStatusChanged",
|
|
8070
|
+
"kind": "struct",
|
|
8071
|
+
"members": [
|
|
8072
|
+
{
|
|
8073
|
+
"name": "open",
|
|
8074
|
+
"type": "core::bool",
|
|
8075
|
+
"kind": "data"
|
|
8076
|
+
}
|
|
8077
|
+
]
|
|
8078
|
+
},
|
|
8079
|
+
{
|
|
8080
|
+
"type": "event",
|
|
8081
|
+
"name": "ip_club::IPClubCollection::IPClubCollection::Event",
|
|
8082
|
+
"kind": "enum",
|
|
8083
|
+
"variants": [
|
|
8084
|
+
{
|
|
8085
|
+
"name": "ERC721Event",
|
|
8086
|
+
"type": "openzeppelin_token::erc721::erc721::ERC721Component::Event",
|
|
8087
|
+
"kind": "flat"
|
|
8088
|
+
},
|
|
8089
|
+
{
|
|
8090
|
+
"name": "SRC5Event",
|
|
8091
|
+
"type": "openzeppelin_introspection::src5::SRC5Component::Event",
|
|
8092
|
+
"kind": "flat"
|
|
8093
|
+
},
|
|
8094
|
+
{
|
|
8095
|
+
"name": "OwnableEvent",
|
|
8096
|
+
"type": "openzeppelin_access::ownable::ownable::OwnableComponent::Event",
|
|
8097
|
+
"kind": "flat"
|
|
8098
|
+
},
|
|
8099
|
+
{
|
|
8100
|
+
"name": "MemberMinted",
|
|
8101
|
+
"type": "ip_club::IPClubCollection::IPClubCollection::MemberMinted",
|
|
8102
|
+
"kind": "nested"
|
|
8103
|
+
},
|
|
8104
|
+
{
|
|
8105
|
+
"name": "OpenStatusChanged",
|
|
8106
|
+
"type": "ip_club::IPClubCollection::IPClubCollection::OpenStatusChanged",
|
|
8107
|
+
"kind": "nested"
|
|
8108
|
+
}
|
|
8109
|
+
]
|
|
8110
|
+
}
|
|
8111
|
+
];
|
|
8112
|
+
|
|
7045
8113
|
// src/starknet/abis/ipSponsorship.ts
|
|
7046
8114
|
var IPSponsorshipABI = [
|
|
7047
8115
|
{
|
|
7048
8116
|
"type": "impl",
|
|
7049
|
-
"name": "IPSponsorshipImpl",
|
|
7050
|
-
"interface_name": "ip_sponsorship::interface::IIPSponsorship"
|
|
8117
|
+
"name": "IPSponsorshipImpl",
|
|
8118
|
+
"interface_name": "ip_sponsorship::interface::IIPSponsorship"
|
|
8119
|
+
},
|
|
8120
|
+
{
|
|
8121
|
+
"type": "struct",
|
|
8122
|
+
"name": "core::integer::u256",
|
|
8123
|
+
"members": [
|
|
8124
|
+
{
|
|
8125
|
+
"name": "low",
|
|
8126
|
+
"type": "core::integer::u128"
|
|
8127
|
+
},
|
|
8128
|
+
{
|
|
8129
|
+
"name": "high",
|
|
8130
|
+
"type": "core::integer::u128"
|
|
8131
|
+
}
|
|
8132
|
+
]
|
|
8133
|
+
},
|
|
8134
|
+
{
|
|
8135
|
+
"type": "struct",
|
|
8136
|
+
"name": "core::byte_array::ByteArray",
|
|
8137
|
+
"members": [
|
|
8138
|
+
{
|
|
8139
|
+
"name": "data",
|
|
8140
|
+
"type": "core::array::Array::<core::bytes_31::bytes31>"
|
|
8141
|
+
},
|
|
8142
|
+
{
|
|
8143
|
+
"name": "pending_word",
|
|
8144
|
+
"type": "core::felt252"
|
|
8145
|
+
},
|
|
8146
|
+
{
|
|
8147
|
+
"name": "pending_word_len",
|
|
8148
|
+
"type": "core::internal::bounded_int::BoundedInt::<0, 30>"
|
|
8149
|
+
}
|
|
8150
|
+
]
|
|
8151
|
+
},
|
|
8152
|
+
{
|
|
8153
|
+
"type": "enum",
|
|
8154
|
+
"name": "core::bool",
|
|
8155
|
+
"variants": [
|
|
8156
|
+
{
|
|
8157
|
+
"name": "False",
|
|
8158
|
+
"type": "()"
|
|
8159
|
+
},
|
|
8160
|
+
{
|
|
8161
|
+
"name": "True",
|
|
8162
|
+
"type": "()"
|
|
8163
|
+
}
|
|
8164
|
+
]
|
|
8165
|
+
},
|
|
8166
|
+
{
|
|
8167
|
+
"type": "enum",
|
|
8168
|
+
"name": "core::option::Option::<core::starknet::contract_address::ContractAddress>",
|
|
8169
|
+
"variants": [
|
|
8170
|
+
{
|
|
8171
|
+
"name": "Some",
|
|
8172
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
8173
|
+
},
|
|
8174
|
+
{
|
|
8175
|
+
"name": "None",
|
|
8176
|
+
"type": "()"
|
|
8177
|
+
}
|
|
8178
|
+
]
|
|
8179
|
+
},
|
|
8180
|
+
{
|
|
8181
|
+
"type": "struct",
|
|
8182
|
+
"name": "ip_sponsorship::types::SponsorshipOffer",
|
|
8183
|
+
"members": [
|
|
8184
|
+
{
|
|
8185
|
+
"name": "author",
|
|
8186
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
8187
|
+
},
|
|
8188
|
+
{
|
|
8189
|
+
"name": "nft_contract",
|
|
8190
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
8191
|
+
},
|
|
8192
|
+
{
|
|
8193
|
+
"name": "token_id",
|
|
8194
|
+
"type": "core::integer::u256"
|
|
8195
|
+
},
|
|
8196
|
+
{
|
|
8197
|
+
"name": "min_amount",
|
|
8198
|
+
"type": "core::integer::u256"
|
|
8199
|
+
},
|
|
8200
|
+
{
|
|
8201
|
+
"name": "duration",
|
|
8202
|
+
"type": "core::integer::u64"
|
|
8203
|
+
},
|
|
8204
|
+
{
|
|
8205
|
+
"name": "payment_token",
|
|
8206
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
8207
|
+
},
|
|
8208
|
+
{
|
|
8209
|
+
"name": "license_terms_uri",
|
|
8210
|
+
"type": "core::byte_array::ByteArray"
|
|
8211
|
+
},
|
|
8212
|
+
{
|
|
8213
|
+
"name": "transferable",
|
|
8214
|
+
"type": "core::bool"
|
|
8215
|
+
},
|
|
8216
|
+
{
|
|
8217
|
+
"name": "specific_sponsor",
|
|
8218
|
+
"type": "core::option::Option::<core::starknet::contract_address::ContractAddress>"
|
|
8219
|
+
},
|
|
8220
|
+
{
|
|
8221
|
+
"name": "open",
|
|
8222
|
+
"type": "core::bool"
|
|
8223
|
+
}
|
|
8224
|
+
]
|
|
8225
|
+
},
|
|
8226
|
+
{
|
|
8227
|
+
"type": "struct",
|
|
8228
|
+
"name": "ip_sponsorship::types::License",
|
|
8229
|
+
"members": [
|
|
8230
|
+
{
|
|
8231
|
+
"name": "author",
|
|
8232
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
8233
|
+
},
|
|
8234
|
+
{
|
|
8235
|
+
"name": "sponsor",
|
|
8236
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
8237
|
+
},
|
|
8238
|
+
{
|
|
8239
|
+
"name": "nft_contract",
|
|
8240
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
8241
|
+
},
|
|
8242
|
+
{
|
|
8243
|
+
"name": "token_id",
|
|
8244
|
+
"type": "core::integer::u256"
|
|
8245
|
+
},
|
|
8246
|
+
{
|
|
8247
|
+
"name": "amount_paid",
|
|
8248
|
+
"type": "core::integer::u256"
|
|
8249
|
+
},
|
|
8250
|
+
{
|
|
8251
|
+
"name": "expires_at",
|
|
8252
|
+
"type": "core::integer::u64"
|
|
8253
|
+
},
|
|
8254
|
+
{
|
|
8255
|
+
"name": "transferable",
|
|
8256
|
+
"type": "core::bool"
|
|
8257
|
+
},
|
|
8258
|
+
{
|
|
8259
|
+
"name": "license_terms_uri",
|
|
8260
|
+
"type": "core::byte_array::ByteArray"
|
|
8261
|
+
}
|
|
8262
|
+
]
|
|
8263
|
+
},
|
|
8264
|
+
{
|
|
8265
|
+
"type": "interface",
|
|
8266
|
+
"name": "ip_sponsorship::interface::IIPSponsorship",
|
|
8267
|
+
"items": [
|
|
8268
|
+
{
|
|
8269
|
+
"type": "function",
|
|
8270
|
+
"name": "create_offer",
|
|
8271
|
+
"inputs": [
|
|
8272
|
+
{
|
|
8273
|
+
"name": "nft_contract",
|
|
8274
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
8275
|
+
},
|
|
8276
|
+
{
|
|
8277
|
+
"name": "token_id",
|
|
8278
|
+
"type": "core::integer::u256"
|
|
8279
|
+
},
|
|
8280
|
+
{
|
|
8281
|
+
"name": "min_amount",
|
|
8282
|
+
"type": "core::integer::u256"
|
|
8283
|
+
},
|
|
8284
|
+
{
|
|
8285
|
+
"name": "duration",
|
|
8286
|
+
"type": "core::integer::u64"
|
|
8287
|
+
},
|
|
8288
|
+
{
|
|
8289
|
+
"name": "payment_token",
|
|
8290
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
8291
|
+
},
|
|
8292
|
+
{
|
|
8293
|
+
"name": "license_terms_uri",
|
|
8294
|
+
"type": "core::byte_array::ByteArray"
|
|
8295
|
+
},
|
|
8296
|
+
{
|
|
8297
|
+
"name": "transferable",
|
|
8298
|
+
"type": "core::bool"
|
|
8299
|
+
},
|
|
8300
|
+
{
|
|
8301
|
+
"name": "specific_sponsor",
|
|
8302
|
+
"type": "core::option::Option::<core::starknet::contract_address::ContractAddress>"
|
|
8303
|
+
}
|
|
8304
|
+
],
|
|
8305
|
+
"outputs": [
|
|
8306
|
+
{
|
|
8307
|
+
"type": "core::integer::u256"
|
|
8308
|
+
}
|
|
8309
|
+
],
|
|
8310
|
+
"state_mutability": "external"
|
|
8311
|
+
},
|
|
8312
|
+
{
|
|
8313
|
+
"type": "function",
|
|
8314
|
+
"name": "set_offer_open",
|
|
8315
|
+
"inputs": [
|
|
8316
|
+
{
|
|
8317
|
+
"name": "offer_id",
|
|
8318
|
+
"type": "core::integer::u256"
|
|
8319
|
+
},
|
|
8320
|
+
{
|
|
8321
|
+
"name": "open",
|
|
8322
|
+
"type": "core::bool"
|
|
8323
|
+
}
|
|
8324
|
+
],
|
|
8325
|
+
"outputs": [],
|
|
8326
|
+
"state_mutability": "external"
|
|
8327
|
+
},
|
|
8328
|
+
{
|
|
8329
|
+
"type": "function",
|
|
8330
|
+
"name": "place_bid",
|
|
8331
|
+
"inputs": [
|
|
8332
|
+
{
|
|
8333
|
+
"name": "offer_id",
|
|
8334
|
+
"type": "core::integer::u256"
|
|
8335
|
+
},
|
|
8336
|
+
{
|
|
8337
|
+
"name": "amount",
|
|
8338
|
+
"type": "core::integer::u256"
|
|
8339
|
+
}
|
|
8340
|
+
],
|
|
8341
|
+
"outputs": [],
|
|
8342
|
+
"state_mutability": "external"
|
|
8343
|
+
},
|
|
8344
|
+
{
|
|
8345
|
+
"type": "function",
|
|
8346
|
+
"name": "retract_bid",
|
|
8347
|
+
"inputs": [
|
|
8348
|
+
{
|
|
8349
|
+
"name": "offer_id",
|
|
8350
|
+
"type": "core::integer::u256"
|
|
8351
|
+
}
|
|
8352
|
+
],
|
|
8353
|
+
"outputs": [],
|
|
8354
|
+
"state_mutability": "external"
|
|
8355
|
+
},
|
|
8356
|
+
{
|
|
8357
|
+
"type": "function",
|
|
8358
|
+
"name": "accept_bid",
|
|
8359
|
+
"inputs": [
|
|
8360
|
+
{
|
|
8361
|
+
"name": "offer_id",
|
|
8362
|
+
"type": "core::integer::u256"
|
|
8363
|
+
},
|
|
8364
|
+
{
|
|
8365
|
+
"name": "sponsor",
|
|
8366
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
8367
|
+
}
|
|
8368
|
+
],
|
|
8369
|
+
"outputs": [
|
|
8370
|
+
{
|
|
8371
|
+
"type": "core::integer::u256"
|
|
8372
|
+
}
|
|
8373
|
+
],
|
|
8374
|
+
"state_mutability": "external"
|
|
8375
|
+
},
|
|
8376
|
+
{
|
|
8377
|
+
"type": "function",
|
|
8378
|
+
"name": "transfer_license",
|
|
8379
|
+
"inputs": [
|
|
8380
|
+
{
|
|
8381
|
+
"name": "license_id",
|
|
8382
|
+
"type": "core::integer::u256"
|
|
8383
|
+
},
|
|
8384
|
+
{
|
|
8385
|
+
"name": "to",
|
|
8386
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
8387
|
+
}
|
|
8388
|
+
],
|
|
8389
|
+
"outputs": [],
|
|
8390
|
+
"state_mutability": "external"
|
|
8391
|
+
},
|
|
8392
|
+
{
|
|
8393
|
+
"type": "function",
|
|
8394
|
+
"name": "get_offer",
|
|
8395
|
+
"inputs": [
|
|
8396
|
+
{
|
|
8397
|
+
"name": "offer_id",
|
|
8398
|
+
"type": "core::integer::u256"
|
|
8399
|
+
}
|
|
8400
|
+
],
|
|
8401
|
+
"outputs": [
|
|
8402
|
+
{
|
|
8403
|
+
"type": "ip_sponsorship::types::SponsorshipOffer"
|
|
8404
|
+
}
|
|
8405
|
+
],
|
|
8406
|
+
"state_mutability": "view"
|
|
8407
|
+
},
|
|
8408
|
+
{
|
|
8409
|
+
"type": "function",
|
|
8410
|
+
"name": "get_bid",
|
|
8411
|
+
"inputs": [
|
|
8412
|
+
{
|
|
8413
|
+
"name": "offer_id",
|
|
8414
|
+
"type": "core::integer::u256"
|
|
8415
|
+
},
|
|
8416
|
+
{
|
|
8417
|
+
"name": "sponsor",
|
|
8418
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
8419
|
+
}
|
|
8420
|
+
],
|
|
8421
|
+
"outputs": [
|
|
8422
|
+
{
|
|
8423
|
+
"type": "core::integer::u256"
|
|
8424
|
+
}
|
|
8425
|
+
],
|
|
8426
|
+
"state_mutability": "view"
|
|
8427
|
+
},
|
|
8428
|
+
{
|
|
8429
|
+
"type": "function",
|
|
8430
|
+
"name": "get_license",
|
|
8431
|
+
"inputs": [
|
|
8432
|
+
{
|
|
8433
|
+
"name": "license_id",
|
|
8434
|
+
"type": "core::integer::u256"
|
|
8435
|
+
}
|
|
8436
|
+
],
|
|
8437
|
+
"outputs": [
|
|
8438
|
+
{
|
|
8439
|
+
"type": "ip_sponsorship::types::License"
|
|
8440
|
+
}
|
|
8441
|
+
],
|
|
8442
|
+
"state_mutability": "view"
|
|
8443
|
+
},
|
|
8444
|
+
{
|
|
8445
|
+
"type": "function",
|
|
8446
|
+
"name": "is_license_valid",
|
|
8447
|
+
"inputs": [
|
|
8448
|
+
{
|
|
8449
|
+
"name": "license_id",
|
|
8450
|
+
"type": "core::integer::u256"
|
|
8451
|
+
}
|
|
8452
|
+
],
|
|
8453
|
+
"outputs": [
|
|
8454
|
+
{
|
|
8455
|
+
"type": "core::bool"
|
|
8456
|
+
}
|
|
8457
|
+
],
|
|
8458
|
+
"state_mutability": "view"
|
|
8459
|
+
},
|
|
8460
|
+
{
|
|
8461
|
+
"type": "function",
|
|
8462
|
+
"name": "get_last_offer_id",
|
|
8463
|
+
"inputs": [],
|
|
8464
|
+
"outputs": [
|
|
8465
|
+
{
|
|
8466
|
+
"type": "core::integer::u256"
|
|
8467
|
+
}
|
|
8468
|
+
],
|
|
8469
|
+
"state_mutability": "view"
|
|
8470
|
+
},
|
|
8471
|
+
{
|
|
8472
|
+
"type": "function",
|
|
8473
|
+
"name": "get_last_license_id",
|
|
8474
|
+
"inputs": [],
|
|
8475
|
+
"outputs": [
|
|
8476
|
+
{
|
|
8477
|
+
"type": "core::integer::u256"
|
|
8478
|
+
}
|
|
8479
|
+
],
|
|
8480
|
+
"state_mutability": "view"
|
|
8481
|
+
}
|
|
8482
|
+
]
|
|
8483
|
+
},
|
|
8484
|
+
{
|
|
8485
|
+
"type": "impl",
|
|
8486
|
+
"name": "SRC5Impl",
|
|
8487
|
+
"interface_name": "openzeppelin_introspection::interface::ISRC5"
|
|
8488
|
+
},
|
|
8489
|
+
{
|
|
8490
|
+
"type": "interface",
|
|
8491
|
+
"name": "openzeppelin_introspection::interface::ISRC5",
|
|
8492
|
+
"items": [
|
|
8493
|
+
{
|
|
8494
|
+
"type": "function",
|
|
8495
|
+
"name": "supports_interface",
|
|
8496
|
+
"inputs": [
|
|
8497
|
+
{
|
|
8498
|
+
"name": "interface_id",
|
|
8499
|
+
"type": "core::felt252"
|
|
8500
|
+
}
|
|
8501
|
+
],
|
|
8502
|
+
"outputs": [
|
|
8503
|
+
{
|
|
8504
|
+
"type": "core::bool"
|
|
8505
|
+
}
|
|
8506
|
+
],
|
|
8507
|
+
"state_mutability": "view"
|
|
8508
|
+
}
|
|
8509
|
+
]
|
|
8510
|
+
},
|
|
8511
|
+
{
|
|
8512
|
+
"type": "constructor",
|
|
8513
|
+
"name": "constructor",
|
|
8514
|
+
"inputs": []
|
|
8515
|
+
},
|
|
8516
|
+
{
|
|
8517
|
+
"type": "event",
|
|
8518
|
+
"name": "openzeppelin_introspection::src5::SRC5Component::Event",
|
|
8519
|
+
"kind": "enum",
|
|
8520
|
+
"variants": []
|
|
8521
|
+
},
|
|
8522
|
+
{
|
|
8523
|
+
"type": "event",
|
|
8524
|
+
"name": "ip_sponsorship::IPSponsorship::IPSponsorship::OfferCreated",
|
|
8525
|
+
"kind": "struct",
|
|
8526
|
+
"members": [
|
|
8527
|
+
{
|
|
8528
|
+
"name": "offer_id",
|
|
8529
|
+
"type": "core::integer::u256",
|
|
8530
|
+
"kind": "key"
|
|
8531
|
+
},
|
|
8532
|
+
{
|
|
8533
|
+
"name": "author",
|
|
8534
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
8535
|
+
"kind": "key"
|
|
8536
|
+
},
|
|
8537
|
+
{
|
|
8538
|
+
"name": "nft_contract",
|
|
8539
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
8540
|
+
"kind": "key"
|
|
8541
|
+
},
|
|
8542
|
+
{
|
|
8543
|
+
"name": "token_id",
|
|
8544
|
+
"type": "core::integer::u256",
|
|
8545
|
+
"kind": "data"
|
|
8546
|
+
},
|
|
8547
|
+
{
|
|
8548
|
+
"name": "min_amount",
|
|
8549
|
+
"type": "core::integer::u256",
|
|
8550
|
+
"kind": "data"
|
|
8551
|
+
},
|
|
8552
|
+
{
|
|
8553
|
+
"name": "duration",
|
|
8554
|
+
"type": "core::integer::u64",
|
|
8555
|
+
"kind": "data"
|
|
8556
|
+
},
|
|
8557
|
+
{
|
|
8558
|
+
"name": "payment_token",
|
|
8559
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
8560
|
+
"kind": "data"
|
|
8561
|
+
},
|
|
8562
|
+
{
|
|
8563
|
+
"name": "license_terms_uri",
|
|
8564
|
+
"type": "core::byte_array::ByteArray",
|
|
8565
|
+
"kind": "data"
|
|
8566
|
+
},
|
|
8567
|
+
{
|
|
8568
|
+
"name": "transferable",
|
|
8569
|
+
"type": "core::bool",
|
|
8570
|
+
"kind": "data"
|
|
8571
|
+
},
|
|
8572
|
+
{
|
|
8573
|
+
"name": "specific_sponsor",
|
|
8574
|
+
"type": "core::option::Option::<core::starknet::contract_address::ContractAddress>",
|
|
8575
|
+
"kind": "data"
|
|
8576
|
+
},
|
|
8577
|
+
{
|
|
8578
|
+
"name": "created_at",
|
|
8579
|
+
"type": "core::integer::u64",
|
|
8580
|
+
"kind": "data"
|
|
8581
|
+
}
|
|
8582
|
+
]
|
|
8583
|
+
},
|
|
8584
|
+
{
|
|
8585
|
+
"type": "event",
|
|
8586
|
+
"name": "ip_sponsorship::IPSponsorship::IPSponsorship::OfferStatusUpdated",
|
|
8587
|
+
"kind": "struct",
|
|
8588
|
+
"members": [
|
|
8589
|
+
{
|
|
8590
|
+
"name": "offer_id",
|
|
8591
|
+
"type": "core::integer::u256",
|
|
8592
|
+
"kind": "key"
|
|
8593
|
+
},
|
|
8594
|
+
{
|
|
8595
|
+
"name": "open",
|
|
8596
|
+
"type": "core::bool",
|
|
8597
|
+
"kind": "data"
|
|
8598
|
+
},
|
|
8599
|
+
{
|
|
8600
|
+
"name": "updated_at",
|
|
8601
|
+
"type": "core::integer::u64",
|
|
8602
|
+
"kind": "data"
|
|
8603
|
+
}
|
|
8604
|
+
]
|
|
8605
|
+
},
|
|
8606
|
+
{
|
|
8607
|
+
"type": "event",
|
|
8608
|
+
"name": "ip_sponsorship::IPSponsorship::IPSponsorship::BidPlaced",
|
|
8609
|
+
"kind": "struct",
|
|
8610
|
+
"members": [
|
|
8611
|
+
{
|
|
8612
|
+
"name": "offer_id",
|
|
8613
|
+
"type": "core::integer::u256",
|
|
8614
|
+
"kind": "key"
|
|
8615
|
+
},
|
|
8616
|
+
{
|
|
8617
|
+
"name": "sponsor",
|
|
8618
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
8619
|
+
"kind": "key"
|
|
8620
|
+
},
|
|
8621
|
+
{
|
|
8622
|
+
"name": "amount",
|
|
8623
|
+
"type": "core::integer::u256",
|
|
8624
|
+
"kind": "data"
|
|
8625
|
+
},
|
|
8626
|
+
{
|
|
8627
|
+
"name": "bid_at",
|
|
8628
|
+
"type": "core::integer::u64",
|
|
8629
|
+
"kind": "data"
|
|
8630
|
+
}
|
|
8631
|
+
]
|
|
8632
|
+
},
|
|
8633
|
+
{
|
|
8634
|
+
"type": "event",
|
|
8635
|
+
"name": "ip_sponsorship::IPSponsorship::IPSponsorship::BidRetracted",
|
|
8636
|
+
"kind": "struct",
|
|
8637
|
+
"members": [
|
|
8638
|
+
{
|
|
8639
|
+
"name": "offer_id",
|
|
8640
|
+
"type": "core::integer::u256",
|
|
8641
|
+
"kind": "key"
|
|
8642
|
+
},
|
|
8643
|
+
{
|
|
8644
|
+
"name": "sponsor",
|
|
8645
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
8646
|
+
"kind": "key"
|
|
8647
|
+
},
|
|
8648
|
+
{
|
|
8649
|
+
"name": "retracted_at",
|
|
8650
|
+
"type": "core::integer::u64",
|
|
8651
|
+
"kind": "data"
|
|
8652
|
+
}
|
|
8653
|
+
]
|
|
8654
|
+
},
|
|
8655
|
+
{
|
|
8656
|
+
"type": "event",
|
|
8657
|
+
"name": "ip_sponsorship::IPSponsorship::IPSponsorship::SponsorshipAccepted",
|
|
8658
|
+
"kind": "struct",
|
|
8659
|
+
"members": [
|
|
8660
|
+
{
|
|
8661
|
+
"name": "offer_id",
|
|
8662
|
+
"type": "core::integer::u256",
|
|
8663
|
+
"kind": "key"
|
|
8664
|
+
},
|
|
8665
|
+
{
|
|
8666
|
+
"name": "license_id",
|
|
8667
|
+
"type": "core::integer::u256",
|
|
8668
|
+
"kind": "key"
|
|
8669
|
+
},
|
|
8670
|
+
{
|
|
8671
|
+
"name": "sponsor",
|
|
8672
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
8673
|
+
"kind": "key"
|
|
8674
|
+
},
|
|
8675
|
+
{
|
|
8676
|
+
"name": "author",
|
|
8677
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
8678
|
+
"kind": "data"
|
|
8679
|
+
},
|
|
8680
|
+
{
|
|
8681
|
+
"name": "amount",
|
|
8682
|
+
"type": "core::integer::u256",
|
|
8683
|
+
"kind": "data"
|
|
8684
|
+
},
|
|
8685
|
+
{
|
|
8686
|
+
"name": "expires_at",
|
|
8687
|
+
"type": "core::integer::u64",
|
|
8688
|
+
"kind": "data"
|
|
8689
|
+
}
|
|
8690
|
+
]
|
|
8691
|
+
},
|
|
8692
|
+
{
|
|
8693
|
+
"type": "event",
|
|
8694
|
+
"name": "ip_sponsorship::IPSponsorship::IPSponsorship::LicenseTransferred",
|
|
8695
|
+
"kind": "struct",
|
|
8696
|
+
"members": [
|
|
8697
|
+
{
|
|
8698
|
+
"name": "license_id",
|
|
8699
|
+
"type": "core::integer::u256",
|
|
8700
|
+
"kind": "key"
|
|
8701
|
+
},
|
|
8702
|
+
{
|
|
8703
|
+
"name": "from",
|
|
8704
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
8705
|
+
"kind": "key"
|
|
8706
|
+
},
|
|
8707
|
+
{
|
|
8708
|
+
"name": "to",
|
|
8709
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
8710
|
+
"kind": "key"
|
|
8711
|
+
},
|
|
8712
|
+
{
|
|
8713
|
+
"name": "transferred_at",
|
|
8714
|
+
"type": "core::integer::u64",
|
|
8715
|
+
"kind": "data"
|
|
8716
|
+
}
|
|
8717
|
+
]
|
|
8718
|
+
},
|
|
8719
|
+
{
|
|
8720
|
+
"type": "event",
|
|
8721
|
+
"name": "ip_sponsorship::IPSponsorship::IPSponsorship::Event",
|
|
8722
|
+
"kind": "enum",
|
|
8723
|
+
"variants": [
|
|
8724
|
+
{
|
|
8725
|
+
"name": "SRC5Event",
|
|
8726
|
+
"type": "openzeppelin_introspection::src5::SRC5Component::Event",
|
|
8727
|
+
"kind": "flat"
|
|
8728
|
+
},
|
|
8729
|
+
{
|
|
8730
|
+
"name": "OfferCreated",
|
|
8731
|
+
"type": "ip_sponsorship::IPSponsorship::IPSponsorship::OfferCreated",
|
|
8732
|
+
"kind": "nested"
|
|
8733
|
+
},
|
|
8734
|
+
{
|
|
8735
|
+
"name": "OfferStatusUpdated",
|
|
8736
|
+
"type": "ip_sponsorship::IPSponsorship::IPSponsorship::OfferStatusUpdated",
|
|
8737
|
+
"kind": "nested"
|
|
8738
|
+
},
|
|
8739
|
+
{
|
|
8740
|
+
"name": "BidPlaced",
|
|
8741
|
+
"type": "ip_sponsorship::IPSponsorship::IPSponsorship::BidPlaced",
|
|
8742
|
+
"kind": "nested"
|
|
8743
|
+
},
|
|
8744
|
+
{
|
|
8745
|
+
"name": "BidRetracted",
|
|
8746
|
+
"type": "ip_sponsorship::IPSponsorship::IPSponsorship::BidRetracted",
|
|
8747
|
+
"kind": "nested"
|
|
8748
|
+
},
|
|
8749
|
+
{
|
|
8750
|
+
"name": "SponsorshipAccepted",
|
|
8751
|
+
"type": "ip_sponsorship::IPSponsorship::IPSponsorship::SponsorshipAccepted",
|
|
8752
|
+
"kind": "nested"
|
|
8753
|
+
},
|
|
8754
|
+
{
|
|
8755
|
+
"name": "LicenseTransferred",
|
|
8756
|
+
"type": "ip_sponsorship::IPSponsorship::IPSponsorship::LicenseTransferred",
|
|
8757
|
+
"kind": "nested"
|
|
8758
|
+
}
|
|
8759
|
+
]
|
|
8760
|
+
}
|
|
8761
|
+
];
|
|
8762
|
+
|
|
8763
|
+
// src/starknet/abis/ipSponsorshipLicense.ts
|
|
8764
|
+
var IPSponsorshipLicenseABI = [
|
|
8765
|
+
{
|
|
8766
|
+
"type": "impl",
|
|
8767
|
+
"name": "ERC721MetadataImpl",
|
|
8768
|
+
"interface_name": "openzeppelin_token::erc721::interface::IERC721Metadata"
|
|
8769
|
+
},
|
|
8770
|
+
{
|
|
8771
|
+
"type": "struct",
|
|
8772
|
+
"name": "core::byte_array::ByteArray",
|
|
8773
|
+
"members": [
|
|
8774
|
+
{
|
|
8775
|
+
"name": "data",
|
|
8776
|
+
"type": "core::array::Array::<core::bytes_31::bytes31>"
|
|
8777
|
+
},
|
|
8778
|
+
{
|
|
8779
|
+
"name": "pending_word",
|
|
8780
|
+
"type": "core::felt252"
|
|
8781
|
+
},
|
|
8782
|
+
{
|
|
8783
|
+
"name": "pending_word_len",
|
|
8784
|
+
"type": "core::internal::bounded_int::BoundedInt::<0, 30>"
|
|
8785
|
+
}
|
|
8786
|
+
]
|
|
7051
8787
|
},
|
|
7052
8788
|
{
|
|
7053
8789
|
"type": "struct",
|
|
@@ -7064,22 +8800,80 @@ var IPSponsorshipABI = [
|
|
|
7064
8800
|
]
|
|
7065
8801
|
},
|
|
7066
8802
|
{
|
|
7067
|
-
"type": "
|
|
7068
|
-
"name": "
|
|
7069
|
-
"
|
|
7070
|
-
{
|
|
7071
|
-
"
|
|
7072
|
-
"
|
|
7073
|
-
|
|
7074
|
-
|
|
7075
|
-
|
|
7076
|
-
|
|
7077
|
-
|
|
7078
|
-
|
|
7079
|
-
"
|
|
7080
|
-
|
|
7081
|
-
|
|
7082
|
-
|
|
8803
|
+
"type": "interface",
|
|
8804
|
+
"name": "openzeppelin_token::erc721::interface::IERC721Metadata",
|
|
8805
|
+
"items": [
|
|
8806
|
+
{
|
|
8807
|
+
"type": "function",
|
|
8808
|
+
"name": "name",
|
|
8809
|
+
"inputs": [],
|
|
8810
|
+
"outputs": [
|
|
8811
|
+
{
|
|
8812
|
+
"type": "core::byte_array::ByteArray"
|
|
8813
|
+
}
|
|
8814
|
+
],
|
|
8815
|
+
"state_mutability": "view"
|
|
8816
|
+
},
|
|
8817
|
+
{
|
|
8818
|
+
"type": "function",
|
|
8819
|
+
"name": "symbol",
|
|
8820
|
+
"inputs": [],
|
|
8821
|
+
"outputs": [
|
|
8822
|
+
{
|
|
8823
|
+
"type": "core::byte_array::ByteArray"
|
|
8824
|
+
}
|
|
8825
|
+
],
|
|
8826
|
+
"state_mutability": "view"
|
|
8827
|
+
},
|
|
8828
|
+
{
|
|
8829
|
+
"type": "function",
|
|
8830
|
+
"name": "token_uri",
|
|
8831
|
+
"inputs": [
|
|
8832
|
+
{
|
|
8833
|
+
"name": "token_id",
|
|
8834
|
+
"type": "core::integer::u256"
|
|
8835
|
+
}
|
|
8836
|
+
],
|
|
8837
|
+
"outputs": [
|
|
8838
|
+
{
|
|
8839
|
+
"type": "core::byte_array::ByteArray"
|
|
8840
|
+
}
|
|
8841
|
+
],
|
|
8842
|
+
"state_mutability": "view"
|
|
8843
|
+
}
|
|
8844
|
+
]
|
|
8845
|
+
},
|
|
8846
|
+
{
|
|
8847
|
+
"type": "impl",
|
|
8848
|
+
"name": "ERC721MetadataCamelOnlyImpl",
|
|
8849
|
+
"interface_name": "openzeppelin_token::erc721::interface::IERC721MetadataCamelOnly"
|
|
8850
|
+
},
|
|
8851
|
+
{
|
|
8852
|
+
"type": "interface",
|
|
8853
|
+
"name": "openzeppelin_token::erc721::interface::IERC721MetadataCamelOnly",
|
|
8854
|
+
"items": [
|
|
8855
|
+
{
|
|
8856
|
+
"type": "function",
|
|
8857
|
+
"name": "tokenURI",
|
|
8858
|
+
"inputs": [
|
|
8859
|
+
{
|
|
8860
|
+
"name": "tokenId",
|
|
8861
|
+
"type": "core::integer::u256"
|
|
8862
|
+
}
|
|
8863
|
+
],
|
|
8864
|
+
"outputs": [
|
|
8865
|
+
{
|
|
8866
|
+
"type": "core::byte_array::ByteArray"
|
|
8867
|
+
}
|
|
8868
|
+
],
|
|
8869
|
+
"state_mutability": "view"
|
|
8870
|
+
}
|
|
8871
|
+
]
|
|
8872
|
+
},
|
|
8873
|
+
{
|
|
8874
|
+
"type": "impl",
|
|
8875
|
+
"name": "IPSponsorshipLicenseImpl",
|
|
8876
|
+
"interface_name": "ip_sponsorship::interface::IIPSponsorshipLicense"
|
|
7083
8877
|
},
|
|
7084
8878
|
{
|
|
7085
8879
|
"type": "enum",
|
|
@@ -7095,163 +8889,253 @@ var IPSponsorshipABI = [
|
|
|
7095
8889
|
}
|
|
7096
8890
|
]
|
|
7097
8891
|
},
|
|
7098
|
-
{
|
|
7099
|
-
"type": "enum",
|
|
7100
|
-
"name": "core::option::Option::<core::starknet::contract_address::ContractAddress>",
|
|
7101
|
-
"variants": [
|
|
7102
|
-
{
|
|
7103
|
-
"name": "Some",
|
|
7104
|
-
"type": "core::starknet::contract_address::ContractAddress"
|
|
7105
|
-
},
|
|
7106
|
-
{
|
|
7107
|
-
"name": "None",
|
|
7108
|
-
"type": "()"
|
|
7109
|
-
}
|
|
7110
|
-
]
|
|
7111
|
-
},
|
|
7112
8892
|
{
|
|
7113
8893
|
"type": "struct",
|
|
7114
|
-
"name": "ip_sponsorship::types::
|
|
8894
|
+
"name": "ip_sponsorship::types::LicenseData",
|
|
7115
8895
|
"members": [
|
|
7116
8896
|
{
|
|
7117
8897
|
"name": "author",
|
|
7118
8898
|
"type": "core::starknet::contract_address::ContractAddress"
|
|
7119
8899
|
},
|
|
7120
8900
|
{
|
|
7121
|
-
"name": "
|
|
8901
|
+
"name": "asset_contract",
|
|
7122
8902
|
"type": "core::starknet::contract_address::ContractAddress"
|
|
7123
8903
|
},
|
|
7124
8904
|
{
|
|
7125
|
-
"name": "
|
|
7126
|
-
"type": "core::integer::u256"
|
|
7127
|
-
},
|
|
7128
|
-
{
|
|
7129
|
-
"name": "min_amount",
|
|
8905
|
+
"name": "asset_token_id",
|
|
7130
8906
|
"type": "core::integer::u256"
|
|
7131
8907
|
},
|
|
7132
8908
|
{
|
|
7133
|
-
"name": "
|
|
8909
|
+
"name": "expires_at",
|
|
7134
8910
|
"type": "core::integer::u64"
|
|
7135
8911
|
},
|
|
7136
|
-
{
|
|
7137
|
-
"name": "payment_token",
|
|
7138
|
-
"type": "core::starknet::contract_address::ContractAddress"
|
|
7139
|
-
},
|
|
7140
|
-
{
|
|
7141
|
-
"name": "license_terms_uri",
|
|
7142
|
-
"type": "core::byte_array::ByteArray"
|
|
7143
|
-
},
|
|
7144
8912
|
{
|
|
7145
8913
|
"name": "transferable",
|
|
7146
8914
|
"type": "core::bool"
|
|
7147
8915
|
},
|
|
7148
8916
|
{
|
|
7149
|
-
"name": "
|
|
7150
|
-
"type": "core::
|
|
8917
|
+
"name": "royalty_bps",
|
|
8918
|
+
"type": "core::integer::u256"
|
|
7151
8919
|
},
|
|
7152
8920
|
{
|
|
7153
|
-
"name": "
|
|
7154
|
-
"type": "core::
|
|
8921
|
+
"name": "license_terms_uri",
|
|
8922
|
+
"type": "core::byte_array::ByteArray"
|
|
7155
8923
|
}
|
|
7156
8924
|
]
|
|
7157
8925
|
},
|
|
7158
8926
|
{
|
|
7159
|
-
"type": "
|
|
7160
|
-
"name": "ip_sponsorship::
|
|
7161
|
-
"
|
|
8927
|
+
"type": "interface",
|
|
8928
|
+
"name": "ip_sponsorship::interface::IIPSponsorshipLicense",
|
|
8929
|
+
"items": [
|
|
7162
8930
|
{
|
|
7163
|
-
"
|
|
7164
|
-
"
|
|
8931
|
+
"type": "function",
|
|
8932
|
+
"name": "set_minter",
|
|
8933
|
+
"inputs": [
|
|
8934
|
+
{
|
|
8935
|
+
"name": "minter",
|
|
8936
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
8937
|
+
}
|
|
8938
|
+
],
|
|
8939
|
+
"outputs": [],
|
|
8940
|
+
"state_mutability": "external"
|
|
7165
8941
|
},
|
|
7166
8942
|
{
|
|
7167
|
-
"
|
|
7168
|
-
"
|
|
8943
|
+
"type": "function",
|
|
8944
|
+
"name": "get_minter",
|
|
8945
|
+
"inputs": [],
|
|
8946
|
+
"outputs": [
|
|
8947
|
+
{
|
|
8948
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
8949
|
+
}
|
|
8950
|
+
],
|
|
8951
|
+
"state_mutability": "view"
|
|
7169
8952
|
},
|
|
7170
8953
|
{
|
|
7171
|
-
"
|
|
7172
|
-
"
|
|
8954
|
+
"type": "function",
|
|
8955
|
+
"name": "mint",
|
|
8956
|
+
"inputs": [
|
|
8957
|
+
{
|
|
8958
|
+
"name": "recipient",
|
|
8959
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
8960
|
+
},
|
|
8961
|
+
{
|
|
8962
|
+
"name": "data",
|
|
8963
|
+
"type": "ip_sponsorship::types::LicenseData"
|
|
8964
|
+
}
|
|
8965
|
+
],
|
|
8966
|
+
"outputs": [
|
|
8967
|
+
{
|
|
8968
|
+
"type": "core::integer::u256"
|
|
8969
|
+
}
|
|
8970
|
+
],
|
|
8971
|
+
"state_mutability": "external"
|
|
7173
8972
|
},
|
|
7174
8973
|
{
|
|
7175
|
-
"
|
|
7176
|
-
"
|
|
8974
|
+
"type": "function",
|
|
8975
|
+
"name": "get_license_data",
|
|
8976
|
+
"inputs": [
|
|
8977
|
+
{
|
|
8978
|
+
"name": "token_id",
|
|
8979
|
+
"type": "core::integer::u256"
|
|
8980
|
+
}
|
|
8981
|
+
],
|
|
8982
|
+
"outputs": [
|
|
8983
|
+
{
|
|
8984
|
+
"type": "ip_sponsorship::types::LicenseData"
|
|
8985
|
+
}
|
|
8986
|
+
],
|
|
8987
|
+
"state_mutability": "view"
|
|
7177
8988
|
},
|
|
7178
8989
|
{
|
|
7179
|
-
"
|
|
7180
|
-
"
|
|
8990
|
+
"type": "function",
|
|
8991
|
+
"name": "is_license_valid",
|
|
8992
|
+
"inputs": [
|
|
8993
|
+
{
|
|
8994
|
+
"name": "token_id",
|
|
8995
|
+
"type": "core::integer::u256"
|
|
8996
|
+
}
|
|
8997
|
+
],
|
|
8998
|
+
"outputs": [
|
|
8999
|
+
{
|
|
9000
|
+
"type": "core::bool"
|
|
9001
|
+
}
|
|
9002
|
+
],
|
|
9003
|
+
"state_mutability": "view"
|
|
7181
9004
|
},
|
|
7182
9005
|
{
|
|
7183
|
-
"
|
|
7184
|
-
"
|
|
9006
|
+
"type": "function",
|
|
9007
|
+
"name": "last_license_id",
|
|
9008
|
+
"inputs": [],
|
|
9009
|
+
"outputs": [
|
|
9010
|
+
{
|
|
9011
|
+
"type": "core::integer::u256"
|
|
9012
|
+
}
|
|
9013
|
+
],
|
|
9014
|
+
"state_mutability": "view"
|
|
7185
9015
|
},
|
|
7186
9016
|
{
|
|
7187
|
-
"
|
|
7188
|
-
"
|
|
9017
|
+
"type": "function",
|
|
9018
|
+
"name": "royalty_info",
|
|
9019
|
+
"inputs": [
|
|
9020
|
+
{
|
|
9021
|
+
"name": "token_id",
|
|
9022
|
+
"type": "core::integer::u256"
|
|
9023
|
+
},
|
|
9024
|
+
{
|
|
9025
|
+
"name": "sale_price",
|
|
9026
|
+
"type": "core::integer::u256"
|
|
9027
|
+
}
|
|
9028
|
+
],
|
|
9029
|
+
"outputs": [
|
|
9030
|
+
{
|
|
9031
|
+
"type": "(core::starknet::contract_address::ContractAddress, core::integer::u256)"
|
|
9032
|
+
}
|
|
9033
|
+
],
|
|
9034
|
+
"state_mutability": "view"
|
|
7189
9035
|
},
|
|
7190
9036
|
{
|
|
7191
|
-
"
|
|
7192
|
-
"
|
|
9037
|
+
"type": "function",
|
|
9038
|
+
"name": "royaltyInfo",
|
|
9039
|
+
"inputs": [
|
|
9040
|
+
{
|
|
9041
|
+
"name": "token_id",
|
|
9042
|
+
"type": "core::integer::u256"
|
|
9043
|
+
},
|
|
9044
|
+
{
|
|
9045
|
+
"name": "sale_price",
|
|
9046
|
+
"type": "core::integer::u256"
|
|
9047
|
+
}
|
|
9048
|
+
],
|
|
9049
|
+
"outputs": [
|
|
9050
|
+
{
|
|
9051
|
+
"type": "(core::starknet::contract_address::ContractAddress, core::integer::u256)"
|
|
9052
|
+
}
|
|
9053
|
+
],
|
|
9054
|
+
"state_mutability": "view"
|
|
9055
|
+
},
|
|
9056
|
+
{
|
|
9057
|
+
"type": "function",
|
|
9058
|
+
"name": "version",
|
|
9059
|
+
"inputs": [],
|
|
9060
|
+
"outputs": [
|
|
9061
|
+
{
|
|
9062
|
+
"type": "core::byte_array::ByteArray"
|
|
9063
|
+
}
|
|
9064
|
+
],
|
|
9065
|
+
"state_mutability": "view"
|
|
9066
|
+
}
|
|
9067
|
+
]
|
|
9068
|
+
},
|
|
9069
|
+
{
|
|
9070
|
+
"type": "impl",
|
|
9071
|
+
"name": "ERC721Impl",
|
|
9072
|
+
"interface_name": "openzeppelin_token::erc721::interface::IERC721"
|
|
9073
|
+
},
|
|
9074
|
+
{
|
|
9075
|
+
"type": "struct",
|
|
9076
|
+
"name": "core::array::Span::<core::felt252>",
|
|
9077
|
+
"members": [
|
|
9078
|
+
{
|
|
9079
|
+
"name": "snapshot",
|
|
9080
|
+
"type": "@core::array::Array::<core::felt252>"
|
|
7193
9081
|
}
|
|
7194
9082
|
]
|
|
7195
9083
|
},
|
|
7196
9084
|
{
|
|
7197
9085
|
"type": "interface",
|
|
7198
|
-
"name": "
|
|
9086
|
+
"name": "openzeppelin_token::erc721::interface::IERC721",
|
|
7199
9087
|
"items": [
|
|
7200
9088
|
{
|
|
7201
9089
|
"type": "function",
|
|
7202
|
-
"name": "
|
|
9090
|
+
"name": "balance_of",
|
|
7203
9091
|
"inputs": [
|
|
7204
9092
|
{
|
|
7205
|
-
"name": "
|
|
9093
|
+
"name": "account",
|
|
7206
9094
|
"type": "core::starknet::contract_address::ContractAddress"
|
|
7207
|
-
}
|
|
7208
|
-
|
|
7209
|
-
|
|
7210
|
-
"type": "core::integer::u256"
|
|
7211
|
-
},
|
|
9095
|
+
}
|
|
9096
|
+
],
|
|
9097
|
+
"outputs": [
|
|
7212
9098
|
{
|
|
7213
|
-
"name": "min_amount",
|
|
7214
9099
|
"type": "core::integer::u256"
|
|
7215
|
-
}
|
|
7216
|
-
|
|
7217
|
-
|
|
7218
|
-
|
|
7219
|
-
|
|
7220
|
-
|
|
7221
|
-
|
|
7222
|
-
|
|
7223
|
-
},
|
|
7224
|
-
{
|
|
7225
|
-
"name": "license_terms_uri",
|
|
7226
|
-
"type": "core::byte_array::ByteArray"
|
|
7227
|
-
},
|
|
7228
|
-
{
|
|
7229
|
-
"name": "transferable",
|
|
7230
|
-
"type": "core::bool"
|
|
7231
|
-
},
|
|
9100
|
+
}
|
|
9101
|
+
],
|
|
9102
|
+
"state_mutability": "view"
|
|
9103
|
+
},
|
|
9104
|
+
{
|
|
9105
|
+
"type": "function",
|
|
9106
|
+
"name": "owner_of",
|
|
9107
|
+
"inputs": [
|
|
7232
9108
|
{
|
|
7233
|
-
"name": "
|
|
7234
|
-
"type": "core::
|
|
9109
|
+
"name": "token_id",
|
|
9110
|
+
"type": "core::integer::u256"
|
|
7235
9111
|
}
|
|
7236
9112
|
],
|
|
7237
9113
|
"outputs": [
|
|
7238
9114
|
{
|
|
7239
|
-
"type": "core::
|
|
9115
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
7240
9116
|
}
|
|
7241
9117
|
],
|
|
7242
|
-
"state_mutability": "
|
|
9118
|
+
"state_mutability": "view"
|
|
7243
9119
|
},
|
|
7244
9120
|
{
|
|
7245
9121
|
"type": "function",
|
|
7246
|
-
"name": "
|
|
9122
|
+
"name": "safe_transfer_from",
|
|
7247
9123
|
"inputs": [
|
|
7248
9124
|
{
|
|
7249
|
-
"name": "
|
|
9125
|
+
"name": "from",
|
|
9126
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
9127
|
+
},
|
|
9128
|
+
{
|
|
9129
|
+
"name": "to",
|
|
9130
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
9131
|
+
},
|
|
9132
|
+
{
|
|
9133
|
+
"name": "token_id",
|
|
7250
9134
|
"type": "core::integer::u256"
|
|
7251
9135
|
},
|
|
7252
9136
|
{
|
|
7253
|
-
"name": "
|
|
7254
|
-
"type": "core::
|
|
9137
|
+
"name": "data",
|
|
9138
|
+
"type": "core::array::Span::<core::felt252>"
|
|
7255
9139
|
}
|
|
7256
9140
|
],
|
|
7257
9141
|
"outputs": [],
|
|
@@ -7259,14 +9143,18 @@ var IPSponsorshipABI = [
|
|
|
7259
9143
|
},
|
|
7260
9144
|
{
|
|
7261
9145
|
"type": "function",
|
|
7262
|
-
"name": "
|
|
9146
|
+
"name": "transfer_from",
|
|
7263
9147
|
"inputs": [
|
|
7264
9148
|
{
|
|
7265
|
-
"name": "
|
|
7266
|
-
"type": "core::
|
|
9149
|
+
"name": "from",
|
|
9150
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
7267
9151
|
},
|
|
7268
9152
|
{
|
|
7269
|
-
"name": "
|
|
9153
|
+
"name": "to",
|
|
9154
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
9155
|
+
},
|
|
9156
|
+
{
|
|
9157
|
+
"name": "token_id",
|
|
7270
9158
|
"type": "core::integer::u256"
|
|
7271
9159
|
}
|
|
7272
9160
|
],
|
|
@@ -7275,10 +9163,14 @@ var IPSponsorshipABI = [
|
|
|
7275
9163
|
},
|
|
7276
9164
|
{
|
|
7277
9165
|
"type": "function",
|
|
7278
|
-
"name": "
|
|
9166
|
+
"name": "approve",
|
|
7279
9167
|
"inputs": [
|
|
7280
9168
|
{
|
|
7281
|
-
"name": "
|
|
9169
|
+
"name": "to",
|
|
9170
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
9171
|
+
},
|
|
9172
|
+
{
|
|
9173
|
+
"name": "token_id",
|
|
7282
9174
|
"type": "core::integer::u256"
|
|
7283
9175
|
}
|
|
7284
9176
|
],
|
|
@@ -7287,66 +9179,73 @@ var IPSponsorshipABI = [
|
|
|
7287
9179
|
},
|
|
7288
9180
|
{
|
|
7289
9181
|
"type": "function",
|
|
7290
|
-
"name": "
|
|
9182
|
+
"name": "set_approval_for_all",
|
|
7291
9183
|
"inputs": [
|
|
7292
9184
|
{
|
|
7293
|
-
"name": "
|
|
7294
|
-
"type": "core::integer::u256"
|
|
7295
|
-
},
|
|
7296
|
-
{
|
|
7297
|
-
"name": "sponsor",
|
|
9185
|
+
"name": "operator",
|
|
7298
9186
|
"type": "core::starknet::contract_address::ContractAddress"
|
|
7299
|
-
}
|
|
7300
|
-
],
|
|
7301
|
-
"outputs": [
|
|
9187
|
+
},
|
|
7302
9188
|
{
|
|
7303
|
-
"
|
|
9189
|
+
"name": "approved",
|
|
9190
|
+
"type": "core::bool"
|
|
7304
9191
|
}
|
|
7305
9192
|
],
|
|
9193
|
+
"outputs": [],
|
|
7306
9194
|
"state_mutability": "external"
|
|
7307
9195
|
},
|
|
7308
9196
|
{
|
|
7309
9197
|
"type": "function",
|
|
7310
|
-
"name": "
|
|
9198
|
+
"name": "get_approved",
|
|
7311
9199
|
"inputs": [
|
|
7312
9200
|
{
|
|
7313
|
-
"name": "
|
|
9201
|
+
"name": "token_id",
|
|
7314
9202
|
"type": "core::integer::u256"
|
|
7315
|
-
}
|
|
9203
|
+
}
|
|
9204
|
+
],
|
|
9205
|
+
"outputs": [
|
|
7316
9206
|
{
|
|
7317
|
-
"name": "to",
|
|
7318
9207
|
"type": "core::starknet::contract_address::ContractAddress"
|
|
7319
9208
|
}
|
|
7320
9209
|
],
|
|
7321
|
-
"
|
|
7322
|
-
"state_mutability": "external"
|
|
9210
|
+
"state_mutability": "view"
|
|
7323
9211
|
},
|
|
7324
9212
|
{
|
|
7325
9213
|
"type": "function",
|
|
7326
|
-
"name": "
|
|
9214
|
+
"name": "is_approved_for_all",
|
|
7327
9215
|
"inputs": [
|
|
7328
9216
|
{
|
|
7329
|
-
"name": "
|
|
7330
|
-
"type": "core::
|
|
9217
|
+
"name": "owner",
|
|
9218
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
9219
|
+
},
|
|
9220
|
+
{
|
|
9221
|
+
"name": "operator",
|
|
9222
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
7331
9223
|
}
|
|
7332
9224
|
],
|
|
7333
9225
|
"outputs": [
|
|
7334
9226
|
{
|
|
7335
|
-
"type": "
|
|
9227
|
+
"type": "core::bool"
|
|
7336
9228
|
}
|
|
7337
9229
|
],
|
|
7338
9230
|
"state_mutability": "view"
|
|
7339
|
-
}
|
|
9231
|
+
}
|
|
9232
|
+
]
|
|
9233
|
+
},
|
|
9234
|
+
{
|
|
9235
|
+
"type": "impl",
|
|
9236
|
+
"name": "ERC721CamelOnly",
|
|
9237
|
+
"interface_name": "openzeppelin_token::erc721::interface::IERC721CamelOnly"
|
|
9238
|
+
},
|
|
9239
|
+
{
|
|
9240
|
+
"type": "interface",
|
|
9241
|
+
"name": "openzeppelin_token::erc721::interface::IERC721CamelOnly",
|
|
9242
|
+
"items": [
|
|
7340
9243
|
{
|
|
7341
9244
|
"type": "function",
|
|
7342
|
-
"name": "
|
|
9245
|
+
"name": "balanceOf",
|
|
7343
9246
|
"inputs": [
|
|
7344
9247
|
{
|
|
7345
|
-
"name": "
|
|
7346
|
-
"type": "core::integer::u256"
|
|
7347
|
-
},
|
|
7348
|
-
{
|
|
7349
|
-
"name": "sponsor",
|
|
9248
|
+
"name": "account",
|
|
7350
9249
|
"type": "core::starknet::contract_address::ContractAddress"
|
|
7351
9250
|
}
|
|
7352
9251
|
],
|
|
@@ -7359,54 +9258,112 @@ var IPSponsorshipABI = [
|
|
|
7359
9258
|
},
|
|
7360
9259
|
{
|
|
7361
9260
|
"type": "function",
|
|
7362
|
-
"name": "
|
|
9261
|
+
"name": "ownerOf",
|
|
7363
9262
|
"inputs": [
|
|
7364
9263
|
{
|
|
7365
|
-
"name": "
|
|
9264
|
+
"name": "tokenId",
|
|
7366
9265
|
"type": "core::integer::u256"
|
|
7367
9266
|
}
|
|
7368
9267
|
],
|
|
7369
9268
|
"outputs": [
|
|
7370
9269
|
{
|
|
7371
|
-
"type": "
|
|
9270
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
7372
9271
|
}
|
|
7373
9272
|
],
|
|
7374
9273
|
"state_mutability": "view"
|
|
7375
9274
|
},
|
|
7376
9275
|
{
|
|
7377
9276
|
"type": "function",
|
|
7378
|
-
"name": "
|
|
9277
|
+
"name": "safeTransferFrom",
|
|
7379
9278
|
"inputs": [
|
|
7380
9279
|
{
|
|
7381
|
-
"name": "
|
|
9280
|
+
"name": "from",
|
|
9281
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
9282
|
+
},
|
|
9283
|
+
{
|
|
9284
|
+
"name": "to",
|
|
9285
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
9286
|
+
},
|
|
9287
|
+
{
|
|
9288
|
+
"name": "tokenId",
|
|
7382
9289
|
"type": "core::integer::u256"
|
|
9290
|
+
},
|
|
9291
|
+
{
|
|
9292
|
+
"name": "data",
|
|
9293
|
+
"type": "core::array::Span::<core::felt252>"
|
|
7383
9294
|
}
|
|
7384
9295
|
],
|
|
7385
|
-
"outputs": [
|
|
9296
|
+
"outputs": [],
|
|
9297
|
+
"state_mutability": "external"
|
|
9298
|
+
},
|
|
9299
|
+
{
|
|
9300
|
+
"type": "function",
|
|
9301
|
+
"name": "transferFrom",
|
|
9302
|
+
"inputs": [
|
|
9303
|
+
{
|
|
9304
|
+
"name": "from",
|
|
9305
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
9306
|
+
},
|
|
9307
|
+
{
|
|
9308
|
+
"name": "to",
|
|
9309
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
9310
|
+
},
|
|
9311
|
+
{
|
|
9312
|
+
"name": "tokenId",
|
|
9313
|
+
"type": "core::integer::u256"
|
|
9314
|
+
}
|
|
9315
|
+
],
|
|
9316
|
+
"outputs": [],
|
|
9317
|
+
"state_mutability": "external"
|
|
9318
|
+
},
|
|
9319
|
+
{
|
|
9320
|
+
"type": "function",
|
|
9321
|
+
"name": "setApprovalForAll",
|
|
9322
|
+
"inputs": [
|
|
9323
|
+
{
|
|
9324
|
+
"name": "operator",
|
|
9325
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
9326
|
+
},
|
|
7386
9327
|
{
|
|
9328
|
+
"name": "approved",
|
|
7387
9329
|
"type": "core::bool"
|
|
7388
9330
|
}
|
|
7389
9331
|
],
|
|
7390
|
-
"
|
|
9332
|
+
"outputs": [],
|
|
9333
|
+
"state_mutability": "external"
|
|
7391
9334
|
},
|
|
7392
9335
|
{
|
|
7393
9336
|
"type": "function",
|
|
7394
|
-
"name": "
|
|
7395
|
-
"inputs": [
|
|
7396
|
-
"outputs": [
|
|
9337
|
+
"name": "getApproved",
|
|
9338
|
+
"inputs": [
|
|
7397
9339
|
{
|
|
9340
|
+
"name": "tokenId",
|
|
7398
9341
|
"type": "core::integer::u256"
|
|
7399
9342
|
}
|
|
7400
9343
|
],
|
|
9344
|
+
"outputs": [
|
|
9345
|
+
{
|
|
9346
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
9347
|
+
}
|
|
9348
|
+
],
|
|
7401
9349
|
"state_mutability": "view"
|
|
7402
9350
|
},
|
|
7403
9351
|
{
|
|
7404
9352
|
"type": "function",
|
|
7405
|
-
"name": "
|
|
7406
|
-
"inputs": [
|
|
9353
|
+
"name": "isApprovedForAll",
|
|
9354
|
+
"inputs": [
|
|
9355
|
+
{
|
|
9356
|
+
"name": "owner",
|
|
9357
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
9358
|
+
},
|
|
9359
|
+
{
|
|
9360
|
+
"name": "operator",
|
|
9361
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
9362
|
+
}
|
|
9363
|
+
],
|
|
7407
9364
|
"outputs": [
|
|
7408
9365
|
{
|
|
7409
|
-
"type": "core::
|
|
9366
|
+
"type": "core::bool"
|
|
7410
9367
|
}
|
|
7411
9368
|
],
|
|
7412
9369
|
"state_mutability": "view"
|
|
@@ -7432,185 +9389,149 @@ var IPSponsorshipABI = [
|
|
|
7432
9389
|
}
|
|
7433
9390
|
],
|
|
7434
9391
|
"outputs": [
|
|
7435
|
-
{
|
|
7436
|
-
"type": "core::bool"
|
|
7437
|
-
}
|
|
7438
|
-
],
|
|
7439
|
-
"state_mutability": "view"
|
|
7440
|
-
}
|
|
7441
|
-
]
|
|
7442
|
-
},
|
|
7443
|
-
{
|
|
7444
|
-
"type": "constructor",
|
|
7445
|
-
"name": "constructor",
|
|
7446
|
-
"inputs": [
|
|
7447
|
-
},
|
|
7448
|
-
{
|
|
7449
|
-
"type": "event",
|
|
7450
|
-
"name": "openzeppelin_introspection::src5::SRC5Component::Event",
|
|
7451
|
-
"kind": "enum",
|
|
7452
|
-
"variants": []
|
|
7453
|
-
},
|
|
7454
|
-
{
|
|
7455
|
-
"type": "event",
|
|
7456
|
-
"name": "ip_sponsorship::IPSponsorship::IPSponsorship::OfferCreated",
|
|
7457
|
-
"kind": "struct",
|
|
7458
|
-
"members": [
|
|
7459
|
-
{
|
|
7460
|
-
"name": "offer_id",
|
|
7461
|
-
"type": "core::integer::u256",
|
|
7462
|
-
"kind": "key"
|
|
7463
|
-
},
|
|
7464
|
-
{
|
|
7465
|
-
"name": "author",
|
|
7466
|
-
"type": "core::starknet::contract_address::ContractAddress",
|
|
7467
|
-
"kind": "key"
|
|
7468
|
-
},
|
|
7469
|
-
{
|
|
7470
|
-
"name": "nft_contract",
|
|
7471
|
-
"type": "core::starknet::contract_address::ContractAddress",
|
|
7472
|
-
"kind": "key"
|
|
7473
|
-
},
|
|
7474
|
-
{
|
|
7475
|
-
"name": "token_id",
|
|
7476
|
-
"type": "core::integer::u256",
|
|
7477
|
-
"kind": "data"
|
|
7478
|
-
},
|
|
7479
|
-
{
|
|
7480
|
-
"name": "min_amount",
|
|
7481
|
-
"type": "core::integer::u256",
|
|
7482
|
-
"kind": "data"
|
|
7483
|
-
},
|
|
7484
|
-
{
|
|
7485
|
-
"name": "duration",
|
|
7486
|
-
"type": "core::integer::u64",
|
|
7487
|
-
"kind": "data"
|
|
7488
|
-
},
|
|
7489
|
-
{
|
|
7490
|
-
"name": "payment_token",
|
|
7491
|
-
"type": "core::starknet::contract_address::ContractAddress",
|
|
7492
|
-
"kind": "data"
|
|
7493
|
-
},
|
|
7494
|
-
{
|
|
7495
|
-
"name": "license_terms_uri",
|
|
7496
|
-
"type": "core::byte_array::ByteArray",
|
|
7497
|
-
"kind": "data"
|
|
7498
|
-
},
|
|
7499
|
-
{
|
|
7500
|
-
"name": "transferable",
|
|
7501
|
-
"type": "core::bool",
|
|
7502
|
-
"kind": "data"
|
|
7503
|
-
},
|
|
9392
|
+
{
|
|
9393
|
+
"type": "core::bool"
|
|
9394
|
+
}
|
|
9395
|
+
],
|
|
9396
|
+
"state_mutability": "view"
|
|
9397
|
+
}
|
|
9398
|
+
]
|
|
9399
|
+
},
|
|
9400
|
+
{
|
|
9401
|
+
"type": "constructor",
|
|
9402
|
+
"name": "constructor",
|
|
9403
|
+
"inputs": [
|
|
7504
9404
|
{
|
|
7505
|
-
"name": "
|
|
7506
|
-
"type": "core::
|
|
7507
|
-
"kind": "data"
|
|
9405
|
+
"name": "name",
|
|
9406
|
+
"type": "core::byte_array::ByteArray"
|
|
7508
9407
|
},
|
|
7509
9408
|
{
|
|
7510
|
-
"name": "
|
|
7511
|
-
"type": "core::
|
|
7512
|
-
"kind": "data"
|
|
9409
|
+
"name": "symbol",
|
|
9410
|
+
"type": "core::byte_array::ByteArray"
|
|
7513
9411
|
}
|
|
7514
9412
|
]
|
|
7515
9413
|
},
|
|
7516
9414
|
{
|
|
7517
9415
|
"type": "event",
|
|
7518
|
-
"name": "
|
|
9416
|
+
"name": "openzeppelin_token::erc721::erc721::ERC721Component::Transfer",
|
|
7519
9417
|
"kind": "struct",
|
|
7520
9418
|
"members": [
|
|
7521
9419
|
{
|
|
7522
|
-
"name": "
|
|
7523
|
-
"type": "core::
|
|
9420
|
+
"name": "from",
|
|
9421
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
7524
9422
|
"kind": "key"
|
|
7525
9423
|
},
|
|
7526
9424
|
{
|
|
7527
|
-
"name": "
|
|
7528
|
-
"type": "core::
|
|
7529
|
-
"kind": "
|
|
9425
|
+
"name": "to",
|
|
9426
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
9427
|
+
"kind": "key"
|
|
7530
9428
|
},
|
|
7531
9429
|
{
|
|
7532
|
-
"name": "
|
|
7533
|
-
"type": "core::integer::
|
|
7534
|
-
"kind": "
|
|
9430
|
+
"name": "token_id",
|
|
9431
|
+
"type": "core::integer::u256",
|
|
9432
|
+
"kind": "key"
|
|
7535
9433
|
}
|
|
7536
9434
|
]
|
|
7537
9435
|
},
|
|
7538
9436
|
{
|
|
7539
9437
|
"type": "event",
|
|
7540
|
-
"name": "
|
|
9438
|
+
"name": "openzeppelin_token::erc721::erc721::ERC721Component::Approval",
|
|
7541
9439
|
"kind": "struct",
|
|
7542
9440
|
"members": [
|
|
7543
9441
|
{
|
|
7544
|
-
"name": "
|
|
7545
|
-
"type": "core::
|
|
9442
|
+
"name": "owner",
|
|
9443
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
7546
9444
|
"kind": "key"
|
|
7547
9445
|
},
|
|
7548
9446
|
{
|
|
7549
|
-
"name": "
|
|
9447
|
+
"name": "approved",
|
|
7550
9448
|
"type": "core::starknet::contract_address::ContractAddress",
|
|
7551
9449
|
"kind": "key"
|
|
7552
9450
|
},
|
|
7553
9451
|
{
|
|
7554
|
-
"name": "
|
|
9452
|
+
"name": "token_id",
|
|
7555
9453
|
"type": "core::integer::u256",
|
|
7556
|
-
"kind": "
|
|
7557
|
-
},
|
|
7558
|
-
{
|
|
7559
|
-
"name": "bid_at",
|
|
7560
|
-
"type": "core::integer::u64",
|
|
7561
|
-
"kind": "data"
|
|
9454
|
+
"kind": "key"
|
|
7562
9455
|
}
|
|
7563
9456
|
]
|
|
7564
9457
|
},
|
|
7565
9458
|
{
|
|
7566
9459
|
"type": "event",
|
|
7567
|
-
"name": "
|
|
9460
|
+
"name": "openzeppelin_token::erc721::erc721::ERC721Component::ApprovalForAll",
|
|
7568
9461
|
"kind": "struct",
|
|
7569
9462
|
"members": [
|
|
7570
9463
|
{
|
|
7571
|
-
"name": "
|
|
7572
|
-
"type": "core::
|
|
9464
|
+
"name": "owner",
|
|
9465
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
7573
9466
|
"kind": "key"
|
|
7574
9467
|
},
|
|
7575
9468
|
{
|
|
7576
|
-
"name": "
|
|
9469
|
+
"name": "operator",
|
|
7577
9470
|
"type": "core::starknet::contract_address::ContractAddress",
|
|
7578
9471
|
"kind": "key"
|
|
7579
9472
|
},
|
|
7580
9473
|
{
|
|
7581
|
-
"name": "
|
|
7582
|
-
"type": "core::
|
|
9474
|
+
"name": "approved",
|
|
9475
|
+
"type": "core::bool",
|
|
7583
9476
|
"kind": "data"
|
|
7584
9477
|
}
|
|
7585
9478
|
]
|
|
7586
9479
|
},
|
|
7587
9480
|
{
|
|
7588
9481
|
"type": "event",
|
|
7589
|
-
"name": "
|
|
9482
|
+
"name": "openzeppelin_token::erc721::erc721::ERC721Component::Event",
|
|
9483
|
+
"kind": "enum",
|
|
9484
|
+
"variants": [
|
|
9485
|
+
{
|
|
9486
|
+
"name": "Transfer",
|
|
9487
|
+
"type": "openzeppelin_token::erc721::erc721::ERC721Component::Transfer",
|
|
9488
|
+
"kind": "nested"
|
|
9489
|
+
},
|
|
9490
|
+
{
|
|
9491
|
+
"name": "Approval",
|
|
9492
|
+
"type": "openzeppelin_token::erc721::erc721::ERC721Component::Approval",
|
|
9493
|
+
"kind": "nested"
|
|
9494
|
+
},
|
|
9495
|
+
{
|
|
9496
|
+
"name": "ApprovalForAll",
|
|
9497
|
+
"type": "openzeppelin_token::erc721::erc721::ERC721Component::ApprovalForAll",
|
|
9498
|
+
"kind": "nested"
|
|
9499
|
+
}
|
|
9500
|
+
]
|
|
9501
|
+
},
|
|
9502
|
+
{
|
|
9503
|
+
"type": "event",
|
|
9504
|
+
"name": "openzeppelin_introspection::src5::SRC5Component::Event",
|
|
9505
|
+
"kind": "enum",
|
|
9506
|
+
"variants": []
|
|
9507
|
+
},
|
|
9508
|
+
{
|
|
9509
|
+
"type": "event",
|
|
9510
|
+
"name": "ip_sponsorship::IPSponsorshipLicense::IPSponsorshipLicense::LicenseMinted",
|
|
7590
9511
|
"kind": "struct",
|
|
7591
9512
|
"members": [
|
|
7592
9513
|
{
|
|
7593
|
-
"name": "
|
|
9514
|
+
"name": "token_id",
|
|
7594
9515
|
"type": "core::integer::u256",
|
|
7595
9516
|
"kind": "key"
|
|
7596
9517
|
},
|
|
7597
9518
|
{
|
|
7598
|
-
"name": "
|
|
7599
|
-
"type": "core::
|
|
9519
|
+
"name": "recipient",
|
|
9520
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
7600
9521
|
"kind": "key"
|
|
7601
9522
|
},
|
|
7602
9523
|
{
|
|
7603
|
-
"name": "
|
|
9524
|
+
"name": "author",
|
|
7604
9525
|
"type": "core::starknet::contract_address::ContractAddress",
|
|
7605
9526
|
"kind": "key"
|
|
7606
9527
|
},
|
|
7607
9528
|
{
|
|
7608
|
-
"name": "
|
|
9529
|
+
"name": "asset_contract",
|
|
7609
9530
|
"type": "core::starknet::contract_address::ContractAddress",
|
|
7610
9531
|
"kind": "data"
|
|
7611
9532
|
},
|
|
7612
9533
|
{
|
|
7613
|
-
"name": "
|
|
9534
|
+
"name": "asset_token_id",
|
|
7614
9535
|
"type": "core::integer::u256",
|
|
7615
9536
|
"kind": "data"
|
|
7616
9537
|
},
|
|
@@ -7618,31 +9539,24 @@ var IPSponsorshipABI = [
|
|
|
7618
9539
|
"name": "expires_at",
|
|
7619
9540
|
"type": "core::integer::u64",
|
|
7620
9541
|
"kind": "data"
|
|
7621
|
-
}
|
|
7622
|
-
]
|
|
7623
|
-
},
|
|
7624
|
-
{
|
|
7625
|
-
"type": "event",
|
|
7626
|
-
"name": "ip_sponsorship::IPSponsorship::IPSponsorship::LicenseTransferred",
|
|
7627
|
-
"kind": "struct",
|
|
7628
|
-
"members": [
|
|
9542
|
+
},
|
|
7629
9543
|
{
|
|
7630
|
-
"name": "
|
|
7631
|
-
"type": "core::
|
|
7632
|
-
"kind": "
|
|
9544
|
+
"name": "transferable",
|
|
9545
|
+
"type": "core::bool",
|
|
9546
|
+
"kind": "data"
|
|
7633
9547
|
},
|
|
7634
9548
|
{
|
|
7635
|
-
"name": "
|
|
7636
|
-
"type": "core::
|
|
7637
|
-
"kind": "
|
|
9549
|
+
"name": "royalty_bps",
|
|
9550
|
+
"type": "core::integer::u256",
|
|
9551
|
+
"kind": "data"
|
|
7638
9552
|
},
|
|
7639
9553
|
{
|
|
7640
|
-
"name": "
|
|
7641
|
-
"type": "core::
|
|
7642
|
-
"kind": "
|
|
9554
|
+
"name": "license_terms_uri",
|
|
9555
|
+
"type": "core::byte_array::ByteArray",
|
|
9556
|
+
"kind": "data"
|
|
7643
9557
|
},
|
|
7644
9558
|
{
|
|
7645
|
-
"name": "
|
|
9559
|
+
"name": "minted_at",
|
|
7646
9560
|
"type": "core::integer::u64",
|
|
7647
9561
|
"kind": "data"
|
|
7648
9562
|
}
|
|
@@ -7650,42 +9564,22 @@ var IPSponsorshipABI = [
|
|
|
7650
9564
|
},
|
|
7651
9565
|
{
|
|
7652
9566
|
"type": "event",
|
|
7653
|
-
"name": "ip_sponsorship::
|
|
9567
|
+
"name": "ip_sponsorship::IPSponsorshipLicense::IPSponsorshipLicense::Event",
|
|
7654
9568
|
"kind": "enum",
|
|
7655
9569
|
"variants": [
|
|
7656
9570
|
{
|
|
7657
|
-
"name": "
|
|
7658
|
-
"type": "
|
|
9571
|
+
"name": "ERC721Event",
|
|
9572
|
+
"type": "openzeppelin_token::erc721::erc721::ERC721Component::Event",
|
|
7659
9573
|
"kind": "flat"
|
|
7660
9574
|
},
|
|
7661
9575
|
{
|
|
7662
|
-
"name": "
|
|
7663
|
-
"type": "
|
|
7664
|
-
"kind": "
|
|
7665
|
-
},
|
|
7666
|
-
{
|
|
7667
|
-
"name": "OfferStatusUpdated",
|
|
7668
|
-
"type": "ip_sponsorship::IPSponsorship::IPSponsorship::OfferStatusUpdated",
|
|
7669
|
-
"kind": "nested"
|
|
7670
|
-
},
|
|
7671
|
-
{
|
|
7672
|
-
"name": "BidPlaced",
|
|
7673
|
-
"type": "ip_sponsorship::IPSponsorship::IPSponsorship::BidPlaced",
|
|
7674
|
-
"kind": "nested"
|
|
7675
|
-
},
|
|
7676
|
-
{
|
|
7677
|
-
"name": "BidRetracted",
|
|
7678
|
-
"type": "ip_sponsorship::IPSponsorship::IPSponsorship::BidRetracted",
|
|
7679
|
-
"kind": "nested"
|
|
7680
|
-
},
|
|
7681
|
-
{
|
|
7682
|
-
"name": "SponsorshipAccepted",
|
|
7683
|
-
"type": "ip_sponsorship::IPSponsorship::IPSponsorship::SponsorshipAccepted",
|
|
7684
|
-
"kind": "nested"
|
|
9576
|
+
"name": "SRC5Event",
|
|
9577
|
+
"type": "openzeppelin_introspection::src5::SRC5Component::Event",
|
|
9578
|
+
"kind": "flat"
|
|
7685
9579
|
},
|
|
7686
9580
|
{
|
|
7687
|
-
"name": "
|
|
7688
|
-
"type": "ip_sponsorship::
|
|
9581
|
+
"name": "LicenseMinted",
|
|
9582
|
+
"type": "ip_sponsorship::IPSponsorshipLicense::IPSponsorshipLicense::LicenseMinted",
|
|
7689
9583
|
"kind": "nested"
|
|
7690
9584
|
}
|
|
7691
9585
|
]
|
|
@@ -8549,6 +10443,8 @@ SN.ipTicketsFactory;
|
|
|
8549
10443
|
SN.ipTicketCollectionClassHash;
|
|
8550
10444
|
SN.ipClubRegistry;
|
|
8551
10445
|
SN.ipClubNftClassHash;
|
|
10446
|
+
SN.ipClubFactory;
|
|
10447
|
+
SN.ipClubCollectionClassHash;
|
|
8552
10448
|
SN.ipSponsorship;
|
|
8553
10449
|
SN.ipSponsorshipLicense;
|
|
8554
10450
|
SN.creatorCoinFactory;
|
|
@@ -8592,12 +10488,39 @@ var SUPPORTED_TOKENS = [
|
|
|
8592
10488
|
];
|
|
8593
10489
|
var DEFAULT_CURRENCY = "USDC";
|
|
8594
10490
|
|
|
10491
|
+
// src/utils/bigint.ts
|
|
10492
|
+
function stringifyBigInts(obj) {
|
|
10493
|
+
if (typeof obj === "bigint") {
|
|
10494
|
+
return obj.toString();
|
|
10495
|
+
}
|
|
10496
|
+
if (Array.isArray(obj)) {
|
|
10497
|
+
return obj.map(stringifyBigInts);
|
|
10498
|
+
}
|
|
10499
|
+
if (obj !== null && typeof obj === "object") {
|
|
10500
|
+
return Object.fromEntries(
|
|
10501
|
+
Object.entries(obj).map(([key, value]) => [
|
|
10502
|
+
key,
|
|
10503
|
+
stringifyBigInts(value)
|
|
10504
|
+
])
|
|
10505
|
+
);
|
|
10506
|
+
}
|
|
10507
|
+
return obj;
|
|
10508
|
+
}
|
|
10509
|
+
|
|
8595
10510
|
// src/utils/token.ts
|
|
8596
10511
|
function parseAmount(human, decimals) {
|
|
8597
10512
|
const [whole, frac = ""] = human.split(".");
|
|
8598
10513
|
const fracPadded = frac.padEnd(decimals, "0").slice(0, decimals);
|
|
8599
10514
|
return (BigInt(whole) * BigInt(10) ** BigInt(decimals) + BigInt(fracPadded)).toString();
|
|
8600
10515
|
}
|
|
10516
|
+
function formatAmount(raw, decimals) {
|
|
10517
|
+
const value = BigInt(raw);
|
|
10518
|
+
const factor = BigInt(Math.pow(10, decimals));
|
|
10519
|
+
const whole = value / factor;
|
|
10520
|
+
const remainder = value % factor;
|
|
10521
|
+
const fractional = remainder.toString().padStart(decimals, "0");
|
|
10522
|
+
return `${whole}.${fractional}`;
|
|
10523
|
+
}
|
|
8601
10524
|
function getTokenByAddress(address) {
|
|
8602
10525
|
const lower = address.toLowerCase();
|
|
8603
10526
|
return SUPPORTED_TOKENS.find((t) => t.address.toLowerCase() === lower);
|
|
@@ -8626,25 +10549,6 @@ function buildFeeCall(p, cfg) {
|
|
|
8626
10549
|
};
|
|
8627
10550
|
}
|
|
8628
10551
|
|
|
8629
|
-
// src/utils/bigint.ts
|
|
8630
|
-
function stringifyBigInts(obj) {
|
|
8631
|
-
if (typeof obj === "bigint") {
|
|
8632
|
-
return obj.toString();
|
|
8633
|
-
}
|
|
8634
|
-
if (Array.isArray(obj)) {
|
|
8635
|
-
return obj.map(stringifyBigInts);
|
|
8636
|
-
}
|
|
8637
|
-
if (obj !== null && typeof obj === "object") {
|
|
8638
|
-
return Object.fromEntries(
|
|
8639
|
-
Object.entries(obj).map(([key, value]) => [
|
|
8640
|
-
key,
|
|
8641
|
-
stringifyBigInts(value)
|
|
8642
|
-
])
|
|
8643
|
-
);
|
|
8644
|
-
}
|
|
8645
|
-
return obj;
|
|
8646
|
-
}
|
|
8647
|
-
|
|
8648
10552
|
// src/utils/rpc.ts
|
|
8649
10553
|
var PUBLIC_RPC_FALLBACKS = [
|
|
8650
10554
|
"https://rpc.starknet.lava.build"
|
|
@@ -8726,115 +10630,27 @@ function toSignatureArray(sig) {
|
|
|
8726
10630
|
return [s.r.toString(), s.s.toString()];
|
|
8727
10631
|
}
|
|
8728
10632
|
function getChainId(config) {
|
|
8729
|
-
if (config.chain !== "STARKNET") {
|
|
8730
|
-
throw new Error(`SNIP-12 signing is Starknet-only; got chain "${config.chain}"`);
|
|
8731
|
-
}
|
|
8732
|
-
return starknet.constants.StarknetChainId.SN_MAIN;
|
|
8733
|
-
}
|
|
8734
|
-
function resolveToken(currency) {
|
|
8735
|
-
const token = SUPPORTED_TOKENS.find(
|
|
8736
|
-
(t) => t.symbol === currency.toUpperCase() || t.address.toLowerCase() === currency.toLowerCase()
|
|
8737
|
-
);
|
|
8738
|
-
if (!token) throw new MedialaneError(`Unsupported currency: ${currency}`, "INVALID_PARAMS");
|
|
8739
|
-
return token;
|
|
8740
|
-
}
|
|
8741
|
-
var _providerCache = /* @__PURE__ */ new WeakMap();
|
|
8742
|
-
function getProvider(config) {
|
|
8743
|
-
let p = _providerCache.get(config);
|
|
8744
|
-
if (!p) {
|
|
8745
|
-
const urls = Array.from(/* @__PURE__ */ new Set([config.rpcUrl, ...PUBLIC_RPC_FALLBACKS]));
|
|
8746
|
-
p = new starknet.RpcProvider({ nodeUrl: urls[0], baseFetch: createFailoverFetch(urls) });
|
|
8747
|
-
_providerCache.set(config, p);
|
|
8748
|
-
}
|
|
8749
|
-
return p;
|
|
8750
|
-
}
|
|
8751
|
-
|
|
8752
|
-
// src/starknet/marketplace/build.ts
|
|
8753
|
-
function contractFor(cfg) {
|
|
8754
|
-
return new starknet.Contract(IPMarketplaceABI, cfg.marketplaceContract, getProvider(cfg));
|
|
8755
|
-
}
|
|
8756
|
-
function buildListingOrder(i, cfg) {
|
|
8757
|
-
const orderParams = {
|
|
8758
|
-
offerer: i.offerer,
|
|
8759
|
-
marketplace: cfg.marketplaceContract,
|
|
8760
|
-
offer: { item_type: "ERC721", token: i.nftContract, identifier_or_criteria: i.tokenId, amount: "1" },
|
|
8761
|
-
consideration: {
|
|
8762
|
-
item_type: "ERC20",
|
|
8763
|
-
token: i.paymentTokenAddress,
|
|
8764
|
-
identifier_or_criteria: "0",
|
|
8765
|
-
amount: i.priceWei,
|
|
8766
|
-
recipient: i.offerer
|
|
8767
|
-
},
|
|
8768
|
-
royalty_max_bps: i.royaltyMaxBps,
|
|
8769
|
-
start_time: String(i.startTime),
|
|
8770
|
-
end_time: String(i.endTime),
|
|
8771
|
-
salt: i.salt,
|
|
8772
|
-
counter: i.counter
|
|
8773
|
-
};
|
|
8774
|
-
const typedData = stringifyBigInts(buildOrderTypedData(orderParams, getChainId(cfg)));
|
|
8775
|
-
return { orderParams, typedData };
|
|
8776
|
-
}
|
|
8777
|
-
function buildOfferOrder(i, cfg) {
|
|
8778
|
-
const orderParams = {
|
|
8779
|
-
offerer: i.offerer,
|
|
8780
|
-
marketplace: cfg.marketplaceContract,
|
|
8781
|
-
offer: { item_type: "ERC20", token: i.paymentTokenAddress, identifier_or_criteria: "0", amount: i.priceWei },
|
|
8782
|
-
consideration: {
|
|
8783
|
-
item_type: "ERC721",
|
|
8784
|
-
token: i.nftContract,
|
|
8785
|
-
identifier_or_criteria: i.tokenId,
|
|
8786
|
-
amount: "1",
|
|
8787
|
-
recipient: i.offerer
|
|
8788
|
-
},
|
|
8789
|
-
royalty_max_bps: i.royaltyMaxBps,
|
|
8790
|
-
start_time: String(i.startTime),
|
|
8791
|
-
end_time: String(i.endTime),
|
|
8792
|
-
salt: i.salt,
|
|
8793
|
-
counter: i.counter
|
|
8794
|
-
};
|
|
8795
|
-
const typedData = stringifyBigInts(buildOrderTypedData(orderParams, getChainId(cfg)));
|
|
8796
|
-
return { orderParams, typedData };
|
|
8797
|
-
}
|
|
8798
|
-
function registerPayload(orderParams, signature) {
|
|
8799
|
-
return stringifyBigInts({
|
|
8800
|
-
parameters: {
|
|
8801
|
-
...orderParams,
|
|
8802
|
-
offer: { ...orderParams.offer, item_type: starknet.shortString.encodeShortString(orderParams.offer.item_type) },
|
|
8803
|
-
consideration: {
|
|
8804
|
-
...orderParams.consideration,
|
|
8805
|
-
item_type: starknet.shortString.encodeShortString(orderParams.consideration.item_type)
|
|
8806
|
-
}
|
|
8807
|
-
},
|
|
8808
|
-
signature
|
|
8809
|
-
});
|
|
8810
|
-
}
|
|
8811
|
-
function buildRegisterCalls(a, cfg) {
|
|
8812
|
-
const registerCall = contractFor(cfg).populate("register_order", [registerPayload(a.orderParams, a.signature)]);
|
|
8813
|
-
return a.approvalNeeded ? [a.approve, registerCall] : [registerCall];
|
|
10633
|
+
if (config.chain !== "STARKNET") {
|
|
10634
|
+
throw new Error(`SNIP-12 signing is Starknet-only; got chain "${config.chain}"`);
|
|
10635
|
+
}
|
|
10636
|
+
return starknet.constants.StarknetChainId.SN_MAIN;
|
|
8814
10637
|
}
|
|
8815
|
-
function
|
|
8816
|
-
const
|
|
8817
|
-
|
|
8818
|
-
contractAddress: a.paymentToken,
|
|
8819
|
-
entrypoint: "approve",
|
|
8820
|
-
calldata: [cfg.marketplaceContract, u.low.toString(), u.high.toString()]
|
|
8821
|
-
};
|
|
8822
|
-
const fulfill = contractFor(cfg).populate("fulfill_order", [a.orderHash]);
|
|
8823
|
-
const fee = buildFeeCall(
|
|
8824
|
-
{ surface: "marketplace", token: a.paymentToken, grossAmount: BigInt(a.totalPrice) },
|
|
8825
|
-
cfg.feeConfig
|
|
10638
|
+
function resolveToken(currency) {
|
|
10639
|
+
const token = SUPPORTED_TOKENS.find(
|
|
10640
|
+
(t) => t.symbol === currency.toUpperCase() || t.address.toLowerCase() === currency.toLowerCase()
|
|
8826
10641
|
);
|
|
8827
|
-
|
|
8828
|
-
|
|
8829
|
-
function buildCancelCalls(a, cfg) {
|
|
8830
|
-
const cancelRequest = stringifyBigInts({
|
|
8831
|
-
cancelation: { order_hash: a.orderHash, offerer: a.offerer },
|
|
8832
|
-
signature: a.signature
|
|
8833
|
-
});
|
|
8834
|
-
return [contractFor(cfg).populate("cancel_order", [cancelRequest])];
|
|
10642
|
+
if (!token) throw new MedialaneError(`Unsupported currency: ${currency}`, "INVALID_PARAMS");
|
|
10643
|
+
return token;
|
|
8835
10644
|
}
|
|
8836
|
-
|
|
8837
|
-
|
|
10645
|
+
var _providerCache = /* @__PURE__ */ new WeakMap();
|
|
10646
|
+
function getProvider(config) {
|
|
10647
|
+
let p = _providerCache.get(config);
|
|
10648
|
+
if (!p) {
|
|
10649
|
+
const urls = Array.from(/* @__PURE__ */ new Set([config.rpcUrl, ...PUBLIC_RPC_FALLBACKS]));
|
|
10650
|
+
p = new starknet.RpcProvider({ nodeUrl: urls[0], baseFetch: createFailoverFetch(urls) });
|
|
10651
|
+
_providerCache.set(config, p);
|
|
10652
|
+
}
|
|
10653
|
+
return p;
|
|
8838
10654
|
}
|
|
8839
10655
|
|
|
8840
10656
|
// src/starknet/marketplace/orders.ts
|
|
@@ -8861,22 +10677,46 @@ async function createListing(account, params, config) {
|
|
|
8861
10677
|
const endTime = now + durationSeconds;
|
|
8862
10678
|
const counter = (await contract.get_counter(account.address)).toString();
|
|
8863
10679
|
const royaltyMaxBps = await resolveRoyaltyMaxBps(provider, nftContract, tokenId, params.royaltyMaxBps);
|
|
8864
|
-
const
|
|
8865
|
-
|
|
8866
|
-
|
|
8867
|
-
|
|
8868
|
-
|
|
8869
|
-
|
|
8870
|
-
|
|
8871
|
-
|
|
8872
|
-
startTime,
|
|
8873
|
-
endTime,
|
|
8874
|
-
salt: generateSalt(),
|
|
8875
|
-
counter
|
|
10680
|
+
const orderParams = {
|
|
10681
|
+
offerer: account.address,
|
|
10682
|
+
marketplace: config.marketplaceContract,
|
|
10683
|
+
offer: {
|
|
10684
|
+
item_type: "ERC721",
|
|
10685
|
+
token: nftContract,
|
|
10686
|
+
identifier_or_criteria: tokenId,
|
|
10687
|
+
amount: "1"
|
|
8876
10688
|
},
|
|
8877
|
-
|
|
8878
|
-
|
|
8879
|
-
|
|
10689
|
+
consideration: {
|
|
10690
|
+
item_type: "ERC20",
|
|
10691
|
+
token: token.address,
|
|
10692
|
+
identifier_or_criteria: "0",
|
|
10693
|
+
amount: priceWei,
|
|
10694
|
+
recipient: account.address
|
|
10695
|
+
},
|
|
10696
|
+
royalty_max_bps: royaltyMaxBps,
|
|
10697
|
+
start_time: startTime.toString(),
|
|
10698
|
+
end_time: endTime.toString(),
|
|
10699
|
+
salt: generateSalt(),
|
|
10700
|
+
counter
|
|
10701
|
+
};
|
|
10702
|
+
const chainId = getChainId(config);
|
|
10703
|
+
const typedData = stringifyBigInts(buildOrderTypedData(orderParams, chainId));
|
|
10704
|
+
const signature = await account.signMessage(typedData);
|
|
10705
|
+
const signatureArray = toSignatureArray(signature);
|
|
10706
|
+
const registerPayload = stringifyBigInts({
|
|
10707
|
+
parameters: {
|
|
10708
|
+
...orderParams,
|
|
10709
|
+
offer: {
|
|
10710
|
+
...orderParams.offer,
|
|
10711
|
+
item_type: starknet.shortString.encodeShortString(orderParams.offer.item_type)
|
|
10712
|
+
},
|
|
10713
|
+
consideration: {
|
|
10714
|
+
...orderParams.consideration,
|
|
10715
|
+
item_type: starknet.shortString.encodeShortString(orderParams.consideration.item_type)
|
|
10716
|
+
}
|
|
10717
|
+
},
|
|
10718
|
+
signature: signatureArray
|
|
10719
|
+
});
|
|
8880
10720
|
const tokenIdUint256 = starknet.cairo.uint256(tokenId);
|
|
8881
10721
|
let isAlreadyApproved = false;
|
|
8882
10722
|
try {
|
|
@@ -8888,19 +10728,19 @@ async function createListing(account, params, config) {
|
|
|
8888
10728
|
isAlreadyApproved = BigInt(result[0]).toString() === BigInt(config.marketplaceContract).toString();
|
|
8889
10729
|
} catch {
|
|
8890
10730
|
}
|
|
8891
|
-
const
|
|
8892
|
-
|
|
8893
|
-
|
|
8894
|
-
|
|
8895
|
-
|
|
8896
|
-
|
|
8897
|
-
|
|
8898
|
-
|
|
8899
|
-
|
|
8900
|
-
|
|
8901
|
-
|
|
8902
|
-
|
|
8903
|
-
|
|
10731
|
+
const registerCall = contract.populate("register_order", [registerPayload]);
|
|
10732
|
+
const calls = isAlreadyApproved ? [registerCall] : [
|
|
10733
|
+
{
|
|
10734
|
+
contractAddress: nftContract,
|
|
10735
|
+
entrypoint: "approve",
|
|
10736
|
+
calldata: [
|
|
10737
|
+
config.marketplaceContract,
|
|
10738
|
+
tokenIdUint256.low.toString(),
|
|
10739
|
+
tokenIdUint256.high.toString()
|
|
10740
|
+
]
|
|
10741
|
+
},
|
|
10742
|
+
registerCall
|
|
10743
|
+
];
|
|
8904
10744
|
try {
|
|
8905
10745
|
const tx = await account.execute(calls);
|
|
8906
10746
|
await provider.waitForTransaction(tx.transaction_hash);
|
|
@@ -8919,22 +10759,46 @@ async function makeOffer(account, params, config) {
|
|
|
8919
10759
|
const endTime = now + durationSeconds;
|
|
8920
10760
|
const counter = (await contract.get_counter(account.address)).toString();
|
|
8921
10761
|
const royaltyMaxBps = await resolveRoyaltyMaxBps(provider, nftContract, tokenId, params.royaltyMaxBps);
|
|
8922
|
-
const
|
|
8923
|
-
|
|
8924
|
-
|
|
8925
|
-
|
|
8926
|
-
|
|
8927
|
-
|
|
8928
|
-
|
|
8929
|
-
|
|
8930
|
-
startTime,
|
|
8931
|
-
endTime,
|
|
8932
|
-
salt: generateSalt(),
|
|
8933
|
-
counter
|
|
10762
|
+
const orderParams = {
|
|
10763
|
+
offerer: account.address,
|
|
10764
|
+
marketplace: config.marketplaceContract,
|
|
10765
|
+
offer: {
|
|
10766
|
+
item_type: "ERC20",
|
|
10767
|
+
token: token.address,
|
|
10768
|
+
identifier_or_criteria: "0",
|
|
10769
|
+
amount: priceWei
|
|
8934
10770
|
},
|
|
8935
|
-
|
|
8936
|
-
|
|
8937
|
-
|
|
10771
|
+
consideration: {
|
|
10772
|
+
item_type: "ERC721",
|
|
10773
|
+
token: nftContract,
|
|
10774
|
+
identifier_or_criteria: tokenId,
|
|
10775
|
+
amount: "1",
|
|
10776
|
+
recipient: account.address
|
|
10777
|
+
},
|
|
10778
|
+
royalty_max_bps: royaltyMaxBps,
|
|
10779
|
+
start_time: startTime.toString(),
|
|
10780
|
+
end_time: endTime.toString(),
|
|
10781
|
+
salt: generateSalt(),
|
|
10782
|
+
counter
|
|
10783
|
+
};
|
|
10784
|
+
const chainId = getChainId(config);
|
|
10785
|
+
const typedData = stringifyBigInts(buildOrderTypedData(orderParams, chainId));
|
|
10786
|
+
const signature = await account.signMessage(typedData);
|
|
10787
|
+
const signatureArray = toSignatureArray(signature);
|
|
10788
|
+
const registerPayload = stringifyBigInts({
|
|
10789
|
+
parameters: {
|
|
10790
|
+
...orderParams,
|
|
10791
|
+
offer: {
|
|
10792
|
+
...orderParams.offer,
|
|
10793
|
+
item_type: starknet.shortString.encodeShortString(orderParams.offer.item_type)
|
|
10794
|
+
},
|
|
10795
|
+
consideration: {
|
|
10796
|
+
...orderParams.consideration,
|
|
10797
|
+
item_type: starknet.shortString.encodeShortString(orderParams.consideration.item_type)
|
|
10798
|
+
}
|
|
10799
|
+
},
|
|
10800
|
+
signature: signatureArray
|
|
10801
|
+
});
|
|
8938
10802
|
const amountUint256 = starknet.cairo.uint256(priceWei);
|
|
8939
10803
|
const approveCall = {
|
|
8940
10804
|
contractAddress: token.address,
|
|
@@ -8945,12 +10809,9 @@ async function makeOffer(account, params, config) {
|
|
|
8945
10809
|
amountUint256.high.toString()
|
|
8946
10810
|
]
|
|
8947
10811
|
};
|
|
8948
|
-
const
|
|
8949
|
-
{ orderParams, signature: signatureArray, approvalNeeded: true, approve: approveCall },
|
|
8950
|
-
config
|
|
8951
|
-
);
|
|
10812
|
+
const registerCall = contract.populate("register_order", [registerPayload]);
|
|
8952
10813
|
try {
|
|
8953
|
-
const tx = await account.execute(
|
|
10814
|
+
const tx = await account.execute([approveCall, registerCall]);
|
|
8954
10815
|
await provider.waitForTransaction(tx.transaction_hash);
|
|
8955
10816
|
return { txHash: tx.transaction_hash };
|
|
8956
10817
|
} catch (err) {
|
|
@@ -8959,8 +10820,23 @@ async function makeOffer(account, params, config) {
|
|
|
8959
10820
|
}
|
|
8960
10821
|
async function fulfillOrder(account, params, config) {
|
|
8961
10822
|
const { orderHash, paymentToken, totalPrice } = params;
|
|
8962
|
-
const { provider } = makeContract(config);
|
|
8963
|
-
const
|
|
10823
|
+
const { contract, provider } = makeContract(config);
|
|
10824
|
+
const totalPriceU256 = starknet.cairo.uint256(totalPrice);
|
|
10825
|
+
const approveCall = {
|
|
10826
|
+
contractAddress: paymentToken,
|
|
10827
|
+
entrypoint: "approve",
|
|
10828
|
+
calldata: [
|
|
10829
|
+
config.marketplaceContract,
|
|
10830
|
+
totalPriceU256.low.toString(),
|
|
10831
|
+
totalPriceU256.high.toString()
|
|
10832
|
+
]
|
|
10833
|
+
};
|
|
10834
|
+
const fulfillCall = contract.populate("fulfill_order", [orderHash]);
|
|
10835
|
+
const feeCall = buildFeeCall(
|
|
10836
|
+
{ surface: "marketplace", token: paymentToken, grossAmount: BigInt(totalPrice) },
|
|
10837
|
+
config.feeConfig
|
|
10838
|
+
);
|
|
10839
|
+
const calls = feeCall ? [approveCall, fulfillCall, feeCall] : [approveCall, fulfillCall];
|
|
8964
10840
|
try {
|
|
8965
10841
|
const tx = await account.execute(calls);
|
|
8966
10842
|
await provider.waitForTransaction(tx.transaction_hash);
|
|
@@ -8971,12 +10847,24 @@ async function fulfillOrder(account, params, config) {
|
|
|
8971
10847
|
}
|
|
8972
10848
|
async function cancelOrder(account, params, config) {
|
|
8973
10849
|
const { orderHash } = params;
|
|
8974
|
-
const { provider } = makeContract(config);
|
|
8975
|
-
const
|
|
8976
|
-
const
|
|
8977
|
-
|
|
10850
|
+
const { contract, provider } = makeContract(config);
|
|
10851
|
+
const chainId = getChainId(config);
|
|
10852
|
+
const cancelParams = {
|
|
10853
|
+
order_hash: orderHash,
|
|
10854
|
+
offerer: account.address
|
|
10855
|
+
};
|
|
10856
|
+
const typedData = stringifyBigInts(
|
|
10857
|
+
buildCancellationTypedData(cancelParams, chainId)
|
|
10858
|
+
);
|
|
10859
|
+
const signature = await account.signMessage(typedData);
|
|
10860
|
+
const signatureArray = toSignatureArray(signature);
|
|
10861
|
+
const cancelRequest = stringifyBigInts({
|
|
10862
|
+
cancelation: cancelParams,
|
|
10863
|
+
signature: signatureArray
|
|
10864
|
+
});
|
|
10865
|
+
const call = contract.populate("cancel_order", [cancelRequest]);
|
|
8978
10866
|
try {
|
|
8979
|
-
const tx = await account.execute(
|
|
10867
|
+
const tx = await account.execute(call);
|
|
8980
10868
|
await provider.waitForTransaction(tx.transaction_hash);
|
|
8981
10869
|
return { txHash: tx.transaction_hash };
|
|
8982
10870
|
} catch (err) {
|
|
@@ -9123,100 +11011,6 @@ var MarketplaceModule = class {
|
|
|
9123
11011
|
return buildCancellationTypedData(params, chainId);
|
|
9124
11012
|
}
|
|
9125
11013
|
};
|
|
9126
|
-
function contractFor2(cfg) {
|
|
9127
|
-
return new starknet.Contract(Medialane1155ABI, cfg.marketplace1155Contract, getProvider(cfg));
|
|
9128
|
-
}
|
|
9129
|
-
function buildListing1155Order(i, cfg) {
|
|
9130
|
-
const orderParams = {
|
|
9131
|
-
offerer: i.offerer,
|
|
9132
|
-
marketplace: cfg.marketplace1155Contract,
|
|
9133
|
-
offer: { item_type: "ERC1155", token: i.nftContract, identifier_or_criteria: i.tokenId, amount: i.quantity },
|
|
9134
|
-
consideration: {
|
|
9135
|
-
item_type: "ERC20",
|
|
9136
|
-
token: i.paymentTokenAddress,
|
|
9137
|
-
identifier_or_criteria: "0",
|
|
9138
|
-
amount: i.priceWeiPerUnit,
|
|
9139
|
-
recipient: i.offerer
|
|
9140
|
-
},
|
|
9141
|
-
royalty_max_bps: i.royaltyMaxBps,
|
|
9142
|
-
start_time: String(i.startTime),
|
|
9143
|
-
end_time: String(i.endTime),
|
|
9144
|
-
salt: i.salt,
|
|
9145
|
-
counter: i.counter
|
|
9146
|
-
};
|
|
9147
|
-
const typedData = stringifyBigInts(
|
|
9148
|
-
build1155OrderTypedData(orderParams, getChainId(cfg))
|
|
9149
|
-
);
|
|
9150
|
-
return { orderParams, typedData };
|
|
9151
|
-
}
|
|
9152
|
-
function buildOffer1155Order(i, cfg) {
|
|
9153
|
-
const orderParams = {
|
|
9154
|
-
offerer: i.offerer,
|
|
9155
|
-
marketplace: cfg.marketplace1155Contract,
|
|
9156
|
-
offer: { item_type: "ERC20", token: i.paymentTokenAddress, identifier_or_criteria: "0", amount: i.priceWeiPerUnit },
|
|
9157
|
-
consideration: {
|
|
9158
|
-
item_type: "ERC1155",
|
|
9159
|
-
token: i.nftContract,
|
|
9160
|
-
identifier_or_criteria: i.tokenId,
|
|
9161
|
-
amount: i.quantity,
|
|
9162
|
-
recipient: i.offerer
|
|
9163
|
-
},
|
|
9164
|
-
royalty_max_bps: i.royaltyMaxBps,
|
|
9165
|
-
start_time: String(i.startTime),
|
|
9166
|
-
end_time: String(i.endTime),
|
|
9167
|
-
salt: i.salt,
|
|
9168
|
-
counter: i.counter
|
|
9169
|
-
};
|
|
9170
|
-
const typedData = stringifyBigInts(
|
|
9171
|
-
build1155OrderTypedData(orderParams, getChainId(cfg))
|
|
9172
|
-
);
|
|
9173
|
-
return { orderParams, typedData };
|
|
9174
|
-
}
|
|
9175
|
-
function registerPayload2(orderParams, signature) {
|
|
9176
|
-
return stringifyBigInts({
|
|
9177
|
-
parameters: {
|
|
9178
|
-
...orderParams,
|
|
9179
|
-
offer: { ...orderParams.offer, item_type: starknet.shortString.encodeShortString(orderParams.offer.item_type) },
|
|
9180
|
-
consideration: {
|
|
9181
|
-
...orderParams.consideration,
|
|
9182
|
-
item_type: starknet.shortString.encodeShortString(orderParams.consideration.item_type)
|
|
9183
|
-
}
|
|
9184
|
-
},
|
|
9185
|
-
signature
|
|
9186
|
-
});
|
|
9187
|
-
}
|
|
9188
|
-
function buildRegister1155Calls(a, cfg) {
|
|
9189
|
-
const registerCall = contractFor2(cfg).populate("register_order", [registerPayload2(a.orderParams, a.signature)]);
|
|
9190
|
-
return a.approvalNeeded ? [a.approve, registerCall] : [registerCall];
|
|
9191
|
-
}
|
|
9192
|
-
function buildFulfill1155Calls(a, cfg) {
|
|
9193
|
-
const u = starknet.cairo.uint256(a.totalPrice);
|
|
9194
|
-
const approve = {
|
|
9195
|
-
contractAddress: a.paymentToken,
|
|
9196
|
-
entrypoint: "approve",
|
|
9197
|
-
calldata: [cfg.marketplace1155Contract, u.low.toString(), u.high.toString()]
|
|
9198
|
-
};
|
|
9199
|
-
const fulfill = contractFor2(cfg).populate("fulfill_order", [a.orderHash, a.quantity]);
|
|
9200
|
-
const fee = buildFeeCall(
|
|
9201
|
-
{ surface: "marketplace", token: a.paymentToken, grossAmount: BigInt(a.totalPrice) },
|
|
9202
|
-
cfg.feeConfig
|
|
9203
|
-
);
|
|
9204
|
-
return fee ? [approve, fulfill, fee] : [approve, fulfill];
|
|
9205
|
-
}
|
|
9206
|
-
function buildCancel1155Calls(a, cfg) {
|
|
9207
|
-
const cancelPayload = stringifyBigInts({
|
|
9208
|
-
cancelation: { order_hash: a.orderHash, offerer: a.offerer },
|
|
9209
|
-
signature: a.signature
|
|
9210
|
-
});
|
|
9211
|
-
return [contractFor2(cfg).populate("cancel_order", [cancelPayload])];
|
|
9212
|
-
}
|
|
9213
|
-
function buildCancel1155TypedData(orderHash, offerer, cfg) {
|
|
9214
|
-
return stringifyBigInts(
|
|
9215
|
-
build1155CancellationTypedData({ order_hash: orderHash, offerer }, getChainId(cfg))
|
|
9216
|
-
);
|
|
9217
|
-
}
|
|
9218
|
-
|
|
9219
|
-
// src/starknet/marketplace1155/orders.ts
|
|
9220
11014
|
var _contractCache2 = /* @__PURE__ */ new WeakMap();
|
|
9221
11015
|
function getContract(config) {
|
|
9222
11016
|
let c = _contractCache2.get(config);
|
|
@@ -9245,27 +11039,53 @@ async function createListing1155(account, params, config) {
|
|
|
9245
11039
|
const token = resolveToken(currency);
|
|
9246
11040
|
const priceWei = parseAmount(pricePerUnit, token.decimals);
|
|
9247
11041
|
const now = Math.floor(Date.now() / 1e3);
|
|
9248
|
-
const startTime = now + START_TIME_BUFFER_SECS;
|
|
9249
11042
|
const endTime = now + durationSeconds;
|
|
11043
|
+
const chainId = getChainId(config);
|
|
9250
11044
|
const counter = (await contract.get_counter(account.address)).toString();
|
|
9251
11045
|
const royaltyMaxBps = await resolveRoyaltyMaxBps(provider, nftContract, tokenId, params.royaltyMaxBps);
|
|
9252
|
-
const
|
|
9253
|
-
|
|
9254
|
-
|
|
9255
|
-
|
|
9256
|
-
|
|
9257
|
-
|
|
9258
|
-
|
|
9259
|
-
|
|
9260
|
-
|
|
9261
|
-
|
|
9262
|
-
|
|
9263
|
-
|
|
9264
|
-
|
|
11046
|
+
const orderParams = {
|
|
11047
|
+
offerer: account.address,
|
|
11048
|
+
marketplace: config.marketplace1155Contract,
|
|
11049
|
+
offer: {
|
|
11050
|
+
item_type: "ERC1155",
|
|
11051
|
+
token: nftContract,
|
|
11052
|
+
identifier_or_criteria: tokenId,
|
|
11053
|
+
amount
|
|
11054
|
+
// ERC-1155 leg amount = unit quantity
|
|
11055
|
+
},
|
|
11056
|
+
consideration: {
|
|
11057
|
+
item_type: "ERC20",
|
|
11058
|
+
token: token.address,
|
|
11059
|
+
identifier_or_criteria: "0",
|
|
11060
|
+
amount: priceWei,
|
|
11061
|
+
// payment leg amount = price PER UNIT
|
|
11062
|
+
recipient: account.address
|
|
9265
11063
|
},
|
|
9266
|
-
|
|
11064
|
+
royalty_max_bps: royaltyMaxBps,
|
|
11065
|
+
start_time: (now + START_TIME_BUFFER_SECS).toString(),
|
|
11066
|
+
end_time: endTime.toString(),
|
|
11067
|
+
salt: generateSalt(),
|
|
11068
|
+
counter
|
|
11069
|
+
};
|
|
11070
|
+
const typedData = stringifyBigInts(
|
|
11071
|
+
build1155OrderTypedData(orderParams, chainId)
|
|
9267
11072
|
);
|
|
9268
|
-
const
|
|
11073
|
+
const signature = await account.signMessage(typedData);
|
|
11074
|
+
const signatureArray = toSignatureArray(signature);
|
|
11075
|
+
const orderPayload = stringifyBigInts({
|
|
11076
|
+
parameters: {
|
|
11077
|
+
...orderParams,
|
|
11078
|
+
offer: {
|
|
11079
|
+
...orderParams.offer,
|
|
11080
|
+
item_type: starknet.shortString.encodeShortString(orderParams.offer.item_type)
|
|
11081
|
+
},
|
|
11082
|
+
consideration: {
|
|
11083
|
+
...orderParams.consideration,
|
|
11084
|
+
item_type: starknet.shortString.encodeShortString(orderParams.consideration.item_type)
|
|
11085
|
+
}
|
|
11086
|
+
},
|
|
11087
|
+
signature: signatureArray
|
|
11088
|
+
});
|
|
9269
11089
|
let isApproved = false;
|
|
9270
11090
|
try {
|
|
9271
11091
|
const result = await provider.callContract({
|
|
@@ -9276,15 +11096,15 @@ async function createListing1155(account, params, config) {
|
|
|
9276
11096
|
isApproved = BigInt(result[0]) === 1n;
|
|
9277
11097
|
} catch {
|
|
9278
11098
|
}
|
|
9279
|
-
const
|
|
9280
|
-
|
|
9281
|
-
|
|
9282
|
-
|
|
9283
|
-
|
|
9284
|
-
|
|
9285
|
-
|
|
9286
|
-
|
|
9287
|
-
|
|
11099
|
+
const registerCall = contract.populate("register_order", [orderPayload]);
|
|
11100
|
+
const calls = isApproved ? [registerCall] : [
|
|
11101
|
+
{
|
|
11102
|
+
contractAddress: nftContract,
|
|
11103
|
+
entrypoint: "set_approval_for_all",
|
|
11104
|
+
calldata: [config.marketplace1155Contract, "1"]
|
|
11105
|
+
},
|
|
11106
|
+
registerCall
|
|
11107
|
+
];
|
|
9288
11108
|
try {
|
|
9289
11109
|
const tx = await account.execute(calls);
|
|
9290
11110
|
await provider.waitForTransaction(tx.transaction_hash);
|
|
@@ -9295,10 +11115,21 @@ async function createListing1155(account, params, config) {
|
|
|
9295
11115
|
}
|
|
9296
11116
|
async function fulfillOrder1155(account, params, config) {
|
|
9297
11117
|
const { orderHash, paymentToken, totalPrice, quantity = "1" } = params;
|
|
11118
|
+
const contract = getContract(config);
|
|
9298
11119
|
const provider = getProvider(config);
|
|
9299
|
-
const
|
|
11120
|
+
const totalPriceU256 = starknet.cairo.uint256(totalPrice);
|
|
11121
|
+
const approveCall = {
|
|
11122
|
+
contractAddress: paymentToken,
|
|
11123
|
+
entrypoint: "approve",
|
|
11124
|
+
calldata: [
|
|
11125
|
+
config.marketplace1155Contract,
|
|
11126
|
+
totalPriceU256.low.toString(),
|
|
11127
|
+
totalPriceU256.high.toString()
|
|
11128
|
+
]
|
|
11129
|
+
};
|
|
11130
|
+
const fulfillCall = contract.populate("fulfill_order", [orderHash, quantity]);
|
|
9300
11131
|
try {
|
|
9301
|
-
const tx = await account.execute(
|
|
11132
|
+
const tx = await account.execute([approveCall, fulfillCall]);
|
|
9302
11133
|
await provider.waitForTransaction(tx.transaction_hash);
|
|
9303
11134
|
return { txHash: tx.transaction_hash };
|
|
9304
11135
|
} catch (err) {
|
|
@@ -9307,12 +11138,25 @@ async function fulfillOrder1155(account, params, config) {
|
|
|
9307
11138
|
}
|
|
9308
11139
|
async function cancelOrder1155(account, params, config) {
|
|
9309
11140
|
const { orderHash } = params;
|
|
11141
|
+
const contract = getContract(config);
|
|
9310
11142
|
const provider = getProvider(config);
|
|
9311
|
-
const
|
|
9312
|
-
const
|
|
9313
|
-
|
|
11143
|
+
const chainId = getChainId(config);
|
|
11144
|
+
const cancelParams = {
|
|
11145
|
+
order_hash: orderHash,
|
|
11146
|
+
offerer: account.address
|
|
11147
|
+
};
|
|
11148
|
+
const typedData = stringifyBigInts(
|
|
11149
|
+
build1155CancellationTypedData(cancelParams, chainId)
|
|
11150
|
+
);
|
|
11151
|
+
const signature = await account.signMessage(typedData);
|
|
11152
|
+
const signatureArray = toSignatureArray(signature);
|
|
11153
|
+
const cancelPayload = stringifyBigInts({
|
|
11154
|
+
cancelation: cancelParams,
|
|
11155
|
+
signature: signatureArray
|
|
11156
|
+
});
|
|
11157
|
+
const cancelCall = contract.populate("cancel_order", [cancelPayload]);
|
|
9314
11158
|
try {
|
|
9315
|
-
const tx = await account.execute(
|
|
11159
|
+
const tx = await account.execute(cancelCall);
|
|
9316
11160
|
await provider.waitForTransaction(tx.transaction_hash);
|
|
9317
11161
|
return { txHash: tx.transaction_hash };
|
|
9318
11162
|
} catch (err) {
|
|
@@ -9330,30 +11174,56 @@ async function makeOffer1155(account, params, config) {
|
|
|
9330
11174
|
} = params;
|
|
9331
11175
|
const contract = getContract(config);
|
|
9332
11176
|
const provider = getProvider(config);
|
|
11177
|
+
const chainId = getChainId(config);
|
|
9333
11178
|
const token = resolveToken(currency);
|
|
9334
11179
|
const priceWei = parseAmount(price, token.decimals);
|
|
9335
11180
|
const now = Math.floor(Date.now() / 1e3);
|
|
9336
|
-
const startTime = now + START_TIME_BUFFER_SECS;
|
|
9337
11181
|
const endTime = now + durationSeconds;
|
|
9338
11182
|
const counter = (await contract.get_counter(account.address)).toString();
|
|
9339
11183
|
const royaltyMaxBps = await resolveRoyaltyMaxBps(provider, nftContract, tokenId, params.royaltyMaxBps);
|
|
9340
|
-
const
|
|
9341
|
-
|
|
9342
|
-
|
|
9343
|
-
|
|
9344
|
-
|
|
9345
|
-
|
|
9346
|
-
|
|
9347
|
-
|
|
9348
|
-
|
|
9349
|
-
|
|
9350
|
-
|
|
9351
|
-
|
|
9352
|
-
|
|
11184
|
+
const orderParams = {
|
|
11185
|
+
offerer: account.address,
|
|
11186
|
+
marketplace: config.marketplace1155Contract,
|
|
11187
|
+
offer: {
|
|
11188
|
+
item_type: "ERC20",
|
|
11189
|
+
token: token.address,
|
|
11190
|
+
identifier_or_criteria: "0",
|
|
11191
|
+
amount: priceWei
|
|
11192
|
+
// price PER UNIT
|
|
11193
|
+
},
|
|
11194
|
+
consideration: {
|
|
11195
|
+
item_type: "ERC1155",
|
|
11196
|
+
token: nftContract,
|
|
11197
|
+
identifier_or_criteria: tokenId,
|
|
11198
|
+
amount,
|
|
11199
|
+
// unit quantity
|
|
11200
|
+
recipient: account.address
|
|
9353
11201
|
},
|
|
9354
|
-
|
|
11202
|
+
royalty_max_bps: royaltyMaxBps,
|
|
11203
|
+
start_time: (now + START_TIME_BUFFER_SECS).toString(),
|
|
11204
|
+
end_time: endTime.toString(),
|
|
11205
|
+
salt: generateSalt(),
|
|
11206
|
+
counter
|
|
11207
|
+
};
|
|
11208
|
+
const typedData = stringifyBigInts(
|
|
11209
|
+
build1155OrderTypedData(orderParams, chainId)
|
|
9355
11210
|
);
|
|
9356
|
-
const
|
|
11211
|
+
const signature = await account.signMessage(typedData);
|
|
11212
|
+
const signatureArray = toSignatureArray(signature);
|
|
11213
|
+
const registerPayload = stringifyBigInts({
|
|
11214
|
+
parameters: {
|
|
11215
|
+
...orderParams,
|
|
11216
|
+
offer: {
|
|
11217
|
+
...orderParams.offer,
|
|
11218
|
+
item_type: starknet.shortString.encodeShortString(orderParams.offer.item_type)
|
|
11219
|
+
},
|
|
11220
|
+
consideration: {
|
|
11221
|
+
...orderParams.consideration,
|
|
11222
|
+
item_type: starknet.shortString.encodeShortString(orderParams.consideration.item_type)
|
|
11223
|
+
}
|
|
11224
|
+
},
|
|
11225
|
+
signature: signatureArray
|
|
11226
|
+
});
|
|
9357
11227
|
const totalWei = BigInt(priceWei) * BigInt(amount);
|
|
9358
11228
|
const amountU256 = starknet.cairo.uint256(totalWei.toString());
|
|
9359
11229
|
const approveCall = {
|
|
@@ -9365,12 +11235,9 @@ async function makeOffer1155(account, params, config) {
|
|
|
9365
11235
|
amountU256.high.toString()
|
|
9366
11236
|
]
|
|
9367
11237
|
};
|
|
9368
|
-
const
|
|
9369
|
-
{ orderParams, signature: signatureArray, approvalNeeded: true, approve: approveCall },
|
|
9370
|
-
config
|
|
9371
|
-
);
|
|
11238
|
+
const registerCall = contract.populate("register_order", [registerPayload]);
|
|
9372
11239
|
try {
|
|
9373
|
-
const tx = await account.execute(
|
|
11240
|
+
const tx = await account.execute([approveCall, registerCall]);
|
|
9374
11241
|
await provider.waitForTransaction(tx.transaction_hash);
|
|
9375
11242
|
return { txHash: tx.transaction_hash };
|
|
9376
11243
|
} catch (err) {
|
|
@@ -10693,16 +12560,72 @@ var TicketService = class {
|
|
|
10693
12560
|
};
|
|
10694
12561
|
var ClubService = class {
|
|
10695
12562
|
constructor(config) {
|
|
10696
|
-
|
|
12563
|
+
const coords = getStarknetCoordinates(config.chain);
|
|
12564
|
+
this.registryAddress = coords.ipClubRegistry;
|
|
12565
|
+
this.factoryAddress = coords.ipClubFactory;
|
|
10697
12566
|
}
|
|
10698
12567
|
_registry(account, registryAddress) {
|
|
10699
12568
|
const address = registryAddress ?? this.registryAddress;
|
|
10700
|
-
if (!address)
|
|
10701
|
-
throw new Error("IP-Club registry address not configured for this chain");
|
|
10702
|
-
}
|
|
12569
|
+
if (!address) throw new Error("IP-Club registry address not configured for this chain");
|
|
10703
12570
|
return new starknet.Contract(IPClubABI, normalizeAddress("STARKNET", address), account);
|
|
10704
12571
|
}
|
|
10705
|
-
|
|
12572
|
+
_factory(account, factoryAddress) {
|
|
12573
|
+
const address = factoryAddress ?? this.factoryAddress;
|
|
12574
|
+
if (!address) throw new Error("IP-Club factory address not configured for this chain");
|
|
12575
|
+
return new starknet.Contract(IPClubFactoryABI, normalizeAddress("STARKNET", address), account);
|
|
12576
|
+
}
|
|
12577
|
+
_collection(account, collectionAddress) {
|
|
12578
|
+
return new starknet.Contract(IPClubCollectionABI, normalizeAddress("STARKNET", collectionAddress), account);
|
|
12579
|
+
}
|
|
12580
|
+
/** Deploy a new per-creator membership ERC-721 collection via the factory. */
|
|
12581
|
+
async deployClub(account, params) {
|
|
12582
|
+
const maxSupply = starknet.cairo.uint256(params.maxSupply ?? 0xffffffffffffffffn);
|
|
12583
|
+
const entryFee = starknet.cairo.uint256(params.entryFee ?? 0n);
|
|
12584
|
+
const paymentToken = params.paymentToken ? new starknet.CairoOption(starknet.CairoOptionVariant.Some, params.paymentToken) : new starknet.CairoOption(starknet.CairoOptionVariant.None);
|
|
12585
|
+
const royaltyBps = starknet.cairo.uint256(params.royaltyBps ?? 0n);
|
|
12586
|
+
const call = this._factory(account, params.factoryAddress).populate("deploy_club", [
|
|
12587
|
+
params.name,
|
|
12588
|
+
params.symbol,
|
|
12589
|
+
params.baseUri,
|
|
12590
|
+
maxSupply,
|
|
12591
|
+
entryFee,
|
|
12592
|
+
paymentToken,
|
|
12593
|
+
royaltyBps
|
|
12594
|
+
]);
|
|
12595
|
+
const res = await account.execute([call]);
|
|
12596
|
+
return { txHash: res.transaction_hash };
|
|
12597
|
+
}
|
|
12598
|
+
/** Owner-only — pause or resume new mints on a club collection. */
|
|
12599
|
+
async setOpen(account, params) {
|
|
12600
|
+
const call = this._collection(account, params.collectionAddress).populate("set_open", [params.open]);
|
|
12601
|
+
const res = await account.execute([call]);
|
|
12602
|
+
return { txHash: res.transaction_hash };
|
|
12603
|
+
}
|
|
12604
|
+
/** Public mint — caller pays entry fee (if any) and receives the membership NFT. */
|
|
12605
|
+
async mintMembership(account, params) {
|
|
12606
|
+
const calls = [];
|
|
12607
|
+
if (params.entryFee && params.paymentToken && BigInt(params.entryFee) > 0n) {
|
|
12608
|
+
const amount = starknet.cairo.uint256(params.entryFee);
|
|
12609
|
+
calls.push({
|
|
12610
|
+
contractAddress: params.paymentToken,
|
|
12611
|
+
entrypoint: "approve",
|
|
12612
|
+
calldata: [
|
|
12613
|
+
normalizeAddress("STARKNET", params.collectionAddress),
|
|
12614
|
+
amount.low.toString(),
|
|
12615
|
+
amount.high.toString()
|
|
12616
|
+
]
|
|
12617
|
+
});
|
|
12618
|
+
}
|
|
12619
|
+
calls.push(
|
|
12620
|
+
this._collection(account, params.collectionAddress).populate("mint", [
|
|
12621
|
+
params.to ?? account.address
|
|
12622
|
+
])
|
|
12623
|
+
);
|
|
12624
|
+
const res = await account.execute(calls);
|
|
12625
|
+
return { txHash: res.transaction_hash };
|
|
12626
|
+
}
|
|
12627
|
+
// ── Legacy registry methods (retained for backward compatibility) ──────────────
|
|
12628
|
+
/** @deprecated Use deployClub — the factory pattern replaced the registry. */
|
|
10706
12629
|
async createClub(account, params) {
|
|
10707
12630
|
const maxMembers = params.maxMembers != null ? new starknet.CairoOption(starknet.CairoOptionVariant.Some, params.maxMembers) : new starknet.CairoOption(starknet.CairoOptionVariant.None);
|
|
10708
12631
|
const entryFee = params.entryFee != null ? new starknet.CairoOption(starknet.CairoOptionVariant.Some, starknet.cairo.uint256(params.entryFee)) : new starknet.CairoOption(starknet.CairoOptionVariant.None);
|
|
@@ -10718,7 +12641,7 @@ var ClubService = class {
|
|
|
10718
12641
|
const res = await account.execute([call]);
|
|
10719
12642
|
return { txHash: res.transaction_hash };
|
|
10720
12643
|
}
|
|
10721
|
-
/**
|
|
12644
|
+
/** @deprecated Legacy registry — use factory-deployed collection methods. */
|
|
10722
12645
|
async setClubOpen(account, params) {
|
|
10723
12646
|
const call = this._registry(account, params.registryAddress).populate("set_club_open", [
|
|
10724
12647
|
starknet.cairo.uint256(params.clubId),
|
|
@@ -10727,12 +12650,10 @@ var ClubService = class {
|
|
|
10727
12650
|
const res = await account.execute([call]);
|
|
10728
12651
|
return { txHash: res.transaction_hash };
|
|
10729
12652
|
}
|
|
10730
|
-
/**
|
|
12653
|
+
/** @deprecated Legacy registry — use mintMembership with factory-deployed collections. */
|
|
10731
12654
|
async joinClub(account, params) {
|
|
10732
12655
|
const registryAddress = params.registryAddress ?? this.registryAddress;
|
|
10733
|
-
if (!registryAddress)
|
|
10734
|
-
throw new Error("IP-Club registry address not configured for this chain");
|
|
10735
|
-
}
|
|
12656
|
+
if (!registryAddress) throw new Error("IP-Club registry address not configured for this chain");
|
|
10736
12657
|
const calls = [];
|
|
10737
12658
|
if (params.paymentToken && params.entryFee && BigInt(params.entryFee) > 0n) {
|
|
10738
12659
|
const amount = starknet.cairo.uint256(params.entryFee);
|
|
@@ -10746,7 +12667,7 @@ var ClubService = class {
|
|
|
10746
12667
|
const res = await account.execute(calls);
|
|
10747
12668
|
return { txHash: res.transaction_hash };
|
|
10748
12669
|
}
|
|
10749
|
-
/**
|
|
12670
|
+
/** @deprecated Legacy registry — use factory-deployed collection burn. */
|
|
10750
12671
|
async leaveClub(account, params) {
|
|
10751
12672
|
const call = this._registry(account, params.registryAddress).populate("leave_club", [
|
|
10752
12673
|
starknet.cairo.uint256(params.clubId),
|
|
@@ -10916,147 +12837,94 @@ var StarknetVenue = class {
|
|
|
10916
12837
|
constructor(deps) {
|
|
10917
12838
|
this.deps = deps;
|
|
10918
12839
|
this.chain = "STARKNET";
|
|
12840
|
+
this.m721 = new MarketplaceModule(deps.config);
|
|
12841
|
+
this.m1155 = new Medialane1155Module(deps.config);
|
|
10919
12842
|
}
|
|
10920
|
-
|
|
10921
|
-
return
|
|
10922
|
-
{ contractAddress: this.deps.config.marketplaceContract, entrypoint: "increment_counter", calldata: [] }
|
|
10923
|
-
]);
|
|
12843
|
+
incrementCounter(signer) {
|
|
12844
|
+
return this.m721.incrementCounter(signer);
|
|
10924
12845
|
}
|
|
10925
12846
|
getOrderDetails(orderRef) {
|
|
10926
|
-
return getOrderDetails(orderRef
|
|
12847
|
+
return this.m721.getOrderDetails(orderRef);
|
|
10927
12848
|
}
|
|
10928
|
-
|
|
10929
|
-
return this.
|
|
12849
|
+
getCounter(address) {
|
|
12850
|
+
return this.m721.getCounter(address);
|
|
10930
12851
|
}
|
|
10931
12852
|
async fulfillOrder(signer, orderRef, opts) {
|
|
10932
12853
|
const o = await this.deps.resolveOrder(orderRef);
|
|
10933
12854
|
const quantity = opts?.quantity ?? "1";
|
|
10934
12855
|
const totalPrice = (BigInt(o.unitPrice) * BigInt(quantity)).toString();
|
|
10935
|
-
|
|
10936
|
-
|
|
12856
|
+
if (o.standard === "ERC1155") {
|
|
12857
|
+
return this.m1155.fulfillOrder(signer, {
|
|
12858
|
+
orderHash: orderRef,
|
|
12859
|
+
paymentToken: o.paymentToken,
|
|
12860
|
+
totalPrice,
|
|
12861
|
+
quantity
|
|
12862
|
+
});
|
|
12863
|
+
}
|
|
12864
|
+
return this.m721.fulfillOrder(signer, {
|
|
12865
|
+
orderHash: orderRef,
|
|
12866
|
+
paymentToken: o.paymentToken,
|
|
12867
|
+
totalPrice
|
|
12868
|
+
});
|
|
10937
12869
|
}
|
|
10938
12870
|
async cancelOrder(signer, orderRef) {
|
|
10939
12871
|
const o = await this.deps.resolveOrder(orderRef);
|
|
10940
|
-
|
|
10941
|
-
|
|
10942
|
-
|
|
10943
|
-
return
|
|
12872
|
+
if (o.standard === "ERC1155") {
|
|
12873
|
+
return this.m1155.cancelOrder(signer, { orderHash: orderRef });
|
|
12874
|
+
}
|
|
12875
|
+
return this.m721.cancelOrder(signer, { orderHash: orderRef });
|
|
10944
12876
|
}
|
|
10945
12877
|
async registerOrder(signer, p) {
|
|
10946
12878
|
const standard = await this.deps.resolveStandard(p.asset.contract);
|
|
10947
|
-
const
|
|
12879
|
+
const token = resolveToken(p.paymentToken);
|
|
12880
|
+
const humanPrice = formatAmount(p.amount, token.decimals);
|
|
12881
|
+
const durationSeconds = this.durationSeconds(p.endTime);
|
|
10948
12882
|
const royaltyMaxBps = String(p.royaltyMaxBps);
|
|
10949
|
-
const startTime = Math.floor(Date.now() / 1e3) + START_TIME_BUFFER_SECS;
|
|
10950
|
-
const endTime = p.endTime && p.endTime > 0 ? p.endTime : startTime + NO_EXPIRY_SECONDS;
|
|
10951
12883
|
const quantity = p.quantity ?? "1";
|
|
10952
|
-
|
|
10953
|
-
const counter = String(await this.readCounter(marketplace, signer.address));
|
|
10954
|
-
let typedData;
|
|
10955
|
-
let buildCalls;
|
|
12884
|
+
let txHash;
|
|
10956
12885
|
if (standard === "ERC1155") {
|
|
10957
|
-
|
|
10958
|
-
{
|
|
10959
|
-
offerer: signer.address,
|
|
12886
|
+
if (p.side === "listing") {
|
|
12887
|
+
const res = await this.m1155.createListing(signer, {
|
|
10960
12888
|
nftContract: p.asset.contract,
|
|
10961
12889
|
tokenId: p.asset.tokenId,
|
|
10962
|
-
quantity,
|
|
10963
|
-
|
|
10964
|
-
|
|
10965
|
-
|
|
10966
|
-
|
|
10967
|
-
|
|
10968
|
-
|
|
10969
|
-
|
|
10970
|
-
|
|
10971
|
-
this.
|
|
10972
|
-
);
|
|
10973
|
-
typedData = built.typedData;
|
|
10974
|
-
const approval = p.side === "listing" ? await this.approval1155ForListing(signer.address, p.asset.contract) : this.approvalForErc20(paymentTokenAddress, (BigInt(p.amount) * BigInt(quantity)).toString(), marketplace);
|
|
10975
|
-
buildCalls = (sig) => buildRegister1155Calls({ orderParams: built.orderParams, signature: sig, ...approval }, this.deps.config);
|
|
10976
|
-
} else {
|
|
10977
|
-
const built = (p.side === "listing" ? buildListingOrder : buildOfferOrder)(
|
|
10978
|
-
{
|
|
10979
|
-
offerer: signer.address,
|
|
12890
|
+
amount: quantity,
|
|
12891
|
+
pricePerUnit: humanPrice,
|
|
12892
|
+
currency: p.paymentToken,
|
|
12893
|
+
durationSeconds,
|
|
12894
|
+
royaltyMaxBps
|
|
12895
|
+
});
|
|
12896
|
+
txHash = res.txHash;
|
|
12897
|
+
} else {
|
|
12898
|
+
const totalHuman = formatAmount((BigInt(p.amount) * BigInt(quantity)).toString(), token.decimals);
|
|
12899
|
+
const res = await this.m1155.makeOffer(signer, {
|
|
10980
12900
|
nftContract: p.asset.contract,
|
|
10981
12901
|
tokenId: p.asset.tokenId,
|
|
10982
|
-
|
|
10983
|
-
|
|
10984
|
-
|
|
10985
|
-
|
|
10986
|
-
|
|
10987
|
-
|
|
10988
|
-
|
|
10989
|
-
|
|
10990
|
-
|
|
10991
|
-
|
|
10992
|
-
|
|
10993
|
-
|
|
10994
|
-
|
|
12902
|
+
amount: quantity,
|
|
12903
|
+
price: totalHuman,
|
|
12904
|
+
currency: p.paymentToken,
|
|
12905
|
+
durationSeconds,
|
|
12906
|
+
royaltyMaxBps
|
|
12907
|
+
});
|
|
12908
|
+
txHash = res.txHash;
|
|
12909
|
+
}
|
|
12910
|
+
} else {
|
|
12911
|
+
const params = {
|
|
12912
|
+
nftContract: p.asset.contract,
|
|
12913
|
+
tokenId: p.asset.tokenId,
|
|
12914
|
+
price: humanPrice,
|
|
12915
|
+
currency: p.paymentToken,
|
|
12916
|
+
durationSeconds,
|
|
12917
|
+
royaltyMaxBps
|
|
12918
|
+
};
|
|
12919
|
+
const res = p.side === "listing" ? await this.m721.createListing(signer, params) : await this.m721.makeOffer(signer, params);
|
|
12920
|
+
txHash = res.txHash;
|
|
10995
12921
|
}
|
|
10996
|
-
const signature = await signer.signTypedData(typedData);
|
|
10997
|
-
const { txHash } = await signer.execute(buildCalls(signature));
|
|
10998
12922
|
const orderRef = await this.orderRefFromReceipt(txHash);
|
|
10999
12923
|
return { txHash, orderRef };
|
|
11000
12924
|
}
|
|
11001
|
-
|
|
11002
|
-
|
|
11003
|
-
|
|
11004
|
-
contractAddress: marketplace,
|
|
11005
|
-
entrypoint: "get_counter",
|
|
11006
|
-
calldata: [address]
|
|
11007
|
-
});
|
|
11008
|
-
return BigInt(res[0] ?? "0");
|
|
11009
|
-
}
|
|
11010
|
-
/** 721 listing approval: `get_approved(tokenId) == marketplace` ⇒ no approve. */
|
|
11011
|
-
async approval721ForListing(_owner, nftContract, tokenId) {
|
|
11012
|
-
const id = starknet.cairo.uint256(tokenId);
|
|
11013
|
-
const approve = {
|
|
11014
|
-
contractAddress: nftContract,
|
|
11015
|
-
entrypoint: "approve",
|
|
11016
|
-
calldata: [this.deps.config.marketplaceContract, id.low.toString(), id.high.toString()]
|
|
11017
|
-
};
|
|
11018
|
-
let approved = false;
|
|
11019
|
-
try {
|
|
11020
|
-
const res = await this.deps.provider.callContract({
|
|
11021
|
-
contractAddress: nftContract,
|
|
11022
|
-
entrypoint: "get_approved",
|
|
11023
|
-
calldata: [id.low.toString(), id.high.toString()]
|
|
11024
|
-
});
|
|
11025
|
-
approved = BigInt(res[0]).toString() === BigInt(this.deps.config.marketplaceContract).toString();
|
|
11026
|
-
} catch {
|
|
11027
|
-
}
|
|
11028
|
-
return { approvalNeeded: !approved, approve };
|
|
11029
|
-
}
|
|
11030
|
-
/** 1155 listing approval: `is_approved_for_all(owner, marketplace)`. */
|
|
11031
|
-
async approval1155ForListing(owner, nftContract) {
|
|
11032
|
-
const approve = {
|
|
11033
|
-
contractAddress: nftContract,
|
|
11034
|
-
entrypoint: "set_approval_for_all",
|
|
11035
|
-
calldata: [this.deps.config.marketplace1155Contract, "1"]
|
|
11036
|
-
};
|
|
11037
|
-
let approved = false;
|
|
11038
|
-
try {
|
|
11039
|
-
const res = await this.deps.provider.callContract({
|
|
11040
|
-
contractAddress: nftContract,
|
|
11041
|
-
entrypoint: "is_approved_for_all",
|
|
11042
|
-
calldata: [owner, this.deps.config.marketplace1155Contract]
|
|
11043
|
-
});
|
|
11044
|
-
approved = BigInt(res[0]) === 1n;
|
|
11045
|
-
} catch {
|
|
11046
|
-
}
|
|
11047
|
-
return { approvalNeeded: !approved, approve };
|
|
11048
|
-
}
|
|
11049
|
-
/** Offers always approve the ERC-20 spend (no read). */
|
|
11050
|
-
approvalForErc20(token, amountWei, marketplace) {
|
|
11051
|
-
const u = starknet.cairo.uint256(amountWei);
|
|
11052
|
-
return {
|
|
11053
|
-
approvalNeeded: true,
|
|
11054
|
-
approve: {
|
|
11055
|
-
contractAddress: token,
|
|
11056
|
-
entrypoint: "approve",
|
|
11057
|
-
calldata: [marketplace, u.low.toString(), u.high.toString()]
|
|
11058
|
-
}
|
|
11059
|
-
};
|
|
12925
|
+
durationSeconds(endTime) {
|
|
12926
|
+
if (!endTime) return NO_EXPIRY_SECONDS;
|
|
12927
|
+
return Math.max(1, endTime - Math.floor(Date.now() / 1e3));
|
|
11060
12928
|
}
|
|
11061
12929
|
/** The canonical Starknet order id = the contract-emitted `OrderCreated`
|
|
11062
12930
|
* hash (`keys[1]`), which is exactly what the indexer stores. */
|
|
@@ -11342,6 +13210,8 @@ exports.DropFactoryABI = DropFactoryABI;
|
|
|
11342
13210
|
exports.DropService = DropService;
|
|
11343
13211
|
exports.ERC1155CollectionService = ERC1155CollectionService;
|
|
11344
13212
|
exports.IPClubABI = IPClubABI;
|
|
13213
|
+
exports.IPClubCollectionABI = IPClubCollectionABI;
|
|
13214
|
+
exports.IPClubFactoryABI = IPClubFactoryABI;
|
|
11345
13215
|
exports.IPClubNFTABI = IPClubNFTABI;
|
|
11346
13216
|
exports.IPCollection1155ABI = IPCollection1155ABI;
|
|
11347
13217
|
exports.IPCollection1155FactoryABI = IPCollection1155FactoryABI;
|
|
@@ -11350,6 +13220,7 @@ exports.IPGenesisABI = IPGenesisABI;
|
|
|
11350
13220
|
exports.IPMarketplaceABI = IPMarketplaceABI;
|
|
11351
13221
|
exports.IPNftABI = IPNftABI;
|
|
11352
13222
|
exports.IPSponsorshipABI = IPSponsorshipABI;
|
|
13223
|
+
exports.IPSponsorshipLicenseABI = IPSponsorshipLicenseABI;
|
|
11353
13224
|
exports.IPTicketCollectionABI = IPTicketCollectionABI;
|
|
11354
13225
|
exports.IPTicketCollectionFactoryABI = IPTicketCollectionFactoryABI;
|
|
11355
13226
|
exports.LAUNCH_PRICE_QUOTE_PER_COIN = LAUNCH_PRICE_QUOTE_PER_COIN;
|