Home

Awesome

NEAR Protocol Specifications and Standards

project chat CI

This repository hosts the current NEAR Protocol specification and standards. This includes the core protocol specification, APIs, contract standards, processes, and workflows.

Changes to the protocol specification and standards are called NEAR Enhancement Proposals (NEPs).

NEPs

NEP #TitleAuthorStatus
0001NEP Purpose and Guidelines@jlogelinLiving
0021Fungible Token Standard (Deprecated)@evgenykuzyakovDeprecated
0141Fungible Token Standard@evgenykuzyakov @oysterpack, @robert-zarembaFinal
0145Storage Management@evgenykuzyakovFinal
0148Fungible Token Metadata@robert-zaremba @evgenykuzyakov @oysterpackFinal
0171Non Fungible Token Standard@mikedotexe @evgenykuzyakov @oysterpackFinal
0177Non Fungible Token Metadata@chadoh @mikedotexeFinal
0178Non Fungible Token Approval Management@chadoh @thor314Final
0181Non Fungible Token Enumeration@chadoh @thor314Final
0199Non Fungible Token Royalties and Payouts@thor314 @mattlockyerFinal
0245Multi Token Standard@zcstarr @riqi @jriemann @marcos.sunFinal
0264Promise Gas Weights@austinabellFinal
0297Events Standard@telezhnayaFinal
0330Source Metadata@BenKurrekFinal
0364Efficient signature verification and hashing precompile functions@blasrodriFinal
0366Meta Transactions@ilblackdragon @e-uleyskiy @fadeevabFinal
0393Sould Bound Token (SBT)@robert-zarembaFinal
0399Flat Storage@Longarithm @mzhangmzzFinal
0413Near Wallet API - support for signMessage method@gagdiez @gutsyphilipFinal
0418Remove attached_deposit view panic@austinabellFinal
0448Zero-balance Accounts@bowenwang1996Final
0452Linkdrop Standard@benkurrek @miyachiFinal
0455Parameter Compute Costs@akashin @jakmeierFinal
0488Host Functions for BLS12-381 Curve Operations@olga24912Final
0491Non-Refundable Storage Staking@jakmeierFinal
0492Restrict creation of Ethereum Addresses@bowenwang1996Final
0508Resharding v2@wacban @shreyan-gupta @walnut-the-catFinal
0509Stateless validation Stage 0@robin-near @pugachAG @Longarithm @walnut-the-catFinal
0514Fewer Block Producer Seats in testnet@nikurtFinal
0519Yield Execution@akhi3030 @saketh-areFinal
0536Reduce the number of gas refunds@evgenykuzyakov @bowenwang1996Final
0539Cross-Shard Congestion Control@wacban @jakmeierFinal

Specification

NEAR Specification is under active development. Specification defines how any NEAR client should be connecting, producing blocks, reaching consensus, processing state transitions, using runtime APIs, and implementing smart contract standards as well.

Standards & Processes

Standards refer to various common interfaces and APIs that are used by smart contract developers on top of the NEAR Protocol. For example, such standards include SDK for Rust, API for fungible tokens or how to manage user's social graph.

Processes include release process for spec, clients or how standards are updated.

Contributing

Expectations

Ideas presented ultimately as NEPs will need to be driven by the author through the process. It's an exciting opportunity with a fair amount of responsibility from the contributor(s). Please put care into the details. NEPs that do not present convincing motivation, demonstrate understanding of the impact of the design, or are disingenuous about the drawbacks or alternatives tend to be poorly received. Again, by the time the NEP makes it to the pull request, it has a clear plan and path forward based on the discussions in the governance forum.

Process

Spec changes are ultimately done via pull requests to this repository (formalized process here). In an effort to keep the pull request clean and readable, please follow these instructions to flesh out an idea.

  1. Sign up for the governance site and make a post to the appropriate section. For instance, during the ideation phase of a standard, one might start a new conversation in the Development » Standards section or the NEP Discussions Forum.

  2. The forum has comment threading which allows the community and NEAR Collective to ideate, ask questions, wrestle with approaches, etc. If more immediate responses are desired, consider bringing the conversation to Zulip.

  3. When the governance conversations have reached a point where a clear plan is evident, create a pull request, using the instructions below.

    • Clone this repository and create a branch with "my-feature".
    • Update relevant content in the current specification that are affected by the proposal.
    • Create a Pull request, using nep-0000-template.md to describe motivation and details of the new Contract or Protocol specification. In the document header, ensure the Status is marked as Draft, and any relevant discussion links are added to the DiscussionsTo section. Use the pull request number padded with zeroes. For instance, the pull request 219 should be created as neps/nep-0219.md.
    • Add your Draft standard to the NEPs section of this README.md. This helps advertise your standard via github.
    • Update Docusaurus documentation under the specs/Standards to describe the contract standard at a high level, how to integrate it into a Dapp, and a link to the standard document (ie. neps/nep-0123.md). This helps advertise your standard via nomicon. Any related nomicon sections should be prefixed and styled using the following snippet:
    :::caution
    This is part of proposed spec [NEP-123](https://github.com/near/NEPs/blob/master/neps/nep-0123.md) and subject to change.
    :::
    
    • Once complete, submit the pull request for editor review.

    • The formalization dance begins:

      • NEP Editors, who are unopinionated shepherds of the process, check document formatting, completeness and adherence to NEP-0001 and approve the pull request.
      • Once ready, the author updates the NEP status to Review allowing further community participation, to address any gaps or clarifications, normally part of the Review PR.
      • NEP Editors mark the NEP as Last Call, allowing a 14 day grace period for any final community feedback. Any unresolved show stoppers roll the state back to Review.
      • NEP Editors mark the NEP as Final, marking the standard as complete. The standard should only be updated to correct errata and add non-normative clarifications.

Tip: build consensus and integrate feedback. NEPs that have broad support are much more likely to make progress than those that don't receive any comments. Feel free to reach out to the NEP assignee in particular to get help identify stakeholders and obstacles.

Running Docusaurus

This repository uses Docusaurus for the Nomicon website.

  1. Move into the /website folder where you will run the following commands:

    • Make sure all the dependencies for the website are installed:

      # Install dependencies
      yarn
      
    • Run the local docs development server

      # Start the site
      yarn start
      

      Expected Output

      # Website with live reload is started
      Docusaurus server started on port 3000
      

      The website for docs will open your browser locally to port 3000

  2. Make changes to the docs

  3. Observe those changes reflected in the local docs

  4. Submit a pull request with your changes