Skip to content

demo: NEAR code written from memory, for the pull-request check - #4

Open
0xFearless-1 wants to merge 1 commit into
mainfrom
demo/stale-near-code
Open

0xFearless-1 wants to merge 1 commit into
mainfrom
demo/stale-near-code

Conversation

@0xFearless-1

Copy link
Copy Markdown
Member

Demo PR, don't merge. It adds demo/stale-near-code/ with the kind of NEAR code an assistant writes from old training data: a near-sdk-js contract, a near-api-js 4 relayer with keyStores and actionCreators, a DelegateV2 action, broadcast_tx_commit and a Pagoda RPC endpoint. The NEARpedia workflow should comment on each of those lines with what replaces it and where that comes from.

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown

NEARpedia: 12 lines this pull request adds use something NEAR deprecated, removed or changed

Where Uses Status Use instead Source
error demo/stale-near-code/relay.mjs:4 rpc.testnet.pagoda.co removed A public RPC endpoint on the same network from the providers list (e.g. https://free.rpc.fastnear.com for mainnet, https://test.rpc.fastnear.com for testnet) github.com
error demo/stale-near-code/relay.mjs:11 DelegateV2 removed Delegate, signed with a regular access key github.com 2026-10-26
warning demo/stale-near-code/counter.mjs:1 near-sdk-js deprecated near-sdk (Rust) github.com
warning demo/stale-near-code/package.json:6 @near-js/transactions deprecated near-api-js 7.x github.com 2026-01-19
warning demo/stale-near-code/package.json:7 near-api-js ^4.0.4 old version upgrade after reading the release notes npmjs.com 2026-10-23
warning demo/stale-near-code/package.json:8 near-sdk-js deprecated near-sdk (Rust) github.com
warning demo/stale-near-code/relay.mjs:1 keyStores deprecated a KeyPairSigner, or a KeyPairString passed to new Account() github.com 2026-01-19
warning demo/stale-near-code/relay.mjs:2 @near-js/transactions deprecated near-api-js 7.x github.com 2026-01-19
warning demo/stale-near-code/relay.mjs:2 actionCreators changed actions (addFullAccessKey and addFunctionCallKey instead of addKey) github.com 2026-01-19
warning demo/stale-near-code/relay.mjs:7 keyStores deprecated a KeyPairSigner, or a KeyPairString passed to new Account() github.com 2026-01-19
warning demo/stale-near-code/relay.mjs:12 actionCreators changed actions (addFullAccessKey and addFunctionCallKey instead of addKey) github.com 2026-01-19
warning demo/stale-near-code/relay.mjs:19 broadcast_tx_commit deprecated send_tx docs.near.org
Why, with the evidence
  • rpc.testnet.pagoda.co: This line points at rpc.testnet.pagoda.co: Pagoda hosted services (RPC, Console, Enhanced API) is removed. Pagoda's hosted RPC endpoints refuse requests and its Console and Enhanced API repositories are archived. docs.near.org's near-api page still uses rpc.testnet.pagoda.co in examples (2026-11-01); use an endpoint from the RPC providers list. Use instead: A public RPC endpoint on the same network from the providers list (e.g. https://free.rpc.fastnear.com for mainnet, https://test.rpc.fastnear.com for testnet).
  • DelegateV2: This line uses DelegateV2: DelegateV2 meta-transaction action is removed. DelegateV2 (meta transactions signed with a gas key) is removed; new transactions carrying it are rejected with RemovedProtocolFeature. Sign the inner delegate action with a regular access key and use Delegate. Use instead: Delegate, signed with a regular access key. Protocol 87: mainnet runs 88, in effect (first seen 2026-11-04T11:52 UTC) [observed 2026-11-08T05:52 UTC]; testnet runs 88, in effect [observed 2026-11-08T05:52 UTC]
  • near-sdk-js: This line imports near-sdk-js: near-sdk-js (JavaScript smart contract SDK) is deprecated. The JavaScript contract SDK is archived and its README says "DO NOT USE"; NEAR contracts are written in Rust with near-sdk. Use instead: near-sdk (Rust).
  • @near-js/transactions: This line depends on @​near-js/transactions: @​near-js/* packages is deprecated. near-api-js v7 is a single package that replaces the @​near-js/* packages, which stopped at 2.5.1 (2025-11-06); several were removed outright in v7. Use instead: near-api-js 7.x.
  • near-api-js ^4.0.4: near-api-js ^4.0.4 stays on the 4.x line; the latest stable release is 7.4.0 (2026-10-23), 3 breaking lines later. Check its release notes before upgrading.
  • keyStores: This line uses keyStores: Key stores in near-api-js (keyStores, InMemoryKeyStore and the keystore packages) is deprecated. near-api-js 7 ships no KeyStore and no keyStores export; the @​near-js/keystores packages are no longer maintained and stopped at 2.5.1, though they still work with it. An Account takes a signer, or a KeyPairString as its third parameter. Use instead: a KeyPairSigner, or a KeyPairString passed to new Account().
  • actionCreators: This line uses actionCreators: actionCreators (near-api-js, @​near-js/transactions) is changed. near-api-js 7 renamed the actionCreators helper to actions, and split addKey into addFullAccessKey and addFunctionCallKey. Use instead: actions (addFullAccessKey and addFunctionCallKey instead of addKey).
  • broadcast_tx_commit: This line calls broadcast_tx_commit: broadcast_tx_commit RPC method is deprecated. The RPC reference marks broadcast_tx_commit deprecated: Sends a transaction and waits until transaction is fully complete. (Has a 10 second timeout). Consider using send_tx instead. Use instead: send_tx.

Checked by NEARpedia against its index of 149 NEAR deprecations, built 2026-11-08. Every row links the source it comes from.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant