@tradeport/sui-trading-sdk 0.1.47 → 0.1.49
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/CHANGELOG.md +12 -0
- package/dist/index.js +1 -30
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -30
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/methods/placeNftBids/addPlaceNftBidTxs.ts +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @tradeport/sui-trading-sdk
|
|
2
2
|
|
|
3
|
+
## 0.1.49
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- a20d38c: Renabling OB collection bidding, but not solo bidding yet
|
|
8
|
+
|
|
9
|
+
## 0.1.48
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 1fe6458: Disabling placing orginbyte bidding to research potentail exploit
|
|
14
|
+
|
|
3
15
|
## 0.1.47
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -3832,38 +3832,9 @@ async function addTradePortKioskPlaceNftBidTx({
|
|
|
3832
3832
|
});
|
|
3833
3833
|
destroyZeroCoin({ tx, coin: coin1 });
|
|
3834
3834
|
}
|
|
3835
|
-
async function addOriginBytePlaceNftBidTx({
|
|
3836
|
-
tx,
|
|
3837
|
-
nftTokenId,
|
|
3838
|
-
collectionId,
|
|
3839
|
-
bidAmount,
|
|
3840
|
-
bidder
|
|
3841
|
-
}) {
|
|
3842
|
-
const { kiosk: bidderKiosk, isNewKiosk: isNewBidderKiosk } = await getOrCreateOBKiosk({
|
|
3843
|
-
tx,
|
|
3844
|
-
address: bidder,
|
|
3845
|
-
createMethod: "create_for_sender"
|
|
3846
|
-
});
|
|
3847
|
-
const marketFeePrice = getMarketFeePrice({ price: bidAmount, collectionId });
|
|
3848
|
-
const [coin] = splitCoins({ tx, amounts: [tx.pure.u64(bidAmount + marketFeePrice)] });
|
|
3849
|
-
tx.moveCall({
|
|
3850
|
-
target: "0x8534e4cdfd28709c94330a9783c3d5fe6f5daba0bffb69102ce303c5b38aed5a::bidding::create_bid_with_commission",
|
|
3851
|
-
arguments: [
|
|
3852
|
-
isNewBidderKiosk ? tx.object(bidderKiosk) : tx.pure.address(bidderKiosk),
|
|
3853
|
-
tx.pure.address(nftTokenId),
|
|
3854
|
-
tx.pure.u64(bidAmount),
|
|
3855
|
-
tx.pure.address(TRADEPORT_BENEFICIARY_ADDRESS),
|
|
3856
|
-
tx.pure.u64(marketFeePrice),
|
|
3857
|
-
tx.object(coin)
|
|
3858
|
-
],
|
|
3859
|
-
typeArguments: ["0x2::sui::SUI"]
|
|
3860
|
-
});
|
|
3861
|
-
destroyZeroCoin({ tx, coin });
|
|
3862
|
-
}
|
|
3863
3835
|
async function addTradePortPlaceNftBidTxHandler(txData) {
|
|
3864
3836
|
if (isOriginByteTx(txData?.sharedObjects) && !ORIGIN_BYTE_NFT_TYPES_MISSING_ORDERBOOK?.includes(normalizedNftType(txData?.nftType))) {
|
|
3865
|
-
|
|
3866
|
-
return;
|
|
3837
|
+
throw new Error("OriginByte bidding not supported currently");
|
|
3867
3838
|
}
|
|
3868
3839
|
if (await hasTransferPolicyRules(txData?.nftType) && txData?.sellerKiosk) {
|
|
3869
3840
|
const royaltyRuleModule = getRoyaltyRuleModule(txData?.nftType);
|