Skip to content

Commit

Permalink
chore: rename approveOrders to validate and constant rename
Browse files Browse the repository at this point in the history
  • Loading branch information
sunwrobert committed May 20, 2022
1 parent cfdfa21 commit 188f214
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions src/__tests__/basic-fulfill.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ describeWithFixture(
action.transactionMethods.transact()
).to.be.revertedWith("InvalidSigner");

await seaport.approveOrders([order], offerer.address).transact();
await seaport.validate([order], offerer.address).transact();

const ownerToTokenToIdentifierBalances =
await getBalancesForFulfillOrder(
Expand Down Expand Up @@ -293,7 +293,7 @@ describeWithFixture(
fulfillAction.transactionMethods.transact()
).to.be.revertedWith("InvalidSigner");

await seaport.approveOrders([order], offerer.address).transact();
await seaport.validate([order], offerer.address).transact();

const transaction =
await fulfillAction.transactionMethods.transact();
Expand Down Expand Up @@ -499,7 +499,7 @@ describeWithFixture(
fulfillAction.transactionMethods.transact()
).to.be.revertedWith("InvalidSigner");

await seaport.approveOrders([order], offerer.address).transact();
await seaport.validate([order], offerer.address).transact();

const ownerToTokenToIdentifierBalances =
await getBalancesForFulfillOrder(
Expand Down Expand Up @@ -662,7 +662,7 @@ describeWithFixture(
fulfillAction.transactionMethods.transact()
).to.be.revertedWith("InvalidSigner");

await seaport.approveOrders([order], offerer.address).transact();
await seaport.validate([order], offerer.address).transact();

expect(fulfillAction).to.be.deep.equal({
type: "exchange",
Expand Down
2 changes: 1 addition & 1 deletion src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,5 +79,5 @@ export const NO_CONDUIT =
// Supply here any known conduit keys as well as their conduits
export const KNOWN_CONDUIT_KEYS_TO_CONDUIT = {};

export const CROSS_CHAIN_CONSIDERATION_ADDRESS =
export const CROSS_CHAIN_SEAPORT_ADDRESS =
"0x00000000006cee72100d161c57ada5bb2be1ca79";
8 changes: 4 additions & 4 deletions src/seaport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
MAX_INT,
NO_CONDUIT,
OrderType,
CROSS_CHAIN_CONSIDERATION_ADDRESS,
CROSS_CHAIN_SEAPORT_ADDRESS,
} from "./constants";
import type { Seaport as SeaportContract } from "./typechain/Seaport";
import type {
Expand Down Expand Up @@ -93,7 +93,7 @@ export class Seaport {
this.multicallProvider = new multicallProviders.MulticallProvider(provider);

this.contract = new Contract(
overrides?.contractAddress ?? CROSS_CHAIN_CONSIDERATION_ADDRESS,
overrides?.contractAddress ?? CROSS_CHAIN_SEAPORT_ADDRESS,
SeaportABI,
this.multicallProvider
) as SeaportContract;
Expand Down Expand Up @@ -397,12 +397,12 @@ export class Seaport {

/**
* Approves a list of orders on-chain. This allows accounts to fulfill the order without requiring
* a signature
* a signature. Can also check if an order is valid using `callStatic`
* @param orders list of order structs
* @param accountAddress optional account address to approve orders.
* @returns the set of transaction methods that can be used
*/
public approveOrders(
public validate(
orders: Order[],
accountAddress?: string
): TransactionMethods {
Expand Down

0 comments on commit 188f214

Please sign in to comment.