{
  "address": "LoTYmdHDiNwZH8RYDjo1vzBzjB6nUnJhSxx46qoKJNJ",
  "metadata": {
    "name": "lotto",
    "version": "0.1.0",
    "spec": "0.1.0",
    "description": "Lottopad: every coin's creator fees buy real Megapot lottery tickets on Base; winnings buy the coin back for its holders"
  },
  "instructions": [
    {
      "name": "accept_admin",
      "discriminator": [
        112,
        42,
        45,
        90,
        116,
        181,
        13,
        170
      ],
      "accounts": [
        {
          "name": "proposed",
          "signer": true
        },
        {
          "name": "config",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        }
      ],
      "args": []
    },
    {
      "name": "apply_guardian",
      "discriminator": [
        21,
        53,
        96,
        47,
        52,
        160,
        87,
        189
      ],
      "accounts": [
        {
          "name": "config",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        }
      ],
      "args": []
    },
    {
      "name": "apply_keeper",
      "discriminator": [
        207,
        225,
        90,
        26,
        156,
        15,
        214,
        1
      ],
      "accounts": [
        {
          "name": "config",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        }
      ],
      "args": []
    },
    {
      "name": "attest_bridge",
      "docs": [
        "KEEPER: the SOL -> USDC bridge filled on Base (Solana deposit signature + Base fill tx hash + USDC received)."
      ],
      "discriminator": [
        89,
        101,
        194,
        150,
        108,
        148,
        220,
        170
      ],
      "accounts": [
        {
          "name": "keeper",
          "signer": true
        },
        {
          "name": "config",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        },
        {
          "name": "round",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  114,
                  111,
                  117,
                  110,
                  100
                ]
              },
              {
                "kind": "account",
                "path": "round.mint",
                "account": "Round"
              },
              {
                "kind": "account",
                "path": "round.draw_id",
                "account": "Round"
              }
            ]
          }
        }
      ],
      "args": [
        {
          "name": "kind",
          "type": "u8"
        },
        {
          "name": "sol_sig",
          "type": {
            "array": [
              "u8",
              64
            ]
          }
        },
        {
          "name": "base_fill_hash",
          "type": {
            "array": [
              "u8",
              32
            ]
          }
        },
        {
          "name": "usdc_received",
          "type": "u64"
        }
      ]
    },
    {
      "name": "buy_chunk",
      "docs": [
        "Anyone: buys this coin with the settled round's SOL, one chunk: min(left, max_chunk, 2 % of the venue's SOL",
        "reserves, what the curve can still sell). Curve: pump buy_exact_sol_in (user = Vault). Migrated: the Vault",
        "wraps the chunk into WSOL and buys on the canonical PumpSwap pool. Must be alone in its tx.",
        "remaining_accounts = pump buy accounts (16+, user = Vault, associated_user = Vault ATA) or PumpSwap buy",
        "accounts (23+, user = Vault, user_base = Vault ATA, user_quote = the Vault's WSOL ATA)."
      ],
      "discriminator": [
        42,
        62,
        165,
        83,
        168,
        194,
        120,
        117
      ],
      "accounts": [
        {
          "name": "caller",
          "signer": true
        },
        {
          "name": "coin",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  105,
                  110
                ]
              },
              {
                "kind": "account",
                "path": "round.mint",
                "account": "Round"
              }
            ]
          }
        },
        {
          "name": "round",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  114,
                  111,
                  117,
                  110,
                  100
                ]
              },
              {
                "kind": "account",
                "path": "round.mint",
                "account": "Round"
              },
              {
                "kind": "account",
                "path": "round.draw_id",
                "account": "Round"
              }
            ]
          }
        },
        {
          "name": "vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "round"
              }
            ]
          }
        },
        {
          "name": "vault_ata",
          "writable": true
        },
        {
          "name": "curve",
          "writable": true
        },
        {
          "name": "ata_program",
          "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        },
        {
          "name": "instructions",
          "address": "Sysvar1nstructions1111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "min_tokens_out",
          "type": "u64"
        }
      ]
    },
    {
      "name": "claim",
      "docs": [
        "Anyone (the payer funds the holder's token account if missing): pays leaf `index` (1..=leaf_count) its share",
        "floor(distributable x weight / total_weight), once, after buying is done and the veto window is over."
      ],
      "discriminator": [
        62,
        198,
        214,
        193,
        213,
        159,
        108,
        210
      ],
      "accounts": [
        {
          "name": "payer",
          "writable": true,
          "signer": true
        },
        {
          "name": "coin",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  105,
                  110
                ]
              },
              {
                "kind": "account",
                "path": "round.mint",
                "account": "Round"
              }
            ]
          }
        },
        {
          "name": "round",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  114,
                  111,
                  117,
                  110,
                  100
                ]
              },
              {
                "kind": "account",
                "path": "round.mint",
                "account": "Round"
              },
              {
                "kind": "account",
                "path": "round.draw_id",
                "account": "Round"
              }
            ]
          }
        },
        {
          "name": "claimant"
        },
        {
          "name": "claimant_ata",
          "writable": true
        },
        {
          "name": "vault",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "round"
              }
            ]
          }
        },
        {
          "name": "vault_ata",
          "writable": true
        },
        {
          "name": "jar",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  106,
                  97,
                  114
                ]
              },
              {
                "kind": "account",
                "path": "round.mint",
                "account": "Round"
              }
            ]
          }
        },
        {
          "name": "mint"
        },
        {
          "name": "token_program"
        },
        {
          "name": "ata_program",
          "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "index",
          "type": "u32"
        },
        {
          "name": "weight",
          "type": "u64"
        },
        {
          "name": "proof",
          "type": {
            "vec": {
              "array": [
                "u8",
                32
              ]
            }
          }
        }
      ]
    },
    {
      "name": "close_round",
      "docs": [
        "Anyone, after the claim window: the vault's tokens left go to the jar's token account (carried into the",
        "coin's next paying round), its SOL above the rent floor goes back to the jar. The payer funds the jar's token",
        "account if it does not exist yet."
      ],
      "discriminator": [
        149,
        14,
        81,
        88,
        230,
        226,
        234,
        37
      ],
      "accounts": [
        {
          "name": "payer",
          "writable": true,
          "signer": true
        },
        {
          "name": "coin",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  105,
                  110
                ]
              },
              {
                "kind": "account",
                "path": "round.mint",
                "account": "Round"
              }
            ]
          }
        },
        {
          "name": "round",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  114,
                  111,
                  117,
                  110,
                  100
                ]
              },
              {
                "kind": "account",
                "path": "round.mint",
                "account": "Round"
              },
              {
                "kind": "account",
                "path": "round.draw_id",
                "account": "Round"
              }
            ]
          }
        },
        {
          "name": "vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "round"
              }
            ]
          }
        },
        {
          "name": "vault_ata",
          "writable": true
        },
        {
          "name": "jar",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  106,
                  97,
                  114
                ]
              },
              {
                "kind": "account",
                "path": "round.mint",
                "account": "Round"
              }
            ]
          }
        },
        {
          "name": "jar_ata",
          "writable": true
        },
        {
          "name": "mint"
        },
        {
          "name": "token_program"
        },
        {
          "name": "ata_program",
          "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": []
    },
    {
      "name": "collect",
      "docs": [
        "Anyone: pump collect_creator_fee into the Jar, then books every unbooked lamport of the Jar: pad_bps to the",
        "treasury (pending), the rest to the coin's jar. After migration run PumpSwap `transfer_creator_fees_to_pump`",
        "(permissionless) before it, or `unwrap_fees` for WSOL collected to the Jar.",
        "remaining_accounts = [jar, creator_vault, system, event_authority, pump]."
      ],
      "discriminator": [
        208,
        47,
        194,
        155,
        17,
        98,
        82,
        236
      ],
      "accounts": [
        {
          "name": "config",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        },
        {
          "name": "coin",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  105,
                  110
                ]
              },
              {
                "kind": "account",
                "path": "coin.mint",
                "account": "Coin"
              }
            ]
          }
        },
        {
          "name": "jar",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  106,
                  97,
                  114
                ]
              },
              {
                "kind": "account",
                "path": "coin.mint",
                "account": "Coin"
              }
            ]
          }
        }
      ],
      "args": []
    },
    {
      "name": "collect_treasury",
      "docs": [
        "Anyone: pays the coin's booked pad share to config.treasury."
      ],
      "discriminator": [
        48,
        255,
        226,
        214,
        221,
        81,
        222,
        65
      ],
      "accounts": [
        {
          "name": "config",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        },
        {
          "name": "coin",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  105,
                  110
                ]
              },
              {
                "kind": "account",
                "path": "coin.mint",
                "account": "Coin"
              }
            ]
          }
        },
        {
          "name": "jar",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  106,
                  97,
                  114
                ]
              },
              {
                "kind": "account",
                "path": "coin.mint",
                "account": "Coin"
              }
            ]
          }
        },
        {
          "name": "treasury",
          "writable": true
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": []
    },
    {
      "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": "treasury"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "params",
          "type": {
            "defined": {
              "name": "Params"
            }
          }
        },
        {
          "name": "keeper",
          "type": "pubkey"
        },
        {
          "name": "guardian",
          "type": "pubkey"
        }
      ]
    },
    {
      "name": "launch",
      "docs": [
        "pump create_v2 with creator = the coin's Jar PDA (payer = dev), then an optional dev buy (the dev is the",
        "buyer, capped by the curve). Launch fee = dev_buy x launch_fee_bps to the treasury. Must be alone in its tx.",
        "remaining_accounts = pump create_v2 accounts (16) [+ pump buy accounts (16+, user = dev) when dev_buy > 0]."
      ],
      "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": "mint",
          "writable": true,
          "signer": true
        },
        {
          "name": "coin",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  105,
                  110
                ]
              },
              {
                "kind": "account",
                "path": "mint"
              }
            ]
          }
        },
        {
          "name": "jar",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  106,
                  97,
                  114
                ]
              },
              {
                "kind": "account",
                "path": "mint"
              }
            ]
          }
        },
        {
          "name": "treasury",
          "writable": true
        },
        {
          "name": "dev_ata",
          "writable": true
        },
        {
          "name": "token_program"
        },
        {
          "name": "ata_program",
          "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        },
        {
          "name": "instructions",
          "address": "Sysvar1nstructions1111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "name",
          "type": "string"
        },
        {
          "name": "symbol",
          "type": "string"
        },
        {
          "name": "uri",
          "type": "string"
        },
        {
          "name": "dev_buy",
          "type": "u64"
        },
        {
          "name": "expected_launch_fee_bps",
          "type": "u16"
        },
        {
          "name": "expected_pad_bps",
          "type": "u16"
        }
      ]
    },
    {
      "name": "mark_defaulted",
      "docs": [
        "Anyone: the keeper missed a deadline (no tickets by draw_time + ticket_grace, or not settled by draw_time +",
        "settle_timeout). Public state; no new round of any coin opens until it is resolved."
      ],
      "discriminator": [
        97,
        81,
        37,
        229,
        172,
        125,
        169,
        178
      ],
      "accounts": [
        {
          "name": "caller",
          "signer": true
        },
        {
          "name": "config",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        },
        {
          "name": "coin",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  105,
                  110
                ]
              },
              {
                "kind": "account",
                "path": "round.mint",
                "account": "Round"
              }
            ]
          }
        },
        {
          "name": "round",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  114,
                  111,
                  117,
                  110,
                  100
                ]
              },
              {
                "kind": "account",
                "path": "round.mint",
                "account": "Round"
              },
              {
                "kind": "account",
                "path": "round.draw_id",
                "account": "Round"
              }
            ]
          }
        }
      ],
      "args": []
    },
    {
      "name": "open_round",
      "docs": [
        "KEEPER: opens the coin's round for Megapot drawing `draw_id` (drawing time `draw_time`) and sends",
        "min(jar_sol, max_round_lamports) to the keeper wallet for bridging. TRUST POINT (bounded, see module doc)."
      ],
      "discriminator": [
        66,
        235,
        123,
        240,
        8,
        35,
        185,
        159
      ],
      "accounts": [
        {
          "name": "keeper",
          "writable": true,
          "signer": true
        },
        {
          "name": "config",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        },
        {
          "name": "coin",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  105,
                  110
                ]
              },
              {
                "kind": "account",
                "path": "coin.mint",
                "account": "Coin"
              }
            ]
          }
        },
        {
          "name": "jar",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  106,
                  97,
                  114
                ]
              },
              {
                "kind": "account",
                "path": "coin.mint",
                "account": "Coin"
              }
            ]
          }
        },
        {
          "name": "round",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  114,
                  111,
                  117,
                  110,
                  100
                ]
              },
              {
                "kind": "account",
                "path": "coin.mint",
                "account": "Coin"
              },
              {
                "kind": "arg",
                "path": "draw_id"
              }
            ]
          }
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "draw_id",
          "type": "u64"
        },
        {
          "name": "draw_time",
          "type": "i64"
        }
      ]
    },
    {
      "name": "post_draw",
      "docs": [
        "KEEPER: Megapot's result of drawing `draw_id` (once per drawing, shared by every coin), the Pyth random number",
        "Megapot drew it from (anyone recomputes the numbers with Megapot's Fisher-Yates, lotto-base/megapot.mjs",
        "drawFromRandom; zeros when unknown) and the Solana slot of the holder snapshot (last slot with block time",
        "<= draw_time)."
      ],
      "discriminator": [
        142,
        80,
        28,
        71,
        37,
        239,
        175,
        129
      ],
      "accounts": [
        {
          "name": "keeper",
          "writable": true,
          "signer": true
        },
        {
          "name": "config",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        },
        {
          "name": "draw",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  100,
                  114,
                  97,
                  119
                ]
              },
              {
                "kind": "arg",
                "path": "draw_id"
              }
            ]
          }
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "draw_id",
          "type": "u64"
        },
        {
          "name": "draw_time",
          "type": "i64"
        },
        {
          "name": "normals",
          "type": {
            "array": [
              "u8",
              5
            ]
          }
        },
        {
          "name": "bonus",
          "type": "u8"
        },
        {
          "name": "ball_max",
          "type": "u8"
        },
        {
          "name": "bonus_max",
          "type": "u8"
        },
        {
          "name": "base_tx_hash",
          "type": {
            "array": [
              "u8",
              32
            ]
          }
        },
        {
          "name": "snapshot_slot",
          "type": "u64"
        },
        {
          "name": "random_number",
          "type": {
            "array": [
              "u8",
              32
            ]
          }
        }
      ]
    },
    {
      "name": "post_root",
      "docs": [
        "KEEPER: posts the merkle root of the holder snapshot of a settled round (leaf 0 = header [round PDA,",
        "total_weight], so a root can never be replayed on another round) and starts the guardian veto window; claims",
        "open after it (and after the buying). Also the repost after a guardian veto (restarts both windows).",
        "TRUST POINT: the table (published at table_cid; anyone rebuilds it with keepers/lotto-snapshot.mjs)."
      ],
      "discriminator": [
        154,
        210,
        156,
        158,
        199,
        27,
        174,
        35
      ],
      "accounts": [
        {
          "name": "keeper",
          "writable": true,
          "signer": true
        },
        {
          "name": "config",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        },
        {
          "name": "round",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  114,
                  111,
                  117,
                  110,
                  100
                ]
              },
              {
                "kind": "account",
                "path": "round.mint",
                "account": "Round"
              },
              {
                "kind": "account",
                "path": "round.draw_id",
                "account": "Round"
              }
            ]
          }
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "root",
          "type": {
            "array": [
              "u8",
              32
            ]
          }
        },
        {
          "name": "total_weight",
          "type": "u64"
        },
        {
          "name": "leaf_count",
          "type": "u32"
        },
        {
          "name": "table_cid",
          "type": "string"
        },
        {
          "name": "header_proof",
          "type": {
            "vec": {
              "array": [
                "u8",
                32
              ]
            }
          }
        }
      ]
    },
    {
      "name": "post_tickets",
      "docs": [
        "KEEPER: one Megapot buyTickets transaction (<= 10 tickets). The program derives each ticket's numbers from",
        "`seed_sig` (the coin's last buy signature at or before the round's open slot, same for the whole round),",
        "mint, drawing id and the ticket's index in the round (`numbers`), and stores them with the Base ticket ids."
      ],
      "discriminator": [
        68,
        52,
        151,
        133,
        64,
        172,
        55,
        0
      ],
      "accounts": [
        {
          "name": "keeper",
          "writable": true,
          "signer": true
        },
        {
          "name": "config",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        },
        {
          "name": "round",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  114,
                  111,
                  117,
                  110,
                  100
                ]
              },
              {
                "kind": "account",
                "path": "round.mint",
                "account": "Round"
              },
              {
                "kind": "account",
                "path": "round.draw_id",
                "account": "Round"
              }
            ]
          }
        },
        {
          "name": "batch",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  116,
                  105,
                  120
                ]
              },
              {
                "kind": "account",
                "path": "round"
              },
              {
                "kind": "arg",
                "path": "batch_no"
              }
            ]
          }
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "batch_no",
          "type": "u16"
        },
        {
          "name": "base_tx_hash",
          "type": {
            "array": [
              "u8",
              32
            ]
          }
        },
        {
          "name": "ball_max",
          "type": "u8"
        },
        {
          "name": "bonus_max",
          "type": "u8"
        },
        {
          "name": "ticket_price_usdc",
          "type": "u64"
        },
        {
          "name": "seed_sig",
          "type": {
            "array": [
              "u8",
              64
            ]
          }
        },
        {
          "name": "ticket_ids",
          "type": {
            "vec": {
              "array": [
                "u8",
                32
              ]
            }
          }
        }
      ]
    },
    {
      "name": "propose_admin",
      "discriminator": [
        121,
        214,
        199,
        212,
        87,
        39,
        117,
        234
      ],
      "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": "propose_keeper",
      "docs": [
        "The keeper receives round SOL: a new keeper goes live only KEY_DELAY after it is proposed (public), and",
        "`apply_keeper` (anyone) makes it live. Pubkey::default() cancels a pending change."
      ],
      "discriminator": [
        35,
        219,
        88,
        80,
        36,
        86,
        9,
        93
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "config"
          ]
        },
        {
          "name": "config",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        }
      ],
      "args": [
        {
          "name": "keeper",
          "type": "pubkey"
        }
      ]
    },
    {
      "name": "refund_round",
      "docs": [
        "KEEPER: a round that got no tickets (bridge failed, drawing missed) returns its SOL to the jar. Accepted on",
        "Open / Bridged rounds and late on a Defaulted round without tickets. TRUST POINT: the amount (public hashes)."
      ],
      "discriminator": [
        177,
        128,
        106,
        163,
        99,
        60,
        213,
        210
      ],
      "accounts": [
        {
          "name": "keeper",
          "writable": true,
          "signer": true
        },
        {
          "name": "config",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        },
        {
          "name": "coin",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  105,
                  110
                ]
              },
              {
                "kind": "account",
                "path": "round.mint",
                "account": "Round"
              }
            ]
          }
        },
        {
          "name": "round",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  114,
                  111,
                  117,
                  110,
                  100
                ]
              },
              {
                "kind": "account",
                "path": "round.mint",
                "account": "Round"
              },
              {
                "kind": "account",
                "path": "round.draw_id",
                "account": "Round"
              }
            ]
          }
        },
        {
          "name": "jar",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  106,
                  97,
                  114
                ]
              },
              {
                "kind": "account",
                "path": "round.mint",
                "account": "Round"
              }
            ]
          }
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "sol_back",
          "type": "u64"
        },
        {
          "name": "base_tx_hash",
          "type": {
            "array": [
              "u8",
              32
            ]
          }
        },
        {
          "name": "sol_sig",
          "type": {
            "array": [
              "u8",
              64
            ]
          }
        }
      ]
    },
    {
      "name": "set_guardian",
      "docs": [
        "First guardian: immediate (it only adds a check). Replacing / removing one: timelocked (sellside audit L-1)."
      ],
      "discriminator": [
        147,
        243,
        50,
        121,
        154,
        164,
        50,
        30
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "config"
          ]
        },
        {
          "name": "config",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        }
      ],
      "args": [
        {
          "name": "guardian",
          "type": "pubkey"
        }
      ]
    },
    {
      "name": "set_paused",
      "docs": [
        "Pause blocks new launches and new rounds only; everything that brings money back or pays holders works."
      ],
      "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
                ]
              }
            ]
          }
        },
        {
          "name": "treasury"
        }
      ],
      "args": []
    },
    {
      "name": "settle",
      "docs": [
        "KEEPER: settles a round with tickets after its drawing. Pulls exactly `sol_back` from the keeper. Below the",
        "round's min_payout (0 = nothing won): the SOL goes to the coin's jar and the round is Lost. Otherwise the SOL",
        "goes to the round Vault (+ the vault's rent floor and a rent headroom, paid by the keeper) and the jar's carried",
        "tokens join the round; buying can start, claims wait for `post_root`. Accepted late on a Defaulted round",
        "(resolves it). TRUST POINT: the amount (public Base claim / bridge hashes in the event)."
      ],
      "discriminator": [
        175,
        42,
        185,
        87,
        144,
        131,
        102,
        212
      ],
      "accounts": [
        {
          "name": "keeper",
          "writable": true,
          "signer": true
        },
        {
          "name": "config",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        },
        {
          "name": "coin",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  105,
                  110
                ]
              },
              {
                "kind": "account",
                "path": "round.mint",
                "account": "Round"
              }
            ]
          }
        },
        {
          "name": "round",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  114,
                  111,
                  117,
                  110,
                  100
                ]
              },
              {
                "kind": "account",
                "path": "round.mint",
                "account": "Round"
              },
              {
                "kind": "account",
                "path": "round.draw_id",
                "account": "Round"
              }
            ]
          }
        },
        {
          "name": "draw",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  100,
                  114,
                  97,
                  119
                ]
              },
              {
                "kind": "account",
                "path": "round.draw_id",
                "account": "Round"
              }
            ]
          }
        },
        {
          "name": "vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "round"
              }
            ]
          }
        },
        {
          "name": "vault_ata",
          "writable": true
        },
        {
          "name": "jar",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  106,
                  97,
                  114
                ]
              },
              {
                "kind": "account",
                "path": "round.mint",
                "account": "Round"
              }
            ]
          }
        },
        {
          "name": "jar_ata",
          "writable": true
        },
        {
          "name": "mint"
        },
        {
          "name": "token_program"
        },
        {
          "name": "ata_program",
          "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "sol_back",
          "type": "u64"
        },
        {
          "name": "winnings_usdc",
          "type": "u64"
        },
        {
          "name": "referral_usdc",
          "type": "u64"
        },
        {
          "name": "claim_tx_hash",
          "type": {
            "array": [
              "u8",
              32
            ]
          }
        },
        {
          "name": "referral_tx_hash",
          "type": {
            "array": [
              "u8",
              32
            ]
          }
        },
        {
          "name": "bridge_back_tx_hash",
          "type": {
            "array": [
              "u8",
              32
            ]
          }
        },
        {
          "name": "bridge_back_sol_sig",
          "type": {
            "array": [
              "u8",
              64
            ]
          }
        }
      ]
    },
    {
      "name": "unwrap_fees",
      "docs": [
        "Closes a WSOL account owned by the Jar (PumpSwap creator fees anyone collected as WSOL to it) into the Jar;",
        "the next `collect` books it. Anyone."
      ],
      "discriminator": [
        202,
        112,
        56,
        154,
        193,
        85,
        127,
        150
      ],
      "accounts": [
        {
          "name": "coin",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  105,
                  110
                ]
              },
              {
                "kind": "account",
                "path": "coin.mint",
                "account": "Coin"
              }
            ]
          }
        },
        {
          "name": "jar",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  106,
                  97,
                  114
                ]
              },
              {
                "kind": "account",
                "path": "coin.mint",
                "account": "Coin"
              }
            ]
          }
        },
        {
          "name": "wsol_ata",
          "writable": true
        },
        {
          "name": "token_program",
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        }
      ],
      "args": []
    },
    {
      "name": "update_config",
      "docs": [
        "New params: pad_bps applies to coins launched from now on (copied into each Coin); the round rules apply to",
        "rounds opened from now on (copied into each Round); threshold / max_round / max_exposure are read live (they",
        "only limit the keeper, see README)."
      ],
      "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"
            }
          }
        }
      ]
    },
    {
      "name": "veto_root",
      "docs": [
        "GUARDIAN: rejects the posted root inside its veto window; the keeper must repost (`repost_root`)."
      ],
      "discriminator": [
        141,
        196,
        194,
        143,
        204,
        114,
        90,
        226
      ],
      "accounts": [
        {
          "name": "guardian",
          "signer": true
        },
        {
          "name": "config",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        },
        {
          "name": "round",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  114,
                  111,
                  117,
                  110,
                  100
                ]
              },
              {
                "kind": "account",
                "path": "round.mint",
                "account": "Round"
              },
              {
                "kind": "account",
                "path": "round.draw_id",
                "account": "Round"
              }
            ]
          }
        }
      ],
      "args": [
        {
          "name": "reason",
          "type": "u8"
        }
      ]
    },
    {
      "name": "write_off",
      "docs": [
        "ADMIN: acknowledges a Defaulted round as lost WRITE_OFF_DELAY after it defaulted (moves no funds; frees the",
        "exposure and the circuit breaker so the pad can go on; the round stays Defaulted-then-WrittenOff forever)."
      ],
      "discriminator": [
        42,
        219,
        118,
        129,
        76,
        117,
        45,
        177
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "config"
          ]
        },
        {
          "name": "config",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        },
        {
          "name": "coin",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  105,
                  110
                ]
              },
              {
                "kind": "account",
                "path": "round.mint",
                "account": "Round"
              }
            ]
          }
        },
        {
          "name": "round",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  114,
                  111,
                  117,
                  110,
                  100
                ]
              },
              {
                "kind": "account",
                "path": "round.mint",
                "account": "Round"
              },
              {
                "kind": "account",
                "path": "round.draw_id",
                "account": "Round"
              }
            ]
          }
        }
      ],
      "args": []
    }
  ],
  "accounts": [
    {
      "name": "Coin",
      "discriminator": [
        215,
        195,
        53,
        238,
        217,
        196,
        213,
        51
      ]
    },
    {
      "name": "Config",
      "discriminator": [
        155,
        12,
        170,
        224,
        30,
        250,
        204,
        130
      ]
    },
    {
      "name": "Draw",
      "discriminator": [
        225,
        131,
        41,
        222,
        122,
        20,
        146,
        202
      ]
    },
    {
      "name": "Round",
      "discriminator": [
        87,
        127,
        165,
        51,
        73,
        78,
        116,
        174
      ]
    },
    {
      "name": "TicketBatch",
      "discriminator": [
        4,
        41,
        19,
        67,
        151,
        89,
        139,
        1
      ]
    }
  ],
  "events": [
    {
      "name": "AdminProposed",
      "discriminator": [
        129,
        249,
        226,
        227,
        199,
        82,
        110,
        243
      ]
    },
    {
      "name": "AdminSet",
      "discriminator": [
        157,
        245,
        205,
        226,
        118,
        125,
        183,
        97
      ]
    },
    {
      "name": "Bought",
      "discriminator": [
        193,
        56,
        215,
        24,
        156,
        76,
        42,
        104
      ]
    },
    {
      "name": "BridgeAttested",
      "discriminator": [
        50,
        34,
        102,
        105,
        130,
        17,
        241,
        154
      ]
    },
    {
      "name": "Claimed",
      "discriminator": [
        217,
        192,
        123,
        72,
        108,
        150,
        248,
        33
      ]
    },
    {
      "name": "ConfigInitialized",
      "discriminator": [
        181,
        49,
        200,
        156,
        19,
        167,
        178,
        91
      ]
    },
    {
      "name": "ConfigUpdated",
      "discriminator": [
        40,
        241,
        230,
        122,
        11,
        19,
        198,
        194
      ]
    },
    {
      "name": "DrawPosted",
      "discriminator": [
        103,
        160,
        125,
        154,
        60,
        149,
        137,
        89
      ]
    },
    {
      "name": "FeesCollected",
      "discriminator": [
        233,
        23,
        117,
        225,
        107,
        178,
        254,
        8
      ]
    },
    {
      "name": "FeesUnwrapped",
      "discriminator": [
        146,
        111,
        114,
        101,
        19,
        203,
        134,
        142
      ]
    },
    {
      "name": "GuardianProposed",
      "discriminator": [
        103,
        9,
        177,
        31,
        176,
        22,
        60,
        57
      ]
    },
    {
      "name": "GuardianSet",
      "discriminator": [
        159,
        49,
        155,
        156,
        176,
        88,
        29,
        190
      ]
    },
    {
      "name": "KeeperProposed",
      "discriminator": [
        13,
        18,
        243,
        226,
        114,
        229,
        197,
        233
      ]
    },
    {
      "name": "KeeperSet",
      "discriminator": [
        116,
        85,
        200,
        22,
        76,
        163,
        56,
        243
      ]
    },
    {
      "name": "Launched",
      "discriminator": [
        209,
        127,
        29,
        152,
        129,
        212,
        189,
        183
      ]
    },
    {
      "name": "PausedSet",
      "discriminator": [
        171,
        125,
        127,
        156,
        233,
        81,
        68,
        66
      ]
    },
    {
      "name": "RootPosted",
      "discriminator": [
        245,
        251,
        4,
        0,
        87,
        227,
        252,
        231
      ]
    },
    {
      "name": "RootVetoed",
      "discriminator": [
        104,
        203,
        229,
        184,
        178,
        81,
        64,
        117
      ]
    },
    {
      "name": "RoundClosed",
      "discriminator": [
        45,
        243,
        28,
        22,
        132,
        70,
        175,
        226
      ]
    },
    {
      "name": "RoundDefaulted",
      "discriminator": [
        59,
        100,
        170,
        30,
        249,
        35,
        158,
        30
      ]
    },
    {
      "name": "RoundOpened",
      "discriminator": [
        99,
        173,
        228,
        72,
        142,
        57,
        109,
        178
      ]
    },
    {
      "name": "RoundRefunded",
      "discriminator": [
        203,
        164,
        53,
        34,
        132,
        31,
        105,
        230
      ]
    },
    {
      "name": "RoundSettled",
      "discriminator": [
        249,
        225,
        66,
        54,
        157,
        200,
        234,
        222
      ]
    },
    {
      "name": "RoundWrittenOff",
      "discriminator": [
        72,
        5,
        117,
        246,
        116,
        81,
        209,
        63
      ]
    },
    {
      "name": "TicketsPosted",
      "discriminator": [
        156,
        42,
        207,
        98,
        233,
        116,
        132,
        75
      ]
    },
    {
      "name": "TreasuryPaid",
      "discriminator": [
        203,
        141,
        198,
        183,
        132,
        74,
        239,
        248
      ]
    },
    {
      "name": "TreasurySet",
      "discriminator": [
        69,
        231,
        163,
        135,
        254,
        194,
        109,
        166
      ]
    }
  ],
  "errors": [
    {
      "code": 6000,
      "name": "Unauthorized",
      "msg": "Only the admin can do this"
    },
    {
      "code": 6001,
      "name": "NotKeeper",
      "msg": "Only the Lottopad keeper can attest this step"
    },
    {
      "code": 6002,
      "name": "NotGuardian",
      "msg": "Only the guardian can veto a root"
    },
    {
      "code": 6003,
      "name": "Paused",
      "msg": "Lottopad is paused: no new coins or rounds right now (settles, buys and claims still work)"
    },
    {
      "code": 6004,
      "name": "BadConfig",
      "msg": "Config value out of its allowed range"
    },
    {
      "code": 6005,
      "name": "ParamsChanged",
      "msg": "The platform settings changed since you looked: reload and check the fees"
    },
    {
      "code": 6006,
      "name": "BadName",
      "msg": "Name must be 1-32 bytes, no control or invisible characters, no leading/trailing spaces"
    },
    {
      "code": 6007,
      "name": "BadSymbol",
      "msg": "Ticker must be 1-10 characters, no spaces, control or invisible characters"
    },
    {
      "code": 6008,
      "name": "BadUri",
      "msg": "Metadata uri must be ipfs://<cid> or https://ipfs.io/ipfs/<cid>"
    },
    {
      "code": 6009,
      "name": "BadTreasury",
      "msg": "Treasury must be a normal wallet"
    },
    {
      "code": 6010,
      "name": "NotAlone",
      "msg": "This instruction must be alone in its transaction (only compute-budget and SOL transfers may join it)"
    },
    {
      "code": 6011,
      "name": "BadAccounts",
      "msg": "Wrong accounts"
    },
    {
      "code": 6012,
      "name": "Math",
      "msg": "Math overflow"
    },
    {
      "code": 6013,
      "name": "DevBuyTooLarge",
      "msg": "Dev buy is larger than what is left on the curve"
    },
    {
      "code": 6014,
      "name": "BelowThreshold",
      "msg": "The jar is below the round threshold: wait for more trading fees"
    },
    {
      "code": 6015,
      "name": "ExposureCap",
      "msg": "The keeper already holds the most SOL it may hold at once: settle earlier rounds first"
    },
    {
      "code": 6016,
      "name": "UnresolvedDefault",
      "msg": "A round defaulted and is not resolved: no new rounds until the keeper settles or refunds it"
    },
    {
      "code": 6017,
      "name": "TooManyOpenRounds",
      "msg": "This coin already has the most rounds in flight"
    },
    {
      "code": 6018,
      "name": "DrawIdNotNewer",
      "msg": "The drawing id must be newer than this coin's last round"
    },
    {
      "code": 6019,
      "name": "DrawTooSoon",
      "msg": "A new drawing must be at least 12 hours after the previous one (Megapot draws daily)"
    },
    {
      "code": 6020,
      "name": "BadDrawTime",
      "msg": "The drawing time must be in the future and within 3 days"
    },
    {
      "code": 6021,
      "name": "BadRoundState",
      "msg": "The round is not in the right state for this step"
    },
    {
      "code": 6022,
      "name": "BadBatch",
      "msg": "Ticket batches must be posted in order"
    },
    {
      "code": 6023,
      "name": "BadTicketCount",
      "msg": "A batch holds 1-10 tickets"
    },
    {
      "code": 6024,
      "name": "BadBallRange",
      "msg": "Ball ranges are invalid"
    },
    {
      "code": 6025,
      "name": "SeedChanged",
      "msg": "The seed of the ticket numbers cannot change within a round"
    },
    {
      "code": 6026,
      "name": "UsdcExceeded",
      "msg": "Tickets cost more USDC than the bridge delivered"
    },
    {
      "code": 6027,
      "name": "TooManyTickets",
      "msg": "Too many tickets for one round"
    },
    {
      "code": 6028,
      "name": "TicketsTooLate",
      "msg": "Tickets can no longer be posted for this drawing"
    },
    {
      "code": 6029,
      "name": "BadDrawNumbers",
      "msg": "Draw numbers are invalid (5 distinct normals within the range, bonus within its range)"
    },
    {
      "code": 6030,
      "name": "DrawNotYet",
      "msg": "The drawing has not happened yet"
    },
    {
      "code": 6031,
      "name": "BadSnapshot",
      "msg": "The snapshot slot is not valid for this round"
    },
    {
      "code": 6032,
      "name": "DrawMismatch",
      "msg": "This drawing does not match the round (time or ball ranges)"
    },
    {
      "code": 6033,
      "name": "HasTickets",
      "msg": "A round with tickets must be settled, not refunded"
    },
    {
      "code": 6034,
      "name": "NoTickets",
      "msg": "A round without tickets must be refunded, not settled"
    },
    {
      "code": 6035,
      "name": "NotLate",
      "msg": "Not late yet: the keeper still has time"
    },
    {
      "code": 6036,
      "name": "TooEarly",
      "msg": "Too early"
    },
    {
      "code": 6037,
      "name": "TooManyLeaves",
      "msg": "Too many leaves for one round"
    },
    {
      "code": 6038,
      "name": "BadHeader",
      "msg": "The root's header leaf does not match this round"
    },
    {
      "code": 6039,
      "name": "BadCid",
      "msg": "Table cid must be 1-64 letters / digits"
    },
    {
      "code": 6040,
      "name": "VetoOver",
      "msg": "The veto window is over"
    },
    {
      "code": 6041,
      "name": "NoRoot",
      "msg": "There is no posted root to veto"
    },
    {
      "code": 6042,
      "name": "ClaimsNotOpen",
      "msg": "Claims are not open yet (buying or the veto window is still running)"
    },
    {
      "code": 6043,
      "name": "ClaimsOver",
      "msg": "The claim window is over"
    },
    {
      "code": 6044,
      "name": "BadProof",
      "msg": "Proof does not match the round's root"
    },
    {
      "code": 6045,
      "name": "ExcludedHolder",
      "msg": "This holder is excluded from the drop (curve, pool or a Lottopad account)"
    },
    {
      "code": 6046,
      "name": "ClaimExceeds",
      "msg": "Claims exceed the tokens of this round"
    },
    {
      "code": 6047,
      "name": "BuyDone",
      "msg": "Buying of this round is done"
    },
    {
      "code": 6048,
      "name": "BuyTooSoon",
      "msg": "Next buy chunk not due yet"
    },
    {
      "code": 6049,
      "name": "NotMigrated",
      "msg": "The coin's curve is complete but not migrated yet: buy after the migration"
    },
    {
      "code": 6050,
      "name": "SlippageExceeded",
      "msg": "The buy returned fewer tokens than the minimum"
    },
    {
      "code": 6051,
      "name": "NothingToBuy",
      "msg": "Nothing to buy right now"
    },
    {
      "code": 6052,
      "name": "NothingToClaim",
      "msg": "Nothing to pay"
    },
    {
      "code": 6053,
      "name": "BelowRentFloor",
      "msg": "Payout is below the rent floor of an empty wallet: it stays due, fund the wallet or wait"
    },
    {
      "code": 6054,
      "name": "ZeroHash",
      "msg": "A hash or signature must not be all zeros"
    },
    {
      "code": 6055,
      "name": "NothingPending",
      "msg": "Nothing pending"
    },
    {
      "code": 6056,
      "name": "RefundBeforeDraw",
      "msg": "A round is refunded only after its drawing time"
    },
    {
      "code": 6057,
      "name": "KeeperBuyWindow",
      "msg": "Only the keeper buys in the first hours after a settle (sandwich protection); anyone may after"
    },
    {
      "code": 6058,
      "name": "FirstBatchAfterDraw",
      "msg": "The first ticket batch (it fixes the numbers' seed) must be posted before the drawing time"
    },
    {
      "code": 6059,
      "name": "DrawTimeMismatch",
      "msg": "This drawing id is already open with another drawing time"
    }
  ],
  "types": [
    {
      "name": "AdminProposed",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "current",
            "type": "pubkey"
          },
          {
            "name": "proposed",
            "type": "pubkey"
          }
        ]
      }
    },
    {
      "name": "AdminSet",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "old",
            "type": "pubkey"
          },
          {
            "name": "admin",
            "type": "pubkey"
          }
        ]
      }
    },
    {
      "name": "Bought",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "mint",
            "type": "pubkey"
          },
          {
            "name": "round",
            "type": "pubkey"
          },
          {
            "name": "venue",
            "type": "u8"
          },
          {
            "name": "offered",
            "type": "u64"
          },
          {
            "name": "lamports_used",
            "type": "u64"
          },
          {
            "name": "tokens",
            "type": "u64"
          },
          {
            "name": "tokens_bought",
            "type": "u64"
          },
          {
            "name": "to_spend",
            "type": "u64"
          },
          {
            "name": "depth_cap",
            "type": "u64"
          },
          {
            "name": "buy_done",
            "type": "bool"
          },
          {
            "name": "chunk",
            "type": "u16"
          },
          {
            "name": "at",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "BridgeAttested",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "mint",
            "type": "pubkey"
          },
          {
            "name": "round",
            "type": "pubkey"
          },
          {
            "name": "draw_id",
            "type": "u64"
          },
          {
            "name": "kind",
            "type": "u8"
          },
          {
            "name": "sol_sig",
            "type": {
              "array": [
                "u8",
                64
              ]
            }
          },
          {
            "name": "base_fill_hash",
            "type": {
              "array": [
                "u8",
                32
              ]
            }
          },
          {
            "name": "sol_out",
            "type": "u64"
          },
          {
            "name": "usdc_received",
            "type": "u64"
          },
          {
            "name": "at",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "Claimed",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "mint",
            "type": "pubkey"
          },
          {
            "name": "round",
            "type": "pubkey"
          },
          {
            "name": "draw_id",
            "type": "u64"
          },
          {
            "name": "index",
            "type": "u32"
          },
          {
            "name": "claimant",
            "type": "pubkey"
          },
          {
            "name": "weight",
            "type": "u64"
          },
          {
            "name": "tokens",
            "type": "u64"
          },
          {
            "name": "tokens_claimed",
            "type": "u64"
          },
          {
            "name": "at",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "Coin",
      "docs": [
        "One per coin launched here. The Jar [\"jar\", mint] (system PDA) is the pump creator and holds the coin's SOL.",
        "Invariant: jar.lamports == rent_floor + jar_sol + treasury_pending + (fees not booked yet)."
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "mint",
            "type": "pubkey"
          },
          {
            "name": "dev",
            "type": "pubkey"
          },
          {
            "name": "launched_at",
            "type": "i64"
          },
          {
            "name": "pad_bps",
            "type": "u16"
          },
          {
            "name": "bump",
            "type": "u8"
          },
          {
            "name": "jar_bump",
            "type": "u8"
          },
          {
            "name": "jar_sol",
            "docs": [
              "SOL in the jar that belongs to the coin's next rounds."
            ],
            "type": "u64"
          },
          {
            "name": "treasury_pending",
            "type": "u64"
          },
          {
            "name": "treasury_paid",
            "type": "u64"
          },
          {
            "name": "fees_total",
            "docs": [
              "every creator-fee (or donated) lamport booked by `collect`"
            ],
            "type": "u64"
          },
          {
            "name": "pad_total",
            "type": "u64"
          },
          {
            "name": "returned_total",
            "docs": [
              "SOL that came back into the jar from rounds (lost rounds, refunds, unspent dust)"
            ],
            "type": "u64"
          },
          {
            "name": "sol_out_total",
            "type": "u64"
          },
          {
            "name": "sol_back_total",
            "type": "u64"
          },
          {
            "name": "tokens_bought_total",
            "type": "u64"
          },
          {
            "name": "tokens_claimed_total",
            "type": "u64"
          },
          {
            "name": "carry_tokens",
            "docs": [
              "unclaimed tokens parked in the jar's token account, handed to the next paying round"
            ],
            "type": "u64"
          },
          {
            "name": "rounds",
            "type": "u32"
          },
          {
            "name": "open_rounds",
            "type": "u8"
          },
          {
            "name": "defaults",
            "type": "u32"
          },
          {
            "name": "last_draw_id",
            "type": "u64"
          },
          {
            "name": "last_draw_time",
            "type": "i64"
          },
          {
            "name": "has_round",
            "type": "bool"
          },
          {
            "name": "last_round",
            "type": "pubkey"
          },
          {
            "name": "dev_buy",
            "type": "u64"
          },
          {
            "name": "launch_fee",
            "type": "u64"
          }
        ]
      }
    },
    {
      "name": "Config",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "admin",
            "type": "pubkey"
          },
          {
            "name": "pending_admin",
            "type": "pubkey"
          },
          {
            "name": "treasury",
            "type": "pubkey"
          },
          {
            "name": "keeper",
            "docs": [
              "Keeper: attests every Base step and receives the round SOL for bridging (TRUST POINT)."
            ],
            "type": "pubkey"
          },
          {
            "name": "pending_keeper",
            "type": "pubkey"
          },
          {
            "name": "keeper_effective_at",
            "type": "i64"
          },
          {
            "name": "guardian",
            "docs": [
              "Guardian: may veto a posted root inside its window (default = none)."
            ],
            "type": "pubkey"
          },
          {
            "name": "pending_guardian",
            "type": "pubkey"
          },
          {
            "name": "guardian_effective_at",
            "type": "i64"
          },
          {
            "name": "paused",
            "type": "bool"
          },
          {
            "name": "params",
            "type": {
              "defined": {
                "name": "Params"
              }
            }
          },
          {
            "name": "coins",
            "type": "u64"
          },
          {
            "name": "rounds",
            "type": "u64"
          },
          {
            "name": "exposure",
            "docs": [
              "Lamports of every round the keeper received and has not settled / refunded (and not written off)."
            ],
            "type": "u64"
          },
          {
            "name": "unresolved_defaults",
            "docs": [
              "Defaulted rounds not yet settled / refunded / written off: while > 0 no new round opens (circuit breaker)."
            ],
            "type": "u32"
          },
          {
            "name": "defaults_total",
            "type": "u32"
          },
          {
            "name": "bump",
            "type": "u8"
          },
          {
            "name": "cur_draw_id",
            "docs": [
              "Audit M-1: one drawing timeline for every coin. The drawing rounds are opened for right now; a newer drawing",
              "must be >= DRAW_SPACING after it; the same drawing id always has the same time. Together with \"no settle /",
              "refund before the drawing time\" this makes max_exposure a real per-drawing cap on what the keeper can take."
            ],
            "type": "u64"
          },
          {
            "name": "cur_draw_time",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "ConfigInitialized",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "admin",
            "type": "pubkey"
          },
          {
            "name": "treasury",
            "type": "pubkey"
          },
          {
            "name": "keeper",
            "type": "pubkey"
          },
          {
            "name": "guardian",
            "type": "pubkey"
          },
          {
            "name": "params",
            "type": {
              "defined": {
                "name": "Params"
              }
            }
          }
        ]
      }
    },
    {
      "name": "ConfigUpdated",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "params",
            "type": {
              "defined": {
                "name": "Params"
              }
            }
          }
        ]
      }
    },
    {
      "name": "Draw",
      "docs": [
        "One Megapot drawing (shared by every coin), posted by the keeper after it was drawn on Base."
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "draw_id",
            "type": "u64"
          },
          {
            "name": "draw_time",
            "type": "i64"
          },
          {
            "name": "normals",
            "type": {
              "array": [
                "u8",
                5
              ]
            }
          },
          {
            "name": "bonus",
            "type": "u8"
          },
          {
            "name": "ball_max",
            "type": "u8"
          },
          {
            "name": "bonus_max",
            "type": "u8"
          },
          {
            "name": "base_tx_hash",
            "type": {
              "array": [
                "u8",
                32
              ]
            }
          },
          {
            "name": "snapshot_slot",
            "docs": [
              "last Solana slot whose block time <= draw_time: the holder snapshot of every round of this drawing"
            ],
            "type": "u64"
          },
          {
            "name": "random_number",
            "docs": [
              "Pyth Entropy random number of the drawing (zeros when not attested)"
            ],
            "type": {
              "array": [
                "u8",
                32
              ]
            }
          },
          {
            "name": "posted_at",
            "type": "i64"
          },
          {
            "name": "bump",
            "type": "u8"
          }
        ]
      }
    },
    {
      "name": "DrawPosted",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "draw_id",
            "type": "u64"
          },
          {
            "name": "draw_time",
            "type": "i64"
          },
          {
            "name": "normals",
            "type": {
              "array": [
                "u8",
                5
              ]
            }
          },
          {
            "name": "bonus",
            "type": "u8"
          },
          {
            "name": "ball_max",
            "type": "u8"
          },
          {
            "name": "bonus_max",
            "type": "u8"
          },
          {
            "name": "base_tx_hash",
            "type": {
              "array": [
                "u8",
                32
              ]
            }
          },
          {
            "name": "snapshot_slot",
            "type": "u64"
          },
          {
            "name": "random_number",
            "type": {
              "array": [
                "u8",
                32
              ]
            }
          },
          {
            "name": "at",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "FeesCollected",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "mint",
            "type": "pubkey"
          },
          {
            "name": "incoming",
            "type": "u64"
          },
          {
            "name": "pad_share",
            "type": "u64"
          },
          {
            "name": "jar_share",
            "type": "u64"
          },
          {
            "name": "jar_sol",
            "type": "u64"
          },
          {
            "name": "fees_total",
            "type": "u64"
          },
          {
            "name": "threshold",
            "type": "u64"
          },
          {
            "name": "ready",
            "type": "bool"
          },
          {
            "name": "at",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "FeesUnwrapped",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "mint",
            "type": "pubkey"
          },
          {
            "name": "amount",
            "type": "u64"
          }
        ]
      }
    },
    {
      "name": "GuardianProposed",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "current",
            "type": "pubkey"
          },
          {
            "name": "proposed",
            "type": "pubkey"
          },
          {
            "name": "effective_at",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "GuardianSet",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "guardian",
            "type": "pubkey"
          }
        ]
      }
    },
    {
      "name": "KeeperProposed",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "current",
            "type": "pubkey"
          },
          {
            "name": "proposed",
            "type": "pubkey"
          },
          {
            "name": "effective_at",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "KeeperSet",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "keeper",
            "type": "pubkey"
          }
        ]
      }
    },
    {
      "name": "Launched",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "mint",
            "type": "pubkey"
          },
          {
            "name": "dev",
            "type": "pubkey"
          },
          {
            "name": "jar",
            "type": "pubkey"
          },
          {
            "name": "name",
            "type": "string"
          },
          {
            "name": "symbol",
            "type": "string"
          },
          {
            "name": "uri",
            "type": "string"
          },
          {
            "name": "dev_buy",
            "type": "u64"
          },
          {
            "name": "launch_fee",
            "type": "u64"
          },
          {
            "name": "pad_bps",
            "type": "u16"
          },
          {
            "name": "at",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "Params",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "launch_fee_bps",
            "docs": [
              "Launch fee in bps of the dev buy, paid to config.treasury (<= 500)."
            ],
            "type": "u16"
          },
          {
            "name": "pad_bps",
            "docs": [
              "Pad share of every creator fee to the treasury (default 2000 = 20 %, <= 3000). Copied into each coin."
            ],
            "type": "u16"
          },
          {
            "name": "threshold_lamports",
            "docs": [
              "A round opens only when the jar holds at least this (live, kept near $10 by the admin; 0.01..10 SOL)."
            ],
            "type": "u64"
          },
          {
            "name": "max_round_lamports",
            "docs": [
              "Hard cap of one round (live; threshold..20 SOL)."
            ],
            "type": "u64"
          },
          {
            "name": "max_exposure_lamports",
            "docs": [
              "Cap of the SOL the keeper may hold at once over all unsettled rounds (live; max_round..50 SOL)."
            ],
            "type": "u64"
          },
          {
            "name": "min_payout_lamports",
            "docs": [
              "A settle below this pays nobody: the SOL goes back to the jar and the round is Lost (0.001..1 SOL)."
            ],
            "type": "u64"
          },
          {
            "name": "veto_secs",
            "docs": [
              "Guardian veto window on a posted root (1 h..3 d)."
            ],
            "type": "i64"
          },
          {
            "name": "claim_window_secs",
            "docs": [
              "Claims stay open this long after the veto window (1 d..90 d); then leftovers roll to the coin."
            ],
            "type": "i64"
          },
          {
            "name": "settle_timeout_secs",
            "docs": [
              "A round not settled by draw_time + this is Defaulted by anyone (1 d..14 d)."
            ],
            "type": "i64"
          },
          {
            "name": "ticket_grace_secs",
            "docs": [
              "A round without tickets by draw_time + this is Defaulted by anyone (10 min..12 h)."
            ],
            "type": "i64"
          },
          {
            "name": "max_chunk_lamports",
            "docs": [
              "Largest buy chunk of the winnings (0.1..20 SOL; also <= 2 % of the venue's SOL reserves)."
            ],
            "type": "u64"
          },
          {
            "name": "buy_gap_secs",
            "docs": [
              "Minimum gap between two buy chunks of a round (10 s..1 h)."
            ],
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "PausedSet",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "paused",
            "type": "bool"
          }
        ]
      }
    },
    {
      "name": "RootPosted",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "mint",
            "type": "pubkey"
          },
          {
            "name": "round",
            "type": "pubkey"
          },
          {
            "name": "draw_id",
            "type": "u64"
          },
          {
            "name": "root",
            "type": {
              "array": [
                "u8",
                32
              ]
            }
          },
          {
            "name": "total_weight",
            "type": "u64"
          },
          {
            "name": "leaf_count",
            "type": "u32"
          },
          {
            "name": "table_cid",
            "type": "string"
          },
          {
            "name": "snapshot_slot",
            "type": "u64"
          },
          {
            "name": "challenge_end",
            "type": "i64"
          },
          {
            "name": "claims_end",
            "type": "i64"
          },
          {
            "name": "posts",
            "type": "u8"
          }
        ]
      }
    },
    {
      "name": "RootVetoed",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "mint",
            "type": "pubkey"
          },
          {
            "name": "round",
            "type": "pubkey"
          },
          {
            "name": "draw_id",
            "type": "u64"
          },
          {
            "name": "guardian",
            "type": "pubkey"
          },
          {
            "name": "reason",
            "type": "u8"
          },
          {
            "name": "vetoes",
            "type": "u8"
          },
          {
            "name": "at",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "Round",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "mint",
            "type": "pubkey"
          },
          {
            "name": "draw_id",
            "type": "u64"
          },
          {
            "name": "draw_time",
            "type": "i64"
          },
          {
            "name": "n",
            "type": "u32"
          },
          {
            "name": "status",
            "type": "u8"
          },
          {
            "name": "bump",
            "type": "u8"
          },
          {
            "name": "vault_bump",
            "type": "u8"
          },
          {
            "name": "rules",
            "type": {
              "defined": {
                "name": "RoundRules"
              }
            }
          },
          {
            "name": "opened_at",
            "type": "i64"
          },
          {
            "name": "open_slot",
            "type": "u64"
          },
          {
            "name": "keeper",
            "type": "pubkey"
          },
          {
            "name": "sol_out",
            "type": "u64"
          },
          {
            "name": "bridge_kind",
            "type": "u8"
          },
          {
            "name": "bridge_sol_sig",
            "type": {
              "array": [
                "u8",
                64
              ]
            }
          },
          {
            "name": "bridge_fill_hash",
            "type": {
              "array": [
                "u8",
                32
              ]
            }
          },
          {
            "name": "usdc_received",
            "type": "u64"
          },
          {
            "name": "bridged_at",
            "type": "i64"
          },
          {
            "name": "seed_sig",
            "type": {
              "array": [
                "u8",
                64
              ]
            }
          },
          {
            "name": "ball_max",
            "type": "u8"
          },
          {
            "name": "bonus_max",
            "type": "u8"
          },
          {
            "name": "ticket_price_usdc",
            "type": "u64"
          },
          {
            "name": "batches",
            "type": "u16"
          },
          {
            "name": "tickets",
            "type": "u32"
          },
          {
            "name": "usdc_spent",
            "type": "u64"
          },
          {
            "name": "sol_back",
            "type": "u64"
          },
          {
            "name": "winnings_usdc",
            "type": "u64"
          },
          {
            "name": "referral_usdc",
            "type": "u64"
          },
          {
            "name": "claim_tx_hash",
            "type": {
              "array": [
                "u8",
                32
              ]
            }
          },
          {
            "name": "referral_tx_hash",
            "type": {
              "array": [
                "u8",
                32
              ]
            }
          },
          {
            "name": "bridge_back_tx_hash",
            "type": {
              "array": [
                "u8",
                32
              ]
            }
          },
          {
            "name": "bridge_back_sol_sig",
            "type": {
              "array": [
                "u8",
                64
              ]
            }
          },
          {
            "name": "settled_at",
            "type": "i64"
          },
          {
            "name": "late",
            "type": "bool"
          },
          {
            "name": "snapshot_slot",
            "type": "u64"
          },
          {
            "name": "defaulted_at",
            "type": "i64"
          },
          {
            "name": "sol_spent",
            "type": "u64"
          },
          {
            "name": "tokens_bought",
            "type": "u64"
          },
          {
            "name": "carry_in",
            "type": "u64"
          },
          {
            "name": "chunks",
            "type": "u16"
          },
          {
            "name": "last_buy_at",
            "type": "i64"
          },
          {
            "name": "buy_done",
            "type": "bool"
          },
          {
            "name": "root_state",
            "type": "u8"
          },
          {
            "name": "root",
            "type": {
              "array": [
                "u8",
                32
              ]
            }
          },
          {
            "name": "total_weight",
            "type": "u64"
          },
          {
            "name": "leaf_count",
            "type": "u32"
          },
          {
            "name": "posted_at",
            "type": "i64"
          },
          {
            "name": "challenge_end",
            "type": "i64"
          },
          {
            "name": "claims_end",
            "type": "i64"
          },
          {
            "name": "posts",
            "type": "u8"
          },
          {
            "name": "vetoes",
            "type": "u8"
          },
          {
            "name": "table_cid",
            "type": "string"
          },
          {
            "name": "tokens_claimed",
            "type": "u64"
          },
          {
            "name": "claims",
            "type": "u32"
          },
          {
            "name": "returned_sol",
            "type": "u64"
          },
          {
            "name": "returned_tokens",
            "type": "u64"
          },
          {
            "name": "closed_at",
            "type": "i64"
          },
          {
            "name": "bitmap",
            "docs": [
              "one bit per leaf (index - 1), sized at settle / repost"
            ],
            "type": "bytes"
          }
        ]
      }
    },
    {
      "name": "RoundClosed",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "mint",
            "type": "pubkey"
          },
          {
            "name": "round",
            "type": "pubkey"
          },
          {
            "name": "draw_id",
            "type": "u64"
          },
          {
            "name": "returned_sol",
            "type": "u64"
          },
          {
            "name": "carried_tokens",
            "type": "u64"
          },
          {
            "name": "jar_sol",
            "type": "u64"
          },
          {
            "name": "carry_tokens",
            "type": "u64"
          },
          {
            "name": "at",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "RoundDefaulted",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "mint",
            "type": "pubkey"
          },
          {
            "name": "round",
            "type": "pubkey"
          },
          {
            "name": "draw_id",
            "type": "u64"
          },
          {
            "name": "keeper",
            "type": "pubkey"
          },
          {
            "name": "sol_out",
            "type": "u64"
          },
          {
            "name": "status_before",
            "type": "u8"
          },
          {
            "name": "tickets",
            "type": "u32"
          },
          {
            "name": "by",
            "type": "pubkey"
          },
          {
            "name": "at",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "RoundOpened",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "mint",
            "type": "pubkey"
          },
          {
            "name": "round",
            "type": "pubkey"
          },
          {
            "name": "n",
            "type": "u32"
          },
          {
            "name": "draw_id",
            "type": "u64"
          },
          {
            "name": "draw_time",
            "type": "i64"
          },
          {
            "name": "sol_out",
            "type": "u64"
          },
          {
            "name": "keeper",
            "type": "pubkey"
          },
          {
            "name": "open_slot",
            "type": "u64"
          },
          {
            "name": "jar_sol_after",
            "type": "u64"
          },
          {
            "name": "exposure",
            "type": "u64"
          },
          {
            "name": "at",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "RoundRefunded",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "mint",
            "type": "pubkey"
          },
          {
            "name": "round",
            "type": "pubkey"
          },
          {
            "name": "draw_id",
            "type": "u64"
          },
          {
            "name": "sol_out",
            "type": "u64"
          },
          {
            "name": "sol_back",
            "type": "u64"
          },
          {
            "name": "base_tx_hash",
            "type": {
              "array": [
                "u8",
                32
              ]
            }
          },
          {
            "name": "sol_sig",
            "type": {
              "array": [
                "u8",
                64
              ]
            }
          },
          {
            "name": "late",
            "type": "bool"
          },
          {
            "name": "jar_sol",
            "type": "u64"
          },
          {
            "name": "at",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "RoundRules",
      "docs": [
        "The rules of one round, copied from Params when it opens."
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "min_payout_lamports",
            "type": "u64"
          },
          {
            "name": "veto_secs",
            "type": "i64"
          },
          {
            "name": "claim_window_secs",
            "type": "i64"
          },
          {
            "name": "settle_timeout_secs",
            "type": "i64"
          },
          {
            "name": "ticket_grace_secs",
            "type": "i64"
          },
          {
            "name": "max_chunk_lamports",
            "type": "u64"
          },
          {
            "name": "buy_gap_secs",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "RoundSettled",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "mint",
            "type": "pubkey"
          },
          {
            "name": "round",
            "type": "pubkey"
          },
          {
            "name": "draw_id",
            "type": "u64"
          },
          {
            "name": "outcome",
            "type": "u8"
          },
          {
            "name": "late",
            "type": "bool"
          },
          {
            "name": "sol_out",
            "type": "u64"
          },
          {
            "name": "sol_back",
            "type": "u64"
          },
          {
            "name": "winnings_usdc",
            "type": "u64"
          },
          {
            "name": "referral_usdc",
            "type": "u64"
          },
          {
            "name": "claim_tx_hash",
            "type": {
              "array": [
                "u8",
                32
              ]
            }
          },
          {
            "name": "referral_tx_hash",
            "type": {
              "array": [
                "u8",
                32
              ]
            }
          },
          {
            "name": "bridge_back_tx_hash",
            "type": {
              "array": [
                "u8",
                32
              ]
            }
          },
          {
            "name": "bridge_back_sol_sig",
            "type": {
              "array": [
                "u8",
                64
              ]
            }
          },
          {
            "name": "carry_in",
            "type": "u64"
          },
          {
            "name": "snapshot_slot",
            "type": "u64"
          },
          {
            "name": "jar_sol",
            "type": "u64"
          },
          {
            "name": "exposure",
            "type": "u64"
          },
          {
            "name": "at",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "RoundWrittenOff",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "mint",
            "type": "pubkey"
          },
          {
            "name": "round",
            "type": "pubkey"
          },
          {
            "name": "draw_id",
            "type": "u64"
          },
          {
            "name": "sol_out",
            "type": "u64"
          },
          {
            "name": "at",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "TicketBatch",
      "docs": [
        "One Base `buyTickets` transaction of a round (<= 10 tickets)."
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "round",
            "type": "pubkey"
          },
          {
            "name": "mint",
            "type": "pubkey"
          },
          {
            "name": "draw_id",
            "type": "u64"
          },
          {
            "name": "batch_no",
            "type": "u16"
          },
          {
            "name": "base_tx_hash",
            "type": {
              "array": [
                "u8",
                32
              ]
            }
          },
          {
            "name": "first_index",
            "type": "u32"
          },
          {
            "name": "ticket_price_usdc",
            "type": "u64"
          },
          {
            "name": "posted_at",
            "type": "i64"
          },
          {
            "name": "bump",
            "type": "u8"
          },
          {
            "name": "tickets",
            "type": {
              "vec": {
                "defined": {
                  "name": "TicketRec"
                }
              }
            }
          }
        ]
      }
    },
    {
      "name": "TicketRec",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "id",
            "docs": [
              "Megapot ticket id (uint256, big-endian)"
            ],
            "type": {
              "array": [
                "u8",
                32
              ]
            }
          },
          {
            "name": "normals",
            "type": {
              "array": [
                "u8",
                5
              ]
            }
          },
          {
            "name": "bonus",
            "type": "u8"
          }
        ]
      }
    },
    {
      "name": "TicketsPosted",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "mint",
            "type": "pubkey"
          },
          {
            "name": "round",
            "type": "pubkey"
          },
          {
            "name": "draw_id",
            "type": "u64"
          },
          {
            "name": "batch_no",
            "type": "u16"
          },
          {
            "name": "base_tx_hash",
            "type": {
              "array": [
                "u8",
                32
              ]
            }
          },
          {
            "name": "seed_sig",
            "type": {
              "array": [
                "u8",
                64
              ]
            }
          },
          {
            "name": "first_index",
            "type": "u32"
          },
          {
            "name": "ticket_ids",
            "type": {
              "vec": {
                "array": [
                  "u8",
                  32
                ]
              }
            }
          },
          {
            "name": "normals",
            "type": {
              "vec": {
                "array": [
                  "u8",
                  5
                ]
              }
            }
          },
          {
            "name": "bonus",
            "type": "bytes"
          },
          {
            "name": "ticket_price_usdc",
            "type": "u64"
          },
          {
            "name": "tickets_total",
            "type": "u32"
          },
          {
            "name": "usdc_spent",
            "type": "u64"
          },
          {
            "name": "at",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "TreasuryPaid",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "mint",
            "type": "pubkey"
          },
          {
            "name": "treasury",
            "type": "pubkey"
          },
          {
            "name": "amount",
            "type": "u64"
          },
          {
            "name": "at",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "TreasurySet",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "treasury",
            "type": "pubkey"
          }
        ]
      }
    }
  ]
}