@@ -563,19 +563,21 @@ export class Seaport {
563563 * @param orders list of order components
564564 * @param accountAddress optional account address from which to cancel the orders from.
565565 * @param domain optional domain to be hashed and appended to calldata
566+ * @param overrides any transaction overrides the client wants, ignored if not set
566567 * @returns the set of transaction methods that can be used
567568 */
568569 public cancelOrders (
569570 orders : OrderComponents [ ] ,
570571 accountAddress ?: string ,
571572 domain ?: string ,
573+ overrides ?: PayableOverrides ,
572574 ) : TransactionMethods < ContractMethodReturnType < SeaportContract , "cancel" > > {
573575 const signer = this . _getSigner ( accountAddress ) ;
574576
575577 return getTransactionMethods (
576578 this . contract . connect ( signer ) ,
577579 "cancel" ,
578- [ orders ] ,
580+ [ orders , overrides ] ,
579581 domain ,
580582 ) ;
581583 }
@@ -584,11 +586,13 @@ export class Seaport {
584586 * Bulk cancels all existing orders for a given account
585587 * @param offerer the account to bulk cancel orders on
586588 * @param domain optional domain to be hashed and appended to calldata
589+ * @param overrides any transaction overrides the client wants, ignored if not set
587590 * @returns the set of transaction methods that can be used
588591 */
589592 public bulkCancelOrders (
590593 offerer ?: string ,
591594 domain ?: string ,
595+ overrides ?: PayableOverrides ,
592596 ) : TransactionMethods <
593597 ContractMethodReturnType < SeaportContract , "incrementCounter" >
594598 > {
@@ -597,7 +601,7 @@ export class Seaport {
597601 return getTransactionMethods (
598602 this . contract . connect ( signer ) ,
599603 "incrementCounter" ,
600- [ ] ,
604+ [ overrides ] ,
601605 domain ,
602606 ) ;
603607 }
@@ -608,19 +612,21 @@ export class Seaport {
608612 * @param orders list of order structs
609613 * @param accountAddress optional account address to approve orders.
610614 * @param domain optional domain to be hashed and appended to calldata
615+ * @param overrides any transaction overrides the client wants, ignored if not set
611616 * @returns the set of transaction methods that can be used
612617 */
613618 public validate (
614619 orders : Order [ ] ,
615620 accountAddress ?: string ,
616621 domain ?: string ,
622+ overrides ?: PayableOverrides ,
617623 ) : TransactionMethods < ContractMethodReturnType < SeaportContract , "validate" > > {
618624 const signer = this . _getSigner ( accountAddress ) ;
619625
620626 return getTransactionMethods (
621627 this . contract . connect ( signer ) ,
622628 "validate" ,
623- [ orders ] ,
629+ [ orders , overrides ] ,
624630 domain ,
625631 ) ;
626632 }
@@ -780,7 +786,7 @@ export class Seaport {
780786 * Defaults to the zero address which means the offer goes to the fulfiller
781787 * @param input.domain optional domain to be hashed and appended to calldata
782788 * @param input.exactApproval optional boolean to indicate whether the approval should be exact or not
783- * @param input.overrides any overrides the client wants, will ignore value
789+ * @param input.overrides any transaction overrides the client wants, ignored if not set
784790 * @returns a use case containing the set of approval actions and fulfillment action
785791 */
786792 public async fulfillOrder ( {
@@ -1082,7 +1088,7 @@ export class Seaport {
10821088 * @param input
10831089 * @param input.orders the list of orders to match
10841090 * @param input.fulfillments the list of fulfillments to match offer and considerations
1085- * @param input.overrides any overrides the client wants, will need to pass in value for matching orders with ETH.
1091+ * @param input.overrides any transaction overrides the client wants, will need to pass in value for matching orders with ETH.
10861092 * @param input.accountAddress Optional address for which to match the order with
10871093 * @param input.domain optional domain to be hashed and appended to calldata
10881094 * @returns set of transaction methods for matching orders
@@ -1112,9 +1118,17 @@ export class Seaport {
11121118 ) ;
11131119 }
11141120
1121+ /**
1122+ * Set a domain on the canonical domain registry.
1123+ * @param domain The domain to set
1124+ * @param accountAddress Address to send the transaction from
1125+ * @param overrides Any transaction overrides the client wants, ignored if not set
1126+ * @returns The domain tag (4 byte keccak hash of the domain)
1127+ */
11151128 public setDomain (
11161129 domain : string ,
11171130 accountAddress ?: string ,
1131+ overrides ?: PayableOverrides ,
11181132 ) : TransactionMethods <
11191133 ContractMethodReturnType < DomainRegistryContract , "setDomain" >
11201134 > {
@@ -1123,29 +1137,40 @@ export class Seaport {
11231137 return getTransactionMethods (
11241138 this . domainRegistry . connect ( signer ) ,
11251139 "setDomain" ,
1126- [ domain ] ,
1140+ [ domain , overrides ] ,
11271141 ) ;
11281142 }
11291143
1144+ /**
1145+ * Get the number of domains registered under a domain tag.
1146+ * @param tag The domain tag.
1147+ * @returns The number of domains registered under the tag.
1148+ */
11301149 public async getNumberOfDomains ( tag : string ) : Promise < BigNumber > {
11311150 return this . domainRegistry . getNumberOfDomains ( tag ) ;
11321151 }
11331152
1153+ /**
1154+ * Gets the domain at a given index under a domain tag.
1155+ * @param tag The domain tag.
1156+ * @param index The index.
1157+ * @returns The domain at the index for the given tag.
1158+ */
11341159 public getDomain ( tag : string , index : number ) : Promise < string > {
11351160 return this . domainRegistry . getDomain ( tag , index ) ;
11361161 }
11371162
1138- public async getDomains (
1139- tag : string ,
1140- shouldThrow ?: boolean ,
1141- ) : Promise < string [ ] > {
1163+ /**
1164+ * Gets the domains registered under a tag.
1165+ * @param tag The domain tag.
1166+ * @returns The domains registered under the tag.
1167+ */
1168+ public async getDomains ( tag : string ) : Promise < string [ ] > {
11421169 try {
1143- if ( shouldThrow ) {
1144- throw Error ;
1145- }
1146-
11471170 return this . domainRegistry . getDomains ( tag ) ;
11481171 } catch ( error ) {
1172+ // If there are too many domains set under the tag, it will revert when trying to return in memory.
1173+ // This fallback will manually query each index to get the full list of domains.
11491174 const totalDomains = (
11501175 await this . domainRegistry . getNumberOfDomains ( tag )
11511176 ) . toNumber ( ) ;
0 commit comments