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(sub0): nonfungibles pop-api + pallet implementation #353

Merged
Merged
Show file tree
Hide file tree
Changes from 81 commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
ac35a80
chore: forked pallet nfts
chungquantin Oct 14, 2024
59bd0ec
fix: formatting
chungquantin Oct 14, 2024
0460a44
fix: formatting
chungquantin Oct 14, 2024
d18123f
feat: add nonfungibles implementation
chungquantin Oct 14, 2024
8832470
chore: add nfts pallet
chungquantin Oct 14, 2024
facbb17
feat: add new storage items to pallet-nfts
chungquantin Oct 15, 2024
9e5e808
feat: check allowance
chungquantin Oct 16, 2024
fe1f448
test(nfts): check account balance & test total supply
chungquantin Oct 16, 2024
709398c
test(nfts): allowance works
chungquantin Oct 16, 2024
35a2839
refactor(test): check_allowance_works
chungquantin Oct 16, 2024
501a3c7
fix(nfts): cancel / approve collection transfer
chungquantin Oct 17, 2024
cebd059
test(nfts): cancel approval collection
chungquantin Oct 17, 2024
d235928
test(nfts): update approval test cases
chungquantin Oct 17, 2024
9015146
feat(nfts): get attribute read method
chungquantin Oct 17, 2024
2ad1764
feat(nonfungibles + nfts): add new methods to manage attributes
chungquantin Oct 17, 2024
48abce6
refactor(nfts): toml lock file
chungquantin Oct 18, 2024
390ca78
fix(pallet-api): propagate try-runtime feature
chungquantin Oct 18, 2024
2653a05
fix(api/nonfungibles): unit tests
chungquantin Oct 18, 2024
c41134f
test(api/nonfungibles): encoding_read_result
chungquantin Oct 18, 2024
a32e801
refactor(api/nonfungibles): pallet tests
chungquantin Oct 18, 2024
83e8122
test(nonfungibles): add tests and remove collection owner read
chungquantin Oct 21, 2024
c635172
fix(runtime): remove PartialEq, add Encode
chungquantin Oct 22, 2024
f4d1ba4
feat(nonfungibles): pop-api
chungquantin Oct 22, 2024
d3c9295
test(nonfungibles): pallet unit testing
chungquantin Oct 22, 2024
b6ebd48
fix: [nonfungibles, NonFungibles]
chungquantin Oct 22, 2024
356a253
fix: base call filter
chungquantin Oct 22, 2024
b953b42
feat(nonfungibles): pop-api integration tests utils
chungquantin Oct 22, 2024
914513d
fix: benchmark listing
chungquantin Oct 22, 2024
6816dff
fix: test
chungquantin Oct 23, 2024
0a94a25
feat: add integration test contract
chungquantin Oct 23, 2024
f2cd4a0
test(nonfungibles): integration tests skeleton
chungquantin Oct 23, 2024
09ce31d
fix(nonfungibles): integration tests
chungquantin Oct 23, 2024
a0d9a25
test(nonfungibles): add balance_of_works
chungquantin Oct 23, 2024
7ec11c0
test(nonfungibles): add more integration tests
chungquantin Oct 23, 2024
d82d3f9
test(nonfungibles): add more tests
chungquantin Oct 24, 2024
d6f418e
fix: devnet api config
chungquantin Oct 24, 2024
1943669
chore: update weight pallet-nfts file
chungquantin Oct 24, 2024
f20d191
Merge branch 'sub0' into chungquantin/sub0-pallet_nfts
chungquantin Oct 28, 2024
e477c00
chore: rebase
chungquantin Oct 28, 2024
ca14de7
feat: add nonfungibles implementation
chungquantin Oct 14, 2024
d8a15f8
chore: add nfts pallet
chungquantin Oct 14, 2024
37cd4bc
feat: add new storage items to pallet-nfts
chungquantin Oct 15, 2024
204bab4
feat: check allowance
chungquantin Oct 16, 2024
75ff645
test(nfts): check account balance & test total supply
chungquantin Oct 16, 2024
5653b66
test(nfts): allowance works
chungquantin Oct 16, 2024
15f72ed
refactor(test): check_allowance_works
chungquantin Oct 16, 2024
2c64d91
fix(nfts): cancel / approve collection transfer
chungquantin Oct 17, 2024
d29b841
test(nfts): cancel approval collection
chungquantin Oct 17, 2024
b47d42d
test(nfts): update approval test cases
chungquantin Oct 17, 2024
22dac99
feat(nfts): get attribute read method
chungquantin Oct 17, 2024
91bdcc8
feat(nonfungibles + nfts): add new methods to manage attributes
chungquantin Oct 17, 2024
091c6d3
refactor(nfts): toml lock file
chungquantin Oct 18, 2024
856c0ca
fix(pallet-api): propagate try-runtime feature
chungquantin Oct 18, 2024
b2390e2
fix(api/nonfungibles): unit tests
chungquantin Oct 18, 2024
0bc5f11
test(api/nonfungibles): encoding_read_result
chungquantin Oct 18, 2024
a2da82e
refactor(api/nonfungibles): pallet tests
chungquantin Oct 18, 2024
9d14962
test(nonfungibles): add tests and remove collection owner read
chungquantin Oct 21, 2024
d0dd77c
fix(runtime): remove PartialEq, add Encode
chungquantin Oct 22, 2024
5bd7735
feat(nonfungibles): pop-api
chungquantin Oct 22, 2024
763e27d
test(nonfungibles): pallet unit testing
chungquantin Oct 22, 2024
887804b
fix: [nonfungibles, NonFungibles]
chungquantin Oct 22, 2024
4366c0f
fix: base call filter
chungquantin Oct 22, 2024
c8b3798
feat(nonfungibles): pop-api integration tests utils
chungquantin Oct 22, 2024
4d5451e
fix: benchmark listing
chungquantin Oct 22, 2024
4441ad4
fix: test
chungquantin Oct 23, 2024
ea91eb6
feat: add integration test contract
chungquantin Oct 23, 2024
5d43294
test(nonfungibles): integration tests skeleton
chungquantin Oct 23, 2024
a6da1ff
fix(nonfungibles): integration tests
chungquantin Oct 23, 2024
34f84e2
test(nonfungibles): add balance_of_works
chungquantin Oct 23, 2024
f976c20
test(nonfungibles): add more integration tests
chungquantin Oct 23, 2024
2abb4ff
test(nonfungibles): add more tests
chungquantin Oct 24, 2024
fe4ef45
fix: devnet api config
chungquantin Oct 24, 2024
ebbba96
chore: update weight pallet-nfts file
chungquantin Oct 24, 2024
f303fe9
chore: rebase
chungquantin Oct 28, 2024
9ba71d3
Merge remote-tracking branch 'refs/remotes/origin/chungquantin/sub0-n…
chungquantin Oct 28, 2024
a9f4ceb
fix: formatting
chungquantin Oct 28, 2024
159d6bc
fix: taplo
chungquantin Oct 28, 2024
a5a1c8c
fix: remove duplicate import
chungquantin Oct 28, 2024
0ae4535
chore: nonfungibles rebase (#360)
chungquantin Oct 28, 2024
712122b
Merge branch 'chungquantin/sub0-pallet_nfts' into chungquantin/sub0-n…
chungquantin Oct 28, 2024
b879488
fix: formatting
chungquantin Oct 29, 2024
8745056
chore: resolve review comments
chungquantin Oct 31, 2024
7d7a2ac
fix: collection id
Daanvdplas Nov 1, 2024
4ef42fb
refactor: only add useful helper functions
Daanvdplas Nov 1, 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
19 changes: 10 additions & 9 deletions Cargo.lock

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

4 changes: 4 additions & 0 deletions pallets/api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ frame-benchmarking.workspace = true
frame-support.workspace = true
frame-system.workspace = true
pallet-assets.workspace = true
pallet-nfts.workspace = true
sp-core.workspace = true
sp-runtime.workspace = true
sp-std.workspace = true
Expand All @@ -43,6 +44,7 @@ runtime-benchmarks = [
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"pallet-assets/runtime-benchmarks",
"pallet-nfts/runtime-benchmarks",
"pop-chain-extension/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
]
Expand All @@ -55,6 +57,7 @@ std = [
"pallet-assets/std",
"pallet-balances/std",
"pallet-ismp/std",
"pallet-nfts/std",
"pop-chain-extension/std",
"scale-info/std",
"sp-core/std",
Expand All @@ -65,5 +68,6 @@ std = [
try-runtime = [
"frame-support/try-runtime",
"frame-system/try-runtime",
"pallet-nfts/try-runtime",
"sp-runtime/try-runtime",
]
4 changes: 2 additions & 2 deletions pallets/api/src/fungibles/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pub mod pallet {

/// State reads for the fungibles API with required input.
#[derive(Encode, Decode, Debug, MaxEncodedLen)]
#[cfg_attr(feature = "std", derive(PartialEq, Clone))]
#[cfg_attr(feature = "std", derive(Clone))]
#[repr(u8)]
#[allow(clippy::unnecessary_cast)]
pub enum Read<T: Config> {
Expand Down Expand Up @@ -84,7 +84,7 @@ pub mod pallet {

/// Results of state reads for the fungibles API.
#[derive(Debug)]
#[cfg_attr(feature = "std", derive(PartialEq, Clone))]
#[cfg_attr(feature = "std", derive(Encode, Clone))]
pub enum ReadResult<T: Config> {
/// Total token supply for a specified token.
TotalSupply(BalanceOf<T>),
Expand Down
Loading
Loading