Skip to content

Commit

Permalink
Merge branch 'master' into feat/add_community_templates
Browse files Browse the repository at this point in the history
  • Loading branch information
bucanero authored Feb 17, 2025
2 parents f3df5a6 + 86608f1 commit fc1d3e1
Show file tree
Hide file tree
Showing 284 changed files with 8,759 additions and 7,313 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/build-check.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
name: build-check

on:
workflow_dispatch:
pull_request:
types: [opened, reopened, synchronize]
branches:
- master
on: [push, pull_request]

jobs:
build-check:
Expand Down
2 changes: 1 addition & 1 deletion docs/1.concepts/storage/storage-staking.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ On each incoming transaction that adds data.

Let's walk through an example:

1. You launch [a guest book app](https://examples.near.org/guest-book), deploying your app's smart contract to the account `example.near`
1. You launch [a guest book app](../../3.tutorials/examples/guest-book.md), deploying your app's smart contract to the account `example.near`
2. Visitors to your app can add messages to the guest book. This means your users will, [by default](/concepts/protocol/gas#understanding-gas-fees), pay a small gas fee to send their message to your contract.
3. When such a call comes in, NEAR will check that `example.near` has a large enough balance that it can stake an amount to cover the new storage needs. If it does not, the transaction will fail.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ There are five steps to create a Chain Signature:
1. [Deriving the Foreign Address](#1-deriving-the-foreign-address) - Construct the address that will be controlled on the target blockchain
2. [Creating a Transaction](#2-creating-the-transaction) - Create the transaction or message to be signed
3. [Requesting a Signature](#3-requesting-the-signature) - Call the NEAR `v1.signer` contract requesting it to sign the transaction
4. [Formatting the Signature](#4-reconstructing-the-signature) - Reconstruct the signature from the MPC service's response
4. [Formatting the Signature](#4-formatting-the-signature) - Reconstruct the signature from the MPC service's response
5. [Relaying the Signed Transaction](#5-relaying-the-signature) - Send the signed transaction to the destination chain for execution

![chain-signatures](/docs/assets/welcome-pages/chain-signatures-overview.png)
Expand Down
40 changes: 23 additions & 17 deletions docs/2.build/1.chain-abstraction/what-is.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ With chain abstraction, both you and your users just focus on the core experienc

NEAR's chain abstraction framework consists of three core technologies that work together to create seamless cross-chain experiences:

1. [**Intent / Solver Layer**](#intent--solver-layer): A decentralized system where users express desired outcomes (like "swap Token A for Token B at the best price") without specifying technical details. A network of solvers then competes to fulfill these intents optimally, handling complex cross-chain operations behind the scenes.
1. [**NEAR Intents**](#NEAR-Intents): A decentralized system where users express desired outcomes (like "swap Token A for Token B at the best price") without specifying technical details. A network of solvers then competes to fulfill these intents optimally, handling complex cross-chain operations behind the scenes.

2. [**Chain Signatures**](#chain-signatures): Enables NEAR accounts, including smart contracts, to sign and execute transactions on other blockchains (like Bitcoin or Ethereum), allowing cross-chain interactions.

3. [**OmniBridge**](#omnibridge): A trustless multi-chain asset bridge that combines Chain Signatures for cross-chain transaction execution with a verification layer allowing NEAR smart contracts to confirm transactions on foreign chains. This creates a fully trustless system where NEAR can both initiate and verify cross-chain operations.
3. [**OmniBridge**](#omnibridge): A multi-chain asset bridge that combines Chain Signatures with chain-specific verification methods for secure and efficient cross-chain transfers. Using a hybrid approach of MPC-based signatures and light clients, it significantly reduces verification times from hours to minutes while lowering gas costs across supported chains. The bridge serves as both a token factory and custodian, managing native and bridged tokens through a unified interface.

### Intent / Solver Layer
### NEAR Intents

The Intent / Solver Layer (aka [NEAR Intents](https://pages.near.org/blog/introducing-near-intents/)) is a new type of transaction that allows information, requests, assets, and actions to be exchanged between users, services, and AI agents.
[NEAR Intents](../../chain-abstraction/intents/overview.md) are a new transaction type that allows information, requests, assets, and actions to be exchanged between users, services, and AI agents.

This represents a paradigm shift in how users and AI agents interact with blockchain networks. Instead of directly executing complex transactions across multiple chains, users simply declare what they want to achieve, and the network determines how to make it happen.

Expand Down Expand Up @@ -109,21 +109,27 @@ To learn more about Chain Signatures, the concepts, and how to implement it, che

### OmniBridge

The [OmniBridge](https://github.com/Near-One/omni-bridge) extends NEAR's chain abstraction capabilities by combining two key elements: Chain Signatures for cross-chain transaction execution, and a verification layer that allows NEAR smart contracts to confirm the state and transactions on foreign chains. This creates a trustless bridge where NEAR contracts can both initiate and verify cross-chain operations.
The [OmniBridge](../../chain-abstraction/omnibridge/overview.md) is a multi-chain asset bridge that combines Chain Signatures with chain-specific verification methods to enable secure and efficient cross-chain asset transfers. It consists of three core components:

1. **Chain Signatures Integration**:
- NEAR smart contracts can generate derivation addresses on other blockchains
- These contracts can directly sign and execute transactions on external chains
- Enables NEAR smart contracts to generate and control accounts on other blockchains
- Allows direct signing and execution of transactions on external chains
- Provides secure message signing through MPC network

2. **State Verification Layer (Omniprover)**:
- Allows NEAR smart contracts to verify the state and transactions on foreign chains
- Supports different verification methods based on the target chain (e.g., light client proofs)
- Ensures trustless verification of incoming transfers and state changes from external chains
- For example, when receiving assets from Ethereum, NEAR contracts can verify the deposit actually occurred
2. **Verification Layer**:
- Hybrid verification approach combining MPC signatures and light clients
- Chain-specific verification methods based on target chain requirements
- Significantly reduces verification times from hours to minutes
- Lowers gas costs across all supported chains

3. **Decentralized Relayer Network**:
- Open participation model for relayers
- Trustless and incentivized system
- Ensures efficient transaction processing and state updates across chains
3. **Bridge Token Factory**:
- Unified contract serving as both token factory and custodian
- Manages both native and bridged tokens through NEP-141 standard
- Handles token locking, minting, and burning operations
- Supports permissionless relayer network for efficient processing

This architecture creates a fully trustless bridge by combining NEAR's ability to execute transactions on foreign chains (via Chain Signatures) with the capability to independently verify the results of those transactions (via Omniprover).
This architecture creates a robust bridge system that combines NEAR's ability to execute transactions on foreign chains with secure verification methods, while maintaining high efficiency and security through MPC threshold guarantees.

:::info
For detailed implementation information and current status, see the [OmniBridge documentation](../../chain-abstraction/omnibridge/overview.md).
:::
2 changes: 1 addition & 1 deletion docs/2.build/2.smart-contracts/security/storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ On NEAR, your contract pays for the storage it uses. This means that the more da

Let's walk through an example:

1. You launch [a guest book app](https://examples.near.org/guest-book-js), deploying your app's smart contract to the account `example.near`
1. You launch [a guest book app](../../../3.tutorials/examples/guest-book.md), deploying your app's smart contract to the account `example.near`
2. Visitors to your app can add messages to the guest book. This means your users will pay a small gas fee to **store** their message to your contract.
3. When a new message comes in, NEAR will check if `example.near` has enough balance to cover the new storage needs. If it does not, the transaction will fail.

Expand Down
44 changes: 22 additions & 22 deletions docs/2.build/5.primitives/dao.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,27 @@ import {FeatureList, Column, Feature} from "@site/src/components/featurelist"
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

import BOSGetDAOList from "./dao/bos/get-dao-list.md"
import BOSGetProposalList from "./dao/bos/get-proposal-list.md"
import BOSCreateDAO from "./dao/bos/create-dao.md"
import BOSCreateProposal from "./dao/bos/create-proposal.md"
import BOSVoteForProposal from "./dao/bos/vote-for-proposal.md"

import WebAppGetDAOList from "./dao/web-app/get-dao-list.md"
import WebAppGetProposalList from "./dao/web-app/get-proposal-list.md"
import WebAppCreateDAO from "./dao/web-app/create-dao.md"
import WebAppCreateProposal from "./dao/web-app/create-proposal.md"
import WebAppVoteForProposal from "./dao/web-app/vote-for-proposal.md"

import CLIGetDAOList from "./dao/near-cli/get-dao-list.md"
import CLIGetProposalList from "./dao/near-cli/get-proposal-list.md"
import CLICreateDAO from "./dao/near-cli/create-dao.md"
import CLICreateProposal from "./dao/near-cli/create-proposal.md"
import CLIVoteForProposal from "./dao/near-cli/vote-for-proposal.md"

import SmartContractCreateDAO from "./dao/smart-contract/create-dao.md"
import SmartContractCreateProposal from "./dao/smart-contract/create-proposal.md"
import SmartContractVoteForProposal from "./dao/smart-contract/vote-for-proposal.md"
import BOSGetDAOList from "@site/src/components/docs/primitives/dao/bos/get-dao-list.md"
import BOSGetProposalList from "@site/src/components/docs/primitives/dao/bos/get-proposal-list.md"
import BOSCreateDAO from "@site/src/components/docs/primitives/dao/bos/create-dao.md"
import BOSCreateProposal from "@site/src/components/docs/primitives/dao/bos/create-proposal.md"
import BOSVoteForProposal from "@site/src/components/docs/primitives/dao/bos/vote-for-proposal.md"

import WebAppGetDAOList from "@site/src/components/docs/primitives/dao/web-app/get-dao-list.md"
import WebAppGetProposalList from "@site/src/components/docs/primitives/dao/web-app/get-proposal-list.md"
import WebAppCreateDAO from "@site/src/components/docs/primitives/dao/web-app/create-dao.md"
import WebAppCreateProposal from "@site/src/components/docs/primitives/dao/web-app/create-proposal.md"
import WebAppVoteForProposal from "@site/src/components/docs/primitives/dao/web-app/vote-for-proposal.md"

import CLIGetDAOList from "@site/src/components/docs/primitives/dao/near-cli/get-dao-list.md"
import CLIGetProposalList from "@site/src/components/docs/primitives/dao/near-cli/get-proposal-list.md"
import CLICreateDAO from "@site/src/components/docs/primitives/dao/near-cli/create-dao.md"
import CLICreateProposal from "@site/src/components/docs/primitives/dao/near-cli/create-proposal.md"
import CLIVoteForProposal from "@site/src/components/docs/primitives/dao/near-cli/vote-for-proposal.md"

import SmartContractCreateDAO from "@site/src/components/docs/primitives/dao/smart-contract/create-dao.md"
import SmartContractCreateProposal from "@site/src/components/docs/primitives/dao/smart-contract/create-proposal.md"
import SmartContractVoteForProposal from "@site/src/components/docs/primitives/dao/smart-contract/vote-for-proposal.md"

Decentralized Autonomous Organizations (DAOs) are self-organized groups that form around common purposes. Membership, decision making, and funding are coordinated by publicly voting on proposals through a smart contract.

Expand Down Expand Up @@ -65,7 +65,7 @@ You can also create a DAO by interacting with the `sputnik-dao` contract.
<hr className="subsection" />

### Voting policy
Currently, DAOs support two different types of [voting policies](https://github.com/near-daos/sputnik-dao-contract#voting-policy): `TokenWeight`, and `RoleWeight`.
Currently, DAOs support two different types of [voting policies](https://github.com/near-daos/sputnik-dao-contract#voting-policy): `TokenWeight`, and `RoleWeight`.

When the vote policy is `TokenWeight`, the council votes using [tokens](ft.md). The weigh of a vote is the proportion of tokens used for voting over the token's total supply.

Expand Down
34 changes: 17 additions & 17 deletions docs/2.build/5.primitives/dex.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@ import {FeatureList, Column, Feature} from "@site/src/components/featurelist"
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

import BOSGetPrice from "./dex/bos/get-price.md"
import BOSSwap from "./dex/bos/swap.md"
import BOSGetPools from "./dex/bos/get-pools.md"
import BOSGetDepositBalances from "./dex/bos/get-deposit-balances.md"

import WebAppGetPrice from "./dex/web-app/get-price.md"
import WebAppSwap from "./dex/web-app/swap.md"
import WebAppGetPools from "./dex/web-app/get-pools.md"
import WebAppGetDepositBalances from "./dex/web-app/get-deposit-balances.md"

import CLISwap from "./dex/near-cli/swap.md"
import CLIGetPools from "./dex/near-cli/get-pools.md"
import CLIGetDepositBalances from "./dex/near-cli/get-deposit-balances.md"

import SmartContractSwap from "./dex/smart-contract/swap.md"
import SmartContractGetPools from "./dex/smart-contract/get-pools.md"
import SmartContractGetDepositBalances from "./dex/smart-contract/get-deposit-balances.md"
import BOSGetPrice from "@site/src/components/docs/primitives/dex/bos/get-price.md"
import BOSSwap from "@site/src/components/docs/primitives/dex/bos/swap.md"
import BOSGetPools from "@site/src/components/docs/primitives/dex/bos/get-pools.md"
import BOSGetDepositBalances from "@site/src/components/docs/primitives/dex/bos/get-deposit-balances.md"

import WebAppGetPrice from "@site/src/components/docs/primitives/dex/web-app/get-price.md"
import WebAppSwap from "@site/src/components/docs/primitives/dex/web-app/swap.md"
import WebAppGetPools from "@site/src/components/docs/primitives/dex/web-app/get-pools.md"
import WebAppGetDepositBalances from "@site/src/components/docs/primitives/dex/web-app/get-deposit-balances.md"

import CLISwap from "@site/src/components/docs/primitives/dex/near-cli/swap.md"
import CLIGetPools from "@site/src/components/docs/primitives/dex/near-cli/get-pools.md"
import CLIGetDepositBalances from "@site/src/components/docs/primitives/dex/near-cli/get-deposit-balances.md"

import SmartContractSwap from "@site/src/components/docs/primitives/dex/smart-contract/swap.md"
import SmartContractGetPools from "@site/src/components/docs/primitives/dex/smart-contract/get-pools.md"
import SmartContractGetDepositBalances from "@site/src/components/docs/primitives/dex/smart-contract/get-deposit-balances.md"

A Decentralized Exchange (DEX) is an application that allows users to trade tokens (native & fungible tokens) through smart contracts.

Expand Down
46 changes: 23 additions & 23 deletions docs/2.build/5.primitives/ft.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,29 @@ import {FeatureList, Column, Feature} from "@site/src/components/featurelist"
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

import BOSGetMetadata from "./ft/bos/get-metadata.md"
import BOSCheckBalance from "./ft/bos/check-balance.md"
import BOSSendToken from "./ft/bos/send.md"
import BOSRegister from "./ft/bos/register.md"
import BOSAttachTokenToCall from "./ft/bos/attach-to-call.md"
import BOSCreateToken from "./ft/bos/create.md"

import WebAppGetMetadata from "./ft/web-app/get-metadata.md"
import WebAppCheckBalance from "./ft/web-app/check-balance.md"
import WebAppSendToken from "./ft/web-app/send.md"
import WebAppRegister from "./ft/web-app/register.md"
import WebAppAttachTokenToCall from "./ft/web-app/attach-to-call.md"
import WebAppCreateToken from "./ft/web-app/create.md"

import CLIGetMetadata from "./ft/near-cli/get-metadata.md"
import CLICheckBalance from "./ft/near-cli/check-balance.md"
import CLISendToken from "./ft/near-cli/send.md"
import CLIRegister from "./ft/near-cli/register.md"
import CLIAttachTokenToCall from "./ft/near-cli/attach-to-call.md"
import CLICreateToken from "./ft/near-cli/create.md"

import SmartContractSendToken from "./ft/smart-contract/send.md"
import SmartContractAttachTokenToCall from "./ft/smart-contract/attach-to-call.md"
import BOSGetMetadata from "@site/src/components/docs/primitives/ft/bos/get-metadata.md"
import BOSCheckBalance from "@site/src/components/docs/primitives/ft/bos/check-balance.md"
import BOSSendToken from "@site/src/components/docs/primitives/ft/bos/send.md"
import BOSRegister from "@site/src/components/docs/primitives/ft/bos/register.md"
import BOSAttachTokenToCall from "@site/src/components/docs/primitives/ft/bos/attach-to-call.md"
import BOSCreateToken from "@site/src/components/docs/primitives/ft/bos/create.md"

import WebAppGetMetadata from "@site/src/components/docs/primitives/ft/web-app/get-metadata.md"
import WebAppCheckBalance from "@site/src/components/docs/primitives/ft/web-app/check-balance.md"
import WebAppSendToken from "@site/src/components/docs/primitives/ft/web-app/send.md"
import WebAppRegister from "@site/src/components/docs/primitives/ft/web-app/register.md"
import WebAppAttachTokenToCall from "@site/src/components/docs/primitives/ft/web-app/attach-to-call.md"
import WebAppCreateToken from "@site/src/components/docs/primitives/ft/web-app/create.md"

import CLIGetMetadata from "@site/src/components/docs/primitives/ft/near-cli/get-metadata.md"
import CLICheckBalance from "@site/src/components/docs/primitives/ft/near-cli/check-balance.md"
import CLISendToken from "@site/src/components/docs/primitives/ft/near-cli/send.md"
import CLIRegister from "@site/src/components/docs/primitives/ft/near-cli/register.md"
import CLIAttachTokenToCall from "@site/src/components/docs/primitives/ft/near-cli/attach-to-call.md"
import CLICreateToken from "@site/src/components/docs/primitives/ft/near-cli/create.md"

import SmartContractSendToken from "@site/src/components/docs/primitives/ft/smart-contract/send.md"
import SmartContractAttachTokenToCall from "@site/src/components/docs/primitives/ft/smart-contract/attach-to-call.md"

Besides the native NEAR token, NEAR accounts have access to a [multitude of tokens](https://guide.ref.finance/developers-1/cli-trading#query-whitelisted-tokens) to use throughout the ecosystem. Moreover, it is even possible for users to create their own fungible tokens.

Expand Down
Loading

0 comments on commit fc1d3e1

Please sign in to comment.