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