Docs Category: 2.develop

Updating Contracts

To Share and +4 nLEARNs Login with NEARimport {CodeBlock} from ‘@theme/CodeBlock’ import {CodeTabs, Language, Github} from "@site/components/codetabs" import Tabs from ‘@theme/Tabs’; import TabItem from ‘@theme/TabItem’; NEAR accounts separate their logic (contract’s code) from their state (storage), allowing the code to be changed. Contract’s can be updated in two ways: Through tools such as NEAR CLI …

Updating Contracts Read More »

Locking Accounts

To Share and +4 nLEARNs Login with NEARRemoving all full access keys from an account will effectively lock it. When an account is locked nobody can perform transactions in the account’s name (e.g. update the code or transfer money). How to Lock an Account near keys <dev-account> # result: [access_key: {“nonce”: …, “public_key”: ‘<key>’}] near …

Locking Accounts Read More »

unit-tests

To Share and +4 nLEARNs Login with NEARUnit Tests Testing contract functionality can be done through the cargo test framework. These tests will run with a mocked blockchain and will allow testing function calls directly without having to set up/deploy to a network and sign serialized transactions on this network. A common framework for tests, …

unit-tests Read More »

integration-tests

To Share and +4 nLEARNs Login with NEARIntegration Tests Note: Simulation tests are no longer actively supported. NEAR Simulator was meant to be an in-place replacement of a blockchain environment for the purpose of testing NEAR contracts. However, simulating NEAR ledger turned out to be a much more complex endeavor than was anticipated. Eventually, the …

integration-tests Read More »

Upgrading and Locking

To Share and +4 nLEARNs Login with NEARAfter deploying your contract you might realize that you need to maintain it, either to fix a bug or add new functionality. Let us here guide you on how to deploy, update and finally lock your smart contract, so its code cannot change anymore. Upgrading a Contract If …

Upgrading and Locking Read More »

via-dao-vote

To Share and +4 nLEARNs Login with NEARDAO-Governed Updates When you first deploy a contract to mainnet, you will likely keep control of a Full Access key for the contract. This puts the contract in "trusted" mode, in which you and other maintainers can change it at-will (which means your users need to trust you …

via-dao-vote Read More »

Scroll to Top