# Near > sidebar_label: Set up Rust and a contract skeleton ## Pages - [Set up Rust, get a NEAR testnet account, NEAR CLI, and get a basic smart contract skeleton ready](01-set-up-skeleton.md): In this tutorial we'll get a`testnet`account, use [NEAR CLI RS](../../../tools/cli.md) to add a key to our computer... - [Alter the smart contract, learning about basics of development](02-add-functions-call.md): This section will modify the smart contract skeleton from the previous section. This tutorial will start by writing a... - [How to think about structs and enums when writing a Rust smart contract on NEAR](02-structs-enums.md): In this chapter, we will explore how to use structs and enums in Rust smart contracts on NEAR. Structs are used to mo... - [Implementing the seed phrase logic from the necessary libraries](02-use-seed-phrase.md): In this chapter, we will implement the seed phrase logic necessary for the crossword puzzle. This includes generating... - [There are several Actions an account can do, including sending the winner of the crossword puzzle NEAR using the Transfer Action](03-actions.md): We're going to introduce a new Action:`Transfer`. In this chapter, we'd like the first person to solve the crossword... - [Introduction to basic hashing and adding unit tests](03-hashing-and-unit-tests.md): In the previous section, we stored the crossword solution as plain text as a`String`type on the smart contract. If ... - [Introducing the linkdrop contract we can use](03-linkdrop.md): We're going to take a small detour to talk about the linkdrop smart contract. It's best that we first understand thi... - [Access Keys](access-keys.md): In NEAR, users control their accounts using access keys, which can be full-access keys or function-call keys. Full-ac... - [Address (Account ID)](account-id.md): NEAR accounts are identified by a unique address, which can take multiple forms: - [NEAR Accounts](account-model.md): Users participate in the NEAR ecosystem through their NEAR accounts. These accounts are identified by a [unique addre... - [Accounts](accounts.md): This document provides relevant information about NEAR accounts for exchanges looking forward to integrate the NEAR t... - [Transfers & Actions](actions.md): This page describes the different types of actions that a smart contract can perform on NEAR like transferring NEAR, ... - [Complex Cross Contract Call](advanced-xcc.md): This example presents 3 instances of complex cross-contract calls on the NEAR blockchain, showcasing how to batch mul... - [Basic Anatomy](anatomy.md): Let's illustrate the basic anatomy of a simple "Hello World" contract. The code on this page comes from our [Hello NE... - [Shade Agent API](api.md): The Shade Agent API abstracts away the complexity of the TEE and interacting with the agent contract to help you buil... - [Architecture](architecture.md): NEAR consists roughly of a blockchain layer and a [runtime layer](network/runtime.md). - [Auction factory](auction-factory.md): Since an auction contract hosts a single auction, each time you would like to host a new auction you will need to dep... - [Authenticate NEAR Users](backend-login.md): Recently NEAR has approved a new standard that, among other things, enables users to authenticate into a backend serv... - [Balance changes](balance-changes.md): This document provides an overview of how to track balance changes on NEAR accounts, including sending tokens and vie... - [Basic Auction](basic-auction.md): In this section, we will analyze a simple auction contract, which allows users to place bids, track the highest bidde... - [Using our Basic Examples](basic-contracts.md): We have created a selection of basic smart contracts to help you get started building Smart Contracts on NEAR. - [What is NEAR?](basics.md): NEAR is a **user-friendly** and [**carbon-neutral**](https://near.org/blog/near-climate-neutral-product/) blockchain,... - [Best Practices](best-practices.md): This page provides a collection of best practices for writing smart contracts on NEAR. These practices are designed t... - [Bidding with FTs](bidding-with-fts.md): To further develop this contract we will introduce another primitive: [fungible tokens](../../primitives/ft/ft.md). I... - [BigQuery Public Dataset](big-query.md): This document provides an overview of the BigQuery public dataset that allows users to query historical on-chain dat... - [Block / Chunk](block-chunk.md): The RPC API enables you to query the network and get details about specific blocks or chunks. - [Cross-Contract Calls](callbacks.md): In NEAR, smart contracts can call each other. This is a powerful feature that allows you to build complex application... - [What are Chain Signatures?](chain-signatures.md): Chain signatures enable NEAR accounts, including smart contracts, to sign and execute transactions across many blockc... - [✅ Checklist](checklist.md): Once you finished developing your smart contract please go through the following list in order to ensure everything i... - [Clear Contract State](clear-state.md): This simple command-line tool allows you to clean up the state of a NEAR account without deleting it. - [Shade Agent CLI](cli.md): The [Shade Agent CLI](https://github.com/NearDeFi/shade-agent-cli/tree/main) makes it simple to deploy a Shade Agent. - [Coin Flip](coin-flip.md): This example demonstrates a simple coin flip game on the NEAR blockchain, where players can guess the outcome of a co... - [Collections](collections.md): When deciding on data structures it is important to understand their tradeoffs. Choosing the wrong structure can crea... - [Key Components](components.md): In this section, we'll explore the main components of the [quickstart template](https://github.com/NearDeFi/shade-age... - [Contracts List](contracts-list.md): List of contracts of various projects deployed on NEAR. This list is not exhaustive and is meant to be a reference fo... - [Accounts / Contracts](contracts.md): The RPC API enables you to view details about accounts and contracts as well as perform contract calls. - [Count on NEAR](count-near.md): Our counter example is a friendly decentralized app that stores a number and exposes methods to`increment`,`decremen... - [Create a NEAR Account](create-account.md): To start developing applications in NEAR you will need a NEAR`testnet`account. This account will allow you to deplo... - [Create Transactions](create-transactions.md): To construct & process transactions you will need our API JavaScript library: [`near-api-js`](../tools/near-api.md). ... - [Creating a Frontend](creating-a-frontend.md): Now that we have successfully created a contract, it's time to build a frontend to provide a user-friendly interface ... - [Credentials](credentials.md): To access the data provided by [NEAR Lake](../../near-lake-framework.md) you need to provide valid AWS credentials in... - [Cross-Contract Calls](crosscontract.md): NEAR contracts can interact with other deployed contracts, querying information and executing functions on them throu... - [Custom Agent Contract](custom-agent-contract.md): In some cases, you may want to deploy a`custom agent contract`. This allows for more customizability inside the agen... - [DAO Agent Contract](dao-agent-contract.md): On this page, you'll look at the DAO smart contract that uses the yield and resume pattern to enable the Shade Agent ... - [DAO Agent](dao-agent.md): On this page, you'll examine the agent component of the DAO. The agent continuously monitors for new proposals, uses ... - [Decentralized Autonomous Organizations](dao.md): Decentralized Autonomous Organizations (DAOs) are self-organized groups that form around common purposes. Membership,... - [Data APIs](data-apis.md): If you are building a decentralized applications, chances are that you will need to query on-chain data. Since buildi... - [Rollup Data Availability](data-availability.md): Every monolithic blockchain has a data availability layer. NEAR's Data Availability (DA) represents a pioneering init... - [Existing Services](data-services.md): Data Services are constantly listening to the blockchain, processing the transactions and storing them in a database ... - [Handling NEAR Types](data-types.md): When calling methods in a contract or receiving results from them, you will need to encode/decode parameters correctl... - [Deploying Your Own Contract](deploy-your-own-contract.md): At its core, the Liquid Staking Contract issues a token that follows the [Fungible Token (NEP-141)](https://github.co... - [Deploying](deploy.md): After your contract is ready you can deploy it in the NEAR network for everyone to use it. - [Deploying an Agent](deploying.md): :::warning - [Decentralized Exchanges (DEX)](dex.md): A Decentralized Exchange (DEX) is an application that allows users to trade tokens (native & fungible tokens) through... - [Decentralized Identifiers (DIDs)](did.md): This document details how to use the`did:near`method for decentralized identifiers on the NEAR blockchain, how it c... - [Donation](donation.md): Our donation example enables to forward NEAR Tokens to an account while keeping track of it. It is one of the simples... - [Environment Variables](environment-variables.md): Environment variables are a crucial component of the Shade Agent Framework. They configure your Shade Agent and are p... - [Environment](environment.md): The environment is a set of variables and functions that are available to your smart contract when it is executed. It... - [Epoch](epoch.md): This section explains the concept of an **epoch** in the NEAR Protocol, which is a unit of time when validators of th... - [Source Code Survey](error-implementation.md): This page provides a very high level, sometimes "pseudocode", view of error types and related messages as implemented... - [RPC Errors](errors.md): Understand common RPC errors and how to handle them. - [EVM Wallets on NEAR](eth-wallets-on-near.md): Thanks to the [NEAR Wallet Selector](./web-login.md#wallet-selector), users can login into NEAR applications using [E... - [EVM Wallets Login](ethereum-wallets.md): Using the [Wallet Selector](./wallet-selector.md) it is possible to login into NEAR applications using Ethereum walle... - [Exchange Integration](exchange-integration.md): This document provides an overview of how to integrate with NEAR Protocol for exchanges, including account management... - [Explorer](explorer.md): Explorers are web applications that allow you to quickly obtain information from the blockchain through a friendly us... - [Factory](factory.md): A factory is a smart contract that stores a global contract id, and automatizes deploying contracts onto new sub-acco... - [Integrator FAQ](faq.md): This document provides answers to frequently asked questions about integrating with the NEAR Protocol. It covers topi... - [FastAuth SDK](fastauth-sdk.md): FastAuth is a key management system that allows users to **recover or sign-up for** a NEAR account using their **emai... - [Framework Overview](framework-overview.md): The Shade Agent Framework provides a suite of tools designed to simplify the development and deployment of Shade Agen... - [Frontend Interacting with Multiple Contracts](frontend-multiple-contracts.md): This example showcases how to interact with multiple contracts from a single frontend. - [Front Running](frontrunning.md): In the NEAR network, validators have access to the transaction pool, and can therefore see them before they execute. ... - [Using FTs](ft.md): Wanting to use Fungible Tokens (FT) in your dApp? Here you will find all the information you need to get started crea... - [Fungible Tokens Zero to Hero](fts.md): In this _Zero to Hero_ series, you'll find a set of tutorials covering every aspect of a fungible token (FT) smart co... - [External Interface](functions.md): Smart contracts expose functions so users can interact with them. There are different types of functions including`r... - [Fungible tokens](fungible-tokens.md): This document provides an overview of the NEAR fungible token standard, including how to check balances, get metadata... - [Gas (Execution Fees)](gas.md): This section explains how gas works in the NEAR Protocol, including how it is calculated, charged, and used to incent... - [Getting Started with Chain Signatures](getting-started.md): Chain Signatures allows all NEAR accounts - including smart contracts - to sign transactions for other blockchains (s... - [Global Contracts](global-contracts.md): Global contracts allow smart contracts to be deployed once and reused by any account without incurring high storage c... - [Guest Book](guest-book.md): This example demonstrates how to create a simple guest book application on the NEAR blockchain, allowing users to sig... - [How Omni Bridge Works](how-it-works.md): The journey toward truly trustless cross-chain communication took a significant leap forward when the NEAR team [crea... - [Implementation Details](implementation-details.md): The Omni Bridge is a sophisticated cross-chain bridge infrastructure that enables secure and efficient token transfer... - [Implementing Chain Signatures](implementation.md): Chain signatures enable NEAR accounts, including smart contracts, to sign and execute transactions across many blockc... - [Implicit Accounts](implicit-accounts.md): This document provides an overview of implicit accounts in the NEAR Protocol, including how to create them, use them ... - [Importing a NEAR Account](importing-account.md): If you created a NEAR account using a wallet or the CLI, you can export its seed phrase (or private key) to use it in... - [Introduction to Indexers](indexers.md): Here you will find everything you need to know in order to familiarize yourself with the concept of indexers. - [Indexing Historical Data](indexing-historical-data.md): In our frontend, we can easily display the previous bid since it's stored in the contract's state. However, we're una... - [Integration Tests](integration-test.md): Integration tests enable you to deploy a contract in the NEAR`testnet`or a local`sandbox`and create test users to... - [AI and NEAR](introduction.md): Building AI agents that control accounts and assets on all blockchains has never been easier. NEAR enables AI agents ... - [Start options](lake-start-options.md): This tutorial will guide you through creating a simple indexer using the NEAR Lake Framework that can start from a sp... - [Using Linkdrops](linkdrop.md): Wanting to use Linkdrops in your dApp? Here you will find all the information you need to get started. - [Using Liquid Staking](liquid-staking.md): Liquid staking is a modern alternative to regular staking on NEAR that solves the problem of delayed withdrawing. In ... - [Tutorial: Simple Indexer](listen-function-calls.md): In this tutorial, we will build a simple indexer using the NEAR Lake Framework. The indexer will listen for FunctionC... - [Tutorial: Creating an Indexer](listen-to-realtime-events.md): In this tutorial, we will build an indexer using the NEAR Indexer Framework. The indexer will listen realtime blocks ... - [Locking Accounts](lock.md): In NEAR, you can lock an account by removing all its [full access keys](/tools/near-cli#delete-key). This is useful t... - [Lockup Contracts](lockup.md): Looking to manage token vesting and lockup schedules? NEAR's Lockup contracts provide a robust solution for escrowing... - [Maintenance Windows](maintenance-windows.md): The RPC API enables you to query future maintenance windows for a specific validator in the current epoch. These main... - [Building a Meta Transaction Relayer](meta-transactions-relayer.md): Relayers serve to delegate gas fees to a web service, allowing users to transact on NEAR without the need to acquire ... - [Meta Transactions](meta-transactions.md): [NEP-366](https://github.com/near/NEPs/pull/366) introduced the concept of meta transactions to Near Protocol. This f... - [NEAR API](near-api.md): We offer a collection of language-specific libraries that allow developers to interact with the NEAR blockchain from ... - [NEAR CLI](near-cli.md): The NEAR [Command Line Interface](https://github.com/near/near-cli-rs) (CLI) is a tool that enables to interact with ... - [NEAR Connect Tutorial](near-connector.md): The`@hot-labs/near-connect`library provides a secure, zero-dependency wallet connector for NEAR blockchain with a u... - [NEAR Data Flow](near-data-flow.md): NEAR Protocol blockchain data flow might be a bit tricky at a glance. But it is pretty straightforward and follows we... - [Near Drop](near-drop.md): NEAR Drop is a smart contract that allows users to create token drops ($NEAR, Fungible and Non-Fungible Tokens), and ... - [What is NEAR Indexer?](near-indexer.md): As scaling dApps enter NEAR’s mainnet, an issue may arise: how do they quickly and efficiently access state from our ... - [What is Lake Framework?](near-lake-framework.md): NEAR Lake Framework is an ecosystem of library companions that read data from the`NEAR Data Lake`. The... - [NEAR Lake Indexer](near-lake.md): NEAR Lake is an indexer built on top of [NEAR Indexer Framework](https://github.com/near/nearcore/tree/master/chain/i... - [NEAR MCP Server](near-mcp.md): The NEAR MCP Server is an open-source toolkit offers a standardized way for AI applications to integrate with NEAR. I... - [Network](network.md): The RPC API enables you to query status information for nodes and validators. - [NEAR Networks](networks.md): NEAR Protocol operates on several networks, each with its own independent validators and unique state. These networks... - [Create NFT using Contract Tools](nft-contract-tools.md): In this tutorial, you will create a non-fungible token (NFT) using the [NEAR SDK Contract Tools](https://github.com/n... - [Nft Indexer](nft-indexer.md): This tutorial will guide you through building a simple NFT indexer using the JavaScript version of the [NEAR Lake Fra... - [Using NFTs](nft.md): Wanting to use Non-Fungible Tokens (NFT) in your dApp? Here you will find all the information you need to get started... - [NFT Zero to Hero JavaScript Edition](nfts-js.md): In this _Zero to Hero_ series, you'll find a set of tutorials that will cover every aspect of a non-fungible token (N... - [NFT Zero to Hero](nfts.md): In this _Zero to Hero_ series, you'll find a set of tutorials that will cover every aspect of a non-fungible token (N... - [Ensure it is the User (1yⓃ)](one-yocto.md): NEAR uses a system of [Access Keys](../../protocol/access-keys.md) to simplify handling accounts.There are basically ... - [Oracles](oracles.md): [Blockchain Oracles](https://en.wikipedia.org/wiki/Blockchain_oracle) serve as intermediaries that connect smart cont... - [Overview](overview.md): In this tutorial, you'll explore how to build a`fully verifiable AI DAO`using the Shade Agent Framework. The Verifi... - [Shade Agent Plugins](plugins.md): Docs for integrating plugins into your Shade Agent will be coming soon. - [Protocol](protocol.md): The RPC API enables you to retrieve the current genesis and protocol configuration. - [RPC Providers](providers.md): There are multiple RPC providers from which you can choose from. These providers will work as intermediaries to help ... - [Python Nft Indexer](python-nft-indexer.md): This tutorial shows how to build a fully functional NFT indexer built using the [NEAR Lake Framework for Python](/dat... - [Your First Smart Contract](quickstart.md): Welcome! [NEAR accounts](../protocol/account-model.md) can store small apps known as smart contracts. In this quick t... - [Random Numbers](random.md): When writing smart contracts in NEAR you have access to a`random seed`that enables you to create random numbers/str... - [Reducing Contract Size](reduce-size.md): In this page, we will explore strategies for reducing the size of smart contracts on NEAR. This is particularly usefu... - [Reentrancy Attacks](reentrancy.md): Between a cross-contract call and its callback **any method of your contract can be executed**. Not taking this into ... - [Reproducible Builds](reproducible-builds.md): Reproducible builds let different people build the same program and get the exact same outputs as one another. They h... - [Abstract DAO: Requests](request.md): The Abstract DAO contract works as an intermediary between decentralized organizations in NEAR and EVM networks. To b... - [Omni Bridge Roadmap](roadmap.md): Omni Bridge launches with a hybrid architecture, utilizing different verification methods based on chain-specific req... - [Running Lake Indexer](run-lake-indexer.md): At NEAR we already have a working solution to index blockchain data and store it in AWS S3 buckets called **NEAR Lake... - [Run Your Own Localnet](run.md): Now that we understand what a localnet is, let's walk through the complete workflow of running it and testing it with... - [Runtime](runtime.md): This section contains videos that explore the core Runtime, its operation, and how it implements cross-contract calls. - [Sandbox Testing](sandbox-testing.md): In the previous section, we went through the contract's code, analyzing how it worked. Now, we need to test it and ma... - [Create FT using Contract Tools](sdk-contract-tools.md): In this tutorial, we will create a fungible token (FT) using the [NEAR SDK Contract Tools](https://github.com/near/ne... - [NEAR SDK](sdk.md): The NEAR SDK is a library that allow to develop smart contracts. Currently, there exist two versions of NEAR SDK: one... - [Security Considerations](security.md): :::warning - [Serialization Protocols](serialization-protocols.md): Serialization formats within the SDK define how data structures are translated into bytes which are needed for passin... - [Notes on Serialization](serialization.md): Smart contracts need to be able to **communicate complex data** in a simple way, while also **reading and storing** s... - [Setup](setup.md): In order to use the RPC API you will need to setup the correct RPC endpoints. - [Abstract Dao: Signatures](signing.md): In the previous section, we saw how to register a signature request on the Abstract DAO contract. Now, it is time to ... - [Validator Staking](staking.md): NEAR uses a Proof-of-Stake (PoS), meaning that users chose the active node validators by delegating their tokens to t... - [The Standard](standard.md): Besides the native NEAR token, users have access to a multitude of tokens created by institutions and other users kno... - [Tutorial: State Changes](state-changes.md): This tutorial will guide you through building a simple indexer using the NEAR Lake Framework. The indexer will listen... - [Decentralized Storage Solutions](storage-solutions.md): In this article you'll find a brief overview of different decentralized storage solutions that can be integrated into... - [Storage Staking](storage-staking.md): NEAR's storage staking is a mechanism that ensures the network remains efficient and secure by requiring smart contra... - [State](storage.md): Smart contracts store data in their account's state, which is public on the chain. The storage starts **empty** until... - [Sybil Attacks](sybil.md): While developing your smart contract, keep in mind that an individual can potentially create multiple NEAR accounts. ... - [Avoiding Token Loss](token-loss.md): This document outlines the common errors that can lead to token loss and how to avoid them. - [Token Transfer flow](token-transfer-flow.md): This section explains the flow of token transfers in the NEAR Protocol, detailing how tokens are moved between accoun... - [Tokens](tokens.md): NEAR Protocol has a native token, NEAR (Ⓝ), which is used for various purposes within the ecosystem. This document pr... - [Anatomy of a Transaction](transaction-anatomy.md): This section explains the anatomy of a transaction in the NEAR Protocol, describing its structure, components, and th... - [Lifecycle of a Transaction](transaction-execution.md): `Transactions`are constructed by users to express the intent of performing actions in the network. Once in the netwo... - [Transactions](transactions.md): Users interact with NEAR by creating transactions. Specifically, users use their account's [private keys](./access-ke... - [Transfer Near tokens on behalf of a controlled account](transfer.md): In this part of the tutorial, we'll dig into how transaction arguments are built, how to request a signature accordin... - [Tutorials and Templates](tutorials-overview.md): This section provides tutorials and templates to help you build Shade Agents faster and learn key concepts. - [SDK Types](types.md): Lets discuss which types smart contracts use to input and output data, as well as how such data is stored and handled... - [Unit Testing](unit-test.md): Unit tests allow you to test the contract methods individually. They are suitable to check the storage is updated cor... - [Self Upgrade & State Migration](update-contract-migrate-state.md): Three examples on how to handle updates and [state migration](../../smart-contracts/release/upgrade.md): - [Updating the Frontend](updating-the-frontend.md): Now we've updated the contract to include an NFT as a reward and changed the contract such that it accepts bids in fu... - [Updating Contracts](upgrade.md): Learn how to update NEAR smart contracts, both through tools like NEAR CLI and programmatically. Understand the impli... - [Using NEAR documentation with your AI Coding Agents](using-llms.md): NEAR Docs hosts a [`llms.txt`](https://docs.near.org/llms.txt) file to provide information to help LLMs use the compl... - [Validators](validators.md): At its core, NEAR Protocol is a decentralized blockchain that operates on a network of independent participants calle... - [MultiSig Voting](voting.md): Now that we understand how the Abstract DAO works, it is time to use it in within an organization. Lets see how to de... - [Wallet Login](wallet-login.md): The`@hot-labs/near-connect`library provides a secure, zero-dependency wallet connector for NEAR blockchain with a u... - [Wallet Selector Tutorial](wallet-selector.md): Allowing your users to connect with their favorite wallet and interact with your dApp is a crucial step in building w... - [Web Login Methods](web-login.md): NEAR offers multiple options to allow users to login using NEAR accounts. Below are the most popular methods to - [Web3Auth Social Login Integration](web3-auth.md): This tutorial demonstrates how to integrate [Web3Auth](https://web3auth.io/) into a NEAR application, enabling users ... - [Security](welcome.md): Here you will find information on how to keep your smart contract and decentralized applications secure. - [What can you Build?](what-can-you-build.md): With their extensive list of features, Shade Agents unlock a wide range of new use cases, enable many previously cent... - [What is Chain Abstraction?](what-is.md): Through a combination of innovative technologies, NEAR enables developers to build applications that work seamlessly ... - [Winning an NFT](winning-an-nft.md): No one will enter an auction if there's nothing to win, so let's add a prize. Why not an [NFT](../../primitives/nft/n... - [Cross Contract Call](xcc.md): This example performs the simplest cross-contract call possible: it calls our [Hello NEAR](https://github.com/near-ex... - [Yield and Resume](yield-resume.md): NEAR smart contracts can **yield** execution, until an **external** service **resumes** them. In practice, the contra...