Skip to content

Commit 7b6b5ec

Browse files
committed
Release v0.27.0
Origin-SHA: 735000ca1bc600d5180cf8f7854b03ee0c8fbe7c
1 parent 7b4c696 commit 7b6b5ec

18 files changed

Lines changed: 66 additions & 23 deletions

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @opensea/tool-sdk
22

3+
## 0.27.0
4+
5+
### Minor Changes
6+
7+
- 05b370a: feat: add Monad (chain 143) support. The `--network` flag now accepts `monad` in addition to `base`, `mainnet`, `shape`, and `abstract` — the chain is defined locally (mirroring viem's `monad` definition) because the pinned viem version predates Monad mainnet. Added 143 to every `Deployment.chains` array in `chains.ts` and updated the deployed-address docs; the canonical v0.2 addresses are identical on Monad (verified via CREATE2 dry-run).
8+
39
## 0.26.1
410

511
### Patch Changes

docs/predicate-gating-guide.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Use predicate gating when access should be tied to **who the caller is**. Use x4
2727

2828
Tool creators configure the predicate onchain (via `register --access-predicate` or direct contract calls). The `predicateGate` middleware picks it up at runtime — no code changes needed when the access policy changes.
2929

30-
The canonical `ERC721OwnerPredicate` (v0.2) is deployed on Ethereum mainnet, Base, Shape, and Abstract at `0xc8721c9A776958FfFfEb602DA1b708bf1D318379` (see `src/lib/onchain/chains.ts`).
30+
The canonical `ERC721OwnerPredicate` (v0.2) is deployed on Ethereum mainnet, Base, Shape, Abstract, and Monad at `0xc8721c9A776958FfFfEb602DA1b708bf1D318379` (see `src/lib/onchain/chains.ts`).
3131

3232
## Prerequisites
3333

@@ -129,7 +129,7 @@ PRIVATE_KEY=0x... RPC_URL=https://mainnet.base.org npx @opensea/tool-sdk registe
129129
--dry-run
130130
```
131131

132-
For ERC-721 gating, use the canonical v0.2 `ERC721OwnerPredicate` at `0xc8721c9A776958FfFfEb602DA1b708bf1D318379` (Ethereum mainnet, Base, Shape, Abstract). After registration, call `setCollections(toolId, [collectionAddress])` on the predicate to configure which collections gate the tool.
132+
For ERC-721 gating, use the canonical v0.2 `ERC721OwnerPredicate` at `0xc8721c9A776958FfFfEb602DA1b708bf1D318379` (Ethereum mainnet, Base, Shape, Abstract, Monad). After registration, call `setCollections(toolId, [collectionAddress])` on the predicate to configure which collections gate the tool.
133133

134134
## Step 3: Verify the setup
135135

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@opensea/tool-sdk",
3-
"version": "0.26.1",
3+
"version": "0.27.0",
44
"type": "module",
55
"description": "SDK and CLI for building ERC-8257 compliant AI agent tools",
66
"repository": {

skill/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ This SDK is for tool *providers and consumers*. To query OpenSea marketplace dat
6767

6868
If you need your API on a subdomain, serve the manifest from that same subdomain (e.g., both on `api.example.com`).
6969

70-
## Deployed Contracts (Ethereum mainnet, Base, Shape, Abstract)
70+
## Deployed Contracts (Ethereum mainnet, Base, Shape, Abstract, Monad)
7171

7272
Canonical v0.2 deployments — identical CREATE2 address on every supported chain.
7373

skill/references/known-predicates.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Known Predicates
22

3-
These predicates are deployed on Ethereum mainnet, Base, Shape, and Abstract and available for any tool to use. They are multi-tenant: one deployment serves all tools, configured per `toolId`.
3+
These predicates are deployed on Ethereum mainnet, Base, Shape, Abstract, and Monad and available for any tool to use. They are multi-tenant: one deployment serves all tools, configured per `toolId`.
44

55
## ERC721OwnerPredicate
66

@@ -283,7 +283,7 @@ if (decoded.type === "erc7496Trait") {
283283

284284
## ERC20BalancePredicate
285285

286-
Gates access based on holding a configurable minimum balance of an ERC-20 token. Multi-tenant: one deployment per chain, configured per `toolId`. Canonical deployment: `0x1a834FC48B5f6e119c62C12a98b32137bCFA77cD` (Ethereum mainnet, Base, Shape, Abstract). The CLI commands default to this address; pass `--predicate-address` only to override it.
286+
Gates access based on holding a configurable minimum balance of an ERC-20 token. Multi-tenant: one deployment per chain, configured per `toolId`. Canonical deployment: `0x1a834FC48B5f6e119c62C12a98b32137bCFA77cD` (Ethereum mainnet, Base, Shape, Abstract, Monad). The CLI commands default to this address; pass `--predicate-address` only to override it.
287287

288288
| Field | Value |
289289
|-------|-------|

src/cli/commands/configure-erc20-gate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export const configureERC20GateCommand = new Command("configure-erc20-gate")
3939
)
4040
.option(
4141
"--network <network>",
42-
"Network: base, mainnet, shape, or abstract",
42+
"Network: base, mainnet, shape, abstract, or monad",
4343
"base",
4444
)
4545
.option(

src/cli/commands/configure-subscription.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export const configureSubscriptionCommand = new Command(
3434
.option("--min-tier <tier>", "Minimum subscription tier (uint8, 0-255)", "0")
3535
.option(
3636
"--network <network>",
37-
"Network: base, mainnet, shape, or abstract",
37+
"Network: base, mainnet, shape, abstract, or monad",
3838
"base",
3939
)
4040
.option(

src/cli/commands/configure-trait-gating.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export const configureTraitGatingCommand = new Command("configure-trait-gating")
5050
)
5151
.option(
5252
"--network <network>",
53-
"Network: base, mainnet, shape, or abstract",
53+
"Network: base, mainnet, shape, abstract, or monad",
5454
"base",
5555
)
5656
.option(

src/cli/commands/get-chain.ts

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import type { Chain } from "viem"
2+
import { defineChain } from "viem"
23
import {
34
abstract as abstractChain,
45
base,
@@ -7,6 +8,40 @@ import {
78
shape,
89
} from "viem/chains"
910

11+
/**
12+
* Monad mainnet, mirroring viem's definition. The pinned viem version
13+
* predates Monad mainnet — replace with `import { monad } from "viem/chains"`
14+
* once viem is upgraded past 2.38.
15+
*/
16+
const monad = defineChain({
17+
id: 143,
18+
name: "Monad",
19+
nativeCurrency: {
20+
name: "Monad",
21+
symbol: "MON",
22+
decimals: 18,
23+
},
24+
rpcUrls: {
25+
default: {
26+
http: ["https://rpc.monad.xyz"],
27+
webSocket: ["wss://rpc.monad.xyz"],
28+
},
29+
},
30+
blockExplorers: {
31+
default: {
32+
name: "Monadscan",
33+
url: "https://monadscan.com",
34+
apiUrl: "https://api.etherscan.io/v2/api?chainid=143",
35+
},
36+
},
37+
contracts: {
38+
multicall3: {
39+
address: "0xcA11bde05977b3631167028862bE2a173976CA11",
40+
blockCreated: 9248132,
41+
},
42+
},
43+
})
44+
1045
export function getChain(network: string) {
1146
switch (network) {
1247
case "base":
@@ -19,6 +54,8 @@ export function getChain(network: string) {
1954
return shape
2055
case "abstract":
2156
return abstractChain
57+
case "monad":
58+
return monad
2259
default:
2360
throw new Error(`Unsupported network: ${network}`)
2461
}

src/cli/commands/get-collections.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export const getCollectionsCommand = new Command("get-collections")
1919
.argument("<toolId>", "Tool ID (uint256)")
2020
.option(
2121
"--network <network>",
22-
"Network: base, mainnet, shape, or abstract",
22+
"Network: base, mainnet, shape, abstract, or monad",
2323
"base",
2424
)
2525
.option("--rpc-url <url>", "RPC endpoint")

0 commit comments

Comments
 (0)