Archives: Docs

Docs

Factory

Login with NEARA factory is a smart contract that stores a compiled contract on itself, and automatizes deploying it into sub-accounts. We have two factory examples: Token Factory: A factory that creates fungible tokens contracts. A Generic Factory: A factory that creates donation contracts, but allows to change the contract it deploys. info In this …

Factory Read More »

Frontend Interacting with Multiple Contracts

Login with NEARThis example showcases how to interact with multiple contracts from a single frontend. Particularly, this example shows how to: Query data from multiple contracts. Call methods in multiple contracts simultaneously. Query Data from Multiple Contracts To query multiple contracts simply perform multiple view calls: Dispatching Multiple Transactions The wallet object enables to dispatch …

Frontend Interacting with Multiple Contracts Read More »

Count on NEAR

Login with NEAROur counter example is a friendly decentralized app that stores a number and exposes methods to increment, decrement, and reset it. Obtaining the Counter Example You have two options to start the Counter Example. You can use the app through GitHub Codespaces, which will open a web-based interactive environment. Clone the repository locally …

Count on NEAR Read More »

Donation

Login with NEAROur donation example enables to forward NEAR Tokens to an account while keeping track of it. It is one of the simplest examples on making a contract handle tranfers. Frontend of the Donation App Obtaining the Donation Example You have two options to start the Donation Example. You can use the app through …

Donation Read More »

Complex Cross Contract Call

Login with NEARThis example presents 3 instances of complex cross-contract calls. Particularly, it shows: How to batch multiple function calls to a same contract. How to call multiple contracts in parallel, each returning a different type. Different ways of handling the responses in the callback. info Simple Cross-Contract Calls Check the tutorial on how to …

Complex Cross Contract Call Read More »

Coin Flip

Login with NEARCoin Flip is a game where the player tries to guess the outcome of a coin flip. It is one of the simplest contracts implementing random numbers. Starting the Game You have two options to start the example: Recommended: use the app through Gitpod (a web-based interactive environment) Clone the project locally. Gitpod …

Coin Flip Read More »

Using base64-encoded arguments when we create a new crossword puzzle

Login with NEARFinal modifications Let’s modify our new_puzzle method a bit, and demonstrate how a smart contract author might use base64-encoded arguments. In the previous chapter we had a fairly long NEAR CLI command that called the new_puzzle, providing it the parameters for all the clues. Having these lengthy parameters on the CLI might get …

Using base64-encoded arguments when we create a new crossword puzzle Read More »

Scroll to Top