Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance API Reference - Documentation improvements #410

Merged
merged 6 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions benchmark/__tests__/util.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Functions consumed by the benchmark contracts tests

export function formatGas(gas) {
if (gas < 10 ** 12) {
let tGas = gas / 10 ** 12;
Expand Down
5 changes: 5 additions & 0 deletions benchmark/src/deploy-contract.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import { near } from "near-sdk-js";

/**
* Used for contract deployment. More information for that
* can be found in the README.md
* - Deploy and cross contract call
*/
export function deploy_contract() {
let promiseId = near.promiseBatchCreate("a.caller.test.near");
near.promiseBatchActionCreateAccount(promiseId);
Expand Down
5 changes: 5 additions & 0 deletions benchmark/src/expensive-calc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import { NearBindgen, call, near } from "near-sdk-js";

/**
* ExpensiveCalc is connected to the expensive contract. More information for that
* can be found in the README.md
* - Computational expensive contract
*/
@NearBindgen({})
export class ExpensiveCalc {
@call({})
Expand Down
4 changes: 4 additions & 0 deletions benchmark/src/highlevel-collection.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import { NearBindgen, call, UnorderedMap } from "near-sdk-js";

/**
* More information for that can be found in the README.md
* - Highlevel collection
*/
@NearBindgen({})
export class HighlevelCollection {
constructor() {
Expand Down
4 changes: 4 additions & 0 deletions benchmark/src/highlevel-minimal.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import { NearBindgen, call } from "near-sdk-js";

/**
* More information for that can be found in the README.md
* - A highlevel minimal contract (using nearbindgen)
*/
@NearBindgen({})
export class HighlevelMinimal {
@call({})
Expand Down
8 changes: 8 additions & 0 deletions benchmark/src/lowlevel-api.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
import { near } from "near-sdk-js";

/**
* Helper method for the low level api. More information for that can be found in the README.md
* - Low level API
*/
export function lowlevel_storage_write() {
let data = new Uint8Array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]);
near.storageWriteRaw(data, data);
}

/**
* Helper method for the low level api. More information for that can be found in the README.md
* - Low level API
*/
export function lowlevel_storage_write_many() {
let data = new Uint8Array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]);
near.storageWriteRaw(data, data);
Expand Down
4 changes: 4 additions & 0 deletions benchmark/src/lowlevel-minimal.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import { near } from "near-sdk-js";

/**
* More information for that can be found in the README.md
* - A minimal contract
*/
export function empty() {}
51 changes: 51 additions & 0 deletions packages/near-contract-standards/lib/fungible_token/core.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading