Skip to content

Commit

Permalink
version 0.2.9 snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jun 14, 2024
1 parent 6bde7bc commit c7da21e
Show file tree
Hide file tree
Showing 19 changed files with 660 additions and 359 deletions.
564 changes: 401 additions & 163 deletions Cargo.lock

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions clients/js/src/generated/accounts/counter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,6 @@
*/

import {
Account,
Address,
Codec,
Decoder,
EncodedAccount,
Encoder,
FetchAccountConfig,
FetchAccountsConfig,
MaybeAccount,
MaybeEncodedAccount,
ReadonlyUint8Array,
assertAccountExists,
assertAccountsExist,
combineCodec,
Expand All @@ -35,6 +24,17 @@ import {
getU64Decoder,
getU64Encoder,
transformEncoder,
type Account,
type Address,
type Codec,
type Decoder,
type EncodedAccount,
type Encoder,
type FetchAccountConfig,
type FetchAccountsConfig,
type MaybeAccount,
type MaybeEncodedAccount,
type ReadonlyUint8Array,
} from '@solana/web3.js';

export type Counter = {
Expand Down
28 changes: 14 additions & 14 deletions clients/js/src/generated/instructions/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,6 @@
*/

import {
Address,
Codec,
Decoder,
Encoder,
IAccountMeta,
IAccountSignerMeta,
IInstruction,
IInstructionWithAccounts,
IInstructionWithData,
ReadonlyAccount,
ReadonlyUint8Array,
TransactionSigner,
WritableSignerAccount,
combineCodec,
fixDecoderSize,
fixEncoderSize,
Expand All @@ -30,9 +17,22 @@ import {
getStructDecoder,
getStructEncoder,
transformEncoder,
type Address,
type Codec,
type Decoder,
type Encoder,
type IAccountMeta,
type IAccountSignerMeta,
type IInstruction,
type IInstructionWithAccounts,
type IInstructionWithData,
type ReadonlyAccount,
type ReadonlyUint8Array,
type TransactionSigner,
type WritableSignerAccount,
} from '@solana/web3.js';
import { COUNTER_PROGRAM_ADDRESS } from '../programs';
import { ResolvedAccount, getAccountMetaFactory } from '../shared';
import { getAccountMetaFactory, type ResolvedAccount } from '../shared';

export type CreateInstruction<
TProgram extends string = typeof COUNTER_PROGRAM_ADDRESS,
Expand Down
28 changes: 14 additions & 14 deletions clients/js/src/generated/instructions/increment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,6 @@
*/

import {
Address,
Codec,
Decoder,
Encoder,
IAccountMeta,
IAccountSignerMeta,
IInstruction,
IInstructionWithAccounts,
IInstructionWithData,
ReadonlySignerAccount,
ReadonlyUint8Array,
TransactionSigner,
WritableAccount,
combineCodec,
fixDecoderSize,
fixEncoderSize,
Expand All @@ -28,9 +15,22 @@ import {
getStructDecoder,
getStructEncoder,
transformEncoder,
type Address,
type Codec,
type Decoder,
type Encoder,
type IAccountMeta,
type IAccountSignerMeta,
type IInstruction,
type IInstructionWithAccounts,
type IInstructionWithData,
type ReadonlySignerAccount,
type ReadonlyUint8Array,
type TransactionSigner,
type WritableAccount,
} from '@solana/web3.js';
import { COUNTER_PROGRAM_ADDRESS } from '../programs';
import { ResolvedAccount, getAccountMetaFactory } from '../shared';
import { getAccountMetaFactory, type ResolvedAccount } from '../shared';

export type IncrementInstruction<
TProgram extends string = typeof COUNTER_PROGRAM_ADDRESS,
Expand Down
6 changes: 3 additions & 3 deletions clients/js/src/generated/programs/counter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
*/

import {
Address,
containsBytes,
fixEncoderSize,
getBytesEncoder,
type Address,
} from '@solana/web3.js';
import {
ParsedCreateInstruction,
ParsedIncrementInstruction,
type ParsedCreateInstruction,
type ParsedIncrementInstruction,
} from '../instructions';

export const COUNTER_PROGRAM_ADDRESS =
Expand Down
10 changes: 5 additions & 5 deletions clients/js/src/generated/shared/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@

import {
AccountRole,
Address,
IAccountMeta,
IAccountSignerMeta,
ProgramDerivedAddress,
TransactionSigner,
isProgramDerivedAddress,
isTransactionSigner as web3JsIsTransactionSigner,
type Address,
type IAccountMeta,
type IAccountSignerMeta,
type ProgramDerivedAddress,
type TransactionSigner,
upgradeRoleToSigner,
} from '@solana/web3.js';

Expand Down
25 changes: 25 additions & 0 deletions clients/rust/src/generated/accounts/counter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,28 @@ impl<'a> TryFrom<&solana_program::account_info::AccountInfo<'a>> for Counter {
Self::deserialize(&mut data)
}
}

#[cfg(feature = "anchor")]
impl anchor_lang::AccountDeserialize for Counter {
fn try_deserialize_unchecked(buf: &mut &[u8]) -> anchor_lang::Result<Self> {
Ok(Self::deserialize(buf)?)
}
}

#[cfg(feature = "anchor")]
impl anchor_lang::AccountSerialize for Counter {}

#[cfg(feature = "anchor")]
impl anchor_lang::Owner for Counter {
fn owner() -> Pubkey {
crate::COUNTER_ID
}
}

#[cfg(feature = "anchor-idl-build")]
impl anchor_lang::IdlBuild for Counter {}

#[cfg(feature = "anchor-idl-build")]
impl anchor_lang::Discriminator for Counter {
const DISCRIMINATOR: [u8; 8] = [0; 8];
}
Loading

0 comments on commit c7da21e

Please sign in to comment.