From 231f2fdaf5dd57c1103933a17ec31a420d2d9ae6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hi=E1=BA=BFu=20Ph=E1=BA=A1m?= Date: Fri, 16 Feb 2024 17:22:56 +0700 Subject: [PATCH] support binding new sale data v2 --- contracts/feralfile-english-auction/english_auction.go | 10 ++++++---- contracts/feralfile-exhibition-v5/feralfile.go | 8 ++++---- sub_modules/feralfile-exhibition-smart-contract | 2 +- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/contracts/feralfile-english-auction/english_auction.go b/contracts/feralfile-english-auction/english_auction.go index f4630c4..01005c5 100644 --- a/contracts/feralfile-english-auction/english_auction.go +++ b/contracts/feralfile-english-auction/english_auction.go @@ -160,6 +160,7 @@ func (c *FeralfileEnglishAuctionContract) Call(wallet *ethereum.Wallet, method, Bps ethereum.BigInt } PayByVaultContract bool + BiddingUnix ethereum.BigInt } R string S string @@ -196,12 +197,12 @@ func (c *FeralfileEnglishAuctionContract) Call(wallet *ethereum.Wallet, method, tokenIDs = append(tokenIDs, &tokenID) } - revenueShares := make([][]IFeralfileSaleDataRevenueShare, 0) + revenueShares := make([][]IFeralfileSaleDataV2RevenueShare, 0) for _, v := range params.SaleData.RevenueShares { - revenueShare := make([]IFeralfileSaleDataRevenueShare, 0) + revenueShare := make([]IFeralfileSaleDataV2RevenueShare, 0) for _, vv := range v { bps := vv.Bps.Int - revenueShare = append(revenueShare, IFeralfileSaleDataRevenueShare{ + revenueShare = append(revenueShare, IFeralfileSaleDataV2RevenueShare{ Recipient: vv.Recipient, Bps: &bps, }) @@ -209,7 +210,7 @@ func (c *FeralfileEnglishAuctionContract) Call(wallet *ethereum.Wallet, method, revenueShares = append(revenueShares, revenueShare) } - saleData := IFeralfileSaleDataSaleData{ + saleData := IFeralfileSaleDataV2SaleData{ Price: ¶ms.SaleData.Price.Int, Cost: ¶ms.SaleData.Cost.Int, ExpiryTime: ¶ms.SaleData.ExpiryTime.Int, @@ -217,6 +218,7 @@ func (c *FeralfileEnglishAuctionContract) Call(wallet *ethereum.Wallet, method, TokenIds: tokenIDs, RevenueShares: revenueShares, PayByVaultContract: params.SaleData.PayByVaultContract, + BiddingUnix: ¶ms.SaleData.BiddingUnix.Int, } tx, err := contract.SettleAuction(t, ¶ms.AuctionID.Int, params.ContractAddress, params.VaultAddress, saleData, r32Val, s32Val, uint8(vVal)) diff --git a/contracts/feralfile-exhibition-v5/feralfile.go b/contracts/feralfile-exhibition-v5/feralfile.go index 0af8bae..9f8f2ca 100644 --- a/contracts/feralfile-exhibition-v5/feralfile.go +++ b/contracts/feralfile-exhibition-v5/feralfile.go @@ -198,12 +198,12 @@ func (c *FeralfileExhibitionV5Contract) Call(wallet *ethereum.Wallet, method, fu tokenIDs = append(tokenIDs, &tokenID) } - revenueShares := make([][]IFeralfileSaleDataRevenueShare, 0) + revenueShares := make([][]IFeralfileSaleDataV2RevenueShare, 0) for _, v := range params.SaleData.RevenueShares { - revenueShare := make([]IFeralfileSaleDataRevenueShare, 0) + revenueShare := make([]IFeralfileSaleDataV2RevenueShare, 0) for _, vv := range v { bps := vv.Bps.Int - revenueShare = append(revenueShare, IFeralfileSaleDataRevenueShare{ + revenueShare = append(revenueShare, IFeralfileSaleDataV2RevenueShare{ Recipient: vv.Recipient, Bps: &bps, }) @@ -211,7 +211,7 @@ func (c *FeralfileExhibitionV5Contract) Call(wallet *ethereum.Wallet, method, fu revenueShares = append(revenueShares, revenueShare) } - saleData := IFeralfileSaleDataSaleData{ + saleData := IFeralfileSaleDataV2SaleData{ Price: ¶ms.SaleData.Price.Int, Cost: ¶ms.SaleData.Cost.Int, ExpiryTime: ¶ms.SaleData.ExpiryTime.Int, diff --git a/sub_modules/feralfile-exhibition-smart-contract b/sub_modules/feralfile-exhibition-smart-contract index 0e6aa66..61544dd 160000 --- a/sub_modules/feralfile-exhibition-smart-contract +++ b/sub_modules/feralfile-exhibition-smart-contract @@ -1 +1 @@ -Subproject commit 0e6aa66d8d20d6d4478277976859466fc6f4b6a2 +Subproject commit 61544ddbbaf58839963ee7342064cc68c7f1c1e2