@medialane/sdk 0.8.2 → 0.8.3
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/README.md +2 -2
- package/dist/index.cjs +118 -408
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +79 -309
- package/dist/index.d.ts +79 -309
- package/dist/index.js +118 -408
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -10,9 +10,9 @@ var MARKETPLACE_721_CLASS_HASH_MAINNET = "0x03dff4f34b976207246207954263be9a28b5
|
|
|
10
10
|
var MARKETPLACE_CLASS_HASH_MAINNET = MARKETPLACE_721_CLASS_HASH_MAINNET;
|
|
11
11
|
var MARKETPLACE_721_START_BLOCK_MAINNET = 9196722;
|
|
12
12
|
var MARKETPLACE_START_BLOCK_MAINNET = MARKETPLACE_721_START_BLOCK_MAINNET;
|
|
13
|
-
var MARKETPLACE_1155_CONTRACT_MAINNET = "
|
|
14
|
-
var MARKETPLACE_1155_CLASS_HASH_MAINNET = "
|
|
15
|
-
var MARKETPLACE_1155_START_BLOCK_MAINNET =
|
|
13
|
+
var MARKETPLACE_1155_CONTRACT_MAINNET = "0x02bfa521c25461a09d735889b469418608d7d92f8b26e3d37ef174a4c2e22f99";
|
|
14
|
+
var MARKETPLACE_1155_CLASS_HASH_MAINNET = "0x01b674aad934be85abc7c1970265cbf7e9bc7d586a90f0a67112c201636dbdd3";
|
|
15
|
+
var MARKETPLACE_1155_START_BLOCK_MAINNET = 9260304;
|
|
16
16
|
var COLLECTION_721_CONTRACT_MAINNET = "0x05c49ee5d3208a2c2e150fdd0c247d1195ed9ab54fa2d5dea7a633f39e4b205b";
|
|
17
17
|
var COLLECTION_CONTRACT_MAINNET = COLLECTION_721_CONTRACT_MAINNET;
|
|
18
18
|
var DROP_FACTORY_CONTRACT_MAINNET = "0x03587f42e29daee1b193f6cf83bf8627908ed6632d0d83fcb26225c50547d800";
|
|
@@ -938,59 +938,80 @@ var CollectionRegistryABI = [
|
|
|
938
938
|
var Medialane1155ABI = [
|
|
939
939
|
{
|
|
940
940
|
"type": "impl",
|
|
941
|
-
"name": "
|
|
942
|
-
"interface_name": "
|
|
941
|
+
"name": "Medialane1155V2Impl",
|
|
942
|
+
"interface_name": "medialane_erc1155::core::interface::IMedialane1155V2"
|
|
943
943
|
},
|
|
944
944
|
{
|
|
945
|
-
"type": "
|
|
946
|
-
"name": "
|
|
947
|
-
"
|
|
945
|
+
"type": "struct",
|
|
946
|
+
"name": "medialane_erc1155::core::types::OfferItem",
|
|
947
|
+
"members": [
|
|
948
948
|
{
|
|
949
|
-
"
|
|
950
|
-
"
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
"
|
|
958
|
-
"
|
|
949
|
+
"name": "item_type",
|
|
950
|
+
"type": "core::felt252"
|
|
951
|
+
},
|
|
952
|
+
{
|
|
953
|
+
"name": "token",
|
|
954
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
955
|
+
},
|
|
956
|
+
{
|
|
957
|
+
"name": "identifier_or_criteria",
|
|
958
|
+
"type": "core::felt252"
|
|
959
|
+
},
|
|
960
|
+
{
|
|
961
|
+
"name": "start_amount",
|
|
962
|
+
"type": "core::felt252"
|
|
963
|
+
},
|
|
964
|
+
{
|
|
965
|
+
"name": "end_amount",
|
|
966
|
+
"type": "core::felt252"
|
|
959
967
|
}
|
|
960
968
|
]
|
|
961
969
|
},
|
|
962
|
-
{
|
|
963
|
-
"type": "impl",
|
|
964
|
-
"name": "Medialane1155Impl",
|
|
965
|
-
"interface_name": "medialane_erc1155::core::interface::IMedialane1155"
|
|
966
|
-
},
|
|
967
970
|
{
|
|
968
971
|
"type": "struct",
|
|
969
|
-
"name": "medialane_erc1155::core::types::
|
|
972
|
+
"name": "medialane_erc1155::core::types::ConsiderationItem",
|
|
970
973
|
"members": [
|
|
971
974
|
{
|
|
972
|
-
"name": "
|
|
973
|
-
"type": "core::
|
|
975
|
+
"name": "item_type",
|
|
976
|
+
"type": "core::felt252"
|
|
974
977
|
},
|
|
975
978
|
{
|
|
976
|
-
"name": "
|
|
979
|
+
"name": "token",
|
|
977
980
|
"type": "core::starknet::contract_address::ContractAddress"
|
|
978
981
|
},
|
|
979
982
|
{
|
|
980
|
-
"name": "
|
|
983
|
+
"name": "identifier_or_criteria",
|
|
984
|
+
"type": "core::felt252"
|
|
985
|
+
},
|
|
986
|
+
{
|
|
987
|
+
"name": "start_amount",
|
|
981
988
|
"type": "core::felt252"
|
|
982
989
|
},
|
|
983
990
|
{
|
|
984
|
-
"name": "
|
|
991
|
+
"name": "end_amount",
|
|
985
992
|
"type": "core::felt252"
|
|
986
993
|
},
|
|
987
994
|
{
|
|
988
|
-
"name": "
|
|
995
|
+
"name": "recipient",
|
|
996
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
997
|
+
}
|
|
998
|
+
]
|
|
999
|
+
},
|
|
1000
|
+
{
|
|
1001
|
+
"type": "struct",
|
|
1002
|
+
"name": "medialane_erc1155::core::types::OrderParameters",
|
|
1003
|
+
"members": [
|
|
1004
|
+
{
|
|
1005
|
+
"name": "offerer",
|
|
989
1006
|
"type": "core::starknet::contract_address::ContractAddress"
|
|
990
1007
|
},
|
|
991
1008
|
{
|
|
992
|
-
"name": "
|
|
993
|
-
"type": "core::
|
|
1009
|
+
"name": "offer",
|
|
1010
|
+
"type": "medialane_erc1155::core::types::OfferItem"
|
|
1011
|
+
},
|
|
1012
|
+
{
|
|
1013
|
+
"name": "consideration",
|
|
1014
|
+
"type": "medialane_erc1155::core::types::ConsiderationItem"
|
|
994
1015
|
},
|
|
995
1016
|
{
|
|
996
1017
|
"name": "start_time",
|
|
@@ -1036,6 +1057,10 @@ var Medialane1155ABI = [
|
|
|
1036
1057
|
"name": "fulfiller",
|
|
1037
1058
|
"type": "core::starknet::contract_address::ContractAddress"
|
|
1038
1059
|
},
|
|
1060
|
+
{
|
|
1061
|
+
"name": "quantity",
|
|
1062
|
+
"type": "core::felt252"
|
|
1063
|
+
},
|
|
1039
1064
|
{
|
|
1040
1065
|
"name": "nonce",
|
|
1041
1066
|
"type": "core::felt252"
|
|
@@ -1110,20 +1135,6 @@ var Medialane1155ABI = [
|
|
|
1110
1135
|
}
|
|
1111
1136
|
]
|
|
1112
1137
|
},
|
|
1113
|
-
{
|
|
1114
|
-
"type": "enum",
|
|
1115
|
-
"name": "core::option::Option::<core::starknet::contract_address::ContractAddress>",
|
|
1116
|
-
"variants": [
|
|
1117
|
-
{
|
|
1118
|
-
"name": "Some",
|
|
1119
|
-
"type": "core::starknet::contract_address::ContractAddress"
|
|
1120
|
-
},
|
|
1121
|
-
{
|
|
1122
|
-
"name": "None",
|
|
1123
|
-
"type": "()"
|
|
1124
|
-
}
|
|
1125
|
-
]
|
|
1126
|
-
},
|
|
1127
1138
|
{
|
|
1128
1139
|
"type": "struct",
|
|
1129
1140
|
"name": "medialane_erc1155::core::types::OrderDetails",
|
|
@@ -1133,24 +1144,12 @@ var Medialane1155ABI = [
|
|
|
1133
1144
|
"type": "core::starknet::contract_address::ContractAddress"
|
|
1134
1145
|
},
|
|
1135
1146
|
{
|
|
1136
|
-
"name": "
|
|
1137
|
-
"type": "core::
|
|
1138
|
-
},
|
|
1139
|
-
{
|
|
1140
|
-
"name": "token_id",
|
|
1141
|
-
"type": "core::felt252"
|
|
1142
|
-
},
|
|
1143
|
-
{
|
|
1144
|
-
"name": "amount",
|
|
1145
|
-
"type": "core::felt252"
|
|
1147
|
+
"name": "offer",
|
|
1148
|
+
"type": "medialane_erc1155::core::types::OfferItem"
|
|
1146
1149
|
},
|
|
1147
1150
|
{
|
|
1148
|
-
"name": "
|
|
1149
|
-
"type": "core::
|
|
1150
|
-
},
|
|
1151
|
-
{
|
|
1152
|
-
"name": "price_per_unit",
|
|
1153
|
-
"type": "core::felt252"
|
|
1151
|
+
"name": "consideration",
|
|
1152
|
+
"type": "medialane_erc1155::core::types::ConsiderationItem"
|
|
1154
1153
|
},
|
|
1155
1154
|
{
|
|
1156
1155
|
"name": "start_time",
|
|
@@ -1165,14 +1164,18 @@ var Medialane1155ABI = [
|
|
|
1165
1164
|
"type": "medialane_erc1155::core::types::OrderStatus"
|
|
1166
1165
|
},
|
|
1167
1166
|
{
|
|
1168
|
-
"name": "
|
|
1169
|
-
"type": "core::
|
|
1167
|
+
"name": "total_amount",
|
|
1168
|
+
"type": "core::felt252"
|
|
1169
|
+
},
|
|
1170
|
+
{
|
|
1171
|
+
"name": "remaining_amount",
|
|
1172
|
+
"type": "core::felt252"
|
|
1170
1173
|
}
|
|
1171
1174
|
]
|
|
1172
1175
|
},
|
|
1173
1176
|
{
|
|
1174
1177
|
"type": "interface",
|
|
1175
|
-
"name": "medialane_erc1155::core::interface::
|
|
1178
|
+
"name": "medialane_erc1155::core::interface::IMedialane1155V2",
|
|
1176
1179
|
"items": [
|
|
1177
1180
|
{
|
|
1178
1181
|
"type": "function",
|
|
@@ -1248,7 +1251,7 @@ var Medialane1155ABI = [
|
|
|
1248
1251
|
},
|
|
1249
1252
|
{
|
|
1250
1253
|
"type": "function",
|
|
1251
|
-
"name": "
|
|
1254
|
+
"name": "get_native_token_address",
|
|
1252
1255
|
"inputs": [],
|
|
1253
1256
|
"outputs": [
|
|
1254
1257
|
{
|
|
@@ -1286,150 +1289,10 @@ var Medialane1155ABI = [
|
|
|
1286
1289
|
}
|
|
1287
1290
|
]
|
|
1288
1291
|
},
|
|
1289
|
-
{
|
|
1290
|
-
"type": "impl",
|
|
1291
|
-
"name": "SRC5Impl",
|
|
1292
|
-
"interface_name": "openzeppelin_introspection::interface::ISRC5"
|
|
1293
|
-
},
|
|
1294
|
-
{
|
|
1295
|
-
"type": "enum",
|
|
1296
|
-
"name": "core::bool",
|
|
1297
|
-
"variants": [
|
|
1298
|
-
{
|
|
1299
|
-
"name": "False",
|
|
1300
|
-
"type": "()"
|
|
1301
|
-
},
|
|
1302
|
-
{
|
|
1303
|
-
"name": "True",
|
|
1304
|
-
"type": "()"
|
|
1305
|
-
}
|
|
1306
|
-
]
|
|
1307
|
-
},
|
|
1308
|
-
{
|
|
1309
|
-
"type": "interface",
|
|
1310
|
-
"name": "openzeppelin_introspection::interface::ISRC5",
|
|
1311
|
-
"items": [
|
|
1312
|
-
{
|
|
1313
|
-
"type": "function",
|
|
1314
|
-
"name": "supports_interface",
|
|
1315
|
-
"inputs": [
|
|
1316
|
-
{
|
|
1317
|
-
"name": "interface_id",
|
|
1318
|
-
"type": "core::felt252"
|
|
1319
|
-
}
|
|
1320
|
-
],
|
|
1321
|
-
"outputs": [
|
|
1322
|
-
{
|
|
1323
|
-
"type": "core::bool"
|
|
1324
|
-
}
|
|
1325
|
-
],
|
|
1326
|
-
"state_mutability": "view"
|
|
1327
|
-
}
|
|
1328
|
-
]
|
|
1329
|
-
},
|
|
1330
|
-
{
|
|
1331
|
-
"type": "impl",
|
|
1332
|
-
"name": "AccessControlImpl",
|
|
1333
|
-
"interface_name": "openzeppelin_access::accesscontrol::interface::IAccessControl"
|
|
1334
|
-
},
|
|
1335
|
-
{
|
|
1336
|
-
"type": "interface",
|
|
1337
|
-
"name": "openzeppelin_access::accesscontrol::interface::IAccessControl",
|
|
1338
|
-
"items": [
|
|
1339
|
-
{
|
|
1340
|
-
"type": "function",
|
|
1341
|
-
"name": "has_role",
|
|
1342
|
-
"inputs": [
|
|
1343
|
-
{
|
|
1344
|
-
"name": "role",
|
|
1345
|
-
"type": "core::felt252"
|
|
1346
|
-
},
|
|
1347
|
-
{
|
|
1348
|
-
"name": "account",
|
|
1349
|
-
"type": "core::starknet::contract_address::ContractAddress"
|
|
1350
|
-
}
|
|
1351
|
-
],
|
|
1352
|
-
"outputs": [
|
|
1353
|
-
{
|
|
1354
|
-
"type": "core::bool"
|
|
1355
|
-
}
|
|
1356
|
-
],
|
|
1357
|
-
"state_mutability": "view"
|
|
1358
|
-
},
|
|
1359
|
-
{
|
|
1360
|
-
"type": "function",
|
|
1361
|
-
"name": "get_role_admin",
|
|
1362
|
-
"inputs": [
|
|
1363
|
-
{
|
|
1364
|
-
"name": "role",
|
|
1365
|
-
"type": "core::felt252"
|
|
1366
|
-
}
|
|
1367
|
-
],
|
|
1368
|
-
"outputs": [
|
|
1369
|
-
{
|
|
1370
|
-
"type": "core::felt252"
|
|
1371
|
-
}
|
|
1372
|
-
],
|
|
1373
|
-
"state_mutability": "view"
|
|
1374
|
-
},
|
|
1375
|
-
{
|
|
1376
|
-
"type": "function",
|
|
1377
|
-
"name": "grant_role",
|
|
1378
|
-
"inputs": [
|
|
1379
|
-
{
|
|
1380
|
-
"name": "role",
|
|
1381
|
-
"type": "core::felt252"
|
|
1382
|
-
},
|
|
1383
|
-
{
|
|
1384
|
-
"name": "account",
|
|
1385
|
-
"type": "core::starknet::contract_address::ContractAddress"
|
|
1386
|
-
}
|
|
1387
|
-
],
|
|
1388
|
-
"outputs": [],
|
|
1389
|
-
"state_mutability": "external"
|
|
1390
|
-
},
|
|
1391
|
-
{
|
|
1392
|
-
"type": "function",
|
|
1393
|
-
"name": "revoke_role",
|
|
1394
|
-
"inputs": [
|
|
1395
|
-
{
|
|
1396
|
-
"name": "role",
|
|
1397
|
-
"type": "core::felt252"
|
|
1398
|
-
},
|
|
1399
|
-
{
|
|
1400
|
-
"name": "account",
|
|
1401
|
-
"type": "core::starknet::contract_address::ContractAddress"
|
|
1402
|
-
}
|
|
1403
|
-
],
|
|
1404
|
-
"outputs": [],
|
|
1405
|
-
"state_mutability": "external"
|
|
1406
|
-
},
|
|
1407
|
-
{
|
|
1408
|
-
"type": "function",
|
|
1409
|
-
"name": "renounce_role",
|
|
1410
|
-
"inputs": [
|
|
1411
|
-
{
|
|
1412
|
-
"name": "role",
|
|
1413
|
-
"type": "core::felt252"
|
|
1414
|
-
},
|
|
1415
|
-
{
|
|
1416
|
-
"name": "account",
|
|
1417
|
-
"type": "core::starknet::contract_address::ContractAddress"
|
|
1418
|
-
}
|
|
1419
|
-
],
|
|
1420
|
-
"outputs": [],
|
|
1421
|
-
"state_mutability": "external"
|
|
1422
|
-
}
|
|
1423
|
-
]
|
|
1424
|
-
},
|
|
1425
1292
|
{
|
|
1426
1293
|
"type": "constructor",
|
|
1427
1294
|
"name": "constructor",
|
|
1428
1295
|
"inputs": [
|
|
1429
|
-
{
|
|
1430
|
-
"name": "manager",
|
|
1431
|
-
"type": "core::starknet::contract_address::ContractAddress"
|
|
1432
|
-
},
|
|
1433
1296
|
{
|
|
1434
1297
|
"name": "native_token_address",
|
|
1435
1298
|
"type": "core::starknet::contract_address::ContractAddress"
|
|
@@ -1450,31 +1313,6 @@ var Medialane1155ABI = [
|
|
|
1450
1313
|
"name": "offerer",
|
|
1451
1314
|
"type": "core::starknet::contract_address::ContractAddress",
|
|
1452
1315
|
"kind": "key"
|
|
1453
|
-
},
|
|
1454
|
-
{
|
|
1455
|
-
"name": "nft_contract",
|
|
1456
|
-
"type": "core::starknet::contract_address::ContractAddress",
|
|
1457
|
-
"kind": "data"
|
|
1458
|
-
},
|
|
1459
|
-
{
|
|
1460
|
-
"name": "token_id",
|
|
1461
|
-
"type": "core::felt252",
|
|
1462
|
-
"kind": "data"
|
|
1463
|
-
},
|
|
1464
|
-
{
|
|
1465
|
-
"name": "amount",
|
|
1466
|
-
"type": "core::felt252",
|
|
1467
|
-
"kind": "data"
|
|
1468
|
-
},
|
|
1469
|
-
{
|
|
1470
|
-
"name": "price_per_unit",
|
|
1471
|
-
"type": "core::felt252",
|
|
1472
|
-
"kind": "data"
|
|
1473
|
-
},
|
|
1474
|
-
{
|
|
1475
|
-
"name": "payment_token",
|
|
1476
|
-
"type": "core::starknet::contract_address::ContractAddress",
|
|
1477
|
-
"kind": "data"
|
|
1478
1316
|
}
|
|
1479
1317
|
]
|
|
1480
1318
|
},
|
|
@@ -1513,193 +1351,58 @@ var Medialane1155ABI = [
|
|
|
1513
1351
|
"kind": "key"
|
|
1514
1352
|
},
|
|
1515
1353
|
{
|
|
1516
|
-
"name": "
|
|
1517
|
-
"type": "core::starknet::contract_address::ContractAddress",
|
|
1518
|
-
"kind": "data"
|
|
1519
|
-
},
|
|
1520
|
-
{
|
|
1521
|
-
"name": "royalty_amount",
|
|
1522
|
-
"type": "core::integer::u256",
|
|
1523
|
-
"kind": "data"
|
|
1524
|
-
}
|
|
1525
|
-
]
|
|
1526
|
-
},
|
|
1527
|
-
{
|
|
1528
|
-
"type": "event",
|
|
1529
|
-
"name": "medialane_erc1155::core::events::OrderCancelled",
|
|
1530
|
-
"kind": "struct",
|
|
1531
|
-
"members": [
|
|
1532
|
-
{
|
|
1533
|
-
"name": "order_hash",
|
|
1534
|
-
"type": "core::felt252",
|
|
1535
|
-
"kind": "key"
|
|
1536
|
-
},
|
|
1537
|
-
{
|
|
1538
|
-
"name": "offerer",
|
|
1539
|
-
"type": "core::starknet::contract_address::ContractAddress",
|
|
1540
|
-
"kind": "key"
|
|
1541
|
-
}
|
|
1542
|
-
]
|
|
1543
|
-
},
|
|
1544
|
-
{
|
|
1545
|
-
"type": "event",
|
|
1546
|
-
"name": "openzeppelin_utils::cryptography::nonces::NoncesComponent::Event",
|
|
1547
|
-
"kind": "enum",
|
|
1548
|
-
"variants": []
|
|
1549
|
-
},
|
|
1550
|
-
{
|
|
1551
|
-
"type": "event",
|
|
1552
|
-
"name": "openzeppelin_upgrades::upgradeable::UpgradeableComponent::Upgraded",
|
|
1553
|
-
"kind": "struct",
|
|
1554
|
-
"members": [
|
|
1555
|
-
{
|
|
1556
|
-
"name": "class_hash",
|
|
1557
|
-
"type": "core::starknet::class_hash::ClassHash",
|
|
1558
|
-
"kind": "data"
|
|
1559
|
-
}
|
|
1560
|
-
]
|
|
1561
|
-
},
|
|
1562
|
-
{
|
|
1563
|
-
"type": "event",
|
|
1564
|
-
"name": "openzeppelin_upgrades::upgradeable::UpgradeableComponent::Event",
|
|
1565
|
-
"kind": "enum",
|
|
1566
|
-
"variants": [
|
|
1567
|
-
{
|
|
1568
|
-
"name": "Upgraded",
|
|
1569
|
-
"type": "openzeppelin_upgrades::upgradeable::UpgradeableComponent::Upgraded",
|
|
1570
|
-
"kind": "nested"
|
|
1571
|
-
}
|
|
1572
|
-
]
|
|
1573
|
-
},
|
|
1574
|
-
{
|
|
1575
|
-
"type": "event",
|
|
1576
|
-
"name": "openzeppelin_introspection::src5::SRC5Component::Event",
|
|
1577
|
-
"kind": "enum",
|
|
1578
|
-
"variants": []
|
|
1579
|
-
},
|
|
1580
|
-
{
|
|
1581
|
-
"type": "event",
|
|
1582
|
-
"name": "openzeppelin_access::accesscontrol::accesscontrol::AccessControlComponent::RoleGranted",
|
|
1583
|
-
"kind": "struct",
|
|
1584
|
-
"members": [
|
|
1585
|
-
{
|
|
1586
|
-
"name": "role",
|
|
1354
|
+
"name": "quantity",
|
|
1587
1355
|
"type": "core::felt252",
|
|
1588
1356
|
"kind": "data"
|
|
1589
1357
|
},
|
|
1590
1358
|
{
|
|
1591
|
-
"name": "
|
|
1592
|
-
"type": "core::starknet::contract_address::ContractAddress",
|
|
1593
|
-
"kind": "data"
|
|
1594
|
-
},
|
|
1595
|
-
{
|
|
1596
|
-
"name": "sender",
|
|
1597
|
-
"type": "core::starknet::contract_address::ContractAddress",
|
|
1598
|
-
"kind": "data"
|
|
1599
|
-
}
|
|
1600
|
-
]
|
|
1601
|
-
},
|
|
1602
|
-
{
|
|
1603
|
-
"type": "event",
|
|
1604
|
-
"name": "openzeppelin_access::accesscontrol::accesscontrol::AccessControlComponent::RoleGrantedWithDelay",
|
|
1605
|
-
"kind": "struct",
|
|
1606
|
-
"members": [
|
|
1607
|
-
{
|
|
1608
|
-
"name": "role",
|
|
1359
|
+
"name": "remaining_amount",
|
|
1609
1360
|
"type": "core::felt252",
|
|
1610
1361
|
"kind": "data"
|
|
1611
1362
|
},
|
|
1612
1363
|
{
|
|
1613
|
-
"name": "
|
|
1614
|
-
"type": "core::
|
|
1364
|
+
"name": "sale_amount",
|
|
1365
|
+
"type": "core::integer::u256",
|
|
1615
1366
|
"kind": "data"
|
|
1616
1367
|
},
|
|
1617
1368
|
{
|
|
1618
|
-
"name": "
|
|
1369
|
+
"name": "royalty_receiver",
|
|
1619
1370
|
"type": "core::starknet::contract_address::ContractAddress",
|
|
1620
1371
|
"kind": "data"
|
|
1621
1372
|
},
|
|
1622
1373
|
{
|
|
1623
|
-
"name": "
|
|
1624
|
-
"type": "core::integer::
|
|
1374
|
+
"name": "royalty_amount",
|
|
1375
|
+
"type": "core::integer::u256",
|
|
1625
1376
|
"kind": "data"
|
|
1626
1377
|
}
|
|
1627
1378
|
]
|
|
1628
1379
|
},
|
|
1629
1380
|
{
|
|
1630
1381
|
"type": "event",
|
|
1631
|
-
"name": "
|
|
1382
|
+
"name": "medialane_erc1155::core::events::OrderCancelled",
|
|
1632
1383
|
"kind": "struct",
|
|
1633
1384
|
"members": [
|
|
1634
1385
|
{
|
|
1635
|
-
"name": "
|
|
1386
|
+
"name": "order_hash",
|
|
1636
1387
|
"type": "core::felt252",
|
|
1637
|
-
"kind": "
|
|
1638
|
-
},
|
|
1639
|
-
{
|
|
1640
|
-
"name": "account",
|
|
1641
|
-
"type": "core::starknet::contract_address::ContractAddress",
|
|
1642
|
-
"kind": "data"
|
|
1388
|
+
"kind": "key"
|
|
1643
1389
|
},
|
|
1644
1390
|
{
|
|
1645
|
-
"name": "
|
|
1391
|
+
"name": "offerer",
|
|
1646
1392
|
"type": "core::starknet::contract_address::ContractAddress",
|
|
1647
|
-
"kind": "
|
|
1648
|
-
}
|
|
1649
|
-
]
|
|
1650
|
-
},
|
|
1651
|
-
{
|
|
1652
|
-
"type": "event",
|
|
1653
|
-
"name": "openzeppelin_access::accesscontrol::accesscontrol::AccessControlComponent::RoleAdminChanged",
|
|
1654
|
-
"kind": "struct",
|
|
1655
|
-
"members": [
|
|
1656
|
-
{
|
|
1657
|
-
"name": "role",
|
|
1658
|
-
"type": "core::felt252",
|
|
1659
|
-
"kind": "data"
|
|
1660
|
-
},
|
|
1661
|
-
{
|
|
1662
|
-
"name": "previous_admin_role",
|
|
1663
|
-
"type": "core::felt252",
|
|
1664
|
-
"kind": "data"
|
|
1665
|
-
},
|
|
1666
|
-
{
|
|
1667
|
-
"name": "new_admin_role",
|
|
1668
|
-
"type": "core::felt252",
|
|
1669
|
-
"kind": "data"
|
|
1393
|
+
"kind": "key"
|
|
1670
1394
|
}
|
|
1671
1395
|
]
|
|
1672
1396
|
},
|
|
1673
1397
|
{
|
|
1674
1398
|
"type": "event",
|
|
1675
|
-
"name": "
|
|
1399
|
+
"name": "openzeppelin_utils::cryptography::nonces::NoncesComponent::Event",
|
|
1676
1400
|
"kind": "enum",
|
|
1677
|
-
"variants": [
|
|
1678
|
-
{
|
|
1679
|
-
"name": "RoleGranted",
|
|
1680
|
-
"type": "openzeppelin_access::accesscontrol::accesscontrol::AccessControlComponent::RoleGranted",
|
|
1681
|
-
"kind": "nested"
|
|
1682
|
-
},
|
|
1683
|
-
{
|
|
1684
|
-
"name": "RoleGrantedWithDelay",
|
|
1685
|
-
"type": "openzeppelin_access::accesscontrol::accesscontrol::AccessControlComponent::RoleGrantedWithDelay",
|
|
1686
|
-
"kind": "nested"
|
|
1687
|
-
},
|
|
1688
|
-
{
|
|
1689
|
-
"name": "RoleRevoked",
|
|
1690
|
-
"type": "openzeppelin_access::accesscontrol::accesscontrol::AccessControlComponent::RoleRevoked",
|
|
1691
|
-
"kind": "nested"
|
|
1692
|
-
},
|
|
1693
|
-
{
|
|
1694
|
-
"name": "RoleAdminChanged",
|
|
1695
|
-
"type": "openzeppelin_access::accesscontrol::accesscontrol::AccessControlComponent::RoleAdminChanged",
|
|
1696
|
-
"kind": "nested"
|
|
1697
|
-
}
|
|
1698
|
-
]
|
|
1401
|
+
"variants": []
|
|
1699
1402
|
},
|
|
1700
1403
|
{
|
|
1701
1404
|
"type": "event",
|
|
1702
|
-
"name": "medialane_erc1155::core::medialane::
|
|
1405
|
+
"name": "medialane_erc1155::core::medialane::Medialane1155V2::Event",
|
|
1703
1406
|
"kind": "enum",
|
|
1704
1407
|
"variants": [
|
|
1705
1408
|
{
|
|
@@ -1721,21 +1424,6 @@ var Medialane1155ABI = [
|
|
|
1721
1424
|
"name": "NoncesEvent",
|
|
1722
1425
|
"type": "openzeppelin_utils::cryptography::nonces::NoncesComponent::Event",
|
|
1723
1426
|
"kind": "flat"
|
|
1724
|
-
},
|
|
1725
|
-
{
|
|
1726
|
-
"name": "UpgradeableEvent",
|
|
1727
|
-
"type": "openzeppelin_upgrades::upgradeable::UpgradeableComponent::Event",
|
|
1728
|
-
"kind": "flat"
|
|
1729
|
-
},
|
|
1730
|
-
{
|
|
1731
|
-
"name": "SRC5Event",
|
|
1732
|
-
"type": "openzeppelin_introspection::src5::SRC5Component::Event",
|
|
1733
|
-
"kind": "flat"
|
|
1734
|
-
},
|
|
1735
|
-
{
|
|
1736
|
-
"name": "AccessControlEvent",
|
|
1737
|
-
"type": "openzeppelin_access::accesscontrol::accesscontrol::AccessControlComponent::Event",
|
|
1738
|
-
"kind": "flat"
|
|
1739
1427
|
}
|
|
1740
1428
|
]
|
|
1741
1429
|
}
|
|
@@ -2385,8 +2073,8 @@ var STARKNET_DOMAIN = [
|
|
|
2385
2073
|
];
|
|
2386
2074
|
function domain1155(chainId) {
|
|
2387
2075
|
return {
|
|
2388
|
-
name: "
|
|
2389
|
-
version: "
|
|
2076
|
+
name: "Medialane",
|
|
2077
|
+
version: "2",
|
|
2390
2078
|
chainId,
|
|
2391
2079
|
revision: TypedDataRevision.ACTIVE
|
|
2392
2080
|
};
|
|
@@ -2397,13 +2085,25 @@ function build1155OrderTypedData(message, chainId) {
|
|
|
2397
2085
|
primaryType: "OrderParameters",
|
|
2398
2086
|
types: {
|
|
2399
2087
|
StarknetDomain: STARKNET_DOMAIN,
|
|
2088
|
+
OfferItem: [
|
|
2089
|
+
{ name: "item_type", type: "shortstring" },
|
|
2090
|
+
{ name: "token", type: "ContractAddress" },
|
|
2091
|
+
{ name: "identifier_or_criteria", type: "felt" },
|
|
2092
|
+
{ name: "start_amount", type: "felt" },
|
|
2093
|
+
{ name: "end_amount", type: "felt" }
|
|
2094
|
+
],
|
|
2095
|
+
ConsiderationItem: [
|
|
2096
|
+
{ name: "item_type", type: "shortstring" },
|
|
2097
|
+
{ name: "token", type: "ContractAddress" },
|
|
2098
|
+
{ name: "identifier_or_criteria", type: "felt" },
|
|
2099
|
+
{ name: "start_amount", type: "felt" },
|
|
2100
|
+
{ name: "end_amount", type: "felt" },
|
|
2101
|
+
{ name: "recipient", type: "ContractAddress" }
|
|
2102
|
+
],
|
|
2400
2103
|
OrderParameters: [
|
|
2401
2104
|
{ name: "offerer", type: "ContractAddress" },
|
|
2402
|
-
{ name: "
|
|
2403
|
-
{ name: "
|
|
2404
|
-
{ name: "amount", type: "felt" },
|
|
2405
|
-
{ name: "payment_token", type: "ContractAddress" },
|
|
2406
|
-
{ name: "price_per_unit", type: "felt" },
|
|
2105
|
+
{ name: "offer", type: "OfferItem" },
|
|
2106
|
+
{ name: "consideration", type: "ConsiderationItem" },
|
|
2407
2107
|
{ name: "start_time", type: "felt" },
|
|
2408
2108
|
{ name: "end_time", type: "felt" },
|
|
2409
2109
|
{ name: "salt", type: "felt" },
|
|
@@ -2504,11 +2204,21 @@ async function createListing1155(account, params, config) {
|
|
|
2504
2204
|
const chainId = getChainId2();
|
|
2505
2205
|
const orderParams = {
|
|
2506
2206
|
offerer: account.address,
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2207
|
+
offer: {
|
|
2208
|
+
item_type: "ERC1155",
|
|
2209
|
+
token: nftContract,
|
|
2210
|
+
identifier_or_criteria: tokenId,
|
|
2211
|
+
start_amount: amount,
|
|
2212
|
+
end_amount: amount
|
|
2213
|
+
},
|
|
2214
|
+
consideration: {
|
|
2215
|
+
item_type: "ERC20",
|
|
2216
|
+
token: token.address,
|
|
2217
|
+
identifier_or_criteria: "0",
|
|
2218
|
+
start_amount: priceWei,
|
|
2219
|
+
end_amount: priceWei,
|
|
2220
|
+
recipient: account.address
|
|
2221
|
+
},
|
|
2512
2222
|
start_time: now.toString(),
|
|
2513
2223
|
end_time: endTime.toString(),
|
|
2514
2224
|
salt,
|