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

Feature: Pallet Engine (Add pallet - MVP) #43

Closed
wants to merge 71 commits into from
Closed
Show file tree
Hide file tree
Changes from 53 commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
5f60e9a
init: Pallet-engine
weezy20 Mar 4, 2024
3539460
Merge branch 'main' into add-pallet
weezy20 Mar 6, 2024
ee058b3
tidy
weezy20 Mar 6, 2024
e7b791a
step_builder for pallet-engine
weezy20 Mar 6, 2024
c3dcfa0
insert_import_stmts
weezy20 Mar 7, 2024
60cee28
Merge branch 'main' into add-pallet
weezy20 Mar 7, 2024
0cfec78
fix build errors
weezy20 Mar 7, 2024
685f3c7
prepare_config
weezy20 Mar 8, 2024
6dd21d1
fix more runtime errors
weezy20 Mar 8, 2024
4214d2c
Merge branch 'main' into add-pallet
weezy20 Mar 8, 2024
7e81cc2
update lockfile
weezy20 Mar 8, 2024
69d9491
minor adjustments
weezy20 Mar 8, 2024
2e6aef6
prepare test harness for add-pallet
weezy20 Mar 8, 2024
bc788de
Merge branch 'main' into add-pallet
weezy20 Mar 8, 2024
83d2d2c
test : add_parachain_pallet_template
weezy20 Mar 8, 2024
cc3ca54
improve test
weezy20 Mar 9, 2024
0d40634
style command
weezy20 Mar 9, 2024
736deb4
tweaks for correct cursor tracking
weezy20 Mar 9, 2024
85a7e47
default to use insert_str_runtime for implicit runtime decl entries.
weezy20 Mar 9, 2024
e4eb10f
Merge branch 'main' into add-pallet
weezy20 Mar 9, 2024
3e2c150
typo
weezy20 Mar 9, 2024
13c84bb
prepare dependency-injection
weezy20 Mar 9, 2024
a588c92
Merge branch 'main' into add-pallet
weezy20 Mar 9, 2024
d066526
refactor: add pallet subcommand
AlexD10S Mar 9, 2024
8932833
Revert "refactor: add pallet subcommand"
weezy20 Mar 10, 2024
7c2b7ff
add pop add pallet subsubcommand
weezy20 Mar 10, 2024
70881b8
fix tests
weezy20 Mar 10, 2024
2182ade
Merge branch 'main' into add-pallet
weezy20 Mar 12, 2024
023fdbf
sub0 - template runtime dep injection
weezy20 Mar 12, 2024
c158721
fix template toml path
weezy20 Mar 12, 2024
a6e713f
fix TomlEditor runtime path
weezy20 Mar 12, 2024
ea01ead
use consistent naming for template pallet : pallet-parachain-template
weezy20 Mar 12, 2024
8ab1ba9
remove - -> _ substitution in pallet name
weezy20 Mar 12, 2024
1e6d690
fix: use 9090 as pop node id
al3mart Mar 12, 2024
7304889
fix last_import step -_-
weezy20 Mar 12, 2024
aed5436
set pallet-template version 1.0.0
weezy20 Mar 12, 2024
1f49718
fix: in pallet template Cargo use same dependencies versions as base-…
AlexD10S Mar 12, 2024
49850b2
merge add-pallet
al3mart Mar 12, 2024
a39b1c2
style: fmt
al3mart Mar 12, 2024
a2532ad
Merge pull request #60 from r0gue-io/al3mart/fix-paraid-zombienet
al3mart Mar 12, 2024
19c7637
fix inaccurate import cursor
weezy20 Mar 17, 2024
5a0e6b4
add now checks for uncommitted changes
weezy20 Mar 17, 2024
b80cb50
Merge branch 'main' into add-pallet
weezy20 Mar 17, 2024
b122568
feature["parachain"] gate add
weezy20 Mar 17, 2024
9ff1318
optional deps for add-pallet
weezy20 Mar 17, 2024
1bb0385
add note for add test failure
weezy20 Mar 17, 2024
33c2a95
modify add-pallet test
weezy20 Mar 18, 2024
3c55dac
test fails due to unclean git state on pop new parachain
weezy20 Mar 18, 2024
7996257
manually invoke git, then run add-pallet
weezy20 Mar 18, 2024
c6d1991
comments
weezy20 Mar 18, 2024
1d92314
separate dependency module
weezy20 Mar 19, 2024
5f806d8
generalize dependency injection
weezy20 Mar 19, 2024
4176187
git config for CI
weezy20 Mar 19, 2024
f5ff852
fix issue #67
weezy20 Mar 20, 2024
96401ed
fmt
weezy20 Mar 20, 2024
215b028
review fixes
weezy20 Mar 20, 2024
354116e
review fixes 2
weezy20 Mar 20, 2024
99f4b64
review fixes 3 + fix add_new_line cursor
weezy20 Mar 21, 2024
0e682f5
Merge branch 'main' into add-pallet
weezy20 Mar 21, 2024
159b998
use pallet-parachain-template path relative to workspace root
weezy20 Mar 21, 2024
4309bb2
fix order for pallet-engine construction
weezy20 Mar 21, 2024
0363844
include checks for try-runtime and runtime-benchmarks features in run…
weezy20 Mar 21, 2024
7e7478d
fix(deps): remove deprecated dependency
evilrobot-01 Mar 21, 2024
6f7ddd8
remove todo comment for name-conflict-resolution-strategy
weezy20 Mar 22, 2024
a939826
remove commented code
weezy20 Mar 27, 2024
0754e6a
add help msg for add pallet
weezy20 Mar 27, 2024
75fceb9
Merge branch 'main' into add-pallet
weezy20 Mar 29, 2024
e93dc0c
Merge branch 'main' into add-pallet
weezy20 Apr 1, 2024
44eed89
fmt
weezy20 Apr 1, 2024
dd05112
Merge branch 'main' into add-pallet
weezy20 Apr 8, 2024
e6733e5
rename test
weezy20 Apr 8, 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
7 changes: 6 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

env:
CARGO_TERM_COLOR: always

GITHUB_ACTOR: pop-cli
jobs:
build:

Expand All @@ -28,6 +28,11 @@ jobs:
cache-on-failure: true
cache-all-crates: true

- name: Setup git config
run: |
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"

- uses: actions/checkout@v3
- name: Check Feature Contracts Excl.
run: cargo check --no-default-features --features contract
Expand Down
140 changes: 136 additions & 4 deletions Cargo.lock

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

29 changes: 24 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ name = "pop"
path = "src/main.rs"

[dev-dependencies]
assert_cmd = "2.0.14"
tempdir = "0.3.7"

[dependencies]
Expand All @@ -20,19 +21,23 @@ console = "0.15"
duct = "0.13"
git2 = "0.18"
log = "0.4"
# semver = "1.0.20"
semver = "1.0.20"
strum = "0.26"
strum_macros = "0.26"
tempfile = "3.8"
tokio = { version = "1.0", features = ["macros", "rt-multi-thread"] }
url = { version = "2.5", optional = true }
walkdir = "2.4"
toml_edit = { version = "0.22.7" }

# contracts
contract-build = { version = "4.0.0-rc.3", optional = true }
contract-extrinsics = { version = "4.0.0-rc.3", optional = true }
sp-core = { version = "30.0.0", optional = true }
subxt-signer = { version = "0.34.0", features = ["subxt", "sr25519"], optional = true }
subxt-signer = { version = "0.34.0", features = [
"subxt",
"sr25519",
], optional = true }
subxt = { version = "0.34.0", optional = true }
ink_env = { version = "5.0.0-rc.2", optional = true }
sp-weights = { version = "29.0.0", optional = true }
Expand All @@ -45,10 +50,18 @@ reqwest = { version = "0.11", optional = true }
serde_json = { version = "1.0", optional = true }
serde = { version = "1.0", features = ["derive"], optional = true }
symlink = { version = "0.1", optional = true }
toml_edit = { version = "0.22", optional = true }
tracing-subscriber = { version = "0.3", optional = true }
zombienet-sdk = { git = "https://github.com/r0gue-io/zombienet-sdk", branch = "pop", optional = true }
zombienet-support = { git = "https://github.com/r0gue-io/zombienet-sdk", branch = "pop", optional = true }
uuid = { version = "1.7.0", features = ["v4"], optional = true }
frame-support-procedural-tools = { version = "9.0.0", optional = true }
proc-macro2 = { version = "1.0.70", features = [
"span-locations",
], optional = true }
quote = { version = "1.0.33", optional = true }
syn = { version = "2.0.52", features = ["full"], optional = true }
cfg-expr = { version = "0.15.5", optional = true }
prettyplease = { version = "0.2.15", optional = true }

[features]
default = ["contract", "parachain"]
Expand All @@ -68,9 +81,15 @@ parachain = [
"dep:reqwest",
"dep:serde_json",
"dep:symlink",
"dep:toml_edit",
"dep:tracing-subscriber",
"dep:url",
"dep:zombienet-sdk",
"dep:zombienet-support"
"dep:zombienet-support",
"uuid",
"frame-support-procedural-tools",
"proc-macro2",
"quote",
"syn",
"cfg-expr",
"prettyplease",
]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ There's also the shorter version:
pop new parachain my-app -s DOT -d 6 -i 1_000_000_000
```

To create a new pallet, simply `pop new pallet`. And that's it. You will have a new `pallet-template` ready for hacking.
To create a new pallet, simply `pop new pallet`. And that's it. You will have a new `pallet-parachain-template` ready for hacking.
To customize the new pallet you can follow these options:

```sh
Expand Down
Loading
Loading