Skip to content

Commit 1f18048

Browse files
authored
chore: fix README examples for creating orders (#75)
1 parent 8db884b commit 1f18048

File tree

1 file changed

+38
-34
lines changed

1 file changed

+38
-34
lines changed

README.md

Lines changed: 38 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -89,22 +89,24 @@ Many of the main core flows return _use cases_. What this means is that if you w
8989
```js
9090
const offerer = "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266";
9191
const fulfiller = "0x70997970c51812dc3a010c7d01b50e0d17dc79c8";
92-
const { executeAllActions } = await seaport.createOrder({
93-
offer: [
94-
{
95-
itemType: ItemType.ERC721,
96-
token: "0x8a90cab2b38dba80c64b7734e58ee1db38b8992e",
97-
identifier: "1",
98-
},
99-
],
100-
consideration: [
101-
{
102-
amount: parseEther("10").toString(),
103-
recipient: offerer,
104-
},
105-
],
106-
accountAddress: offerer,
107-
});
92+
const { executeAllActions } = await seaport.createOrder(
93+
{
94+
offer: [
95+
{
96+
itemType: ItemType.ERC721,
97+
token: "0x8a90cab2b38dba80c64b7734e58ee1db38b8992e",
98+
identifier: "1",
99+
},
100+
],
101+
consideration: [
102+
{
103+
amount: parseEther("10").toString(),
104+
recipient: offerer,
105+
},
106+
],
107+
},
108+
offerer
109+
);
108110

109111
const order = await executeAllActions();
110112

@@ -122,24 +124,26 @@ const transaction = executeAllFulfillActions();
122124
```js
123125
const offerer = "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266";
124126
const fulfiller = "0x70997970c51812dc3a010c7d01b50e0d17dc79c8";
125-
const { executeAllActions } = await seaport.createOrder({
126-
offer: [
127-
{
128-
amount: parseEther("10").toString(),
129-
// WETH
130-
token: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
131-
},
132-
],
133-
consideration: [
134-
{
135-
itemType: ItemType.ERC721,
136-
token: "0x8a90cab2b38dba80c64b7734e58ee1db38b8992e",
137-
identifier: "1",
138-
recipient: offerer,
139-
},
140-
],
141-
accountAddress: offerer,
142-
});
127+
const { executeAllActions } = await seaport.createOrder(
128+
{
129+
offer: [
130+
{
131+
amount: parseEther("10").toString(),
132+
// WETH
133+
token: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
134+
},
135+
],
136+
consideration: [
137+
{
138+
itemType: ItemType.ERC721,
139+
token: "0x8a90cab2b38dba80c64b7734e58ee1db38b8992e",
140+
identifier: "1",
141+
recipient: offerer,
142+
},
143+
],
144+
},
145+
offerer
146+
);
143147

144148
const order = await executeAllActions();
145149

0 commit comments

Comments
 (0)