Skip to content

Commit

Permalink
Regenerate IDL and clients
Browse files Browse the repository at this point in the history
  • Loading branch information
danenbm committed May 8, 2024
1 parent cd39bad commit c17a462
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 4 deletions.
17 changes: 15 additions & 2 deletions clients/js/src/generated/errors/mplCore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -526,15 +526,15 @@ export class RequiresLifecycleCheckError extends ProgramError {
codeToErrorMap.set(0x24, RequiresLifecycleCheckError);
nameToErrorMap.set('RequiresLifecycleCheck', RequiresLifecycleCheckError);

/** DuplicateLifecycleChecks: Duplicate lifecycle checks were provided for external plugin */
/** DuplicateLifecycleChecks: Duplicate lifecycle checks were provided for external plugin */
export class DuplicateLifecycleChecksError extends ProgramError {
override readonly name: string = 'DuplicateLifecycleChecks';

readonly code: number = 0x25; // 37

constructor(program: Program, cause?: Error) {
super(
'Duplicate lifecycle checks were provided for external plugin ',
'Duplicate lifecycle checks were provided for external plugin',
program,
cause
);
Expand All @@ -543,6 +543,19 @@ export class DuplicateLifecycleChecksError extends ProgramError {
codeToErrorMap.set(0x25, DuplicateLifecycleChecksError);
nameToErrorMap.set('DuplicateLifecycleChecks', DuplicateLifecycleChecksError);

/** InvalidOracleAccountData: Could not read from oracle account */
export class InvalidOracleAccountDataError extends ProgramError {
override readonly name: string = 'InvalidOracleAccountData';

readonly code: number = 0x26; // 38

constructor(program: Program, cause?: Error) {
super('Could not read from oracle account', program, cause);
}
}
codeToErrorMap.set(0x26, InvalidOracleAccountDataError);
nameToErrorMap.set('InvalidOracleAccountData', InvalidOracleAccountDataError);

/**
* Attempts to resolve a custom program error from the provided error code.
* @category Errors
Expand Down
5 changes: 4 additions & 1 deletion clients/rust/src/generated/errors/mpl_core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,11 @@ pub enum MplCoreError {
#[error("External plugin must have at least one lifecycle check")]
RequiresLifecycleCheck,
/// 37 (0x25) - Duplicate lifecycle checks were provided for external plugin
#[error("Duplicate lifecycle checks were provided for external plugin ")]
#[error("Duplicate lifecycle checks were provided for external plugin")]
DuplicateLifecycleChecks,
/// 38 (0x26) - Could not read from oracle account
#[error("Could not read from oracle account")]
InvalidOracleAccountData,
}

impl solana_program::program_error::PrintProgramError for MplCoreError {
Expand Down
7 changes: 6 additions & 1 deletion idls/mpl_core.json
Original file line number Diff line number Diff line change
Expand Up @@ -4209,7 +4209,12 @@
{
"code": 37,
"name": "DuplicateLifecycleChecks",
"msg": "Duplicate lifecycle checks were provided for external plugin "
"msg": "Duplicate lifecycle checks were provided for external plugin"
},
{
"code": 38,
"name": "InvalidOracleAccountData",
"msg": "Could not read from oracle account"
}
],
"metadata": {
Expand Down

0 comments on commit c17a462

Please sign in to comment.