Skip to content

Commit

Permalink
Merge branch 'master' into impr-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
PolyProgrammist committed Dec 20, 2024
2 parents b6951e7 + e78c08b commit 3b1ce54
Show file tree
Hide file tree
Showing 32 changed files with 1,141 additions and 64 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/add-to-devtools.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: 'Add to DevTools Project'

on:
issues:
types:
- opened
- reopened
pull_request:
types:
- opened
- reopened

jobs:
add-to-project:
name: Add issue/PR to project
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
# add to DevTools Project #156
project-url: https://github.com/orgs/near/projects/156
github-token: ${{ secrets.GH_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
platform: [macos-latest]
toolchain: [stable]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install Homebrew
run: |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-plz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
if: github.ref == 'refs/heads/master'
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
Expand Down
36 changes: 29 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ jobs:
matrix:
platform:
- os: ubuntu-latest
rs: 1.80.0
rs: 1.82.0
- os: ubuntu-latest
rs: stable
- os: macos-latest
rs: 1.80.0
rs: 1.82.0
- os: macos-latest
rs: stable
features: ['', '--features unstable,legacy,__abi-generate']
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: "${{ matrix.platform.rs }} with rustfmt, and wasm32"
uses: actions-rs/toolchain@v1
with:
Expand All @@ -45,7 +45,7 @@ jobs:
name: Clippy and fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
Expand All @@ -61,7 +61,7 @@ jobs:
name: Compilation tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
Expand All @@ -75,7 +75,7 @@ jobs:
name: Windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: "Setup Windows toolchain"
uses: actions-rs/toolchain@v1
with:
Expand All @@ -93,7 +93,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Sources
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install Toolchain
uses: actions-rs/toolchain@v1
with:
Expand All @@ -105,3 +105,25 @@ jobs:
run: cargo install cargo-audit
- name: Run Audit
run: cargo audit
# there're sometimes warnings, which signal, that the generated doc
# won't look as expected, when rendered, and sometimes errors, which will prevent doc from being
# generated at release time altogether.
cargo-doc:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v4
- name: Install Toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
default: true
- name: run cargo doc
env:
RUSTDOCFLAGS: -D warnings
run: |
cargo doc -p near-sdk --features unstable,legacy,unit-testing,__macro-docs
cargo doc -p near-sdk-macros
cargo doc -p near-contract-standards --no-deps
cargo doc -p near-sys
2 changes: 1 addition & 1 deletion .github/workflows/test_examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
factory-contract
]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: "${{ matrix.toolchain }} with rustfmt, and wasm32"
uses: actions-rs/toolchain@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_examples_small.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
test-contract,
]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: "${{ matrix.toolchain }} with rustfmt, clippy, and wasm32"
uses: actions-rs/toolchain@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/typo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Actions Repository
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Check spelling of the entire repository
uses: crate-ci/[email protected]

11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@

## [Unreleased]

## [5.7.0](https://github.com/near/near-sdk-rs/compare/near-sdk-v5.6.0...near-sdk-v5.7.0) - 2024-12-13

### Other

- updates near-* dependencies to 0.28 release (#1272)
- tests for Lazy and moving out of unstable (#1268)
- add a `cargo doc` job (#1269)
- allow clippy::needless_lifetimes (1.83 more suggestions) (#1267)
- examples for Near-related host functions (#1259)
- updates near-workspaces to 0.15 version (#1260)

## [5.6.0](https://github.com/near/near-sdk-rs/compare/near-sdk-v5.5.0...near-sdk-v5.6.0) - 2024-11-14

### Other
Expand Down
2 changes: 1 addition & 1 deletion CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @frol @dj8yfo @ruseinov @akorchyn
* @frol @dj8yfo @ruseinov @akorchyn @PolyProgrammist
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ members = ["near-sdk", "near-sdk-macros", "near-contract-standards", "near-sys"]
exclude = ["examples/"]

[workspace.package]
version = "5.6.0"
version = "5.7.0"

# Special triple # comment for ci.
[patch.crates-io]
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<p>
<a href="https://docs.rs/near-sdk"><img src="https://docs.rs/near-sdk/badge.svg?style=flat-square" alt="Reference Documentation" /></a>
<a href="https://blog.rust-lang.org/2024/07/25/Rust-1.80.0.html"><img src="https://img.shields.io/badge/rustc-1.80+-lightgray.svg?style=flat-square" alt="MSRV" /></a>
<a href="https://blog.rust-lang.org/2024/10/17/Rust-1.82.0.html"><img src="https://img.shields.io/badge/rustc-1.82+-lightgray.svg?style=flat-square" alt="MSRV" /></a>
<a href="https://crates.io/crates/near-sdk"><img src="https://img.shields.io/crates/v/near-sdk.svg?style=flat-square" alt="Crates.io version" /></a>
<a href="https://crates.io/crates/near-sdk"><img src="https://img.shields.io/crates/d/near-sdk.svg?style=flat-square" alt="Download" /></a>
<a href="https://near.chat"><img src="https://img.shields.io/discord/490367152054992913?style=flat-square&label=discord&color=lightgreen" alt="Join the community on Discord" /></a>
Expand Down Expand Up @@ -321,7 +321,7 @@ State breaking changes (low-level serialization format of any data type) will be

### MSRV

The minimum supported Rust version is currently `1.80`. There are no guarantees that this will be upheld if a security patch release needs to come in that requires a Rust toolchain increase.
The minimum supported Rust version is currently `1.82`. There are no guarantees that this will be upheld if a security patch release needs to come in that requires a Rust toolchain increase.

## Contributing

Expand Down
1 change: 0 additions & 1 deletion examples/fungible-token/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ anyhow = "1.0"
near-sdk = { path = "../../near-sdk", features = ["unit-testing"] }
tokio = { version = "1.14", features = ["full"] }
near-workspaces = { version = "0.15", features = ["unstable"] }
cargo-near-build = "0.3.1"
rstest = "0.23.0"

[profile.release]
Expand Down
1 change: 1 addition & 0 deletions examples/fungible-token/tests/workspaces.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use near_workspaces::operations::Function;
use near_workspaces::result::ValueOrReceiptId;
use near_workspaces::{types::NearToken, Account, AccountId, Contract};
use rstest::{fixture, rstest};
use near_workspaces::cargo_near_build;

const ONE_YOCTO: NearToken = NearToken::from_yoctonear(1);

Expand Down
1 change: 0 additions & 1 deletion examples/lockable-fungible-token/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ anyhow = "1.0"
tokio = { version = "1.14", features = ["full"] }
near-sdk = { path = "../../near-sdk", features = ["unit-testing"] }
near-workspaces = { version = "0.15", features = ["unstable"] }
cargo-near-build = "0.3.1"
rstest = "0.23.0"

[profile.release]
Expand Down
1 change: 1 addition & 0 deletions examples/lockable-fungible-token/tests/workspaces.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use std::str::FromStr;
use near_sdk::json_types::U128;
use near_workspaces::{types::NearToken, Account, Contract};
use rstest::{fixture, rstest};
use near_workspaces::cargo_near_build;

#[fixture]
fn initial_balance() -> U128 {
Expand Down
1 change: 0 additions & 1 deletion examples/non-fungible-token/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ near-sdk = { path = "../../near-sdk", features = ["unit-testing"] }
tokio = { version = "1.14", features = ["full"] }
near-workspaces = { version = "0.15", features = ["unstable"] }
rstest = "0.23.0"
cargo-near-build = "0.3.1"

[profile.release]
codegen-units = 1
Expand Down
2 changes: 1 addition & 1 deletion examples/non-fungible-token/tests/workspaces/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use near_contract_standards::non_fungible_token::TokenId;
use near_workspaces::types::NearToken;
use near_workspaces::{Account, Contract};
use rstest::fixture;

use near_workspaces::cargo_near_build;
pub const TOKEN_ID: &str = "0";

pub async fn helper_mint(
Expand Down
7 changes: 7 additions & 0 deletions near-contract-standards/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [5.7.0](https://github.com/near/near-sdk-rs/compare/near-contract-standards-v5.6.0...near-contract-standards-v5.7.0) - 2024-12-13

### Other

- add a `cargo doc` job (#1269)
- allow clippy::needless_lifetimes (1.83 more suggestions) (#1267)

## [5.5.0](https://github.com/near/near-sdk-rs/compare/near-contract-standards-v5.4.0...near-contract-standards-v5.5.0) - 2024-09-11

### Other
Expand Down
2 changes: 1 addition & 1 deletion near-contract-standards/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ NEAR smart contracts standard library.
"""

[dependencies]
near-sdk = { path = "../near-sdk", version = "~5.6.0", default-features = false, features = [
near-sdk = { path = "../near-sdk", version = "~5.7.0", default-features = false, features = [
"legacy",
] }

Expand Down
2 changes: 2 additions & 0 deletions near-contract-standards/src/fungible_token/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Fungible tokens as described in [by the spec](https://nomicon.io/Standards/Tokens/FungibleToken).
//!
//! This module represents a Fungible Token standard.
//!
//! # Examples
Expand Down
7 changes: 5 additions & 2 deletions near-contract-standards/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
// We want to enable all clippy lints, but some of them generate false positives.
#![allow(clippy::missing_const_for_fn, clippy::redundant_pub_crate)]
#![allow(clippy::needless_lifetimes)]

/// Fungible tokens as described in [by the spec](https://nomicon.io/Standards/FungibleToken/README.html).
pub mod fungible_token;
/// Non-fungible tokens as described in [by the spec](https://nomicon.io/Standards/NonFungibleToken/README.html).

/// Non-fungible tokens as described in [by the spec](https://nomicon.io/Standards/Tokens/NonFungibleToken).
pub mod non_fungible_token;

/// Storage management deals with handling [state storage](https://docs.near.org/docs/concepts/storage-staking) on NEAR. This follows the [storage management standard](https://nomicon.io/Standards/StorageManagement.html).
pub mod storage_management;

/// This upgrade standard is a use case where a staging area exists for a WASM
/// blob, allowing it to be stored for a period of time before deployed.
#[deprecated(
Expand Down
12 changes: 6 additions & 6 deletions near-sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ required-features = ["abi", "unstable"]
# Provide near_bidgen macros.
serde = { version = "1", features = ["derive"] }
serde_json = "1"
near-sdk-macros = { path = "../near-sdk-macros", version = "~5.6.0" }
near-sdk-macros = { path = "../near-sdk-macros", version = "~5.7.0" }
near-sys = { path = "../near-sys", version = "0.2.2" }
base64 = "0.22"
borsh = { version = "1.0.0", features = ["derive"] }
Expand All @@ -42,11 +42,11 @@ schemars = { version = "0.8.8", optional = true }
near-abi = { version = "0.4.0", features = [
"__chunked-entries",
], optional = true }
near-vm-runner = { version = "0.27", optional = true }
near-primitives-core = { version = "0.27", optional = true }
near-primitives = { version = "0.27", optional = true }
near-crypto = { version = "0.27", default-features = false, optional = true }
near-parameters = { version = "0.27", optional = true }
near-vm-runner = { version = "0.28", optional = true }
near-primitives-core = { version = "0.28", optional = true }
near-primitives = { version = "0.28", optional = true }
near-crypto = { version = "0.28", default-features = false, optional = true }
near-parameters = { version = "0.28", optional = true }

[dev-dependencies]
near-sdk = { path = ".", features = ["legacy", "unit-testing"] }
Expand Down
Loading

0 comments on commit 3b1ce54

Please sign in to comment.