{
  "address": "BondZbQsQQ8jKSzYr7bH9HEsaHsNRZdo4uhdexEpQPPA",
  "metadata": {
    "name": "bonded",
    "version": "0.1.0",
    "spec": "0.1.0",
    "description": "Trust Pad: the dev posts a SOL bond; dump early or below the promised floor and the bond goes to the holders"
  },
  "instructions": [
    {
      "name": "accept_drop_authority",
      "docs": [
        "The proposed key itself, after the timelock: becomes the drop authority for bonds launched",
        "from now on. Existing bonds keep their snapshot."
      ],
      "discriminator": [
        203,
        130,
        197,
        161,
        197,
        173,
        152,
        190
      ],
      "accounts": [
        {
          "name": "proposed",
          "signer": true
        },
        {
          "name": "config",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        }
      ],
      "args": []
    },
    {
      "name": "claim_dev_fees",
      "docs": [
        "Anyone: pays the dev's booked fee share to the dev."
      ],
      "discriminator": [
        146,
        98,
        56,
        128,
        107,
        210,
        44,
        41
      ],
      "accounts": [
        {
          "name": "caller",
          "signer": true
        },
        {
          "name": "bond",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  98,
                  111,
                  110,
                  100
                ]
              },
              {
                "kind": "account",
                "path": "bond.mint",
                "account": "Bond"
              }
            ]
          }
        },
        {
          "name": "dev",
          "writable": true,
          "relations": [
            "bond"
          ]
        },
        {
          "name": "fees",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  102,
                  101,
                  101,
                  115
                ]
              },
              {
                "kind": "account",
                "path": "bond"
              }
            ]
          }
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": []
    },
    {
      "name": "claim_drop",
      "docs": [
        "Anyone, for the claimant named in the leaf: pays `amount` lamports from the BondVault."
      ],
      "discriminator": [
        157,
        29,
        89,
        14,
        81,
        203,
        107,
        58
      ],
      "accounts": [
        {
          "name": "caller",
          "signer": true
        },
        {
          "name": "bond",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  98,
                  111,
                  110,
                  100
                ]
              },
              {
                "kind": "account",
                "path": "bond.mint",
                "account": "Bond"
              }
            ]
          }
        },
        {
          "name": "claim_map",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  108,
                  97,
                  105,
                  109,
                  115
                ]
              },
              {
                "kind": "account",
                "path": "bond"
              }
            ]
          }
        },
        {
          "name": "bond_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  98,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "bond"
              }
            ]
          }
        },
        {
          "name": "claimant",
          "writable": true
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "index",
          "type": "u32"
        },
        {
          "name": "amount",
          "type": "u64"
        },
        {
          "name": "proof",
          "type": {
            "vec": {
              "array": [
                "u8",
                32
              ]
            }
          }
        }
      ]
    },
    {
      "name": "collect_fees",
      "docs": [
        "pump.fun collect_creator_fee into the Fees PDA. remaining = [fees, creator_vault, system,",
        "event_authority, pump]. After migration, PumpSwap's `transfer_creator_fees_to_pump`",
        "(permissionless) first moves the pool's creator fees into pump's creator vault."
      ],
      "discriminator": [
        164,
        152,
        207,
        99,
        30,
        186,
        19,
        182
      ],
      "accounts": [
        {
          "name": "bond",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  98,
                  111,
                  110,
                  100
                ]
              },
              {
                "kind": "account",
                "path": "bond.mint",
                "account": "Bond"
              }
            ]
          }
        },
        {
          "name": "fees",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  102,
                  101,
                  101,
                  115
                ]
              },
              {
                "kind": "account",
                "path": "bond"
              }
            ]
          }
        }
      ],
      "args": []
    },
    {
      "name": "collect_treasury",
      "docs": [
        "Anyone: pays the treasury's booked fee share to the current treasury."
      ],
      "discriminator": [
        48,
        255,
        226,
        214,
        221,
        81,
        222,
        65
      ],
      "accounts": [
        {
          "name": "caller",
          "signer": true
        },
        {
          "name": "config",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        },
        {
          "name": "bond",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  98,
                  111,
                  110,
                  100
                ]
              },
              {
                "kind": "account",
                "path": "bond.mint",
                "account": "Bond"
              }
            ]
          }
        },
        {
          "name": "treasury",
          "writable": true
        },
        {
          "name": "fees",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  102,
                  101,
                  101,
                  115
                ]
              },
              {
                "kind": "account",
                "path": "bond"
              }
            ]
          }
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": []
    },
    {
      "name": "extend",
      "docs": [
        "Pushes the time lock further out: new lock = max(lock, now) + lock_secs, at most",
        "max_lock_secs from now. Dev only, only while Active."
      ],
      "discriminator": [
        228,
        127,
        0,
        1,
        227,
        154,
        54,
        168
      ],
      "accounts": [
        {
          "name": "dev",
          "writable": true,
          "signer": true,
          "relations": [
            "bond"
          ]
        },
        {
          "name": "config",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        },
        {
          "name": "bond",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  98,
                  111,
                  110,
                  100
                ]
              },
              {
                "kind": "account",
                "path": "bond.mint",
                "account": "Bond"
              }
            ]
          }
        },
        {
          "name": "bond_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  98,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "bond"
              }
            ]
          }
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "lock_secs",
          "type": "i64"
        }
      ]
    },
    {
      "name": "init_config",
      "discriminator": [
        23,
        235,
        115,
        232,
        168,
        96,
        1,
        231
      ],
      "accounts": [
        {
          "name": "admin",
          "writable": true,
          "signer": true
        },
        {
          "name": "config",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "treasury",
          "type": "pubkey"
        },
        {
          "name": "params",
          "type": {
            "defined": {
              "name": "Params"
            }
          }
        }
      ]
    },
    {
      "name": "launch",
      "docs": [
        "Creates the coin on pump.fun (creator = Fees PDA, payer = dev), posts the bond into the",
        "BondVault and buys the dev's bag into the Escrow, all in one instruction.",
        "remaining_accounts = pump create_v2 accounts (16, user = dev) + pump buy accounts (user = escrow).",
        "SOL paths: dev -> config.treasury (launch fee = floor(dev_buy * launch_fee_bps / 10000), on top",
        "of dev_buy), dev -> BondVault (bond + rent floor),",
        "dev -> Fees (rent floor),",
        "dev -> Escrow (dev_buy + rent floor + rent margin) -> pump (dev_buy, fees included, plus",
        "pump's first-buyer rents) -> the unused margin back to the dev.",
        "Invariant after launch: escrow == floor, bond_vault == floor + bond, fees == floor."
      ],
      "discriminator": [
        153,
        241,
        93,
        225,
        22,
        69,
        74,
        61
      ],
      "accounts": [
        {
          "name": "dev",
          "writable": true,
          "signer": true
        },
        {
          "name": "config",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        },
        {
          "name": "treasury",
          "writable": true,
          "relations": [
            "config"
          ]
        },
        {
          "name": "mint",
          "docs": [
            "Fresh mint keypair; pump create_v2 initialises it (pumpcpi checks it is create[0])."
          ],
          "writable": true,
          "signer": true
        },
        {
          "name": "bond",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  98,
                  111,
                  110,
                  100
                ]
              },
              {
                "kind": "account",
                "path": "mint"
              }
            ]
          }
        },
        {
          "name": "escrow",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  101,
                  115,
                  99,
                  114,
                  111,
                  119
                ]
              },
              {
                "kind": "account",
                "path": "bond"
              }
            ]
          }
        },
        {
          "name": "bond_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  98,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "bond"
              }
            ]
          }
        },
        {
          "name": "fees",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  102,
                  101,
                  101,
                  115
                ]
              },
              {
                "kind": "account",
                "path": "bond"
              }
            ]
          }
        },
        {
          "name": "escrow_ata",
          "writable": true
        },
        {
          "name": "token_program"
        },
        {
          "name": "ata_program",
          "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "name",
          "type": "string"
        },
        {
          "name": "symbol",
          "type": "string"
        },
        {
          "name": "uri",
          "type": "string"
        },
        {
          "name": "bond",
          "type": "u64"
        },
        {
          "name": "lock_secs",
          "type": "i64"
        },
        {
          "name": "floor_mcap",
          "type": "u64"
        },
        {
          "name": "dev_buy",
          "type": "u64"
        }
      ]
    },
    {
      "name": "observe",
      "docs": [
        "Anyone, at most once per observe interval, and only as the sole program instruction of its",
        "transaction (plus compute budget), so a trade cannot pump or dump the price around it",
        "atomically. Spot mcap from the pump curve; after migration from the canonical PumpSwap",
        "pool (remaining = [pool, pool_base_vault, pool_quote_vault, mint])."
      ],
      "discriminator": [
        204,
        78,
        178,
        115,
        194,
        147,
        65,
        74
      ],
      "accounts": [
        {
          "name": "bond",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  98,
                  111,
                  110,
                  100
                ]
              },
              {
                "kind": "account",
                "path": "bond.mint",
                "account": "Bond"
              }
            ]
          }
        },
        {
          "name": "curve"
        },
        {
          "name": "instructions"
        }
      ],
      "args": []
    },
    {
      "name": "post_drop",
      "docs": [
        "The bond's own drop authority (snapshot at launch) only, once, only after a break. The",
        "snapshot must predate the break slot, so nobody can buy in after the dump to farm the bond.",
        "total <= the holders' pool."
      ],
      "discriminator": [
        171,
        201,
        192,
        209,
        162,
        247,
        118,
        170
      ],
      "accounts": [
        {
          "name": "authority",
          "writable": true,
          "signer": true
        },
        {
          "name": "bond",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  98,
                  111,
                  110,
                  100
                ]
              },
              {
                "kind": "account",
                "path": "bond.mint",
                "account": "Bond"
              }
            ]
          }
        },
        {
          "name": "claim_map",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  108,
                  97,
                  105,
                  109,
                  115
                ]
              },
              {
                "kind": "account",
                "path": "bond"
              }
            ]
          }
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "root",
          "type": {
            "array": [
              "u8",
              32
            ]
          }
        },
        {
          "name": "total",
          "type": "u64"
        },
        {
          "name": "leaves",
          "type": "u32"
        },
        {
          "name": "snapshot_slot",
          "type": "u64"
        }
      ]
    },
    {
      "name": "propose_drop_authority",
      "docs": [
        "Admin: starts the 72 h timelock for a new drop authority (Pubkey::default() cancels a pending",
        "one; proposing again restarts the clock). Only bonds launched after the accept use it."
      ],
      "discriminator": [
        180,
        237,
        254,
        137,
        213,
        58,
        160,
        25
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "config"
          ]
        },
        {
          "name": "config",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        }
      ],
      "args": [
        {
          "name": "proposed",
          "type": "pubkey"
        }
      ]
    },
    {
      "name": "release",
      "docs": [
        "The dev takes `amount` of the escrowed bag. Clean (lock over, enough fresh observations,",
        "all of the last `floor_window` at or above the floor): tokens go out and, when the escrow",
        "is empty, the bond goes back to the dev (Kept). Not clean: the tokens still go out, the",
        "whole bond stays as the holders' pool (Broken) - only if the dev passed `allow_break`,",
        "so a release can never break a bond by surprise.",
        "Invariants: Kept -> bond_vault == floor; Broken -> bond_vault == floor + pool - claimed."
      ],
      "discriminator": [
        253,
        249,
        15,
        206,
        28,
        127,
        193,
        241
      ],
      "accounts": [
        {
          "name": "dev",
          "writable": true,
          "signer": true,
          "relations": [
            "bond"
          ]
        },
        {
          "name": "bond",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  98,
                  111,
                  110,
                  100
                ]
              },
              {
                "kind": "account",
                "path": "bond.mint",
                "account": "Bond"
              }
            ]
          }
        },
        {
          "name": "mint"
        },
        {
          "name": "escrow",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  101,
                  115,
                  99,
                  114,
                  111,
                  119
                ]
              },
              {
                "kind": "account",
                "path": "bond"
              }
            ]
          }
        },
        {
          "name": "escrow_ata",
          "writable": true
        },
        {
          "name": "dev_ata",
          "writable": true
        },
        {
          "name": "bond_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  98,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "bond"
              }
            ]
          }
        },
        {
          "name": "token_program"
        },
        {
          "name": "ata_program",
          "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "amount",
          "type": "u64"
        },
        {
          "name": "allow_break",
          "type": "bool"
        }
      ]
    },
    {
      "name": "set_admin",
      "discriminator": [
        251,
        163,
        0,
        52,
        91,
        194,
        187,
        92
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "config"
          ]
        },
        {
          "name": "config",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        }
      ],
      "args": [
        {
          "name": "admin",
          "type": "pubkey"
        }
      ]
    },
    {
      "name": "set_paused",
      "docs": [
        "Pause blocks new bonds and new money in (launch, top_up); every exit keeps working."
      ],
      "discriminator": [
        91,
        60,
        125,
        192,
        176,
        225,
        166,
        218
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "config"
          ]
        },
        {
          "name": "config",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        }
      ],
      "args": [
        {
          "name": "paused",
          "type": "bool"
        }
      ]
    },
    {
      "name": "set_treasury",
      "discriminator": [
        57,
        97,
        196,
        95,
        195,
        206,
        106,
        136
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "config"
          ]
        },
        {
          "name": "config",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        }
      ],
      "args": [
        {
          "name": "treasury",
          "type": "pubkey"
        }
      ]
    },
    {
      "name": "sweep_drop",
      "docs": [
        "Anyone, after the drop window: what is left of the pool (unclaimed leaves + holders fees",
        "booked after the drop was posted) goes to the treasury; the claim map is closed and its",
        "rent returns to whoever paid it. Afterwards the holders' fee share is booked to the treasury."
      ],
      "discriminator": [
        5,
        172,
        38,
        153,
        231,
        130,
        29,
        71
      ],
      "accounts": [
        {
          "name": "caller",
          "signer": true
        },
        {
          "name": "config",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        },
        {
          "name": "bond",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  98,
                  111,
                  110,
                  100
                ]
              },
              {
                "kind": "account",
                "path": "bond.mint",
                "account": "Bond"
              }
            ]
          }
        },
        {
          "name": "claim_map",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  108,
                  97,
                  105,
                  109,
                  115
                ]
              },
              {
                "kind": "account",
                "path": "bond"
              }
            ]
          }
        },
        {
          "name": "payer",
          "writable": true,
          "relations": [
            "claim_map"
          ]
        },
        {
          "name": "bond_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  98,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "bond"
              }
            ]
          }
        },
        {
          "name": "treasury",
          "writable": true
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": []
    },
    {
      "name": "sync_fees",
      "docs": [
        "Books every new lamport on the Fees PDA. Active / Kept: dev_fee_bps to the dev, the rest to",
        "the treasury. Broken: holders_fee_bps moves into the BondVault pool at once, the rest to the",
        "treasury (after the drop was swept the holders' part goes to the treasury too).",
        "Invariant: fees == floor + (dev_booked - dev_paid) + (treasury_booked - treasury_paid)."
      ],
      "discriminator": [
        183,
        105,
        177,
        124,
        93,
        59,
        163,
        216
      ],
      "accounts": [
        {
          "name": "bond",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  98,
                  111,
                  110,
                  100
                ]
              },
              {
                "kind": "account",
                "path": "bond.mint",
                "account": "Bond"
              }
            ]
          }
        },
        {
          "name": "fees",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  102,
                  101,
                  101,
                  115
                ]
              },
              {
                "kind": "account",
                "path": "bond"
              }
            ]
          }
        },
        {
          "name": "bond_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  98,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "bond"
              }
            ]
          }
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": []
    },
    {
      "name": "top_up",
      "docs": [
        "Adds SOL to the bond. Dev only, only while Active, blocked by pause (new money in)."
      ],
      "discriminator": [
        236,
        225,
        96,
        9,
        60,
        106,
        77,
        208
      ],
      "accounts": [
        {
          "name": "dev",
          "writable": true,
          "signer": true,
          "relations": [
            "bond"
          ]
        },
        {
          "name": "config",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        },
        {
          "name": "bond",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  98,
                  111,
                  110,
                  100
                ]
              },
              {
                "kind": "account",
                "path": "bond.mint",
                "account": "Bond"
              }
            ]
          }
        },
        {
          "name": "bond_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  98,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "bond"
              }
            ]
          }
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "amount",
          "type": "u64"
        }
      ]
    },
    {
      "name": "unwrap_fees",
      "docs": [
        "Anyone (M-2): closes a WSOL token account owned by the Fees PDA into the Fees PDA, so PumpSwap",
        "creator fees that someone collected as WSOL (collect_coin_creator_fee needs no signature from",
        "the creator) become lamports that `sync_fees` books. Mint must be the native mint, owner the Fees PDA."
      ],
      "discriminator": [
        202,
        112,
        56,
        154,
        193,
        85,
        127,
        150
      ],
      "accounts": [
        {
          "name": "bond",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  98,
                  111,
                  110,
                  100
                ]
              },
              {
                "kind": "account",
                "path": "bond.mint",
                "account": "Bond"
              }
            ]
          }
        },
        {
          "name": "fees",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  102,
                  101,
                  101,
                  115
                ]
              },
              {
                "kind": "account",
                "path": "bond"
              }
            ]
          }
        },
        {
          "name": "wsol_ata",
          "writable": true
        },
        {
          "name": "token_program",
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        }
      ],
      "args": []
    },
    {
      "name": "update_config",
      "docs": [
        "New params apply to bonds launched from now on; existing bonds keep their copy."
      ],
      "discriminator": [
        29,
        158,
        252,
        191,
        10,
        83,
        219,
        99
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "config"
          ]
        },
        {
          "name": "config",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        }
      ],
      "args": [
        {
          "name": "params",
          "type": {
            "defined": {
              "name": "Params"
            }
          }
        }
      ]
    }
  ],
  "accounts": [
    {
      "name": "Bond",
      "discriminator": [
        224,
        128,
        48,
        251,
        182,
        246,
        111,
        196
      ]
    },
    {
      "name": "ClaimMap",
      "discriminator": [
        193,
        62,
        74,
        131,
        13,
        161,
        53,
        215
      ]
    },
    {
      "name": "Config",
      "discriminator": [
        155,
        12,
        170,
        224,
        30,
        250,
        204,
        130
      ]
    }
  ],
  "events": [
    {
      "name": "AdminSet",
      "discriminator": [
        157,
        245,
        205,
        226,
        118,
        125,
        183,
        97
      ]
    },
    {
      "name": "Broken",
      "discriminator": [
        170,
        254,
        7,
        222,
        227,
        169,
        106,
        216
      ]
    },
    {
      "name": "ConfigInitialized",
      "discriminator": [
        181,
        49,
        200,
        156,
        19,
        167,
        178,
        91
      ]
    },
    {
      "name": "ConfigUpdated",
      "discriminator": [
        40,
        241,
        230,
        122,
        11,
        19,
        198,
        194
      ]
    },
    {
      "name": "DevFeesClaimed",
      "discriminator": [
        31,
        40,
        18,
        11,
        243,
        101,
        75,
        23
      ]
    },
    {
      "name": "DropAuthorityAccepted",
      "discriminator": [
        217,
        169,
        37,
        173,
        110,
        52,
        6,
        11
      ]
    },
    {
      "name": "DropAuthorityProposed",
      "discriminator": [
        227,
        31,
        145,
        188,
        199,
        202,
        69,
        78
      ]
    },
    {
      "name": "DropClaimed",
      "discriminator": [
        119,
        252,
        19,
        16,
        125,
        34,
        212,
        212
      ]
    },
    {
      "name": "DropPosted",
      "discriminator": [
        108,
        193,
        166,
        202,
        203,
        4,
        78,
        89
      ]
    },
    {
      "name": "DropSwept",
      "discriminator": [
        105,
        213,
        254,
        226,
        204,
        220,
        12,
        160
      ]
    },
    {
      "name": "Extended",
      "discriminator": [
        5,
        76,
        91,
        44,
        187,
        214,
        114,
        165
      ]
    },
    {
      "name": "FeesCollected",
      "discriminator": [
        233,
        23,
        117,
        225,
        107,
        178,
        254,
        8
      ]
    },
    {
      "name": "FeesSynced",
      "discriminator": [
        41,
        98,
        204,
        192,
        243,
        3,
        53,
        218
      ]
    },
    {
      "name": "FeesUnwrapped",
      "discriminator": [
        146,
        111,
        114,
        101,
        19,
        203,
        134,
        142
      ]
    },
    {
      "name": "Kept",
      "discriminator": [
        216,
        123,
        54,
        65,
        156,
        141,
        173,
        190
      ]
    },
    {
      "name": "Launched",
      "discriminator": [
        209,
        127,
        29,
        152,
        129,
        212,
        189,
        183
      ]
    },
    {
      "name": "Observed",
      "discriminator": [
        154,
        65,
        198,
        52,
        238,
        11,
        193,
        59
      ]
    },
    {
      "name": "PausedSet",
      "discriminator": [
        171,
        125,
        127,
        156,
        233,
        81,
        68,
        66
      ]
    },
    {
      "name": "Released",
      "discriminator": [
        232,
        229,
        255,
        136,
        101,
        189,
        15,
        220
      ]
    },
    {
      "name": "ToppedUp",
      "discriminator": [
        97,
        81,
        238,
        182,
        97,
        234,
        177,
        152
      ]
    },
    {
      "name": "TreasuryCollected",
      "discriminator": [
        116,
        28,
        13,
        151,
        232,
        65,
        52,
        34
      ]
    },
    {
      "name": "TreasurySet",
      "discriminator": [
        69,
        231,
        163,
        135,
        254,
        194,
        109,
        166
      ]
    }
  ],
  "errors": [
    {
      "code": 6000,
      "name": "Paused",
      "msg": "new bonds and top-ups are paused"
    },
    {
      "code": 6001,
      "name": "Unauthorized",
      "msg": "only the admin can do this"
    },
    {
      "code": 6002,
      "name": "BadConfig",
      "msg": "bad config"
    },
    {
      "code": 6003,
      "name": "BondTooSmall",
      "msg": "the bond is below the minimum"
    },
    {
      "code": 6004,
      "name": "DevBuyTooSmall",
      "msg": "the dev buy is below the minimum"
    },
    {
      "code": 6005,
      "name": "BadLock",
      "msg": "lock outside the allowed range"
    },
    {
      "code": 6006,
      "name": "BadFloor",
      "msg": "the market cap floor must be above zero"
    },
    {
      "code": 6007,
      "name": "BadName",
      "msg": "name must be 1-32 characters"
    },
    {
      "code": 6008,
      "name": "BadSymbol",
      "msg": "ticker must be 1-10 characters, A-Z and 0-9"
    },
    {
      "code": 6009,
      "name": "BadUri",
      "msg": "metadata uri must be https and at most 200 characters"
    },
    {
      "code": 6010,
      "name": "NothingBought",
      "msg": "the dev buy returned no tokens"
    },
    {
      "code": 6011,
      "name": "NotActive",
      "msg": "this bond is no longer active"
    },
    {
      "code": 6012,
      "name": "ObserveTooSoon",
      "msg": "too soon: one observation per interval"
    },
    {
      "code": 6013,
      "name": "ObserveNotAlone",
      "msg": "observe must be the only instruction of its transaction"
    },
    {
      "code": 6014,
      "name": "PoolNotReady",
      "msg": "the curve is complete but the PumpSwap pool is not there yet"
    },
    {
      "code": 6015,
      "name": "BadPool",
      "msg": "that is not the coin's canonical PumpSwap pool"
    },
    {
      "code": 6016,
      "name": "NotDev",
      "msg": "only the dev of this bond can do this"
    },
    {
      "code": 6017,
      "name": "BadAmount",
      "msg": "bad amount"
    },
    {
      "code": 6018,
      "name": "NothingToRelease",
      "msg": "nothing left in the escrow"
    },
    {
      "code": 6019,
      "name": "NotClean",
      "msg": "release is not clean: pass allow_break to release anyway and forfeit the bond"
    },
    {
      "code": 6020,
      "name": "NotBroken",
      "msg": "the bond is not broken"
    },
    {
      "code": 6021,
      "name": "DropAlreadyPosted",
      "msg": "the drop was already posted"
    },
    {
      "code": 6022,
      "name": "DropNotPosted",
      "msg": "no drop posted yet"
    },
    {
      "code": 6023,
      "name": "BadDrop",
      "msg": "bad drop"
    },
    {
      "code": 6024,
      "name": "DropTooLarge",
      "msg": "the drop is larger than the holders' pool"
    },
    {
      "code": 6025,
      "name": "BadSnapshot",
      "msg": "the snapshot must be taken before the break"
    },
    {
      "code": 6026,
      "name": "DropClosed",
      "msg": "the drop window is closed"
    },
    {
      "code": 6027,
      "name": "DropStillOpen",
      "msg": "the drop window is still open"
    },
    {
      "code": 6028,
      "name": "AlreadySwept",
      "msg": "the drop was already swept"
    },
    {
      "code": 6029,
      "name": "DropOverdrawn",
      "msg": "claims would exceed the drop total"
    },
    {
      "code": 6030,
      "name": "NothingToClaim",
      "msg": "nothing to claim"
    },
    {
      "code": 6031,
      "name": "BadAccounts",
      "msg": "wrong accounts"
    },
    {
      "code": 6032,
      "name": "Math",
      "msg": "math overflow"
    },
    {
      "code": 6033,
      "name": "TimelockActive",
      "msg": "the new drop authority can accept only after the 72 h timelock"
    },
    {
      "code": 6034,
      "name": "BelowRentFloor",
      "msg": "payout is below the rent floor of an empty wallet: it stays claimable, fund the wallet or wait"
    },
    {
      "code": 6035,
      "name": "WrongTreasury",
      "msg": "the treasury account is not config.treasury"
    }
  ],
  "types": [
    {
      "name": "AdminSet",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "admin",
            "type": "pubkey"
          }
        ]
      }
    },
    {
      "name": "Bond",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "dev",
            "type": "pubkey"
          },
          {
            "name": "mint",
            "type": "pubkey"
          },
          {
            "name": "params",
            "type": {
              "defined": {
                "name": "Params"
              }
            }
          },
          {
            "name": "state",
            "type": "u8"
          },
          {
            "name": "bond_lamports",
            "docs": [
              "Bond posted at launch plus top-ups. Kept: returned to the dev. Broken: seeds the pool."
            ],
            "type": "u64"
          },
          {
            "name": "lock_until",
            "type": "i64"
          },
          {
            "name": "floor_mcap",
            "docs": [
              "Promised market cap floor, lamports."
            ],
            "type": "u64"
          },
          {
            "name": "dev_buy",
            "docs": [
              "Lamports the escrow spent on the dev's bag (pump fees included)."
            ],
            "type": "u64"
          },
          {
            "name": "dev_tokens",
            "docs": [
              "Tokens still in the escrow."
            ],
            "type": "u64"
          },
          {
            "name": "dev_tokens_initial",
            "type": "u64"
          },
          {
            "name": "launched_at",
            "type": "i64"
          },
          {
            "name": "obs",
            "type": {
              "array": [
                {
                  "defined": {
                    "name": "Observation"
                  }
                },
                6
              ]
            }
          },
          {
            "name": "obs_count",
            "type": "u32"
          },
          {
            "name": "last_obs_ts",
            "type": "i64"
          },
          {
            "name": "closed_at",
            "docs": [
              "When the bond became Kept or Broken."
            ],
            "type": "i64"
          },
          {
            "name": "broken_slot",
            "type": "u64"
          },
          {
            "name": "break_reason",
            "type": "u8"
          },
          {
            "name": "pool",
            "docs": [
              "Holders' pool booked into the BondVault: the bond at the break + holders' fee share."
            ],
            "type": "u64"
          },
          {
            "name": "drop",
            "type": {
              "defined": {
                "name": "MerkleDrop"
              }
            }
          },
          {
            "name": "fees_total",
            "type": "u64"
          },
          {
            "name": "dev_booked",
            "type": "u64"
          },
          {
            "name": "dev_paid",
            "type": "u64"
          },
          {
            "name": "treasury_booked",
            "type": "u64"
          },
          {
            "name": "treasury_paid",
            "type": "u64"
          },
          {
            "name": "holders_booked",
            "type": "u64"
          },
          {
            "name": "bump",
            "type": "u8"
          },
          {
            "name": "escrow_bump",
            "type": "u8"
          },
          {
            "name": "vault_bump",
            "type": "u8"
          },
          {
            "name": "fees_bump",
            "type": "u8"
          },
          {
            "name": "claims_bump",
            "type": "u8"
          },
          {
            "name": "drop_authority",
            "docs": [
              "Drop authority snapshot at launch (M-3): the only key that can post this bond's drop."
            ],
            "type": "pubkey"
          }
        ]
      }
    },
    {
      "name": "Broken",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "bond",
            "type": "pubkey"
          },
          {
            "name": "dev",
            "type": "pubkey"
          },
          {
            "name": "reason",
            "type": "u8"
          },
          {
            "name": "pool",
            "type": "u64"
          },
          {
            "name": "released",
            "type": "u64"
          },
          {
            "name": "dev_tokens_left",
            "type": "u64"
          },
          {
            "name": "slot",
            "type": "u64"
          },
          {
            "name": "ts",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "ClaimMap",
      "docs": [
        "One bit per drop leaf: set when that leaf was claimed."
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "bond",
            "type": "pubkey"
          },
          {
            "name": "payer",
            "docs": [
              "Paid the rent at post_drop; gets it back when the drop is swept."
            ],
            "type": "pubkey"
          },
          {
            "name": "leaves",
            "type": "u32"
          },
          {
            "name": "bits",
            "type": "bytes"
          }
        ]
      }
    },
    {
      "name": "Config",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "admin",
            "type": "pubkey"
          },
          {
            "name": "treasury",
            "type": "pubkey"
          },
          {
            "name": "drop_authority",
            "type": "pubkey"
          },
          {
            "name": "paused",
            "type": "bool"
          },
          {
            "name": "params",
            "type": {
              "defined": {
                "name": "Params"
              }
            }
          },
          {
            "name": "bonds",
            "type": "u64"
          },
          {
            "name": "bump",
            "type": "u8"
          },
          {
            "name": "pending_drop_authority",
            "docs": [
              "Timelocked rotation (M-3): proposed key and the earliest accept time (0 = none pending)."
            ],
            "type": "pubkey"
          },
          {
            "name": "pending_drop_authority_eta",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "ConfigInitialized",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "admin",
            "type": "pubkey"
          },
          {
            "name": "treasury",
            "type": "pubkey"
          },
          {
            "name": "drop_authority",
            "type": "pubkey"
          },
          {
            "name": "params",
            "type": {
              "defined": {
                "name": "Params"
              }
            }
          }
        ]
      }
    },
    {
      "name": "ConfigUpdated",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "params",
            "type": {
              "defined": {
                "name": "Params"
              }
            }
          }
        ]
      }
    },
    {
      "name": "DevFeesClaimed",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "bond",
            "type": "pubkey"
          },
          {
            "name": "dev",
            "type": "pubkey"
          },
          {
            "name": "amount",
            "type": "u64"
          }
        ]
      }
    },
    {
      "name": "DropAuthorityAccepted",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "old",
            "type": "pubkey"
          },
          {
            "name": "new",
            "type": "pubkey"
          }
        ]
      }
    },
    {
      "name": "DropAuthorityProposed",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "current",
            "type": "pubkey"
          },
          {
            "name": "proposed",
            "type": "pubkey"
          },
          {
            "name": "eta",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "DropClaimed",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "bond",
            "type": "pubkey"
          },
          {
            "name": "index",
            "type": "u32"
          },
          {
            "name": "claimant",
            "type": "pubkey"
          },
          {
            "name": "amount",
            "type": "u64"
          },
          {
            "name": "claimed",
            "type": "u64"
          }
        ]
      }
    },
    {
      "name": "DropPosted",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "bond",
            "type": "pubkey"
          },
          {
            "name": "root",
            "type": {
              "array": [
                "u8",
                32
              ]
            }
          },
          {
            "name": "total",
            "type": "u64"
          },
          {
            "name": "leaves",
            "type": "u32"
          },
          {
            "name": "snapshot_slot",
            "type": "u64"
          },
          {
            "name": "pool",
            "type": "u64"
          },
          {
            "name": "closes_at",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "DropSwept",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "bond",
            "type": "pubkey"
          },
          {
            "name": "unclaimed",
            "type": "u64"
          },
          {
            "name": "swept",
            "type": "u64"
          }
        ]
      }
    },
    {
      "name": "Extended",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "bond",
            "type": "pubkey"
          },
          {
            "name": "lock_until",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "FeesCollected",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "bond",
            "type": "pubkey"
          },
          {
            "name": "amount",
            "type": "u64"
          }
        ]
      }
    },
    {
      "name": "FeesSynced",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "bond",
            "type": "pubkey"
          },
          {
            "name": "incoming",
            "type": "u64"
          },
          {
            "name": "dev",
            "type": "u64"
          },
          {
            "name": "holders",
            "type": "u64"
          },
          {
            "name": "treasury",
            "type": "u64"
          },
          {
            "name": "total",
            "type": "u64"
          },
          {
            "name": "pool",
            "type": "u64"
          }
        ]
      }
    },
    {
      "name": "FeesUnwrapped",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "bond",
            "type": "pubkey"
          },
          {
            "name": "amount",
            "type": "u64"
          }
        ]
      }
    },
    {
      "name": "Kept",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "bond",
            "type": "pubkey"
          },
          {
            "name": "dev",
            "type": "pubkey"
          },
          {
            "name": "bond_returned",
            "type": "u64"
          },
          {
            "name": "ts",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "Launched",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "bond",
            "type": "pubkey"
          },
          {
            "name": "dev",
            "type": "pubkey"
          },
          {
            "name": "mint",
            "type": "pubkey"
          },
          {
            "name": "name",
            "type": "string"
          },
          {
            "name": "symbol",
            "type": "string"
          },
          {
            "name": "uri",
            "type": "string"
          },
          {
            "name": "bond_lamports",
            "type": "u64"
          },
          {
            "name": "lock_until",
            "type": "i64"
          },
          {
            "name": "floor_mcap",
            "type": "u64"
          },
          {
            "name": "dev_buy",
            "type": "u64"
          },
          {
            "name": "dev_tokens",
            "type": "u64"
          },
          {
            "name": "floor_window",
            "type": "u8"
          },
          {
            "name": "observe_interval_secs",
            "type": "i64"
          },
          {
            "name": "launched_at",
            "type": "i64"
          },
          {
            "name": "launch_fee",
            "docs": [
              "Lamports the dev paid to config.treasury on top of dev_buy (launch_fee_bps of dev_buy)."
            ],
            "type": "u64"
          }
        ]
      }
    },
    {
      "name": "MerkleDrop",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "root",
            "type": {
              "array": [
                "u8",
                32
              ]
            }
          },
          {
            "name": "total",
            "type": "u64"
          },
          {
            "name": "leaves",
            "type": "u32"
          },
          {
            "name": "snapshot_slot",
            "type": "u64"
          },
          {
            "name": "posted",
            "type": "bool"
          },
          {
            "name": "posted_at",
            "type": "i64"
          },
          {
            "name": "claimed",
            "type": "u64"
          },
          {
            "name": "claims",
            "type": "u32"
          },
          {
            "name": "swept",
            "type": "bool"
          },
          {
            "name": "swept_lamports",
            "type": "u64"
          }
        ]
      }
    },
    {
      "name": "Observation",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "ts",
            "type": "i64"
          },
          {
            "name": "mcap",
            "type": "u64"
          }
        ]
      }
    },
    {
      "name": "Observed",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "bond",
            "type": "pubkey"
          },
          {
            "name": "ts",
            "type": "i64"
          },
          {
            "name": "mcap",
            "type": "u64"
          },
          {
            "name": "source",
            "type": "u8"
          },
          {
            "name": "obs_count",
            "type": "u32"
          },
          {
            "name": "above_floor",
            "type": "bool"
          }
        ]
      }
    },
    {
      "name": "Params",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "min_bond",
            "type": "u64"
          },
          {
            "name": "min_dev_buy",
            "type": "u64"
          },
          {
            "name": "min_lock_secs",
            "type": "i64"
          },
          {
            "name": "max_lock_secs",
            "type": "i64"
          },
          {
            "name": "observe_interval_secs",
            "type": "i64"
          },
          {
            "name": "floor_window",
            "type": "u8"
          },
          {
            "name": "dev_fee_bps",
            "docs": [
              "Creator fee share of the dev while the bond is not broken; the treasury gets the rest."
            ],
            "type": "u16"
          },
          {
            "name": "holders_fee_bps",
            "docs": [
              "Creator fee share of the holders' pool after a break; the treasury gets the rest."
            ],
            "type": "u16"
          },
          {
            "name": "drop_window_secs",
            "type": "i64"
          },
          {
            "name": "launch_fee_bps",
            "docs": [
              "Platform launch fee in bps of the dev buy, paid on top of it to config.treasury in `launch`",
              "(the bond is not charged). 0..=500 (MAX_LAUNCH_FEE_BPS). Default 250 (2.5%)."
            ],
            "type": "u16"
          }
        ]
      }
    },
    {
      "name": "PausedSet",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "paused",
            "type": "bool"
          }
        ]
      }
    },
    {
      "name": "Released",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "bond",
            "type": "pubkey"
          },
          {
            "name": "dev",
            "type": "pubkey"
          },
          {
            "name": "amount",
            "type": "u64"
          },
          {
            "name": "dev_tokens_left",
            "type": "u64"
          },
          {
            "name": "clean",
            "type": "bool"
          },
          {
            "name": "state",
            "type": "u8"
          }
        ]
      }
    },
    {
      "name": "ToppedUp",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "bond",
            "type": "pubkey"
          },
          {
            "name": "amount",
            "type": "u64"
          },
          {
            "name": "bond_lamports",
            "type": "u64"
          }
        ]
      }
    },
    {
      "name": "TreasuryCollected",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "bond",
            "type": "pubkey"
          },
          {
            "name": "treasury",
            "type": "pubkey"
          },
          {
            "name": "amount",
            "type": "u64"
          }
        ]
      }
    },
    {
      "name": "TreasurySet",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "treasury",
            "type": "pubkey"
          }
        ]
      }
    }
  ]
}