@medialane/sdk 0.66.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 +11 -9
- 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 +11 -9
- 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 +760 -684
- 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 +760 -683
- package/dist/index.js.map +1 -1
- package/dist/solana/index.cjs +11 -9
- 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 +11 -9
- package/dist/solana/index.js.map +1 -1
- package/dist/starknet/index.cjs +715 -649
- 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 +716 -649
- package/dist/starknet/index.js.map +1 -1
- package/dist/stellar/index.cjs +11 -9
- 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 +11 -9
- 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/starknet/index.cjs
CHANGED
|
@@ -44,16 +44,18 @@ var COORDINATES = {
|
|
|
44
44
|
ipClubRegistry: "0x00e189c619b6bb07d78973a149641c59c37eb0716f8584d7520bce12d303eede",
|
|
45
45
|
ipClubNftClassHash: "0x02bc9b20cca21b04245e9215bf7121f4d7295b195890e449b472b573017fb889",
|
|
46
46
|
ipClubStartBlock: 11404776,
|
|
47
|
-
ipClubFactory: "
|
|
47
|
+
ipClubFactory: "0x05519705345ce225db666253a21cf89d1c675658f16cc6ae4320cefd1a1219a3",
|
|
48
48
|
ipClubFactoryClassHash: "0x07197062578375d962b2d42d3e91560770b11b1c97a9defb74c706a2c5299473",
|
|
49
|
-
ipClubCollectionClassHash: "
|
|
50
|
-
ipClubFactoryStartBlock:
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
//
|
|
54
|
-
//
|
|
55
|
-
//
|
|
56
|
-
|
|
49
|
+
ipClubCollectionClassHash: "0x35b8836a2269523ae9176077ec525451cce1053b2acd9fae3b05354aa4eded3",
|
|
50
|
+
ipClubFactoryStartBlock: 11884796,
|
|
51
|
+
// v3 redesign (deployed 2026-07-15): single contract is both the
|
|
52
|
+
// offer/bid/proposal registry and the license collection (embeds
|
|
53
|
+
// ERC721Component directly) — no separate receipt contract, no
|
|
54
|
+
// set_minter bootstrap. Supersedes the 2026-07-02 v2 address, which had
|
|
55
|
+
// zero offers/licenses ever issued (clean cutover, no reclassification).
|
|
56
|
+
ipSponsorship: "0x03729ebe0fedf29ec97fca34db09174772af7f870af26a26e024a61040143e5c",
|
|
57
|
+
ipSponsorshipClassHash: "0x0626daac2ed7e2bf630ef5b10104b3202db1559216c0c1a504c0e99be2fbfec3",
|
|
58
|
+
ipSponsorshipStartBlock: 11896456
|
|
57
59
|
}
|
|
58
60
|
};
|
|
59
61
|
function getCoordinates(chain) {
|
|
@@ -884,7 +886,7 @@ SN.ipClubNftClassHash;
|
|
|
884
886
|
SN.ipClubFactory;
|
|
885
887
|
SN.ipClubCollectionClassHash;
|
|
886
888
|
SN.ipSponsorship;
|
|
887
|
-
SN.
|
|
889
|
+
SN.ipSponsorshipClassHash;
|
|
888
890
|
SN.creatorCoinFactory;
|
|
889
891
|
SN.creatorCoinEkuboLauncher;
|
|
890
892
|
SN.creatorCoinClassHash;
|
|
@@ -8742,8 +8744,26 @@ var IPClubCollectionABI = [
|
|
|
8742
8744
|
var IPSponsorshipABI = [
|
|
8743
8745
|
{
|
|
8744
8746
|
"type": "impl",
|
|
8745
|
-
"name": "
|
|
8746
|
-
"interface_name": "
|
|
8747
|
+
"name": "ERC721MetadataImpl",
|
|
8748
|
+
"interface_name": "openzeppelin_token::erc721::interface::IERC721Metadata"
|
|
8749
|
+
},
|
|
8750
|
+
{
|
|
8751
|
+
"type": "struct",
|
|
8752
|
+
"name": "core::byte_array::ByteArray",
|
|
8753
|
+
"members": [
|
|
8754
|
+
{
|
|
8755
|
+
"name": "data",
|
|
8756
|
+
"type": "core::array::Array::<core::bytes_31::bytes31>"
|
|
8757
|
+
},
|
|
8758
|
+
{
|
|
8759
|
+
"name": "pending_word",
|
|
8760
|
+
"type": "core::felt252"
|
|
8761
|
+
},
|
|
8762
|
+
{
|
|
8763
|
+
"name": "pending_word_len",
|
|
8764
|
+
"type": "core::internal::bounded_int::BoundedInt::<0, 30>"
|
|
8765
|
+
}
|
|
8766
|
+
]
|
|
8747
8767
|
},
|
|
8748
8768
|
{
|
|
8749
8769
|
"type": "struct",
|
|
@@ -8760,23 +8780,81 @@ var IPSponsorshipABI = [
|
|
|
8760
8780
|
]
|
|
8761
8781
|
},
|
|
8762
8782
|
{
|
|
8763
|
-
"type": "
|
|
8764
|
-
"name": "
|
|
8765
|
-
"
|
|
8783
|
+
"type": "interface",
|
|
8784
|
+
"name": "openzeppelin_token::erc721::interface::IERC721Metadata",
|
|
8785
|
+
"items": [
|
|
8766
8786
|
{
|
|
8767
|
-
"
|
|
8768
|
-
"
|
|
8787
|
+
"type": "function",
|
|
8788
|
+
"name": "name",
|
|
8789
|
+
"inputs": [],
|
|
8790
|
+
"outputs": [
|
|
8791
|
+
{
|
|
8792
|
+
"type": "core::byte_array::ByteArray"
|
|
8793
|
+
}
|
|
8794
|
+
],
|
|
8795
|
+
"state_mutability": "view"
|
|
8769
8796
|
},
|
|
8770
8797
|
{
|
|
8771
|
-
"
|
|
8772
|
-
"
|
|
8798
|
+
"type": "function",
|
|
8799
|
+
"name": "symbol",
|
|
8800
|
+
"inputs": [],
|
|
8801
|
+
"outputs": [
|
|
8802
|
+
{
|
|
8803
|
+
"type": "core::byte_array::ByteArray"
|
|
8804
|
+
}
|
|
8805
|
+
],
|
|
8806
|
+
"state_mutability": "view"
|
|
8773
8807
|
},
|
|
8774
8808
|
{
|
|
8775
|
-
"
|
|
8776
|
-
"
|
|
8809
|
+
"type": "function",
|
|
8810
|
+
"name": "token_uri",
|
|
8811
|
+
"inputs": [
|
|
8812
|
+
{
|
|
8813
|
+
"name": "token_id",
|
|
8814
|
+
"type": "core::integer::u256"
|
|
8815
|
+
}
|
|
8816
|
+
],
|
|
8817
|
+
"outputs": [
|
|
8818
|
+
{
|
|
8819
|
+
"type": "core::byte_array::ByteArray"
|
|
8820
|
+
}
|
|
8821
|
+
],
|
|
8822
|
+
"state_mutability": "view"
|
|
8823
|
+
}
|
|
8824
|
+
]
|
|
8825
|
+
},
|
|
8826
|
+
{
|
|
8827
|
+
"type": "impl",
|
|
8828
|
+
"name": "ERC721MetadataCamelOnlyImpl",
|
|
8829
|
+
"interface_name": "openzeppelin_token::erc721::interface::IERC721MetadataCamelOnly"
|
|
8830
|
+
},
|
|
8831
|
+
{
|
|
8832
|
+
"type": "interface",
|
|
8833
|
+
"name": "openzeppelin_token::erc721::interface::IERC721MetadataCamelOnly",
|
|
8834
|
+
"items": [
|
|
8835
|
+
{
|
|
8836
|
+
"type": "function",
|
|
8837
|
+
"name": "tokenURI",
|
|
8838
|
+
"inputs": [
|
|
8839
|
+
{
|
|
8840
|
+
"name": "tokenId",
|
|
8841
|
+
"type": "core::integer::u256"
|
|
8842
|
+
}
|
|
8843
|
+
],
|
|
8844
|
+
"outputs": [
|
|
8845
|
+
{
|
|
8846
|
+
"type": "core::byte_array::ByteArray"
|
|
8847
|
+
}
|
|
8848
|
+
],
|
|
8849
|
+
"state_mutability": "view"
|
|
8777
8850
|
}
|
|
8778
8851
|
]
|
|
8779
8852
|
},
|
|
8853
|
+
{
|
|
8854
|
+
"type": "impl",
|
|
8855
|
+
"name": "IPSponsorshipImpl",
|
|
8856
|
+
"interface_name": "ip_sponsorship::interface::IIPSponsorship"
|
|
8857
|
+
},
|
|
8780
8858
|
{
|
|
8781
8859
|
"type": "enum",
|
|
8782
8860
|
"name": "core::bool",
|
|
@@ -8848,19 +8926,19 @@ var IPSponsorshipABI = [
|
|
|
8848
8926
|
{
|
|
8849
8927
|
"name": "open",
|
|
8850
8928
|
"type": "core::bool"
|
|
8929
|
+
},
|
|
8930
|
+
{
|
|
8931
|
+
"name": "royalty_bps",
|
|
8932
|
+
"type": "core::integer::u256"
|
|
8851
8933
|
}
|
|
8852
8934
|
]
|
|
8853
8935
|
},
|
|
8854
8936
|
{
|
|
8855
8937
|
"type": "struct",
|
|
8856
|
-
"name": "ip_sponsorship::types::
|
|
8938
|
+
"name": "ip_sponsorship::types::SponsorshipProposal",
|
|
8857
8939
|
"members": [
|
|
8858
8940
|
{
|
|
8859
|
-
"name": "
|
|
8860
|
-
"type": "core::starknet::contract_address::ContractAddress"
|
|
8861
|
-
},
|
|
8862
|
-
{
|
|
8863
|
-
"name": "sponsor",
|
|
8941
|
+
"name": "proposer",
|
|
8864
8942
|
"type": "core::starknet::contract_address::ContractAddress"
|
|
8865
8943
|
},
|
|
8866
8944
|
{
|
|
@@ -8872,20 +8950,36 @@ var IPSponsorshipABI = [
|
|
|
8872
8950
|
"type": "core::integer::u256"
|
|
8873
8951
|
},
|
|
8874
8952
|
{
|
|
8875
|
-
"name": "
|
|
8953
|
+
"name": "amount",
|
|
8876
8954
|
"type": "core::integer::u256"
|
|
8877
8955
|
},
|
|
8878
8956
|
{
|
|
8879
|
-
"name": "
|
|
8957
|
+
"name": "duration",
|
|
8880
8958
|
"type": "core::integer::u64"
|
|
8881
8959
|
},
|
|
8882
8960
|
{
|
|
8883
|
-
"name": "
|
|
8884
|
-
"type": "core::
|
|
8961
|
+
"name": "valid_until",
|
|
8962
|
+
"type": "core::integer::u64"
|
|
8963
|
+
},
|
|
8964
|
+
{
|
|
8965
|
+
"name": "payment_token",
|
|
8966
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
8885
8967
|
},
|
|
8886
8968
|
{
|
|
8887
8969
|
"name": "license_terms_uri",
|
|
8888
8970
|
"type": "core::byte_array::ByteArray"
|
|
8971
|
+
},
|
|
8972
|
+
{
|
|
8973
|
+
"name": "transferable",
|
|
8974
|
+
"type": "core::bool"
|
|
8975
|
+
},
|
|
8976
|
+
{
|
|
8977
|
+
"name": "open",
|
|
8978
|
+
"type": "core::bool"
|
|
8979
|
+
},
|
|
8980
|
+
{
|
|
8981
|
+
"name": "royalty_bps",
|
|
8982
|
+
"type": "core::integer::u256"
|
|
8889
8983
|
}
|
|
8890
8984
|
]
|
|
8891
8985
|
},
|
|
@@ -8925,6 +9019,10 @@ var IPSponsorshipABI = [
|
|
|
8925
9019
|
"name": "transferable",
|
|
8926
9020
|
"type": "core::bool"
|
|
8927
9021
|
},
|
|
9022
|
+
{
|
|
9023
|
+
"name": "royalty_bps",
|
|
9024
|
+
"type": "core::integer::u256"
|
|
9025
|
+
},
|
|
8928
9026
|
{
|
|
8929
9027
|
"name": "specific_sponsor",
|
|
8930
9028
|
"type": "core::option::Option::<core::starknet::contract_address::ContractAddress>"
|
|
@@ -9001,22 +9099,6 @@ var IPSponsorshipABI = [
|
|
|
9001
9099
|
],
|
|
9002
9100
|
"state_mutability": "external"
|
|
9003
9101
|
},
|
|
9004
|
-
{
|
|
9005
|
-
"type": "function",
|
|
9006
|
-
"name": "transfer_license",
|
|
9007
|
-
"inputs": [
|
|
9008
|
-
{
|
|
9009
|
-
"name": "license_id",
|
|
9010
|
-
"type": "core::integer::u256"
|
|
9011
|
-
},
|
|
9012
|
-
{
|
|
9013
|
-
"name": "to",
|
|
9014
|
-
"type": "core::starknet::contract_address::ContractAddress"
|
|
9015
|
-
}
|
|
9016
|
-
],
|
|
9017
|
-
"outputs": [],
|
|
9018
|
-
"state_mutability": "external"
|
|
9019
|
-
},
|
|
9020
9102
|
{
|
|
9021
9103
|
"type": "function",
|
|
9022
9104
|
"name": "get_offer",
|
|
@@ -9053,38 +9135,6 @@ var IPSponsorshipABI = [
|
|
|
9053
9135
|
],
|
|
9054
9136
|
"state_mutability": "view"
|
|
9055
9137
|
},
|
|
9056
|
-
{
|
|
9057
|
-
"type": "function",
|
|
9058
|
-
"name": "get_license",
|
|
9059
|
-
"inputs": [
|
|
9060
|
-
{
|
|
9061
|
-
"name": "license_id",
|
|
9062
|
-
"type": "core::integer::u256"
|
|
9063
|
-
}
|
|
9064
|
-
],
|
|
9065
|
-
"outputs": [
|
|
9066
|
-
{
|
|
9067
|
-
"type": "ip_sponsorship::types::License"
|
|
9068
|
-
}
|
|
9069
|
-
],
|
|
9070
|
-
"state_mutability": "view"
|
|
9071
|
-
},
|
|
9072
|
-
{
|
|
9073
|
-
"type": "function",
|
|
9074
|
-
"name": "is_license_valid",
|
|
9075
|
-
"inputs": [
|
|
9076
|
-
{
|
|
9077
|
-
"name": "license_id",
|
|
9078
|
-
"type": "core::integer::u256"
|
|
9079
|
-
}
|
|
9080
|
-
],
|
|
9081
|
-
"outputs": [
|
|
9082
|
-
{
|
|
9083
|
-
"type": "core::bool"
|
|
9084
|
-
}
|
|
9085
|
-
],
|
|
9086
|
-
"state_mutability": "view"
|
|
9087
|
-
},
|
|
9088
9138
|
{
|
|
9089
9139
|
"type": "function",
|
|
9090
9140
|
"name": "get_last_offer_id",
|
|
@@ -9106,489 +9156,74 @@ var IPSponsorshipABI = [
|
|
|
9106
9156
|
}
|
|
9107
9157
|
],
|
|
9108
9158
|
"state_mutability": "view"
|
|
9109
|
-
}
|
|
9110
|
-
]
|
|
9111
|
-
},
|
|
9112
|
-
{
|
|
9113
|
-
"type": "impl",
|
|
9114
|
-
"name": "SRC5Impl",
|
|
9115
|
-
"interface_name": "openzeppelin_introspection::interface::ISRC5"
|
|
9116
|
-
},
|
|
9117
|
-
{
|
|
9118
|
-
"type": "interface",
|
|
9119
|
-
"name": "openzeppelin_introspection::interface::ISRC5",
|
|
9120
|
-
"items": [
|
|
9159
|
+
},
|
|
9121
9160
|
{
|
|
9122
9161
|
"type": "function",
|
|
9123
|
-
"name": "
|
|
9162
|
+
"name": "propose_sponsorship",
|
|
9124
9163
|
"inputs": [
|
|
9125
9164
|
{
|
|
9126
|
-
"name": "
|
|
9127
|
-
"type": "core::
|
|
9165
|
+
"name": "nft_contract",
|
|
9166
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
9167
|
+
},
|
|
9168
|
+
{
|
|
9169
|
+
"name": "token_id",
|
|
9170
|
+
"type": "core::integer::u256"
|
|
9171
|
+
},
|
|
9172
|
+
{
|
|
9173
|
+
"name": "amount",
|
|
9174
|
+
"type": "core::integer::u256"
|
|
9175
|
+
},
|
|
9176
|
+
{
|
|
9177
|
+
"name": "duration",
|
|
9178
|
+
"type": "core::integer::u64"
|
|
9179
|
+
},
|
|
9180
|
+
{
|
|
9181
|
+
"name": "valid_until",
|
|
9182
|
+
"type": "core::integer::u64"
|
|
9183
|
+
},
|
|
9184
|
+
{
|
|
9185
|
+
"name": "payment_token",
|
|
9186
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
9187
|
+
},
|
|
9188
|
+
{
|
|
9189
|
+
"name": "license_terms_uri",
|
|
9190
|
+
"type": "core::byte_array::ByteArray"
|
|
9191
|
+
},
|
|
9192
|
+
{
|
|
9193
|
+
"name": "transferable",
|
|
9194
|
+
"type": "core::bool"
|
|
9195
|
+
},
|
|
9196
|
+
{
|
|
9197
|
+
"name": "royalty_bps",
|
|
9198
|
+
"type": "core::integer::u256"
|
|
9128
9199
|
}
|
|
9129
9200
|
],
|
|
9130
9201
|
"outputs": [
|
|
9131
9202
|
{
|
|
9132
|
-
"type": "core::
|
|
9203
|
+
"type": "core::integer::u256"
|
|
9133
9204
|
}
|
|
9134
9205
|
],
|
|
9135
|
-
"state_mutability": "
|
|
9136
|
-
}
|
|
9137
|
-
]
|
|
9138
|
-
},
|
|
9139
|
-
{
|
|
9140
|
-
"type": "constructor",
|
|
9141
|
-
"name": "constructor",
|
|
9142
|
-
"inputs": []
|
|
9143
|
-
},
|
|
9144
|
-
{
|
|
9145
|
-
"type": "event",
|
|
9146
|
-
"name": "openzeppelin_introspection::src5::SRC5Component::Event",
|
|
9147
|
-
"kind": "enum",
|
|
9148
|
-
"variants": []
|
|
9149
|
-
},
|
|
9150
|
-
{
|
|
9151
|
-
"type": "event",
|
|
9152
|
-
"name": "ip_sponsorship::IPSponsorship::IPSponsorship::OfferCreated",
|
|
9153
|
-
"kind": "struct",
|
|
9154
|
-
"members": [
|
|
9155
|
-
{
|
|
9156
|
-
"name": "offer_id",
|
|
9157
|
-
"type": "core::integer::u256",
|
|
9158
|
-
"kind": "key"
|
|
9159
|
-
},
|
|
9160
|
-
{
|
|
9161
|
-
"name": "author",
|
|
9162
|
-
"type": "core::starknet::contract_address::ContractAddress",
|
|
9163
|
-
"kind": "key"
|
|
9206
|
+
"state_mutability": "external"
|
|
9164
9207
|
},
|
|
9165
|
-
{
|
|
9166
|
-
"name": "nft_contract",
|
|
9167
|
-
"type": "core::starknet::contract_address::ContractAddress",
|
|
9168
|
-
"kind": "key"
|
|
9169
|
-
},
|
|
9170
|
-
{
|
|
9171
|
-
"name": "token_id",
|
|
9172
|
-
"type": "core::integer::u256",
|
|
9173
|
-
"kind": "data"
|
|
9174
|
-
},
|
|
9175
|
-
{
|
|
9176
|
-
"name": "min_amount",
|
|
9177
|
-
"type": "core::integer::u256",
|
|
9178
|
-
"kind": "data"
|
|
9179
|
-
},
|
|
9180
|
-
{
|
|
9181
|
-
"name": "duration",
|
|
9182
|
-
"type": "core::integer::u64",
|
|
9183
|
-
"kind": "data"
|
|
9184
|
-
},
|
|
9185
|
-
{
|
|
9186
|
-
"name": "payment_token",
|
|
9187
|
-
"type": "core::starknet::contract_address::ContractAddress",
|
|
9188
|
-
"kind": "data"
|
|
9189
|
-
},
|
|
9190
|
-
{
|
|
9191
|
-
"name": "license_terms_uri",
|
|
9192
|
-
"type": "core::byte_array::ByteArray",
|
|
9193
|
-
"kind": "data"
|
|
9194
|
-
},
|
|
9195
|
-
{
|
|
9196
|
-
"name": "transferable",
|
|
9197
|
-
"type": "core::bool",
|
|
9198
|
-
"kind": "data"
|
|
9199
|
-
},
|
|
9200
|
-
{
|
|
9201
|
-
"name": "specific_sponsor",
|
|
9202
|
-
"type": "core::option::Option::<core::starknet::contract_address::ContractAddress>",
|
|
9203
|
-
"kind": "data"
|
|
9204
|
-
},
|
|
9205
|
-
{
|
|
9206
|
-
"name": "created_at",
|
|
9207
|
-
"type": "core::integer::u64",
|
|
9208
|
-
"kind": "data"
|
|
9209
|
-
}
|
|
9210
|
-
]
|
|
9211
|
-
},
|
|
9212
|
-
{
|
|
9213
|
-
"type": "event",
|
|
9214
|
-
"name": "ip_sponsorship::IPSponsorship::IPSponsorship::OfferStatusUpdated",
|
|
9215
|
-
"kind": "struct",
|
|
9216
|
-
"members": [
|
|
9217
|
-
{
|
|
9218
|
-
"name": "offer_id",
|
|
9219
|
-
"type": "core::integer::u256",
|
|
9220
|
-
"kind": "key"
|
|
9221
|
-
},
|
|
9222
|
-
{
|
|
9223
|
-
"name": "open",
|
|
9224
|
-
"type": "core::bool",
|
|
9225
|
-
"kind": "data"
|
|
9226
|
-
},
|
|
9227
|
-
{
|
|
9228
|
-
"name": "updated_at",
|
|
9229
|
-
"type": "core::integer::u64",
|
|
9230
|
-
"kind": "data"
|
|
9231
|
-
}
|
|
9232
|
-
]
|
|
9233
|
-
},
|
|
9234
|
-
{
|
|
9235
|
-
"type": "event",
|
|
9236
|
-
"name": "ip_sponsorship::IPSponsorship::IPSponsorship::BidPlaced",
|
|
9237
|
-
"kind": "struct",
|
|
9238
|
-
"members": [
|
|
9239
|
-
{
|
|
9240
|
-
"name": "offer_id",
|
|
9241
|
-
"type": "core::integer::u256",
|
|
9242
|
-
"kind": "key"
|
|
9243
|
-
},
|
|
9244
|
-
{
|
|
9245
|
-
"name": "sponsor",
|
|
9246
|
-
"type": "core::starknet::contract_address::ContractAddress",
|
|
9247
|
-
"kind": "key"
|
|
9248
|
-
},
|
|
9249
|
-
{
|
|
9250
|
-
"name": "amount",
|
|
9251
|
-
"type": "core::integer::u256",
|
|
9252
|
-
"kind": "data"
|
|
9253
|
-
},
|
|
9254
|
-
{
|
|
9255
|
-
"name": "bid_at",
|
|
9256
|
-
"type": "core::integer::u64",
|
|
9257
|
-
"kind": "data"
|
|
9258
|
-
}
|
|
9259
|
-
]
|
|
9260
|
-
},
|
|
9261
|
-
{
|
|
9262
|
-
"type": "event",
|
|
9263
|
-
"name": "ip_sponsorship::IPSponsorship::IPSponsorship::BidRetracted",
|
|
9264
|
-
"kind": "struct",
|
|
9265
|
-
"members": [
|
|
9266
|
-
{
|
|
9267
|
-
"name": "offer_id",
|
|
9268
|
-
"type": "core::integer::u256",
|
|
9269
|
-
"kind": "key"
|
|
9270
|
-
},
|
|
9271
|
-
{
|
|
9272
|
-
"name": "sponsor",
|
|
9273
|
-
"type": "core::starknet::contract_address::ContractAddress",
|
|
9274
|
-
"kind": "key"
|
|
9275
|
-
},
|
|
9276
|
-
{
|
|
9277
|
-
"name": "retracted_at",
|
|
9278
|
-
"type": "core::integer::u64",
|
|
9279
|
-
"kind": "data"
|
|
9280
|
-
}
|
|
9281
|
-
]
|
|
9282
|
-
},
|
|
9283
|
-
{
|
|
9284
|
-
"type": "event",
|
|
9285
|
-
"name": "ip_sponsorship::IPSponsorship::IPSponsorship::SponsorshipAccepted",
|
|
9286
|
-
"kind": "struct",
|
|
9287
|
-
"members": [
|
|
9288
|
-
{
|
|
9289
|
-
"name": "offer_id",
|
|
9290
|
-
"type": "core::integer::u256",
|
|
9291
|
-
"kind": "key"
|
|
9292
|
-
},
|
|
9293
|
-
{
|
|
9294
|
-
"name": "license_id",
|
|
9295
|
-
"type": "core::integer::u256",
|
|
9296
|
-
"kind": "key"
|
|
9297
|
-
},
|
|
9298
|
-
{
|
|
9299
|
-
"name": "sponsor",
|
|
9300
|
-
"type": "core::starknet::contract_address::ContractAddress",
|
|
9301
|
-
"kind": "key"
|
|
9302
|
-
},
|
|
9303
|
-
{
|
|
9304
|
-
"name": "author",
|
|
9305
|
-
"type": "core::starknet::contract_address::ContractAddress",
|
|
9306
|
-
"kind": "data"
|
|
9307
|
-
},
|
|
9308
|
-
{
|
|
9309
|
-
"name": "amount",
|
|
9310
|
-
"type": "core::integer::u256",
|
|
9311
|
-
"kind": "data"
|
|
9312
|
-
},
|
|
9313
|
-
{
|
|
9314
|
-
"name": "expires_at",
|
|
9315
|
-
"type": "core::integer::u64",
|
|
9316
|
-
"kind": "data"
|
|
9317
|
-
}
|
|
9318
|
-
]
|
|
9319
|
-
},
|
|
9320
|
-
{
|
|
9321
|
-
"type": "event",
|
|
9322
|
-
"name": "ip_sponsorship::IPSponsorship::IPSponsorship::LicenseTransferred",
|
|
9323
|
-
"kind": "struct",
|
|
9324
|
-
"members": [
|
|
9325
|
-
{
|
|
9326
|
-
"name": "license_id",
|
|
9327
|
-
"type": "core::integer::u256",
|
|
9328
|
-
"kind": "key"
|
|
9329
|
-
},
|
|
9330
|
-
{
|
|
9331
|
-
"name": "from",
|
|
9332
|
-
"type": "core::starknet::contract_address::ContractAddress",
|
|
9333
|
-
"kind": "key"
|
|
9334
|
-
},
|
|
9335
|
-
{
|
|
9336
|
-
"name": "to",
|
|
9337
|
-
"type": "core::starknet::contract_address::ContractAddress",
|
|
9338
|
-
"kind": "key"
|
|
9339
|
-
},
|
|
9340
|
-
{
|
|
9341
|
-
"name": "transferred_at",
|
|
9342
|
-
"type": "core::integer::u64",
|
|
9343
|
-
"kind": "data"
|
|
9344
|
-
}
|
|
9345
|
-
]
|
|
9346
|
-
},
|
|
9347
|
-
{
|
|
9348
|
-
"type": "event",
|
|
9349
|
-
"name": "ip_sponsorship::IPSponsorship::IPSponsorship::Event",
|
|
9350
|
-
"kind": "enum",
|
|
9351
|
-
"variants": [
|
|
9352
|
-
{
|
|
9353
|
-
"name": "SRC5Event",
|
|
9354
|
-
"type": "openzeppelin_introspection::src5::SRC5Component::Event",
|
|
9355
|
-
"kind": "flat"
|
|
9356
|
-
},
|
|
9357
|
-
{
|
|
9358
|
-
"name": "OfferCreated",
|
|
9359
|
-
"type": "ip_sponsorship::IPSponsorship::IPSponsorship::OfferCreated",
|
|
9360
|
-
"kind": "nested"
|
|
9361
|
-
},
|
|
9362
|
-
{
|
|
9363
|
-
"name": "OfferStatusUpdated",
|
|
9364
|
-
"type": "ip_sponsorship::IPSponsorship::IPSponsorship::OfferStatusUpdated",
|
|
9365
|
-
"kind": "nested"
|
|
9366
|
-
},
|
|
9367
|
-
{
|
|
9368
|
-
"name": "BidPlaced",
|
|
9369
|
-
"type": "ip_sponsorship::IPSponsorship::IPSponsorship::BidPlaced",
|
|
9370
|
-
"kind": "nested"
|
|
9371
|
-
},
|
|
9372
|
-
{
|
|
9373
|
-
"name": "BidRetracted",
|
|
9374
|
-
"type": "ip_sponsorship::IPSponsorship::IPSponsorship::BidRetracted",
|
|
9375
|
-
"kind": "nested"
|
|
9376
|
-
},
|
|
9377
|
-
{
|
|
9378
|
-
"name": "SponsorshipAccepted",
|
|
9379
|
-
"type": "ip_sponsorship::IPSponsorship::IPSponsorship::SponsorshipAccepted",
|
|
9380
|
-
"kind": "nested"
|
|
9381
|
-
},
|
|
9382
|
-
{
|
|
9383
|
-
"name": "LicenseTransferred",
|
|
9384
|
-
"type": "ip_sponsorship::IPSponsorship::IPSponsorship::LicenseTransferred",
|
|
9385
|
-
"kind": "nested"
|
|
9386
|
-
}
|
|
9387
|
-
]
|
|
9388
|
-
}
|
|
9389
|
-
];
|
|
9390
|
-
|
|
9391
|
-
// src/starknet/abis/ipSponsorshipLicense.ts
|
|
9392
|
-
var IPSponsorshipLicenseABI = [
|
|
9393
|
-
{
|
|
9394
|
-
"type": "impl",
|
|
9395
|
-
"name": "ERC721MetadataImpl",
|
|
9396
|
-
"interface_name": "openzeppelin_token::erc721::interface::IERC721Metadata"
|
|
9397
|
-
},
|
|
9398
|
-
{
|
|
9399
|
-
"type": "struct",
|
|
9400
|
-
"name": "core::byte_array::ByteArray",
|
|
9401
|
-
"members": [
|
|
9402
|
-
{
|
|
9403
|
-
"name": "data",
|
|
9404
|
-
"type": "core::array::Array::<core::bytes_31::bytes31>"
|
|
9405
|
-
},
|
|
9406
|
-
{
|
|
9407
|
-
"name": "pending_word",
|
|
9408
|
-
"type": "core::felt252"
|
|
9409
|
-
},
|
|
9410
|
-
{
|
|
9411
|
-
"name": "pending_word_len",
|
|
9412
|
-
"type": "core::internal::bounded_int::BoundedInt::<0, 30>"
|
|
9413
|
-
}
|
|
9414
|
-
]
|
|
9415
|
-
},
|
|
9416
|
-
{
|
|
9417
|
-
"type": "struct",
|
|
9418
|
-
"name": "core::integer::u256",
|
|
9419
|
-
"members": [
|
|
9420
|
-
{
|
|
9421
|
-
"name": "low",
|
|
9422
|
-
"type": "core::integer::u128"
|
|
9423
|
-
},
|
|
9424
|
-
{
|
|
9425
|
-
"name": "high",
|
|
9426
|
-
"type": "core::integer::u128"
|
|
9427
|
-
}
|
|
9428
|
-
]
|
|
9429
|
-
},
|
|
9430
|
-
{
|
|
9431
|
-
"type": "interface",
|
|
9432
|
-
"name": "openzeppelin_token::erc721::interface::IERC721Metadata",
|
|
9433
|
-
"items": [
|
|
9434
|
-
{
|
|
9435
|
-
"type": "function",
|
|
9436
|
-
"name": "name",
|
|
9437
|
-
"inputs": [],
|
|
9438
|
-
"outputs": [
|
|
9439
|
-
{
|
|
9440
|
-
"type": "core::byte_array::ByteArray"
|
|
9441
|
-
}
|
|
9442
|
-
],
|
|
9443
|
-
"state_mutability": "view"
|
|
9444
|
-
},
|
|
9445
|
-
{
|
|
9446
|
-
"type": "function",
|
|
9447
|
-
"name": "symbol",
|
|
9448
|
-
"inputs": [],
|
|
9449
|
-
"outputs": [
|
|
9450
|
-
{
|
|
9451
|
-
"type": "core::byte_array::ByteArray"
|
|
9452
|
-
}
|
|
9453
|
-
],
|
|
9454
|
-
"state_mutability": "view"
|
|
9455
|
-
},
|
|
9456
|
-
{
|
|
9457
|
-
"type": "function",
|
|
9458
|
-
"name": "token_uri",
|
|
9459
|
-
"inputs": [
|
|
9460
|
-
{
|
|
9461
|
-
"name": "token_id",
|
|
9462
|
-
"type": "core::integer::u256"
|
|
9463
|
-
}
|
|
9464
|
-
],
|
|
9465
|
-
"outputs": [
|
|
9466
|
-
{
|
|
9467
|
-
"type": "core::byte_array::ByteArray"
|
|
9468
|
-
}
|
|
9469
|
-
],
|
|
9470
|
-
"state_mutability": "view"
|
|
9471
|
-
}
|
|
9472
|
-
]
|
|
9473
|
-
},
|
|
9474
|
-
{
|
|
9475
|
-
"type": "impl",
|
|
9476
|
-
"name": "ERC721MetadataCamelOnlyImpl",
|
|
9477
|
-
"interface_name": "openzeppelin_token::erc721::interface::IERC721MetadataCamelOnly"
|
|
9478
|
-
},
|
|
9479
|
-
{
|
|
9480
|
-
"type": "interface",
|
|
9481
|
-
"name": "openzeppelin_token::erc721::interface::IERC721MetadataCamelOnly",
|
|
9482
|
-
"items": [
|
|
9483
|
-
{
|
|
9484
|
-
"type": "function",
|
|
9485
|
-
"name": "tokenURI",
|
|
9486
|
-
"inputs": [
|
|
9487
|
-
{
|
|
9488
|
-
"name": "tokenId",
|
|
9489
|
-
"type": "core::integer::u256"
|
|
9490
|
-
}
|
|
9491
|
-
],
|
|
9492
|
-
"outputs": [
|
|
9493
|
-
{
|
|
9494
|
-
"type": "core::byte_array::ByteArray"
|
|
9495
|
-
}
|
|
9496
|
-
],
|
|
9497
|
-
"state_mutability": "view"
|
|
9498
|
-
}
|
|
9499
|
-
]
|
|
9500
|
-
},
|
|
9501
|
-
{
|
|
9502
|
-
"type": "impl",
|
|
9503
|
-
"name": "IPSponsorshipLicenseImpl",
|
|
9504
|
-
"interface_name": "ip_sponsorship::interface::IIPSponsorshipLicense"
|
|
9505
|
-
},
|
|
9506
|
-
{
|
|
9507
|
-
"type": "enum",
|
|
9508
|
-
"name": "core::bool",
|
|
9509
|
-
"variants": [
|
|
9510
|
-
{
|
|
9511
|
-
"name": "False",
|
|
9512
|
-
"type": "()"
|
|
9513
|
-
},
|
|
9514
|
-
{
|
|
9515
|
-
"name": "True",
|
|
9516
|
-
"type": "()"
|
|
9517
|
-
}
|
|
9518
|
-
]
|
|
9519
|
-
},
|
|
9520
|
-
{
|
|
9521
|
-
"type": "struct",
|
|
9522
|
-
"name": "ip_sponsorship::types::LicenseData",
|
|
9523
|
-
"members": [
|
|
9524
|
-
{
|
|
9525
|
-
"name": "author",
|
|
9526
|
-
"type": "core::starknet::contract_address::ContractAddress"
|
|
9527
|
-
},
|
|
9528
|
-
{
|
|
9529
|
-
"name": "asset_contract",
|
|
9530
|
-
"type": "core::starknet::contract_address::ContractAddress"
|
|
9531
|
-
},
|
|
9532
|
-
{
|
|
9533
|
-
"name": "asset_token_id",
|
|
9534
|
-
"type": "core::integer::u256"
|
|
9535
|
-
},
|
|
9536
|
-
{
|
|
9537
|
-
"name": "expires_at",
|
|
9538
|
-
"type": "core::integer::u64"
|
|
9539
|
-
},
|
|
9540
|
-
{
|
|
9541
|
-
"name": "transferable",
|
|
9542
|
-
"type": "core::bool"
|
|
9543
|
-
},
|
|
9544
|
-
{
|
|
9545
|
-
"name": "royalty_bps",
|
|
9546
|
-
"type": "core::integer::u256"
|
|
9547
|
-
},
|
|
9548
|
-
{
|
|
9549
|
-
"name": "license_terms_uri",
|
|
9550
|
-
"type": "core::byte_array::ByteArray"
|
|
9551
|
-
}
|
|
9552
|
-
]
|
|
9553
|
-
},
|
|
9554
|
-
{
|
|
9555
|
-
"type": "interface",
|
|
9556
|
-
"name": "ip_sponsorship::interface::IIPSponsorshipLicense",
|
|
9557
|
-
"items": [
|
|
9558
9208
|
{
|
|
9559
9209
|
"type": "function",
|
|
9560
|
-
"name": "
|
|
9210
|
+
"name": "withdraw_proposal",
|
|
9561
9211
|
"inputs": [
|
|
9562
9212
|
{
|
|
9563
|
-
"name": "
|
|
9564
|
-
"type": "core::
|
|
9565
|
-
}
|
|
9566
|
-
],
|
|
9567
|
-
"outputs": [],
|
|
9568
|
-
"state_mutability": "external"
|
|
9569
|
-
},
|
|
9570
|
-
{
|
|
9571
|
-
"type": "function",
|
|
9572
|
-
"name": "get_minter",
|
|
9573
|
-
"inputs": [],
|
|
9574
|
-
"outputs": [
|
|
9575
|
-
{
|
|
9576
|
-
"type": "core::starknet::contract_address::ContractAddress"
|
|
9213
|
+
"name": "proposal_id",
|
|
9214
|
+
"type": "core::integer::u256"
|
|
9577
9215
|
}
|
|
9578
9216
|
],
|
|
9579
|
-
"
|
|
9217
|
+
"outputs": [],
|
|
9218
|
+
"state_mutability": "external"
|
|
9580
9219
|
},
|
|
9581
9220
|
{
|
|
9582
9221
|
"type": "function",
|
|
9583
|
-
"name": "
|
|
9222
|
+
"name": "accept_proposal",
|
|
9584
9223
|
"inputs": [
|
|
9585
9224
|
{
|
|
9586
|
-
"name": "
|
|
9587
|
-
"type": "core::
|
|
9588
|
-
},
|
|
9589
|
-
{
|
|
9590
|
-
"name": "data",
|
|
9591
|
-
"type": "ip_sponsorship::types::LicenseData"
|
|
9225
|
+
"name": "proposal_id",
|
|
9226
|
+
"type": "core::integer::u256"
|
|
9592
9227
|
}
|
|
9593
9228
|
],
|
|
9594
9229
|
"outputs": [
|
|
@@ -9600,39 +9235,35 @@ var IPSponsorshipLicenseABI = [
|
|
|
9600
9235
|
},
|
|
9601
9236
|
{
|
|
9602
9237
|
"type": "function",
|
|
9603
|
-
"name": "
|
|
9238
|
+
"name": "reject_proposal",
|
|
9604
9239
|
"inputs": [
|
|
9605
9240
|
{
|
|
9606
|
-
"name": "
|
|
9241
|
+
"name": "proposal_id",
|
|
9607
9242
|
"type": "core::integer::u256"
|
|
9608
9243
|
}
|
|
9609
9244
|
],
|
|
9610
|
-
"outputs": [
|
|
9611
|
-
|
|
9612
|
-
"type": "ip_sponsorship::types::LicenseData"
|
|
9613
|
-
}
|
|
9614
|
-
],
|
|
9615
|
-
"state_mutability": "view"
|
|
9245
|
+
"outputs": [],
|
|
9246
|
+
"state_mutability": "external"
|
|
9616
9247
|
},
|
|
9617
9248
|
{
|
|
9618
9249
|
"type": "function",
|
|
9619
|
-
"name": "
|
|
9250
|
+
"name": "get_proposal",
|
|
9620
9251
|
"inputs": [
|
|
9621
9252
|
{
|
|
9622
|
-
"name": "
|
|
9253
|
+
"name": "proposal_id",
|
|
9623
9254
|
"type": "core::integer::u256"
|
|
9624
9255
|
}
|
|
9625
9256
|
],
|
|
9626
9257
|
"outputs": [
|
|
9627
9258
|
{
|
|
9628
|
-
"type": "
|
|
9259
|
+
"type": "ip_sponsorship::types::SponsorshipProposal"
|
|
9629
9260
|
}
|
|
9630
9261
|
],
|
|
9631
9262
|
"state_mutability": "view"
|
|
9632
9263
|
},
|
|
9633
9264
|
{
|
|
9634
9265
|
"type": "function",
|
|
9635
|
-
"name": "
|
|
9266
|
+
"name": "get_last_proposal_id",
|
|
9636
9267
|
"inputs": [],
|
|
9637
9268
|
"outputs": [
|
|
9638
9269
|
{
|
|
@@ -10008,134 +9639,435 @@ var IPSponsorshipLicenseABI = [
|
|
|
10008
9639
|
"name": "openzeppelin_introspection::interface::ISRC5",
|
|
10009
9640
|
"items": [
|
|
10010
9641
|
{
|
|
10011
|
-
"type": "function",
|
|
10012
|
-
"name": "supports_interface",
|
|
10013
|
-
"inputs": [
|
|
10014
|
-
{
|
|
10015
|
-
"name": "interface_id",
|
|
10016
|
-
"type": "core::felt252"
|
|
10017
|
-
}
|
|
10018
|
-
],
|
|
10019
|
-
"outputs": [
|
|
10020
|
-
{
|
|
10021
|
-
"type": "core::bool"
|
|
10022
|
-
}
|
|
10023
|
-
],
|
|
10024
|
-
"state_mutability": "view"
|
|
9642
|
+
"type": "function",
|
|
9643
|
+
"name": "supports_interface",
|
|
9644
|
+
"inputs": [
|
|
9645
|
+
{
|
|
9646
|
+
"name": "interface_id",
|
|
9647
|
+
"type": "core::felt252"
|
|
9648
|
+
}
|
|
9649
|
+
],
|
|
9650
|
+
"outputs": [
|
|
9651
|
+
{
|
|
9652
|
+
"type": "core::bool"
|
|
9653
|
+
}
|
|
9654
|
+
],
|
|
9655
|
+
"state_mutability": "view"
|
|
9656
|
+
}
|
|
9657
|
+
]
|
|
9658
|
+
},
|
|
9659
|
+
{
|
|
9660
|
+
"type": "constructor",
|
|
9661
|
+
"name": "constructor",
|
|
9662
|
+
"inputs": [
|
|
9663
|
+
{
|
|
9664
|
+
"name": "name",
|
|
9665
|
+
"type": "core::byte_array::ByteArray"
|
|
9666
|
+
},
|
|
9667
|
+
{
|
|
9668
|
+
"name": "symbol",
|
|
9669
|
+
"type": "core::byte_array::ByteArray"
|
|
9670
|
+
}
|
|
9671
|
+
]
|
|
9672
|
+
},
|
|
9673
|
+
{
|
|
9674
|
+
"type": "event",
|
|
9675
|
+
"name": "openzeppelin_token::erc721::erc721::ERC721Component::Transfer",
|
|
9676
|
+
"kind": "struct",
|
|
9677
|
+
"members": [
|
|
9678
|
+
{
|
|
9679
|
+
"name": "from",
|
|
9680
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
9681
|
+
"kind": "key"
|
|
9682
|
+
},
|
|
9683
|
+
{
|
|
9684
|
+
"name": "to",
|
|
9685
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
9686
|
+
"kind": "key"
|
|
9687
|
+
},
|
|
9688
|
+
{
|
|
9689
|
+
"name": "token_id",
|
|
9690
|
+
"type": "core::integer::u256",
|
|
9691
|
+
"kind": "key"
|
|
9692
|
+
}
|
|
9693
|
+
]
|
|
9694
|
+
},
|
|
9695
|
+
{
|
|
9696
|
+
"type": "event",
|
|
9697
|
+
"name": "openzeppelin_token::erc721::erc721::ERC721Component::Approval",
|
|
9698
|
+
"kind": "struct",
|
|
9699
|
+
"members": [
|
|
9700
|
+
{
|
|
9701
|
+
"name": "owner",
|
|
9702
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
9703
|
+
"kind": "key"
|
|
9704
|
+
},
|
|
9705
|
+
{
|
|
9706
|
+
"name": "approved",
|
|
9707
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
9708
|
+
"kind": "key"
|
|
9709
|
+
},
|
|
9710
|
+
{
|
|
9711
|
+
"name": "token_id",
|
|
9712
|
+
"type": "core::integer::u256",
|
|
9713
|
+
"kind": "key"
|
|
9714
|
+
}
|
|
9715
|
+
]
|
|
9716
|
+
},
|
|
9717
|
+
{
|
|
9718
|
+
"type": "event",
|
|
9719
|
+
"name": "openzeppelin_token::erc721::erc721::ERC721Component::ApprovalForAll",
|
|
9720
|
+
"kind": "struct",
|
|
9721
|
+
"members": [
|
|
9722
|
+
{
|
|
9723
|
+
"name": "owner",
|
|
9724
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
9725
|
+
"kind": "key"
|
|
9726
|
+
},
|
|
9727
|
+
{
|
|
9728
|
+
"name": "operator",
|
|
9729
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
9730
|
+
"kind": "key"
|
|
9731
|
+
},
|
|
9732
|
+
{
|
|
9733
|
+
"name": "approved",
|
|
9734
|
+
"type": "core::bool",
|
|
9735
|
+
"kind": "data"
|
|
9736
|
+
}
|
|
9737
|
+
]
|
|
9738
|
+
},
|
|
9739
|
+
{
|
|
9740
|
+
"type": "event",
|
|
9741
|
+
"name": "openzeppelin_token::erc721::erc721::ERC721Component::Event",
|
|
9742
|
+
"kind": "enum",
|
|
9743
|
+
"variants": [
|
|
9744
|
+
{
|
|
9745
|
+
"name": "Transfer",
|
|
9746
|
+
"type": "openzeppelin_token::erc721::erc721::ERC721Component::Transfer",
|
|
9747
|
+
"kind": "nested"
|
|
9748
|
+
},
|
|
9749
|
+
{
|
|
9750
|
+
"name": "Approval",
|
|
9751
|
+
"type": "openzeppelin_token::erc721::erc721::ERC721Component::Approval",
|
|
9752
|
+
"kind": "nested"
|
|
9753
|
+
},
|
|
9754
|
+
{
|
|
9755
|
+
"name": "ApprovalForAll",
|
|
9756
|
+
"type": "openzeppelin_token::erc721::erc721::ERC721Component::ApprovalForAll",
|
|
9757
|
+
"kind": "nested"
|
|
9758
|
+
}
|
|
9759
|
+
]
|
|
9760
|
+
},
|
|
9761
|
+
{
|
|
9762
|
+
"type": "event",
|
|
9763
|
+
"name": "openzeppelin_introspection::src5::SRC5Component::Event",
|
|
9764
|
+
"kind": "enum",
|
|
9765
|
+
"variants": []
|
|
9766
|
+
},
|
|
9767
|
+
{
|
|
9768
|
+
"type": "event",
|
|
9769
|
+
"name": "ip_sponsorship::IPSponsorship::IPSponsorship::OfferCreated",
|
|
9770
|
+
"kind": "struct",
|
|
9771
|
+
"members": [
|
|
9772
|
+
{
|
|
9773
|
+
"name": "offer_id",
|
|
9774
|
+
"type": "core::integer::u256",
|
|
9775
|
+
"kind": "key"
|
|
9776
|
+
},
|
|
9777
|
+
{
|
|
9778
|
+
"name": "author",
|
|
9779
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
9780
|
+
"kind": "key"
|
|
9781
|
+
},
|
|
9782
|
+
{
|
|
9783
|
+
"name": "nft_contract",
|
|
9784
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
9785
|
+
"kind": "key"
|
|
9786
|
+
},
|
|
9787
|
+
{
|
|
9788
|
+
"name": "token_id",
|
|
9789
|
+
"type": "core::integer::u256",
|
|
9790
|
+
"kind": "data"
|
|
9791
|
+
},
|
|
9792
|
+
{
|
|
9793
|
+
"name": "min_amount",
|
|
9794
|
+
"type": "core::integer::u256",
|
|
9795
|
+
"kind": "data"
|
|
9796
|
+
},
|
|
9797
|
+
{
|
|
9798
|
+
"name": "duration",
|
|
9799
|
+
"type": "core::integer::u64",
|
|
9800
|
+
"kind": "data"
|
|
9801
|
+
},
|
|
9802
|
+
{
|
|
9803
|
+
"name": "payment_token",
|
|
9804
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
9805
|
+
"kind": "data"
|
|
9806
|
+
},
|
|
9807
|
+
{
|
|
9808
|
+
"name": "license_terms_uri",
|
|
9809
|
+
"type": "core::byte_array::ByteArray",
|
|
9810
|
+
"kind": "data"
|
|
9811
|
+
},
|
|
9812
|
+
{
|
|
9813
|
+
"name": "transferable",
|
|
9814
|
+
"type": "core::bool",
|
|
9815
|
+
"kind": "data"
|
|
9816
|
+
},
|
|
9817
|
+
{
|
|
9818
|
+
"name": "royalty_bps",
|
|
9819
|
+
"type": "core::integer::u256",
|
|
9820
|
+
"kind": "data"
|
|
9821
|
+
},
|
|
9822
|
+
{
|
|
9823
|
+
"name": "specific_sponsor",
|
|
9824
|
+
"type": "core::option::Option::<core::starknet::contract_address::ContractAddress>",
|
|
9825
|
+
"kind": "data"
|
|
9826
|
+
},
|
|
9827
|
+
{
|
|
9828
|
+
"name": "created_at",
|
|
9829
|
+
"type": "core::integer::u64",
|
|
9830
|
+
"kind": "data"
|
|
9831
|
+
}
|
|
9832
|
+
]
|
|
9833
|
+
},
|
|
9834
|
+
{
|
|
9835
|
+
"type": "event",
|
|
9836
|
+
"name": "ip_sponsorship::IPSponsorship::IPSponsorship::OfferStatusUpdated",
|
|
9837
|
+
"kind": "struct",
|
|
9838
|
+
"members": [
|
|
9839
|
+
{
|
|
9840
|
+
"name": "offer_id",
|
|
9841
|
+
"type": "core::integer::u256",
|
|
9842
|
+
"kind": "key"
|
|
9843
|
+
},
|
|
9844
|
+
{
|
|
9845
|
+
"name": "open",
|
|
9846
|
+
"type": "core::bool",
|
|
9847
|
+
"kind": "data"
|
|
9848
|
+
},
|
|
9849
|
+
{
|
|
9850
|
+
"name": "updated_at",
|
|
9851
|
+
"type": "core::integer::u64",
|
|
9852
|
+
"kind": "data"
|
|
9853
|
+
}
|
|
9854
|
+
]
|
|
9855
|
+
},
|
|
9856
|
+
{
|
|
9857
|
+
"type": "event",
|
|
9858
|
+
"name": "ip_sponsorship::IPSponsorship::IPSponsorship::BidPlaced",
|
|
9859
|
+
"kind": "struct",
|
|
9860
|
+
"members": [
|
|
9861
|
+
{
|
|
9862
|
+
"name": "offer_id",
|
|
9863
|
+
"type": "core::integer::u256",
|
|
9864
|
+
"kind": "key"
|
|
9865
|
+
},
|
|
9866
|
+
{
|
|
9867
|
+
"name": "sponsor",
|
|
9868
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
9869
|
+
"kind": "key"
|
|
9870
|
+
},
|
|
9871
|
+
{
|
|
9872
|
+
"name": "amount",
|
|
9873
|
+
"type": "core::integer::u256",
|
|
9874
|
+
"kind": "data"
|
|
9875
|
+
},
|
|
9876
|
+
{
|
|
9877
|
+
"name": "bid_at",
|
|
9878
|
+
"type": "core::integer::u64",
|
|
9879
|
+
"kind": "data"
|
|
10025
9880
|
}
|
|
10026
9881
|
]
|
|
10027
9882
|
},
|
|
10028
9883
|
{
|
|
10029
|
-
"type": "
|
|
10030
|
-
"name": "
|
|
10031
|
-
"
|
|
9884
|
+
"type": "event",
|
|
9885
|
+
"name": "ip_sponsorship::IPSponsorship::IPSponsorship::BidRetracted",
|
|
9886
|
+
"kind": "struct",
|
|
9887
|
+
"members": [
|
|
10032
9888
|
{
|
|
10033
|
-
"name": "
|
|
10034
|
-
"type": "core::
|
|
9889
|
+
"name": "offer_id",
|
|
9890
|
+
"type": "core::integer::u256",
|
|
9891
|
+
"kind": "key"
|
|
10035
9892
|
},
|
|
10036
9893
|
{
|
|
10037
|
-
"name": "
|
|
10038
|
-
"type": "core::
|
|
9894
|
+
"name": "sponsor",
|
|
9895
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
9896
|
+
"kind": "key"
|
|
9897
|
+
},
|
|
9898
|
+
{
|
|
9899
|
+
"name": "retracted_at",
|
|
9900
|
+
"type": "core::integer::u64",
|
|
9901
|
+
"kind": "data"
|
|
10039
9902
|
}
|
|
10040
9903
|
]
|
|
10041
9904
|
},
|
|
10042
9905
|
{
|
|
10043
9906
|
"type": "event",
|
|
10044
|
-
"name": "
|
|
9907
|
+
"name": "ip_sponsorship::IPSponsorship::IPSponsorship::SponsorshipAccepted",
|
|
10045
9908
|
"kind": "struct",
|
|
10046
9909
|
"members": [
|
|
10047
9910
|
{
|
|
10048
|
-
"name": "
|
|
10049
|
-
"type": "core::
|
|
9911
|
+
"name": "offer_id",
|
|
9912
|
+
"type": "core::integer::u256",
|
|
10050
9913
|
"kind": "key"
|
|
10051
9914
|
},
|
|
10052
9915
|
{
|
|
10053
|
-
"name": "
|
|
9916
|
+
"name": "license_id",
|
|
9917
|
+
"type": "core::integer::u256",
|
|
9918
|
+
"kind": "key"
|
|
9919
|
+
},
|
|
9920
|
+
{
|
|
9921
|
+
"name": "sponsor",
|
|
10054
9922
|
"type": "core::starknet::contract_address::ContractAddress",
|
|
10055
9923
|
"kind": "key"
|
|
10056
9924
|
},
|
|
10057
9925
|
{
|
|
10058
|
-
"name": "
|
|
9926
|
+
"name": "author",
|
|
9927
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
9928
|
+
"kind": "data"
|
|
9929
|
+
},
|
|
9930
|
+
{
|
|
9931
|
+
"name": "amount",
|
|
10059
9932
|
"type": "core::integer::u256",
|
|
10060
|
-
"kind": "
|
|
9933
|
+
"kind": "data"
|
|
9934
|
+
},
|
|
9935
|
+
{
|
|
9936
|
+
"name": "expires_at",
|
|
9937
|
+
"type": "core::integer::u64",
|
|
9938
|
+
"kind": "data"
|
|
10061
9939
|
}
|
|
10062
9940
|
]
|
|
10063
9941
|
},
|
|
10064
9942
|
{
|
|
10065
9943
|
"type": "event",
|
|
10066
|
-
"name": "
|
|
9944
|
+
"name": "ip_sponsorship::IPSponsorship::IPSponsorship::ProposalCreated",
|
|
10067
9945
|
"kind": "struct",
|
|
10068
9946
|
"members": [
|
|
10069
9947
|
{
|
|
10070
|
-
"name": "
|
|
9948
|
+
"name": "proposal_id",
|
|
9949
|
+
"type": "core::integer::u256",
|
|
9950
|
+
"kind": "key"
|
|
9951
|
+
},
|
|
9952
|
+
{
|
|
9953
|
+
"name": "proposer",
|
|
10071
9954
|
"type": "core::starknet::contract_address::ContractAddress",
|
|
10072
9955
|
"kind": "key"
|
|
10073
9956
|
},
|
|
10074
9957
|
{
|
|
10075
|
-
"name": "
|
|
9958
|
+
"name": "nft_contract",
|
|
10076
9959
|
"type": "core::starknet::contract_address::ContractAddress",
|
|
10077
9960
|
"kind": "key"
|
|
10078
9961
|
},
|
|
10079
9962
|
{
|
|
10080
9963
|
"name": "token_id",
|
|
10081
9964
|
"type": "core::integer::u256",
|
|
10082
|
-
"kind": "
|
|
9965
|
+
"kind": "data"
|
|
9966
|
+
},
|
|
9967
|
+
{
|
|
9968
|
+
"name": "amount",
|
|
9969
|
+
"type": "core::integer::u256",
|
|
9970
|
+
"kind": "data"
|
|
9971
|
+
},
|
|
9972
|
+
{
|
|
9973
|
+
"name": "duration",
|
|
9974
|
+
"type": "core::integer::u64",
|
|
9975
|
+
"kind": "data"
|
|
9976
|
+
},
|
|
9977
|
+
{
|
|
9978
|
+
"name": "valid_until",
|
|
9979
|
+
"type": "core::integer::u64",
|
|
9980
|
+
"kind": "data"
|
|
9981
|
+
},
|
|
9982
|
+
{
|
|
9983
|
+
"name": "payment_token",
|
|
9984
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
9985
|
+
"kind": "data"
|
|
9986
|
+
},
|
|
9987
|
+
{
|
|
9988
|
+
"name": "license_terms_uri",
|
|
9989
|
+
"type": "core::byte_array::ByteArray",
|
|
9990
|
+
"kind": "data"
|
|
9991
|
+
},
|
|
9992
|
+
{
|
|
9993
|
+
"name": "transferable",
|
|
9994
|
+
"type": "core::bool",
|
|
9995
|
+
"kind": "data"
|
|
9996
|
+
},
|
|
9997
|
+
{
|
|
9998
|
+
"name": "royalty_bps",
|
|
9999
|
+
"type": "core::integer::u256",
|
|
10000
|
+
"kind": "data"
|
|
10001
|
+
},
|
|
10002
|
+
{
|
|
10003
|
+
"name": "created_at",
|
|
10004
|
+
"type": "core::integer::u64",
|
|
10005
|
+
"kind": "data"
|
|
10083
10006
|
}
|
|
10084
10007
|
]
|
|
10085
10008
|
},
|
|
10086
10009
|
{
|
|
10087
10010
|
"type": "event",
|
|
10088
|
-
"name": "
|
|
10011
|
+
"name": "ip_sponsorship::IPSponsorship::IPSponsorship::ProposalClosed",
|
|
10089
10012
|
"kind": "struct",
|
|
10090
10013
|
"members": [
|
|
10091
10014
|
{
|
|
10092
|
-
"name": "
|
|
10093
|
-
"type": "core::
|
|
10015
|
+
"name": "proposal_id",
|
|
10016
|
+
"type": "core::integer::u256",
|
|
10094
10017
|
"kind": "key"
|
|
10095
10018
|
},
|
|
10096
10019
|
{
|
|
10097
|
-
"name": "
|
|
10098
|
-
"type": "core::
|
|
10099
|
-
"kind": "
|
|
10020
|
+
"name": "accepted",
|
|
10021
|
+
"type": "core::bool",
|
|
10022
|
+
"kind": "data"
|
|
10100
10023
|
},
|
|
10101
10024
|
{
|
|
10102
|
-
"name": "
|
|
10103
|
-
"type": "core::
|
|
10025
|
+
"name": "closed_at",
|
|
10026
|
+
"type": "core::integer::u64",
|
|
10104
10027
|
"kind": "data"
|
|
10105
10028
|
}
|
|
10106
10029
|
]
|
|
10107
10030
|
},
|
|
10108
10031
|
{
|
|
10109
10032
|
"type": "event",
|
|
10110
|
-
"name": "
|
|
10111
|
-
"kind": "
|
|
10112
|
-
"
|
|
10033
|
+
"name": "ip_sponsorship::IPSponsorship::IPSponsorship::ProposalAccepted",
|
|
10034
|
+
"kind": "struct",
|
|
10035
|
+
"members": [
|
|
10113
10036
|
{
|
|
10114
|
-
"name": "
|
|
10115
|
-
"type": "
|
|
10116
|
-
"kind": "
|
|
10037
|
+
"name": "proposal_id",
|
|
10038
|
+
"type": "core::integer::u256",
|
|
10039
|
+
"kind": "key"
|
|
10117
10040
|
},
|
|
10118
10041
|
{
|
|
10119
|
-
"name": "
|
|
10120
|
-
"type": "
|
|
10121
|
-
"kind": "
|
|
10042
|
+
"name": "license_id",
|
|
10043
|
+
"type": "core::integer::u256",
|
|
10044
|
+
"kind": "key"
|
|
10122
10045
|
},
|
|
10123
10046
|
{
|
|
10124
|
-
"name": "
|
|
10125
|
-
"type": "
|
|
10126
|
-
"kind": "
|
|
10047
|
+
"name": "sponsor",
|
|
10048
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
10049
|
+
"kind": "key"
|
|
10050
|
+
},
|
|
10051
|
+
{
|
|
10052
|
+
"name": "author",
|
|
10053
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
10054
|
+
"kind": "data"
|
|
10055
|
+
},
|
|
10056
|
+
{
|
|
10057
|
+
"name": "amount",
|
|
10058
|
+
"type": "core::integer::u256",
|
|
10059
|
+
"kind": "data"
|
|
10060
|
+
},
|
|
10061
|
+
{
|
|
10062
|
+
"name": "expires_at",
|
|
10063
|
+
"type": "core::integer::u64",
|
|
10064
|
+
"kind": "data"
|
|
10127
10065
|
}
|
|
10128
10066
|
]
|
|
10129
10067
|
},
|
|
10130
10068
|
{
|
|
10131
10069
|
"type": "event",
|
|
10132
|
-
"name": "
|
|
10133
|
-
"kind": "enum",
|
|
10134
|
-
"variants": []
|
|
10135
|
-
},
|
|
10136
|
-
{
|
|
10137
|
-
"type": "event",
|
|
10138
|
-
"name": "ip_sponsorship::IPSponsorshipLicense::IPSponsorshipLicense::LicenseMinted",
|
|
10070
|
+
"name": "ip_sponsorship::IPSponsorship::IPSponsorship::LicenseMinted",
|
|
10139
10071
|
"kind": "struct",
|
|
10140
10072
|
"members": [
|
|
10141
10073
|
{
|
|
@@ -10192,7 +10124,7 @@ var IPSponsorshipLicenseABI = [
|
|
|
10192
10124
|
},
|
|
10193
10125
|
{
|
|
10194
10126
|
"type": "event",
|
|
10195
|
-
"name": "ip_sponsorship::
|
|
10127
|
+
"name": "ip_sponsorship::IPSponsorship::IPSponsorship::Event",
|
|
10196
10128
|
"kind": "enum",
|
|
10197
10129
|
"variants": [
|
|
10198
10130
|
{
|
|
@@ -10205,9 +10137,49 @@ var IPSponsorshipLicenseABI = [
|
|
|
10205
10137
|
"type": "openzeppelin_introspection::src5::SRC5Component::Event",
|
|
10206
10138
|
"kind": "flat"
|
|
10207
10139
|
},
|
|
10140
|
+
{
|
|
10141
|
+
"name": "OfferCreated",
|
|
10142
|
+
"type": "ip_sponsorship::IPSponsorship::IPSponsorship::OfferCreated",
|
|
10143
|
+
"kind": "nested"
|
|
10144
|
+
},
|
|
10145
|
+
{
|
|
10146
|
+
"name": "OfferStatusUpdated",
|
|
10147
|
+
"type": "ip_sponsorship::IPSponsorship::IPSponsorship::OfferStatusUpdated",
|
|
10148
|
+
"kind": "nested"
|
|
10149
|
+
},
|
|
10150
|
+
{
|
|
10151
|
+
"name": "BidPlaced",
|
|
10152
|
+
"type": "ip_sponsorship::IPSponsorship::IPSponsorship::BidPlaced",
|
|
10153
|
+
"kind": "nested"
|
|
10154
|
+
},
|
|
10155
|
+
{
|
|
10156
|
+
"name": "BidRetracted",
|
|
10157
|
+
"type": "ip_sponsorship::IPSponsorship::IPSponsorship::BidRetracted",
|
|
10158
|
+
"kind": "nested"
|
|
10159
|
+
},
|
|
10160
|
+
{
|
|
10161
|
+
"name": "SponsorshipAccepted",
|
|
10162
|
+
"type": "ip_sponsorship::IPSponsorship::IPSponsorship::SponsorshipAccepted",
|
|
10163
|
+
"kind": "nested"
|
|
10164
|
+
},
|
|
10165
|
+
{
|
|
10166
|
+
"name": "ProposalCreated",
|
|
10167
|
+
"type": "ip_sponsorship::IPSponsorship::IPSponsorship::ProposalCreated",
|
|
10168
|
+
"kind": "nested"
|
|
10169
|
+
},
|
|
10170
|
+
{
|
|
10171
|
+
"name": "ProposalClosed",
|
|
10172
|
+
"type": "ip_sponsorship::IPSponsorship::IPSponsorship::ProposalClosed",
|
|
10173
|
+
"kind": "nested"
|
|
10174
|
+
},
|
|
10175
|
+
{
|
|
10176
|
+
"name": "ProposalAccepted",
|
|
10177
|
+
"type": "ip_sponsorship::IPSponsorship::IPSponsorship::ProposalAccepted",
|
|
10178
|
+
"kind": "nested"
|
|
10179
|
+
},
|
|
10208
10180
|
{
|
|
10209
10181
|
"name": "LicenseMinted",
|
|
10210
|
-
"type": "ip_sponsorship::
|
|
10182
|
+
"type": "ip_sponsorship::IPSponsorship::IPSponsorship::LicenseMinted",
|
|
10211
10183
|
"kind": "nested"
|
|
10212
10184
|
}
|
|
10213
10185
|
]
|
|
@@ -11682,20 +11654,29 @@ var ClubService = class {
|
|
|
11682
11654
|
};
|
|
11683
11655
|
var SponsorshipService = class {
|
|
11684
11656
|
constructor(config) {
|
|
11657
|
+
this.config = config;
|
|
11685
11658
|
this.sponsorshipAddress = getStarknetCoordinates(config.chain).ipSponsorship;
|
|
11686
|
-
this.licenseReceiptAddress = getStarknetCoordinates(config.chain).ipSponsorshipLicense;
|
|
11687
11659
|
}
|
|
11688
|
-
|
|
11660
|
+
_contract(account, address) {
|
|
11689
11661
|
const resolved = address ?? this.sponsorshipAddress;
|
|
11690
11662
|
if (!resolved) {
|
|
11691
11663
|
throw new Error("IP-Sponsorship address not configured for this chain");
|
|
11692
11664
|
}
|
|
11693
11665
|
return newContract(IPSponsorshipABI, normalizeAddress("STARKNET", resolved), account);
|
|
11694
11666
|
}
|
|
11667
|
+
_contractRead(address) {
|
|
11668
|
+
const resolved = address ?? this.sponsorshipAddress;
|
|
11669
|
+
if (!resolved) {
|
|
11670
|
+
throw new Error("IP-Sponsorship address not configured for this chain");
|
|
11671
|
+
}
|
|
11672
|
+
const provider = new starknet.RpcProvider({ nodeUrl: this.config.rpcUrl });
|
|
11673
|
+
return newContract(IPSponsorshipABI, normalizeAddress("STARKNET", resolved), provider);
|
|
11674
|
+
}
|
|
11675
|
+
// ── Offers (owner-initiated) ───────────────────────────────────────────────
|
|
11695
11676
|
/** The offer author must currently own (nftContract, tokenId) — enforced on-chain at create and accept. */
|
|
11696
11677
|
async createOffer(account, params) {
|
|
11697
11678
|
const specificSponsor = params.specificSponsor ? new starknet.CairoOption(starknet.CairoOptionVariant.Some, params.specificSponsor) : new starknet.CairoOption(starknet.CairoOptionVariant.None);
|
|
11698
|
-
const call = this.
|
|
11679
|
+
const call = this._contract(account, params.sponsorshipAddress).populate("create_offer", [
|
|
11699
11680
|
params.nftContract,
|
|
11700
11681
|
starknet.cairo.uint256(params.tokenId),
|
|
11701
11682
|
starknet.cairo.uint256(params.minAmount),
|
|
@@ -11703,6 +11684,7 @@ var SponsorshipService = class {
|
|
|
11703
11684
|
params.paymentToken,
|
|
11704
11685
|
params.licenseTermsUri,
|
|
11705
11686
|
params.transferable,
|
|
11687
|
+
starknet.cairo.uint256(params.royaltyBps),
|
|
11706
11688
|
specificSponsor
|
|
11707
11689
|
]);
|
|
11708
11690
|
const res = await account.execute([call]);
|
|
@@ -11710,7 +11692,7 @@ var SponsorshipService = class {
|
|
|
11710
11692
|
}
|
|
11711
11693
|
/** Reversible — gates new bids/acceptance only. */
|
|
11712
11694
|
async setOfferOpen(account, params) {
|
|
11713
|
-
const call = this.
|
|
11695
|
+
const call = this._contract(account, params.sponsorshipAddress).populate("set_offer_open", [
|
|
11714
11696
|
starknet.cairo.uint256(params.offerId),
|
|
11715
11697
|
params.open
|
|
11716
11698
|
]);
|
|
@@ -11729,7 +11711,7 @@ var SponsorshipService = class {
|
|
|
11729
11711
|
entrypoint: "approve",
|
|
11730
11712
|
calldata: [normalizeAddress("STARKNET", sponsorshipAddress), amount.low.toString(), amount.high.toString()]
|
|
11731
11713
|
};
|
|
11732
|
-
const bidCall = this.
|
|
11714
|
+
const bidCall = this._contract(account, sponsorshipAddress).populate("place_bid", [
|
|
11733
11715
|
starknet.cairo.uint256(params.offerId),
|
|
11734
11716
|
amount
|
|
11735
11717
|
]);
|
|
@@ -11737,54 +11719,139 @@ var SponsorshipService = class {
|
|
|
11737
11719
|
return { txHash: res.transaction_hash };
|
|
11738
11720
|
}
|
|
11739
11721
|
async retractBid(account, params) {
|
|
11740
|
-
const call = this.
|
|
11722
|
+
const call = this._contract(account, params.sponsorshipAddress).populate("retract_bid", [
|
|
11741
11723
|
starknet.cairo.uint256(params.offerId)
|
|
11742
11724
|
]);
|
|
11743
11725
|
const res = await account.execute([call]);
|
|
11744
11726
|
return { txHash: res.transaction_hash };
|
|
11745
11727
|
}
|
|
11746
11728
|
/**
|
|
11747
|
-
* Author-only.
|
|
11748
|
-
*
|
|
11749
|
-
*
|
|
11750
|
-
* `is_license_valid()` on IPSponsorship remains the sole authority for
|
|
11751
|
-
* gating/perks; the receipt is a wallet-visible courtesy only.
|
|
11729
|
+
* Author-only. Re-verifies IP ownership, settles the sponsor's payment
|
|
11730
|
+
* (allowance pull, no escrow), and mints the license — a real ERC-721 on
|
|
11731
|
+
* this same contract — to the sponsor, all atomically in one call.
|
|
11752
11732
|
*/
|
|
11753
11733
|
async acceptBid(account, params) {
|
|
11754
|
-
const
|
|
11755
|
-
if (!receiptAddress) {
|
|
11756
|
-
throw new Error("IP-Sponsorship-License receipt address not configured for this chain");
|
|
11757
|
-
}
|
|
11758
|
-
const acceptCall = this._sponsorship(account, params.sponsorshipAddress).populate("accept_bid", [
|
|
11734
|
+
const call = this._contract(account, params.sponsorshipAddress).populate("accept_bid", [
|
|
11759
11735
|
starknet.cairo.uint256(params.offerId),
|
|
11760
11736
|
params.sponsor
|
|
11761
11737
|
]);
|
|
11762
|
-
const
|
|
11763
|
-
|
|
11764
|
-
|
|
11738
|
+
const res = await account.execute([call]);
|
|
11739
|
+
return { txHash: res.transaction_hash };
|
|
11740
|
+
}
|
|
11741
|
+
// ── Proposals (sponsor-initiated) ──────────────────────────────────────────
|
|
11742
|
+
// The symmetric counterpart to offers/bids: a sponsor proposes fixed terms
|
|
11743
|
+
// on an asset with no open offer yet; only the asset's current owner may
|
|
11744
|
+
// accept or reject. Unlike an offer, the SPONSOR chooses `paymentToken` here
|
|
11745
|
+
// — an accepting owner's UI should surface only recognized tokens, since a
|
|
11746
|
+
// bad-faith ERC-20 could return `true` on `transfer_from` without moving funds.
|
|
11747
|
+
async proposeSponsorship(account, params) {
|
|
11748
|
+
const call = this._contract(account, params.sponsorshipAddress).populate("propose_sponsorship", [
|
|
11749
|
+
params.nftContract,
|
|
11750
|
+
starknet.cairo.uint256(params.tokenId),
|
|
11751
|
+
starknet.cairo.uint256(params.amount),
|
|
11752
|
+
params.duration,
|
|
11753
|
+
params.validUntil ?? 0,
|
|
11754
|
+
params.paymentToken,
|
|
11755
|
+
params.licenseTermsUri,
|
|
11756
|
+
params.transferable,
|
|
11757
|
+
starknet.cairo.uint256(params.royaltyBps)
|
|
11758
|
+
]);
|
|
11759
|
+
const res = await account.execute([call]);
|
|
11760
|
+
return { txHash: res.transaction_hash };
|
|
11761
|
+
}
|
|
11762
|
+
/** Proposer-only. Advisory against an acceptance in flight in the same block. */
|
|
11763
|
+
async withdrawProposal(account, params) {
|
|
11764
|
+
const call = this._contract(account, params.sponsorshipAddress).populate("withdraw_proposal", [
|
|
11765
|
+
starknet.cairo.uint256(params.proposalId)
|
|
11766
|
+
]);
|
|
11767
|
+
const res = await account.execute([call]);
|
|
11765
11768
|
return { txHash: res.transaction_hash };
|
|
11766
11769
|
}
|
|
11767
11770
|
/**
|
|
11768
|
-
*
|
|
11769
|
-
*
|
|
11770
|
-
*
|
|
11771
|
-
*
|
|
11771
|
+
* Asset-owner-only (re-verified on-chain — a proposal binds to the asset,
|
|
11772
|
+
* not a person: whoever owns it at acceptance time is paid and issues the
|
|
11773
|
+
* license). Settles payment and mints the license atomically, same as
|
|
11774
|
+
* `acceptBid`.
|
|
11772
11775
|
*/
|
|
11773
|
-
async
|
|
11774
|
-
const
|
|
11775
|
-
|
|
11776
|
-
|
|
11777
|
-
|
|
11778
|
-
|
|
11779
|
-
|
|
11780
|
-
|
|
11781
|
-
|
|
11782
|
-
|
|
11783
|
-
|
|
11784
|
-
|
|
11785
|
-
const res = await account.execute(
|
|
11776
|
+
async acceptProposal(account, params) {
|
|
11777
|
+
const call = this._contract(account, params.sponsorshipAddress).populate("accept_proposal", [
|
|
11778
|
+
starknet.cairo.uint256(params.proposalId)
|
|
11779
|
+
]);
|
|
11780
|
+
const res = await account.execute([call]);
|
|
11781
|
+
return { txHash: res.transaction_hash };
|
|
11782
|
+
}
|
|
11783
|
+
/** Asset-owner-only. */
|
|
11784
|
+
async rejectProposal(account, params) {
|
|
11785
|
+
const call = this._contract(account, params.sponsorshipAddress).populate("reject_proposal", [
|
|
11786
|
+
starknet.cairo.uint256(params.proposalId)
|
|
11787
|
+
]);
|
|
11788
|
+
const res = await account.execute([call]);
|
|
11786
11789
|
return { txHash: res.transaction_hash };
|
|
11787
11790
|
}
|
|
11791
|
+
// ── Reads ───────────────────────────────────────────────────────────────────
|
|
11792
|
+
async getOffer(params) {
|
|
11793
|
+
const o = await this._contractRead(params.sponsorshipAddress).call("get_offer", [
|
|
11794
|
+
starknet.cairo.uint256(params.offerId)
|
|
11795
|
+
]);
|
|
11796
|
+
return {
|
|
11797
|
+
author: o.author,
|
|
11798
|
+
nftContract: o.nft_contract,
|
|
11799
|
+
tokenId: BigInt(o.token_id),
|
|
11800
|
+
minAmount: BigInt(o.min_amount),
|
|
11801
|
+
duration: Number(o.duration),
|
|
11802
|
+
paymentToken: o.payment_token,
|
|
11803
|
+
licenseTermsUri: o.license_terms_uri,
|
|
11804
|
+
transferable: Boolean(o.transferable),
|
|
11805
|
+
specificSponsor: o.specific_sponsor?.variant === "Some" ? o.specific_sponsor.values?.[0] ?? o.specific_sponsor.value : null,
|
|
11806
|
+
open: Boolean(o.open),
|
|
11807
|
+
royaltyBps: BigInt(o.royalty_bps)
|
|
11808
|
+
};
|
|
11809
|
+
}
|
|
11810
|
+
async getBid(params) {
|
|
11811
|
+
const result = await this._contractRead(params.sponsorshipAddress).call("get_bid", [
|
|
11812
|
+
starknet.cairo.uint256(params.offerId),
|
|
11813
|
+
params.sponsor
|
|
11814
|
+
]);
|
|
11815
|
+
return BigInt(result);
|
|
11816
|
+
}
|
|
11817
|
+
async getProposal(params) {
|
|
11818
|
+
const p = await this._contractRead(params.sponsorshipAddress).call("get_proposal", [
|
|
11819
|
+
starknet.cairo.uint256(params.proposalId)
|
|
11820
|
+
]);
|
|
11821
|
+
return {
|
|
11822
|
+
proposer: p.proposer,
|
|
11823
|
+
nftContract: p.nft_contract,
|
|
11824
|
+
tokenId: BigInt(p.token_id),
|
|
11825
|
+
amount: BigInt(p.amount),
|
|
11826
|
+
duration: Number(p.duration),
|
|
11827
|
+
validUntil: Number(p.valid_until),
|
|
11828
|
+
paymentToken: p.payment_token,
|
|
11829
|
+
licenseTermsUri: p.license_terms_uri,
|
|
11830
|
+
transferable: Boolean(p.transferable),
|
|
11831
|
+
open: Boolean(p.open),
|
|
11832
|
+
royaltyBps: BigInt(p.royalty_bps)
|
|
11833
|
+
};
|
|
11834
|
+
}
|
|
11835
|
+
async getLastOfferId(params) {
|
|
11836
|
+
const result = await this._contractRead(params?.sponsorshipAddress).call("get_last_offer_id", []);
|
|
11837
|
+
return BigInt(result);
|
|
11838
|
+
}
|
|
11839
|
+
async getLastProposalId(params) {
|
|
11840
|
+
const result = await this._contractRead(params?.sponsorshipAddress).call("get_last_proposal_id", []);
|
|
11841
|
+
return BigInt(result);
|
|
11842
|
+
}
|
|
11843
|
+
async getLastLicenseId(params) {
|
|
11844
|
+
const result = await this._contractRead(params?.sponsorshipAddress).call("get_last_license_id", []);
|
|
11845
|
+
return BigInt(result);
|
|
11846
|
+
}
|
|
11847
|
+
/** EIP-2981 — royalty recipient (the license's issuing author) and amount owed on a resale at `salePrice`. */
|
|
11848
|
+
async royaltyInfo(params) {
|
|
11849
|
+
const [recipient, amount] = await this._contractRead(params.sponsorshipAddress).call("royalty_info", [
|
|
11850
|
+
starknet.cairo.uint256(params.licenseId),
|
|
11851
|
+
starknet.cairo.uint256(params.salePrice)
|
|
11852
|
+
]);
|
|
11853
|
+
return { recipient, amount: BigInt(amount) };
|
|
11854
|
+
}
|
|
11788
11855
|
};
|
|
11789
11856
|
|
|
11790
11857
|
// src/starknet/client.ts
|
|
@@ -12635,7 +12702,6 @@ exports.IPGenesisABI = IPGenesisABI;
|
|
|
12635
12702
|
exports.IPMarketplaceABI = IPMarketplaceABI;
|
|
12636
12703
|
exports.IPNftABI = IPNftABI;
|
|
12637
12704
|
exports.IPSponsorshipABI = IPSponsorshipABI;
|
|
12638
|
-
exports.IPSponsorshipLicenseABI = IPSponsorshipLicenseABI;
|
|
12639
12705
|
exports.IPTicketCollectionABI = IPTicketCollectionABI;
|
|
12640
12706
|
exports.IPTicketCollectionFactoryABI = IPTicketCollectionFactoryABI;
|
|
12641
12707
|
exports.LAUNCH_PRICE_QUOTE_PER_COIN = LAUNCH_PRICE_QUOTE_PER_COIN;
|