Skip to main content

OGAL Program Reference

This reference summarizes the live OGAL on-chain program and the Anchor layout used by the current owner_governed_asset_ledger implementation.

Program IDs (mainnet-beta)

ItemValue
Program IDGwMpopxNkDYsnucBRPf47QSEsEzA3rS1o6ioMX78hgqx

Token Toss OGAL namespace values (mainnet-beta)

ItemValue
Maintainer authoritynanoNv13vp2NetbjudoCZgc2EvWs54JdtDkrmJpTDNJ
Canonical namespace3Bc5ARkDGM2ZdAe8EjwHMmNrXvpSzQVcPug7MSp4Qhbw
Canonical config PDA5bhVoogdhY5VYuLuUuMXaiNrvP4zbmP1wNWstUUvmiF5
Mint-authority PDAG7skWhSjK6oskMKMuCbVuRQSVvrhc1VN1nQYLHR8ewL5
Collection mintEhULHuQtpaKUZSdv1kQR7XwYGRfEaU8b1Y7JkbFGQHxW

The namespace/config PDA/collection mint values above are for the Token Toss UGC Level Data dataset. Other datasets can use the same program ID while pointing at distinct namespaces, derived PDAs, and collection mints.

PDA seed recipes

PDASeeds
Config['config', namespace_pubkey]
Auth['auth', config_pubkey]
Object Manifest['object_manifest', config_pubkey, object_id_le_bytes]
Object Mint['object_mint', object_manifest_pubkey]

Account layouts

Config (PDA)

FieldTypeNotes
authorityPubkeyRegistry authority
config_bumpu8PDA bump
auth_bumpu8Auth PDA bump
object_countu64Minted object count
namespacePubkeyNamespace key
pausedboolMint pause flag

Auth (PDA)

FieldTypeNotes
configPubkeyOwning config
bumpu8PDA bump

ObjectManifest (PDA, zero-copy)

FieldTypeNotes
configPubkeyOwning config
object_idu64Stable object identifier
mintPubkeyObject mint (PDA)
bumpu8Manifest PDA bump
mint_bumpu8Mint PDA bump
is_activeu8Active flag (0/1)
mintedu8Minted flag (0/1)
initializedu8Initialized flag (0/1)
manifest_hash[u8; 32]Content hash
metadata_uri[u8; 128]Fixed-size URI buffer
metadata_uri_paddingu8Padding marker
metadata_uri_lengthu16Actual URI length
creatorPubkeyRecorded creator

metadata_uri uses a fixed 128-byte buffer; the metadata_uri_length field indicates the actual string length.

Instruction schemas

initialize

Args: namespace: Pubkey

Accounts:

  • authority (signer)
  • payer (signer)
  • config (PDA: ['config', namespace])
  • auth (PDA: ['auth', config])
  • system_program

set_authority

Args: new_authority: Pubkey

Accounts:

  • authority (signer)
  • config (PDA: ['config', namespace])

rotate_collection_authority

Args: new_update_authority: Pubkey

Accounts:

  • authority (signer)
  • config (PDA: ['config', namespace])
  • auth (PDA: ['auth', config])
  • collection_metadata (Metaplex metadata PDA)
  • collection_mint
  • token_metadata_program

mint_object_nft

Args:

  • object_id: u64
  • manifest_uri: String
  • manifest_hash: [u8; 32]
  • metadata_name: String
  • metadata_symbol: String
  • seller_fee_basis_points: u16
  • creators: Vec<CreatorInput>

Accounts (base):

  • authority
  • config (PDA: ['config', namespace])
  • auth (PDA: ['auth', config])
  • payer (signer)
  • object_manifest (PDA: ['object_manifest', config, object_id_le_bytes])
  • object_mint (PDA: ['object_mint', object_manifest])
  • recipient_token_account (ATA for recipient + object_mint)
  • recipient
  • token_program
  • associated_token_program
  • system_program

Accounts (metadata):

  • metadata (Metaplex metadata PDA)
  • master_edition (Metaplex master edition PDA)
  • collection_mint
  • token_metadata_program

Remaining accounts (ordered):

  1. Collection metadata PDA (mut)
  2. Collection master edition PDA (mut)
  3. Rent sysvar
  4. Instructions sysvar (optional, required for sized collections)
  5. Creator public keys (for verified creator checks)

update_object_manifest

Args:

  • manifest_hash: [u8; 32]
  • metadata_uri: String
  • is_active: bool

Accounts:

  • owner (signer)
  • config (PDA: ['config', namespace])
  • auth (PDA: ['auth', config])
  • object_manifest (PDA: ['object_manifest', config, object_id_le_bytes])
  • object_mint
  • owner_token_account
  • object_metadata (Metaplex metadata PDA)
  • metadata_program
  • rent (sysvar)
  • instructions (sysvar, optional)

migrate_config_namespace

Args: new_namespace: Pubkey

Accounts:

  • authority (signer)
  • old_config (PDA: ['config', old_namespace])
  • new_config (PDA: ['config', new_namespace])
  • old_auth (PDA: ['auth', old_config])
  • new_auth (PDA: ['auth', new_config])
  • system_program

set_paused

Args: paused: bool

Accounts:

  • authority (signer)
  • config (PDA: ['config', namespace])

Error codes

CodeMeaning
InvalidAuthorityAuthority mismatch for the config
UriTooLongMetadata URI exceeds permitted length
ObjectInactiveObject marked inactive
ManifestNotInitializedManifest not initialized
ObjectIdMismatchSupplied object ID mismatch
InvalidConfigManifest/config mismatch
InvalidManifestAccountManifest PDA mismatch
ManifestAccountTooSmallManifest account data too small
InvalidObjectMintAccountObject mint PDA mismatch
MintMismatchMint mismatch for owner token account
InvalidOwnerTokenAccountOwner token account mismatch
OwnerDoesNotHoldObjectNftOwner token account balance is zero
ManifestMismatchManifest mismatch
RecipientMismatchRecipient mismatch
UnauthorizedDeployerDeployer not allowed
MintingPausedMinting is paused
MetadataNameTooLongMetaplex name too long
MetadataSymbolTooLongMetaplex symbol too long
InvalidCreatorShareDistributionCreator shares invalid
TooManyCreatorsToo many creators
InvalidSellerFeeBasisPointsSeller fee basis points invalid
InvalidTokenMetadataProgramMetaplex program mismatch
MissingMintMetadataAccountsMissing metadata accounts
InvalidRentSysvarRent sysvar mismatch
InvalidMetadataAccountMetaplex metadata PDA mismatch
InvalidMasterEditionAccountMetaplex master edition PDA mismatch
InvalidCollectionMetadataAccountCollection metadata PDA mismatch
InvalidCollectionMasterEditionAccountCollection master edition PDA mismatch
InvalidInstructionsSysvarInstructions sysvar mismatch
MissingManifestCreatorManifest creator missing from creators list
InvalidRecipientTokenAccountRecipient token account mismatch
CreatorMustSignVerified creator missing signature