jcarbonnell/preTrainingNEAR huggingface dataset:
# RuntimeFeesConfig

Economic parameters for runtime

## action_receipt_creation_config

_type: Fee_

Describes the cost of creating an action receipt, `ActionReceipt`, excluding the actual cost
of actions.

## data_receipt_creation_config

_type: [DataReceiptCreationConfig](RuntimeFeeConfig/DataReceiptCreationConfig.md)_

Describes the cost of creating a data receipt, `DataReceipt`.

## action_creation_config

_type: [ActionCreationConfig](RuntimeFeeConfig/ActionCreationConfig.md)_

Describes the cost of creating a certain action, `Action`. Includes all variants.

## storage_usage_config

_type: [StorageUsageConfig](RuntimeFeeConfig/StorageUsageConfig.md)_

Describes fees for storage rent

## burnt_gas_reward
_type: [Fraction](RuntimeFeeConfig/Fraction.md)_

Fraction of the burnt gas to reward to the contract account for execution.
deadmau5 Launches NFT Partnership with Mintbase and NEAR
COMMUNITY
December 3, 2021
deadmau5, the DJ and Producer has teamed up with rockband Portugal. the Man, Mintbase, and NEAR to release a single as an NFT.

The song, titled “this is fine” is being sold as a collection of one million NFTs exclusively on the Mintbase NFT marketplace, which runs on the carbon neutral NEAR blockchain, with tokens now on sale.

By releasing the song as an NFT, deadmau5 and Portugal. the Man could be the first artists to reach platinum status — selling one million copies in the US — with an NFT single release.

The announcement took place in Miami during the Art Basel art fair, an annual event which draws thousands of tastemakers from the art-world, entertainment, fashion and tech.


Half of the NFTs (500,000) are being sold on Mintbase for 0.25 $NEAR per piece, which is $2.19 at the time of writing. The remaining half million will be sold as additional awards with groundbreaking benefits. The ‘Ultimate Bundle’ includes 50,000 NFTs, artwork, a limited edition NFT, a merchandise pack and a highly-prized spot on the guest-list for a forthcoming deadmau5 show.

The lucky fan who collects a pack of 1,000 NFTs will receive a unique, alternate color single cover art for ‘this is fine’, that was created via a generative algorithm.

“NFTs aren’t really that complicated. What we are doing here is giving our millions of fans and people interested in NFT’s an easy way to get on board for an extremely reasonable price. The song is cool too,” said deadmau5.

The single release kicked off with one deadmau5-wrapped bus and two NEAR-wrapped buses circling Miami for a month, inviting art week visitors and locals alike to buy the track using the QR code on its side. The buses will then go ‘on tour’ in New York and San Francisco in December and January to reach music fans and the tech curious on both coasts.

For most people, buying NFTs has been a complex experience, involving additional fees, delays and multiple wallets. With NEAR and Mintbase, users will be able to buy NFTs using fiat cash instantly, with super low fees, thanks to an integration with payment rail provider, Stripe.

The announcement forms part of a wider series NEAR has launched to help people get to grips with Web3 technology around the world.

NEAR is on a mission to make blockchain and crypto a simpler experience that anyone can take part in. From buying NFTs, creating a DAO or joining a Guild, at NEAR it’s a simple as clicking a mouse. Find out how.
:::info
Remember about fungible token precision. You may need this value to show a response of balance requests in an understandable-to-user way in your app. How to get precision value (decimals) you may find [above](#get-token-metadata).
:::

```js
const tokenContract = "token.v2.ref-finance.near";
const userTokenBalance = Near.view(tokenContract, "ft_balance_of", {
  account_id: "bob.near",
});
```

<details>
<summary>Example response</summary>
<p>

```json
"3479615037675962643842"
```

</p>

</details>
# AccessKeyCreationConfig

Describes the cost of creating an access key.

## full_access_cost

_type: Fee_
Base cost of creating a full access access-key.

## function_call_cost

_type: Fee_
Base cost of creating an access-key restricted to specific functions.

## function_call_cost_per_byte

_type: Fee_
Cost per byte of method_names of creating a restricted access-key.
---
sidebar_label: "Credentials"
---

# Credentials

:::info DevConsole

Please, keep in mind, currently using the AWS Credentials is the only way to access the data provided by [NEAR Lake](/tools/realtime#near-lake-indexer) ecosystem. But it is about to change with Pagoda DevConsole release. Stay tuned!

:::

To access the data provided by [NEAR Lake](/tools/realtime#near-lake-indexer) you need to provide valid AWS credentials in order to be charged by the AWS for the S3 usage.

### AWS S3 Credentials

To be able to get objects from the AWS S3 bucket you need to provide the AWS credentials.

AWS default profile configuration with aws configure looks similar to the following:

```
~/.aws/credentials
```

```
[default]
aws_access_key_id=AKIAIOSFODNN7EXAMPLE
aws_secret_access_key=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
```

[AWS docs: Configuration and credential file settings](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html)

#### Environment varibales

Alternatively, you can provide your AWS credentials via environment variables with constant names:

```
$ export AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE
$ AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
$ AWS_DEFAULT_REGION=eu-central-1
```
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

<Tabs className="file-tabs">

<TabItem value="Keypom API" label="Keypom API">

```js
const dropsNumber = "2";
const keysGeneratorUrl = "https://keypom.sctuts.com/keypair/";
const rootEntrophy = "my-password"; //If not provided, the keypair will be completely random. see: https://docs.keypom.xyz/docs/next/keypom-sdk/Core/modules 
asyncFetch(keysGeneratorUrl + dropsNumber + "/" + rootEntrophy).then((res) => {
  const keyPairs = JSON.parse(res.body);
  const pubKeys = [];
  const privKeys = [];

  keyPairs.forEach((e) => {
    pubKeys.push(e.pub);
    privKeys.push(e.priv);
  });

  const obj = {
    publicKeys: pubKeys,
    privKeys: privKeys,
  };

  State.update(obj);
});
```

</TabItem>

</Tabs>
---
id: introduction
title: Chain Abstraction
sidebar_label: Introduction
---

Do you know how your favorite apps are built and which database they use?. Chances are not, since we choose apps based on their functionality, and not their underlying tech.

We believe that **same should be true for blockchain apps**, users should be able to enjoy an application, without the underlying tech hampering their experience. The user experience should be so good, that they don't realize they're using a blockchain.

![img](/docs/assets/welcome-pages/chain-abstraction-landing.png)

To help make this a reality, NEAR provides a set of services that allow to **abstract away** the blockchain from the user experience. This means that users can use blockchain-based application - both in NEAR and **other chains** - without needing to understand the technical details.

---

## Abstraction services

Through a combination of multiple technologies, NEAR allows to create a seamless flow, in which users can use their email to create an account, use such account without acquiring funds, and even control accounts across multiple chains.

This is achieved through a combination of multiple services:

- **Relayers**: A service that allows developers to subsidize gas fees for their users.
- **FastAuth**: A service that allows users to create and recover accounts using their email address through multi-party computation (MPC).
- **Multi-chain signatures**: A service that allows users to use their NEAR account to sign transactions in other chains.

---

## A holistic view

The combination of these services allows to create a **seamless** user experience, in which users can use blockchain-based applications without realizing they are using a blockchain.

Users will simply login with an email, and a **zero-fund** account will be created for them. No seed phrases to remember, no private keys to safe keep, and no need to acquire funds.

Once having their account, apps can ask the user to create meta-transactions and send them to any relayer. The relayer will pass the transaction to the network, attaching NEAR to pay for the execution fees. The transaction will then be executed as if the user had sent it, since the relayer is only there to attach NEAR to the submission.   

If the user wants to interact with other blockchain, they can use their account to interact with a multi-chain signature relayer, which will relay the transaction to the right network, covering GAS fees.

As an example, this would allow users to collect NFTs across different chains, without ever needing to explicitly create an account or acquire crypto. All with just a single email login.
NEAR Foundation Launches NEAR DA to Offer Secure, Cost-Effective Data Availability for ETH Rollups and Ethereum Developers
NEAR FOUNDATION
November 8, 2023
NEAR Foundation just announced the rollout of the NEAR Data Availability (NEAR DA) layer. Part of the NEAR Open Web Stack, NEAR DA is a groundbreaking innovation that offers robust, cost-efficient data availability for ETH rollups and Ethereum developers.

NEAR DA is set to launch with a number of first users, including Madara by StarkNet, Caldera, Fluent, Vistara, Dymension RollApps, and Movement Labs. 

Let’s take a brief look at NEAR DA to explore why it’s such an exciting and significant development for NEAR, Ethereum, and the larger effort to build a truly open web. 

NEAR DA — paving the way for modular blockchain development
With NEAR DA, ETH rollups and Ethereum developers get cost-effective, reliable data availability. 100kB of calldata on NEAR will cost $0.0033 as of September 2023, while the same calldata on Ethereum L1 will run users  $26.22. That’s 8,000 times cheaper! 

NEAR DA will help developers reduce costs and enhance the reliability of their rollups, while keeping the security of Ethereum. High quality projects launching an app-chain or L2 will also be able to get NEAR DA support. 

Illia Polosukhin, co-founder of NEAR Protocol, and newly announced CEO of NEAR Foundation said: “Offering a data availability layer to Ethereum rollups highlights the versatility of NEAR’s tech while also helping founders from across Web3 deliver great products that bring us closer to mainstream adoption of the Open Web.”

“NEAR’s L1 has been live with 100% uptime for more than three years, so it can offer true reliability to projects looking for secure DA while also being cost-effective,” Polosukhin added. “NEAR provides great solutions to developers no matter which stack they’re building on and now that includes the Ethereum modular blockchain landscape.”

Expanding NEAR’s Open Web Stack 
By opening up its blockchain for data availability, NEAR Protocol is expanding its offerings to deliver a modular blockchain development framework. This will let Web3 developers and founders continue building on Ethereum while leveraging NEAR’s state-of-the-art tech for one part of the stack, depending on their requirements. 

NEAR DA expands the capabilities of NEAR’s Open Web Stack, a common entry point where developers and users alike can easily build, browse, and discover Web3 products and platforms. This includes FastAuth onboarding to an account in seconds with zero crypto or seed phrases required, as well as the ability to create decentralized frontends from a library of thousands of components. 

Developers and founders building on Ethereum rollups interested in using NEAR DA can visit near.org/data-availability to get started.
Astro Launches on NEAR To Supercharge DAO Communities
COMMUNITY
October 11, 2021
Astro, the platform for online communities to gather, vote, and govern has launched on NEAR. Astro is the next evolution of SputnikDAO, the hub for decentralized autonomous organizations (DAOs) operating on NEAR with a host of new features, more flexibility, and a friendly UI.   

If you’re a community looking to create, collaborate, and govern, Astro is the tool for you. 

What is Astro? 
Astro is a platform for On Chain Communities (OCC). OCC are groups of people that prove their membership and coordinate decisions through a series of smart contracts. Each vote is verified by the blockchain, and funds are distributed based on voting decisions.

With Astro, DAOs will be able to retain more autonomy and, importantly, cast the net further in regards to governance through increased flexibility and the introduction of governance tokens.

Curious to know more about Astro? We’re hosting an AMA on October 12, 2021 at 7 am PST / 10 am EST / 4pm CEST.  Register for the AMA and submit your questions to the Astro team. Find out more about it here.

What is a DAO?
A DAO is a business structure where control is spread out, across the team members instead of being centered around one authority figure. Think of a DAO as being a machine with one purpose, to carry out a set of instructions determined by pre-written smart contracts.

A community can adapt a DAO and program it according to its own goals. So the code can be used to create a set of rules, or a governance structure by which the community agrees to abide by. Tokens are used to help people vote on topics such as fund allocation.

The more a member contributes to a community, the more his/her/their vote can be increased. 

Why start a DAO?
Think of DAOs as a toolbox that allows anyone to create a business structure that is designed to be simple and flexible. As a result, DAOs come in all shapes and sizes. From flat to hierarchical, from open to anyone to members-only; you get to decide how you want to govern your community.

For example: 

Grants Giving  – Vote and collectively decide what people and projects to fund.
For businesses – Keep track of owners’ equity and elect managers to make day-to-day decisions. 
For investors – Pool funds and vote on strategy and transactions.
For clubs of any kind – Elect leaders and decide where to spend group funds.
Astro makes DAOs simple.
DAOs are quick to set up, global, customisable and transparent. Astro can help you create your own DAO in minutes.
---
id: contribute-faq
title: Contributor FAQ
sidebar_label: Contributor FAQ
sidebar_position: 6
---

### How can I get involved? {#how-can-i-get-involved}
It depends what you are excited about doing! Do you want to develop on NEAR? Build tutorials? Answer questions? Expand our documentation? 

We recommend you to have a look at our [NEAR Community Page](https://near.org/ecosystem/community). If you are looking for something a little different, or you have questions, please reach out to the team on [Discord](http://near.chat/).

### How do I report a security vulnerability? {#how-do-i-report-a-security-vulnerability}
The most up-to-date information about security vulnerability reporting is provided [in the core repo](https://github.com/near/nearcore/blob/master/SECURITY.md).

### Does NEAR have a bug bounty program available? {#does-near-have-a-bug-bounty-program-available}
While we currently do not have a bug bounty program, you can contribute to our development of resources through the [NEAR Community](https://near.org/ecosystem/community). Additionally, we have hosted several hackathons; for future events sign-up to our newsletter and follow us on Discord.

### Are articles (not NEAR specific) allowed to be shared on Discord or Telegram? {#are-articles-not-near-specific-allowed-to-be-shared-on-discord-or-telegram}
Links to educational content are allowed to be shared in the channels. If you are uncertain, please message an admin or somebody from the Team first; either on Telegram or [Discord](http://near.chat/).

### How are you building your community? {#how-are-you-building-your-community}
We are actively working on expanding our community. If you have any suggestions, or you want to help out, please get in touch on [Discord](http://near.chat/). For long-term engagement, please have a look at our Contributor Program. If you want to build on NEAR, please check out our [contribution guidelines](https://github.com/near/nearcore/blob/master/CONTRIBUTING.md).

:::note Got a question?
**[Ask it on StackOverflow!](https://stackoverflow.com/questions/tagged/nearprotocol)**
:::
---
sidebar_position: 2
---

# Styling (CSS)

## CSS Modules

You can currently style BWE components with CSS modules. Each component has an associated CSS file which is saved on-chain alongside component source code.

In the sandbox, a CSS module is created automatically for every component.

Two syntaxes are supported for CSS modules imports. In the component `Foo.tsx`, you can use either of the following:
```tsx
import s from './Foo.module.css';
```

```tsx
import s from './styles.module.css';
```

:::warning
Although the second example above is what you will find in our starter code, we recommend using the pattern from the first example since it may be the only version that is allowed once local code editor support is implemented.
:::

### Features

#### CSS Nesting

CSS Nesting is supported. Here is an example of using it to style child elements and pseudo-classes:

```css
.entry {
  padding: 1rem;

  > input {
    width: 20rem;
  }

  > button {
    background-color: #33b074;

    &:hover {
      background-color: #2f7c57;
    }
    
    &:active {
      background-color: #174933;
    }
  }
}
```

### Learn from Our Examples

From the sandbox, use the search icon in left sidebar to pull up `webengine.near` components like `webengine.near/SocialFeedPage`

## CSS-in-JS

We have CSS-in-JS support [on our roadmap](https://github.com/near/bos-web-engine/issues/7), but it is not yet available.
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

<Tabs className="file-tabs">

<TabItem value="Near CLI" label="Near CLI">

```bash
# This command creates a key pair locally in .near-credentials with an implicit account as the accountId (hash representation of the public key)

near generate-key
```

**Example response:**

```bash
Key pair with ed25519:33Vn9VtNEtWQPPd1f4jf5HzJ5weLcvGHU8oz7o5UnPqy public key for an account "1e5b1346bdb4fc5ccd465f6757a9082a84bcacfd396e7d80b0c726252fe8b3e8"
```

</TabItem>

<TabItem value="Keypom API" label="Keypom API">

```bash
export NUMBER_OF_DROPS=2

curl https://keypom.sctuts.com/keypair/$NUMBER_OF_DROPS/rootEntrophy
```

</TabItem>

</Tabs>
---
sidebar_position: 2
---

# Integration Tests

We place integration tests in JS in a separate directory at the same level as `/src`, called `/integration-tests` ([read more](https://doc.rust-lang.org/cargo/reference/cargo-targets.html#integration-tests)), placing this folder within a `/tests` folder at root-level that contains the unit tests folder would also be plausible. Refer to this folder structure below:

```sh
├── package.json                ⟵ contains `dependencies` for contract and `devDependencies` for workspaces-js tests
├── src
│  └── index.js                 ⟵ contract code
├── node_modules
└── integration-tests           ⟵ integration test directory
   └── tests.js                 ⟵ integration test file
```

A sample configuration for this project's `package.json` is shown below:

```json
{
  "name": "simple-example",
  "version": "0.1.0",
  "description": "Simple json file example",
  "main": "index.js",
  "type": "module",
  "license": "MIT",
  "directories": {
    "test": "test"
  },
  "scripts": {
    "build": "near-sdk-js build",
    "test": "ava"
  },
  "dependencies": {
    "near-sdk-js": "0.6.0"
  },
  "devDependencies": {
    "ava": "^4.3.3",
    "near-workspaces": "^3.2.2"
  },
  "ava": {
    "files": [
      "test/**/*.ava.js"
    ],
    "require": [],
    "failFast": false,
    "timeout": "2m",
    "failWithoutAssertions": true,
    "environmentVariables": {},
    "verbose": true,
    "nodeArguments": []
  }
}
```

The `tests.js` file above will contain the integration tests. These can be run with the following command from the same level as the test `package.json` file:

    npm test

<!-- TODO: add snippets of code, living everywhere spread across docs -->
---
id: fastnear-api
title: FastNEAR API
sidebar_label: FastNEAR API
---

A fast RPC for the NEAR blockchain, based on [Redis](https://redis.io/) and [LMDB](https://www.symas.com/lmdb).

## About FastNEAR

[Fast-Near](https://github.com/fastnear/fast-near) aims to provide the fastest RPC implementation for NEAR Protocol using high-performance storage backends:
 - in-memory storage in Redis.
 - SSD optimized storage using LMDB.

It is optimized for `view` call performance and ease of deploy and scaling. 


:::info Note about data sync
FastNear doesn't sync with the NEAR blockchain on its own. Data needs to be loaded either from [NEAR Lake](https://github.com/near/near-lake-indexer) or from [Near State Indexer](https://github.com/vgrichina/near-state-indexer).
:::

---



## FastNEAR API

The [FastNEAR API server](https://github.com/fastnear/fastnear-api-server-rs) provides a low-latency RPC API for wallets and explorers.

### Supported APIs

#### Public Key

- Public Key to Account ID mapping.
- Full Access Public Key to Account ID mapping.
- Any Public Key to Account ID mapping.

#### Account ID

- Account ID to delegated staking pools (validators).
- Account ID to fungible tokens (FT contracts).
- Account ID to non-fungible tokens (NFT contracts).

#### Token ID

- Token ID to top 100 accounts by balance (for FT contracts).


:::tip V1 API

[Click here](https://github.com/fastnear/fastnear-api-server-rs?tab=readme-ov-file#api-v1) to see the complete list of API endpoints and usage examples.

:::
Refer-and-Earn 2022 Q2 Report
NEAR FOUNDATION
October 12, 2022
NEAR’s ever-growing and engaged community is one of the ecosystem’s greatest strengths. Remember the NEAR Foundation Grants team’s Refer-and-Earn bonus scheme? A number of NEAR community members participated in Refer-and-Earn in early 2022, resulting in grants for dozens of exciting projects currently building on the NEAR ecosystem.  

To demonstrate the power of the NEAR community, the Grants team just published its Refer-and-Earn Q2 2022 Report. Let’s take a look at the qualified projects currently building without limits that emerged from the Grants team’s Refer-and-Earn program. 

Refer-and-Earn: Q2 Qualified Projects
The NEAR ecosystem is the beneficiary of a number of your recommendations and referrals. A total of 26 quality projects emerged from Refer-and-Earn—each aligning with the NEAR Foundation’s Grants program objectives. 

In no particular order, here are the Q2 2022 qualified projects: 

Ref finance 
Roco Finance 
Lazy Learning
Noft Games 
Atocha Protocol 
Bast.gg
Omnia Defi
KwikTrust
BlockHealth 
Marnotaur
Exxaverse 
Mambo Heritage
NEAR mates 
NFT Design Work 
The Gorilla Squad
Pawn Protocol 
PureFi
Solely NFT 
Kyoto protocol 
Deepwaters
Bumper Finance 
Dojo Finance 
Loozr 
bit brawl
Blockperks
Boundless Pay
The Grants team has reached out to all Refer-and-Earn referrers. Thanks to your help and support, the Grants team is able to support innovative projects such as those listed above. 

Start referring projects to NEAR Grants today
The Grants team would like to extend an invite to those yet to participate in the Refer-and-Earn program. To get started, head over to the NEAR Grants Program Referral Initiative page. 

Please note that only projects receiving a grant directly from NEAR Foundation will be eligible for the Refer-and-Earn bonus. Only the first recorded referral will be paid out—duplicate records will not be considered. NEAR Foundation no longer supports DeFi-related projects. 

All referrals are calculated at the end of each quarter and only eligible referrals will be contacted. 

Please contact [email protected] for additional information or inquiries.