@medialane/sdk 0.67.0 → 0.68.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 +8 -6
- 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 +8 -6
- package/dist/evm/index.js.map +1 -1
- package/dist/{index-C2EaTkzk.d.cts → index-BZ9ALq55.d.ts} +553 -472
- package/dist/{index-DjJ4k6p_.d.ts → index-ET8dURD-.d.cts} +553 -472
- package/dist/index.cjs +757 -681
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +23 -18
- package/dist/index.d.ts +23 -18
- package/dist/index.js +757 -680
- package/dist/index.js.map +1 -1
- package/dist/solana/index.cjs +8 -6
- 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 +8 -6
- package/dist/solana/index.js.map +1 -1
- package/dist/starknet/index.cjs +712 -646
- package/dist/starknet/index.cjs.map +1 -1
- package/dist/starknet/index.d.cts +2 -2
- package/dist/starknet/index.d.ts +2 -2
- package/dist/starknet/index.js +713 -646
- package/dist/starknet/index.js.map +1 -1
- package/dist/stellar/index.cjs +8 -6
- 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 +8 -6
- package/dist/stellar/index.js.map +1 -1
- package/dist/{types-CIR6H6ul.d.cts → types-2x30q_6p.d.cts} +1 -1
- package/dist/{types-CIR6H6ul.d.ts → types-2x30q_6p.d.ts} +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -46,12 +46,14 @@ var COORDINATES = {
|
|
|
46
46
|
ipClubFactoryClassHash: "0x07197062578375d962b2d42d3e91560770b11b1c97a9defb74c706a2c5299473",
|
|
47
47
|
ipClubCollectionClassHash: "0x35b8836a2269523ae9176077ec525451cce1053b2acd9fae3b05354aa4eded3",
|
|
48
48
|
ipClubFactoryStartBlock: 11884796,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
//
|
|
52
|
-
//
|
|
53
|
-
//
|
|
54
|
-
|
|
49
|
+
// v3 redesign (deployed 2026-07-15): single contract is both the
|
|
50
|
+
// offer/bid/proposal registry and the license collection (embeds
|
|
51
|
+
// ERC721Component directly) — no separate receipt contract, no
|
|
52
|
+
// set_minter bootstrap. Supersedes the 2026-07-02 v2 address, which had
|
|
53
|
+
// zero offers/licenses ever issued (clean cutover, no reclassification).
|
|
54
|
+
ipSponsorship: "0x03729ebe0fedf29ec97fca34db09174772af7f870af26a26e024a61040143e5c",
|
|
55
|
+
ipSponsorshipClassHash: "0x0626daac2ed7e2bf630ef5b10104b3202db1559216c0c1a504c0e99be2fbfec3",
|
|
56
|
+
ipSponsorshipStartBlock: 11896456
|
|
55
57
|
}
|
|
56
58
|
};
|
|
57
59
|
function getCoordinates(chain) {
|
|
@@ -897,7 +899,7 @@ var STARKNET_IP_CLUB_NFT_CLASS_HASH = SN.ipClubNftClassHash;
|
|
|
897
899
|
var STARKNET_IP_CLUB_FACTORY_CONTRACT = SN.ipClubFactory;
|
|
898
900
|
var STARKNET_IP_CLUB_COLLECTION_CLASS_HASH = SN.ipClubCollectionClassHash;
|
|
899
901
|
var STARKNET_IP_SPONSORSHIP_CONTRACT = SN.ipSponsorship;
|
|
900
|
-
var
|
|
902
|
+
var STARKNET_IP_SPONSORSHIP_CLASS_HASH = SN.ipSponsorshipClassHash;
|
|
901
903
|
var STARKNET_CREATOR_COIN_FACTORY_CONTRACT = SN.creatorCoinFactory;
|
|
902
904
|
var STARKNET_CREATOR_COIN_EKUBO_LAUNCHER = SN.creatorCoinEkuboLauncher;
|
|
903
905
|
var STARKNET_CREATOR_COIN_CLASS_HASH = SN.creatorCoinClassHash;
|
|
@@ -1076,18 +1078,28 @@ var SERVICES = {
|
|
|
1076
1078
|
description: "Sponsorship offers and licenses anchored to an existing Medialane asset.",
|
|
1077
1079
|
standard: "ERC721",
|
|
1078
1080
|
provenance: "MEDIALANE",
|
|
1081
|
+
onchain: {
|
|
1082
|
+
STARKNET: {
|
|
1083
|
+
factoryAddress: SN2.ipSponsorship,
|
|
1084
|
+
classHash: SN2.ipSponsorshipClassHash,
|
|
1085
|
+
startBlock: SN2.ipSponsorshipStartBlock
|
|
1086
|
+
}
|
|
1087
|
+
},
|
|
1079
1088
|
uiVariant: "standard",
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1089
|
+
// v3: one contract is both the offer/bid/proposal registry and the
|
|
1090
|
+
// issued license collection (a real, standard ERC-721 minted internally
|
|
1091
|
+
// — no separate receipt contract). `transfer` reflects that a license is
|
|
1092
|
+
// freely transferable at the protocol layer; transferable/expiry intent
|
|
1093
|
+
// is declarative (carried in metadata + LicenseMinted), never
|
|
1094
|
+
// contract-enforced. Supersedes the 2026-07-02 v2 `ip-sponsorship`
|
|
1095
|
+
// (registry-only) + `ip-sponsorship-license` (non-authoritative receipt
|
|
1096
|
+
// via a dedicated ip-erc721 instance) pair — retired as of this redesign.
|
|
1097
|
+
capabilities: ["sponsor", "transfer"],
|
|
1098
|
+
events: [
|
|
1099
|
+
{ name: "OfferCreated", emittedBy: "factory" },
|
|
1100
|
+
{ name: "ProposalCreated", emittedBy: "factory" },
|
|
1101
|
+
{ name: "LicenseMinted", emittedBy: "factory" }
|
|
1102
|
+
],
|
|
1091
1103
|
metadataSchema: { licenseDefault: "CC BY-SA" }
|
|
1092
1104
|
},
|
|
1093
1105
|
"creator-coin": {
|
|
@@ -9067,8 +9079,26 @@ var IPClubCollectionABI = [
|
|
|
9067
9079
|
var IPSponsorshipABI = [
|
|
9068
9080
|
{
|
|
9069
9081
|
"type": "impl",
|
|
9070
|
-
"name": "
|
|
9071
|
-
"interface_name": "
|
|
9082
|
+
"name": "ERC721MetadataImpl",
|
|
9083
|
+
"interface_name": "openzeppelin_token::erc721::interface::IERC721Metadata"
|
|
9084
|
+
},
|
|
9085
|
+
{
|
|
9086
|
+
"type": "struct",
|
|
9087
|
+
"name": "core::byte_array::ByteArray",
|
|
9088
|
+
"members": [
|
|
9089
|
+
{
|
|
9090
|
+
"name": "data",
|
|
9091
|
+
"type": "core::array::Array::<core::bytes_31::bytes31>"
|
|
9092
|
+
},
|
|
9093
|
+
{
|
|
9094
|
+
"name": "pending_word",
|
|
9095
|
+
"type": "core::felt252"
|
|
9096
|
+
},
|
|
9097
|
+
{
|
|
9098
|
+
"name": "pending_word_len",
|
|
9099
|
+
"type": "core::internal::bounded_int::BoundedInt::<0, 30>"
|
|
9100
|
+
}
|
|
9101
|
+
]
|
|
9072
9102
|
},
|
|
9073
9103
|
{
|
|
9074
9104
|
"type": "struct",
|
|
@@ -9085,23 +9115,81 @@ var IPSponsorshipABI = [
|
|
|
9085
9115
|
]
|
|
9086
9116
|
},
|
|
9087
9117
|
{
|
|
9088
|
-
"type": "
|
|
9089
|
-
"name": "
|
|
9090
|
-
"
|
|
9118
|
+
"type": "interface",
|
|
9119
|
+
"name": "openzeppelin_token::erc721::interface::IERC721Metadata",
|
|
9120
|
+
"items": [
|
|
9091
9121
|
{
|
|
9092
|
-
"
|
|
9093
|
-
"
|
|
9122
|
+
"type": "function",
|
|
9123
|
+
"name": "name",
|
|
9124
|
+
"inputs": [],
|
|
9125
|
+
"outputs": [
|
|
9126
|
+
{
|
|
9127
|
+
"type": "core::byte_array::ByteArray"
|
|
9128
|
+
}
|
|
9129
|
+
],
|
|
9130
|
+
"state_mutability": "view"
|
|
9094
9131
|
},
|
|
9095
9132
|
{
|
|
9096
|
-
"
|
|
9097
|
-
"
|
|
9133
|
+
"type": "function",
|
|
9134
|
+
"name": "symbol",
|
|
9135
|
+
"inputs": [],
|
|
9136
|
+
"outputs": [
|
|
9137
|
+
{
|
|
9138
|
+
"type": "core::byte_array::ByteArray"
|
|
9139
|
+
}
|
|
9140
|
+
],
|
|
9141
|
+
"state_mutability": "view"
|
|
9098
9142
|
},
|
|
9099
9143
|
{
|
|
9100
|
-
"
|
|
9101
|
-
"
|
|
9144
|
+
"type": "function",
|
|
9145
|
+
"name": "token_uri",
|
|
9146
|
+
"inputs": [
|
|
9147
|
+
{
|
|
9148
|
+
"name": "token_id",
|
|
9149
|
+
"type": "core::integer::u256"
|
|
9150
|
+
}
|
|
9151
|
+
],
|
|
9152
|
+
"outputs": [
|
|
9153
|
+
{
|
|
9154
|
+
"type": "core::byte_array::ByteArray"
|
|
9155
|
+
}
|
|
9156
|
+
],
|
|
9157
|
+
"state_mutability": "view"
|
|
9158
|
+
}
|
|
9159
|
+
]
|
|
9160
|
+
},
|
|
9161
|
+
{
|
|
9162
|
+
"type": "impl",
|
|
9163
|
+
"name": "ERC721MetadataCamelOnlyImpl",
|
|
9164
|
+
"interface_name": "openzeppelin_token::erc721::interface::IERC721MetadataCamelOnly"
|
|
9165
|
+
},
|
|
9166
|
+
{
|
|
9167
|
+
"type": "interface",
|
|
9168
|
+
"name": "openzeppelin_token::erc721::interface::IERC721MetadataCamelOnly",
|
|
9169
|
+
"items": [
|
|
9170
|
+
{
|
|
9171
|
+
"type": "function",
|
|
9172
|
+
"name": "tokenURI",
|
|
9173
|
+
"inputs": [
|
|
9174
|
+
{
|
|
9175
|
+
"name": "tokenId",
|
|
9176
|
+
"type": "core::integer::u256"
|
|
9177
|
+
}
|
|
9178
|
+
],
|
|
9179
|
+
"outputs": [
|
|
9180
|
+
{
|
|
9181
|
+
"type": "core::byte_array::ByteArray"
|
|
9182
|
+
}
|
|
9183
|
+
],
|
|
9184
|
+
"state_mutability": "view"
|
|
9102
9185
|
}
|
|
9103
9186
|
]
|
|
9104
9187
|
},
|
|
9188
|
+
{
|
|
9189
|
+
"type": "impl",
|
|
9190
|
+
"name": "IPSponsorshipImpl",
|
|
9191
|
+
"interface_name": "ip_sponsorship::interface::IIPSponsorship"
|
|
9192
|
+
},
|
|
9105
9193
|
{
|
|
9106
9194
|
"type": "enum",
|
|
9107
9195
|
"name": "core::bool",
|
|
@@ -9173,19 +9261,19 @@ var IPSponsorshipABI = [
|
|
|
9173
9261
|
{
|
|
9174
9262
|
"name": "open",
|
|
9175
9263
|
"type": "core::bool"
|
|
9264
|
+
},
|
|
9265
|
+
{
|
|
9266
|
+
"name": "royalty_bps",
|
|
9267
|
+
"type": "core::integer::u256"
|
|
9176
9268
|
}
|
|
9177
9269
|
]
|
|
9178
9270
|
},
|
|
9179
9271
|
{
|
|
9180
9272
|
"type": "struct",
|
|
9181
|
-
"name": "ip_sponsorship::types::
|
|
9273
|
+
"name": "ip_sponsorship::types::SponsorshipProposal",
|
|
9182
9274
|
"members": [
|
|
9183
9275
|
{
|
|
9184
|
-
"name": "
|
|
9185
|
-
"type": "core::starknet::contract_address::ContractAddress"
|
|
9186
|
-
},
|
|
9187
|
-
{
|
|
9188
|
-
"name": "sponsor",
|
|
9276
|
+
"name": "proposer",
|
|
9189
9277
|
"type": "core::starknet::contract_address::ContractAddress"
|
|
9190
9278
|
},
|
|
9191
9279
|
{
|
|
@@ -9197,20 +9285,36 @@ var IPSponsorshipABI = [
|
|
|
9197
9285
|
"type": "core::integer::u256"
|
|
9198
9286
|
},
|
|
9199
9287
|
{
|
|
9200
|
-
"name": "
|
|
9288
|
+
"name": "amount",
|
|
9201
9289
|
"type": "core::integer::u256"
|
|
9202
9290
|
},
|
|
9203
9291
|
{
|
|
9204
|
-
"name": "
|
|
9292
|
+
"name": "duration",
|
|
9205
9293
|
"type": "core::integer::u64"
|
|
9206
9294
|
},
|
|
9207
9295
|
{
|
|
9208
|
-
"name": "
|
|
9209
|
-
"type": "core::
|
|
9296
|
+
"name": "valid_until",
|
|
9297
|
+
"type": "core::integer::u64"
|
|
9298
|
+
},
|
|
9299
|
+
{
|
|
9300
|
+
"name": "payment_token",
|
|
9301
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
9210
9302
|
},
|
|
9211
9303
|
{
|
|
9212
9304
|
"name": "license_terms_uri",
|
|
9213
9305
|
"type": "core::byte_array::ByteArray"
|
|
9306
|
+
},
|
|
9307
|
+
{
|
|
9308
|
+
"name": "transferable",
|
|
9309
|
+
"type": "core::bool"
|
|
9310
|
+
},
|
|
9311
|
+
{
|
|
9312
|
+
"name": "open",
|
|
9313
|
+
"type": "core::bool"
|
|
9314
|
+
},
|
|
9315
|
+
{
|
|
9316
|
+
"name": "royalty_bps",
|
|
9317
|
+
"type": "core::integer::u256"
|
|
9214
9318
|
}
|
|
9215
9319
|
]
|
|
9216
9320
|
},
|
|
@@ -9250,6 +9354,10 @@ var IPSponsorshipABI = [
|
|
|
9250
9354
|
"name": "transferable",
|
|
9251
9355
|
"type": "core::bool"
|
|
9252
9356
|
},
|
|
9357
|
+
{
|
|
9358
|
+
"name": "royalty_bps",
|
|
9359
|
+
"type": "core::integer::u256"
|
|
9360
|
+
},
|
|
9253
9361
|
{
|
|
9254
9362
|
"name": "specific_sponsor",
|
|
9255
9363
|
"type": "core::option::Option::<core::starknet::contract_address::ContractAddress>"
|
|
@@ -9326,22 +9434,6 @@ var IPSponsorshipABI = [
|
|
|
9326
9434
|
],
|
|
9327
9435
|
"state_mutability": "external"
|
|
9328
9436
|
},
|
|
9329
|
-
{
|
|
9330
|
-
"type": "function",
|
|
9331
|
-
"name": "transfer_license",
|
|
9332
|
-
"inputs": [
|
|
9333
|
-
{
|
|
9334
|
-
"name": "license_id",
|
|
9335
|
-
"type": "core::integer::u256"
|
|
9336
|
-
},
|
|
9337
|
-
{
|
|
9338
|
-
"name": "to",
|
|
9339
|
-
"type": "core::starknet::contract_address::ContractAddress"
|
|
9340
|
-
}
|
|
9341
|
-
],
|
|
9342
|
-
"outputs": [],
|
|
9343
|
-
"state_mutability": "external"
|
|
9344
|
-
},
|
|
9345
9437
|
{
|
|
9346
9438
|
"type": "function",
|
|
9347
9439
|
"name": "get_offer",
|
|
@@ -9380,584 +9472,133 @@ var IPSponsorshipABI = [
|
|
|
9380
9472
|
},
|
|
9381
9473
|
{
|
|
9382
9474
|
"type": "function",
|
|
9383
|
-
"name": "
|
|
9384
|
-
"inputs": [
|
|
9475
|
+
"name": "get_last_offer_id",
|
|
9476
|
+
"inputs": [],
|
|
9477
|
+
"outputs": [
|
|
9385
9478
|
{
|
|
9386
|
-
"name": "license_id",
|
|
9387
9479
|
"type": "core::integer::u256"
|
|
9388
9480
|
}
|
|
9389
9481
|
],
|
|
9482
|
+
"state_mutability": "view"
|
|
9483
|
+
},
|
|
9484
|
+
{
|
|
9485
|
+
"type": "function",
|
|
9486
|
+
"name": "get_last_license_id",
|
|
9487
|
+
"inputs": [],
|
|
9390
9488
|
"outputs": [
|
|
9391
9489
|
{
|
|
9392
|
-
"type": "
|
|
9490
|
+
"type": "core::integer::u256"
|
|
9393
9491
|
}
|
|
9394
9492
|
],
|
|
9395
9493
|
"state_mutability": "view"
|
|
9396
9494
|
},
|
|
9397
9495
|
{
|
|
9398
9496
|
"type": "function",
|
|
9399
|
-
"name": "
|
|
9497
|
+
"name": "propose_sponsorship",
|
|
9400
9498
|
"inputs": [
|
|
9401
9499
|
{
|
|
9402
|
-
"name": "
|
|
9500
|
+
"name": "nft_contract",
|
|
9501
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
9502
|
+
},
|
|
9503
|
+
{
|
|
9504
|
+
"name": "token_id",
|
|
9505
|
+
"type": "core::integer::u256"
|
|
9506
|
+
},
|
|
9507
|
+
{
|
|
9508
|
+
"name": "amount",
|
|
9509
|
+
"type": "core::integer::u256"
|
|
9510
|
+
},
|
|
9511
|
+
{
|
|
9512
|
+
"name": "duration",
|
|
9513
|
+
"type": "core::integer::u64"
|
|
9514
|
+
},
|
|
9515
|
+
{
|
|
9516
|
+
"name": "valid_until",
|
|
9517
|
+
"type": "core::integer::u64"
|
|
9518
|
+
},
|
|
9519
|
+
{
|
|
9520
|
+
"name": "payment_token",
|
|
9521
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
9522
|
+
},
|
|
9523
|
+
{
|
|
9524
|
+
"name": "license_terms_uri",
|
|
9525
|
+
"type": "core::byte_array::ByteArray"
|
|
9526
|
+
},
|
|
9527
|
+
{
|
|
9528
|
+
"name": "transferable",
|
|
9529
|
+
"type": "core::bool"
|
|
9530
|
+
},
|
|
9531
|
+
{
|
|
9532
|
+
"name": "royalty_bps",
|
|
9403
9533
|
"type": "core::integer::u256"
|
|
9404
9534
|
}
|
|
9405
9535
|
],
|
|
9406
9536
|
"outputs": [
|
|
9407
9537
|
{
|
|
9408
|
-
"type": "core::
|
|
9538
|
+
"type": "core::integer::u256"
|
|
9409
9539
|
}
|
|
9410
9540
|
],
|
|
9411
|
-
"state_mutability": "
|
|
9541
|
+
"state_mutability": "external"
|
|
9412
9542
|
},
|
|
9413
9543
|
{
|
|
9414
9544
|
"type": "function",
|
|
9415
|
-
"name": "
|
|
9416
|
-
"inputs": [
|
|
9417
|
-
"outputs": [
|
|
9545
|
+
"name": "withdraw_proposal",
|
|
9546
|
+
"inputs": [
|
|
9418
9547
|
{
|
|
9548
|
+
"name": "proposal_id",
|
|
9419
9549
|
"type": "core::integer::u256"
|
|
9420
9550
|
}
|
|
9421
9551
|
],
|
|
9422
|
-
"
|
|
9552
|
+
"outputs": [],
|
|
9553
|
+
"state_mutability": "external"
|
|
9423
9554
|
},
|
|
9424
9555
|
{
|
|
9425
9556
|
"type": "function",
|
|
9426
|
-
"name": "
|
|
9427
|
-
"inputs": [
|
|
9557
|
+
"name": "accept_proposal",
|
|
9558
|
+
"inputs": [
|
|
9559
|
+
{
|
|
9560
|
+
"name": "proposal_id",
|
|
9561
|
+
"type": "core::integer::u256"
|
|
9562
|
+
}
|
|
9563
|
+
],
|
|
9428
9564
|
"outputs": [
|
|
9429
9565
|
{
|
|
9430
9566
|
"type": "core::integer::u256"
|
|
9431
9567
|
}
|
|
9432
9568
|
],
|
|
9433
|
-
"state_mutability": "
|
|
9434
|
-
}
|
|
9435
|
-
]
|
|
9436
|
-
},
|
|
9437
|
-
{
|
|
9438
|
-
"type": "impl",
|
|
9439
|
-
"name": "SRC5Impl",
|
|
9440
|
-
"interface_name": "openzeppelin_introspection::interface::ISRC5"
|
|
9441
|
-
},
|
|
9442
|
-
{
|
|
9443
|
-
"type": "interface",
|
|
9444
|
-
"name": "openzeppelin_introspection::interface::ISRC5",
|
|
9445
|
-
"items": [
|
|
9569
|
+
"state_mutability": "external"
|
|
9570
|
+
},
|
|
9446
9571
|
{
|
|
9447
9572
|
"type": "function",
|
|
9448
|
-
"name": "
|
|
9573
|
+
"name": "reject_proposal",
|
|
9449
9574
|
"inputs": [
|
|
9450
9575
|
{
|
|
9451
|
-
"name": "
|
|
9452
|
-
"type": "core::
|
|
9576
|
+
"name": "proposal_id",
|
|
9577
|
+
"type": "core::integer::u256"
|
|
9578
|
+
}
|
|
9579
|
+
],
|
|
9580
|
+
"outputs": [],
|
|
9581
|
+
"state_mutability": "external"
|
|
9582
|
+
},
|
|
9583
|
+
{
|
|
9584
|
+
"type": "function",
|
|
9585
|
+
"name": "get_proposal",
|
|
9586
|
+
"inputs": [
|
|
9587
|
+
{
|
|
9588
|
+
"name": "proposal_id",
|
|
9589
|
+
"type": "core::integer::u256"
|
|
9453
9590
|
}
|
|
9454
9591
|
],
|
|
9455
9592
|
"outputs": [
|
|
9456
9593
|
{
|
|
9457
|
-
"type": "
|
|
9458
|
-
}
|
|
9459
|
-
],
|
|
9460
|
-
"state_mutability": "view"
|
|
9461
|
-
}
|
|
9462
|
-
]
|
|
9463
|
-
},
|
|
9464
|
-
{
|
|
9465
|
-
"type": "constructor",
|
|
9466
|
-
"name": "constructor",
|
|
9467
|
-
"inputs": []
|
|
9468
|
-
},
|
|
9469
|
-
{
|
|
9470
|
-
"type": "event",
|
|
9471
|
-
"name": "openzeppelin_introspection::src5::SRC5Component::Event",
|
|
9472
|
-
"kind": "enum",
|
|
9473
|
-
"variants": []
|
|
9474
|
-
},
|
|
9475
|
-
{
|
|
9476
|
-
"type": "event",
|
|
9477
|
-
"name": "ip_sponsorship::IPSponsorship::IPSponsorship::OfferCreated",
|
|
9478
|
-
"kind": "struct",
|
|
9479
|
-
"members": [
|
|
9480
|
-
{
|
|
9481
|
-
"name": "offer_id",
|
|
9482
|
-
"type": "core::integer::u256",
|
|
9483
|
-
"kind": "key"
|
|
9484
|
-
},
|
|
9485
|
-
{
|
|
9486
|
-
"name": "author",
|
|
9487
|
-
"type": "core::starknet::contract_address::ContractAddress",
|
|
9488
|
-
"kind": "key"
|
|
9489
|
-
},
|
|
9490
|
-
{
|
|
9491
|
-
"name": "nft_contract",
|
|
9492
|
-
"type": "core::starknet::contract_address::ContractAddress",
|
|
9493
|
-
"kind": "key"
|
|
9494
|
-
},
|
|
9495
|
-
{
|
|
9496
|
-
"name": "token_id",
|
|
9497
|
-
"type": "core::integer::u256",
|
|
9498
|
-
"kind": "data"
|
|
9499
|
-
},
|
|
9500
|
-
{
|
|
9501
|
-
"name": "min_amount",
|
|
9502
|
-
"type": "core::integer::u256",
|
|
9503
|
-
"kind": "data"
|
|
9504
|
-
},
|
|
9505
|
-
{
|
|
9506
|
-
"name": "duration",
|
|
9507
|
-
"type": "core::integer::u64",
|
|
9508
|
-
"kind": "data"
|
|
9509
|
-
},
|
|
9510
|
-
{
|
|
9511
|
-
"name": "payment_token",
|
|
9512
|
-
"type": "core::starknet::contract_address::ContractAddress",
|
|
9513
|
-
"kind": "data"
|
|
9514
|
-
},
|
|
9515
|
-
{
|
|
9516
|
-
"name": "license_terms_uri",
|
|
9517
|
-
"type": "core::byte_array::ByteArray",
|
|
9518
|
-
"kind": "data"
|
|
9519
|
-
},
|
|
9520
|
-
{
|
|
9521
|
-
"name": "transferable",
|
|
9522
|
-
"type": "core::bool",
|
|
9523
|
-
"kind": "data"
|
|
9524
|
-
},
|
|
9525
|
-
{
|
|
9526
|
-
"name": "specific_sponsor",
|
|
9527
|
-
"type": "core::option::Option::<core::starknet::contract_address::ContractAddress>",
|
|
9528
|
-
"kind": "data"
|
|
9529
|
-
},
|
|
9530
|
-
{
|
|
9531
|
-
"name": "created_at",
|
|
9532
|
-
"type": "core::integer::u64",
|
|
9533
|
-
"kind": "data"
|
|
9534
|
-
}
|
|
9535
|
-
]
|
|
9536
|
-
},
|
|
9537
|
-
{
|
|
9538
|
-
"type": "event",
|
|
9539
|
-
"name": "ip_sponsorship::IPSponsorship::IPSponsorship::OfferStatusUpdated",
|
|
9540
|
-
"kind": "struct",
|
|
9541
|
-
"members": [
|
|
9542
|
-
{
|
|
9543
|
-
"name": "offer_id",
|
|
9544
|
-
"type": "core::integer::u256",
|
|
9545
|
-
"kind": "key"
|
|
9546
|
-
},
|
|
9547
|
-
{
|
|
9548
|
-
"name": "open",
|
|
9549
|
-
"type": "core::bool",
|
|
9550
|
-
"kind": "data"
|
|
9551
|
-
},
|
|
9552
|
-
{
|
|
9553
|
-
"name": "updated_at",
|
|
9554
|
-
"type": "core::integer::u64",
|
|
9555
|
-
"kind": "data"
|
|
9556
|
-
}
|
|
9557
|
-
]
|
|
9558
|
-
},
|
|
9559
|
-
{
|
|
9560
|
-
"type": "event",
|
|
9561
|
-
"name": "ip_sponsorship::IPSponsorship::IPSponsorship::BidPlaced",
|
|
9562
|
-
"kind": "struct",
|
|
9563
|
-
"members": [
|
|
9564
|
-
{
|
|
9565
|
-
"name": "offer_id",
|
|
9566
|
-
"type": "core::integer::u256",
|
|
9567
|
-
"kind": "key"
|
|
9568
|
-
},
|
|
9569
|
-
{
|
|
9570
|
-
"name": "sponsor",
|
|
9571
|
-
"type": "core::starknet::contract_address::ContractAddress",
|
|
9572
|
-
"kind": "key"
|
|
9573
|
-
},
|
|
9574
|
-
{
|
|
9575
|
-
"name": "amount",
|
|
9576
|
-
"type": "core::integer::u256",
|
|
9577
|
-
"kind": "data"
|
|
9578
|
-
},
|
|
9579
|
-
{
|
|
9580
|
-
"name": "bid_at",
|
|
9581
|
-
"type": "core::integer::u64",
|
|
9582
|
-
"kind": "data"
|
|
9583
|
-
}
|
|
9584
|
-
]
|
|
9585
|
-
},
|
|
9586
|
-
{
|
|
9587
|
-
"type": "event",
|
|
9588
|
-
"name": "ip_sponsorship::IPSponsorship::IPSponsorship::BidRetracted",
|
|
9589
|
-
"kind": "struct",
|
|
9590
|
-
"members": [
|
|
9591
|
-
{
|
|
9592
|
-
"name": "offer_id",
|
|
9593
|
-
"type": "core::integer::u256",
|
|
9594
|
-
"kind": "key"
|
|
9595
|
-
},
|
|
9596
|
-
{
|
|
9597
|
-
"name": "sponsor",
|
|
9598
|
-
"type": "core::starknet::contract_address::ContractAddress",
|
|
9599
|
-
"kind": "key"
|
|
9600
|
-
},
|
|
9601
|
-
{
|
|
9602
|
-
"name": "retracted_at",
|
|
9603
|
-
"type": "core::integer::u64",
|
|
9604
|
-
"kind": "data"
|
|
9605
|
-
}
|
|
9606
|
-
]
|
|
9607
|
-
},
|
|
9608
|
-
{
|
|
9609
|
-
"type": "event",
|
|
9610
|
-
"name": "ip_sponsorship::IPSponsorship::IPSponsorship::SponsorshipAccepted",
|
|
9611
|
-
"kind": "struct",
|
|
9612
|
-
"members": [
|
|
9613
|
-
{
|
|
9614
|
-
"name": "offer_id",
|
|
9615
|
-
"type": "core::integer::u256",
|
|
9616
|
-
"kind": "key"
|
|
9617
|
-
},
|
|
9618
|
-
{
|
|
9619
|
-
"name": "license_id",
|
|
9620
|
-
"type": "core::integer::u256",
|
|
9621
|
-
"kind": "key"
|
|
9622
|
-
},
|
|
9623
|
-
{
|
|
9624
|
-
"name": "sponsor",
|
|
9625
|
-
"type": "core::starknet::contract_address::ContractAddress",
|
|
9626
|
-
"kind": "key"
|
|
9627
|
-
},
|
|
9628
|
-
{
|
|
9629
|
-
"name": "author",
|
|
9630
|
-
"type": "core::starknet::contract_address::ContractAddress",
|
|
9631
|
-
"kind": "data"
|
|
9632
|
-
},
|
|
9633
|
-
{
|
|
9634
|
-
"name": "amount",
|
|
9635
|
-
"type": "core::integer::u256",
|
|
9636
|
-
"kind": "data"
|
|
9637
|
-
},
|
|
9638
|
-
{
|
|
9639
|
-
"name": "expires_at",
|
|
9640
|
-
"type": "core::integer::u64",
|
|
9641
|
-
"kind": "data"
|
|
9642
|
-
}
|
|
9643
|
-
]
|
|
9644
|
-
},
|
|
9645
|
-
{
|
|
9646
|
-
"type": "event",
|
|
9647
|
-
"name": "ip_sponsorship::IPSponsorship::IPSponsorship::LicenseTransferred",
|
|
9648
|
-
"kind": "struct",
|
|
9649
|
-
"members": [
|
|
9650
|
-
{
|
|
9651
|
-
"name": "license_id",
|
|
9652
|
-
"type": "core::integer::u256",
|
|
9653
|
-
"kind": "key"
|
|
9654
|
-
},
|
|
9655
|
-
{
|
|
9656
|
-
"name": "from",
|
|
9657
|
-
"type": "core::starknet::contract_address::ContractAddress",
|
|
9658
|
-
"kind": "key"
|
|
9659
|
-
},
|
|
9660
|
-
{
|
|
9661
|
-
"name": "to",
|
|
9662
|
-
"type": "core::starknet::contract_address::ContractAddress",
|
|
9663
|
-
"kind": "key"
|
|
9664
|
-
},
|
|
9665
|
-
{
|
|
9666
|
-
"name": "transferred_at",
|
|
9667
|
-
"type": "core::integer::u64",
|
|
9668
|
-
"kind": "data"
|
|
9669
|
-
}
|
|
9670
|
-
]
|
|
9671
|
-
},
|
|
9672
|
-
{
|
|
9673
|
-
"type": "event",
|
|
9674
|
-
"name": "ip_sponsorship::IPSponsorship::IPSponsorship::Event",
|
|
9675
|
-
"kind": "enum",
|
|
9676
|
-
"variants": [
|
|
9677
|
-
{
|
|
9678
|
-
"name": "SRC5Event",
|
|
9679
|
-
"type": "openzeppelin_introspection::src5::SRC5Component::Event",
|
|
9680
|
-
"kind": "flat"
|
|
9681
|
-
},
|
|
9682
|
-
{
|
|
9683
|
-
"name": "OfferCreated",
|
|
9684
|
-
"type": "ip_sponsorship::IPSponsorship::IPSponsorship::OfferCreated",
|
|
9685
|
-
"kind": "nested"
|
|
9686
|
-
},
|
|
9687
|
-
{
|
|
9688
|
-
"name": "OfferStatusUpdated",
|
|
9689
|
-
"type": "ip_sponsorship::IPSponsorship::IPSponsorship::OfferStatusUpdated",
|
|
9690
|
-
"kind": "nested"
|
|
9691
|
-
},
|
|
9692
|
-
{
|
|
9693
|
-
"name": "BidPlaced",
|
|
9694
|
-
"type": "ip_sponsorship::IPSponsorship::IPSponsorship::BidPlaced",
|
|
9695
|
-
"kind": "nested"
|
|
9696
|
-
},
|
|
9697
|
-
{
|
|
9698
|
-
"name": "BidRetracted",
|
|
9699
|
-
"type": "ip_sponsorship::IPSponsorship::IPSponsorship::BidRetracted",
|
|
9700
|
-
"kind": "nested"
|
|
9701
|
-
},
|
|
9702
|
-
{
|
|
9703
|
-
"name": "SponsorshipAccepted",
|
|
9704
|
-
"type": "ip_sponsorship::IPSponsorship::IPSponsorship::SponsorshipAccepted",
|
|
9705
|
-
"kind": "nested"
|
|
9706
|
-
},
|
|
9707
|
-
{
|
|
9708
|
-
"name": "LicenseTransferred",
|
|
9709
|
-
"type": "ip_sponsorship::IPSponsorship::IPSponsorship::LicenseTransferred",
|
|
9710
|
-
"kind": "nested"
|
|
9711
|
-
}
|
|
9712
|
-
]
|
|
9713
|
-
}
|
|
9714
|
-
];
|
|
9715
|
-
|
|
9716
|
-
// src/starknet/abis/ipSponsorshipLicense.ts
|
|
9717
|
-
var IPSponsorshipLicenseABI = [
|
|
9718
|
-
{
|
|
9719
|
-
"type": "impl",
|
|
9720
|
-
"name": "ERC721MetadataImpl",
|
|
9721
|
-
"interface_name": "openzeppelin_token::erc721::interface::IERC721Metadata"
|
|
9722
|
-
},
|
|
9723
|
-
{
|
|
9724
|
-
"type": "struct",
|
|
9725
|
-
"name": "core::byte_array::ByteArray",
|
|
9726
|
-
"members": [
|
|
9727
|
-
{
|
|
9728
|
-
"name": "data",
|
|
9729
|
-
"type": "core::array::Array::<core::bytes_31::bytes31>"
|
|
9730
|
-
},
|
|
9731
|
-
{
|
|
9732
|
-
"name": "pending_word",
|
|
9733
|
-
"type": "core::felt252"
|
|
9734
|
-
},
|
|
9735
|
-
{
|
|
9736
|
-
"name": "pending_word_len",
|
|
9737
|
-
"type": "core::internal::bounded_int::BoundedInt::<0, 30>"
|
|
9738
|
-
}
|
|
9739
|
-
]
|
|
9740
|
-
},
|
|
9741
|
-
{
|
|
9742
|
-
"type": "struct",
|
|
9743
|
-
"name": "core::integer::u256",
|
|
9744
|
-
"members": [
|
|
9745
|
-
{
|
|
9746
|
-
"name": "low",
|
|
9747
|
-
"type": "core::integer::u128"
|
|
9748
|
-
},
|
|
9749
|
-
{
|
|
9750
|
-
"name": "high",
|
|
9751
|
-
"type": "core::integer::u128"
|
|
9752
|
-
}
|
|
9753
|
-
]
|
|
9754
|
-
},
|
|
9755
|
-
{
|
|
9756
|
-
"type": "interface",
|
|
9757
|
-
"name": "openzeppelin_token::erc721::interface::IERC721Metadata",
|
|
9758
|
-
"items": [
|
|
9759
|
-
{
|
|
9760
|
-
"type": "function",
|
|
9761
|
-
"name": "name",
|
|
9762
|
-
"inputs": [],
|
|
9763
|
-
"outputs": [
|
|
9764
|
-
{
|
|
9765
|
-
"type": "core::byte_array::ByteArray"
|
|
9766
|
-
}
|
|
9767
|
-
],
|
|
9768
|
-
"state_mutability": "view"
|
|
9769
|
-
},
|
|
9770
|
-
{
|
|
9771
|
-
"type": "function",
|
|
9772
|
-
"name": "symbol",
|
|
9773
|
-
"inputs": [],
|
|
9774
|
-
"outputs": [
|
|
9775
|
-
{
|
|
9776
|
-
"type": "core::byte_array::ByteArray"
|
|
9777
|
-
}
|
|
9778
|
-
],
|
|
9779
|
-
"state_mutability": "view"
|
|
9780
|
-
},
|
|
9781
|
-
{
|
|
9782
|
-
"type": "function",
|
|
9783
|
-
"name": "token_uri",
|
|
9784
|
-
"inputs": [
|
|
9785
|
-
{
|
|
9786
|
-
"name": "token_id",
|
|
9787
|
-
"type": "core::integer::u256"
|
|
9788
|
-
}
|
|
9789
|
-
],
|
|
9790
|
-
"outputs": [
|
|
9791
|
-
{
|
|
9792
|
-
"type": "core::byte_array::ByteArray"
|
|
9793
|
-
}
|
|
9794
|
-
],
|
|
9795
|
-
"state_mutability": "view"
|
|
9796
|
-
}
|
|
9797
|
-
]
|
|
9798
|
-
},
|
|
9799
|
-
{
|
|
9800
|
-
"type": "impl",
|
|
9801
|
-
"name": "ERC721MetadataCamelOnlyImpl",
|
|
9802
|
-
"interface_name": "openzeppelin_token::erc721::interface::IERC721MetadataCamelOnly"
|
|
9803
|
-
},
|
|
9804
|
-
{
|
|
9805
|
-
"type": "interface",
|
|
9806
|
-
"name": "openzeppelin_token::erc721::interface::IERC721MetadataCamelOnly",
|
|
9807
|
-
"items": [
|
|
9808
|
-
{
|
|
9809
|
-
"type": "function",
|
|
9810
|
-
"name": "tokenURI",
|
|
9811
|
-
"inputs": [
|
|
9812
|
-
{
|
|
9813
|
-
"name": "tokenId",
|
|
9814
|
-
"type": "core::integer::u256"
|
|
9815
|
-
}
|
|
9816
|
-
],
|
|
9817
|
-
"outputs": [
|
|
9818
|
-
{
|
|
9819
|
-
"type": "core::byte_array::ByteArray"
|
|
9820
|
-
}
|
|
9821
|
-
],
|
|
9822
|
-
"state_mutability": "view"
|
|
9823
|
-
}
|
|
9824
|
-
]
|
|
9825
|
-
},
|
|
9826
|
-
{
|
|
9827
|
-
"type": "impl",
|
|
9828
|
-
"name": "IPSponsorshipLicenseImpl",
|
|
9829
|
-
"interface_name": "ip_sponsorship::interface::IIPSponsorshipLicense"
|
|
9830
|
-
},
|
|
9831
|
-
{
|
|
9832
|
-
"type": "enum",
|
|
9833
|
-
"name": "core::bool",
|
|
9834
|
-
"variants": [
|
|
9835
|
-
{
|
|
9836
|
-
"name": "False",
|
|
9837
|
-
"type": "()"
|
|
9838
|
-
},
|
|
9839
|
-
{
|
|
9840
|
-
"name": "True",
|
|
9841
|
-
"type": "()"
|
|
9842
|
-
}
|
|
9843
|
-
]
|
|
9844
|
-
},
|
|
9845
|
-
{
|
|
9846
|
-
"type": "struct",
|
|
9847
|
-
"name": "ip_sponsorship::types::LicenseData",
|
|
9848
|
-
"members": [
|
|
9849
|
-
{
|
|
9850
|
-
"name": "author",
|
|
9851
|
-
"type": "core::starknet::contract_address::ContractAddress"
|
|
9852
|
-
},
|
|
9853
|
-
{
|
|
9854
|
-
"name": "asset_contract",
|
|
9855
|
-
"type": "core::starknet::contract_address::ContractAddress"
|
|
9856
|
-
},
|
|
9857
|
-
{
|
|
9858
|
-
"name": "asset_token_id",
|
|
9859
|
-
"type": "core::integer::u256"
|
|
9860
|
-
},
|
|
9861
|
-
{
|
|
9862
|
-
"name": "expires_at",
|
|
9863
|
-
"type": "core::integer::u64"
|
|
9864
|
-
},
|
|
9865
|
-
{
|
|
9866
|
-
"name": "transferable",
|
|
9867
|
-
"type": "core::bool"
|
|
9868
|
-
},
|
|
9869
|
-
{
|
|
9870
|
-
"name": "royalty_bps",
|
|
9871
|
-
"type": "core::integer::u256"
|
|
9872
|
-
},
|
|
9873
|
-
{
|
|
9874
|
-
"name": "license_terms_uri",
|
|
9875
|
-
"type": "core::byte_array::ByteArray"
|
|
9876
|
-
}
|
|
9877
|
-
]
|
|
9878
|
-
},
|
|
9879
|
-
{
|
|
9880
|
-
"type": "interface",
|
|
9881
|
-
"name": "ip_sponsorship::interface::IIPSponsorshipLicense",
|
|
9882
|
-
"items": [
|
|
9883
|
-
{
|
|
9884
|
-
"type": "function",
|
|
9885
|
-
"name": "set_minter",
|
|
9886
|
-
"inputs": [
|
|
9887
|
-
{
|
|
9888
|
-
"name": "minter",
|
|
9889
|
-
"type": "core::starknet::contract_address::ContractAddress"
|
|
9890
|
-
}
|
|
9891
|
-
],
|
|
9892
|
-
"outputs": [],
|
|
9893
|
-
"state_mutability": "external"
|
|
9894
|
-
},
|
|
9895
|
-
{
|
|
9896
|
-
"type": "function",
|
|
9897
|
-
"name": "get_minter",
|
|
9898
|
-
"inputs": [],
|
|
9899
|
-
"outputs": [
|
|
9900
|
-
{
|
|
9901
|
-
"type": "core::starknet::contract_address::ContractAddress"
|
|
9902
|
-
}
|
|
9903
|
-
],
|
|
9904
|
-
"state_mutability": "view"
|
|
9905
|
-
},
|
|
9906
|
-
{
|
|
9907
|
-
"type": "function",
|
|
9908
|
-
"name": "mint",
|
|
9909
|
-
"inputs": [
|
|
9910
|
-
{
|
|
9911
|
-
"name": "recipient",
|
|
9912
|
-
"type": "core::starknet::contract_address::ContractAddress"
|
|
9913
|
-
},
|
|
9914
|
-
{
|
|
9915
|
-
"name": "data",
|
|
9916
|
-
"type": "ip_sponsorship::types::LicenseData"
|
|
9917
|
-
}
|
|
9918
|
-
],
|
|
9919
|
-
"outputs": [
|
|
9920
|
-
{
|
|
9921
|
-
"type": "core::integer::u256"
|
|
9922
|
-
}
|
|
9923
|
-
],
|
|
9924
|
-
"state_mutability": "external"
|
|
9925
|
-
},
|
|
9926
|
-
{
|
|
9927
|
-
"type": "function",
|
|
9928
|
-
"name": "get_license_data",
|
|
9929
|
-
"inputs": [
|
|
9930
|
-
{
|
|
9931
|
-
"name": "token_id",
|
|
9932
|
-
"type": "core::integer::u256"
|
|
9933
|
-
}
|
|
9934
|
-
],
|
|
9935
|
-
"outputs": [
|
|
9936
|
-
{
|
|
9937
|
-
"type": "ip_sponsorship::types::LicenseData"
|
|
9938
|
-
}
|
|
9939
|
-
],
|
|
9940
|
-
"state_mutability": "view"
|
|
9941
|
-
},
|
|
9942
|
-
{
|
|
9943
|
-
"type": "function",
|
|
9944
|
-
"name": "is_license_valid",
|
|
9945
|
-
"inputs": [
|
|
9946
|
-
{
|
|
9947
|
-
"name": "token_id",
|
|
9948
|
-
"type": "core::integer::u256"
|
|
9949
|
-
}
|
|
9950
|
-
],
|
|
9951
|
-
"outputs": [
|
|
9952
|
-
{
|
|
9953
|
-
"type": "core::bool"
|
|
9594
|
+
"type": "ip_sponsorship::types::SponsorshipProposal"
|
|
9954
9595
|
}
|
|
9955
9596
|
],
|
|
9956
9597
|
"state_mutability": "view"
|
|
9957
9598
|
},
|
|
9958
9599
|
{
|
|
9959
9600
|
"type": "function",
|
|
9960
|
-
"name": "
|
|
9601
|
+
"name": "get_last_proposal_id",
|
|
9961
9602
|
"inputs": [],
|
|
9962
9603
|
"outputs": [
|
|
9963
9604
|
{
|
|
@@ -10333,134 +9974,435 @@ var IPSponsorshipLicenseABI = [
|
|
|
10333
9974
|
"name": "openzeppelin_introspection::interface::ISRC5",
|
|
10334
9975
|
"items": [
|
|
10335
9976
|
{
|
|
10336
|
-
"type": "function",
|
|
10337
|
-
"name": "supports_interface",
|
|
10338
|
-
"inputs": [
|
|
10339
|
-
{
|
|
10340
|
-
"name": "interface_id",
|
|
10341
|
-
"type": "core::felt252"
|
|
10342
|
-
}
|
|
10343
|
-
],
|
|
10344
|
-
"outputs": [
|
|
10345
|
-
{
|
|
10346
|
-
"type": "core::bool"
|
|
10347
|
-
}
|
|
10348
|
-
],
|
|
10349
|
-
"state_mutability": "view"
|
|
9977
|
+
"type": "function",
|
|
9978
|
+
"name": "supports_interface",
|
|
9979
|
+
"inputs": [
|
|
9980
|
+
{
|
|
9981
|
+
"name": "interface_id",
|
|
9982
|
+
"type": "core::felt252"
|
|
9983
|
+
}
|
|
9984
|
+
],
|
|
9985
|
+
"outputs": [
|
|
9986
|
+
{
|
|
9987
|
+
"type": "core::bool"
|
|
9988
|
+
}
|
|
9989
|
+
],
|
|
9990
|
+
"state_mutability": "view"
|
|
9991
|
+
}
|
|
9992
|
+
]
|
|
9993
|
+
},
|
|
9994
|
+
{
|
|
9995
|
+
"type": "constructor",
|
|
9996
|
+
"name": "constructor",
|
|
9997
|
+
"inputs": [
|
|
9998
|
+
{
|
|
9999
|
+
"name": "name",
|
|
10000
|
+
"type": "core::byte_array::ByteArray"
|
|
10001
|
+
},
|
|
10002
|
+
{
|
|
10003
|
+
"name": "symbol",
|
|
10004
|
+
"type": "core::byte_array::ByteArray"
|
|
10005
|
+
}
|
|
10006
|
+
]
|
|
10007
|
+
},
|
|
10008
|
+
{
|
|
10009
|
+
"type": "event",
|
|
10010
|
+
"name": "openzeppelin_token::erc721::erc721::ERC721Component::Transfer",
|
|
10011
|
+
"kind": "struct",
|
|
10012
|
+
"members": [
|
|
10013
|
+
{
|
|
10014
|
+
"name": "from",
|
|
10015
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
10016
|
+
"kind": "key"
|
|
10017
|
+
},
|
|
10018
|
+
{
|
|
10019
|
+
"name": "to",
|
|
10020
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
10021
|
+
"kind": "key"
|
|
10022
|
+
},
|
|
10023
|
+
{
|
|
10024
|
+
"name": "token_id",
|
|
10025
|
+
"type": "core::integer::u256",
|
|
10026
|
+
"kind": "key"
|
|
10027
|
+
}
|
|
10028
|
+
]
|
|
10029
|
+
},
|
|
10030
|
+
{
|
|
10031
|
+
"type": "event",
|
|
10032
|
+
"name": "openzeppelin_token::erc721::erc721::ERC721Component::Approval",
|
|
10033
|
+
"kind": "struct",
|
|
10034
|
+
"members": [
|
|
10035
|
+
{
|
|
10036
|
+
"name": "owner",
|
|
10037
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
10038
|
+
"kind": "key"
|
|
10039
|
+
},
|
|
10040
|
+
{
|
|
10041
|
+
"name": "approved",
|
|
10042
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
10043
|
+
"kind": "key"
|
|
10044
|
+
},
|
|
10045
|
+
{
|
|
10046
|
+
"name": "token_id",
|
|
10047
|
+
"type": "core::integer::u256",
|
|
10048
|
+
"kind": "key"
|
|
10049
|
+
}
|
|
10050
|
+
]
|
|
10051
|
+
},
|
|
10052
|
+
{
|
|
10053
|
+
"type": "event",
|
|
10054
|
+
"name": "openzeppelin_token::erc721::erc721::ERC721Component::ApprovalForAll",
|
|
10055
|
+
"kind": "struct",
|
|
10056
|
+
"members": [
|
|
10057
|
+
{
|
|
10058
|
+
"name": "owner",
|
|
10059
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
10060
|
+
"kind": "key"
|
|
10061
|
+
},
|
|
10062
|
+
{
|
|
10063
|
+
"name": "operator",
|
|
10064
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
10065
|
+
"kind": "key"
|
|
10066
|
+
},
|
|
10067
|
+
{
|
|
10068
|
+
"name": "approved",
|
|
10069
|
+
"type": "core::bool",
|
|
10070
|
+
"kind": "data"
|
|
10071
|
+
}
|
|
10072
|
+
]
|
|
10073
|
+
},
|
|
10074
|
+
{
|
|
10075
|
+
"type": "event",
|
|
10076
|
+
"name": "openzeppelin_token::erc721::erc721::ERC721Component::Event",
|
|
10077
|
+
"kind": "enum",
|
|
10078
|
+
"variants": [
|
|
10079
|
+
{
|
|
10080
|
+
"name": "Transfer",
|
|
10081
|
+
"type": "openzeppelin_token::erc721::erc721::ERC721Component::Transfer",
|
|
10082
|
+
"kind": "nested"
|
|
10083
|
+
},
|
|
10084
|
+
{
|
|
10085
|
+
"name": "Approval",
|
|
10086
|
+
"type": "openzeppelin_token::erc721::erc721::ERC721Component::Approval",
|
|
10087
|
+
"kind": "nested"
|
|
10088
|
+
},
|
|
10089
|
+
{
|
|
10090
|
+
"name": "ApprovalForAll",
|
|
10091
|
+
"type": "openzeppelin_token::erc721::erc721::ERC721Component::ApprovalForAll",
|
|
10092
|
+
"kind": "nested"
|
|
10093
|
+
}
|
|
10094
|
+
]
|
|
10095
|
+
},
|
|
10096
|
+
{
|
|
10097
|
+
"type": "event",
|
|
10098
|
+
"name": "openzeppelin_introspection::src5::SRC5Component::Event",
|
|
10099
|
+
"kind": "enum",
|
|
10100
|
+
"variants": []
|
|
10101
|
+
},
|
|
10102
|
+
{
|
|
10103
|
+
"type": "event",
|
|
10104
|
+
"name": "ip_sponsorship::IPSponsorship::IPSponsorship::OfferCreated",
|
|
10105
|
+
"kind": "struct",
|
|
10106
|
+
"members": [
|
|
10107
|
+
{
|
|
10108
|
+
"name": "offer_id",
|
|
10109
|
+
"type": "core::integer::u256",
|
|
10110
|
+
"kind": "key"
|
|
10111
|
+
},
|
|
10112
|
+
{
|
|
10113
|
+
"name": "author",
|
|
10114
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
10115
|
+
"kind": "key"
|
|
10116
|
+
},
|
|
10117
|
+
{
|
|
10118
|
+
"name": "nft_contract",
|
|
10119
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
10120
|
+
"kind": "key"
|
|
10121
|
+
},
|
|
10122
|
+
{
|
|
10123
|
+
"name": "token_id",
|
|
10124
|
+
"type": "core::integer::u256",
|
|
10125
|
+
"kind": "data"
|
|
10126
|
+
},
|
|
10127
|
+
{
|
|
10128
|
+
"name": "min_amount",
|
|
10129
|
+
"type": "core::integer::u256",
|
|
10130
|
+
"kind": "data"
|
|
10131
|
+
},
|
|
10132
|
+
{
|
|
10133
|
+
"name": "duration",
|
|
10134
|
+
"type": "core::integer::u64",
|
|
10135
|
+
"kind": "data"
|
|
10136
|
+
},
|
|
10137
|
+
{
|
|
10138
|
+
"name": "payment_token",
|
|
10139
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
10140
|
+
"kind": "data"
|
|
10141
|
+
},
|
|
10142
|
+
{
|
|
10143
|
+
"name": "license_terms_uri",
|
|
10144
|
+
"type": "core::byte_array::ByteArray",
|
|
10145
|
+
"kind": "data"
|
|
10146
|
+
},
|
|
10147
|
+
{
|
|
10148
|
+
"name": "transferable",
|
|
10149
|
+
"type": "core::bool",
|
|
10150
|
+
"kind": "data"
|
|
10151
|
+
},
|
|
10152
|
+
{
|
|
10153
|
+
"name": "royalty_bps",
|
|
10154
|
+
"type": "core::integer::u256",
|
|
10155
|
+
"kind": "data"
|
|
10156
|
+
},
|
|
10157
|
+
{
|
|
10158
|
+
"name": "specific_sponsor",
|
|
10159
|
+
"type": "core::option::Option::<core::starknet::contract_address::ContractAddress>",
|
|
10160
|
+
"kind": "data"
|
|
10161
|
+
},
|
|
10162
|
+
{
|
|
10163
|
+
"name": "created_at",
|
|
10164
|
+
"type": "core::integer::u64",
|
|
10165
|
+
"kind": "data"
|
|
10166
|
+
}
|
|
10167
|
+
]
|
|
10168
|
+
},
|
|
10169
|
+
{
|
|
10170
|
+
"type": "event",
|
|
10171
|
+
"name": "ip_sponsorship::IPSponsorship::IPSponsorship::OfferStatusUpdated",
|
|
10172
|
+
"kind": "struct",
|
|
10173
|
+
"members": [
|
|
10174
|
+
{
|
|
10175
|
+
"name": "offer_id",
|
|
10176
|
+
"type": "core::integer::u256",
|
|
10177
|
+
"kind": "key"
|
|
10178
|
+
},
|
|
10179
|
+
{
|
|
10180
|
+
"name": "open",
|
|
10181
|
+
"type": "core::bool",
|
|
10182
|
+
"kind": "data"
|
|
10183
|
+
},
|
|
10184
|
+
{
|
|
10185
|
+
"name": "updated_at",
|
|
10186
|
+
"type": "core::integer::u64",
|
|
10187
|
+
"kind": "data"
|
|
10188
|
+
}
|
|
10189
|
+
]
|
|
10190
|
+
},
|
|
10191
|
+
{
|
|
10192
|
+
"type": "event",
|
|
10193
|
+
"name": "ip_sponsorship::IPSponsorship::IPSponsorship::BidPlaced",
|
|
10194
|
+
"kind": "struct",
|
|
10195
|
+
"members": [
|
|
10196
|
+
{
|
|
10197
|
+
"name": "offer_id",
|
|
10198
|
+
"type": "core::integer::u256",
|
|
10199
|
+
"kind": "key"
|
|
10200
|
+
},
|
|
10201
|
+
{
|
|
10202
|
+
"name": "sponsor",
|
|
10203
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
10204
|
+
"kind": "key"
|
|
10205
|
+
},
|
|
10206
|
+
{
|
|
10207
|
+
"name": "amount",
|
|
10208
|
+
"type": "core::integer::u256",
|
|
10209
|
+
"kind": "data"
|
|
10210
|
+
},
|
|
10211
|
+
{
|
|
10212
|
+
"name": "bid_at",
|
|
10213
|
+
"type": "core::integer::u64",
|
|
10214
|
+
"kind": "data"
|
|
10350
10215
|
}
|
|
10351
10216
|
]
|
|
10352
10217
|
},
|
|
10353
10218
|
{
|
|
10354
|
-
"type": "
|
|
10355
|
-
"name": "
|
|
10356
|
-
"
|
|
10219
|
+
"type": "event",
|
|
10220
|
+
"name": "ip_sponsorship::IPSponsorship::IPSponsorship::BidRetracted",
|
|
10221
|
+
"kind": "struct",
|
|
10222
|
+
"members": [
|
|
10357
10223
|
{
|
|
10358
|
-
"name": "
|
|
10359
|
-
"type": "core::
|
|
10224
|
+
"name": "offer_id",
|
|
10225
|
+
"type": "core::integer::u256",
|
|
10226
|
+
"kind": "key"
|
|
10360
10227
|
},
|
|
10361
10228
|
{
|
|
10362
|
-
"name": "
|
|
10363
|
-
"type": "core::
|
|
10229
|
+
"name": "sponsor",
|
|
10230
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
10231
|
+
"kind": "key"
|
|
10232
|
+
},
|
|
10233
|
+
{
|
|
10234
|
+
"name": "retracted_at",
|
|
10235
|
+
"type": "core::integer::u64",
|
|
10236
|
+
"kind": "data"
|
|
10364
10237
|
}
|
|
10365
10238
|
]
|
|
10366
10239
|
},
|
|
10367
10240
|
{
|
|
10368
10241
|
"type": "event",
|
|
10369
|
-
"name": "
|
|
10242
|
+
"name": "ip_sponsorship::IPSponsorship::IPSponsorship::SponsorshipAccepted",
|
|
10370
10243
|
"kind": "struct",
|
|
10371
10244
|
"members": [
|
|
10372
10245
|
{
|
|
10373
|
-
"name": "
|
|
10374
|
-
"type": "core::
|
|
10246
|
+
"name": "offer_id",
|
|
10247
|
+
"type": "core::integer::u256",
|
|
10375
10248
|
"kind": "key"
|
|
10376
10249
|
},
|
|
10377
10250
|
{
|
|
10378
|
-
"name": "
|
|
10251
|
+
"name": "license_id",
|
|
10252
|
+
"type": "core::integer::u256",
|
|
10253
|
+
"kind": "key"
|
|
10254
|
+
},
|
|
10255
|
+
{
|
|
10256
|
+
"name": "sponsor",
|
|
10379
10257
|
"type": "core::starknet::contract_address::ContractAddress",
|
|
10380
10258
|
"kind": "key"
|
|
10381
10259
|
},
|
|
10382
10260
|
{
|
|
10383
|
-
"name": "
|
|
10261
|
+
"name": "author",
|
|
10262
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
10263
|
+
"kind": "data"
|
|
10264
|
+
},
|
|
10265
|
+
{
|
|
10266
|
+
"name": "amount",
|
|
10384
10267
|
"type": "core::integer::u256",
|
|
10385
|
-
"kind": "
|
|
10268
|
+
"kind": "data"
|
|
10269
|
+
},
|
|
10270
|
+
{
|
|
10271
|
+
"name": "expires_at",
|
|
10272
|
+
"type": "core::integer::u64",
|
|
10273
|
+
"kind": "data"
|
|
10386
10274
|
}
|
|
10387
10275
|
]
|
|
10388
10276
|
},
|
|
10389
10277
|
{
|
|
10390
10278
|
"type": "event",
|
|
10391
|
-
"name": "
|
|
10279
|
+
"name": "ip_sponsorship::IPSponsorship::IPSponsorship::ProposalCreated",
|
|
10392
10280
|
"kind": "struct",
|
|
10393
10281
|
"members": [
|
|
10394
10282
|
{
|
|
10395
|
-
"name": "
|
|
10283
|
+
"name": "proposal_id",
|
|
10284
|
+
"type": "core::integer::u256",
|
|
10285
|
+
"kind": "key"
|
|
10286
|
+
},
|
|
10287
|
+
{
|
|
10288
|
+
"name": "proposer",
|
|
10396
10289
|
"type": "core::starknet::contract_address::ContractAddress",
|
|
10397
10290
|
"kind": "key"
|
|
10398
10291
|
},
|
|
10399
10292
|
{
|
|
10400
|
-
"name": "
|
|
10293
|
+
"name": "nft_contract",
|
|
10401
10294
|
"type": "core::starknet::contract_address::ContractAddress",
|
|
10402
10295
|
"kind": "key"
|
|
10403
10296
|
},
|
|
10404
10297
|
{
|
|
10405
10298
|
"name": "token_id",
|
|
10406
10299
|
"type": "core::integer::u256",
|
|
10407
|
-
"kind": "
|
|
10300
|
+
"kind": "data"
|
|
10301
|
+
},
|
|
10302
|
+
{
|
|
10303
|
+
"name": "amount",
|
|
10304
|
+
"type": "core::integer::u256",
|
|
10305
|
+
"kind": "data"
|
|
10306
|
+
},
|
|
10307
|
+
{
|
|
10308
|
+
"name": "duration",
|
|
10309
|
+
"type": "core::integer::u64",
|
|
10310
|
+
"kind": "data"
|
|
10311
|
+
},
|
|
10312
|
+
{
|
|
10313
|
+
"name": "valid_until",
|
|
10314
|
+
"type": "core::integer::u64",
|
|
10315
|
+
"kind": "data"
|
|
10316
|
+
},
|
|
10317
|
+
{
|
|
10318
|
+
"name": "payment_token",
|
|
10319
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
10320
|
+
"kind": "data"
|
|
10321
|
+
},
|
|
10322
|
+
{
|
|
10323
|
+
"name": "license_terms_uri",
|
|
10324
|
+
"type": "core::byte_array::ByteArray",
|
|
10325
|
+
"kind": "data"
|
|
10326
|
+
},
|
|
10327
|
+
{
|
|
10328
|
+
"name": "transferable",
|
|
10329
|
+
"type": "core::bool",
|
|
10330
|
+
"kind": "data"
|
|
10331
|
+
},
|
|
10332
|
+
{
|
|
10333
|
+
"name": "royalty_bps",
|
|
10334
|
+
"type": "core::integer::u256",
|
|
10335
|
+
"kind": "data"
|
|
10336
|
+
},
|
|
10337
|
+
{
|
|
10338
|
+
"name": "created_at",
|
|
10339
|
+
"type": "core::integer::u64",
|
|
10340
|
+
"kind": "data"
|
|
10408
10341
|
}
|
|
10409
10342
|
]
|
|
10410
10343
|
},
|
|
10411
10344
|
{
|
|
10412
10345
|
"type": "event",
|
|
10413
|
-
"name": "
|
|
10346
|
+
"name": "ip_sponsorship::IPSponsorship::IPSponsorship::ProposalClosed",
|
|
10414
10347
|
"kind": "struct",
|
|
10415
10348
|
"members": [
|
|
10416
10349
|
{
|
|
10417
|
-
"name": "
|
|
10418
|
-
"type": "core::
|
|
10350
|
+
"name": "proposal_id",
|
|
10351
|
+
"type": "core::integer::u256",
|
|
10419
10352
|
"kind": "key"
|
|
10420
10353
|
},
|
|
10421
10354
|
{
|
|
10422
|
-
"name": "
|
|
10423
|
-
"type": "core::
|
|
10424
|
-
"kind": "
|
|
10355
|
+
"name": "accepted",
|
|
10356
|
+
"type": "core::bool",
|
|
10357
|
+
"kind": "data"
|
|
10425
10358
|
},
|
|
10426
10359
|
{
|
|
10427
|
-
"name": "
|
|
10428
|
-
"type": "core::
|
|
10360
|
+
"name": "closed_at",
|
|
10361
|
+
"type": "core::integer::u64",
|
|
10429
10362
|
"kind": "data"
|
|
10430
10363
|
}
|
|
10431
10364
|
]
|
|
10432
10365
|
},
|
|
10433
10366
|
{
|
|
10434
10367
|
"type": "event",
|
|
10435
|
-
"name": "
|
|
10436
|
-
"kind": "
|
|
10437
|
-
"
|
|
10368
|
+
"name": "ip_sponsorship::IPSponsorship::IPSponsorship::ProposalAccepted",
|
|
10369
|
+
"kind": "struct",
|
|
10370
|
+
"members": [
|
|
10438
10371
|
{
|
|
10439
|
-
"name": "
|
|
10440
|
-
"type": "
|
|
10441
|
-
"kind": "
|
|
10372
|
+
"name": "proposal_id",
|
|
10373
|
+
"type": "core::integer::u256",
|
|
10374
|
+
"kind": "key"
|
|
10442
10375
|
},
|
|
10443
10376
|
{
|
|
10444
|
-
"name": "
|
|
10445
|
-
"type": "
|
|
10446
|
-
"kind": "
|
|
10377
|
+
"name": "license_id",
|
|
10378
|
+
"type": "core::integer::u256",
|
|
10379
|
+
"kind": "key"
|
|
10447
10380
|
},
|
|
10448
10381
|
{
|
|
10449
|
-
"name": "
|
|
10450
|
-
"type": "
|
|
10451
|
-
"kind": "
|
|
10382
|
+
"name": "sponsor",
|
|
10383
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
10384
|
+
"kind": "key"
|
|
10385
|
+
},
|
|
10386
|
+
{
|
|
10387
|
+
"name": "author",
|
|
10388
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
10389
|
+
"kind": "data"
|
|
10390
|
+
},
|
|
10391
|
+
{
|
|
10392
|
+
"name": "amount",
|
|
10393
|
+
"type": "core::integer::u256",
|
|
10394
|
+
"kind": "data"
|
|
10395
|
+
},
|
|
10396
|
+
{
|
|
10397
|
+
"name": "expires_at",
|
|
10398
|
+
"type": "core::integer::u64",
|
|
10399
|
+
"kind": "data"
|
|
10452
10400
|
}
|
|
10453
10401
|
]
|
|
10454
10402
|
},
|
|
10455
10403
|
{
|
|
10456
10404
|
"type": "event",
|
|
10457
|
-
"name": "
|
|
10458
|
-
"kind": "enum",
|
|
10459
|
-
"variants": []
|
|
10460
|
-
},
|
|
10461
|
-
{
|
|
10462
|
-
"type": "event",
|
|
10463
|
-
"name": "ip_sponsorship::IPSponsorshipLicense::IPSponsorshipLicense::LicenseMinted",
|
|
10405
|
+
"name": "ip_sponsorship::IPSponsorship::IPSponsorship::LicenseMinted",
|
|
10464
10406
|
"kind": "struct",
|
|
10465
10407
|
"members": [
|
|
10466
10408
|
{
|
|
@@ -10517,7 +10459,7 @@ var IPSponsorshipLicenseABI = [
|
|
|
10517
10459
|
},
|
|
10518
10460
|
{
|
|
10519
10461
|
"type": "event",
|
|
10520
|
-
"name": "ip_sponsorship::
|
|
10462
|
+
"name": "ip_sponsorship::IPSponsorship::IPSponsorship::Event",
|
|
10521
10463
|
"kind": "enum",
|
|
10522
10464
|
"variants": [
|
|
10523
10465
|
{
|
|
@@ -10530,9 +10472,49 @@ var IPSponsorshipLicenseABI = [
|
|
|
10530
10472
|
"type": "openzeppelin_introspection::src5::SRC5Component::Event",
|
|
10531
10473
|
"kind": "flat"
|
|
10532
10474
|
},
|
|
10475
|
+
{
|
|
10476
|
+
"name": "OfferCreated",
|
|
10477
|
+
"type": "ip_sponsorship::IPSponsorship::IPSponsorship::OfferCreated",
|
|
10478
|
+
"kind": "nested"
|
|
10479
|
+
},
|
|
10480
|
+
{
|
|
10481
|
+
"name": "OfferStatusUpdated",
|
|
10482
|
+
"type": "ip_sponsorship::IPSponsorship::IPSponsorship::OfferStatusUpdated",
|
|
10483
|
+
"kind": "nested"
|
|
10484
|
+
},
|
|
10485
|
+
{
|
|
10486
|
+
"name": "BidPlaced",
|
|
10487
|
+
"type": "ip_sponsorship::IPSponsorship::IPSponsorship::BidPlaced",
|
|
10488
|
+
"kind": "nested"
|
|
10489
|
+
},
|
|
10490
|
+
{
|
|
10491
|
+
"name": "BidRetracted",
|
|
10492
|
+
"type": "ip_sponsorship::IPSponsorship::IPSponsorship::BidRetracted",
|
|
10493
|
+
"kind": "nested"
|
|
10494
|
+
},
|
|
10495
|
+
{
|
|
10496
|
+
"name": "SponsorshipAccepted",
|
|
10497
|
+
"type": "ip_sponsorship::IPSponsorship::IPSponsorship::SponsorshipAccepted",
|
|
10498
|
+
"kind": "nested"
|
|
10499
|
+
},
|
|
10500
|
+
{
|
|
10501
|
+
"name": "ProposalCreated",
|
|
10502
|
+
"type": "ip_sponsorship::IPSponsorship::IPSponsorship::ProposalCreated",
|
|
10503
|
+
"kind": "nested"
|
|
10504
|
+
},
|
|
10505
|
+
{
|
|
10506
|
+
"name": "ProposalClosed",
|
|
10507
|
+
"type": "ip_sponsorship::IPSponsorship::IPSponsorship::ProposalClosed",
|
|
10508
|
+
"kind": "nested"
|
|
10509
|
+
},
|
|
10510
|
+
{
|
|
10511
|
+
"name": "ProposalAccepted",
|
|
10512
|
+
"type": "ip_sponsorship::IPSponsorship::IPSponsorship::ProposalAccepted",
|
|
10513
|
+
"kind": "nested"
|
|
10514
|
+
},
|
|
10533
10515
|
{
|
|
10534
10516
|
"name": "LicenseMinted",
|
|
10535
|
-
"type": "ip_sponsorship::
|
|
10517
|
+
"type": "ip_sponsorship::IPSponsorship::IPSponsorship::LicenseMinted",
|
|
10536
10518
|
"kind": "nested"
|
|
10537
10519
|
}
|
|
10538
10520
|
]
|
|
@@ -11999,20 +11981,29 @@ var ClubService = class {
|
|
|
11999
11981
|
};
|
|
12000
11982
|
var SponsorshipService = class {
|
|
12001
11983
|
constructor(config) {
|
|
11984
|
+
this.config = config;
|
|
12002
11985
|
this.sponsorshipAddress = getStarknetCoordinates(config.chain).ipSponsorship;
|
|
12003
|
-
this.licenseReceiptAddress = getStarknetCoordinates(config.chain).ipSponsorshipLicense;
|
|
12004
11986
|
}
|
|
12005
|
-
|
|
11987
|
+
_contract(account, address) {
|
|
12006
11988
|
const resolved = address ?? this.sponsorshipAddress;
|
|
12007
11989
|
if (!resolved) {
|
|
12008
11990
|
throw new Error("IP-Sponsorship address not configured for this chain");
|
|
12009
11991
|
}
|
|
12010
11992
|
return newContract(IPSponsorshipABI, normalizeAddress("STARKNET", resolved), account);
|
|
12011
11993
|
}
|
|
11994
|
+
_contractRead(address) {
|
|
11995
|
+
const resolved = address ?? this.sponsorshipAddress;
|
|
11996
|
+
if (!resolved) {
|
|
11997
|
+
throw new Error("IP-Sponsorship address not configured for this chain");
|
|
11998
|
+
}
|
|
11999
|
+
const provider = new RpcProvider({ nodeUrl: this.config.rpcUrl });
|
|
12000
|
+
return newContract(IPSponsorshipABI, normalizeAddress("STARKNET", resolved), provider);
|
|
12001
|
+
}
|
|
12002
|
+
// ── Offers (owner-initiated) ───────────────────────────────────────────────
|
|
12012
12003
|
/** The offer author must currently own (nftContract, tokenId) — enforced on-chain at create and accept. */
|
|
12013
12004
|
async createOffer(account, params) {
|
|
12014
12005
|
const specificSponsor = params.specificSponsor ? new CairoOption(CairoOptionVariant.Some, params.specificSponsor) : new CairoOption(CairoOptionVariant.None);
|
|
12015
|
-
const call = this.
|
|
12006
|
+
const call = this._contract(account, params.sponsorshipAddress).populate("create_offer", [
|
|
12016
12007
|
params.nftContract,
|
|
12017
12008
|
cairo.uint256(params.tokenId),
|
|
12018
12009
|
cairo.uint256(params.minAmount),
|
|
@@ -12020,6 +12011,7 @@ var SponsorshipService = class {
|
|
|
12020
12011
|
params.paymentToken,
|
|
12021
12012
|
params.licenseTermsUri,
|
|
12022
12013
|
params.transferable,
|
|
12014
|
+
cairo.uint256(params.royaltyBps),
|
|
12023
12015
|
specificSponsor
|
|
12024
12016
|
]);
|
|
12025
12017
|
const res = await account.execute([call]);
|
|
@@ -12027,7 +12019,7 @@ var SponsorshipService = class {
|
|
|
12027
12019
|
}
|
|
12028
12020
|
/** Reversible — gates new bids/acceptance only. */
|
|
12029
12021
|
async setOfferOpen(account, params) {
|
|
12030
|
-
const call = this.
|
|
12022
|
+
const call = this._contract(account, params.sponsorshipAddress).populate("set_offer_open", [
|
|
12031
12023
|
cairo.uint256(params.offerId),
|
|
12032
12024
|
params.open
|
|
12033
12025
|
]);
|
|
@@ -12046,7 +12038,7 @@ var SponsorshipService = class {
|
|
|
12046
12038
|
entrypoint: "approve",
|
|
12047
12039
|
calldata: [normalizeAddress("STARKNET", sponsorshipAddress), amount.low.toString(), amount.high.toString()]
|
|
12048
12040
|
};
|
|
12049
|
-
const bidCall = this.
|
|
12041
|
+
const bidCall = this._contract(account, sponsorshipAddress).populate("place_bid", [
|
|
12050
12042
|
cairo.uint256(params.offerId),
|
|
12051
12043
|
amount
|
|
12052
12044
|
]);
|
|
@@ -12054,54 +12046,139 @@ var SponsorshipService = class {
|
|
|
12054
12046
|
return { txHash: res.transaction_hash };
|
|
12055
12047
|
}
|
|
12056
12048
|
async retractBid(account, params) {
|
|
12057
|
-
const call = this.
|
|
12049
|
+
const call = this._contract(account, params.sponsorshipAddress).populate("retract_bid", [
|
|
12058
12050
|
cairo.uint256(params.offerId)
|
|
12059
12051
|
]);
|
|
12060
12052
|
const res = await account.execute([call]);
|
|
12061
12053
|
return { txHash: res.transaction_hash };
|
|
12062
12054
|
}
|
|
12063
12055
|
/**
|
|
12064
|
-
* Author-only.
|
|
12065
|
-
*
|
|
12066
|
-
*
|
|
12067
|
-
* `is_license_valid()` on IPSponsorship remains the sole authority for
|
|
12068
|
-
* gating/perks; the receipt is a wallet-visible courtesy only.
|
|
12056
|
+
* Author-only. Re-verifies IP ownership, settles the sponsor's payment
|
|
12057
|
+
* (allowance pull, no escrow), and mints the license — a real ERC-721 on
|
|
12058
|
+
* this same contract — to the sponsor, all atomically in one call.
|
|
12069
12059
|
*/
|
|
12070
12060
|
async acceptBid(account, params) {
|
|
12071
|
-
const
|
|
12072
|
-
if (!receiptAddress) {
|
|
12073
|
-
throw new Error("IP-Sponsorship-License receipt address not configured for this chain");
|
|
12074
|
-
}
|
|
12075
|
-
const acceptCall = this._sponsorship(account, params.sponsorshipAddress).populate("accept_bid", [
|
|
12061
|
+
const call = this._contract(account, params.sponsorshipAddress).populate("accept_bid", [
|
|
12076
12062
|
cairo.uint256(params.offerId),
|
|
12077
12063
|
params.sponsor
|
|
12078
12064
|
]);
|
|
12079
|
-
const
|
|
12080
|
-
|
|
12081
|
-
|
|
12065
|
+
const res = await account.execute([call]);
|
|
12066
|
+
return { txHash: res.transaction_hash };
|
|
12067
|
+
}
|
|
12068
|
+
// ── Proposals (sponsor-initiated) ──────────────────────────────────────────
|
|
12069
|
+
// The symmetric counterpart to offers/bids: a sponsor proposes fixed terms
|
|
12070
|
+
// on an asset with no open offer yet; only the asset's current owner may
|
|
12071
|
+
// accept or reject. Unlike an offer, the SPONSOR chooses `paymentToken` here
|
|
12072
|
+
// — an accepting owner's UI should surface only recognized tokens, since a
|
|
12073
|
+
// bad-faith ERC-20 could return `true` on `transfer_from` without moving funds.
|
|
12074
|
+
async proposeSponsorship(account, params) {
|
|
12075
|
+
const call = this._contract(account, params.sponsorshipAddress).populate("propose_sponsorship", [
|
|
12076
|
+
params.nftContract,
|
|
12077
|
+
cairo.uint256(params.tokenId),
|
|
12078
|
+
cairo.uint256(params.amount),
|
|
12079
|
+
params.duration,
|
|
12080
|
+
params.validUntil ?? 0,
|
|
12081
|
+
params.paymentToken,
|
|
12082
|
+
params.licenseTermsUri,
|
|
12083
|
+
params.transferable,
|
|
12084
|
+
cairo.uint256(params.royaltyBps)
|
|
12085
|
+
]);
|
|
12086
|
+
const res = await account.execute([call]);
|
|
12087
|
+
return { txHash: res.transaction_hash };
|
|
12088
|
+
}
|
|
12089
|
+
/** Proposer-only. Advisory against an acceptance in flight in the same block. */
|
|
12090
|
+
async withdrawProposal(account, params) {
|
|
12091
|
+
const call = this._contract(account, params.sponsorshipAddress).populate("withdraw_proposal", [
|
|
12092
|
+
cairo.uint256(params.proposalId)
|
|
12093
|
+
]);
|
|
12094
|
+
const res = await account.execute([call]);
|
|
12082
12095
|
return { txHash: res.transaction_hash };
|
|
12083
12096
|
}
|
|
12084
12097
|
/**
|
|
12085
|
-
*
|
|
12086
|
-
*
|
|
12087
|
-
*
|
|
12088
|
-
*
|
|
12098
|
+
* Asset-owner-only (re-verified on-chain — a proposal binds to the asset,
|
|
12099
|
+
* not a person: whoever owns it at acceptance time is paid and issues the
|
|
12100
|
+
* license). Settles payment and mints the license atomically, same as
|
|
12101
|
+
* `acceptBid`.
|
|
12089
12102
|
*/
|
|
12090
|
-
async
|
|
12091
|
-
const
|
|
12092
|
-
|
|
12093
|
-
|
|
12094
|
-
|
|
12095
|
-
|
|
12096
|
-
|
|
12097
|
-
|
|
12098
|
-
|
|
12099
|
-
|
|
12100
|
-
|
|
12101
|
-
|
|
12102
|
-
const res = await account.execute(
|
|
12103
|
+
async acceptProposal(account, params) {
|
|
12104
|
+
const call = this._contract(account, params.sponsorshipAddress).populate("accept_proposal", [
|
|
12105
|
+
cairo.uint256(params.proposalId)
|
|
12106
|
+
]);
|
|
12107
|
+
const res = await account.execute([call]);
|
|
12108
|
+
return { txHash: res.transaction_hash };
|
|
12109
|
+
}
|
|
12110
|
+
/** Asset-owner-only. */
|
|
12111
|
+
async rejectProposal(account, params) {
|
|
12112
|
+
const call = this._contract(account, params.sponsorshipAddress).populate("reject_proposal", [
|
|
12113
|
+
cairo.uint256(params.proposalId)
|
|
12114
|
+
]);
|
|
12115
|
+
const res = await account.execute([call]);
|
|
12103
12116
|
return { txHash: res.transaction_hash };
|
|
12104
12117
|
}
|
|
12118
|
+
// ── Reads ───────────────────────────────────────────────────────────────────
|
|
12119
|
+
async getOffer(params) {
|
|
12120
|
+
const o = await this._contractRead(params.sponsorshipAddress).call("get_offer", [
|
|
12121
|
+
cairo.uint256(params.offerId)
|
|
12122
|
+
]);
|
|
12123
|
+
return {
|
|
12124
|
+
author: o.author,
|
|
12125
|
+
nftContract: o.nft_contract,
|
|
12126
|
+
tokenId: BigInt(o.token_id),
|
|
12127
|
+
minAmount: BigInt(o.min_amount),
|
|
12128
|
+
duration: Number(o.duration),
|
|
12129
|
+
paymentToken: o.payment_token,
|
|
12130
|
+
licenseTermsUri: o.license_terms_uri,
|
|
12131
|
+
transferable: Boolean(o.transferable),
|
|
12132
|
+
specificSponsor: o.specific_sponsor?.variant === "Some" ? o.specific_sponsor.values?.[0] ?? o.specific_sponsor.value : null,
|
|
12133
|
+
open: Boolean(o.open),
|
|
12134
|
+
royaltyBps: BigInt(o.royalty_bps)
|
|
12135
|
+
};
|
|
12136
|
+
}
|
|
12137
|
+
async getBid(params) {
|
|
12138
|
+
const result = await this._contractRead(params.sponsorshipAddress).call("get_bid", [
|
|
12139
|
+
cairo.uint256(params.offerId),
|
|
12140
|
+
params.sponsor
|
|
12141
|
+
]);
|
|
12142
|
+
return BigInt(result);
|
|
12143
|
+
}
|
|
12144
|
+
async getProposal(params) {
|
|
12145
|
+
const p = await this._contractRead(params.sponsorshipAddress).call("get_proposal", [
|
|
12146
|
+
cairo.uint256(params.proposalId)
|
|
12147
|
+
]);
|
|
12148
|
+
return {
|
|
12149
|
+
proposer: p.proposer,
|
|
12150
|
+
nftContract: p.nft_contract,
|
|
12151
|
+
tokenId: BigInt(p.token_id),
|
|
12152
|
+
amount: BigInt(p.amount),
|
|
12153
|
+
duration: Number(p.duration),
|
|
12154
|
+
validUntil: Number(p.valid_until),
|
|
12155
|
+
paymentToken: p.payment_token,
|
|
12156
|
+
licenseTermsUri: p.license_terms_uri,
|
|
12157
|
+
transferable: Boolean(p.transferable),
|
|
12158
|
+
open: Boolean(p.open),
|
|
12159
|
+
royaltyBps: BigInt(p.royalty_bps)
|
|
12160
|
+
};
|
|
12161
|
+
}
|
|
12162
|
+
async getLastOfferId(params) {
|
|
12163
|
+
const result = await this._contractRead(params?.sponsorshipAddress).call("get_last_offer_id", []);
|
|
12164
|
+
return BigInt(result);
|
|
12165
|
+
}
|
|
12166
|
+
async getLastProposalId(params) {
|
|
12167
|
+
const result = await this._contractRead(params?.sponsorshipAddress).call("get_last_proposal_id", []);
|
|
12168
|
+
return BigInt(result);
|
|
12169
|
+
}
|
|
12170
|
+
async getLastLicenseId(params) {
|
|
12171
|
+
const result = await this._contractRead(params?.sponsorshipAddress).call("get_last_license_id", []);
|
|
12172
|
+
return BigInt(result);
|
|
12173
|
+
}
|
|
12174
|
+
/** EIP-2981 — royalty recipient (the license's issuing author) and amount owed on a resale at `salePrice`. */
|
|
12175
|
+
async royaltyInfo(params) {
|
|
12176
|
+
const [recipient, amount] = await this._contractRead(params.sponsorshipAddress).call("royalty_info", [
|
|
12177
|
+
cairo.uint256(params.licenseId),
|
|
12178
|
+
cairo.uint256(params.salePrice)
|
|
12179
|
+
]);
|
|
12180
|
+
return { recipient, amount: BigInt(amount) };
|
|
12181
|
+
}
|
|
12105
12182
|
};
|
|
12106
12183
|
|
|
12107
12184
|
// src/starknet/client.ts
|
|
@@ -12911,6 +12988,6 @@ function encodeByteArray(str) {
|
|
|
12911
12988
|
];
|
|
12912
12989
|
}
|
|
12913
12990
|
|
|
12914
|
-
export { ADMIN_HEADERS, ADMIN_SCOPE, ApiClient, CHAINS, MAX_SUPPLY as COIN_MAX_SUPPLY, MIN_SUPPLY as COIN_MIN_SUPPLY, ClubService, CreatorCoinFactoryABI, CreatorCoinService, DEFAULT_CHAIN, DEFAULT_CURRENCY, DropCollectionABI, DropFactoryABI, DropService, ERC1155CollectionService, FeeConfigSchema, IPClubABI, IPClubCollectionABI, IPClubFactoryABI, IPClubNFTABI, IPCollection1155ABI, IPCollection1155FactoryABI, IPCollectionABI, IPGenesisABI, IPMarketplaceABI, IPNftABI, IPSponsorshipABI,
|
|
12991
|
+
export { ADMIN_HEADERS, ADMIN_SCOPE, ApiClient, CHAINS, MAX_SUPPLY as COIN_MAX_SUPPLY, MIN_SUPPLY as COIN_MIN_SUPPLY, ClubService, CreatorCoinFactoryABI, CreatorCoinService, DEFAULT_CHAIN, DEFAULT_CURRENCY, DropCollectionABI, DropFactoryABI, DropService, ERC1155CollectionService, FeeConfigSchema, IPClubABI, IPClubCollectionABI, IPClubFactoryABI, IPClubNFTABI, IPCollection1155ABI, IPCollection1155FactoryABI, IPCollectionABI, IPGenesisABI, IPMarketplaceABI, IPNftABI, IPSponsorshipABI, IPTicketCollectionABI, IPTicketCollectionFactoryABI, LAUNCH_PRICE_QUOTE_PER_COIN, Medialane1155ABI, MedialaneApiError, MedialaneClient, MedialaneError, OPEN_LICENSES, POPCollectionABI, POPFactoryABI, PUBLIC_RPC_FALLBACKS, PopService, STARKNET_COLLECTION_1155_CLASS_HASH, STARKNET_COLLECTION_1155_CONTRACT, STARKNET_COLLECTION_1155_FACTORY_CLASS_HASH, STARKNET_COLLECTION_1155_START_BLOCK, STARKNET_COLLECTION_721_CONTRACT, STARKNET_COLLECTION_721_START_BLOCK, STARKNET_CREATOR_COIN_CLASS_HASH, STARKNET_CREATOR_COIN_EKUBO_LAUNCHER, STARKNET_CREATOR_COIN_FACTORY_CLASS_HASH, STARKNET_CREATOR_COIN_FACTORY_CONTRACT, STARKNET_CREATOR_COIN_START_BLOCK, STARKNET_DROP_COLLECTION_CLASS_HASH, STARKNET_DROP_FACTORY_CONTRACT, STARKNET_EKUBO_CORE, STARKNET_IPCOLLECTION_CLASS_HASH, STARKNET_IPNFT_CLASS_HASH, STARKNET_IP_CLUB_COLLECTION_CLASS_HASH, STARKNET_IP_CLUB_FACTORY_CONTRACT, STARKNET_IP_CLUB_NFT_CLASS_HASH, STARKNET_IP_CLUB_REGISTRY_CONTRACT, STARKNET_IP_SPONSORSHIP_CLASS_HASH, STARKNET_IP_SPONSORSHIP_CONTRACT, STARKNET_IP_TICKETS_FACTORY_CONTRACT, STARKNET_IP_TICKET_COLLECTION_CLASS_HASH, STARKNET_MARKETPLACE_1155_CLASS_HASH, STARKNET_MARKETPLACE_1155_CONTRACT, STARKNET_MARKETPLACE_1155_START_BLOCK, STARKNET_MARKETPLACE_721_CLASS_HASH, STARKNET_MARKETPLACE_721_CONTRACT, STARKNET_MARKETPLACE_721_START_BLOCK, STARKNET_NFTCOMMENTS_CONTRACT, STARKNET_POP_COLLECTION_CLASS_HASH, STARKNET_POP_FACTORY_CONTRACT, SUPPORTED_TOKENS, SponsorshipService, StarknetVenue, TicketService, VALIDATED_EKUBO_PARAMS, adminRequestDigest, build1155CancellationTypedData, build1155OrderTypedData, buildAdminSessionTypedData, buildCancellationTypedData, buildCreateCreatorCoinCall, buildFeeCall, buildLaunchOnEkuboCalls, buildOrderTypedData, buybackQuoteRaw, toRaw as coinToRaw, createAdminSessionGrant, createFailoverFetch, encodeAdminHeaders, encodeByteArray, fdvHuman, formatAmount, getCoordinates, getCounter, getCounter1155, getCreatorCoinPrice, getListableTokens, getOrderDetails, getOrderDetails1155, getService, getServicesByCapability, getSiwsStorageKey, getStarknetCoordinates, getStoredSiwsToken, getTokenByAddress, getTokenBySymbol, hasCapability, isServiceId, isSiwsTokenValid, isTransientRpcError, listServices, normalizeAddress, normalizeHash, normalizeSiwsSignature, parseAdminHeaders, parseAmount, parseCreatorCoinCreated, randomNonce, requestSiwsToken, resolveConfig, resolveFeeConfig, sessionKeyHashOf, shortenAddress, signAdminRequest, storeSiwsToken, stringifyBigInts, teamCoinsRaw, u256ToBigInt, validateName as validateCoinName, validateSupply as validateCoinSupply, validateSymbol as validateCoinSymbol, verifyAdminRequestSig };
|
|
12915
12992
|
//# sourceMappingURL=index.js.map
|
|
12916
12993
|
//# sourceMappingURL=index.js.map
|