MCPcopy Index your code
hub / github.com/clockwork-xyz/examples

github.com/clockwork-xyz/examples @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
289 symbols 495 edges 152 files 30 documented · 10%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Clockwork examples

This repo contains example automated smart-contracts built with the Clockwork SDK. - 0. Quickstart Sol Transfer (Typescript) – Executes an SOL transfer on a user-defined schedule. - 1. SPL Transfer (Typescript) – Executes an SPL token transfer on a user-defined schedule. - 2. Counter – Creates a thread via CPI that increments a counter every 10 seconds - Recurring payments – Executes an SPL token transfer on a user-defined schedule. - Token distributor – Mints a new token and sends it to a target user every 60 seconds. - Dollar cost averaging – Executes a swap on Serum on a user-defined schedule. - Serum crank – Indefinitely processes open orders on a permissioned Serum market. - Subscriptions – Allow users to subscribe to subscriptions by paying on a recurrent schedule.

Extension points exported contracts — how you extend this code

DcaAccount (Interface)
(no doc) [1 implementers]
orca_dca/programs/orca_dca/src/state/dca.rs
DcaAccount (Interface)
(no doc) [1 implementers]
openbook_dca/programs/openbook_dca/src/state/dca.rs
DistributorAccount (Interface)
(no doc) [1 implementers]
distributor/programs/distributor/src/state/distributor.rs
FeedAccount (Interface)
(no doc) [1 implementers]
pyth_feed/programs/pyth_feed/src/state/feed.rs
CrankAccount (Interface)
(no doc) [1 implementers]
openbook_crank/programs/openbook_crank/src/state/crank.rs
DcaAccount (Interface)
(no doc) [1 implementers]
orca_whirlpool_dca/programs/orca_whirlpool_dca/src/state/dca.rs
SubscriberAccount (Interface)
(no doc) [1 implementers]
subscriptions/programs/subscriptions/src/state/subscriber.rs
PaymentAccount (Interface)
(no doc) [1 implementers]
payments/programs/payments/src/state/payment.rs

Core symbols most depended-on inside this repo

print_address
called by 11
utils/lib/index.ts
print_explorer_link
called by 8
openbook_dca/client/src/utils.rs
print_explorer_link
called by 8
orca_whirlpool_dca/client/src/utils.rs
process
called by 8
subscriptions/programs/subscriptions/src/contexts/withdraw.rs
send_and_confirm_tx
called by 7
subscriptions/client/src/utils.rs
print_explorer_link
called by 6
orca_dca/client/src/utils.rs
get_address_env
called by 6
subscriptions/client/src/utils.rs
verifyAmount
called by 5
utils/lib/index.ts

Shape

Function 162
Class 69
Method 47
Interface 9
Enum 2

Languages

Rust91%
TypeScript9%

Modules by API surface

subscriptions/programs/subscriptions/src/lib.rs8 symbols
subscriptions/client/src/utils.rs7 symbols
openbook_dca/client/src/utils.rs7 symbols
2-counter/programs/counter/src/lib.rs7 symbols
utils/lib/index.ts6 symbols
subscriptions/programs/subscriptions/src/state/subscription.rs6 symbols
pyth_stats/client/src/main.rs6 symbols
event_stream/tests/event_stream.ts6 symbols
subscriptions/programs/subscriptions/src/state/subscriber.rs5 symbols
pyth_feed/programs/pyth_feed/src/state/feed.rs5 symbols
pyth_feed/client/src/main.rs5 symbols
payments/programs/payments/src/state/payment.rs5 symbols

For agents

$ claude mcp add examples \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact