Skip to content
Open

Dev #64

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
61 changes: 61 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Smplx-lint

on:
workflow_dispatch:
push:
branches:
- master
pull_request:
branches:
- master
- dev

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

env:
CARGO_TERM_COLOR: always
SIMPLEX_VERSION: 0.0.11

jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: read

steps:
- name: Checkout
uses: actions/checkout@v6
with:
persist-credentials: false
submodules: true

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: "1.91.0"
components: rustfmt, clippy

- name: Use Rust cache
uses: Swatinem/rust-cache@v2

- name: Install simplex-cli
uses: BlockstreamResearch/simplicityhl-toolchain@v0.0.2
with:
components: simplex@${{ env.SIMPLEX_VERSION }}

# For building generated files
- name: Generate contract artifacts
shell: bash
run: |
simplex build

- name: Check formatting
run: |
cargo fmt --all --check

- name: Run clippy
run: |
cargo clippy --workspace --all-targets --all-features -- -D warnings
7 changes: 4 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@ concurrency:
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
SIMPLEX_VERSION: 0.0.11

jobs:
simplex-tests:
runs-on: ubuntu-latest
timeout-minutes: 30
timeout-minutes: 60
permissions:
contents: read
strategy:
Expand All @@ -47,7 +48,7 @@ jobs:
- name: Install simplex-cli
uses: BlockstreamResearch/simplicityhl-toolchain@v0.0.2
with:
components: simplex
components: simplex@${{ env.SIMPLEX_VERSION }}

- name: Generate contract artifacts
shell: bash
Expand All @@ -60,4 +61,4 @@ jobs:

- name: Test
run: |
simplex test --test-threads 4
simplex test --test-threads 4 -v
22 changes: 16 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
# Changelog

## [0.0.1]
## [Unreleased]

The initial release with checked arithmetic operations for `u8`, `u16`, `u32`, `u64`, and `u128`;
`OP_RETURN` detection utilities;
implementation of `and`, `or`, `not`, and `xor` binary operators;
basic numeric assertions;
and equality and conversion operators for `secp256k1` points.
- Added `mul_div` functions.
- Organized code into modules.
- Refactored test structure.
- Removed `safe_` prefixes from math functions, so the default versions are overflow-checked.
- Added functions for retrieving and asserting `AssetId` and `Amount`.
- Added functions for retrieving script hashes.

## [0.1.0]

Initial release!
- Сhecked arithmetic operations for `u8`, `u16`, `u32`, `u64`, `u128` and `u256`.
- `OP_RETURN` detection utilities.
- Implementation of `and`, `or`, `not`, and `xor` binary operators.
- Basic numeric assertions.
- Equality and conversion operators for `secp256k1` points.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ When submitting a feature request, please provide as many details as possible fo

## Pull Requests

If you're interested in contributing code to the library, start by [forking the repository](https://github.com/BlockstreamResearch/simplicityhl-std/fork) and submitting a pull request.
If you're interested in contributing code to the library, start by [forking the repository](https://github.com/BlockstreamResearch/simplicityhl-std/fork) and submitting a pull request.

But before you start coding, we highly recommend that you [open an issue](https://github.com/BlockstreamResearch/simplicityhl-std/issues/new/choose) first to discuss the changes you want to make.

Expand Down
Loading
Loading