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

feat: pop drink #1

Merged
merged 51 commits into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
03e679b
feat: assets api
Daanvdplas Sep 17, 2024
732ecf4
fix: format with pop-node config
chungquantin Sep 20, 2024
d16f01f
feat: add approve, total_supply
chungquantin Sep 23, 2024
b96ed6a
Merge branch 'daan/feat-assets' into chungquantin/refactor-formatting
chungquantin Sep 24, 2024
51f5afe
Merge pull request #2 from r0gue-io/chungquantin/refactor-formatting
chungquantin Sep 24, 2024
061b422
feat: add set_metadata and destroy
chungquantin Sep 25, 2024
04aa7b8
fix: formatting
chungquantin Sep 25, 2024
ca063cc
fix: rename destroy method
chungquantin Sep 25, 2024
513c0f7
refactor: repo structure
Daanvdplas Sep 26, 2024
b210bfa
chore: default
Daanvdplas Sep 27, 2024
62682d5
Merge pull request #3 from r0gue-io/daan/refactor-repo_structure
Daanvdplas Sep 27, 2024
00597be
refactor: ci
Daanvdplas Sep 27, 2024
4e7a27d
feat: helper functions
Daanvdplas Sep 27, 2024
340d358
fix: pub visibility of util method
chungquantin Sep 30, 2024
ddb5806
feat: add runtime error
chungquantin Oct 3, 2024
315bb65
fix: comments
chungquantin Oct 3, 2024
be47f83
fix: bracket
chungquantin Oct 3, 2024
6f609f2
feat: into psp22 error
chungquantin Oct 3, 2024
4b9c94a
feat: u32 conversion
chungquantin Oct 4, 2024
a6c4b5c
feat: better runtime error
chungquantin Oct 4, 2024
6cf56a6
refactor: pop_primitive dispatch error conversion
chungquantin Oct 4, 2024
22732d3
Merge pull request #16 from r0gue-io/chungquantin/refactor-pop_primit…
chungquantin Oct 4, 2024
d94da0e
Merge pull request #15 from r0gue-io/chungquantin/fix-comments
chungquantin Oct 4, 2024
63ed93d
refactor: error module conversion
chungquantin Oct 7, 2024
0936849
Merge branch 'daan/feat-assets' into chungquantin/feat-runtime_error
chungquantin Oct 7, 2024
201a9b9
feat: add versioning
chungquantin Oct 8, 2024
5851852
feat: generic runtime error
chungquantin Oct 8, 2024
6cd8dbb
fix: comments
chungquantin Oct 8, 2024
b17157f
fix: resolve comments
chungquantin Oct 9, 2024
9450444
refactor: unwrap_or_else
chungquantin Oct 9, 2024
c1a6fea
fix: example
chungquantin Oct 9, 2024
c598eae
fix: comments
chungquantin Oct 10, 2024
c3a13c3
fix: update doc
chungquantin Oct 11, 2024
c4f6a87
fix: doc
chungquantin Oct 11, 2024
5ea730b
fix: doc
chungquantin Oct 11, 2024
30405b4
fix: doc
chungquantin Oct 15, 2024
364766f
fix: doc
chungquantin Oct 15, 2024
98244cd
fix: docs
chungquantin Oct 15, 2024
4ac3fab
docs: drink
Daanvdplas Oct 16, 2024
1a585d5
fix: comments
Daanvdplas Oct 17, 2024
aaf322c
fix: Cargo.lock
Daanvdplas Oct 17, 2024
dc38f73
refactor
Daanvdplas Oct 17, 2024
2710891
Merge pull request #22 from r0gue-io/daan/docs-drink
Daanvdplas Oct 18, 2024
59ae0eb
remove: pallet-api
Daanvdplas Oct 18, 2024
a66205f
Merge pull request #14 from r0gue-io/chungquantin/feat-runtime_error
Daanvdplas Oct 18, 2024
f1c0faf
chore: pop dependencies to git
Daanvdplas Oct 18, 2024
ed5140a
chore: remove old ci files
Daanvdplas Oct 18, 2024
b735c02
chore: ci
Daanvdplas Oct 18, 2024
d804b5d
ci: skip wasm build
Daanvdplas Oct 18, 2024
844e9a5
fix: ApiError & public assert_err_inner
chungquantin Oct 18, 2024
daf9162
fix: formatting
chungquantin Oct 18, 2024
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
23 changes: 23 additions & 0 deletions .githooks/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Git Hooks

A pre-push hook which checks formatting of Rust files. Additional checks may be added in the future.

# Prerequisites

The following prerequisites are required:

## Rust Nightly

The nightly version of Rust provides additional formatting benefits over the stable version.

```shell
rustup toolchain install nightly --profile minimal --component rustfmt
```

# Installation

Use the following command in the root directory of the local repository to configure Git to use the hooks:

```shell
git config core.hooksPath .githooks
```
21 changes: 21 additions & 0 deletions .githooks/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/sh

set -eu

# Are deps installed
if ! command -v cargo > /dev/null 2>&1
then
echo "cargo couldn't be found, please confirm your set up is properly configured."
exit 1
else
# Check Rust formatting
if ! cargo +nightly fmt --all -- --check
then
echo "There are some code style issues."
# shellcheck disable=SC2006
echo "Run 'cargo +nightly fmt --all' first."
exit 1
fi
fi

exit 0
32 changes: 32 additions & 0 deletions .github/actions/init/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Initialize
description: This action initializes a runner for use in other actions.
inputs:
cache-key:
description: "The key to be used for the cache"

runs:
using: "composite"
steps:
- name: Setup Ubuntu dependencies
shell: bash
run: sudo apt update && sudo apt install -y protobuf-compiler

- name: Free up space on runner
shell: bash
run: |
sudo rm -rf /opt/ghc
sudo rm -rf /opt/hostedtoolcache/CodeQL
sudo rm -rf /usr/local/.ghcup
sudo rm -rf /usr/local/lib/android
sudo rm -rf /usr/local/share/boost
sudo rm -rf /usr/local/share/powershell
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/share/swift
sudo rm -rf "$AGENT_TOOLSDIRECTORY"

- name: Rust Cache
uses: Swatinem/[email protected]
with:
cache-on-failure: true
cache-all-crates: true
key: ${{ inputs.cache-key }}
53 changes: 53 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: ci

on:
push:
branches: [main]
pull_request:
types: [opened, synchronize, reopened, ready_for_review]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: "./.github/actions/init"

- name: Check formatting
run: |
rustup toolchain install nightly --profile minimal --component rustfmt
cargo +nightly fmt --all -- --check

check:
needs: lint
runs-on: ubuntu-latest
env:
SKIP_WASM_BUILD: 1
steps:
- uses: actions/checkout@v4

- uses: "./.github/actions/init"

- name: Check Build
run: |
cargo check --release --locked

clippy:
needs: lint
runs-on: ubuntu-latest
permissions:
checks: write
env:
RUSTFLAGS: "-Wmissing_docs"
SKIP_WASM_BUILD: 1
steps:
- uses: actions/checkout@v4

- uses: "./.github/actions/init"

- name: Annotate with Clippy warnings
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --release --locked
20 changes: 20 additions & 0 deletions .github/workflows/lint-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: "Lint PR"

on:
pull_request_target:
types:
- opened
- edited
- synchronize

permissions:
pull-requests: read

jobs:
lint:
name: Validate PR title for conventional commit compliance
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27 changes: 0 additions & 27 deletions .github/workflows/publish.yml

This file was deleted.

55 changes: 0 additions & 55 deletions .github/workflows/rust-checks.yml

This file was deleted.

24 changes: 24 additions & 0 deletions .rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Non-default formatting configuration options: use with `cargo +nightly fmt --all`
binop_separator = "Back"
chain_width = 80
combine_control_expr = false
comment_width = 100
condense_wildcard_suffixes = true
edition = "2021"
format_code_in_doc_comments = true
format_strings = true
group_imports = "StdExternalCrate"
hard_tabs = true
imports_granularity = "Crate"
match_arm_blocks = false
match_block_trailing_comma = true
newline_style = "Unix"
normalize_comments = true
reorder_impl_items = true
trailing_semicolon = false
unstable_features = true
use_field_init_shorthand = true
# Uses max_width or its default value (100) if not specified.
use_small_heuristics = "Max"
use_try_shorthand = true
wrap_comments = true
Loading
Loading