Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .changeset/spicy-books-remain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'@codama/renderers-js-umi': minor
'@codama/dynamic-parsers': minor
'@codama/dynamic-codecs': minor
'@codama/renderers-rust': minor
'@codama/renderers-js': minor
---

Update usage of `IInstructionWithData` and bump web3.js dependencies
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
env:
# Among other things, opts out of Turborepo telemetry. See https://consoledonottrack.com/.
DO_NOT_TRACK: '1'
NODE_VERSION: 18
NODE_VERSION: 20
CODAMA_VERSION: 1.x
SOLANA_VERSION: 1.18.12

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"zx": "^8.2.2"
},
"engines": {
"node": ">=18.0.0"
"node": ">=20.0.0"
},
"packageManager": "[email protected]",
"prettier": "@solana/prettier-config-solana"
Expand Down
2 changes: 1 addition & 1 deletion packages/dynamic-codecs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"@codama/errors": "workspace:*",
"@codama/nodes": "workspace:*",
"@codama/visitors-core": "workspace:*",
"@solana/codecs": "2.0.0"
"@solana/codecs": "2.1.0-canary-20241128134801"
},
"license": "MIT",
"repository": {
Expand Down
4 changes: 2 additions & 2 deletions packages/dynamic-parsers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@
"@codama/errors": "workspace:*",
"@codama/nodes": "workspace:*",
"@codama/visitors-core": "workspace:*",
"@solana/instructions": "2.0.0"
"@solana/instructions": "2.1.0-canary-20241128134801"
},
"devDependencies": {
"@solana/codecs": "2.0.0"
"@solana/codecs": "2.1.0-canary-20241128134801"
},
"license": "MIT",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/dynamic-parsers/src/parsers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export function parseInstruction(
root: RootNode,
instruction: IInstruction &
IInstructionWithAccounts<readonly (IAccountLookupMeta | IAccountMeta)[]> &
IInstructionWithData<Uint8Array>,
IInstructionWithData<ReadonlyUint8Array>,
): ParsedInstruction | undefined {
const parsedData = parseInstructionData(root, instruction.data);
if (!parsedData) return undefined;
Expand Down
2 changes: 1 addition & 1 deletion packages/renderers-js-umi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"@codama/renderers-core": "workspace:*",
"@codama/validators": "workspace:*",
"@codama/visitors-core": "workspace:*",
"@solana/codecs-strings": "rc",
"@solana/codecs-strings": "2.1.0-canary-20241128134801",
"nunjucks": "^3.2.4",
"prettier": "^3.4.1"
},
Expand Down
8 changes: 2 additions & 6 deletions packages/renderers-js/e2e/anchor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,12 @@
},
"license": "MIT",
"peerDependencies": {
"@solana/web3.js": "2.0.0-rc.0"
"@solana/web3.js": "2.1.0-canary-20241128134801"
},
"devDependencies": {
"@ava/typescript": "^4.1.0",
"@solana/eslint-config-solana": "^3.0.0",
"@solana/web3.js": "rc",
"@solana/webcrypto-ed25519-polyfill": "rc",
"@solana/web3.js": "2.1.0-canary-20241128134801",
"@typescript-eslint/eslint-plugin": "^7.3.1",
"@typescript-eslint/parser": "^7.3.1",
"ava": "^6.1.2",
Expand All @@ -35,9 +34,6 @@
"typescript": "^5.4.2"
},
"ava": {
"require": [
"@solana/webcrypto-ed25519-polyfill"
],
"typescript": {
"compile": false,
"rewritePaths": {
Expand Down
592 changes: 320 additions & 272 deletions packages/renderers-js/e2e/anchor/pnpm-lock.yaml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export type CreateGuardInstruction<
| IAccountMeta<string> = '11111111111111111111111111111111',
TRemainingAccounts extends readonly IAccountMeta<string>[] = [],
> = IInstruction<TProgram> &
IInstructionWithData<Uint8Array> &
IInstructionWithData<ReadonlyUint8Array> &
IInstructionWithAccounts<
[
TAccountGuard extends string
Expand Down Expand Up @@ -510,7 +510,7 @@ export function parseCreateGuardInstruction<
>(
instruction: IInstruction<TProgram> &
IInstructionWithAccounts<TAccountMetas> &
IInstructionWithData<Uint8Array>
IInstructionWithData<ReadonlyUint8Array>
): ParsedCreateGuardInstruction<TProgram, TAccountMetas> {
if (instruction.accounts.length < 8) {
// TODO: Coded error.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export type ExecuteInstruction<
| IAccountMeta<string> = 'Sysvar1nstructions1111111111111111111111111',
TRemainingAccounts extends readonly IAccountMeta<string>[] = [],
> = IInstruction<TProgram> &
IInstructionWithData<Uint8Array> &
IInstructionWithData<ReadonlyUint8Array> &
IInstructionWithAccounts<
[
TAccountSourceAccount extends string
Expand Down Expand Up @@ -389,7 +389,7 @@ export function parseExecuteInstruction<
>(
instruction: IInstruction<TProgram> &
IInstructionWithAccounts<TAccountMetas> &
IInstructionWithData<Uint8Array>
IInstructionWithData<ReadonlyUint8Array>
): ParsedExecuteInstruction<TProgram, TAccountMetas> {
if (instruction.accounts.length < 7) {
// TODO: Coded error.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export type InitializeInstruction<
TAccountPayer extends string | IAccountMeta<string> = string,
TRemainingAccounts extends readonly IAccountMeta<string>[] = [],
> = IInstruction<TProgram> &
IInstructionWithData<Uint8Array> &
IInstructionWithData<ReadonlyUint8Array> &
IInstructionWithAccounts<
[
TAccountExtraMetasAccount extends string
Expand Down Expand Up @@ -347,7 +347,7 @@ export function parseInitializeInstruction<
>(
instruction: IInstruction<TProgram> &
IInstructionWithAccounts<TAccountMetas> &
IInstructionWithData<Uint8Array>
IInstructionWithData<ReadonlyUint8Array>
): ParsedInitializeInstruction<TProgram, TAccountMetas> {
if (instruction.accounts.length < 6) {
// TODO: Coded error.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export type UpdateGuardInstruction<
| IAccountMeta<string> = '11111111111111111111111111111111',
TRemainingAccounts extends readonly IAccountMeta<string>[] = [],
> = IInstruction<TProgram> &
IInstructionWithData<Uint8Array> &
IInstructionWithData<ReadonlyUint8Array> &
IInstructionWithAccounts<
[
TAccountGuard extends string
Expand Down Expand Up @@ -420,7 +420,7 @@ export function parseUpdateGuardInstruction<
>(
instruction: IInstruction<TProgram> &
IInstructionWithAccounts<TAccountMetas> &
IInstructionWithData<Uint8Array>
IInstructionWithData<ReadonlyUint8Array>
): ParsedUpdateGuardInstruction<TProgram, TAccountMetas> {
if (instruction.accounts.length < 6) {
// TODO: Coded error.
Expand Down
8 changes: 2 additions & 6 deletions packages/renderers-js/e2e/dummy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,12 @@
},
"license": "MIT",
"peerDependencies": {
"@solana/web3.js": "2.0.0-rc.0"
"@solana/web3.js": "2.1.0-canary-20241128134801"
},
"devDependencies": {
"@ava/typescript": "^4.1.0",
"@solana/eslint-config-solana": "^3.0.0",
"@solana/web3.js": "rc",
"@solana/webcrypto-ed25519-polyfill": "rc",
"@solana/web3.js": "2.1.0-canary-20241128134801",
"@typescript-eslint/eslint-plugin": "^7.3.1",
"@typescript-eslint/parser": "^7.3.1",
"ava": "^6.1.2",
Expand All @@ -35,9 +34,6 @@
"typescript": "^5.4.2"
},
"ava": {
"require": [
"@solana/webcrypto-ed25519-polyfill"
],
"typescript": {
"compile": false,
"rewritePaths": {
Expand Down
Loading