@@ -12,6 +12,7 @@ import {
1212 BigNumberish ,
1313 Contract ,
1414 FixedNumber ,
15+ PayableOverrides ,
1516 Wallet ,
1617 ethers ,
1718 providers ,
@@ -658,16 +659,19 @@ export class OpenSeaSDK {
658659 * @param options.accountAddress Address of the wallet taking the order.
659660 * @param options.domain An optional domain to be hashed and included at the end of fulfillment calldata.
660661 * This can be used for on-chain order attribution to assist with analytics.
662+ * @param options.overrides Transaction overrides, ignored if not set.
661663 * @returns Transaction hash of the order.
662664 */
663665 private async fulfillPrivateOrder ( {
664666 order,
665667 accountAddress,
666668 domain,
669+ overrides,
667670 } : {
668671 order : OrderV2 ;
669672 accountAddress : string ;
670673 domain ?: string ;
674+ overrides ?: PayableOverrides ;
671675 } ) : Promise < string > {
672676 if ( ! order . taker ?. address ) {
673677 throw new Error (
@@ -684,6 +688,7 @@ export class OpenSeaSDK {
684688 orders : [ order . protocolData , counterOrder ] ,
685689 fulfillments,
686690 overrides : {
691+ ...overrides ,
687692 value : counterOrder . parameters . offer [ 0 ] . startAmount ,
688693 } ,
689694 accountAddress,
@@ -707,6 +712,7 @@ export class OpenSeaSDK {
707712 * @param options.accountAddress Address of the wallet taking the offer.
708713 * @param options.recipientAddress The optional address to receive the order's item(s) or curriencies. If not specified, defaults to accountAddress.
709714 * @param options.domain An optional domain to be hashed and included at the end of fulfillment calldata. This can be used for on-chain order attribution to assist with analytics.
715+ * @param options.overrides Transaction overrides, ignored if not set.
710716 * @returns Transaction hash of the order.
711717 *
712718 * @throws Error if the accountAddress is not available through wallet or provider.
@@ -718,11 +724,13 @@ export class OpenSeaSDK {
718724 accountAddress,
719725 recipientAddress,
720726 domain,
727+ overrides,
721728 } : {
722729 order : OrderV2 ;
723730 accountAddress : string ;
724731 recipientAddress ?: string ;
725732 domain ?: string ;
733+ overrides ?: PayableOverrides ;
726734 } ) : Promise < string > {
727735 await this . _requireAccountIsAvailable ( accountAddress ) ;
728736 requireValidProtocol ( order . protocolAddress ) ;
@@ -760,6 +768,7 @@ export class OpenSeaSDK {
760768 order,
761769 accountAddress,
762770 domain,
771+ overrides,
763772 } ) ;
764773 }
765774
@@ -769,6 +778,7 @@ export class OpenSeaSDK {
769778 recipientAddress,
770779 extraData,
771780 domain,
781+ overrides,
772782 } ) ;
773783 const transaction = await executeAllActions ( ) ;
774784
@@ -787,18 +797,21 @@ export class OpenSeaSDK {
787797 * @param options.accountAddress The account address cancelling the orders.
788798 * @param options.domain An optional domain to be hashed and included at the end of fulfillment calldata.
789799 * This can be used for on-chain order attribution to assist with analytics.
800+ * @param options.overrides Transaction overrides, ignored if not set.
790801 * @returns Transaction hash of the order.
791802 */
792803 private async cancelSeaportOrders ( {
793804 orders,
794805 accountAddress,
795806 domain,
796807 protocolAddress = DEFAULT_SEAPORT_CONTRACT_ADDRESS ,
808+ overrides,
797809 } : {
798810 orders : OrderComponents [ ] ;
799811 accountAddress : string ;
800812 domain ?: string ;
801813 protocolAddress ?: string ;
814+ overrides ?: PayableOverrides ;
802815 } ) : Promise < string > {
803816 const checksummedProtocolAddress = ethers . utils . getAddress ( protocolAddress ) ;
804817 if ( checksummedProtocolAddress !== DEFAULT_SEAPORT_CONTRACT_ADDRESS ) {
@@ -808,7 +821,7 @@ export class OpenSeaSDK {
808821 }
809822
810823 const transaction = await this . seaport_v1_5
811- . cancelOrders ( orders , accountAddress , domain )
824+ . cancelOrders ( orders , accountAddress , domain , overrides )
812825 . transact ( ) ;
813826
814827 return transaction . hash ;
0 commit comments