LogoLogo
GithubDiscordTwitter
  • Welcome
    • What is Clockwork?
    • Quickstart
    • Installation
  • Guides
    • 1. Scheduling an SPL transfer
    • 2. Auto-incrementing counter
  • Reference
    • Threads
      • Account
      • Address
      • Authority
      • Fees
      • Payers
      • Triggers
    • Localnet
    • SDK
    • Support
  • Node operators
    • Deploy a worker
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
  1. Reference
  2. Threads

Payers

PreviousFeesNextTriggers

Last updated 2 years ago

Was this helpful?

Anchor currently does not support PDAs as payers for account initialization. This means that if one of your automated instructions initializes a new account, you must specify a keypair signer as the payer. For this, we provide a special Clockwork payer address:

C1ockworkPayer11111111111111111111111111111

You can import that address with the :

import { PAYER_PUBKEY } from "@clockwork-xyz/sdk";
use clockwork_sdk::utils::PAYER_PUBKEY;

If an account in your automated instruction references the Clockwork payer account, workers will automatically inject their address in its place. By doing this, the worker node will pay for any account initializations your program needs to do, and Clockwork will reimburse the worker from your thread's account balance.

When Anchor adds support for PDA payers (expected in the next release), this “dynamic payer” feature may be deprecated in favor of using PDAs to pay for account initializations.

You can import that address with the :

Rust SDK
https://github.com/coral-xyz/anchor/pull/1938
Typescript SDK
clockwork/thread.rs at 781b42fd06f2926899597ce5ea1f19b8ecd3d2e4 · clockwork-xyz/clockworkGitHub
PAYER_PUBKEY: Pubkey
Logo